Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.For this purpose, of the invention
One purpose is to provide a kind of processing method and processing device of multiple labeling point target substance markers point focusing sequence, improves treatment effeciency.
The technical scheme adopted by the invention is that: a kind of processing method of multiple labeling point target substance markers point focusing sequence,
Comprising steps of
S1 is obtained in object and is needed the mark point focused;
S2 determines the first mark point, starts to focus to the first mark point according to full focusing mode;
S3 selects next mark point according to the first constraint condition, and focuses to it according to half focusing mode;
S4 repeats step S3;
First constraint condition includes:
C1, it is minimum with upper mark point distance.
As a further improvement of the foregoing solution, first constraint condition further include: C0, with a upper mark point distance
Less than pre-determined distance threshold value.
As a further improvement of the foregoing solution, first constraint condition further include: C2 is located at a upper mark point
In the same connected region.
As a further improvement of the foregoing solution, the step S4 specifically: step S3 is repeated, until meeting second
Constraint condition, second constraint condition are as follows: at a distance from a upper mark point be greater than pre-determined distance threshold value.
As a further improvement of the foregoing solution, the method also includes step S5, to label to be focused in object
Point, the mark point to be focused from left end to right end mark point to be focused are focused according to a according to full focusing mode.
As a further improvement of the foregoing solution, the full focusing mode includes a focus process and secondary focused
Journey;
Focus process specifically: height and position photographic subjects objects are shot multiple first using shooting unit,
The reference picture for obtaining corresponding first shooting height and position selects corresponding first shooting of the highest reference picture of clarity high
Position is spent as the first focal position;
The secondary focus process specifically: choose the first focal position as the second center, utilize shooting unit
The reference picture for obtaining multiple second shooting height and positions centered on the second center, selects the highest reference of clarity
The corresponding second shooting height and position of image is as the second focal position.
As a further improvement of the foregoing solution, the half focusing mode specifically: with the focus position of previous mark point
It is set to the second center, executes secondary focus process.
A kind of processing unit of multiple labeling point target substance markers point focusing sequence, for implementing such as above-mentioned multiple labeling point mesh
Mark the processing method of substance markers point focusing sequence, which is characterized in that described device includes:
Module is obtained, for obtaining the mark point for needing to be focused in object;
Determining module starts to focus to the first mark point according to full focusing mode for determining the first mark point;
First choice module, for selecting next mark point according to the first constraint condition, and to it according to half focusing side
Formula is focused;
Repeat module, next mark point selected according to the first constraint condition for repeating, and to its according to
Half focusing mode is focused;
First constraint condition includes:
C1, it is minimum with upper mark point distance.
As a further improvement of the foregoing solution, the module that repeats is specifically used for repeating according to the first constraint
Condition selects next mark point, and focuses to it according to half focusing mode, until meet the second constraint condition, described the
Two constraint conditions are as follows: at a distance from a upper mark point be greater than pre-determined distance threshold value.
As a further improvement of the foregoing solution, described device further includes the second selecting module, for in object from
Left end mark point to be focused is focused according to a according to full focusing mode to right end mark point to be focused.
The beneficial effects of the present invention are:
A kind of processing method and processing device of multiple labeling point target substance markers point focusing sequence of the present invention, obtains institute in object
Need the mark point focused, determine that first mark point starts to focus, and is selected according to a upper mark point apart from the smallest condition
Next mark point focusing is selected, treatment effeciency is improved.
Specific embodiment
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.
Fig. 1 is the process method step flow chart of multiple labeling point target substance markers point focusing sequence of the present invention, referring to Fig.1,
A kind of processing method of multiple labeling point target substance markers point focusing sequence, including step S1 to S4.
S1 is obtained in object and is needed the mark point focused;
S2 determines the first mark point, starts to focus to the first mark point according to full focusing mode.
In a particular embodiment, any one mark point to be focused of edge is located in selection target object as the first label
Point can be left end or right end or the top or first mark point of the lowermost in object, determine first
After mark point, start to focus to the first mark point according to full focusing mode.
Fig. 2 is the full focusing schematic diagram of multiple labeling point target substance markers point focusing sequence of the present invention, complete right referring to Fig. 2
Burnt process includes a focus process and secondary focus process, a focus process specifically: using shooting unit multiple the
One shooting height position photographic subjects object obtains the reference picture of corresponding first shooting height and position, selects clarity highest
Reference picture it is corresponding first shooting height and position as the first focal position.
Multiple first shooting height and positions, which refer to, terminates height and position positioned at preset first starting height and position 101 and first
Between 102, line-scan digital camera and/or object lens according to the first default step distance 103 vertically axis 104 from the first starting altitude position
It sets 101 and is moved to the first termination height and position 102, multiple first shooting height and positions of formation obtain corresponding first shooting
The reference picture of height and position, choosing finally terminate 102 line-scan digital camera of height and position in the first starting height and position 101 and first and clap
The corresponding first shooting height and position of the focus taken the photograph in the image of acquisition where selecting the highest image of clarity is defined as first
Focal position 105.
Secondary focus process specifically: choose the first focal position 105 and be used as the second center, obtained using shooting unit
The reference picture for taking multiple second shooting height and positions centered on the second center, selects clarity highest with reference to figure
As corresponding second shooting height and position is as the second focal position.
Multiple second shooting height and positions refer to centered on the second center, are located at preset second starting altitude position
201 and second terminate between height and position 202, and line-scan digital camera and/or object lens are according to the second default step distance 203 vertically axis
Line 204 is moved to the second termination height and position 202, multiple second shooting heights position of formation from the second starting altitude position 201
It sets.Wherein, the second default step distance 203 is less than the first default step distance 103, finally in the second starting altitude position 201
The focus pair where selecting the highest image of clarity in the image that the shooting of 202 line-scan digital camera of height and position obtains is terminated with second
The the second shooting height and position answered is defined as the second focal position 205.
S3 selects next mark point according to the first constraint condition, and focuses to it according to half focusing mode.
In a particular embodiment, the first constraint condition includes:
C0 is less than pre-determined distance threshold value with upper mark point distance;
C1, it is minimum with upper mark point distance;
C2 is located in the same connected region with a upper mark point.
Pre-determined distance threshold value d chooses with upper mark point distance less than pre-determined distance threshold value d to focus marks point,
Again from select meet C0 condition in focus marks point, selection is with a upper mark point apart from the smallest to focus marks
Point, and judge whether this mark point and a upper mark point are located in the same connected region, if being located at the same connected region
It is interior, then select this to wait for that focus marks point is focused as next mark point, and to it according to half focusing mode, if not being located at
In the same connected region, then find it is next meet the first constraint condition to focus marks point as next mark point.
In the present embodiment, judge whether to be located in the same connected region, specifically, by obtaining object original graph
Original image is converted to gray level image by picture, is carried out threshold filtering to gray level image, bianry image is converted into, to bianry image
Connected region is calculated, whether judge currently to choose is located at the same connected region to focus marks point and a upper mark point
It is interior.
In the present embodiment, half focusing mode specifically: with the focal position of previous mark point for the second center, hold
The secondary focus process of row.Due in step s 2, focusing to the first mark point according to full focusing mode, i.e., marked to first
Point first carries out a focus process, then carries out secondary focus process, since next mark point is selected according to the first constraint condition,
And focus to it according to half focusing mode, i.e., secondary focus process is clicked through to next label, due to marking with upper one
Point distance is less than pre-determined distance threshold value, i.e. focal length difference between two mark points is little, there is omitted herein a focus process,
The efficiency of camera scanning is effectively increased, while obtaining the higher image of clarity.
S4 repeats step S3.
In a particular embodiment, step S4 is to repeat step S3, until meeting the second constraint condition, wherein second
Constraint condition are as follows: at a distance from a upper mark point be greater than pre-determined distance threshold value.In the present embodiment, this method further includes step
S5: to mark point to be focused in object, the mark point to be focused from left end is to right end mark point to be focused according to a
It focuses according to full focusing mode.After executing step S1 to step S4, the mark that do not focus is likely present in object
Remember point, increases step S5 and focus to mark point to be focused in object according to full focusing mode, avoid due to front and back phase
The mark point of adjacent two focusings is apart from the case where too far, focal length difference causes to defocused fogging image greatly.
A kind of processing method of multiple labeling point target substance markers point focusing sequence of the present invention obtains and needs in object pair
Burnt mark point, determines that first mark point starts to focus, and next according to selecting with a upper mark point apart from the smallest condition
The focusing of a mark point, improves treatment effeciency, and to the mark point that different selection modes are selected, full focusing mode or half right is respectively adopted
Burnt mode is focused, and the image got is more clear.
Fig. 3 is the processing device structure diagram of multiple labeling point target substance markers point focusing sequence of the present invention, reference Fig. 3,
A kind of processing unit of multiple labeling point target substance markers point focusing sequence, for implementing such as above-mentioned multiple labeling point target substance markers
The processing method of point focusing sequence, the device include:
Module is obtained, for obtaining the mark point for needing to be focused in object;
Determining module starts to focus to the first mark point according to full focusing mode for determining the first mark point;
First choice module, for selecting next mark point according to the first constraint condition, and to it according to half focusing side
Formula is focused;
Repeat module, next mark point selected according to the first constraint condition for repeating, and to its according to
Half focusing mode is focused.
In the present embodiment, repeats module and be specifically used for repeating according to the next label of the first constraint condition selection
Point, and focus to it according to half focusing mode, until meeting the second constraint condition.
Wherein, the first constraint condition includes:
C0 is less than pre-determined distance threshold value with upper mark point distance;
C1, it is minimum with upper mark point distance;
C2 is located in the same connected region with a upper mark point.
Second constraint condition is to be greater than pre-determined distance threshold value at a distance from a upper mark point.
In the present embodiment, focusing mode includes a focus process and secondary focus process entirely;Focus process tool
Body are as follows: using shooting unit in multiple first shooting height and position photographic subjects objects, obtain corresponding first shooting height and position
Reference picture, select the highest reference picture of clarity it is corresponding first shooting height and position as the first focal position;Two
Secondary focus process specifically: choose the first focal position as the second center, obtained using shooting unit with the second center
The reference picture of multiple second shooting height and positions centered on position, selects the highest reference picture of clarity corresponding second
Shooting height position is as the second focal position.Half focusing mode specifically: with the focal position of previous mark point for second
Center executes secondary focus process.
In the present embodiment, which further includes memory module, for store the first constraint condition, the second constraint condition,
Full focusing mode and half focusing mode.
A kind of processing unit of multiple labeling point target substance markers point focusing sequence of the present invention obtains and needs in object pair
Burnt mark point, determines that first mark point starts to focus, and next according to selecting with a upper mark point apart from the smallest condition
The focusing of a mark point, improves treatment effeciency, and to the mark point that different selection modes are selected, full focusing mode or half right is respectively adopted
Burnt mode is focused, and the image got is more clear.
It is to be illustrated to preferable implementation of the invention, but the invention is not limited to the implementation above
Example, those skilled in the art can also make various equivalent variations on the premise of without prejudice to spirit of the invention or replace
It changes, these equivalent deformations or replacement are all included in the scope defined by the claims of the present application.