CN105469414A - Contour connection method and apparatus - Google Patents

Contour connection method and apparatus Download PDF

Info

Publication number
CN105469414A
CN105469414A CN201510938667.0A CN201510938667A CN105469414A CN 105469414 A CN105469414 A CN 105469414A CN 201510938667 A CN201510938667 A CN 201510938667A CN 105469414 A CN105469414 A CN 105469414A
Authority
CN
China
Prior art keywords
edge point
point
crack
profile
distance
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
Application number
CN201510938667.0A
Other languages
Chinese (zh)
Other versions
CN105469414B (en
Inventor
赵敏
姚毅
金刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Luster LightTech Co Ltd
Original Assignee
Luster LightTech Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Luster LightTech Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN201510938667.0A priority Critical patent/CN105469414B/en
Publication of CN105469414A publication Critical patent/CN105469414A/en
Application granted granted Critical
Publication of CN105469414B publication Critical patent/CN105469414B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a contour connection method. The method comprises: looking for a fractured contour from basic contours; by taking one of fractured edge points of the fractured contour as a target edge point, calculating a distance between each of other fractured edge points and the target edge point; when the distance between each of the other fractured edge points and the target edge point is smaller than a preset threshold, determining the position of connection between the fractured edge point and the target edge point; calculating an angle difference between a virtual contour and the fractured contour; and when the angle difference between the virtual contour and the fractured contour is less than a preset angle threshold, connecting the target edge point with the fractured edge point. The invention furthermore discloses a contour connection apparatus. Compared with the prior art, the technical scheme provided by embodiments of the invention has the characteristics that the fractured edge points belonging to the same contour can be screened out through distance and angle parameters after the basic contours are obtained, and the fractured edge points belonging to the same contour are connected, so that the complete contour can be obtained.

Description

Contour linkage method and device
Technical field
The present invention relates to technical field of image processing, in particular to a kind of contour linkage method and device.
Background technology
Image detects as a kind of Aulomatizeted Detect mode efficiently, by identification and the analysis of the information such as the pixel distribution to target image, brightness and contrast, and the character of detection target or defect etc.Usually, image detection software upon receiving the image, first determines the profile of image, and then by region that profile determination image comprises.Wherein, the profile of image is made up of marginal point, and therefore, in correlation technique, the marginal point first in detected image, then, connects marginal point and obtain profile.
The algorithm that endpoint detections is commonly used can comprise sobel algorithm, Prewitt algorithm, Roberts algorithm, Krich algorithm and Canny algorithm etc.Wherein, the testing result obtained owing to using Canny algorithm is comparatively accurate, and therefore, the use of Canny algorithm is comparatively extensive.Concrete, when using Canny algorithm detected edge points, the first step, carries out Gaussian Computation to each pixel of image, the noise that filtering image is mingled with when taking and transmit, and obtains level and smooth image; Second step, calculates Grad and the direction of each pixel in smoothed image; 3rd step, the pixel ratio higher due to Grad may be marginal point, therefore, this step is in determined pixel orientation, get the Grad of its forward and backward pixel, retain the gray-scale value of the maximum pixel of wherein Grad, the gray-scale value of two other pixel is set to 0, to filter out the maximum pixel of partial gradient value as marginal point; 4th step, sets high and low threshold value according to screened Grad, and the marginal point gray-scale value respectively Grad being less than high threshold is set to 0, obtains image 1, and marginal point gray-scale value Grad being less than Low threshold is set to 0, obtains image 2.The marginal point retained due to image 2 is more, therefore, the marginal information that contrast images 1 is identical with in image 2, by same profile, do not exist in image 1 and the marginal point that exists in image 2 adds in image 1, and connection layout obtains this profile as the marginal point finally determined in 1.
As can be seen here, the effect of high threshold is to determine relatively significant marginal point, obtain the remarkable configuration of profile, the effect of Low threshold is the marginal point filtering out Relative Fuzzy, the remarkable configuration of the profile obtained is supplemented, if it is less that Low threshold is arranged, then false edge point can be detected, cause determined contour distortion; And if that Low threshold is arranged is comparatively large, then cannot detect the point that in marginal point, contrast is relatively weak accurately, cause connected profile fracture, therefore, empirically value setting Low threshold usually.But even if empirically value arranges Low threshold, the point that still inevitably there is part contrast relatively weak cannot detect, causes the profile obtained still to there is fracture, cannot obtain complete profile.
Summary of the invention
In view of the technical matters existed in correlation technique, embodiments provide a kind of contour linkage method and device, to solve the problem that cannot obtain integrity profile.
First aspect, embodiments provides a kind of contour linkage method, comprising: after the base profile obtaining image according to dual-threshold voltage, search fracture profile from described base profile; Using any in the crack edge point of described fracture profile as object edge point, calculate the distance of crack edge point and described object edge point described in other respectively; When the distance of described crack edge point and described object edge point is less than predetermined threshold value, determine the link position of described crack edge point and described object edge point, wherein, described link position be described crack edge point and described object edge point apart from time minimum, the position of described crack edge point; Calculate the fictitious outline formed between described crack edge point and described object edge point, and the differential seat angle of described crack edge point or described object edge point place fracture profile; When the differential seat angle of described fictitious outline and described fracture profile is less than default angle threshold, connect described object edge point and described crack edge point.
Preferably, the described link position determining described crack edge point and described object edge point, comprise: the distance according to preset direction, described crack edge point being moved a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point, wherein, described preset direction is consistent with the trajectory direction of the fracture profile at described crack edge point place, calculate when described crack edge point is positioned at described reposition and the distance of described object edge point, when judging that described crack edge point is positioned at described reposition and the distance of described object edge point whether be less than when described crack edge point is positioned at original position and the distance of described object edge point, when if described crack edge point is positioned at described reposition and the distance of described object edge point be less than when described crack edge point is positioned at original position and the distance of described object edge point, then repeat the distance according to preset direction, described crack edge point being moved a pixel to its adjacent position, and using the step of the position after movement as the reposition of described crack edge point, until when the distance of described crack edge point and described object edge point is minimum, described reposition is defined as optimum position, when if described crack edge point is positioned at described reposition and the distance of described object edge point be greater than when described crack edge point is positioned at original position and the distance of described object edge point, according to the direction contrary with described preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point, and repeat and calculate when described crack edge point is positioned at described reposition and the step of the distance of described object edge point, until when the distance of described crack edge point and described object edge point is minimum, described reposition is defined as optimum position.
Preferably, the fictitious outline formed between described calculating described crack edge point and described object edge point, with described crack edge point or described object edge point place fracture profile differential seat angle, comprise: with described object edge point for starting point, first three pixel of the fracture profile at described object edge point place is defined as the first reference contours; Will with described object edge point for starting point time, described fracture profile moves towards the direction of direction as described first reference contours, determines the angle of described first reference contours; Described crack edge point is pointed to the direction of direction as described fictitious outline of described object edge point, determine the angle of described fictitious outline; Calculate the differential seat angle of described first reference contours angle and described fictitious outline angle.
Preferably, the fictitious outline formed between described calculating described crack edge point and described object edge point, with described crack edge point or described object edge point place fracture profile differential seat angle, comprise: with described crack edge point for starting point, first three pixel of the fracture profile at described crack edge point place is defined as the second reference contours; Will with described crack edge point for starting point time, described fracture profile moves towards the direction of direction as described second reference contours, determines the angle of described second reference contours; Described object edge point is pointed to the direction of direction as described fictitious outline of described crack edge point, determine the angle of described fictitious outline; Calculate the differential seat angle of described second reference contours angle and described fictitious outline angle.
Preferably, describedly from described base profile, search fracture profile, comprising: from a base profile, select a marginal point as start edge point; Travel through the marginal point of described base profile according to certain orientation from described start edge point; When traversing the terminal marginal point of described base profile, judge whether described terminal marginal point and described start edge point are same marginal point; If described terminal marginal point and described start edge point are same marginal points, then described base profile is defined as integrity profile; If described terminal marginal point and described start edge point are not same marginal points, then described base profile is defined as the profile that ruptures.
Second aspect, the embodiment of the present invention additionally provides a kind of contour linkage device, comprising: search module, for after the base profile obtaining image according to dual-threshold voltage, searches fracture profile from described base profile; Computing module, for using described search in the crack edge point of the fracture profile that module is searched a bit as object edge point, calculate the distance of crack edge point and described object edge point described in other respectively; Determination module, for when the distance of described crack edge point and described object edge point is less than predetermined threshold value, determine the link position of described crack edge point and described object edge point, wherein, described link position be described crack edge point and described object edge point apart from time minimum, the position of described crack edge point; Described computing module, also for calculating the fictitious outline formed between described crack edge point and described object edge point, and the differential seat angle of described crack edge point or described object edge point place fracture profile; Link block, when the differential seat angle for calculating described fictitious outline and described fracture profile at described computing module is less than default angle threshold, connects described object edge point and described crack edge point.
Preferably, described determination module comprises mobile unit, computing unit and the first judging unit, wherein, described mobile unit, for described crack edge point to be moved according to preset direction the distance of a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point, wherein, described preset direction is consistent with the trajectory direction of the fracture profile at described crack edge point place; Described computing unit, for calculating when described crack edge point is positioned at described reposition and the distance of described object edge point; Described first judging unit, during for judging that described crack edge point is positioned at described reposition and the distance of described object edge point whether be less than when described crack edge point is positioned at original position and the distance of described object edge point; Described mobile unit, also for when described crack edge point is positioned at described reposition and the distance of described object edge point is less than when described crack edge point is positioned at original position and the distance of described object edge point time, according to preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the step of the position after movement as the reposition of described crack edge point, until when the distance of described crack edge point and described object edge point is minimum, described reposition is defined as optimum position; When described crack edge point is positioned at described reposition and the distance of described object edge point is greater than when described crack edge point is positioned at original position and the distance of described object edge point time, according to the direction contrary with described preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point.
Preferably, described computing module comprises the first determining unit, wherein, described first determining unit, for described object edge point for starting point, first three pixel of the fracture profile at described object edge point place is defined as the first reference contours; Also for will with described object edge point for starting point time, described fracture profile moves towards the direction of direction as described first reference contours, determines the angle of described first reference contours; Also for described crack edge point being pointed to the direction of direction as described fictitious outline of described object edge point, determine the angle of described fictitious outline; Described computing unit, also for calculating the differential seat angle of described first reference contours angle and described fictitious outline angle.
Preferably, described first determining unit, also for described crack edge point for starting point, first three pixel of the fracture profile at described crack edge point place is defined as the second reference contours; Also for will with described crack edge point for starting point time, described fracture profile moves towards the direction of direction as described second reference contours, determines the angle of described second reference contours; Also for described object edge point being pointed to the direction of direction as described fictitious outline of described crack edge point, determine the angle of described fictitious outline; Described computing unit, also for calculating the differential seat angle of described second reference contours angle and described fictitious outline angle.
Preferably, described in search module and comprise selection unit, Traversal Unit, the second judging unit and the second determining unit, wherein, described selection unit, for selecting a marginal point as start edge point from a base profile; Described Traversal Unit, for traveling through the marginal point of described base profile from described start edge point according to certain orientation; Described second judging unit, for when traversing the terminal marginal point of described base profile, judges whether described terminal marginal point and described start edge point are same marginal point; Described second determining unit, for when described terminal marginal point and described start edge point are same marginal points, is defined as integrity profile by described base profile; Also for when described terminal marginal point and described start edge point are not same marginal points, described base profile is defined as the profile that ruptures.
Seen from the above description, the problem of integrity profile cannot be obtained for solving prior art, the technical scheme of the embodiment of the present invention, after the base profile obtaining image according to dual-threshold voltage, fracture profile is searched from described base profile, and using any in the crack edge point of described fracture profile as object edge point; Then, calculate the distance of other crack edge points and described object edge point respectively, when the distance of described crack edge point and described object edge point is less than predetermined threshold value, then this crack edge point likely belongs to same profile with object edge point, so, the link position of described crack edge point and described object edge point is determined, wherein, described link position be described crack edge point and described object edge point apart from time minimum, the position of described crack edge point; Then, to the fictitious outline formed between crack edge point and object edge point, and the differential seat angle of crack edge point or object edge point place fracture profile, determine whether crack edge point belongs to same profile with object edge point further.Wherein, when fictitious outline is less than default angle threshold with the differential seat angle of fracture profile, think that crack edge point and object edge point belong to same profile, linking objective marginal point and crack edge point.As can be seen here, the technical scheme of the embodiment of the present invention is after obtaining base profile, further examination goes out the fracture profile in base profile, and go out to belong to the crack edge point of same profile by Distance geometry angle two choice of parameters, and connected by the crack edge point belonging to same profile, thus complete profile can be obtained.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.Shown in accompanying drawing, above-mentioned and other object of the present invention, Characteristics and advantages will be more clear.Reference numeral identical in whole accompanying drawing indicates identical part.Deliberately do not draw accompanying drawing by physical size equal proportion convergent-divergent, focus on purport of the present invention is shown.
Fig. 1 is the method flow diagram of the contour linkage method that the embodiment of the present invention provides;
Fig. 2 is the exemplary plot of fracture profile provided by the invention;
Fig. 3 is the exemplary plot of another kind fracture profile provided by the invention;
Fig. 4 is the structural representation of the contour linkage device that the embodiment of the present invention provides.
Embodiment
As everyone knows, the algorithm that endpoint detections is commonly used can comprise sobel algorithm, Prewitt algorithm, Roberts algorithm, Krich algorithm and Canny algorithm etc., although the performance between algorithms of different is variant, but no matter using which kind of algorithm to carry out rim detection, all there is fracture in the profile detecting the marginal point connection gained obtained.In order to the problem of profile fracture can be solved, propose the technical scheme of the embodiment of the present invention.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, carry out clear, complete description to the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 1, Fig. 1 is the method flow diagram of the contour linkage method that the embodiment of the present invention provides, and said method comprising the steps of:
Step S101, after the base profile obtaining image according to dual-threshold voltage, searches fracture profile from described base profile.
Wherein, after image processing system receives target image, first use endpoint detections algorithm to detect the marginal point of profile, then connect detected marginal point by dual-threshold voltage, obtain a series of profiles of image.Wherein, in a preferred embodiment of the invention, Canny algorithm detected edge points can be adopted, use Canny algorithm detected edge points, and connecting the technology that process that marginal point obtains profile is well known to those skilled in the art, the embodiment of the present invention no longer describes in detail herein.
It should be noted that, because the profile adopting dual-threshold voltage to obtain comprises integrity profile and fracture profile, therefore, the profile adopting dual-threshold voltage to obtain is referred to as base profile by the embodiment of the present invention.In order to be connected by the fracture profile in base profile, obtain integrity profile, the present embodiment, after obtaining base profile, filters out fracture profile from base profile, and carries out attended operation to fracture profile.
Concrete, for every bar base profile, image processing system can select a marginal point as start edge point, travels through all marginal points of this base profile from start edge point according to certain orientation, until terminal marginal point.By judging whether terminal marginal point and start edge point are that same marginal point determines whether this base profile is the profile that ruptures, if terminal marginal point and start edge point are same marginal points, illustrate that this base profile is closed state, therefore, this base profile is integrity profile; If terminal marginal point and start edge point are not same marginal points, illustrate that this base profile is not closed state, that is, this base profile is fracture profile.
Step S102, using any in the crack edge point of described fracture profile as object edge point, calculates the distance of crack edge point and described object edge point described in other respectively.
Wherein, the description based on above-mentioned steps is known, and the marginal point of fracture profile cannot form closed profile, and therefore, every bar fracture profile has included end points, in the present embodiment, the end points of fracture profile is called crack edge point.Due to belong to same profile two crack edge points between distance, and the angle of the fictitious outline formed between these two crack edge points all possesses certain characteristic, therefore, the technical scheme of the embodiment of the present invention can determine by crack edge point the fracture profile belonging to same profile.
Therefore, find fracture profile in base profile after, image processing system can obtain the crack edge point of all fracture profiles, then, therefrom select a crack edge point as object edge point, and calculate the distance of other crack edge points and object edge point.
It should be noted that, the marginal point due to profile is the pixel of composition profile, and therefore, in the embodiment of the present invention, the parasang of crack edge point and object edge point can be pixel.
In this step, by calculating the distance between object edge point and crack edge point, for determining whether object edge point and crack edge point belong to same profile and provide a basis for estimation, and provide technical support for next step judgement.
Step S103, when the distance of described crack edge point and described object edge point is less than predetermined threshold value, determines the link position of described crack edge point and described object edge point.
Wherein, it should be noted that, belong to two crack edge points of same profile usually apart from not too large, therefore, in order to avoid unnecessary operations, reduce data processing amount, the technical scheme of the embodiment of the present invention pre-sets the threshold value of distance, distance is greater than to the crack edge point of predetermined threshold value, do not think and belong to same profile with object edge point, and distance is less than to the crack edge point of predetermined threshold value, then think and may belong to same profile with object edge point, can be carried out next step and judge.Wherein, in a preferred embodiment of the invention, predetermined threshold value can be 6 pixels.
In addition, it is pointed out that the reason producing fracture profile mainly comprises two classes, first, should not detect as the pixel of contour edge point, thus cause between two crack edge points and there is the marginal point do not connected, such as, the exemplary plot of the fracture profile shown in Fig. 2, wherein, fracture profile 01 and fracture profile 02 belong to same profile, but the pixel between the crack edge point B of the crack edge point A of fracture profile 01 and fracture profile 02 does not detect, therefore, profile is caused to rupture; Second, the pixel that do not belong to contour edge point is connected as contour edge point, thus produce profile fracture owing to detecting mistake, and such as, the exemplary plot of the another kind fracture profile shown in Fig. 3, wherein, fracture profile 03 and fracture profile 04 belong to same profile, because crack edge point Q does not originally belong to fracture profile 04, therefore, cause fracture profile 03 to rupture from crack edge point P and fracture profile 04, and the profile 04 that ruptures rupture from crack edge point Q.
As can be seen here, even if the distance of crack edge point and object edge point is less than predetermined threshold value, but the current position of crack edge point is not necessarily on profile, namely, the position that the current position of crack edge point is not necessarily connected with object edge point, therefore, after obtaining crack edge point by predetermined threshold value screening, the embodiment of the present invention can also determine the link position of crack edge point and object edge point further, usually, the link position of crack edge point and object edge point be the two distance minimum time, the position residing for crack edge point.
Concrete, when the distance of crack edge point and object edge point is less than predetermined threshold value, according to preset direction, crack edge point is moved the distance of a pixel, and using the reposition of the position after movement as crack edge point, wherein, preset direction is consistent with the trajectory direction of the fracture profile at crack edge point place.After crack edge point is moved to reposition, calculate the distance of crack edge point and object edge point, then, judge the distance behind shift position whether be less than shift position before distance, if the distance behind shift position is less than the distance before shift position, illustrate that link position is in the side of preset direction, crack edge point is then continued to move a pixel according to preset direction, and repeat the step of judgement, until when the distance of crack edge point and object edge point is minimum, the position of crack edge point is defined as link position.
If the distance behind shift position is greater than the distance before shift position, illustrate that link position is in the contrary side of preset direction, or the original position of crack edge point, then crack edge point is moved the distance of a pixel to the direction that preset direction is contrary, same, using the reposition of the position after movement as crack edge point, calculate the distance of crack edge point and object edge point, and judge the distance behind shift position whether be less than shift position before distance.Perform cycling like this, until when the distance of crack edge point and object edge point is minimum, the position of crack edge point is defined as link position.
In addition, it should be noted that, if after moving crack edge point according to preset direction or the direction contrary with preset direction, all be greater than with the distance of object edge point and move distance that is front and object edge point, when illustrating that crack edge point is in original position, minimum with the distance of object edge point, that is, the original position of crack edge point is link position.
Such as, see Fig. 3, when the distance that image processing system calculates crack edge point Q and object edge point P is less than 6 pixels, along the direction of fracture profile 04, crack edge point Q can be moved to the position of a M, then calculation level M and object edge point P distance.Distance due to a M and object edge point P is less than the distance of crack edge point Q and object edge point P, therefore, crack edge point Q can be continued to be moved to the left, after moving to a N, the distance of calculation level N and object edge point P, can find, the distance of some N and object edge point P is greater than the distance of a M and object edge point P.Can judge thus, when crack edge point Q is positioned at the position of a M, minimum with the distance of object edge point P, therefore, the position of some M is the link position of crack edge point Q and object edge point P.
Certainly, if first the right side of the position of crack edge point Q to fracture profile 04 is moved, first a S is moved to, the distance that so can calculate S point and object edge point P is greater than the distance of crack edge point Q and object edge point P, therefore, perform the step be moved to the left the position of crack edge point Q, until determine that link position is the position of M point.
In addition, if crack edge point Q is positioned at M point, so left or after the pixel that moves right, former distance is all greater than with the distance of object edge point P, therefore, can determine that the position of a M is link position, concrete deterministic process and foregoing description similar, the embodiment of the present invention repeats no more herein.
The content of this step, by the position of mobile crack edge point, can determine the link position of crack edge point and object edge point, thus clearly can belong to the accurate location of the marginal point of profile, and provides technique preparation for next step judgement.
Step S104, calculates the fictitious outline formed between described crack edge point and described object edge point, and the differential seat angle of described crack edge point or described object edge point place fracture profile.
Wherein, because the crack edge point identical with the distance of object edge point may have multiple, in order to therefrom clear and definite determination and object edge point belong to the crack edge point of same profile, after determining link position, this step further confirms the angle of the fictitious outline formed between fracture point and object edge point.
Concrete, fracture point can be connected with object edge point by the technical scheme of the embodiment of the present invention, and the line the two be connected to form is considered as fictitious outline, the angle of the fracture profile at the angle of fictitious outline and crack edge point or object edge point place is compared, if crack edge point and object edge point belong to a profile, so therebetween, differential seat angle can not be greater than a certain threshold value, so, judge differential seat angle whether in the angle threshold preset, if differential seat angle is less than default angle threshold, then think that crack edge point and object edge point belong to same profile.
It should be noted that, the fracture profile at crack edge point or object edge point place may be relatively complicated, thus multiple angle may be there is, therefore, in order to ensure the accuracy of obtained differential seat angle, with object edge point or crack edge point for starting point, the fracture profile that it is corresponding can select two pixels, and the angle using the angle of these three pixels as fracture profile.
In addition, when calculating the differential seat angle of fictitious outline and fracture profile, the profile that ruptures can be only selected to calculate as with reference to profile.Concrete, refer to Fig. 2, in the present embodiment, the contour segment two pixels after crack edge point A and crack edge point A can determined is as the first reference contours section, and with crack edge point A for starting point time, the trend of fracture profile 01 is the direction of the first reference contours section, determines the angle of the first reference contours section.Because the direction of the first reference contours section is determined, so, the direction of fictitious outline section should be consistent with the direction of the first reference contours section, therefore, crack edge point B should be pointed to the direction of direction as fictitious outline section of crack edge point A, and determine its angle.
Or, also the contour segment two pixels after crack edge point B and crack edge point B can determined is as the second reference contours section, and with crack edge point B for starting point time, the trend of fracture profile 02 is the direction of the second reference contours section, now, crack edge point A should be pointed to the direction of direction as fictitious outline section of crack edge point B, the embodiment of the present invention repeats no more herein.
It should be noted that, because contour segment exists certain track trend, therefore, fictitious outline can be 3 degree to 10 degree with the differential seat angle of fracture profile, maximumly can be set to 20 degree, concrete, can carry out different settings according to the quality of image, the embodiment of the present invention does not limit this.
The technology contents of this step, utilize the track trend of fracture profile, judge the differential seat angle between 2 crack edge points, thus can determine whether 2 crack edge points belong to a profile accurately according to differential seat angle, thus further by the contour linkage that ruptures, integrity profile can be obtained.
Step S105, when the differential seat angle of described fictitious outline and described fracture profile is less than default angle threshold, connects described object edge point and described crack edge point.
Wherein, based on the description of above-mentioned steps, after the determination by Distance geometry differential seat angle two parameters, the crack edge satisfied condition point can be connected with object edge point.
Concrete, if crack edge point and object edge point are two adjacent pixels, object edge point directly can be connected with crack edge point, situation as shown in Figure 3; If between crack edge point and object edge point during the distance of the several pixel in interval, can create function model according to known marginal point, and pass through the partial insertion pixel of created function model at institute interval, the embodiment of the present invention no longer describes in detail herein.
According to the description of above-described embodiment, the technical scheme of the embodiment of the present invention is after obtaining base profile, further examination goes out the fracture profile in base profile, and go out to belong to the crack edge point of same profile by Distance geometry angle two choice of parameters, and connected by the crack edge point belonging to same profile, thus complete profile can be obtained.
Corresponding with above-mentioned implementation method, the embodiment of the present invention additionally provides a kind of contour linkage device, refer to Fig. 4, the structural representation of the contour linkage device that Fig. 4 provides for the embodiment of the present invention, described device comprises: search module 11, computing module 12, determination module 13 and link block 14.Wherein, search module 11, for after the base profile obtaining image according to dual-threshold voltage, from described base profile, search fracture profile; Computing module 12, for using described search in the crack edge point of the fracture profile that module 11 is searched a bit as object edge point, calculate the distance of crack edge point and described object edge point described in other respectively; Determination module 13, for when the distance of described crack edge point and described object edge point is less than predetermined threshold value, determine the link position of described crack edge point and described object edge point, wherein, described link position be described crack edge point and described object edge point apart from time minimum, the position of described crack edge point; It should be noted that, in the present embodiment, computing module 12, also for calculating the fictitious outline formed between described crack edge point and described object edge point, and the differential seat angle of described crack edge point or described object edge point place fracture profile; Link block 14, for when the differential seat angle that described computing module 12 calculates described fictitious outline and described fracture profile is less than default angle threshold, connects described object edge point and described crack edge point.
Concrete, determination module 13 comprises, mobile unit, computing unit and the first judging unit, wherein, described mobile unit, for moving the distance of a pixel, and using the reposition of the position after movement as described crack edge point to its adjacent position by described crack edge point according to preset direction, wherein, described preset direction is consistent with the trajectory direction of the fracture profile at described crack edge point place; Described computing unit, for calculating when described crack edge point is positioned at described reposition and the distance of described object edge point; Described first judging unit, during for judging that described crack edge point is positioned at described reposition and the distance of described object edge point whether be less than when described crack edge point is positioned at original position and the distance of described object edge point; Described mobile unit, also for when described crack edge point is positioned at described reposition and the distance of described object edge point is less than when described crack edge point is positioned at original position and the distance of described object edge point time, according to preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the step of the position after movement as the reposition of described crack edge point, until when the distance of described crack edge point and described object edge point is minimum, described reposition is defined as optimum position; When described crack edge point is positioned at described reposition and the distance of described object edge point is greater than when described crack edge point is positioned at original position and the distance of described object edge point time, according to the direction contrary with described preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point.
Computing module 12 comprises the first determining unit, wherein, described first determining unit, for described object edge point for starting point, first three pixel of the fracture profile at described object edge point place is defined as the first reference contours; Also for will with described object edge point for starting point time, described fracture profile moves towards the direction of direction as described first reference contours, determines the angle of described first reference contours; Also for described crack edge point being pointed to the direction of direction as described fictitious outline of described object edge point, determine the angle of described fictitious outline; And in the present embodiment, described computing unit, also for calculating the differential seat angle of described first reference contours angle and described fictitious outline angle.
In addition, based on the description of above-described embodiment, in another embodiment, described first determining unit, also for described crack edge point for starting point, first three pixel of the fracture profile at described crack edge point place is defined as the second reference contours; Also for will with described crack edge point for starting point time, described fracture profile moves towards the direction of direction as described second reference contours, determines the angle of described second reference contours; Also for described object edge point being pointed to the direction of direction as described fictitious outline of described crack edge point, determine the angle of described fictitious outline; Described computing unit, also for calculating the differential seat angle of described second reference contours angle and described fictitious outline angle.
On the basis of above-described embodiment, described in search module 11 and comprise selection unit, Traversal Unit, the second judging unit and the second determining unit, wherein, described selection unit, for selecting a marginal point as start edge point from a base profile; Described Traversal Unit, for traveling through the marginal point of described base profile from described start edge point according to certain orientation; Described second judging unit, for when traversing the terminal marginal point of described base profile, judges whether described terminal marginal point and described start edge point are same marginal point; Described second determining unit, for when described terminal marginal point and described start edge point are same marginal points, is defined as integrity profile by described base profile; Also for when described terminal marginal point and described start edge point are not same marginal points, described base profile is defined as the profile that ruptures.
In described device, the implementation procedure of the function and efficacy of modules and unit refers to implementation procedure corresponding in said method, does not repeat them here.
Comprehensively above-mentioned, the problem of integrity profile cannot be obtained for solving prior art, the technical scheme of the embodiment of the present invention, after the base profile obtaining image according to dual-threshold voltage, fracture profile is searched from described base profile, and using any in the crack edge point of described fracture profile as object edge point; Then, calculate the distance of other crack edge points and described object edge point respectively, when the distance of described crack edge point and described object edge point is less than predetermined threshold value, then this crack edge point likely belongs to same profile with object edge point, so, the link position of described crack edge point and described object edge point is determined, wherein, described link position be described crack edge point and described object edge point apart from time minimum, the position of described crack edge point; Then, to the fictitious outline formed between crack edge point and object edge point, and the differential seat angle of crack edge point or object edge point place fracture profile, determine whether crack edge point belongs to same profile with object edge point further.Wherein, when fictitious outline is less than default angle threshold with the differential seat angle of fracture profile, think that crack edge point and object edge point belong to same profile, linking objective marginal point and crack edge point.As can be seen here, the technical scheme of the embodiment of the present invention is after obtaining base profile, further examination goes out the fracture profile in base profile, and go out to belong to the crack edge point of same profile by Distance geometry angle two choice of parameters, and connected by the crack edge point belonging to same profile, thus complete profile can be obtained.
Those skilled in the art, at consideration instructions and after putting into practice invention disclosed herein, will easily expect other embodiment of the present invention.The present invention is intended to contain any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present invention and comprised the undocumented common practise in the art of the present invention or conventional techniques means.Instructions and embodiment are only regarded as exemplary, and true scope of the present invention and spirit are pointed out by claim below.
Should be understood that, the present invention is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.Scope of the present invention is only limited by appended claim.

Claims (10)

1. a contour linkage method, is characterized in that, comprising:
After the base profile obtaining image according to dual-threshold voltage, from described base profile, search fracture profile;
Using any in the crack edge point of described fracture profile as object edge point, calculate the distance of crack edge point and described object edge point described in other respectively;
When the distance of described crack edge point and described object edge point is less than predetermined threshold value, determine the link position of described crack edge point and described object edge point, wherein, described link position be described crack edge point and described object edge point apart from time minimum, the position of described crack edge point;
Calculate the fictitious outline formed between described crack edge point and described object edge point, and the differential seat angle of described crack edge point or described object edge point place fracture profile;
When the differential seat angle of described fictitious outline and described fracture profile is less than default angle threshold, connect described object edge point and described crack edge point.
2. the method for claim 1, is characterized in that, the described link position determining described crack edge point and described object edge point, comprising:
According to preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point, wherein, described preset direction is consistent with the trajectory direction of the fracture profile at described crack edge point place;
Calculate when described crack edge point is positioned at described reposition and the distance of described object edge point;
When judging that described crack edge point is positioned at described reposition and the distance of described object edge point whether be less than when described crack edge point is positioned at original position and the distance of described object edge point;
When if described crack edge point is positioned at described reposition and the distance of described object edge point be less than when described crack edge point is positioned at original position and the distance of described object edge point, then repeat the distance according to preset direction, described crack edge point being moved a pixel to its adjacent position, and using the step of the position after movement as the reposition of described crack edge point, until when the distance of described crack edge point and described object edge point is minimum, described reposition is defined as optimum position;
When if described crack edge point is positioned at described reposition and the distance of described object edge point be greater than when described crack edge point is positioned at original position and the distance of described object edge point, according to the direction contrary with described preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point, and repeat and calculate when described crack edge point is positioned at described reposition and the step of the distance of described object edge point, until when the distance of described crack edge point and described object edge point is minimum, described reposition is defined as optimum position.
3. the method for claim 1, is characterized in that, the fictitious outline formed between described calculating described crack edge point and described object edge point, and the differential seat angle of described crack edge point or described object edge point place fracture profile, comprising:
With described object edge point for starting point, first three pixel of the fracture profile at described object edge point place is defined as the first reference contours;
Will with described object edge point for starting point time, described fracture profile moves towards the direction of direction as described first reference contours, determines the angle of described first reference contours;
Described crack edge point is pointed to the direction of direction as described fictitious outline of described object edge point, determine the angle of described fictitious outline;
Calculate the differential seat angle of described first reference contours angle and described fictitious outline angle.
4. the method for claim 1, is characterized in that, the fictitious outline formed between described calculating described crack edge point and described object edge point, and the differential seat angle of described crack edge point or described object edge point place fracture profile, comprising:
With described crack edge point for starting point, first three pixel of the fracture profile at described crack edge point place is defined as the second reference contours;
Will with described crack edge point for starting point time, described fracture profile moves towards the direction of direction as described second reference contours, determines the angle of described second reference contours;
Described object edge point is pointed to the direction of direction as described fictitious outline of described crack edge point, determine the angle of described fictitious outline;
Calculate the differential seat angle of described second reference contours angle and described fictitious outline angle.
5. the method for claim 1, is characterized in that, describedly from described base profile, searches fracture profile, comprising:
From a base profile, select a marginal point as start edge point;
Travel through the marginal point of described base profile according to certain orientation from described start edge point;
When traversing the terminal marginal point of described base profile, judge whether described terminal marginal point and described start edge point are same marginal point;
If described terminal marginal point and described start edge point are same marginal points, then described base profile is defined as integrity profile;
If described terminal marginal point and described start edge point are not same marginal points, then described base profile is defined as the profile that ruptures.
6. a contour linkage device, is characterized in that, comprising:
Search module, for after the base profile obtaining image according to dual-threshold voltage, from described base profile, search fracture profile;
Computing module, for using described search in the crack edge point of the fracture profile that module is searched a bit as object edge point, calculate the distance of crack edge point and described object edge point described in other respectively;
Determination module, for when the distance of described crack edge point and described object edge point is less than predetermined threshold value, determine the link position of described crack edge point and described object edge point, wherein, described link position be described crack edge point and described object edge point apart from time minimum, the position of described crack edge point;
Described computing module, also for calculating the fictitious outline formed between described crack edge point and described object edge point, and the differential seat angle of described crack edge point or described object edge point place fracture profile;
Link block, when the differential seat angle for calculating described fictitious outline and described fracture profile at described computing module is less than default angle threshold, connects described object edge point and described crack edge point.
7. device as claimed in claim 6, it is characterized in that, described determination module comprises mobile unit, computing unit and the first judging unit, wherein,
Described mobile unit, for described crack edge point to be moved according to preset direction the distance of a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point, wherein, described preset direction is consistent with the trajectory direction of the fracture profile at described crack edge point place;
Described computing unit, for calculating when described crack edge point is positioned at described reposition and the distance of described object edge point;
Described first judging unit, during for judging that described crack edge point is positioned at described reposition and the distance of described object edge point whether be less than when described crack edge point is positioned at original position and the distance of described object edge point;
Described mobile unit, also for when described crack edge point is positioned at described reposition and the distance of described object edge point is less than when described crack edge point is positioned at original position and the distance of described object edge point time, according to preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the step of the position after movement as the reposition of described crack edge point, until when the distance of described crack edge point and described object edge point is minimum, described reposition is defined as optimum position;
When described crack edge point is positioned at described reposition and the distance of described object edge point is greater than when described crack edge point is positioned at original position and the distance of described object edge point time, according to the direction contrary with described preset direction, described crack edge point is moved the distance of a pixel to its adjacent position, and using the reposition of the position after movement as described crack edge point.
8. device as claimed in claim 6, it is characterized in that, described computing module comprises the first determining unit, wherein,
Described first determining unit, for described object edge point for starting point, first three pixel of the fracture profile at described object edge point place is defined as the first reference contours;
Also for will with described object edge point for starting point time, described fracture profile moves towards the direction of direction as described first reference contours, determines the angle of described first reference contours;
Also for described crack edge point being pointed to the direction of direction as described fictitious outline of described object edge point, determine the angle of described fictitious outline;
Described computing unit, also for calculating the differential seat angle of described first reference contours angle and described fictitious outline angle.
9. device as claimed in claim 6, is characterized in that,
Described first determining unit, also for described crack edge point for starting point, first three pixel of the fracture profile at described crack edge point place is defined as the second reference contours;
Also for will with described crack edge point for starting point time, described fracture profile moves towards the direction of direction as described second reference contours, determines the angle of described second reference contours;
Also for described object edge point being pointed to the direction of direction as described fictitious outline of described crack edge point, determine the angle of described fictitious outline;
Described computing unit, also for calculating the differential seat angle of described second reference contours angle and described fictitious outline angle.
10. device as claimed in claim 6, is characterized in that, described in search module and comprise selection unit, Traversal Unit, the second judging unit and the second determining unit, wherein,
Described selection unit, for selecting a marginal point as start edge point from a base profile;
Described Traversal Unit, for traveling through the marginal point of described base profile from described start edge point according to certain orientation;
Described second judging unit, for when traversing the terminal marginal point of described base profile, judges whether described terminal marginal point and described start edge point are same marginal point;
Described second determining unit, for when described terminal marginal point and described start edge point are same marginal points, is defined as integrity profile by described base profile;
Also for when described terminal marginal point and described start edge point are not same marginal points, described base profile is defined as the profile that ruptures.
CN201510938667.0A 2015-12-15 2015-12-15 profile connection method and device Active CN105469414B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510938667.0A CN105469414B (en) 2015-12-15 2015-12-15 profile connection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510938667.0A CN105469414B (en) 2015-12-15 2015-12-15 profile connection method and device

Publications (2)

Publication Number Publication Date
CN105469414A true CN105469414A (en) 2016-04-06
CN105469414B CN105469414B (en) 2018-09-18

Family

ID=55607073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510938667.0A Active CN105469414B (en) 2015-12-15 2015-12-15 profile connection method and device

Country Status (1)

Country Link
CN (1) CN105469414B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339710A (en) * 2016-08-25 2017-01-18 凌云光技术集团有限责任公司 Edge width defect detection method and edge width defect detection device
CN109419497A (en) * 2017-08-31 2019-03-05 中国科学院微电子研究所 Guan mai recognition method based on thermal imaging
CN109543665A (en) * 2017-09-22 2019-03-29 凌云光技术集团有限责任公司 Image position method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376319A (en) * 2014-10-22 2015-02-25 西安工程大学 Method for extracting closed edge image contour on basis of anisotropy Gaussian kernel
CN104484667A (en) * 2014-12-30 2015-04-01 华中科技大学 Contour extraction method based on brightness characteristic and contour integrity
CN104808588A (en) * 2015-02-15 2015-07-29 南京航空航天大学 Broken surface automatic combination and fitting method based on features

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376319A (en) * 2014-10-22 2015-02-25 西安工程大学 Method for extracting closed edge image contour on basis of anisotropy Gaussian kernel
CN104484667A (en) * 2014-12-30 2015-04-01 华中科技大学 Contour extraction method based on brightness characteristic and contour integrity
CN104808588A (en) * 2015-02-15 2015-07-29 南京航空航天大学 Broken surface automatic combination and fitting method based on features

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
左俊彦 等: "基于Canny检测的股骨边缘轮廓连接算法", 《山东大学学报(工学版)》 *
张李超 等: "基于裂缝跟踪技术的STL文件容错切片", 《锻压机械》 *
徐忠华 等: "星型模型的轮廓连接查询算法", 《JOURNAL OF FRONTIERS OF COMPUTER SCIENCE AND TECHNOLOGY》 *
郑丽萍 等: "轮廓线的经纬线连接法", 《计算机应用》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339710A (en) * 2016-08-25 2017-01-18 凌云光技术集团有限责任公司 Edge width defect detection method and edge width defect detection device
CN106339710B (en) * 2016-08-25 2019-09-24 凌云光技术集团有限责任公司 A kind of border width defect inspection method and device
CN109419497A (en) * 2017-08-31 2019-03-05 中国科学院微电子研究所 Guan mai recognition method based on thermal imaging
CN109543665A (en) * 2017-09-22 2019-03-29 凌云光技术集团有限责任公司 Image position method and device
CN109543665B (en) * 2017-09-22 2020-10-16 凌云光技术集团有限责任公司 Image positioning method and device

Also Published As

Publication number Publication date
CN105469414B (en) 2018-09-18

Similar Documents

Publication Publication Date Title
CN105069415B (en) Method for detecting lane lines and device
CN105654507B (en) A kind of vehicle overall dimension measurement method based on the tracking of image behavioral characteristics
CN103163144B (en) For monitoring the method for the quality of the prime coat be applied on motorcar body before spraying paint
US20160180176A1 (en) Object detection apparatus
CN105868688B (en) Track detection device and track detection method
CN106407893A (en) Method, device and equipment for detecting lane line
US20130120125A1 (en) Method and system for lane departure warning
CN105260713A (en) Method and device for detecting lane line
JP6291469B2 (en) Obstacle detection device and obstacle detection method
CN104834889A (en) Marking line detection system and marking line detection method
CN109866684A (en) Lane departure warning method, system, readable storage medium storing program for executing and computer equipment
US9619717B2 (en) Lane-line recognition apparatus
JP5164351B2 (en) Object detection apparatus and object detection method
JP2008065634A (en) Object detection apparatus and object detection method
JP2003098424A (en) Range finder based on image processing
CN105469414A (en) Contour connection method and apparatus
CN104915927B (en) Anaglyph optimization method and device
JP2007037011A (en) Image processing apparatus
CN109165629A (en) It is multifocal away from visual barrier cognitive method, device, equipment and storage medium
CN110088807A (en) Separator bar identification device
WO2015162910A1 (en) Vehicle-mounted display device, method for controlling vehicle-mounted display device, and program
CN104504730B (en) A kind of differentiating method to parking cars and leaving thing
JP2000331148A (en) Obstacle detector
CN108760755A (en) A kind of dust granule detection method and device
CN112712495A (en) Anti-loose piece fracture identification method, system, terminal and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Patentee after: Lingyunguang Technology Co., Ltd

Address before: 100094 Beijing city Haidian District road Tamatsu wisdom Valley Center Building 2

Patentee before: LUSTER LIGHTTECH GROUP Co.,Ltd.

CP03 Change of name, title or address