CN115953399B - Industrial part structural defect detection method based on contour features and SVDD - Google Patents

Industrial part structural defect detection method based on contour features and SVDD Download PDF

Info

Publication number
CN115953399B
CN115953399B CN202310232248.XA CN202310232248A CN115953399B CN 115953399 B CN115953399 B CN 115953399B CN 202310232248 A CN202310232248 A CN 202310232248A CN 115953399 B CN115953399 B CN 115953399B
Authority
CN
China
Prior art keywords
image
contour
defect
template
template image
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.)
Active
Application number
CN202310232248.XA
Other languages
Chinese (zh)
Other versions
CN115953399A (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.)
Changzhou Weiyizhi Technology Co Ltd
Original Assignee
Changzhou Weiyizhi Technology 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 Changzhou Weiyizhi Technology Co Ltd filed Critical Changzhou Weiyizhi Technology Co Ltd
Priority to CN202310232248.XA priority Critical patent/CN115953399B/en
Publication of CN115953399A publication Critical patent/CN115953399A/en
Application granted granted Critical
Publication of CN115953399B publication Critical patent/CN115953399B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses an industrial part structural defect detection method based on contour features and SVDD, which comprises the following steps of 1, contour extraction; step 2, performing classification training by using an SVDD classifier; step 3, judging whether an outer contour structural defect exists; step 4, selecting SIFT feature angular points; step 5, mapping the characteristic corner points of the acquired image to the characteristic corner points of the template image in an affine transformation mode; step 6, setting the pixel points at the corresponding positions of the template images as template threshold values, setting the pixel points at the corresponding positions of the acquired images as acquisition threshold values, and setting diff as the difference between the acquisition threshold values and the template threshold values; step 7, updating pixel points and generating a binary image; and 8, judging whether the defect area is larger than a defect judging standard. The method overcomes the defects that the acquired image under the existing condition can generate position deviation and can not accurately detect the inner and outer contour structures, and can rapidly and accurately detect the inner and outer contour structure defects.

Description

Industrial part structural defect detection method based on contour features and SVDD
Technical Field
The invention relates to the technical field of defect detection, in particular to an industrial part structural defect detection method based on contour features and SVDD.
Background
At present, a template matching method is a common method for detecting defects, wherein a template is created according to a standard image, and then contour defect detection is carried out by adopting shape-based template matching.
The Chinese patent document CN111795970A (application number: CN202010676865. X) discloses an irregular contour defect detection method, which uses a Canny operator to extract an image edge contour, performs shape matching on the contours of a standard image and an industrial acquisition image, adopts a rough-to-fine matching mode, uses a Shape Context (SC) in a rough matching stage, uses an iterative nearest point algorithm (ICP) in a fine matching stage, finally divides the two contours after matching and aligning into N small segments, calculates an improved Hausdorff distance corresponding to a segmented point set, forms a distance vector, and finally obtains a product contour defect part according to a designed distance threshold function and a termination iteration condition.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art.
Therefore, on the basis of the existing template image, the invention provides the industrial part structural defect detection method based on the contour features and the SVDD, so that iterative operation is avoided, calculation force is saved, meanwhile, the accuracy is reserved, and the internal and external contour structural defects can be rapidly and accurately detected.
The method for detecting the structural defects of the industrial part based on the contour features and the SVDD comprises the following specific steps:
step 1, contour extraction: firstly, respectively extracting contours of a template image and an acquisition image;
step 2, performing classification training by using an SVDD classifier: the contours extracted from the template image and the acquired image respectively form similar sets, and the SVDD classifier is used for classifying and training; the similar set takes the contour data extracted from the template image as one type of data, takes the contour data extracted from the acquired image as the other type of data, and combines the two types of data into one set;
step 3, judging whether the structural defect of the outer contour exists or not: when judging that the outer contour structural defect exists, indicating that the outer contour defect detection is successful, and outputting outer contour defect data; when judging that the outer contour structural defect does not exist, indicating that the outer contour defect does not exist, and detecting the inner contour defect;
step 4, selecting SIFT feature angular points: respectively selecting SIFT feature angular points of the template image and the acquired image;
step 5, mapping the characteristic corner points of the acquired image to the characteristic corner points of the template image in an affine transformation mode;
step 6, setting pixels at positions corresponding to the template image as template threshold values, setting pixels at positions corresponding to the acquired image as acquisition threshold values, and settingIs the difference between the acquisition threshold and the template threshold;
step 7, updating pixel points and generating a binary image;
step 8, judging whether the defect area is larger than a defect judgment standard: when the defect area is judged to be larger than the defect judgment standard, the inner contour defect detection is successful, and the inner contour defect data is output; when judging that the defect area is not larger than the defect judging standard, the method indicates a normal area and no defect occurs.
The invention has the beneficial effects that through the self-adaptive thresholding multi-angle rotation edge extraction algorithm and the SIFT angular point characteristic affine transformation, the defects that the acquired image can generate position deviation and the internal and external contour structure cannot be accurately detected in the prior art are overcome, on the basis of the existing template image, the industrial component structural defect detection method based on the contour characteristic and the SVDD classification algorithm is provided, firstly, the contour of the template image and the acquired image is extracted, then the contour point set extracted from the template image and the acquired image is subjected to SVDD classifier training judgment, if the external contour structure defect exists, the detection is successful, and if the external contour structure defect does not exist, the internal contour structure defect is detected, and the internal and external contour structure defect can be rapidly and accurately detected.
According to one embodiment of the present invention, in step 1, the specific steps of contour extraction are as follows:
step 1.1, median filtering is carried out on an input template image or an acquired image, self-adaption binarization is carried out, and a target pixel and a background pixel are separated;
step 1.2, expanding a template image or a collected image by using background pixels to enable a central target to be positioned at the center of a nine-grid and at the center of eight ray emission points;
step 1.3, respectively rotating the center target 180/alpha times by taking the angle alpha as a step length to obtain 180/alpha template images or acquired images of the same center target at different angles;
step 1.4, taking one image: taking one image of 180/alpha images, and respectively emitting rays from the centers of the upper, lower, left and right of a center target Jiugong lattice to scan, wherein the scanning range is [0, 180 ]; simultaneously, rays are respectively emitted from the centers of the upper left, the lower left, the upper right and the lower right of a center target nine palace lattice to scan, and the scanning range is [0, 90 ];
step 1.5, judging whether the ray finds the central target edge or not: when judging that the ray does not find the edge of the central target, stopping scanning the ray, and ending the whole contour extraction; otherwise, when judging that the ray finds the edge of the central target, recording the edge contour coordinates, stopping scanning the ray, and entering a 1.6 th step;
step 1.6, judging whether 180/alpha sheets all complete the searching task: when judging that 180/alpha sheets of images do not all complete the searching task, returning to the step 1.4; when judging that 180/alpha images all complete the searching task, integrating the edge contour coordinates of the 180/alpha images to generate the center target outer contour.
According to one embodiment of the present invention, in the step 2, a ray traversing manner is adopted to emit rays from eight directions of the acquired image to obtain an intersection point with the target area, so as to obtain a coordinate point set of the contour of the target area of the acquired image.
According to one embodiment of the present invention, in the step 2, a ray traversing manner is adopted to emit rays from eight directions of the template image to obtain an intersection point with the target area, so as to obtain a coordinate point set of the outline of the target area of the template image.
According to one embodiment of the present invention, the outer contour defect detection comprises the following specific steps:
the method comprises the steps of firstly, converting a rectangular coordinate contour point set of a template image target area into a polar coordinate point set of the template image target area, and converting a rectangular coordinate contour point set of an acquisition image target area into a polar coordinate point set of the acquisition image target area;
secondly, taking a polar coordinate point set of a template image target area and a polar coordinate point set of a collected image target area as training sets, and training an SVDD classifier;
and thirdly, judging the polar coordinate point set of the template image target area and the polar coordinate point set of the acquired image target area by using an SVDD classifier.
According to one embodiment of the invention, when the outer contour has defects, the classification result is no; and when the outer contour has no defect, the classification result is yes.
According to one embodiment of the present invention, the inner contour defect detection comprises the following specific steps:
firstly, respectively selecting SIFT feature angular points from a rectangular coordinate contour point set of an acquired image target area and a rectangular coordinate contour point set of a template image target area;
step (2), mapping the characteristic corner points of the acquired image to the characteristic corner points of the template image in an affine transformation mode;
step (3), subtracting the threshold value of the acquired image from the threshold value of the template image, wherein the image is a binary image;
and (4) calculating the largest connected region area, and when the largest connected region area is larger than the defect connected region judgment standard, indicating that the defect is the inner contour defect.
According to one embodiment of the invention, in the subtraction operation of the threshold value of the acquired image and the threshold value of the template image, when the difference value is smaller than a given threshold value, the acquired image is updated to 0; when the difference is greater than a given threshold, the captured image is updated to 255.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of the present invention;
FIG. 2 is a flow chart of contour extraction;
FIG. 3 is an image expansion schematic;
fig. 4 is a ray scanning schematic.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects solved by the invention more clear, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, the method for detecting the structural defect of the industrial part based on the contour features and the SVDD comprises the following specific steps:
step 1, contour extraction: firstly, respectively extracting the outline of a template image and an acquired image.
Referring to fig. 2, in step 1, a contour is obtained by ray traversal, and the specific steps of contour extraction are as follows:
step 1.1, median filtering is carried out on an input template image or an acquired image, self-adaption binarization is carried out, and target pixels and background pixels are separated.
Step 1.2, expanding the template image or the acquired image by using background pixels to enable a central target to be positioned at the center of the nine squares and at the center of the eight ray emission points.
And 1.3, respectively rotating the center target 180/alpha times by taking the angle alpha as a step length to obtain 180/alpha template images or acquired images of the same center target at different angles.
It should be noted that, in order to consider the algorithm effect, the angle α is usually 30 degrees, so as to obtain 6 images with different angles in 180 degrees.
Of course, the angle α may be 10 degrees, so that 18 images with different angles in 180 degrees can be obtained.
If the angle alpha is 30 degrees, respectively rotating the center target for 6 times by taking 30 degrees as step length to obtain 6 images of the same center target at different angles; when there is a depression in the center target, it is difficult to accurately obtain the edge points of the depression portion from the image at only one angle, and thus it is necessary to find from different angles, respectively, to obtain the target edge.
Step 1.4, taking one image: taking one image of 180/alpha images, and respectively emitting rays from the centers of the upper, lower, left and right of a center target Jiugong lattice to scan, wherein the scanning range is [0, 180 ]; simultaneously, rays are respectively emitted from the centers of the upper left, the lower left, the upper right and the lower right of the center target nine palace lattice to scan, and the scanning range is [0, 90 ].
Step 1.5, judging whether the ray finds the central target edge or not: when judging that the ray does not find the edge of the central target, stopping scanning the ray, and ending the whole contour extraction; otherwise, when judging that the ray finds the edge of the central target, recording the edge contour coordinates, stopping scanning the ray, and entering a 1.6 th step; if the ray does not find any central target, the ray stops searching, and the whole contour extraction is finished; if the ray finds the edge of the central target, the ray stops finding and recording the edge contour coordinates, and the step 1.6 is entered.
Step 1.6, judging whether 180/alpha sheets all complete the searching task: when judging that 180/alpha sheets of images do not all complete the searching task, returning to the step 1.4; when judging that 180/alpha images all complete the searching task, integrating the edge contour coordinates of the 180/alpha images to generate the center target outer contour. Namely, the 1.4 th step and the 1.5 th step are circulated until 180/alpha sheets of images complete the searching task, edge contour coordinates of the 180/alpha sheets of images are integrated, a center target outer contour is generated, and ray traversal contour extraction is finished.
Step 2, performing classification training by using an SVDD classifier: the contours extracted from the template image and the acquired image respectively form similar sets, and the SVDD classifier is used for classifying and training; the similar set takes the contour data extracted from the template image as one type of data, takes the contour data extracted from the acquired image as the other type of data, and combines the two types of data into one set.
Further, by adopting a ray traversal mode, rays are emitted from eight directions of the acquired image to obtain an intersection point with the target area, a coordinate point set of the contour of the target area of the acquired image is obtained, and the rectangular coordinate point set of the contour of the target area in the acquired image is set as
As well as the template image, a set of coordinates of the outline of the target region is obtained. Transmitting rays from eight directions of a template image by adopting a ray traversal mode to obtain an intersection point with a target area, obtaining a coordinate point set of the outline of the target area of the template image, and setting the outline rectangular coordinate point set of the target area in the template image as
Reserving outline rectangular coordinate point set of target area in acquired imageAnd the set of rectangular coordinates of the outline of the target area in the template image +.>Preparing for the rectangular coordinate to polar coordinate in the future.
Step 3, judging whether the structural defect of the outer contour exists or not: when judging that the outer contour structural defect exists, indicating that the outer contour defect detection is successful, and outputting outer contour defect data; and when judging that the outer contour structural defect does not exist, indicating that the outer contour defect does not exist, and detecting the inner contour defect. Namely, training and judging by using an SVDD classifier, and if the defect of the outline structure exists, detecting successfully; and if the defect of the outer contour structure does not exist, detecting the defect of the inner contour structure.
Step 4, selecting SIFT feature angular points: and respectively selecting SIFT feature corner points of the template image and the acquired image.
And 5, mapping the acquired image characteristic corner points to the template image characteristic corner points in an affine transformation mode.
Step 6, setting the pixel point at the corresponding position of the template image as a template threshold valueThe pixel point at the corresponding position of the acquired image is the acquisition threshold value +.>Setting->For acquisition threshold +.>Threshold value of template->Is a difference between (a) and (b).
And 7, updating the pixel points and generating a binary image.
Step 8, judging whether the defect area is larger than a defect judgment standard: when the defect area is judged to be larger than the defect judgment standard, the inner contour defect detection is successful, and the inner contour defect data is output; when judging that the defect area is not larger than the defect judging standard, the method indicates a normal area and no defect occurs.
It should be noted that the value of the defect judging standard is not a fixed value, and may be different for different project values and different defect types.
For example, judging whether the defect area is larger than 15 pixel points: when judging that the defect area is larger than 15 pixel points, indicating that the inner contour defect detection is successful, and outputting inner contour defect data; when judging that the defect area is not more than 15 pixel points, the normal area is indicated, and no defect occurs.
The specific steps of the outer contour defect detection are as follows:
the method comprises the steps of firstly, converting a rectangular coordinate contour point set of a template image target area into a polar coordinate point set of the template image target area, and converting a rectangular coordinate contour point set of an acquisition image target area into a polar coordinate point set of the acquisition image target area; i.e. right-angle coordinate pointConversion to polar coordinate Point->The method comprises the steps of carrying out a first treatment on the surface of the The coordinates of the contour point set are rectangular coordinates, and the rectangular coordinates point is +.>Relatively unstable, need to be right-angle coordinate point +.>Conversion to polar coordinate Point->The method comprises the steps of carrying out a first treatment on the surface of the The specific conversion formula is as follows:
(1)
so that the number of the parts to be processed,after transformation is->,/>After transformation is->;/>And->Respectively acquiring a rectangular coordinate point set of an image and a rectangular coordinate point set of a template image, and +.>And->The method comprises the steps of collecting a polar coordinate point set of an image and a polar coordinate point set of a template image respectively.
A second step of collecting polar coordinate points of the target region of the template imageAnd acquiring a polar point set of the image target area +.>As a training set, training an SVDD classifier;
third step, finally, polar coordinate point set of template image target areaAnd acquiring a polar point set of the image target area +.>And (5) judging an SVDD classifier.
When the outer contour has defects, the classification result is no; and when the outer contour has no defect, the classification result is yes.
SVDD (Support Vector Data Description), support vector data description, is a two-class SVDD classifier, which is suitable for determining whether defects exist in the scheme, and the basic idea is to find a hypersphere surrounding a target sample point in a feature space mapped to a high dimension, and to minimize the volume surrounded by the hypersphere so that the target sample point is surrounded in the hypersphere as much as possible, and the non-target sample point is excluded in the hypersphere as much as possible, thereby achieving the purpose of dividing between the two classes. The method aims at finding the center a and radius R of the smallest hypersphere that can contain normal data samples. In classification, a new sample is considered a normal point if it falls in the middle of a sphere in the feature space, or an abnormal point if it falls outside the sphere.
The specific steps of the inner contour defect detection are as follows:
step (1), first, for the rectangular coordinate contour point set of the collected image target areaRectangular coordinate contour point set of template image target area +.>Respectively selecting SIFT feature corner points; setting characteristic corner points of acquired images as +.>The characteristic corner point of the template image is->
SIFT (Scale-invariant feature transform) is a disclosed algorithm for detecting local features, and the SIFT algorithm obtains features by solving for descriptors of feature points (or camera points) and their related scales and orientation in an image and performs image feature point matching. The SIFT features have good stability and invariance, and can adapt to changes of rotation angles, scale scaling, image brightness or shooting visual angles. Good detection effect can be obtained under the condition of being interfered by visual angle change, affine transformation and noise to a certain extent. The SIFT procedure was as follows: 1. generating a Gaussian differential pyramid (DOG pyramid), and constructing a scale space; 2. spatial extreme point detection (preliminary investigation of key points); 3. accurate positioning of the stable key points; 4. stabilizing the distribution of key point direction information; 5. describing key points; 6. and (5) matching the characteristic points.
The step needs to find the corresponding characteristic angular points in the SIFT step (1) and the SIFT step (2) to prepare for matching the corresponding areas of the acquired image and the template image in the next step.
Step (2), then using affine transformation mode to collect image characteristic angular pointsMapping to template image feature corner +.>
Affine transformation, also called affine mapping, refers to the transformation of one vector space into another vector space by performing a linear transformation and a translation. Affine transformations can scale, tilt, rotate, and translate data to varying degrees. Substituting the characteristic corner pairs acquired in the last step into a conversion formula to calculate the conversion relationAnd->. After the conversion relation is obtained, each pixel point in the acquired image can be corresponding to the template image. The affine transformation formula is as follows:
(2)
wherein, the liquid crystal display device comprises a liquid crystal display device,and->Is rectangular coordinates (i.e. characteristic corner point pair) of the template image, +.>And->Is the transformed coordinates. Transformation relation->And->The characteristic corner pairs of the template image are compared with the characteristic corner pairs of the acquired image to determine.
And (3) performing subtraction operation on the threshold value of the acquired image and the threshold value of the template image, and forming a binary image by the image.
(3)
Wherein, the liquid crystal display device comprises a liquid crystal display device,representing an acquisition threshold; />Representing a template threshold; />Representing the difference between the acquisition threshold and the template threshold.
When (when)And generating pixel point update of 0 at the corresponding position in the image.
When (when)And generating pixel point updating of the corresponding position in the image as 255.
In this way, a binary image of the acquired image is generated, in which the position of the pixel point 0 is a normal region and the position of the pixel point 255 is determined as a defective region.
And (4) calculating the largest connected region area, and when the largest connected region area is larger than the defect connected region judgment standard, indicating that the defect is the inner contour defect. That is, the defect area is determined, the area of the connected domain in the binary image is calculated, and the area of the defect area in the binary image can be also referred to as the area of the defect area in the binary image, so as to determine whether the defect area has a defect, and when the defect area is larger than 15 pixel points, the defect area is determined to have an inner contour defect.
In the subtraction operation of the threshold value of the acquired image and the threshold value of the template image, when the difference value is smaller than a given threshold value, the acquired image is updated to 0; when the difference is greater than a given threshold, the captured image is updated to 255.
It should be noted that 0 and 255 are used to binarize the acquired image. The original gray image has a value ranging from 0 to 255, where there is a gray change (from black to white). The threshold is set to divide the contour in the gray image by the threshold, the smaller than the threshold is set to 0, the larger than the threshold is set to 255, and thus one gray image is divided into two images (only two gray values in the image) by the threshold.
Referring to fig. 3, in the image expansion diagram, a center polygon is a target area.
Referring to fig. 4, in the ray scanning schematic diagram, eight radians are ray scanning angle ranges of different positions, and eight rays correspond to eight radians.
According to the invention, through an edge extraction algorithm capable of rotating at multiple angles after self-adaptive thresholding and affine transformation of SIFT angular point characteristics, the defects that the acquired image can generate position deviation and internal and external contour structures cannot be accurately detected in the prior art are overcome, on the basis of the existing template image, an industrial part structural defect detection method based on the contour characteristics and SVDD classification algorithm is provided, firstly, the contours of the template image and the acquired image are extracted, then, a contour point set extracted from the template image and the acquired image is subjected to SVDD classifier training judgment, if the external contour structure defect exists, the detection is successful, and if the external contour structure defect does not exist, the internal contour structure defect is detected, so that the internal and external contour structure defect can be rapidly and accurately detected, and the specific execution time of the algorithm is 78ms on a CPU-i7-9700 8 core at present.
The present invention is not limited to the above-mentioned embodiments, and any person skilled in the art, based on the technical solution of the present invention and the inventive concept thereof, can be replaced or changed within the scope of the present invention.

