CN107622499A - A kind of identification and space-location method based on target two-dimensional silhouette model - Google Patents
A kind of identification and space-location method based on target two-dimensional silhouette model Download PDFInfo
- Publication number
- CN107622499A CN107622499A CN201710734207.5A CN201710734207A CN107622499A CN 107622499 A CN107622499 A CN 107622499A CN 201710734207 A CN201710734207 A CN 201710734207A CN 107622499 A CN107622499 A CN 107622499A
- Authority
- CN
- China
- Prior art keywords
- profile
- target
- point
- closed contour
- ambiguity
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Abstract
The invention discloses a kind of identification based on target two-dimensional silhouette model and space-location method, it is related to technical field of image processing, for object be the object with two dimensional surface profile, identification target is the contour feature in some plane interested of the object, identification target is by a number of straightway and/or arc and/or the circular profile for connecting into closure, image can be from any angle, height photographic subjects and its residing background, but it must ensure that all profiles of target are visible and clear, then according to the two-dimensional mode profiles information of target, target is identified from image, and calculate locus of the target relative to camera.
Description
Technical field
The invention belongs to image processing field, is mainly used in the search from image and identifies the target of designated shape, and counts
Spatial pose of the target relative to camera is calculated, the technology can be used for the scenes such as the orientation direction of robot, workpiece sorting.
Background technology
Template matches are the technologies for identifying and orienting that specified target is the most frequently used from image, that is, give the mould of a target
Plate, then searched for and the most like object of template from image.Simplest template matching technique be from image find size,
Direction and the completely the same object of template, it is only necessary to template is translated one by one along image pixel coordinates system, and calculated respectively similar
Degree, until similarity is more than acceptance threshold, then it is assumed that search target;But the target and template in practical application in image
Size is different and different due to shooting distance, while target might have rotation around face normal, and the above method is no longer applicable,
But target does not deform in this case, i.e., circular or circular, rectangle is still rectangle, is only scaled by equal proportion
, existing method is that pantograph ratio and the anglec of rotation are carried out into discretization, and original template is carried out into affine transformation according to certain step-length,
Multiple different sizes, the template of different angle are generated, then carries out above-mentioned template-matching operation respectively again;Above-mentioned technology is in life
In producing line to the automatic identification of workpiece and positioning can meet demand because height, the angle of camera and production line platform are
Fixed, object is generally only had around the rotationally-varying of normal, however, when mechanical arm, robot need to carry out extraterrestrial target
When identification and positioning, not only size, the normal anglec of rotation may change target in image, it is also possible to distortion of projection occurs, because
It is arbitrary for shooting angle, now circle may be projected as ellipse, and rectangle is changed into parallelogram, by a plurality of straight line, camber line
The irregular target of composition can then show the form being more difficult to, and above-mentioned template matching method is all no longer applicable.Throw
Shadow deformation matching is the problem of image recognition, because it not only needs to identify target from the image of deformation, it is also necessary to calculate
Go out the current locus of target (relative to camera), therefore the present invention is directed to distortion of projection's target, devises one kind and is based on mesh
Mark identification and the space-location method of two-dimensional silhouette model.
The content of the invention
The object that the present invention is directed to is the object with two dimensional surface profile, and identification target is that some sense of the object is emerging
Contour feature in interesting plane, identification target connect into closure by a number of straightway and/or arc and/or circle
Profile, image can be from any angle, height photographic subjects and its residing background, but must ensure that all profiles of target are visible and clear
It is clear, then according to the two-dimensional mode profiles information of target, target is identified from image, and calculate sky of the target relative to camera
Between position.
The purpose of the present invention is achieved through the following technical solutions:
A kind of identification and space-location method based on target two-dimensional silhouette model, it is characterised in that comprise the following steps:
Step 1, prepare the two dimensional model of target, the true two dimensional model of target, long measure are drawn in graphics software
For millimeter, and drawing is exported as to the file for including image outline information, two-dimensional mode profiles lines must close, profile by
Straightway, arc or circle composition;
Step 2, the above-mentioned file for including image outline information is read, geometric primitive is parsed, searches and be depicted and close
Profile is closed, and judges to distinguish ambiguity profile therein and non-ambiguity profile, the connection for describing closed contour cathetus and camber line is suitable
Secondary relation, establish target two-dimensional silhouette geometric primitive topological relation;
Step 3, target image is gathered, using the edge of Canny edge detection operator detection images, travels through each wheel
Exterior feature, non-closed profile is excluded, single-pass, more logical marginal point inspection are carried out to closed contour;Select single-pass, the more logical edge checked
Point carries out intersecting outlines separation;Make polygonal segments closed contour, recurrence is carried out to each closed contour using Ramer algorithms
Subdivision, until the ultimate range of obtained whole line segments to each self-corresponding closed contour is less than threshold value Dmax;Again to straightway
And/or arc is fitted with merging, the friendship of adjacent segments is calculated according to the linear equation and/or elliptic arc equation fitted
Point coordinates, the intersection point have corresponded to the target two-dimensional silhouette in step 2;
Step 4, profile is specified search for, caused all closed contours confirm and To Template profile in step 3 for retrieval
The profile undetermined of identical line segment composition, treat the wide progress posture computing of fixed wheel and complete to confirm, marker recognition success in the picture
Target, export target location and projection matrix.
In the step 2, the ambiguity profile is in the sequentially description of the profile, identical be present and sequentially describes;Establish
The specific method of target two-dimensional silhouette geometric primitive topological relation is
Parse primitive information from the ENTITIES sections for the file for including image outline information, including Nl bar straight lines
Start-stop coordinate, the center of circle of Na bar circular arcs, radius, start-stop coordinate, centre coordinate, the radius of Nc circle, preserve all straight lines, circular arc
With round information;
Closed contour is searched, since the starting point of any straight line or circular arc, lookup overlaps down with the straight line terminal
The starting point of one connecting line segment, and this process is repeated, until returning to the starting point most started, that is, find a closed contour;
The line segment included in the closed contour found is rejected from former data, repeats to search the step of closed contour
Suddenly, finished until all line segments are searched, N number of closed contour is counted, plus the circle in objective contour being originally self-closing profile
Nc, amounting in target two dimensional model has N+Nc closed contour, counts each closed contour cathetus number Nli, Circular Arc
Nai, circle number Nci, the numbering of wherein footmark i expression closed contours;
The connection sequentially relation of the straight line and camber line of non-circular closed contour in closed contour described, description rule is from appointing
Meaning line segment starts, and returns to starting point along the fixed all line segments for traveling through profile clockwise or counterclockwise, is then designated as if straight line
0, camber line is designated as 1;For each non-circular closed contour, sequentially relation shares (NL for iti+NAi) kind, i.e., made with each line segment
For starting point, obtain a kind of connection sequentially, complete the foundation of topological relation.
In the step 2, in addition to it is the checking step that ambiguity profile is also non-ambiguity profile to closed contour;Ambiguity wheel
Exterior feature is in the sequentially description of the profile, identical be present and sequentially describes.
In the step 3, the method for excluding non-closed profile is:Travel through all marginal points, if some marginal point thirdly
In neighborhood, the quantity of other marginal points is only 1, then the marginal point belongs to " patent chalaza ", after deleting the marginal point, reexamines
The adjacent marginal point with " patent chalaza ", thirdly in neighborhood whether also only have other marginal points, can delete by that analogy
Except a not closed profile;Said process is repeated, after having handled all marginal points, remaining profile is then all closed contour.
In the step 3, the method to closed contour single-pass, more logical marginal point inspections is the five neighborhood outermosts at a certain edge
In making a circle, the quantity of non-adjacent marginal point is checked, being checked whether for the non-adjacent marginal point in everywhere can be along thirdly neighborhood
Reach center edge point, if can if show at this centered on marginal point a passage, if can not if at this with center edge point
It is unrelated, directly exclude, be otherwise single-pass for multi-channel edge point if the number of channels of the center edge point is more than 2 finally
Road marginal point
In the step 3, intersecting outlines separation method is single-pass, the more logical marginal point to checking, from any marginal point
Start, if the marginal point is single-pass marginal point, the next marginal point of an optional search channels, lead to marginal points if, then more
Respectively along the next marginal point of each search channels;If having returned to the marginal point searched in search procedure, by the route
Delete, return to starting point until searching for, more all paths for successfully returning to starting point, take most short one to be used as minimal closure wheel
Exterior feature, said process is repeated, completes the separation to all intersecting outlines.
In the step 3, straightway and/or arc are fitted and to merge specific method as follows:
Oval segmental arc fitting, the adjacent both sides for the polygon for approaching closed contour are checked, using where ellipse fitting both sides
Marginal point, calculate ellipse fitting error, if error is less than the approximate error of both sides and correspondence profile, replaced using elliptic arc
Two straight lines, said process is repeated along adjacent two edges, until can not be preferably fitted using elliptic arc;
Oval segmental arc merges, if occurring in recursion is carried out to each closed contour using Ramer algorithms continuous
Multistage uses the profile that elliptic arc is fitted, and calculates the center spacing of two adjacent ellipses arcs, if less than table if threshold value Dcmax
Showing to merge, and after merging into an elliptic arc, repeat and carry out same operation with adjacent next elliptic arc, until phase
Adjacent elliptic arc is disposed;
Fitting a straight line is ellipse to that can not be used in each closed contour progress recursion using Ramer algorithms with merging
The profile that circular arc is fitted then directly is fitted using straight line, and carries out judgement merging to adjacent straightway;
The intersecting point coordinate of adjacent segments is sought, is AX according to linear equation Y=kX+b and elliptic arc equation2+BXY+CY2+DX+
EY+1=0 solves the intersecting point coordinate (X, Y) of adjacent segments, and the intersection point corresponds to the node of To Template;K, b are the Fitting Calculation in formula
The coefficient gone out, only straight line is characterized, and (A, B, C, D, E) is the parameter that ellipse fitting calculates, each group of parameter characterization is only
One is oval.
In the step 4, the method for specifying search for profile is, if multiple closed contours in objective contour be present, preferably
Non- ambiguity profile is as template contours, if being all ambiguity profile, using the most profile of line segment number as template contours, from line segment
The most profile of number all calculates similarity, selects most like one group along angle point.
In the step 4, the specific method for confirming the profile undetermined of line segment composition identical with To Template profile is retrieval
Caused all closed contours in step 3, reject the composition line segment number profile different from template contours line segment;In remaining profile
In, a node in the profile is arbitrarily selected, arranges the connection of the profile in the direction of the clock sequentially, if this sequentially can be
Found in (NLi+NAi) of template contours in connection sequentially, then the search profile is profile undetermined, is otherwise directly excluded.
In the step 4, the method that profile undetermined carries out posture computing and completes to confirm is following steps:
According to profile undetermined and the sequentially relation of template contours, the corresponding pass of physics seat and pixel coordinate between node is determined
System, template contours provide the physical coordinates of node, and the node of profile undetermined is pixel coordinate, initially sets up Attitude Calculation equation
WhereinFor the internal reference matrix of camera, can be obtained by camera calibration;
Optional three not conllinear nodes in template contours, by its physical coordinates [Xw Yw 0]i TAnd in profile undetermined
The pixel coordinate [u0 v0] detectedi TBring above-mentioned Attitude Calculation equation into, obtain that projective transformation matrix is calculated
Projective transformation matrix is brought into above-mentioned Attitude Calculation equation, by all node physical coordinates [X of template contoursw Yw
0]i TBring above-mentioned Attitude Calculation equation into respectively, calculate the projected pixel coordinate [u v] of each nodei T;
Projection similarity F is calculated, according to the corresponding node detected in node pixel coordinate (u v) i and profile undetermined
Pixel coordinate (u0v0) i calculates similarity F, and calculation formula is as follows
Wherein n represents nodal point number summation in template contours;
For non-ambiguity profile, if similarity exceedes given threshold, then it is assumed that the profile undetermined is correct target, and is returned
Return to projective transformation squareBattle array, the matrix then describe spatial translation position of the target with respect to camera and
Its anglec of rotation around each axle;
For ambiguity profile, if the similarity under a variety of node corresponding relations exceedes given threshold, will obtain multiple
Attitude matrix, then the profile undetermined is set to polymorphic profile, if target only has this ambiguity profile, directly returns and conform to
The multiple attitude matrixs asked;
If the common attitude matrix of existence anduniquess between multiple polymorphic profiles, the attitude matrix is the correct appearance of ambiguity profile
State;If still there is multiple identical attitude matrixs, the distribution that illustrates multiple ambiguity profiles of target be it is full symmetric, then directly
Connect and return to multiple attitude matrixs, and the successful target of marker recognition in the picture.
Beneficial effects of the present invention are as follows:
First, a kind of identification and space-location method based on target two-dimensional silhouette model provided by the invention, the two of target
Although profile target is tieed up after distortion of projection, the length, radius, angle, proportionate relationship etc. of geometric primitive (straightway, arc)
Change is may have occurred, but keeps the topological relation between invariably geometric primitive;Topological relation is the objective contour bag
The number of straight segments that contains, camber line segment number, circle quantity, the connection sequentially relation of straightway and arc;According to setting the goal
Skeleton pattern, establishes the topological relation of its geometric primitive, then treats search image and carries out rim detection, then carries out geometric primitive
Segmentation fitting, by all contours segmentations be straight line, ellipse, elliptic arc, according to the topological relation of object module, searched into image
Rope matches, untill the topological relation of target is met.
2nd, a kind of identification and space-location method based on target two-dimensional silhouette model provided by the invention, use
Canny is the generally acknowledged best pixel edge detection algorithm of industry, and Ramer algorithms are similarly.
3rd, a kind of identification and space-location method based on target two-dimensional silhouette model provided by the invention, target is identified
Contour feature as in some plane interested of the object.Identify target by a number of straightway and (or) arc
And (or) the circular profile for connecting into closure.Image can be from any angle, height photographic subjects and its residing background, but must ensure
All profiles of target are visible and clear, then according to the two-dimensional mode profiles information of target, target identified from image, and count
Calculate locus of the target relative to camera.
Brief description of the drawings
Fig. 1 is that target image Internal periphery of the present invention describes schematic diagram;
Fig. 2 is the schematic diagram in three fields of the invention;
Fig. 3 is the schematic diagram in five fields of the invention;
Fig. 4 is intersecting outlines Shortest Path Searching of the present invention with separating tactful schematic diagram;
Fig. 5 is the logical construction schematic diagram of the present invention.
Embodiment
Further illustrated below by way of several specific embodiments to realize the technical scheme of the object of the invention, it is necessary to illustrate
, claimed technical solution of the invention includes but is not limited to following examples.
Embodiment 1
Such as Fig. 1 to 5, a kind of identification and space-location method based on target two-dimensional silhouette model, it is characterised in that including
Following steps:
Step 1, prepare the two dimensional model of target, the true two dimensional model of target, long measure are drawn in graphics software
For millimeter, and drawing is exported as to the file for including image outline information, two-dimensional mode profiles lines must close, profile by
Straightway, arc or circle composition;
Step 2, the above-mentioned file for including image outline information is read, geometric primitive is parsed, searches and be depicted and close
Profile is closed, and judges to distinguish ambiguity profile therein and non-ambiguity profile, the connection for describing closed contour cathetus and camber line is suitable
Secondary relation, establish target two-dimensional silhouette geometric primitive topological relation;
Step 3, target image is gathered, using the edge of Canny edge detection operator detection images, travels through each wheel
Exterior feature, non-closed profile is excluded, single-pass, more logical marginal point inspection are carried out to closed contour;Select single-pass, the more logical edge checked
Point carries out intersecting outlines separation;Make polygonal segments closed contour, recurrence is carried out to each closed contour using Ramer algorithms
Subdivision, until the ultimate range of obtained whole line segments to each self-corresponding closed contour is less than threshold value Dmax;Again to straightway
And/or arc is fitted with merging, the friendship of adjacent segments is calculated according to the linear equation and/or elliptic arc equation fitted
Point coordinates, the intersection point have corresponded to the target two-dimensional silhouette in step 2;
Step 4, profile is specified search for, caused all closed contours confirm and To Template profile in step 3 for retrieval
The profile undetermined of identical line segment composition, treat the wide progress posture computing of fixed wheel and complete to confirm, marker recognition success in the picture
Target, export target location and projection matrix.
This is a kind of most basic embodiment of the present invention.Although the two-dimensional silhouette target of target is after distortion of projection, several
The length, radius, angle, proportionate relationship etc. of what primitive (straightway, arc) may have occurred change, but keep constant
It is the topological relation between geometric primitive;Topological relation be the objective contour include number of straight segments, camber line segment number, circle number
Amount, the connection sequentially relation of straightway and arc;According to the skeleton pattern to set the goal, the topology for establishing its geometric primitive is closed
System, then treat search image and carry out rim detection, then carry out the segmentation fitting of geometric primitive, be straight by all contours segmentations
Line, ellipse, elliptic arc, according to the topological relation of object module, matching is searched for into image, until meeting the topological relation of target
Untill;The Canny of use is the generally acknowledged best pixel edge detection algorithm of industry, and Ramer algorithms are similarly.
Embodiment 2
A kind of identification and space-location method based on target two-dimensional silhouette model, it is characterised in that comprise the following steps
Step 1, prepare the two dimensional model of target, the true two dimensional model of target is drawn in AutoCAD, long measure is
Millimeter, and DXF formatted files are exported as, two-dimensional mode profiles lines must close, and profile is by straightway, arc or circle group
Into;
Step 2, the file for including image outline information is read, geometric primitive is parsed, it is several to establish target two-dimensional silhouette
What primitive topological relation, searches and closed contour is depicted, and determine whether ambiguity profile;
Step 3, target image is gathered, using edge in Canny edge detection operator detection images, excludes non-closed wheel
Exterior feature, single-pass, more logical marginal point inspection are carried out to closed contour, and the single-pass for selecting to check, more logical marginal point carry out intersecting outlines
Separation, recursion is carried out to each closed contour using Ramer algorithms, until obtained whole line segments are to each self-corresponding
Untill the ultimate range of contour segment is less than a certain threshold value Dmax;Straightway and/or arc are fitted with merging again, according to
The linear equation and/or elliptic arc equation fitted calculates the intersecting point coordinate of adjacent segments, and the intersection point has corresponded to To Template
Node;
Step 4, profile is specified search for, caused all closed contours confirm and To Template profile in step 3 for retrieval
The profile undetermined of identical line segment composition, treat the wide progress posture computing of fixed wheel and complete to confirm, marker recognition success in the picture
Target, export target location and projection matrix.
In the step 2, the ambiguity profile is in the sequentially description of the profile, identical be present and sequentially describes;Establish
The specific method of target two-dimensional silhouette geometric primitive topological relation is
Parse primitive information from the ENTITIES sections for the file for including image outline information, including Nl bar straight lines
Start-stop coordinate, the center of circle of Na bar circular arcs, radius, start-stop coordinate, centre coordinate, the radius of Nc circle, preserve all straight lines, circular arc
With round information;
Closed contour is searched, since the starting point of any straight line or circular arc, lookup overlaps down with the straight line terminal
The starting point of one connecting line segment, and this process is repeated, until returning to the starting point most started, that is, find a closed contour;
Because intersecting situation is not present in the closed contour of To Template, therefore the searching route only one of starting point can be returned to.Special instruction,
Below, when closed contour is searched from real image, it is understood that there may be intersecting closed contour, now need to search by shortest path
Rope closed contour, refer to aftermentioned.
The line segment included in the closed contour found is rejected from former data, repeats to search the step of closed contour
Suddenly, finished until all line segments are searched, count N number of closed contour, be originally self-closing wheel plus the circular Nc in objective contour
Exterior feature, therefore have (N+Nc) individual closed contour altogether in target two dimensional model, count each closed contour cathetus number NLi, circle
Arc number NAi, circle number NCi, wherein footmark i represent the numbering of closed contour;
Sequentially relation, description rule are since any line segment, along admittedly for the connection of description closed contour cathetus and camber line
The fixed all line segments for traveling through profile clockwise or counterclockwise return to starting point, are then designated as 0 if straight line, camber line is designated as 1;For
Non-circular profile, sequentially relation shares (NLi+NAi) kind for it, i.e., using each line segment as starting point, obtains a kind of connection sequentially.
Such as in Fig. 1 examples, the connection of outline is sequentially represented by 1-0-0-0,0-1-0-0,0-0-1-0, tetra- kinds of 0-0-0-1.
Check whether as " ambiguity profile ";" ambiguity profile " is during (NLi+NAi) kind of the profile sequentially describes, phase be present
Same sequentially description, in Fig. 1 examples, four kinds of connections of Internal periphery are sequentially 1-0-1-0,0-1-0-1,1-0-1-0,0-1-0-
1;" ambiguity profile " can not obtain unique match result in the matching process.
Searched for since the closed contour of " non-ambiguity ", if being all " having ambiguity " closed contour, most from angle point number
Closed contour starts along corners Matching, shares X kind corresponding relations, all calculates similarity, select most like one group;
In the step 3, the method for non-closed profile is excluded to travel through all marginal points, if some marginal point is thirdly adjacent
In domain, the quantity of other marginal points is only 1, then the marginal point belongs to " patent chalaza ", after deleting the marginal point, reexamine with
" patent chalaza " adjacent marginal point, thirdly in neighborhood whether also only have other marginal points, can delete by that analogy
One not closed profile;Said process is repeated, after having handled all marginal points, remaining profile is then all closed contour.
In the step 3, the method to closed contour single-pass, more logical marginal point inspections is the five neighborhood outermosts at a certain edge
In making a circle, the quantity of non-adjacent marginal point is checked, being checked whether for the non-adjacent marginal point in everywhere can be along thirdly neighborhood
Reach center edge point, if can if show at this centered on marginal point a passage, if can not if at this with center edge point
It is unrelated, directly exclude, be otherwise single channel side for multi-channel edge point if the passage of the center edge point is more than 2 finally
Edge point
In the step 3, intersecting outlines separation method is single-pass, the more logical marginal point to checking, from any marginal point
Start, if the marginal point is single-pass, the next marginal point of an optional search channels, if multi-channel edge point, then distinguish
Along the next marginal point of each search channels;If having returned to the marginal point searched in search procedure, the route is deleted,
Until search returns to starting point, more all successfully return to expects your path, takes most short one to be used as minimal closure profile, weight
Multiple said process, completes the separation to all intersecting outlines.
In the step 3, straightway and/or arc are fitted and to merge specific method as follows
Oval segmental arc fitting, the adjacent both sides of Close polygon are checked, use the marginal point where ellipse fitting both sides, meter
Ellipse fitting error is calculated, if error is less than the approximate error of both sides and correspondence profile, two straight lines are replaced using elliptic arc.
Said process is repeated along adjacent two edges, until can not be preferably fitted using elliptic arc.
Oval segmental arc merges, if occurring the profile that continuous multi-stage uses elliptic arc to be fitted in step f, consideration is
It is no to can be merged into an elliptic arc to be fitted.Specific method is:The center spacing of two adjacent ellipses arcs is calculated, if being less than threshold
Value Dcmax then represents to merge, and after merging into an elliptic arc, repeats and is carried out equally with adjacent next elliptic arc
Operation, until adjacent ellipses arc is disposed.
With merging, the profile that elliptic arc can not be used to be fitted then directly is fitted fitting a straight line using straight line, and
Judgement merging is carried out to adjacent straightway.
The intersecting point coordinate of adjacent segments is sought, adjacent segments are calculated according to the above-mentioned linear equation fitted, elliptic arc equation
Intersecting point coordinate, the intersection point corresponded to the node of To Template.
In the step 4, the method for specifying search for profile is, if multiple closed contours in objective contour be present, preferably
" non-ambiguity " profile is as template contours, if " non-ambiguity " profile is not present, using the most profile of line segment number as template wheel
It is wide.
In the step 4, the specific method for confirming the profile undetermined of line segment composition identical with To Template profile is retrieval
Caused all closed contours in step 3, reject the composition line segment number profile different from template contours line segment;In remaining profile
In, the node (intersection points of adjacent segments) in the profile is arbitrarily selected, by (consistent with the direction in step 2e) clockwise
Direction arranges the connection of the profile sequentially, if this can sequentially find in (NLi+NAi) of template contours in connection sequentially,
The search profile is profile undetermined, is otherwise directly excluded.
In the step 4, the method that profile undetermined carries out posture computing and completes to confirm is following steps
According to profile undetermined and the sequentially relation of template contours, the corresponding relation of " physics-pixel " between node, mould are determined
Web wheel exterior feature provides the physical coordinates of node, and the node of profile undetermined is pixel coordinate, has if template contours are " ambiguity profile "
It two or more corresponding relations met, should put on an equal footing, complete following calculating
Initially set up Attitude Calculation equation:
WhereinFor the internal reference matrix of camera, can be obtained by camera calibration;
Optional three not conllinear nodes in template contours, by its physical coordinates [Xw Yw 0]i TAnd in profile undetermined
The pixel coordinate [u0 v0] detectedi TBring above-mentioned Attitude Calculation equation into, obtain that projective transformation matrix is calculated
Projective transformation matrix is brought into above-mentioned Attitude Calculation equation, by all node physical coordinates [X of template contoursw Yw
0]i TBring above-mentioned Attitude Calculation equation into respectively, calculate the projected pixel coordinate [u v] of each nodei T;
Projection similarity F is calculated, according to the corresponding node detected in node pixel coordinate (u v) i and profile undetermined
Pixel coordinate (u0v0) i calculates similarity F, and calculation formula is as follows
Wherein n represents nodal point number summation in template contours;
For " non-ambiguity profile ", if similarity exceedes given threshold, then it is assumed that the profile undetermined is correct target, and
Return to projective transformation matrixThe matrix then describes spatial translation position of the target with respect to camera
And its anglec of rotation around each axle;
For " ambiguity profile ", if the similarity under a variety of node corresponding relations exceedes given threshold, will obtain multiple
Attitude matrix, can not uniquely determine, then the profile undetermined is set to " polymorphic profile ", if target only has this " ambiguity wheel
It is wide ", then directly return to satisfactory multiple attitude matrixs;
If target also has other " ambiguity profiles ", other profiles are set as new template contours, at " polymorphic profile "
Nearby repeat the above steps to obtain new " polymorphic profile ";
If the common attitude matrix of existence anduniquess between multiple " polymorphic profiles ", the attitude matrix be " ambiguity profile " just
True posture;If still there is multiple identical attitude matrixs, the distribution for illustrating multiple " the ambiguity profiles " of target is full symmetric
, then directly return to multiple attitude matrixs, and the successful target of marker recognition in the picture.
Embodiment 3
A kind of identification and space-location method based on target two-dimensional silhouette model, comprise the following steps
Step 1, prepare the two dimensional model of target, the true two dimensional model of target, long measure are drawn in graphics software
For millimeter, and drawing is exported as into DXF formatted files, two-dimensional mode profiles lines must close, and profile is by straightway, arc
Or circle composition;
Step 2, the above-mentioned file for including image outline information is read, geometric primitive is parsed, searches and be depicted and close
Profile is closed, and judges to distinguish ambiguity profile therein and non-ambiguity profile, the connection for describing closed contour cathetus and camber line is suitable
Secondary relation, establish target two-dimensional silhouette geometric primitive topological relation;
Step 3, target image is gathered, using the edge of Canny edge detection operator detection images, travels through each wheel
Exterior feature, non-closed profile is excluded, single-pass, more logical marginal point inspection are carried out to closed contour, the edge of image is the pixel on edge
Point forms a series of profile, and marginal point refers in step 3 with the pixel on the edge of Canny edge detection operator detection images
Point, that is, the pixel on profile;Single-pass, the more logical marginal point for selecting to check carry out intersecting outlines separation;Make polygon
Closed contour is approached, recursion is carried out to each closed contour using Ramer algorithms, until obtained whole line segments are to respectively
The ultimate range of self-corresponding closed contour is less than threshold value Dmax;Straightway and/or arc are fitted with merging again, root
The intersecting point coordinate of adjacent segments is calculated according to the linear equation and/or elliptic arc equation fitted, the intersection point has been corresponded in step 2
Target two-dimensional silhouette, and be made up of geometric primitives such as straightway and arcs, node is exactly target two-dimensional silhouette cathetus
The intersection point of section and/or oval arc;Canny is the generally acknowledged best pixel edge detection algorithm of industry, and Ramer algorithms are same
Reason;Threshold value Dmax suggests taking 2, suggested according to for Ramer algorithm authors in paper;" single-pass, more logical marginal point " is used to describe
Any edge pixel relation adjacent with periphery edge point, for judging whether profile intersects;
Step 4, profile is specified search for, caused all closed contours confirm and To Template profile in step 3 for retrieval
The profile undetermined of identical line segment composition, treat the wide progress posture computing of fixed wheel and complete to confirm, marker recognition success in the picture
Target, export target location and projection matrix.
In the step 2, the ambiguity profile is in the sequentially description of the profile, identical be present and sequentially describes;Establish
The specific method of target two-dimensional silhouette geometric primitive topological relation is
Parse primitive information from the ENTITIES sections for the file for including image outline information, including Nl bar straight lines
Start-stop coordinate, the center of circle of Na bar circular arcs, radius, start-stop coordinate, centre coordinate, the radius of Nc circle, preserve all straight lines, circular arc
With round information;
Closed contour is searched, since the starting point of any straight line or circular arc, lookup overlaps down with the straight line terminal
The starting point of one connecting line segment, and this process is repeated, until returning to the starting point most started, that is, find a closed contour;
The line segment included in the closed contour found is rejected from former data, repeats to search the step of closed contour
Suddenly, finished until all line segments are searched, N number of closed contour is counted, plus the circle in objective contour being originally self-closing profile
Nc, amounting in target two dimensional model has N+Nc closed contour, counts each closed contour cathetus number Nli, Circular Arc
Nai, circle number Nci, wherein footmark i represent the numbering of closed contour;
The connection sequentially relation of the straight line and camber line of non-circular closed contour in closed contour described, description rule is from appointing
Meaning line segment starts, and returns to starting point along the fixed all line segments for traveling through profile clockwise or counterclockwise, is then designated as if straight line
0, camber line is designated as 1;For each non-circular closed contour, sequentially relation shares (NLi+NAi) kind for it, i.e., is made with each line segment
For starting point, obtain a kind of connection sequentially, complete the foundation of topological relation.
In the step 2, in addition to it is the checking step that ambiguity profile is also non-ambiguity profile to closed contour;Ambiguity wheel
Exterior feature is in the sequentially description of the profile, identical be present and sequentially describes, in Fig. 1 examples, four kinds of connections of Internal periphery are sequentially
1-0-1-0,0-1-0-1,1-0-1-0,0-1-0-1;Unique corresponding relation is not present in ambiguity profile, therefore can not subsequently obtain
Unique solution adds amount of calculation, therefore non-ambiguity is preferentially used if having non-ambiguity profile, it is necessary to further excluded
Profile carries out matching primitives, if being all ambiguity profile, carries out matching primitives according still further to another method, the calculating that both need
Journey is differentiated, it is necessary to make a distinction;
In the step 3, the method for excluding non-closed profile is:Travel through all marginal points, if some marginal point thirdly
In neighborhood, the quantity of other marginal points is only 1, then the marginal point belongs to " patent chalaza ", after deleting the marginal point, reexamines
The adjacent marginal point with " patent chalaza ", thirdly in neighborhood whether also only have other marginal points, can delete by that analogy
Except a not closed profile;Said process is repeated, after having handled all marginal points, remaining profile is then all closed contour.
Three neighborhoods refer to centered on marginal point to be calculated, and 3 multiply 3 pixel window, such as Fig. 2, and similarly " five neighborhoods " refers to treat
Centered on calculating marginal point, 5 multiply 5 pixel window, such as Fig. 3;" thirdly in neighborhood, the quantity of other marginal points is only 1 " to refer to
One and only one pixel is the side for the current outline for belonging to traversal in eight in addition to itself pixel in three neighborhoods
Edge point, as shown in Fig. 2 black represents marginal point, white is the pixel of non-edge point;Such as Fig. 3, " non-adjacent marginal point " refers to
During five neighborhood outermosts make a circle, the pixel of the 3X3 inside five neighborhoods is not considered now, if it is adjacent in pixel that outermost is made a circle
A dry pixel regards a marginal point as, but if inherently isolated in the presence of some pixel, not with any other picture
Vegetarian refreshments is adjacent, then is directly denoted as a marginal point.The marginal point for being referred to as above-mentioned two situations is " non-adjacent marginal point ", such as under
In figure left figure, labeled as 1,2 marginal point, inherently isolated in outermost makes a circle, therefore be designated as " non-neighboring edge fit respectively
Edge point ", and labeled as 3 place, it is adjacent to have two marginal points, therefore is regarded as " marginal point ", such left figure
In a total of three " non-adjacent marginal point ";" passage of center edge point " can be along phase if referring to above-mentioned " non-adjacent marginal point "
Adjacent side edge point search communicates to center edge point, i.e. " non-adjacent marginal point " with center edge point, is designated as a passage.
In the step 3, the method to closed contour single-pass, more logical marginal point inspections is the five neighborhood outermosts at a certain edge
In making a circle, the quantity of non-adjacent marginal point is checked, being checked whether for the non-adjacent marginal point in everywhere can be along thirdly neighborhood
Reach center edge point, if can if show at this centered on marginal point a passage, if can not if at this with center edge point
It is unrelated, directly exclude, be otherwise single-pass for multi-channel edge point if the number of channels of the center edge point is more than 2 finally
Road marginal point
In the step 3, intersecting outlines separation method is single-pass, the more logical marginal point to checking, from any marginal point
Start, if the marginal point is single-pass marginal point, the next marginal point of an optional search channels, lead to marginal points if, then more
Respectively along the next marginal point of each search channels;If having returned to the marginal point searched in search procedure, by the route
Delete, until search returns to starting point, more all paths for successfully returning to starting point, path is closed for that can be formed along edge point search
The profile of conjunction, take most short one to be used as minimal closure profile, repeat said process, complete the separation to all intersecting outlines.
In the step 3, straightway and/or arc are fitted and to merge specific method as follows
Oval segmental arc fitting, the adjacent both sides for the polygon for approaching closed contour are checked, using where ellipse fitting both sides
Marginal point, calculate ellipse fitting error, if error is less than the approximate error of both sides and correspondence profile, replaced using elliptic arc
Two straight lines, said process is repeated along adjacent two edges, until can not be preferably fitted using elliptic arc;
Oval segmental arc merges, if occurring in recursion is carried out to each closed contour using Ramer algorithms continuous
Multistage uses the profile that elliptic arc is fitted, and calculates the center spacing of two adjacent ellipses arcs, if less than table if threshold value Dcmax
Showing to merge, and after merging into an elliptic arc, repeat and carry out same operation with adjacent next elliptic arc, until phase
Adjacent elliptic arc is disposed;
Here threshold value Dcmax based on experience value can be using the scope of song as 0.5~2.
Fitting a straight line is ellipse to that can not be used in each closed contour progress recursion using Ramer algorithms with merging
The profile that circular arc is fitted then directly is fitted using straight line, and carries out judgement merging to adjacent straightway;
The intersecting point coordinate of adjacent segments is sought, is AX according to linear equation Y=kX+b and elliptic arc equation2+BXY+CY2+DX+
EY+1=0 solves the intersecting point coordinate (X, Y) of adjacent segments, and the intersection point corresponds to the node of To Template;K, b are the Fitting Calculation in formula
The coefficient gone out, only straight line is characterized, and (A, B, C, D, E) is the parameter that ellipse fitting calculates, each group of parameter characterization is only
One is oval.
In the step 4, the method for specifying search for profile is, if multiple closed contours in objective contour be present, preferably
Non- ambiguity profile is as template contours, if being all ambiguity profile, using the most profile of line segment number as template contours, from line segment
The most profile of number all calculates similarity, selects most like one group along angle point.
In the step 4, the specific method for confirming the profile undetermined of line segment composition identical with To Template profile is retrieval
Caused all closed contours in step 3, reject the composition line segment number profile different from template contours line segment;In remaining profile
In, a node in the profile is arbitrarily selected, arranges the connection of the profile in the direction of the clock sequentially, if this sequentially can be
Found in (NLi+NAi) of template contours in connection sequentially, then the search profile is profile undetermined, is otherwise directly excluded.
In the step 4, the method that profile undetermined carries out posture computing and completes to confirm is following steps:
According to profile undetermined and the sequentially relation of template contours, the corresponding relation of " physics-pixel " between node, mould are determined
Web wheel exterior feature provides the physical coordinates of node, and the node of profile undetermined is pixel coordinate, has two if template contours are ambiguity profile
The corresponding relation that kind or more kind meets, should put on an equal footing, complete following calculating
Initially set up Attitude Calculation equation
WhereinFor the internal reference matrix of camera, can be obtained by camera calibration;
Optional three not conllinear nodes in template contours, by its physical coordinates [Xw Yw 0]i TAnd in profile undetermined
The pixel coordinate [u0 v0] detectedi TBring above-mentioned Attitude Calculation equation into, obtain that projective transformation matrix is calculated
Projective transformation matrix is brought into above-mentioned Attitude Calculation equation, by all node physical coordinates [X of template contoursw Yw
0]i TBring above-mentioned Attitude Calculation equation into respectively, calculate the projected pixel coordinate [u v] of each nodei T;
Projection similarity F is calculated, according to the corresponding node detected in node pixel coordinate (u v) i and profile undetermined
Pixel coordinate (u0v0) i calculates similarity F, and calculation formula is as follows
Wherein n represents nodal point number summation in template contours;
For non-ambiguity profile, if similarity exceedes given threshold, then it is assumed that the profile undetermined is correct target, and is returned
Return to projective transformation squareBattle array, the matrix then describe spatial translation position of the target with respect to camera and
Its anglec of rotation around each axle;
For ambiguity profile, if the similarity under a variety of node corresponding relations exceedes given threshold, will obtain multiple
Attitude matrix, then the profile undetermined is set to polymorphic profile, if target only has this ambiguity profile, directly returns and conform to
The multiple attitude matrixs asked;
Given threshold describes the mean pixel allowable deviation for calculating node and theoretical node, it is proposed that 1 to 5 is taken, if matching
It is required that strict, then threshold value should be smaller, otherwise bigger.
If target also has other ambiguity profiles, other profiles are set as new template contours, near polymorphic profile
Repeat the above steps to obtain new polymorphic profile;
For the first time polymorphic Contour searching being carried out to scan for from image overall, amount of calculation is relatively large, therefore rear
When continuing other polymorphic Contour searchings, in order to reduce amount of calculation, can near the position of a upper polymorphic profile search for.It is more
State profile nearby i.e. more than the center of a polymorphic profile be the center of circle, gradually increase search radius, outside diffused searching other can
The closed contour of energy, the parameter searched in calculating process are identical with the last time.
If the common attitude matrix of existence anduniquess between multiple polymorphic profiles, the attitude matrix is the correct appearance of ambiguity profile
State;If still there is multiple identical attitude matrixs, the distribution that illustrates multiple ambiguity profiles of target be it is full symmetric, then directly
Connect and return to multiple attitude matrixs, and the successful target of marker recognition in the picture.
Embodiment 4
Such as Fig. 1 to Fig. 5, a kind of identification and space-location method based on target two-dimensional silhouette model, it is characterised in that bag
Include following steps:
1. prepare the two dimensional model of target.The true two dimensional model of target is drawn in AutoCAD, long measure is milli
Rice, and export as DXF formatted files, it is desirable to objective contour must be closed, and profile is made up of straightway, arc or circle.Such as figure
Shown in example 1, the target has four closed contours, is made up of straightway, circle and circular arc.
2. reading DXF file, parsing geometric primitive, and establish target two-dimensional silhouette geometric primitive topological relation.
A) primitive information is parsed from the ENTITIES sections of DXF files, the start-stop mainly including straight line (note Nl bars) is sat
Mark, the center of circle of circular arc (note Na bars), radius, start-stop coordinate, centre coordinate, the radius of circle (note Nc), preserve all straight lines, circle
Arc, circle information.
B) closed contour is searched.Since the starting point of any straight line (or circular arc), lookup overlaps with the straight line terminal
Next connecting line segment starting point, repeat a upper process, up to returning to the starting point most started, i.e., successfully find a closure
Profile.(because intersecting situation is not present in the closed contour of To Template, therefore the searching route only one of starting point can be returned to.It is special
Do not mentionlet alone it is bright, below, when closed contour is searched from real image, it is understood that there may be intersecting closed contour, now need by most
Short-circuit path search closed contour, after referring to.)
C) line segment included in the closed contour found is rejected from former data, repeat step b, until will be all
Line segment is searched and finished, and counts N number of closed contour.Originally it is self-closing profile plus the circular Nc in objective contour, therefore target two
Amounting in dimension module has (N+Nc) individual closed contour.
D) each closed contour cathetus number NLi, Circular Arc NAi, circle number NCi, wherein footmark i expression closure wheel are counted
Wide numbering.
E) connection of closed contour cathetus and camber line sequentially relation is described.Description rule is the edge since any line segment
All line segments of fixed (or counterclockwise) clockwise direction traversal profile return to starting point, are then designated as 0 if straight line, camber line is designated as 1.
For non-circular profile, sequentially relation shares (NLi+NAi) kind for it, i.e., using each line segment as starting point, obtains a kind of connection
Sequentially.Such as in Fig. 1 examples, the connection of outline is sequentially represented by 1-0-0-0,0-1-0-0,0-0-1-0,0-0-0-1 tetra-
Kind.
F) check whether as " ambiguity profile "." ambiguity profile " is during (NLi+NAi) kind of the profile sequentially describes, to exist
Identical sequentially describes, and in Fig. 1 examples, four kinds of connections of Internal periphery are sequentially 1-0-1-0,0-1-0-1,1-0-1-0,0-1-
0-1." ambiguity profile " can not obtain unique match result in matching process later.
3. IMAQ and processing, establish geometric topo-relationship.
A) target image is gathered, feature to be identified must be completely clear, and the actual physical size of feature must meet it as far as possible
The design size of two dimensional model.
B) edge in Canny edge detection operator detection images is used, according to image actual conditions, suitably reduces strong edge
Threshold value, the object edge for ensureing be detected occur without missing inspection, make continuous edge as far as possible, extra increased short weak edge
Excluded in next step.
C) non-closed profile is excluded.The method for excluding non-closed profile is:
All marginal points are traveled through, if some marginal point, thirdly in neighborhood, the quantity of other marginal points is only 1, then the side
Edge point belongs to " patent chalaza ", after deleting the marginal point, reexamine with " patent chalaza " adjacent marginal point, thirdly neighborhood
In whether also only have other marginal points, a not closed profile can be deleted by that analogy.Repeat said process, processing
After complete all marginal points, remaining profile is then all closed contour.
D) single-pass, more logical marginal point inspection.After step c exclusion, remaining profile is closed contour in image,
From in terms of neighbouring relations, can be divided between profile it is intersecting, mutually from.For phase from closed contour, the node of single-pass in profile be present, and
For intersecting profile, wherein more logical marginal points (node) be present, the determination methods of single-pass marginal point and Duo Tong marginal points:At certain
During the five neighborhood outermosts at one edge make a circle, check that non-adjacent marginal point there are several places, for everywhere, whether reexamine can edge
Thirdly neighborhood reaches center edge point, if can if show at this centered on marginal point a passage, if can not if at this with
Heart marginal point is unrelated, directly excludes.Finally, if the passage of the center edge point is more than 2, for multi-channel edge point, otherwise for
Single channel marginal point, as shown in Figure 2.
E) intersecting outlines separate.According to the single-pass marginal point (node) judged in step d and more logical marginal point (node),
Since any marginal point, if the marginal point is single-pass, the next marginal point of an optional search channels, if multichannel side
Edge point, then respectively along the next marginal point of each search channels;, will if having returned to the marginal point searched in search procedure
The route is deleted, and until search returns to starting point, more all successfully return to expects your path, takes most short one as minimum
Closed contour, said process is repeated, the separation to all intersecting outlines is completed, as Fig. 3 shows.
F) polygonal segments closed contour.Recursion is carried out to each closed contour using Ramer algorithms, until
To whole line segments to each self-corresponding contour segment ultimate range be less than a certain threshold value Dmax untill.
G) oval segmental arc fitting.The adjacent both sides of Close polygon are checked, using the marginal point where ellipse fitting both sides,
Ellipse fitting error is calculated, if error is less than the approximate error of both sides and correspondence profile, two straight lines are replaced using elliptic arc
Side.Said process is repeated along adjacent two edges, until can not be preferably fitted using elliptic arc.
H) oval segmental arc merges.If occurring the profile that continuous multi-stage uses elliptic arc to be fitted in step f, consider
Whether an elliptic arc can be merged into be fitted.Specific method is:The center spacing of two adjacent ellipses arcs is calculated, if being less than
Threshold value Dcmax then represents to merge, and after merging into an elliptic arc, repeats and is carried out equally with adjacent next elliptic arc
Operation, until adjacent ellipses arc is disposed.
I) fitting a straight line is with merging.In step f, the profile that elliptic arc can not be used to be fitted then directly uses straight line
It is fitted, specific approximating method is not in scope.And judgement merging is carried out to adjacent straightway.
J) intersecting point coordinate of adjacent segments is sought.Adjacent lines are calculated according to the above-mentioned linear equation fitted, elliptic arc equation
The intersecting point coordinate of section, the intersection point have corresponded to the node of To Template.
4. searched for since the closed contour of " non-ambiguity ".It is most from angle point number if being all " having ambiguity " closed contour
Closed contour start along corners Matching, share X kind corresponding relations, all calculate similarities, select most like one group.
A) profile is specified search for.If multiple closed contours in objective contour be present, preferred " non-ambiguity " profile is as mould
Web wheel is wide, if " non-ambiguity " profile is not present, using the most profile of line segment number as template contours.
B) caused all closed contours, rejecting composition line segment number are different from template contours line segment in step 3 for retrieval
Profile.In remaining profile, some node (intersection points of adjacent segments) in the profile is arbitrarily selected, by clockwise (with step
Direction in rapid 2e is consistent) direction arranges the connection of the profile sequentially, if this sequentially can be in (NLi+NAi) of template contours
Found in connection sequentially, then the search profile is profile undetermined, is otherwise directly excluded.Profile undetermined only possesses at present and template
Profile identical line segment forms, but might not comply fully with the true shape of target, therefore also needs to carry out Similarity Measure.
C) according to profile undetermined and the sequentially relation of template contours, the corresponding relation of " physics-pixel " between node is determined,
Template contours provide the physical coordinates of node, and the node of profile undetermined is pixel coordinate.If template contours are " ambiguity profile "
There is the corresponding relation that two or more meet, should put on an equal footing, complete following calculating.Initially set up following Attitude Calculation side
Journey:
WhereinFor the internal reference matrix of camera, can be obtained by camera calibration.Optional three in template contours
Not conllinear node, by its physical coordinates [Xw Yw 0]i TAnd the pixel coordinate [u0 v0] detected in profile undeterminedi TBring into
Formula 2, obtain that projective transformation matrix is calculated
D) projective transformation matrix obtained in step c is brought into formula 1, by all node physical coordinates [X of template contoursw Yw
0]i TBring formula 1 into respectively, calculate the projected pixel coordinate [u v] of each nodei T。
E) projection similarity F is calculated.According to node pixel coordinate (u v) i calculated in step d with being examined in profile undetermined
Pixel coordinate (u0 v0) i for the corresponding node measured calculates similarity F, and calculation formula is as shown in Equation 3.
Wherein n represents nodal point number summation in template contours
F) for " non-ambiguity profile ", if similarity exceedes given threshold, then it is assumed that the profile undetermined is correct target,
And return to its projective transformation matrix being calculated in step cThe matrix then describes target phase
Spatial translation position to camera and its anglec of rotation around each axle.
G) for " ambiguity profile ", if the similarity under a variety of node corresponding relations exceedes given threshold, will obtain more
It individual attitude matrix, can not uniquely determine, then be set to the profile undetermined " polymorphic profile ".If target only has this " ambiguity
Profile ", then directly return to satisfactory multiple attitude matrixs.
If h) target also has other " ambiguity profiles ", other profiles are set as new template contours, in " polymorphic wheel
It is wide " neighbouring repeat step b~e.New " polymorphic profile " will be obtained.
If the common attitude matrix of existence anduniquess between i) multiple " polymorphic profiles ", the attitude matrix is " ambiguity profile "
Correct posture;If still there is multiple identical attitude matrixs, the distribution for illustrating multiple " the ambiguity profiles " of target is completely right
Claim, then directly return to multiple attitude matrixs, and the successful target of marker recognition in the picture.
Claims (10)
1. a kind of identification and space-location method based on target two-dimensional silhouette model, it is characterised in that comprise the following steps:
Step 1, prepare the two dimensional model of target, the true two dimensional model of target is drawn in graphics software, long measure is milli
Rice, and drawing is exported as to the file for including image outline information, two-dimensional mode profiles lines must close, and profile is by straight line
Section, arc or circle composition;
Step 2, the above-mentioned file for including image outline information is read, parses geometric primitive, searches and closure wheel is depicted
Exterior feature, and judge to distinguish ambiguity profile therein and non-ambiguity profile, the connection for describing closed contour cathetus and camber line is sequentially closed
System, establishes target two-dimensional silhouette geometric primitive topological relation;
Step 3, target image is gathered, using the edge of Canny edge detection operator detection images, travels through each profile, row
Unless closed contour, single-pass, more logical marginal point inspection are carried out to closed contour;Single-pass, the more logical edge for selecting to check click through
Row intersecting outlines separate;Make polygonal segments closed contour, it is thin to carry out recurrence to each closed contour using Ramer algorithms
Point, until the ultimate range of obtained whole line segments to each self-corresponding closed contour is less than threshold value Dmax;Again to straightway and/
Or arc is fitted with merging, the intersection point of adjacent segments is calculated according to the linear equation and/or elliptic arc equation fitted
Coordinate, the intersection point have corresponded to the target two-dimensional silhouette in step 2;
Step 4, profile is specified search for, caused all closed contour confirmations are identical with To Template profile in step 3 for retrieval
The profile undetermined of line segment composition, treat the wide progress posture computing of fixed wheel and complete to confirm, in the picture the successful mesh of marker recognition
Mark, export target location and projection matrix.
2. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 1, its feature exist
In:In the step 2, the ambiguity profile is in the sequentially description of the profile, identical be present and sequentially describes;Establish target two
Dimension profile geometric primitive topological relation specific method be
Primitive information is parsed from the ENTITIES sections for the file for including image outline information, includes the start-stop of Nl bar straight lines
Coordinate, the center of circle of Na bar circular arcs, radius, start-stop coordinate, centre coordinate, the radius of Nc circle, preserve all straight lines, circular arc and circle
Information;
Closed contour is searched, since the starting point of any straight line or circular arc, lookup overlaps next with the straight line terminal
The starting point of connecting line segment, and this process is repeated, until returning to the starting point most started, that is, find a closed contour;
The line segment included in the closed contour found is rejected from former data, the step of repeating to search closed contour, directly
Finished to all line segments are searched, count N number of closed contour, plus the circular Nc in objective contour being originally self-closing profile,
Amounting in target two dimensional model has N+Nc closed contour, counts each closed contour cathetus number Nli, Circular Arc Nai, circle
Number Nci, the numbering of wherein footmark i expression closed contours;
Sequentially relation, description rule are from any line for the connection of the straight line and camber line of non-circular closed contour in description closed contour
Section starts, and returns to starting point along the fixed all line segments for traveling through profile clockwise or counterclockwise, is then designated as 0 if straight line, arc
Line is designated as 1;For each non-circular closed contour, sequentially relation shares (NL for iti+NAi) kind, i.e., using each line segment as
Point, obtain a kind of connection sequentially, complete the foundation of topological relation.
3. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 2, its feature exist
In:In the step 2, in addition to it is the checking step that ambiguity profile is also non-ambiguity profile to closed contour;Ambiguity profile is
In the sequentially description of the profile, identical be present and sequentially describe.
4. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 1, its feature exist
In:In the step 3, the method for excluding non-closed profile is:All marginal points are traveled through, if some marginal point is thirdly neighborhood
In, the quantity of other marginal points is only 1, then the marginal point belongs to patent chalaza, after deleting the marginal point, is reexamined and patent
The adjacent marginal point of chalaza, thirdly in neighborhood whether also only have other marginal points, one can be deleted by that analogy not
The profile of closure;Said process is repeated, after having handled all marginal points, remaining profile is then all closed contour.
5. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 1, its feature exist
In:In the step 3, the method to closed contour single-pass, more logical marginal point inspections is the five neighborhood outermosts one at a certain edge
In circle, the quantity of non-adjacent marginal point is checked, being checked whether for the non-adjacent marginal point in everywhere can be along thirdly neighborhood reaches
Center edge point, if can if show at this centered on marginal point a passage, if can not if at this it is unrelated with center edge point,
Directly exclude, be otherwise single channel edge for multi-channel edge point if the number of channels of the center edge point is more than 2 finally
Point.
6. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 1, its feature exist
In:In the step 3, intersecting outlines separation method is single-pass, the more logical marginal point to checking, since any marginal point,
If the marginal point is single-pass marginal point, the next marginal point of an optional search channels, if more logical marginal points, then edge respectively
Each next marginal point of search channels;If having returned to the marginal point searched in search procedure, the route is deleted, directly
Starting point is returned to search, more all paths for successfully returning to starting point, takes most short one to be used as minimal closure profile, in repetition
Process is stated, completes the separation to all intersecting outlines.
7. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 1, its feature exist
In:In the step 3, straightway and/or arc are fitted and to merge specific method as follows:
Oval segmental arc fitting, checks the adjacent both sides for the polygon for approaching closed contour, uses the side where ellipse fitting both sides
Edge point, ellipse fitting error is calculated, if error is less than the approximate error of both sides and correspondence profile, two are replaced using elliptic arc
Straight line, said process is repeated along adjacent two edges, until can not be preferably fitted using elliptic arc;
Oval segmental arc merges, if carrying out continuous multi-stage occur in recursion to each closed contour using Ramer algorithms
The profile being fitted using elliptic arc, the center spacing of two adjacent ellipses arcs is calculated, being represented if threshold value Dcmax is less than can
To merge, after merging into an elliptic arc, repeat and carry out same operation with adjacent next elliptic arc, until adjacent ellipse
Circular arc is disposed;
Fitting a straight line carries out that in recursion elliptic arc can not be used with merging, using Ramer algorithms to each closed contour
The profile being fitted then directly is fitted using straight line, and carries out judgement merging to adjacent straightway;
The intersecting point coordinate of adjacent segments is sought, is AX according to linear equation Y=kX+b and elliptic arc equation2+BXY+CY2+DX+EY+1
=0 solves the intersecting point coordinate (X, Y) of adjacent segments, and the intersection point corresponds to the node of To Template;K, b are what the Fitting Calculation went out in formula
Coefficient, only straight line is characterized, and (A, B, C, D, E) is the parameter that ellipse fitting calculates, each group of parameter characterization is uniquely ellipse
Circle.
8. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 1, its feature exist
In:In the step 4, the method for specifying search for profile is, if multiple closed contours in objective contour be present, preferred non-ambiguity
Profile is as template contours, most from line segment number using the most profile of line segment number as template contours if being all ambiguity profile
Profile along angle point, all calculate similarities, select most like one group.
9. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 1, its feature exist
In:In the step 4, the specific method for confirming the profile undetermined of line segment composition identical with To Template profile is to retrieve in step
Caused all closed contours in 3, reject the composition line segment number profile different from template contours line segment;In remaining profile, appoint
Meaning selects a node in the profile, the connection of the profile is arranged in the direction of the clock sequentially, if this sequentially can be in template
Found in (NLi+NAi) of profile in connection sequentially, then the search profile is profile undetermined, is otherwise directly excluded.
10. a kind of identification and space-location method based on target two-dimensional silhouette model as claimed in claim 1, its feature exist
In in the step 4, the method that profile undetermined carries out posture computing and completes to confirm is following steps:
According to profile undetermined and the sequentially relation of template contours, the corresponding relation of physics seat and pixel coordinate between node is determined,
Template contours provide the physical coordinates of node, and the node of profile undetermined is pixel coordinate, initially sets up Attitude Calculation equation
WhereinFor the internal reference matrix of camera, can be obtained by camera calibration;
Optional three not conllinear nodes in template contours, by its physical coordinates [Xw Yw 0]i TAnd detected in profile undetermined
The pixel coordinate [u0 v0] gone outi TBring above-mentioned Attitude Calculation equation into, obtain that projective transformation matrix is calculated
Projective transformation matrix is brought into above-mentioned Attitude Calculation equation, by all node physical coordinates [X of template contoursw Yw 0]i TPoint
Do not bring above-mentioned Attitude Calculation equation into, calculate the projected pixel coordinate [u v] of each nodei T;
Projection similarity F is calculated, according to the pixel of the corresponding node detected in node pixel coordinate (u v) i and profile undetermined
Coordinate (u0v0) i calculates similarity F, and calculation formula is as follows
Wherein n represents nodal point number summation in template contours;
For non-ambiguity profile, if similarity exceedes given threshold, then it is assumed that the profile undetermined is correct target, and is returned to
Projective transformation squareBattle array, the matrix then describe spatial translation position of the target with respect to camera and its around
The anglec of rotation of each axle;
For ambiguity profile, if the similarity under a variety of node corresponding relations exceedes given threshold, multiple postures will be obtained
Matrix, then the profile undetermined is set to polymorphic profile, if target only has this ambiguity profile, directly returned satisfactory
Multiple attitude matrixs;
If the common attitude matrix of existence anduniquess between multiple polymorphic profiles, the attitude matrix is the correct posture of ambiguity profile;
If still there is multiple identical attitude matrixs, the distribution that illustrates multiple ambiguity profiles of target be it is full symmetric, then directly
Return to multiple attitude matrixs, and the successful target of marker recognition in the picture.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710734207.5A CN107622499B (en) | 2017-08-24 | 2017-08-24 | Identification and space positioning method based on target two-dimensional contour model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710734207.5A CN107622499B (en) | 2017-08-24 | 2017-08-24 | Identification and space positioning method based on target two-dimensional contour model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107622499A true CN107622499A (en) | 2018-01-23 |
CN107622499B CN107622499B (en) | 2020-11-13 |
Family
ID=61088264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710734207.5A Active CN107622499B (en) | 2017-08-24 | 2017-08-24 | Identification and space positioning method based on target two-dimensional contour model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107622499B (en) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109087323A (en) * | 2018-07-25 | 2018-12-25 | 武汉大学 | A kind of image three-dimensional vehicle Attitude estimation method based on fine CAD model |
CN109272569A (en) * | 2018-08-03 | 2019-01-25 | 广东工业大学 | A kind of method that autocad builds X-Y scheme rapidly extracting and generates floor contour line |
CN110020657A (en) * | 2019-01-15 | 2019-07-16 | 浙江工业大学 | A kind of bitmap silhouettes coordinate extraction method of cutting |
CN110058263A (en) * | 2019-04-16 | 2019-07-26 | 广州大学 | A kind of object positioning method in vehicle travel process |
CN110069915A (en) * | 2019-03-12 | 2019-07-30 | 杭州电子科技大学 | A kind of nine grids figure method for recognizing verification code based on contours extract |
CN110223339A (en) * | 2019-05-27 | 2019-09-10 | 盐城工学院 | One kind being based on machine vision thermal protector calibration point center positioning method |
CN110299042A (en) * | 2019-06-04 | 2019-10-01 | 中广核工程有限公司 | A kind of immersion Accidents on NPP process simulation deduction method and system |
CN110640303A (en) * | 2019-09-26 | 2020-01-03 | 南京魔迪多维数码科技有限公司 | High-precision vision positioning system and positioning calibration method thereof |
CN111024021A (en) * | 2019-12-09 | 2020-04-17 | 江南造船(集团)有限责任公司 | Ship plate part polishing edge judgment method |
CN111091597A (en) * | 2019-11-18 | 2020-05-01 | 贝壳技术有限公司 | Method, apparatus and storage medium for determining image pose transformation |
CN111709426A (en) * | 2020-05-08 | 2020-09-25 | 广州博进信息技术有限公司 | Diatom identification method based on contour and texture |
CN111950315A (en) * | 2020-10-19 | 2020-11-17 | 江苏理工学院 | Method, device and storage medium for segmenting and identifying multiple bar code images |
WO2020228187A1 (en) * | 2019-05-16 | 2020-11-19 | 杭州睿琪软件有限公司 | Edge detection method and apparatus, electronic device and computer-readable storage medium |
CN112033408A (en) * | 2020-08-27 | 2020-12-04 | 河海大学 | Paper-pasted object space positioning system and positioning method |
CN113945159A (en) * | 2021-10-26 | 2022-01-18 | 中国铁建电气化局集团有限公司 | Bolt diameter measuring method based on contour matching |
CN114818591A (en) * | 2022-07-01 | 2022-07-29 | 南京维拓科技股份有限公司 | Method for rapidly generating clearance of tool device |
CN115018845A (en) * | 2022-08-09 | 2022-09-06 | 聊城市泓润能源科技有限公司 | Method for detecting quality of lubricating oil abrasive particles |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8180486B2 (en) * | 2006-10-02 | 2012-05-15 | Honda Motor Co., Ltd. | Mobile robot and controller for same |
CN103425988A (en) * | 2013-07-03 | 2013-12-04 | 江南大学 | Real-time positioning and matching method with arc geometric primitives |
-
2017
- 2017-08-24 CN CN201710734207.5A patent/CN107622499B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8180486B2 (en) * | 2006-10-02 | 2012-05-15 | Honda Motor Co., Ltd. | Mobile robot and controller for same |
CN103425988A (en) * | 2013-07-03 | 2013-12-04 | 江南大学 | Real-time positioning and matching method with arc geometric primitives |
Non-Patent Citations (1)
Title |
---|
刘振宇、赵彬、邹风山: "机器视觉技术在工件分拣中的应用", 《计算机应用与软件》 * |
Cited By (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109087323A (en) * | 2018-07-25 | 2018-12-25 | 武汉大学 | A kind of image three-dimensional vehicle Attitude estimation method based on fine CAD model |
CN109272569A (en) * | 2018-08-03 | 2019-01-25 | 广东工业大学 | A kind of method that autocad builds X-Y scheme rapidly extracting and generates floor contour line |
CN109272569B (en) * | 2018-08-03 | 2023-07-11 | 广东工业大学 | Method for quickly extracting and generating floor contour lines of autocad building two-dimensional map |
CN110020657A (en) * | 2019-01-15 | 2019-07-16 | 浙江工业大学 | A kind of bitmap silhouettes coordinate extraction method of cutting |
CN110069915A (en) * | 2019-03-12 | 2019-07-30 | 杭州电子科技大学 | A kind of nine grids figure method for recognizing verification code based on contours extract |
CN110069915B (en) * | 2019-03-12 | 2021-04-13 | 杭州电子科技大学 | Sudoku graphic verification code identification method based on contour extraction |
CN110058263A (en) * | 2019-04-16 | 2019-07-26 | 广州大学 | A kind of object positioning method in vehicle travel process |
CN110058263B (en) * | 2019-04-16 | 2021-08-13 | 广州大学 | Object positioning method in vehicle driving process |
WO2020228187A1 (en) * | 2019-05-16 | 2020-11-19 | 杭州睿琪软件有限公司 | Edge detection method and apparatus, electronic device and computer-readable storage medium |
US11636604B2 (en) | 2019-05-16 | 2023-04-25 | Hangzhou Glorify Software Limited | Edge detection method and device, electronic equipment, and computer-readable storage medium |
CN110223339A (en) * | 2019-05-27 | 2019-09-10 | 盐城工学院 | One kind being based on machine vision thermal protector calibration point center positioning method |
CN110299042A (en) * | 2019-06-04 | 2019-10-01 | 中广核工程有限公司 | A kind of immersion Accidents on NPP process simulation deduction method and system |
CN110640303A (en) * | 2019-09-26 | 2020-01-03 | 南京魔迪多维数码科技有限公司 | High-precision vision positioning system and positioning calibration method thereof |
CN110640303B (en) * | 2019-09-26 | 2022-06-07 | 南京魔迪多维数码科技有限公司 | High-precision vision positioning system and positioning calibration method thereof |
CN111091597A (en) * | 2019-11-18 | 2020-05-01 | 贝壳技术有限公司 | Method, apparatus and storage medium for determining image pose transformation |
CN111024021A (en) * | 2019-12-09 | 2020-04-17 | 江南造船(集团)有限责任公司 | Ship plate part polishing edge judgment method |
CN111024021B (en) * | 2019-12-09 | 2021-09-28 | 江南造船(集团)有限责任公司 | Ship plate part polishing edge judgment method |
CN111709426A (en) * | 2020-05-08 | 2020-09-25 | 广州博进信息技术有限公司 | Diatom identification method based on contour and texture |
CN111709426B (en) * | 2020-05-08 | 2023-06-02 | 广州博进信息技术有限公司 | Diatom recognition method based on contour and texture |
CN112033408A (en) * | 2020-08-27 | 2020-12-04 | 河海大学 | Paper-pasted object space positioning system and positioning method |
CN112033408B (en) * | 2020-08-27 | 2022-09-30 | 河海大学 | Paper-pasted object space positioning system and positioning method |
CN111950315A (en) * | 2020-10-19 | 2020-11-17 | 江苏理工学院 | Method, device and storage medium for segmenting and identifying multiple bar code images |
CN111950315B (en) * | 2020-10-19 | 2023-11-07 | 江苏理工学院 | Method, device and storage medium for segmenting and identifying multiple bar code images |
CN113945159A (en) * | 2021-10-26 | 2022-01-18 | 中国铁建电气化局集团有限公司 | Bolt diameter measuring method based on contour matching |
CN113945159B (en) * | 2021-10-26 | 2023-08-25 | 中国铁建电气化局集团有限公司 | Bolt diameter measurement method based on contour matching |
CN114818591A (en) * | 2022-07-01 | 2022-07-29 | 南京维拓科技股份有限公司 | Method for rapidly generating clearance of tool device |
CN115018845B (en) * | 2022-08-09 | 2022-10-25 | 聊城市泓润能源科技有限公司 | Method for detecting quality of lubricating oil abrasive particles |
CN115018845A (en) * | 2022-08-09 | 2022-09-06 | 聊城市泓润能源科技有限公司 | Method for detecting quality of lubricating oil abrasive particles |
Also Published As
Publication number | Publication date |
---|---|
CN107622499B (en) | 2020-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107622499A (en) | A kind of identification and space-location method based on target two-dimensional silhouette model | |
CN108010116B (en) | Point cloud feature point detection method and point cloud feature extraction method | |
CN111985322A (en) | Road environment element sensing method based on laser radar | |
CN104915963B (en) | A kind of detection and localization method for PLCC elements | |
CN111553409B (en) | Point cloud identification method based on voxel shape descriptor | |
AU2020202249A1 (en) | Feature extraction from mobile lidar and imagery data | |
CN107818598B (en) | Three-dimensional point cloud map fusion method based on visual correction | |
CN113610917A (en) | Circular array target center image point positioning method based on blanking points | |
CN108305289B (en) | Three-dimensional model symmetry characteristic detection method and system based on least square method | |
CN110059683A (en) | A kind of license plate sloped antidote of wide-angle based on end-to-end neural network | |
CN110223345A (en) | Distribution line manipulating object position and orientation estimation method based on cloud | |
CN111402316B (en) | Rapid detection method for ellipses in image based on anti-fake links | |
CN114488194A (en) | Method for detecting and identifying targets under structured road of intelligent driving vehicle | |
CN113963051A (en) | Target diameter automatic measurement method and system based on visual information and feature extraction | |
CN110807781A (en) | Point cloud simplification method capable of retaining details and boundary features | |
CN115578398A (en) | Weld point cloud segmentation method based on region growing method | |
CN115435798A (en) | Unmanned vehicle high-precision map road network generation system and method | |
CN103839274B (en) | A kind of Extended target tracking based on geometric proportion relation | |
CN114742894A (en) | Multi-camera calibration method in large scene, information processing terminal and storage medium | |
CN110580497B (en) | Spatial scene matching method based on rotation invariance | |
CN115588178A (en) | Method for automatically extracting high-precision map elements | |
CN114820505A (en) | Non-contact measurement method of dynamic target | |
CN114818851A (en) | Rural road vector data correction method based on feature difference | |
CN111738094A (en) | Automatic remote sensing image road extraction method and device | |
Yu et al. | 3D reconstruction and defect pattern recognition of bonding wire based on stereo vision |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |