CN117934464B - Defect identification method based on machine vision - Google Patents

Defect identification method based on machine vision Download PDF

Info

Publication number
CN117934464B
CN117934464B CN202410325063.8A CN202410325063A CN117934464B CN 117934464 B CN117934464 B CN 117934464B CN 202410325063 A CN202410325063 A CN 202410325063A CN 117934464 B CN117934464 B CN 117934464B
Authority
CN
China
Prior art keywords
nut
value
image
group
sampling group
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
CN202410325063.8A
Other languages
Chinese (zh)
Other versions
CN117934464A (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.)
Wenzhou Fengyong Intelligent Technology Co ltd
Original Assignee
Wenzhou Fengyong Intelligent 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 Wenzhou Fengyong Intelligent Technology Co ltd filed Critical Wenzhou Fengyong Intelligent Technology Co ltd
Priority to CN202410325063.8A priority Critical patent/CN117934464B/en
Publication of CN117934464A publication Critical patent/CN117934464A/en
Application granted granted Critical
Publication of CN117934464B publication Critical patent/CN117934464B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention belongs to the technical field of machine vision, and particularly relates to a defect identification method based on machine vision, which comprises the steps of obtaining each nut image in a nut sampling group, obtaining characteristic data of each nut based on the nut image, namely obtaining the non-standard rate of the different points of the nut image through the non-standard rate, the different point rate and the non-standard area rate of image subunits in the nut image, completing the nut state identification based on the different point non-standard rate and the pitch deviation value of the nut image, realizing the nut surface value identification from multiple aspects such as the surface state and the feature size of the nut, obtaining the nut surface value group based on the nut surface value, processing the nut surface value group to obtain the surface abnormal base number of the sampling group, and completing the sample group state identification based on the surface abnormal base number of the sampling group.

Description