Claims (6)

1. An industrial part structural defect detection method based on contour features and SVDD is characterized by comprising the following specific steps:
step 1, contour extraction: firstly, respectively extracting contours of a template image and an acquisition image;
in step 1, the specific steps of contour extraction are as follows:
step 1.1, median filtering is carried out on an input template image or an acquired image, self-adaption binarization is carried out, and a target pixel and a background pixel are separated;
step 1.2, expanding a template image or a collected image by using background pixels to enable a central target to be positioned at the center of a nine-grid and at the center of eight ray emission points;
step 1.3, respectively rotating the center target 180/alpha times by taking the angle alpha as a step length to obtain 180/alpha template images or acquired images of the same center target at different angles;
step 1.4, taking one image: taking one image of 180/alpha images, and respectively emitting rays from the centers of the upper, lower, left and right of a center target Jiugong lattice to scan, wherein the scanning range is [0, 180 ]; simultaneously, rays are respectively emitted from the centers of the upper left, the lower left, the upper right and the lower right of a center target nine palace lattice to scan, and the scanning range is [0, 90 ];
step 1.5, judging whether the ray finds the central target edge or not: when judging that the ray does not find the edge of the central target, stopping scanning the ray, and ending the whole contour extraction; otherwise, when judging that the ray finds the edge of the central target, recording the edge contour coordinates, stopping scanning the ray, and entering a 1.6 th step;
step 1.6, judging whether 180/alpha sheets all complete the searching task: when judging that 180/alpha sheets of images do not all complete the searching task, returning to the step 1.4; when judging that 180/alpha images all complete the searching task, integrating the edge contour coordinates of the 180/alpha images to generate a central target outer contour;
step 2, performing classification training by using an SVDD classifier: the contours extracted from the template image and the acquired image respectively form similar sets, and the SVDD classifier is used for classifying and training; the similar set takes the contour data extracted from the template image as one type of data, takes the contour data extracted from the acquired image as the other type of data, and combines the two types of data into one set;
step 3, judging whether the structural defect of the outer contour exists or not: when judging that the outer contour structural defect exists, indicating that the outer contour defect detection is successful, and outputting outer contour defect data; when judging that the outer contour structural defect does not exist, indicating that the outer contour defect does not exist, and detecting the inner contour defect;
step 4, selecting SIFT feature angular points: respectively selecting SIFT feature angular points of the template image and the acquired image;
step 5, mapping the characteristic corner points of the acquired image to the characteristic corner points of the template image in an affine transformation mode;
step 6, setting pixels at positions corresponding to the template image as template threshold values, setting pixels at positions corresponding to the acquired image as acquisition threshold values, and settingIs the difference between the acquisition threshold and the template threshold;
step 7, updating pixel points and generating a binary image;
step 8, judging whether the defect area is larger than a defect judgment standard: when the defect area is judged to be larger than the defect judgment standard, the inner contour defect detection is successful, and the inner contour defect data is output; when judging that the defect area is not larger than the defect judging standard, indicating a normal area and generating no defect;
the inner contour defect detection comprises the following specific steps:
firstly, respectively selecting SIFT feature angular points from a rectangular coordinate contour point set of an acquired image target area and a rectangular coordinate contour point set of a template image target area;
step (2), mapping the characteristic corner points of the acquired image to the characteristic corner points of the template image in an affine transformation mode;
step (3), subtracting the threshold value of the acquired image from the threshold value of the template image, wherein the image is a binary image;
and (4) calculating the largest connected region area, and when the largest connected region area is larger than the defect connected region judgment standard, indicating that the defect is the inner contour defect.
2. The method for detecting structural defects of industrial components based on contour features and SVDD according to claim 1, wherein: in the step 2, a ray traversing mode is adopted to emit rays from eight directions of the acquired image to obtain an intersection point with the target area, and a coordinate point set of the contour of the target area of the acquired image is obtained.
3. The method for detecting structural defects of industrial components based on contour features and SVDD according to claim 1, wherein: in the step 2, a ray traversing mode is adopted to emit rays from eight directions of the template image to obtain an intersection point with the target area, and a coordinate point set of the outline of the target area of the template image is obtained.
4. The method for detecting structural defects of industrial components based on contour features and SVDD according to claim 1, wherein: the outer contour defect detection comprises the following specific steps:
the method comprises the steps of firstly, converting a rectangular coordinate contour point set of a template image target area into a polar coordinate point set of the template image target area, and converting a rectangular coordinate contour point set of an acquisition image target area into a polar coordinate point set of the acquisition image target area;
secondly, taking a polar coordinate point set of a template image target area and a polar coordinate point set of a collected image target area as training sets, and training an SVDD classifier;
and thirdly, judging the polar coordinate point set of the template image target area and the polar coordinate point set of the acquired image target area by using an SVDD classifier.
5. The method for detecting structural defects of industrial components based on contour features and SVDD according to claim 4, wherein: when the outer contour has defects, the classification result is no; and when the outer contour has no defect, the classification result is yes.
6. The method for detecting structural defects of industrial components based on contour features and SVDD according to claim 1, wherein: in the subtraction operation of the threshold value of the acquired image and the threshold value of the template image, when the difference value is smaller than a given threshold value, the acquired image is updated to 0; when the difference is greater than a given threshold, the captured image is updated to 255.
CN202310232248.XA 2023-03-13 2023-03-13 Industrial part structural defect detection method based on contour features and SVDD Active CN115953399B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310232248.XA CN115953399B (en) 2023-03-13 2023-03-13 Industrial part structural defect detection method based on contour features and SVDD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310232248.XA CN115953399B (en) 2023-03-13 2023-03-13 Industrial part structural defect detection method based on contour features and SVDD

