Optical fiber splicer dynamic image is locally shown centered on method
Technical field
The present invention relates to image processing methods, and in particular to optical fiber splicer dynamic image is locally shown centered on method.
Background technology
Optical fiber splicer is used for fused fiber splice, and the work such as fusion process are required for accurate operation, for executing accurate operation
Instrument, since its operating point is often small-sized (below grade), only rely on naked eyes be difficult to clearly recognize object, because
This, needs to be shown by display screen after object image magnification by camera, then by operating personnel according to display screen
The image of display is operated accordingly.The complete camera picture of real-time display is obtained to smooth, to built-in industrial equipment
Configuration requirement it is very high, hardware cost can be increased, shown so topography would generally be intercepted.Thus have a problem that,
How target object is medially shown in topography.Existing optical fiber splicer dynamic image is locally shown centered on method
It is that row, column center of the topography based on original image then is calculated by the position of optical fiber, electrode bar, according to Local map
The size of picture calculates row, column deviant.The condition that the above method judges in the calculation has partial redundance, and line skew exists
Certain error sometimes will appear the problem of target object cannot be shown centered on the screen.
Invention content
Technical problem to be solved by the invention is to provide a kind of optical fiber splicer dynamic images to be locally shown centered on method,
Simplify calculating process, it is ensured that optical fiber can be expert at, is all medially shown in topography on column direction.
To solve the above problems, the present invention proposes that a kind of optical fiber splicer dynamic image is locally shown centered on method, it is described
Optical fiber splicer includes A cameras and B cameras, and two cameras are oppositely arranged, and needs two optical fiber of welding to be arranged and is taken the photograph described two
As the centre position of head;Include the following steps:
S1:The camera shooting of A cameras obtains the first dynamic image, and the camera shooting of B cameras obtains the second dynamic image, configures each dynamic
The size of the topography of required display on image, and default offset value of the topography relative to dynamic image is set, it is described
Default offset value includes the preset level deviant and default offset of vertical value, the second dynamic of the topography of the first dynamic image
The preset level deviant of the topography of image and default offset of vertical value;
S2:The first dynamic image is observed, carrying out electric discharge to electrode bar generates electric arc, adjusts A cameras, so that the first dynamic
The arc position of image is shown in the approximately mid way between of the horizontal direction of its topography;Promote two optical fibers to A cameras
Visually, and A cameras are adjusted, so that the right side optical fiber or left side optical fiber of the first dynamic image are on the vertical direction of topography
It is shown centered on;The second dynamic image is observed, carrying out electric discharge to electrode bar generates electric arc, B cameras is adjusted, so that the second Dynamic Graph
The arc position of picture is shown in the approximately mid way between of the horizontal direction of its topography;Promote two optical fibers to B cameras can
Depending on, and B cameras are adjusted, so that the left side optical fiber or right side optical fiber of the second dynamic image occupy on the vertical direction of topography
Middle display;The right side optical fiber of first dynamic image corresponds to the left side optical fiber of second dynamic image, first dynamic
The left side optical fiber of image corresponds to the right side optical fiber of second dynamic image;
S3:Position, part of the electrode bar in the horizontal direction of the first dynamic image and the second dynamic image are obtained respectively
Position of the horizontal size and fiber end face of image in the horizontal direction of the first dynamic image and the second dynamic image;It obtains
Take an optical fiber that need to be advanced to the advance distance of electrode bar;Obtain fiber core the first dynamic image, the second dynamic image it is perpendicular
The upward position of histogram;
S4:In the horizontal direction according to electrode bar position in the horizontal direction, the horizontal size of topography, fiber end face
On position and advance distance, determine the horizontal offset values of the topography of the first dynamic image, the office of the second dynamic image
The horizontal offset values of portion's image;According to the size of topography and fiber core in the first dynamic image, the second dynamic image
Position on vertical direction determines the offset of vertical value of the topography of the first dynamic image, the Local map of the second dynamic image
The offset of vertical value of picture.
According to one embodiment of present invention, in the step S1, the default water of the topography of the first dynamic image
Flat deviant is (OriC-PartC)/2;The default offset of vertical value of the topography of first dynamic image is (OriL-
PartL)/2;The preset level deviant of the topography of second dynamic image is (OriC-PartC)/2;Second dynamic image
Topography default offset of vertical value be (OriL-PartL)/2;Wherein, OriC is the first dynamic image and the second dynamic
The cross-directional length of image, the vertical direction length of the first dynamic images of OriL and the second dynamic image, PartC are each dynamic
The cross-directional length of the topography of image, PartL are the vertical direction length of the topography of each dynamic image.
According to one embodiment of present invention, in the step S4, the advance distance includes in current welding pattern
The fiber end face spacing of setting, fiber end face offset.
According to one embodiment of present invention, in the step S4,
Determine that the horizontal offset values of the topography of the first dynamic image, the level of the topography of the second dynamic image are inclined
The formula of shifting value such as (1), (2) and (3):
Err=endXL-endYL ... (1)
HorX=elecX-PartC/2-offset-gap ... (2)
HorY=horX-Err ... (3)
Wherein, endXL is in the position of the fiber end face of the horizontal direction upper left side optical fiber of the first dynamic image to first
The distance of the left side of dynamic image, endYL are the position of the fiber end face of the horizontal direction upper left side optical fiber of the second dynamic image
The distance of the left side to the second dynamic image is set, Err is the difference of endXL and endYL, and PartC is the part of each dynamic image
The cross-directional length of image, offset deviate for the fiber end face, and gap is the fiber end face spacing, horX first
The horizontal offset values of the topography of dynamic image, horY are the horizontal offset values of the topography of the second dynamic image;It is described
Fiber end face offset need to be advanced to electrode bar for the left side optical fiber obtained according to the predefined welding pattern of optical fiber splicer
The offset of advance distance;The fiber end face spacing is the left side light that is obtained according to the predefined welding pattern of optical fiber splicer
Fibre promotes spacing of the fiber end face from electrode bar of rear left optical fiber;
Determine the offset of vertical value of the topography of the first dynamic image, the topography of the second dynamic image it is vertical partially
The formula of shifting value such as (4) and (5):
VerX=centerX-partL/2 ... (4)
VerY=centerY-partL/2 ... (5)
Wherein, centerX is the position of fiber core and the first dynamic image on the vertical direction of the first dynamic image
The distance on one side, centerY be the second dynamic image vertical direction on fiber core position and the second dynamic image one
The distance on side, partL are the vertical direction length of the topography of each dynamic image, and verX is the Local map of the first dynamic image
The offset of vertical value of picture, verY are the offset of vertical value of the topography of the second dynamic image.
According to one embodiment of present invention, in step s 2, it promotes two optical fibers visual to A cameras, and adjusts A and take the photograph
As head, so that the right side optical fiber of the first dynamic image is shown centered on the vertical direction of its topography;Promote two optical fibers
It is visual to B cameras, and B cameras are adjusted, so that vertical direction of the left side optical fiber of the second dynamic image in its topography
On be shown centered on;The left side of the right side optical fiber of the topography of first dynamic image and the topography of the second dynamic image
Optical fiber corresponds to same optical fiber.
According to one embodiment of present invention, between step S2 and S3, another fiber position is adjusted, so that another light
Fiber alignment that is fine and being shown centered on the vertical direction of the first dynamic image.
According to one embodiment of present invention, in step s3, the electrode bar position and first of the first dynamic image is obtained
The horizontal distance of the left side of dynamic image obtains the left side of the electrode bar position and the second dynamic image of the second dynamic image
Horizontal distance, obtain the horizontal distance of the left side of fiber end face and the first dynamic image of the first dynamic image, acquisition the
The horizontal distance of the left side of the fiber end face of two dynamic images and the second dynamic image, and obtain fiber end face and electrode bar
Spacing and offset distance.
According to one embodiment of present invention, in the step S3, an optical fiber need to be advanced to the propulsion of electrode bar
The offset of distance and spacing are obtained according to the predefined welding pattern of optical fiber splicer, and each pattern defines corresponding inclined
Shifting and spacing.
According to one embodiment of present invention, further include step S5 after step s4, receive first dynamic image
The horizontal offset values of topography, the horizontal offset values of topography of the second dynamic image, the first dynamic image part
The offset of vertical value of image, the offset of vertical value of the topography of the second dynamic image, and topography is carried out according to deviant
Display.
According to one embodiment of present invention, the part of first dynamic image is received by the FPGA of optical fiber splicer
The topography of the horizontal offset values of the topography of the horizontal offset values of image, the second dynamic image, the first dynamic image
Offset of vertical value, the second dynamic image topography offset of vertical value, and each dynamic image is shown according to deviant configuration
Topography.
After adopting the above technical scheme, the present invention has the advantages that compared with prior art:By obtaining Local map
As the deviant relative to dynamic image, and in acquisition process, the position of camera and optical fiber is arranged, so that
Optical fiber image can be shown centered in topography, wherein on the one hand the acquisition of deviant is by the electric discharge of electrode bar
A cameras and B cameras are adjusted, the horizontal center of electric arc is adjusted with reference to same fiber position, is on the other hand by referring to light
It is fine and adjust A cameras and B cameras, so that vertical center of the optical fiber in topography;According to fiber end face and electrode bar
Between advance distance and electrode bar, fiber end face position, can calculate it is placed in the middle in the case of topography relative to dynamic
The horizontal offset values of state image, the topography in the case of being calculated between two parties according to fiber position is relative to dynamic image
Offset of vertical value, certainly, known to the size of topography and the size of dynamic image.Calculating process of the present invention is irredundant, calculates
Process is simple, and the image result placed in the middle of the topography obtained is more accurate.
Description of the drawings
Fig. 1 is that the optical fiber splicer dynamic image of one embodiment of the invention is locally shown centered on the flow diagram of method;
Fig. 2 is the schematic diagram of the dynamic image and its topography in Fig. 1 methods in step S1;
Fig. 3 is the schematic diagram of the first dynamic image and its topography in Fig. 1 methods in step S2;
Fig. 4 is the schematic diagram of the second dynamic image and its topography in Fig. 1 methods in step S2;
Fig. 5 is marked with the schematic diagram of electrode bar horizontal distance for the first dynamic image in step S3 in Fig. 1 methods;
Fig. 6 is marked with the schematic diagram of electrode bar horizontal distance for the second dynamic image in step S3 in Fig. 1 methods;
Fig. 7 is marked with the schematic diagram of fiber end face horizontal distance for the first dynamic image in step S3 in Fig. 1 methods;
Fig. 8 is marked with the schematic diagram of fiber end face horizontal distance for the second dynamic image in step S3 in Fig. 1 methods;
Fig. 9 is marked with the schematic diagram of the vertical distance of optical fiber for the first dynamic image in step S3 in Fig. 1 methods;
Figure 10 is marked with the schematic diagram of the vertical distance of optical fiber for the second dynamic image in step S3 in Fig. 1 methods.
Specific implementation mode
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below in conjunction with the accompanying drawings to the present invention
Specific implementation mode be described in detail.
Many details are elaborated in the following description in order to fully understand the present invention.But the present invention can be with
Much implement different from other manner described here, those skilled in the art can be without prejudice to intension of the present invention the case where
Under do similar popularization, therefore the present invention is not limited to the specific embodiments disclosed below.
Fig. 1 shows that the optical fiber splicer dynamic image of the embodiment of the present invention is locally shown centered on method, optical fiber splicer packet
A cameras and B cameras are included, two cameras are oppositely arranged, and need two optical fiber of welding that the interposition in two camera is arranged
It sets;This approach includes the following steps:
S1:The camera shooting of A cameras obtains the first dynamic image, and the camera shooting of B cameras obtains the second dynamic image, configures each dynamic
The size of the topography of required display on image, and default offset value of the topography relative to dynamic image is set, it is described
Default offset value includes the preset level deviant and default offset of vertical value, the second dynamic of the topography of the first dynamic image
The preset level deviant of the topography of image and default offset of vertical value;
S2:The first dynamic image is observed, carrying out electric discharge to electrode bar generates electric arc, adjusts A cameras, so that the first dynamic
The arc position of image is shown in the approximately mid way between of the horizontal direction of its topography;Promote two optical fibers to A cameras
Visually, and A cameras are adjusted, so that the right side optical fiber or left side optical fiber of the first dynamic image are on the vertical direction of topography
It is shown centered on;The second dynamic image is observed, carrying out electric discharge to electrode bar generates electric arc, B cameras is adjusted, so that the second Dynamic Graph
The arc position of picture is shown in the approximately mid way between of the horizontal direction of its topography;Promote two optical fibers to B cameras can
Depending on, and B cameras are adjusted, so that the left side optical fiber or right side optical fiber of the second dynamic image occupy on the vertical direction of topography
Middle display;The right side optical fiber of first dynamic image corresponds to the left side optical fiber of second dynamic image, first dynamic
The left side optical fiber of image corresponds to the right side optical fiber of second dynamic image;
S3:Position, part of the electrode bar in the horizontal direction of the first dynamic image and the second dynamic image are obtained respectively
Position of the horizontal size and fiber end face of image in the horizontal direction of the first dynamic image and the second dynamic image;It obtains
Take an optical fiber that need to be advanced to the advance distance of electrode bar;Obtain fiber core the first dynamic image, the second dynamic image it is perpendicular
The upward position of histogram;
S4:In the horizontal direction according to electrode bar position in the horizontal direction, the horizontal size of topography, fiber end face
On position and advance distance, determine the horizontal offset values of the topography of the first dynamic image, the office of the second dynamic image
The horizontal offset values of portion's image;According to the size of topography and fiber core in the first dynamic image, the second dynamic image
Position on vertical direction determines the offset of vertical value of the topography of the first dynamic image, the Local map of the second dynamic image
The offset of vertical value of picture.
Specifically, the specific implementation mode of the method for the present invention is described in detail in 2-10 below in conjunction with the accompanying drawings.
In step sl, the camera shooting of A cameras obtains the first dynamic image, and the camera shooting of B cameras obtains the second dynamic image, matches
The size of the topography of required display on each dynamic image is set, in general, dynamic image and local size are rectangle, thus
Size can be described by length and width, default offset value of the setting topography relative to dynamic image, and acquiescence is inclined
Shifting value includes the preset level deviant and default offset of vertical value, the second dynamic image of the topography of the first dynamic image
The preset level deviant of topography and default offset of vertical value;Due to the size of dynamic image and topography it is known that because
And it can know that topography is opposite by the distance of topography's a side (such as left side) to dynamic image a side
In the horizontal offset values of dynamic image, remaining is similar, referring to Fig. 2, has two optical fiber 3 for waiting for welding in the first dynamic image 1
With 4, and show their fibre core 31 and 41, preset topography 11 is located in the first dynamic image 1, wherein Local map
Picture 11 is horX relative to the horizontal offset values of the first dynamic image, and offset of vertical value is verX.In one embodiment, first
The preset level deviant of the topography of dynamic image is (OriC-PartC)/2;The topography of first dynamic image it is pre-
If offset of vertical value is (OriL-PartL)/2;The preset level deviant of the topography of second dynamic image is (OriC-
PartC)/2;The default offset of vertical value of the topography of second dynamic image is (OriL-PartL)/2;Wherein, OriC
The cross-directional length of one dynamic image and the second dynamic image, the vertical side of the first dynamic images of OriL and the second dynamic image
To length, PartC is the cross-directional length of the topography of each dynamic image, and PartL is the topography of each dynamic image
Vertical direction length.The size of preset first dynamic image and the second dynamic image is identical, the topography of the two interception
Size is also identical.
Then step S2 is executed, the first dynamic image is observed, carrying out electric discharge to electrode bar generates electric arc, adjusts A cameras,
So that the arc position of the first dynamic image is shown in the approximately mid way between of the horizontal direction of its topography, since electric arc is put
Light is a bright region, is not easy to illustrate, and electric arc centre position is general position, behind also there is corresponding deviant to adjust
It is whole.Referring to Fig. 3, it promotes two optical fibers 3 and 4 visual to A cameras, and adjusts A cameras, so that the right side of the first dynamic image 1
Optical fiber 3 or left side optical fiber are shown centered on the vertical direction of topography.The second dynamic image is observed, electrode bar is carried out
Electric discharge generates electric arc, B cameras is adjusted, so that the arc position of the second dynamic image is shown in the horizontal direction of its topography
Approximately mid way between;Referring to Fig. 4, promote two optical fibers 3 and 4 visual to B cameras, and adjust B cameras, so that second is dynamic
The left side optical fiber 3 or right side optical fiber of state image 2 are shown centered on the vertical direction of topography.
In a preferred embodiment, in step s 2, it is imaged referring to Fig. 3 with Fig. 4, two optical fibers 2 and 4 of propulsion to A
Head is visual, and adjusts A cameras, so that the right side optical fiber 3 of the first dynamic image 1 occupies on the vertical direction of its topography 11
Middle display, can be with the fibre core 31 of optical fiber 3 as reference, and fibre core 31 is in 11 vertical center of topography of the first dynamic image 1
Position;It promotes two optical fibers 3 and 4 visual to B cameras, and adjusts B cameras, so that the left side optical fiber 3 of the second dynamic image 2
It is shown centered on the vertical direction of its topography 21, can be with the fibre core 31 of optical fiber 3 as reference, it is dynamic that fibre core 31 is in second
The 21 vertical center position of topography of state image 2;The right side optical fiber 3 of first dynamic image 1 and the second dynamic image 2
Left side optical fiber 3 corresponds to same optical fiber, and another optical fiber 4 can not be aligned with its fibre core with an optical fiber 3.Electrode bar in each figure
Position is adjusted with the sequencing of fiber position adjustment without limitation.
When an optical fiber 3 and another optical fiber 4 are misaligned, between step S2 and S3, it is also necessary to adjust another optical fiber 4
It sets, so that another optical fiber 4 and the optical fiber 3 being shown centered on the vertical direction of the topography 11 of the first dynamic image 1
Alignment.
Then step S3 is executed, referring to Fig. 5, obtains the position of electrode bar 5 in the horizontal direction in the first dynamic image 1,
Due to first dynamic image 1 size it is known that topography horizontal size it is also known that, thus know electrode bar 5 on it
Horizontal position obtains a left side for 5 position of electrode bar and the first dynamic image 1 of the first dynamic image 1 in one embodiment
The horizontal distance elecX of side.Referring to Fig. 6, the position of electrode bar 5 in the horizontal direction in the second dynamic image 2 is obtained, due to
The size of second dynamic image 2 in one embodiment, obtains it is known that thus know the horizontal position of electrode bar 5 on it
Take the horizontal distance elecY of 5 position of electrode bar of the second dynamic image 2 and the left side of the second dynamic image 2.
In one embodiment, advance distance includes the fiber end face spacing being arranged in current welding pattern, fiber end face
Offset.Referring to Fig. 7, obtain the level of the fiber end face 6 of the optical fiber 4 of the first dynamic image and the left side of the first dynamic image away from
From endXL;Referring to Fig. 8, the water of the fiber end face 6' of the optical fiber 3 of the second dynamic image and the left side of the second dynamic image are obtained
Flat distance endYL;The offset offset and spacing gap of advance distance of electrode bar need to be advanced to by obtaining an optical fiber, offset and
Away from being obtained according to the predefined welding pattern of optical fiber splicer, each pattern defines corresponding offset and spacing.
Referring to Fig. 9, position of the optical fiber 3 on the vertical direction in the first dynamic image 1 is obtained, in fig.9, with optical fiber 3
Fiber core 31 on the basis of, be the distance between the top centerX of the 31 to the first dynamic image of fiber core 1.Referring to figure
10, position of the optical fiber 3 on the vertical direction in the second dynamic image 2 is obtained, in Fig. 10, with the fiber core 31 of optical fiber 3
On the basis of, it is the distance between the top of the 31 to the second dynamic image of fiber core 2 centerY.
In a more specific embodiment, determine that the horizontal offset values of the topography of the first dynamic image, second move
The formula of the horizontal offset values of the topography of state image such as (1), (2) and (3):
Err=endXL-endYL ... (1)
HorX=elecX-PartC/2-offset-gap ... (2)
HorY=horX-Err ... (3)
Wherein, endXL is in the position of the fiber end face of the horizontal direction upper left side optical fiber of the first dynamic image to first
The distance of the left side of dynamic image, endYL are the position of the fiber end face of the horizontal direction upper left side optical fiber of the second dynamic image
The distance of the left side to the second dynamic image is set, Err is the difference of endXL and endYL, and PartC is the part of each dynamic image
The cross-directional length of image, offset are fiber end face offset, the value range of offset -50~50 microns it
Between, gap is the fiber end face spacing, and for the value range of gap between 10~50 microns, horX is the office of the first dynamic image
The horizontal offset values of portion's image, horY are the horizontal offset values of the topography of the second dynamic image;The fiber end face offset
Left side optical fiber to be obtained according to the predefined welding pattern of optical fiber splicer need to be advanced to the inclined of the advance distance of electrode bar
It moves;Left side after the fiber end face spacing promotes for the left side optical fiber obtained according to the predefined welding pattern of optical fiber splicer
Spacing of the fiber end face of optical fiber from electrode bar.
Determine the offset of vertical value of the topography of the first dynamic image, the topography of the second dynamic image it is vertical partially
The formula of shifting value such as (4) and (5):
VerX=centerX-partL/2 ... (4)
VerY=centerY-partL/2 ... (5)
Wherein, centerX is the position of fiber core and the first dynamic image on the vertical direction of the first dynamic image
The distance on one side, centerY be the second dynamic image vertical direction on fiber core position and the second dynamic image one
The distance on side, partL are the vertical direction length of the topography of each dynamic image, and verX is the Local map of the first dynamic image
The offset of vertical value of picture, verY are the offset of vertical value of the topography of the second dynamic image.
The size of image and each length can by pixel number of the image in all directions (row and column direction) or
Position determines.
In a further embodiment, further include step S5 after step s4, receive the office of first dynamic image
The topography of the horizontal offset values of the topography of the horizontal offset values of portion's image, the second dynamic image, the first dynamic image
Offset of vertical value, the second dynamic image topography offset of vertical value, and according to deviant carry out topography show.
Specifically, the FPGA (Field-Programmable Gate Array, the field-programmable that pass through optical fiber splicer
Gate array) receive the horizontal offset values of topography of first dynamic image, the topography of the second dynamic image water
Flat deviant, the offset of vertical value of topography of the first dynamic image, the second dynamic image topography offset of vertical
Value, and according to the topography of each dynamic image of deviant configuration display.
The optical fiber splicer of the present invention can be existing instrument, can have two cameras, FPGA and corresponding display
Control device etc..
Although the present invention is disclosed as above with preferred embodiment, it is not for limiting claim, any this field
Technical staff without departing from the spirit and scope of the present invention, can make possible variation and modification, therefore the present invention
Protection domain should be subject to the range that the claims in the present invention are defined.