Defect identification method based on machine vision
Technical Field
The invention relates to the technical field of machine vision, in particular to a defect identification method based on machine vision.
Background
As disclosed in chinese patent publication No. CN113984775A, a device and a method for detecting a nut defect based on machine vision are disclosed, by using a first slide bar, a hydraulic rod, a first connecting plate, a first high-definition camera, a second high-definition camera, an LED lamp, a first motor, a first electric telescopic rod and a clamping plate, so that the nut detection is not required to be completed manually, and meanwhile, the accuracy and quality of the nut detection can be ensured to reach a requirement of uniformity.
In the prior art, the quality detection of a single nut cannot be matched with the processing speed of a nut production line, in the processing process of the nut production line, the nut group is generally subjected to sampling detection, namely, a plurality of nuts are sampled at a time to form a sampling group, and the state of the nuts in the sampling group is identified to finish the identification of the processing state of the nut production line.
Based on the method, the invention provides a defect identification method based on machine vision, wherein the identification of the quality of a sampling group is completed from the identification of the defects of a single nut, and the identification of the nut processing state is completed based on the quality of the sampling group.
Disclosure of Invention
The invention aims to provide a defect identification method based on machine vision, which is characterized in that each nut image in a nut sampling group is obtained, each nut characteristic data is obtained based on the nut image, namely, the non-standard ratio of an image subunit in the nut image, the different point ratio of the non-standard subunit and the non-standard area ratio are used for obtaining the different point non-standard ratio of the nut image, the pitch deviation value of the nut image is obtained through the unit pitch value in the nut image, the nut state is identified based on the different point non-standard ratio and the pitch deviation value of the nut image, the nut surface value is identified from a plurality of aspects such as the surface state and the feature size of the nut, the nut surface value group is obtained based on the nut surface value, the surface abnormal base number of the sampling group is obtained through processing the nut surface abnormal base number of the sampling group, and the state identification of the sampling group is completed based on the surface abnormal base number of the sampling group.
The technical problems solved by the invention are as follows:
The aim of the invention can be achieved by the following technical scheme:
a machine vision-based defect identification method, comprising the steps of:
step one: sampling the nut production line to obtain a nut sampling group, collecting each nut image in the nut sampling group, preprocessing the collected nut images, and extracting nut features of the preprocessed nut images to obtain nut feature data;
step two: processing the nut characteristic data to obtain a nut surface value;
step three: obtaining a nut surface value group of the sampling group based on the nut surface value, obtaining sampling group state data by processing the nut surface value group, and obtaining a surface abnormal base of the sampling group based on the sampling group state data;
The sampling group state data comprises square amplitude variable values of the sampling group, non-constant ratios of the sampling group and deviation product number ratios of the sampling group;
Step four: comparing the surface abnormal base number of the sampling group with a surface abnormal base number threshold value of a preset sampling group to obtain a state signal of the sampling group;
Wherein the status signals of the sampling group comprise sampling normal signals of the sampling group and sampling abnormal signals of the sampling group;
Step five: based on the abnormal signal sampled by the sampling group, the non-constant ratio of the sampling group is obtained, and the nut processing equipment and the nut shape are identified based on the non-constant ratio of the sampling group, so that the state of the nut processing equipment is evaluated.
As a further scheme of the invention: in the second step, the nut characteristic data comprise the abnormal point nonstandard total rate of the nut image and the pitch deviation value of the nut image;
Marking the total non-standard rate of the different points of the nut image as Fi;
the pitch deviation value of the nut image is recorded as Ji;
I.e. by the formula A nut surface value FJ is calculated for each nut, wherein,Is a preset proportionality coefficient.
As a further scheme of the invention: the nut image comprises a nut front image, a nut back image, a nut left side image and a nut right side image;
Acquiring different point nonstandard rates of a nut image of a nut front image, a nut back image, a nut left side image and a nut right side image;
and summing the non-standard rates of the different points of the four face nut images to obtain the total non-standard rate of the different points of the nut images.
As a further scheme of the invention: dividing the front image of the nut into a plurality of image subunits along the axial direction, and identifying different points in each image subunit;
Marking the image sub-unit with the abnormal point in the image sub-unit as a non-standard sub-unit, and marking the image sub-unit without the abnormal point in the image sub-unit as a nuclear standard sub-unit;
calculating the ratio of the number of the non-standard subunits to the total number of the image subunits to obtain the non-standard ratio of the image subunits;
Calculating the ratio of the number of the abnormal points in the non-standard subunit to the area value of the non-standard subunit to obtain the abnormal point ratio of the non-standard subunit;
marking the different point ratio of the non-standard subunit corresponding to the maximum value as a first non-standard subunit;
The outlier ratio of the non-standard subunit corresponding to the minimum value is marked as a second non-standard subunit;
Connecting the first non-standard subunit with the second non-standard subunit to obtain a non-marking line of the non-standard subunit;
taking the midpoint of the non-marked line as a circle center and the length of the non-marked line as a radius, and making a non-marked circle;
Acquiring an overlapping area of a non-standard circle and an image subunit, and marking the overlapping area as a non-standard overlapping area;
Acquiring the area of the non-standard overlapping area, and calculating the ratio of the area of the non-standard overlapping area to the total area of the image subunit to obtain the non-standard area ratio;
Weighting the nonstandard ratio of the image subunit, the abnormal point ratio of the nonstandard subunit and the nonstandard area ratio to obtain the abnormal point nonstandard rate of the nut image;
The method comprises the steps of obtaining a front image of a nut, a back image of the nut, a left side image of the nut and a right side image of the nut, wherein the different point nonstandard rate of the nut image is completely consistent.
As a further scheme of the invention: dividing a front image of the nut into a plurality of image subunits along the axial direction;
Obtaining a pitch value of the middle position of the image subunit, and marking the pitch value as a front pitch value;
processing the back side image, the left side image and the right side image of the nut according to the processing mode of the front side image of the nut to obtain a back side screw pitch value, a left side screw pitch value and a right side screw pitch value;
summing the front pitch value, the back pitch value, the left side pitch value and the right side pitch value which belong to the same image subunit, and obtaining the average value to obtain the unit pitch value of the image subunit;
Performing difference calculation on the unit pitch value of the image subunit and the unit pitch standard value of the image subunit to obtain a pitch deviation value of the image subunit;
The unit pitch standard value of the image subunit is preset;
And performing difference calculation on the maximum value and the minimum value in the pitch deviation values of all the image subunits to obtain the pitch deviation value of the nut image.
As a further scheme of the invention: in the third step, the acquisition process of the surface anomaly base number of the sampling group is as follows:
the square amplitude variable value of the sampling group is recorded as Bi;
the non-fixed ratio of the sampling group is marked as Ci;
the deviation product number ratio of the sampling group is recorded as Gi;
By the formula And calculating to obtain the surface anomaly base BGC of the sampling group, wherein d1, d2 and d3 are all preset proportionality coefficients.
As a further scheme of the invention: the square amplitude variable value of the sampling group is obtained by the following steps:
Calculating the nut surface value group of the sampling group according to a variance calculation formula to obtain a surface variance value Ba of the nut surface value group;
Obtaining a difference value between a maximum value in the nut surface value group and a minimum value in the nut surface value group, recording the difference value as a nut surface difference value, and carrying out ratio calculation on the nut surface difference value and a nut surface value threshold value to obtain a nut surface difference value ratio Bc;
I.e. by the formula Calculating to obtain square amplitude variable Bi of the sampling group, wherein d1 and d2 are preset proportionality coefficients, d1 is more than 0, and d2 is more than 0;
The non-constant ratio acquisition process of the sampling group is as follows:
the surface value of the nut is larger than or equal to the surface value threshold value of the nut, and the nut is marked as an indefinite nut;
the surface value of the nut is less than the surface value threshold value of the nut, and the nut is marked as a verification nut;
Calculating the ratio of the number of the non-fixed nuts to the total number of the nuts in the sampling group to obtain a non-fixed ratio Ci of the sampling group;
the acquisition process of the deviation product number ratio of the sampling group comprises the following steps:
and calculating the ratio of the non-fixed deviation product number of the sampling group to the nuclear fixed deviation product number of the sampling group to obtain the deviation product number ratio Gi of the sampling group.
As a further scheme of the invention: presetting a surface anomaly base threshold BGC of the sample group, and comparing the surface anomaly base BGC of the sample group with the surface anomaly base threshold BGC of the sample group;
when the surface abnormal base BGC of the sampling group is smaller than the surface abnormal base threshold BGC of the sampling group, the whole sampling result of the nut in the sampling group is good, and a sampling normal signal of the sampling group is generated;
when the surface anomaly base BGC of the sampling group is more than or equal to the surface anomaly base threshold BGC of the sampling group, the result of the whole spot check of the nut in the sampling group is poor, and a sampling anomaly signal of the sampling group is generated.
As a further scheme of the invention: sampling the abnormal signal based on the sampling group;
Obtaining a non-constant ratio of a sampling group;
if the non-constant ratio of the sampling group is within the non-constant ratio preset range of the sampling group, the nut processing equipment is indicated to process normally, and a normal operation signal of the nut processing equipment is generated;
If the non-constant ratio of the sampling group exceeds the non-constant ratio preset range of the preset sampling group, obtaining a non-constant nut in the sampling group to obtain a non-constant nut group;
Checking the shape of each indefinite nut in the indefinite nut group;
obtaining defective nuts of the inner body of the non-fixed nut group, marking the defective nuts as defective nuts, and obtaining the number of the defective nuts;
calculating the ratio of the number of defective nuts to the number of nuts in the non-fixed nut group to obtain the ratio of the defective nuts to the non-fixed nut group;
If the residual ratio of the non-fixed nut group is within the residual ratio range of the preset non-fixed nut group, the abnormal processing of the nut processing equipment is indicated, and an abnormal operation signal of the nut processing equipment is generated;
If the residual ratio of the non-fixed nut group exceeds the residual ratio range of the preset non-fixed nut group, the residual ratio of the residual nut in the non-fixed nut group is represented to be more, and a nut processing equipment operation verification signal is generated.
As a further scheme of the invention: based on the nut machining equipment operation verification signal;
acquiring the surface values of all the verification nuts in the sampling group;
establishing a plane coordinate system, wherein an X axis is taken as time, and a Y axis is taken as a nut surface value;
drawing points of the surface values of the nuts of the verification nuts in a plane coordinate system according to the processing time sequence, and sequentially connecting the surface value points of the nuts corresponding to all the verification nuts in the coordinate system from left to right by using a smooth curve to obtain a surface value standard curve of the verification nuts;
If the standard curve of the surface value of the nut is verified to be linear and gradually increased in the plane coordinate system, the abnormal processing of the nut processing equipment is indicated, and an abnormal operation signal of the nut processing equipment is generated;
if the standard curve of the surface value of the nut is verified to be linear and gradually reduced in the plane coordinate system, the normal processing of the nut processing equipment is indicated, and a normal operation signal of the nut processing equipment is generated;
and if the standard curve of the surface value of the verification nut is nonlinear in the plane coordinate system and fluctuates in the preset interval, the normal processing of the nut processing equipment is indicated, and a normal operation signal of the nut processing equipment is generated.
The invention has the beneficial effects that:
(1) According to the invention, each nut image in the nut sampling group is obtained based on the nut image, namely, the non-standard ratio, the different point ratio and the non-standard area ratio of the image subunits in the nut image are used for obtaining the different point non-standard ratio of the nut image, then the pitch deviation value of the nut image is used for completing the nut state identification based on the different point non-standard ratio and the pitch deviation value of the nut image, so that the identification of the nut surface value from multiple aspects such as the surface state, the physical dimension and the like of the nut is realized, and the accuracy is high;
(2) The invention obtains nut surface values of all nuts in the sampling group to obtain a nut surface value group of the sampling group, obtains square amplitude variable values of the sampling group, non-fixed ratio of the sampling group and deviation product number ratio of the sampling group by processing the nut surface value group, completes the acquisition of surface abnormal base number of the sampling group based on the square amplitude variable values of the sampling group, the non-fixed ratio of the sampling group and the deviation product number ratio of the sampling group, and completes the identification of the state of the sampling group by the surface abnormal base number of the sampling group;
(3) The invention obtains the non-fixed ratio of the sampling group based on the sampling group of the sampling abnormal signal, completes the identification of the state of the nut processing equipment by combining the identification of the non-fixed ratio of the sampling group and the judgment of the shape of the nut, thereby realizing the judgment of the processing state of the nut processing equipment by the sampling group of the abnormal signal, further judging whether the nut abnormality in the sampling group is caused by the processing abnormality of the processing equipment or the defect of the nut body.
Drawings
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a flow chart of a machine vision-based defect identification method in an embodiment of the present invention;
FIG. 2 is a flow chart of nut classification in a machine vision-based defect identification method in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of sample group classification in a machine vision based defect recognition method in accordance with an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, the present invention is a defect identifying method based on machine vision, comprising the following steps:
step one: sampling the nut production line to obtain a nut sampling group, collecting each nut image in the nut sampling group, preprocessing the collected nut images, and extracting nut features of the preprocessed nut images to obtain nut feature data;
step two: processing the nut characteristic data to obtain a nut surface value;
step three: obtaining a nut surface value group of the sampling group based on the nut surface value, obtaining sampling group state data by processing the nut surface value group, and obtaining a surface abnormal base of the sampling group based on the sampling group state data;
The sampling group state data comprises square amplitude variable values of the sampling group, non-constant ratios of the sampling group and deviation product number ratios of the sampling group;
Step four: comparing the surface abnormal base number of the sampling group with a surface abnormal base number threshold value of a preset sampling group to obtain a state signal of the sampling group;
Wherein the status signals of the sampling group comprise sampling normal signals of the sampling group and sampling abnormal signals of the sampling group;
Step five: based on the abnormal signal sampled by the sampling group, the non-constant ratio of the sampling group is obtained, and the nut processing equipment and the nut shape are identified based on the non-constant ratio of the sampling group, so that the state of the nut processing equipment is evaluated.
In the first step, the nut image is acquired through a camera or a scanner and other devices;
In the first step, as the acquired nut image may have noise, illumination non-uniformity and other problems, the preprocessing of the nut image includes filtering, denoising and contrast enhancement;
In step one, computer vision algorithms including, but not limited to, edge detection and corner detection are acquired for feature extraction in the nut image.
The nut image comprises a front image of the nut, a back image of the nut, a left side image of the nut and a right side image of the nut;
Respectively acquiring different point nonstandard rates of a nut image of a nut front image, a nut back image, a nut left side image and a nut right side image;
Summing the non-standard rates of the different points of the nut images of the four planes to obtain a total non-standard rate of the different points of the nut images;
the method comprises the steps that a front image of a nut, a back image of the nut, a left side image of the nut and a right side image of the nut are completely consistent in a mode of obtaining abnormal point nonstandard rate of the nut image;
in this embodiment, taking a front image of a nut as an example, specific:
Dividing the front image of the nut into a plurality of image subunits along the axial direction, and identifying different points in each image subunit;
Wherein, the abnormal points include but are not limited to concave points, convex points, defect points and defect points which affect the quality of the nut;
Marking the image sub-unit with the abnormal point in the image sub-unit as a non-standard sub-unit, and marking the image sub-unit without the abnormal point in the image sub-unit as a nuclear standard sub-unit;
The number of non-standard subunits is obtained, the ratio of the number of the non-standard subunits to the total number of the image subunits is calculated, and the non-standard ratio of the image subunits is obtained:
The method comprises the steps of obtaining the number of abnormal points in each non-standard subunit and the area value of the non-standard subunit, and carrying out ratio calculation on the number of abnormal points in the non-standard subunit and the area value of the non-standard subunit to obtain the abnormal point ratio of the non-standard subunit;
marking the different point ratio of the non-standard subunit corresponding to the maximum value as a first non-standard subunit;
The outlier ratio of the non-standard subunit corresponding to the minimum value is marked as a second non-standard subunit;
Connecting the first non-standard subunit with the second non-standard subunit to obtain a non-marking line of the non-standard subunit;
taking the midpoint of the non-marked line as a circle center and the length of the non-marked line as a radius, and making a non-marked circle;
Acquiring an overlapping area of a non-standard circle and an image subunit, and marking the overlapping area as a non-standard overlapping area;
Acquiring the area of the non-standard overlapping area, and calculating the ratio of the area of the non-standard overlapping area to the total area of the image subunit to obtain the non-standard area ratio;
Weighting the nonstandard ratio of the image subunit, the abnormal point ratio of the nonstandard subunit and the nonstandard area ratio to obtain the abnormal point nonstandard rate of the nut image;
In one particular embodiment: marking the non-mark ratio of the image subunit as F1, marking the abnormal point ratio of the non-mark bullet circle as F2 and marking the non-mark area ratio as F3;
The method comprises the steps of distributing the weight ratio of a non-standard ratio F1 of an image subunit to be F1, distributing the weight ratio of a different point ratio F2 of a non-standard sub-circle to be F2, and distributing the weight ratio of a non-standard area ratio F3 to be F3;
According to the formula Calculating to obtain the abnormal point non-standard rate Fi of the nut image, wherein f1+f2+f3=1, and f3, f2 and f1 are all larger than 0;
Dividing a front image of the nut into a plurality of image subunits along the axial direction;
Obtaining a pitch value of the middle position of the image subunit, and marking the pitch value as a front pitch value;
processing the back side image, the left side image and the right side image of the nut according to the processing mode of the front side image of the nut to obtain a back side screw pitch value, a left side screw pitch value and a right side screw pitch value;
summing the front pitch value, the back pitch value, the left side pitch value and the right side pitch value which belong to the same image subunit, and obtaining the average value to obtain the unit pitch value of the image subunit;
Performing difference calculation on the unit pitch value of the image subunit and the unit pitch standard value of the image subunit to obtain a pitch deviation value of the image subunit;
The unit pitch standard value of the image subunit is preset and is obtained by staff according to experience;
Performing difference calculation on the maximum value and the minimum value in the pitch deviation values of all the image subunits to obtain a pitch deviation value Ji of the nut image;
processing the abnormal point nonstandard rate Fi of the nut image and the pitch deviation value Ji of the nut image, namely, through a formula Calculating a nut surface value FJ for each nut, wherein/>Is a preset proportionality coefficient;
Wherein, The acquisition process of (1) is as follows: m groups of history data exist, wherein each group of history data comprises a different point nonstandard rate Fi of a nut image, a pitch deviation value Ji of the nut image and a nut surface value FJ;
And fitting the m groups of historical data by adopting a linear model, and taking the prepared historical data into a selected fitting model for fitting to obtain the average value of the fitting coefficients as a preset proportionality coefficient k.
Example 2
Referring to fig. 2-3, based on the nut surface value of each nut in the sample group, the overall state of the sample group is identified, specifically:
acquiring the nut surface values of all nuts in the sampling group to obtain a nut surface value group of the sampling group;
calculating the nut surface value group of the sampling group according to a variance calculation formula to obtain a surface variance value of the nut surface value group;
obtaining the difference between the maximum value in the nut surface value group and the minimum value in the nut surface value group, and marking the difference as the nut surface difference;
Calculating the ratio of the nut surface difference value to the nut surface value threshold value to obtain a nut surface difference value ratio;
The surface variance value of the nut surface value group is marked as Ba, and the nut surface variance value ratio is marked as Bc;
I.e. by the formula Calculating to obtain square amplitude variable Bi of the sampling group, wherein d1 and d2 are preset proportionality coefficients, d1 is more than 0, and d2 is more than 0;
the nut surface value threshold is preset by staff according to experience;
comparing the nut surface values for all nuts in the sample set with a nut surface value threshold;
If the surface value of the nut is more than or equal to the surface value threshold value of the nut, marking the nut as an indefinite nut;
If the surface value of the nut is less than the surface value threshold value of the nut, marking the nut as a verification nut;
Obtaining the number of the non-fixed nuts, and calculating the ratio of the number of the non-fixed nuts to the total number of the nuts in the sampling group to obtain the non-fixed ratio Ci of the sampling group;
Performing difference processing on the nut surface values of all the verification nuts in the sampling group and the nut surface value threshold value respectively, and summing the obtained difference values after taking absolute values to obtain the verification deviation product number of the sampling group;
Respectively carrying out difference processing on nut surface values of all the non-fixed nuts in the sampling group and a nut surface value threshold value, taking an absolute value of the obtained difference value, and then summing to obtain the non-fixed deviation product number of the sampling group;
calculating the ratio of the non-fixed deviation product number of the sampling group to the nuclear fixed deviation product number of the sampling group to obtain the deviation product number ratio Gi of the sampling group;
By the formula Calculating to obtain a surface abnormal base BGC of the sampling group, wherein d1, d2 and d3 are preset proportionality coefficients;
according to the BGC formula for obtaining the surface anomaly base number of the sampling group, the more the non-constant ratio of the sampling group is close to 1, the more the surface anomaly base number of the sampling group is increased; the larger the square amplitude variable value of the sampling group and the deviation product number ratio of the sampling group is, the larger the surface abnormal base number of the obtained sampling group is;
presetting a surface anomaly base threshold BGC of the sample group, and comparing the surface anomaly base BGC of the sample group with the surface anomaly base threshold BGC of the sample group;
when the surface abnormal base BGC of the sampling group is smaller than the surface abnormal base threshold BGC of the sampling group, the whole sampling result of the nut in the sampling group is good, and a sampling normal signal of the sampling group is generated;
when the surface anomaly base BGC of the sampling group is more than or equal to the surface anomaly base threshold BGC of the sampling group, the result of the whole spot check of the nut in the sampling group is poor, and a sampling anomaly signal of the sampling group is generated.
Example 3
Based on the embodiment 2, based on the sampling abnormal signal of the sampling group, the nut processing equipment and the shape of the nut are identified, specifically:
Obtaining a non-constant ratio of a sampling group;
if the non-constant ratio of the sampling group is within the non-constant ratio preset range of the sampling group, the nut processing equipment is indicated to process normally, and a normal operation signal of the nut processing equipment is generated;
If the non-constant ratio of the sampling group exceeds the non-constant ratio preset range of the preset sampling group, obtaining a non-constant nut in the sampling group to obtain a non-constant nut group;
Checking the shape of each indefinite nut in the indefinite nut group;
The shape inspection of the non-stationary nut includes inspection of the size (length, diameter) and state (cracks) of the non-stationary nut;
obtaining defective nuts of the inner body of the non-fixed nut group, marking the defective nuts as defective nuts, and obtaining the number of the defective nuts;
calculating the ratio of the number of defective nuts to the number of nuts in the non-fixed nut group to obtain the ratio of the defective nuts to the non-fixed nut group;
If the residual ratio of the non-fixed nut group is within the residual ratio range of the preset non-fixed nut group, the abnormal processing of the nut processing equipment is indicated, and an abnormal operation signal of the nut processing equipment is generated;
If the residual ratio of the non-fixed nut group exceeds the residual ratio range of the preset non-fixed nut group, the residual ratio of the residual nut in the non-fixed nut group is represented to be more, and a nut processing equipment operation verification signal is generated;
Example 4
Based on the embodiment 3, based on the nut processing equipment operation verification signal, the state of the nut processing equipment is verified, and the degree of abnormality of the nut processing equipment in an abnormal state is evaluated, specifically:
acquiring the surface values of all the verification nuts in the sampling group;
establishing a plane coordinate system, wherein an X axis is taken as time, and a Y axis is taken as a nut surface value;
drawing points of the surface values of the nuts of the verification nuts in a plane coordinate system according to the processing time sequence, and sequentially connecting the surface value points of the nuts corresponding to all the verification nuts in the coordinate system from left to right by using a smooth curve to obtain a surface value standard curve of the verification nuts;
If the standard curve of the surface value of the nut is verified to be linear and gradually increased in the plane coordinate system, the abnormal processing of the nut processing equipment is indicated, and an abnormal operation signal of the nut processing equipment is generated;
if the standard curve of the surface value of the nut is verified to be linear and gradually reduced in the plane coordinate system, the normal processing of the nut processing equipment is indicated, and a normal operation signal of the nut processing equipment is generated;
and if the standard curve of the surface value of the verification nut is nonlinear in the plane coordinate system and fluctuates in the preset interval, the normal processing of the nut processing equipment is indicated, and a normal operation signal of the nut processing equipment is generated.
Operating an abnormal signal based on the nut processing equipment;
Acquiring a to-be-monitored verification component in the nut processing equipment, acquiring behavior items to be monitored of the verification component, acquiring real-time behavior data of the corresponding behavior items of the verification component in a sampling group processing period, calling a preset data requirement of the corresponding behavior items, and marking the behavior items of which the real-time behavior data do not meet the preset numerical requirement as dangerous items;
acquiring real-time behavior data of dangerous items, wherein the real-time behavior data are compared with dangerous offset values required by corresponding preset data;
performing product calculation on the dangerous deviation value of the dangerous item and a corresponding preset risk coefficient to obtain a risk behavior value;
summing the risk behavior values of all the risk items to obtain a risk behavior total value of the verification component;
the values of the preset risk coefficients are all larger than zero, and are recorded in advance by a manager and stored in the processor, and the larger the values of the preset risk coefficients are, the larger the influence of deviation of corresponding risk items on the operation abnormality of the nut processing equipment is indicated;
Calculating the ratio of the number of dangerous items of the verification part to the number of behavior items of the verification part to obtain the dangerous rate of the verification part;
Calculating the product of the risk rate of the verification component and the total risk behavior value of the verification component to obtain an abnormal risk value of the verification component;
calculating the ratio of the abnormal risk value of the verification component to the abnormal risk threshold value of the verification component to obtain the abnormal risk ratio of the verification component;
wherein the abnormal risk threshold of the verification component is an empirical value preset by a worker;
Summing the abnormal risk ratios of all the verification components to obtain a total abnormal risk value of the nut processing equipment;
Comparing the total abnormal risk value of the nut processing equipment with a preset control range in a numerical value manner, and if the total abnormal risk value of the nut processing equipment exceeds the maximum value of the preset control range, indicating that the abnormality degree of the nut processing equipment is high;
If the total abnormal risk value of the nut processing equipment is within the preset control range, the abnormal degree of the nut processing equipment is moderate;
if the total abnormal risk value of the nut processing equipment is smaller than the minimum value of the preset control range, the abnormal degree of the nut processing equipment is low;
thereby completing the recognition of the abnormal degree of the nut processing equipment and completing the visual management of the nut processing equipment.
Wherein, the effective components to be monitored of the nut processing equipment include, but are not limited to, a main shaft, a cutter, a hydraulic system, a lubrication system and an electrical system;
The behavior items required to be monitored of the test part include, but are not limited to, spindle rotation speed, feeding speed, cutting force, oil pressure, current, voltage, coolant flow and pressure, the behavior items required to be monitored are determined according to the corresponding use situation of the test part, the content of the behavior items are generated by the body of the test part when the test part works, and the spindle rotation speed and the feeding speed included by the behavior items are the actual spindle rotation speed and the actual feeding speed when the test part works.
One of the core points of the present invention is: acquiring each nut image in the nut sampling group, acquiring characteristic data of each nut based on the nut image, namely acquiring the abnormal point nonstandard rate of the nut image through the nonstandard ratio, the abnormal point ratio and the nonstandard area ratio of the image subunit in the nut image, and completing the recognition of the nut state based on the abnormal point nonstandard rate and the pitch deviation value of the nut image through the pitch deviation value of the unit pitch value in the nut image, so as to realize the completion of the recognition of the nut surface value from multiple aspects such as the surface state, the physical size and the like of the nut, and the accuracy is high;
one of the core points of the present invention is: the method comprises the steps of obtaining nut surface values of all nuts in a sampling group to obtain a nut surface value group of the sampling group, processing the nut surface value group to obtain a square amplitude variable value of the sampling group, an irregular ratio of the sampling group and a deviation product number ratio of the sampling group, and completing obtaining of a surface abnormal base number of the sampling group based on the square amplitude variable value of the sampling group, the irregular ratio of the sampling group and the deviation product number ratio of the sampling group, and completing identification of a state of the sampling group through the surface abnormal base number of the sampling group;
One of the core points of the present invention is: the method comprises the steps of obtaining an indefinite ratio of a sampling group for sampling abnormal signals, completing the identification of the state of nut processing equipment by combining the identification of the indefinite ratio of the sampling group and the judgment of the shape of the nut, thereby realizing the judgment of the processing state of the nut processing equipment by the sampling group for sampling the abnormal signals, and further judging whether the nut abnormality in the sampling group is caused by the processing abnormality of the processing equipment or the defect of the nut body;
During the judging process of the nut processing equipment, the processing state of the nut can be evaluated at the later stage of the nut processing equipment based on the processing result of the current nut processing equipment;
One of the core points of the present invention is: the method is characterized in that based on the abnormal running signal of the nut processing equipment, the running state of a verification part to be monitored in the running process of the nut processing equipment is detected, so that the abnormal grade of the nut processing equipment is identified, and the visual management of the nut processing equipment is completed.
The foregoing describes one embodiment of the present invention in detail, but the description is only a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. All equivalent changes and modifications within the scope of the present invention are intended to be covered by the present invention.