Publications (2)

Publication Number Publication Date
CN115953399A CN115953399A (en) 2023-04-11
CN115953399B true CN115953399B (en) 2023-08-04

Family

ID=87290943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310232248.XA Active CN115953399B (en) 2023-03-13 2023-03-13 Industrial part structural defect detection method based on contour features and SVDD

Country Status (1)

Country Link
CN (1) CN115953399B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116934746B (en) * 2023-09-14 2023-12-01 常州微亿智造科技有限公司 Scratch defect detection method, system, equipment and medium thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009229197A (en) * 2008-03-21 2009-10-08 Seiko Epson Corp Linear defect detecting method and device
CN101526960B (en) * 2009-04-21 2012-02-08 王鹏 support vector data description shell algorithm
CN106682693A (en) * 2016-12-23 2017-05-17 浙江大学 Identification method for plastic bottle body overlapping image
CN111986190B (en) * 2020-08-28 2022-03-18 哈尔滨工业大学(深圳) Printed matter defect detection method and device based on artifact elimination

Also Published As

Publication number Publication date
CN115953399A (en) 2023-04-11

Similar Documents

Publication Publication Date Title
CN108604301B (en) Keypoint-based point pair features for scalable automatic global registration for large RGB-D scans
Tazir et al. CICP: Cluster Iterative Closest Point for sparse–dense point cloud registration
EP2783328B1 (en) Text detection using multi-layer connected components with histograms
CN110021024B (en) Image segmentation method based on LBP and chain code technology
CN107122737A (en) A kind of road signs automatic detection recognition methods
CN112233116B (en) Concave-convex mark visual detection method based on neighborhood decision and gray level co-occurrence matrix description
WO2012111426A1 (en) Method for representing a shape of an object represented by a set of points
CN108550165A (en) A kind of image matching method based on local invariant feature
CN115953399B (en) Industrial part structural defect detection method based on contour features and SVDD
WO2023024766A1 (en) Object size identification method, readable storage medium and object size identification system
CN115375629A (en) Method for detecting line defect and extracting defect information in LCD screen
CN103077528A (en) Rapid image matching method based on DCCD (Digital Current Coupling)-Laplace and SIFT (Scale Invariant Feature Transform) descriptors
CN110288040B (en) Image similarity judging method and device based on topology verification
US11468609B2 (en) Methods and apparatus for generating point cloud histograms
CN105139013A (en) Object recognition method integrating shape features and interest points
CN114463397A (en) Multi-modal image registration method based on progressive filtering
CN113284158A (en) Image edge extraction method and system based on structural constraint clustering
JP5845139B2 (en) Graphic detection processing apparatus, graphic detection processing method, and graphic detection processing program
Weinmann et al. Point cloud registration
Meierhold et al. Referencing of images to laser scanner data using linear features extracted from digital images and range images
Yıldırım et al. Recognition of Single-Land Countries on Outline Images by Using BAS Feature
Surekha et al. A survey of trends in local invariant feature detectors
Järvinen Configurable pointer meter reader based on computer vision
Zhang et al. Fast image matching algorithm based on affine invariants
Distante et al. Detectors and Descriptors of Interest Points

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