Claims (4)

1. The defect identification method based on machine vision is characterized by comprising the following steps of:
step one: sampling a plurality of nuts to obtain a nut sampling group, collecting each nut image in the nut sampling group, preprocessing the collected nut images, and extracting nut features of the preprocessed nut images to obtain nut feature data;
step two: processing the nut characteristic data to obtain a nut surface value;
step three: obtaining a nut surface value group of the sampling group based on the nut surface value, obtaining sampling group state data by processing the nut surface value group, and obtaining a surface abnormal base of the sampling group based on the sampling group state data;
The sampling group state data comprises square amplitude variable values of the sampling group, non-constant ratios of the sampling group and deviation product number ratios of the sampling group;
Step four: comparing the surface abnormal base number of the sampling group with a surface abnormal base number threshold value of a preset sampling group to obtain a state signal of the sampling group;
Wherein the status signals of the sampling group comprise sampling normal signals of the sampling group and sampling abnormal signals of the sampling group;
Step five: based on the abnormal signal sampled by the sampling group, obtaining the non-constant ratio of the sampling group, and based on the non-constant ratio of the sampling group, completing the identification of the nut processing equipment and the nut shape, thereby realizing the evaluation of the state of the nut processing equipment;
in the second step, the nut characteristic data comprise the abnormal point nonstandard total rate of the nut image and the pitch deviation value of the nut image;
Marking the total non-standard rate of the different points of the nut image as Fi;
the pitch deviation value of the nut image is recorded as Ji;
I.e. by the formula Calculating a nut surface value FJ for each nut, wherein/>Is a preset proportionality coefficient;
the nut image comprises a nut front image, a nut back image, a nut left side image and a nut right side image;
Acquiring different point nonstandard rates of a nut image of a nut front image, a nut back image, a nut left side image and a nut right side image;
Summing the non-standard rates of the different points of the four face nut images to obtain a total non-standard rate of the different points of the nut images;
Dividing the front image of the nut into a plurality of image subunits along the axial direction, and identifying different points in each image subunit;
Marking the image sub-unit with the abnormal point in the image sub-unit as a non-standard sub-unit, and marking the image sub-unit without the abnormal point in the image sub-unit as a nuclear standard sub-unit;
calculating the ratio of the number of the non-standard subunits to the total number of the image subunits to obtain the non-standard ratio of the image subunits;
Calculating the ratio of the number of the abnormal points in the non-standard subunit to the area value of the non-standard subunit to obtain the abnormal point ratio of the non-standard subunit;
marking the different point ratio of the non-standard subunit corresponding to the maximum value as a first non-standard subunit;
The outlier ratio of the non-standard subunit corresponding to the minimum value is marked as a second non-standard subunit;
Connecting the first non-standard subunit with the second non-standard subunit to obtain a non-marking line of the non-standard subunit;
taking the midpoint of the non-marked line as a circle center and the length of the non-marked line as a radius, and making a non-marked circle;
Acquiring an overlapping area of a non-standard circle and an image subunit, and marking the overlapping area as a non-standard overlapping area;
Acquiring the area of the non-standard overlapping area, and calculating the ratio of the area of the non-standard overlapping area to the total area of the image subunit to obtain the non-standard area ratio;
Weighting the nonstandard ratio of the image subunit, the abnormal point ratio of the nonstandard subunit and the nonstandard area ratio to obtain the abnormal point nonstandard rate of the nut image;
the method comprises the steps that a front image of a nut, a back image of the nut, a left side image of the nut and a right side image of the nut are completely consistent in a mode of obtaining abnormal point nonstandard rate of the nut image;
Dividing a front image of the nut into a plurality of image subunits along the axial direction;
Obtaining a pitch value of the middle position of the image subunit, and marking the pitch value as a front pitch value;
processing the back side image, the left side image and the right side image of the nut according to the processing mode of the front side image of the nut to obtain a back side screw pitch value, a left side screw pitch value and a right side screw pitch value;
summing the front pitch value, the back pitch value, the left side pitch value and the right side pitch value which belong to the same image subunit, and obtaining the average value to obtain the unit pitch value of the image subunit;
Performing difference calculation on the unit pitch value of the image subunit and the unit pitch standard value of the image subunit to obtain a pitch deviation value of the image subunit;
The unit pitch standard value of the image subunit is preset;
Performing difference calculation on the maximum value and the minimum value in the pitch deviation values of all the image subunits to obtain a pitch deviation value of the nut image;
in the third step, the acquisition process of the surface anomaly base number of the sampling group is as follows:
the square amplitude variable value of the sampling group is recorded as Bi;
the non-fixed ratio of the sampling group is marked as Ci;
the deviation product number ratio of the sampling group is recorded as Gi;
By the formula Calculating to obtain a surface abnormal base BGC of the sampling group, wherein d1, d2 and d3 are preset proportionality coefficients;
the square amplitude variable value of the sampling group is obtained by the following steps:
Calculating the nut surface value group of the sampling group according to a variance calculation formula to obtain a surface variance value Ba of the nut surface value group;
Obtaining a difference value between a maximum value in the nut surface value group and a minimum value in the nut surface value group, recording the difference value as a nut surface difference value, and carrying out ratio calculation on the nut surface difference value and a nut surface value threshold value to obtain a nut surface difference value ratio Bc;
I.e. by the formula Calculating to obtain square amplitude variable Bi of the sampling group, wherein d1 and d2 are preset proportionality coefficients, d1 is more than 0, and d2 is more than 0;
The non-constant ratio acquisition process of the sampling group is as follows:
the surface value of the nut is larger than or equal to the surface value threshold value of the nut, and the nut is marked as an indefinite nut;
the surface value of the nut is less than the surface value threshold value of the nut, and the nut is marked as a verification nut;
Calculating the ratio of the number of the non-fixed nuts to the total number of the nuts in the sampling group to obtain a non-fixed ratio Ci of the sampling group;
the acquisition process of the deviation product number ratio of the sampling group comprises the following steps:
and calculating the ratio of the non-fixed deviation product number of the sampling group to the nuclear fixed deviation product number of the sampling group to obtain the deviation product number ratio Gi of the sampling group.
2. The machine vision based defect identification method of claim 1, wherein a surface anomaly base threshold BGC for the sample group is preset, and the surface anomaly base BGC for the sample group is compared with the surface anomaly base threshold BGC for the sample group;
when the surface abnormal base BGC of the sampling group is smaller than the surface abnormal base threshold BGC of the sampling group, the whole sampling result of the nut in the sampling group is good, and a sampling normal signal of the sampling group is generated;
when the surface anomaly base BGC of the sampling group is more than or equal to the surface anomaly base threshold BGC of the sampling group, the result of the whole spot check of the nut in the sampling group is poor, and a sampling anomaly signal of the sampling group is generated.
3. The machine vision based defect identification method of claim 2, wherein the anomaly signal is sampled based on a sampling group;
Obtaining a non-constant ratio of a sampling group;
if the non-constant ratio of the sampling group is within the non-constant ratio preset range of the sampling group, the nut processing equipment is indicated to process normally, and a normal operation signal of the nut processing equipment is generated;
If the non-constant ratio of the sampling group exceeds the non-constant ratio preset range of the preset sampling group, obtaining a non-constant nut in the sampling group to obtain a non-constant nut group;
Checking the shape of each indefinite nut in the indefinite nut group;
obtaining defective nuts of the inner body of the non-fixed nut group, marking the defective nuts as defective nuts, and obtaining the number of the defective nuts;
calculating the ratio of the number of defective nuts to the number of nuts in the non-fixed nut group to obtain the ratio of the defective nuts to the non-fixed nut group;
If the residual ratio of the non-fixed nut group is within the residual ratio range of the preset non-fixed nut group, the abnormal processing of the nut processing equipment is indicated, and an abnormal operation signal of the nut processing equipment is generated;
If the residual ratio of the non-fixed nut group exceeds the residual ratio range of the preset non-fixed nut group, the residual ratio of the residual nut in the non-fixed nut group is represented to be more, and a nut processing equipment operation verification signal is generated.
4.A machine vision based defect identification method as defined in claim 3, wherein the machine vision based defect identification method is based on a nut tooling machine operation verification signal;
acquiring the surface values of all the verification nuts in the sampling group;
establishing a plane coordinate system, wherein an X axis is taken as time, and a Y axis is taken as a nut surface value;
drawing points of the surface values of the nuts of the verification nuts in a plane coordinate system according to the processing time sequence, and sequentially connecting the surface value points of the nuts corresponding to all the verification nuts in the coordinate system from left to right by using a smooth curve to obtain a surface value standard curve of the verification nuts;
If the standard curve of the surface value of the nut is verified to be linear and gradually increased in the plane coordinate system, the abnormal processing of the nut processing equipment is indicated, and an abnormal operation signal of the nut processing equipment is generated;
if the standard curve of the surface value of the nut is verified to be linear and gradually reduced in the plane coordinate system, the normal processing of the nut processing equipment is indicated, and a normal operation signal of the nut processing equipment is generated;
and if the standard curve of the surface value of the verification nut is nonlinear in the plane coordinate system and fluctuates in the preset interval, the normal processing of the nut processing equipment is indicated, and a normal operation signal of the nut processing equipment is generated.
CN202410325063.8A 2024-03-21 2024-03-21 Defect identification method based on machine vision Active CN117934464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410325063.8A CN117934464B (en) 2024-03-21 2024-03-21 Defect identification method based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410325063.8A CN117934464B (en) 2024-03-21 2024-03-21 Defect identification method based on machine vision

Publications (2)

Publication Number Publication Date
CN117934464A CN117934464A (en) 2024-04-26
CN117934464B true CN117934464B (en) 2024-06-14

Family

ID=90763427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410325063.8A Active CN117934464B (en) 2024-03-21 2024-03-21 Defect identification method based on machine vision

Country Status (1)

Country Link
CN (1) CN117934464B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113160114A (en) * 2021-01-29 2021-07-23 珠海迪沃航空工程有限公司 Dynamic image identification method and system for bolt detection
WO2022118294A1 (en) * 2020-12-04 2022-06-09 Attolight AG Dislocation type and density discrimination in semiconductor materials using cathodoluminescence measurements

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000065123A (en) * 1996-04-30 2000-11-06 안자키 사토루 Tool error detection method and apparatus of machine tool
CN104597517A (en) * 2015-01-26 2015-05-06 上汽通用五菱汽车股份有限公司 Rivet nut detection device
CN109142374A (en) * 2018-08-15 2019-01-04 广州市心鉴智控科技有限公司 Method and system based on the efficient Checking model of extra small sample training
US20230107092A1 (en) * 2020-02-27 2023-04-06 Lm Wind Power A/S System and method for monitoring wind turbine rotor blades using infrared imaging and machine learning
CN113984775A (en) * 2021-10-28 2022-01-28 苏州市蓝皓计算机科技有限公司 Nut defect detection device and method based on machine vision
CN114202470A (en) * 2021-11-12 2022-03-18 江苏核电有限公司 Three-dimensional reconstruction and automatic defect identification method for main bolt hole threads of pressure vessel
CN114937004B (en) * 2022-04-28 2024-01-02 烟台大视工业智能科技有限公司 Method for detecting surface air hole defects of mechanical part based on computer vision
CN114663662B (en) * 2022-05-23 2022-09-09 深圳思谋信息科技有限公司 Hyper-parameter searching method, device, computer equipment and storage medium
CN115272229A (en) * 2022-07-27 2022-11-01 清华大学 Abnormal visual image detection method and device under category imbalance condition
CN117407823B (en) * 2023-12-14 2024-03-15 长春泰坦斯科技有限公司 Method and system for preventing error in bolt tightening based on vision-aided positioning
CN117633490B (en) * 2024-01-24 2024-03-22 贵州大学 Data management system and method for analyzing sow reproductive efficiency

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022118294A1 (en) * 2020-12-04 2022-06-09 Attolight AG Dislocation type and density discrimination in semiconductor materials using cathodoluminescence measurements
CN113160114A (en) * 2021-01-29 2021-07-23 珠海迪沃航空工程有限公司 Dynamic image identification method and system for bolt detection

Also Published As

Publication number Publication date
CN117934464A (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN116839682B (en) Cable processing and manufacturing real-time monitoring system based on Internet of things
CN105184792B (en) A kind of saw blade wear extent On-line Measuring Method
CN115880284B (en) Detection method and system for uniformity of lubricating oil abrasive particles
CN116758099B (en) Abnormal monitoring and scram system of numerical control machine tool
CN115311629B (en) Abnormal bending precision monitoring system of bending machine
US20230008435A1 (en) Tool Wear Monitoring Device, Tool Wear Monitoring System, and Program
CN117576100B (en) Surface defect grading detection and evaluation method for FPC connector
CN115144399B (en) Assembly quality detection method and device based on machine vision
CN113752086A (en) Method and device for detecting state of numerical control machine tool cutter
CN112067618A (en) Product quality defect acquisition and analysis system based on imaging
CN110728655A (en) Machine vision-based numerical control machine tool workpiece abnormity detection method and device
CN116308300A (en) Power equipment state monitoring evaluation and command method and system
CN117934464B (en) Defect identification method based on machine vision
CN116758078B (en) Speed change gear box observation method, system, terminal equipment and storage medium
CN114331997A (en) Wire defect monitoring method based on image recognition
CN116307938B (en) Health state assessment method for feeding system of machining center
CN117483449A (en) Fault diagnosis system and method for aluminum foil rolling for double-zero aluminum foil production
CN114549403B (en) Method for detecting intelligent precise geometrical circle centers of multiple monomers of side section of mechanical part
CN111553910B (en) Infrared image-based thermal fault detection method for electrical equipment of large experimental device
CN114004812A (en) Threaded hole detection method and system adopting guide filtering and neural network model
CN108181315B (en) Image processing-based biscuit damage detection device and detection method
CN108401142B (en) Workpiece counting device and method on assembly line
CN111017728A (en) Crane brake health state assessment method based on machine vision
CN112388391B (en) Method for replacing turning tool
CN108956617A (en) A kind of detection method of the electronic device solder joint thermal cycle failure based on micro- deformation Intelligence Classifier

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