CN117078679B - Automatic assembly line production detection method for cooling fan based on machine vision - Google Patents

Automatic assembly line production detection method for cooling fan based on machine vision Download PDF

Info

Publication number
CN117078679B
CN117078679B CN202311331809.8A CN202311331809A CN117078679B CN 117078679 B CN117078679 B CN 117078679B CN 202311331809 A CN202311331809 A CN 202311331809A CN 117078679 B CN117078679 B CN 117078679B
Authority
CN
China
Prior art keywords
abnormality
degree
singular value
pixel point
pixel points
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
CN202311331809.8A
Other languages
Chinese (zh)
Other versions
CN117078679A (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.)
Dongguan Beson Robot Technology Co ltd
Original Assignee
Dongguan Beson Robot 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 Dongguan Beson Robot Technology Co ltd filed Critical Dongguan Beson Robot Technology Co ltd
Priority to CN202311331809.8A priority Critical patent/CN117078679B/en
Publication of CN117078679A publication Critical patent/CN117078679A/en
Application granted granted Critical
Publication of CN117078679B publication Critical patent/CN117078679B/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
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • 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
    • 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)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image data processing, in particular to a production detection method of an automatic assembly line of a cooling fan based on machine vision. The method obtains relative abnormality between pixel points in each image; obtaining the relative abnormality degree between each layer of pixel points according to the deviation degree array among the pixel points in the downsampled image and the corresponding relative abnormality, thereby obtaining a first abnormality degree; obtaining a second abnormality degree of each pixel point in each layer according to the change trend and the gray level change trend of the relative abnormality between the pixel points in the singular value superposition image; in the downsampled image, different layers are screened according to first abnormal degree distribution of the pixel point position with the maximum second abnormal degree in a neighborhood range among different layers, and an optimal layer singular value threshold is obtained to detect the fan blade defect. According to the invention, the change rule of each layer of singular value decomposition superposition image is analyzed, the optimal layer number singular value threshold is determined, and the detection effect on the fine crack defect is improved.

Description

Automatic assembly line production detection method for cooling fan based on machine vision
Technical Field
The invention relates to the technical field of image data processing, in particular to a production detection method of an automatic assembly line of a cooling fan based on machine vision.
Background
In fan production, because of problems such as material quality and production environment, the fan blade can appear the crack, influences life, also has the potential safety hazard simultaneously, but because the reason of plastics material, the crack that produces is most very unobvious, leads to traditional threshold segmentation method unable segmentation crack, and defect detection's effect is relatively poor.
In the prior art, a singular value decomposition and superposition method can be adopted, but because tiny cracks of fan blades are interfered by noise, defect detection by adopting a method of fixing a singular value threshold value is easy to cause missing identification or false identification of defects, so that the accuracy of detecting the crack defects of the fan blades is reduced.
Disclosure of Invention
In order to solve the technical problem that the detection of the fine crack defect is inaccurate due to the fact that an optimal singular value threshold is not determined when singular value decomposition is adopted, the invention aims to provide a production detection method of an automatic assembly line of a cooling fan based on machine vision, and the adopted technical scheme is as follows:
the invention provides a production detection method of an automatic assembly line of a cooling fan based on machine vision, which comprises the following steps:
acquiring a blade gray image of a cooling fan on an automatic assembly line; singular value decomposition is carried out on the fan blade gray level image to obtain singular value superposition images of different layers; downsampling each singular value superposition image to obtain downsampled images;
according to a relative abnormality acquisition method, respectively acquiring the relative abnormality between each pixel point in each singular value superposition image and each downsampled image; the relative abnormality acquisition method includes:
selecting a pixel point at one position as a target pixel point; obtaining a feature array of each position according to the gray scale and gradient features of the pixel points at the same position among different layers; obtaining a deviation degree array set of the target pixel point relative to other pixel points according to the difference distribution of the feature arrays among different positions; obtaining a fluctuation distribution characteristic set according to the fluctuation distribution characteristics of the elements in the deviation degree array set, and obtaining the relative abnormality between each other pixel point and the target pixel point according to the distribution of each element in the fluctuation distribution characteristic set; changing the target pixel point to obtain the relative abnormality among all pixel points;
obtaining relative abnormal degrees among the pixel points of each layer according to the deviation degree array among the pixel points in the downsampled image and the corresponding relative abnormality, and obtaining a first abnormal degree according to all the relative abnormal degrees corresponding to the pixel points of each layer; obtaining a second abnormality degree of each pixel point in each layer according to the change trend and the gray level change trend of the relative abnormality between each pixel point in the singular value superposition image and other pixel points in the neighborhood range;
taking the pixel point position with the maximum second abnormal degree as a central position, and screening different layers according to first abnormal degree distribution of the central position in a neighborhood range between different layers in a downsampled image to obtain an optimal layer singular value threshold;
and detecting the defects of the fan blades according to the singular value threshold of the optimal layer number.
Further, the method for acquiring the singular value superposition image comprises the following steps:
and after carrying out singular value decomposition on the fan blade gray level images, continuously superposing the fan blade gray level images according to the number of singular value layers to obtain singular value superposition images of different layers.
Further, the method for acquiring the feature array comprises the following steps:
the feature array comprises a gray array and a gradient array;
calculating the gray value difference of the pixel points between each layer according to the gray characteristics of the pixel points at the same position between different layers, and storing the gray value difference into an array as the gray array;
and calculating the gradient value of each layer of pixel points according to the gradient characteristics of the pixel points at the same position among different layers, and storing the gradient value into an array as the gradient array.
Further, the method for acquiring the deviation degree array set comprises the following steps:
performing difference making on the feature arrays at different positions to obtain a difference array; multiplying the products of the elements in the difference array to obtain the difference distribution;
and obtaining a deviation degree array set of the target pixel point relative to other pixel points according to the difference distribution.
Further, the method for acquiring the fluctuation distribution feature set comprises the following steps:
calculating the variance of the deviation degree array as the fluctuation distribution characteristic; and obtaining a fluctuation distribution characteristic set according to the fluctuation distribution characteristics of each element in the deviation degree array set.
Further, the method for acquiring the relative abnormality includes:
and taking any element in the fluctuation distribution characteristic set as a target element, and taking the difference of the mean value of the target element and other elements as the relative abnormality between the other pixel points corresponding to the target element and the target pixel point.
Further, the method for acquiring the first degree of abnormality includes:
in the downsampled image, normalizing elements in the deviation degree array between pixel points to obtain a deviation degree weight corresponding to the number of layers; obtaining the relative abnormality degree between each layer of pixel points according to the deviation degree weight and the relative abnormality between the corresponding pixel points;
and in each layer, selecting the maximum relative abnormal degree of the pixel point relative to all other pixel points as the first abnormal degree of the pixel point.
Further, the method for obtaining the second degree of abnormality of each pixel point includes:
in the singular value superposition image, calculating the gray scale ratio between each pixel point and other pixel points in the neighborhood range, and taking the gray scale ratio as the gray scale variation trend;
calculating a variance mean value of products between relative abnormality and gray scale ratios between each pixel point and all other pixel points in the neighborhood range to obtain abnormal relevance;
calculating the product of the maximum relative abnormality and abnormality association between each pixel point and other pixel points in the neighborhood range of the pixel point to obtain a second abnormality degree of each pixel point;
and the abnormal relevance and the maximum relative abnormality are in positive correlation with the second abnormality degree.
Further, the method for obtaining the optimal layer number singular value threshold comprises the following steps:
and taking the pixel point position with the maximum second abnormal degree as a central position, calculating the sum of first abnormal degrees of the central position in a neighborhood range between different layers in the downsampled image, and obtaining the optimal layer number singular value threshold according to the singular value corresponding to the layer number when the sum of the first abnormal degrees is maximum.
Further, detecting the fan blade defect according to the optimal layer number singular value threshold value comprises:
and sequencing singular values in the singular value threshold of the optimal layer number from small to large, recombining images to obtain fan blade defects, and detecting the fan blade defects.
The invention has the following beneficial effects:
in order to analyze the details of the image, the invention downsamples the image after singular value decomposition and superposition; according to the gray scale and gradient characteristics of the pixel points at the same position among different layers, a characteristic array of each position is obtained, and the characteristic change condition of the same position of the image along with the superposition of singular value layers can be indicated; in order to avoid the situation that whether the image is abnormal or not can not be accurately judged in a single position, a deviation degree array set of the target pixel point relative to other pixel points is obtained according to the difference distribution of the feature arrays between different positions; obtaining a fluctuation distribution characteristic set according to the fluctuation distribution characteristics of the elements in the deviation degree array set, and obtaining the relative abnormality between each other pixel point and the target pixel point according to the distribution of each element in the fluctuation distribution characteristic set; changing the target pixel points to obtain relative abnormality among all the pixel points, and analyzing the relative change degree among the pixel points to determine the possibility of cracks because the normal area occupies most of the image; obtaining relative abnormal degrees among the pixel points of each layer according to an array of deviation degrees among the pixel points in the downsampled image and the corresponding relative abnormality, obtaining a first abnormal degree according to all the relative abnormal degrees corresponding to the pixel points of each layer, and judging the possibility of crack defects in the downsampled image; the noise error interference is avoided, the possibility that the periphery of each pixel point is affected by crack defects is analyzed, and a second abnormality degree of each pixel point in each layer is obtained according to the change trend of relative abnormality and the gray level change trend between each pixel point in the singular value superposition image and other pixel points in the neighborhood range; in the downsampled image, different layers are screened according to first abnormal degree distribution of the pixel point position with the maximum second abnormal degree in a neighborhood range between different layers, and a singular value threshold of the optimal layer is obtained to detect the defects of the fan blades. According to the invention, the change rule of each layer of singular value decomposition superposition image is analyzed, the optimal layer number singular value threshold is determined, and the detection effect on the fine crack defect is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for detecting production of an automatic assembly line of a cooling fan based on machine vision according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following description refers to the specific implementation, structure, characteristics and effects of the automatic assembly line production detection method for the cooling fan based on machine vision according to the invention, which is provided by the invention, with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of a production detection method of an automatic assembly line of a cooling fan based on machine vision.
Referring to fig. 1, a flowchart of a method for detecting production of an automatic assembly line of a cooling fan based on machine vision according to an embodiment of the invention is shown, the method includes:
step S1: acquiring a blade gray image of a cooling fan on an automatic assembly line; singular value decomposition is carried out on the fan blade gray level image to obtain singular value superposition images of different layers; and downsampling each singular value superposition image to obtain downsampled images.
In an embodiment of the invention, in order to detect the production of an automatic assembly line of cooling fans, an industrial camera is used to collect fan blade images on the automatic assembly line of fans. It should be noted that, the processing method of each fan blade image is the same, and is not described herein, and only one fan blade image is used for example in the following.
In one embodiment of the invention, in order to facilitate the subsequent image processing process, the collected fan blade images are subjected to preprocessing operation, the quality of the images is enhanced, and then the processed images are analyzed. It should be noted that the image preprocessing operation is a technical means well known to those skilled in the art, and may be specifically set according to a specific implementation scenario, in one embodiment of the present invention, semantic segmentation is selected to separate different objects in an image, so as to perform more targeted editing and enhancing operations, improve the quality of the image, and a grayscale algorithm is adopted to obtain a fan blade grayscale image, so that the outline and details of the image are highlighted, so that the image is clearer, and operations such as feature extraction and image recognition are easier to perform, and the specific semantic segmentation and grayscale algorithm are all technical means well known to those skilled in the art and are not described herein.
The singular value decomposition can extract main features in the image, highlight defects in the image, and is favorable for detecting crack defects.
Preferably, in one embodiment of the present invention, the method for acquiring a singular value superposition image includes: and after carrying out singular value decomposition on the fan blade gray level images, superposing the fan blade gray level images according to the number of singular value layers to obtain singular value superposition images of different layers.
After singular value decomposition, analyzing the images after each layer of superposition; as the detail features of the images after the singular value layer number superposition gradually increase, the change of the images is smaller, and in order to analyze the details of the images, the singular value superposition images are downsampled. It should be noted that, in an embodiment of the present invention, the singular value decomposition and downsampling are all well known technical means for processing the image to those skilled in the art, and are not described herein.
The downsampling operation can be used for reducing the image resolution, reducing the consumption of image processing calculation force and the like, and in the embodiment of the invention, downsampling is performed on the singular value superposition image, and the downsampling can be regarded as the mapping value of a certain local area in the singular value superposition image in the downsampled image, so that the local area in the singular value superposition image is one pixel point in the downsampled image, and the characteristic of the corresponding local area in the singular value superposition image can be simultaneously represented by directly analyzing each pixel point in the downsampled image in the subsequent process. In one embodiment of the invention, the singular value superposition image is uniformly segmented, the size of the segments is 3×3, each segment is regarded as a corresponding pixel point in the downsampled image, the pixel value of the pixel point in the downsampled image is the average value of the pixel values of the corresponding segment areas in the singular value superposition image, and the gradient value of the pixel point in the downsampled image is the average value of the gradient of the corresponding segment areas in the singular value superposition image. Because there are multiple layers of singular value superimposed images, i.e. there are also multiple layers of downsampled images at the same time.
Step S2: according to a relative abnormality acquisition method, respectively acquiring the relative abnormality between each pixel point in each singular value superposition image and each downsampled image; the relative abnormality acquisition method includes: selecting a pixel point at one position as a target pixel point; obtaining a feature array of each position according to the gray scale and gradient features of the pixel points at the same position among different layers; obtaining a deviation degree array set of the target pixel point relative to other pixel points according to the difference distribution of the feature arrays among different positions; obtaining a fluctuation distribution characteristic set according to the fluctuation distribution characteristics of the elements in the deviation degree array set, and obtaining the relative abnormality between each other pixel point and the target pixel point according to the distribution of each element in the fluctuation distribution characteristic set; changing the target pixel point obtains the relative abnormality between all the pixel points.
In the relative anomaly acquisition process, selecting a pixel point at one position as a target pixel point, and when no crack exists at the pixel point position, along with superposition of singular value layers, gray level change of the pixel point at the same position of an image tends to be stable, so that gray level difference between the same positions in each image obtained by superposition of different singular value layers is smaller and smaller; and because the image is a fan blade, when no crack influence exists, the gradient of each pixel point of the image is small, so that a feature array of each position is obtained according to the gray scale and gradient features of the pixel points at the same position between different layers, and the change rule of the pixel points on different layers is analyzed. However, whether the abnormality exists or not cannot be judged according to the change rule of the single position, the change rule among the pixel points at different positions is analyzed, and a deviation degree array set of the target pixel point relative to other pixel points is obtained according to the difference distribution of the characteristic arrays among the different positions; when the array of the target pixel point and each other pixel point is abnormal, the degree of dispersion of the array of the deviation degree is increased, so that the other pixel points in the positions corresponding to the elements with large degree of dispersion in the array set of the deviation degree can be abnormal, a fluctuation distribution characteristic set is obtained according to the fluctuation distribution characteristics of the elements in the array set of the deviation degree, and the relative abnormality between each other pixel point and the target pixel point is obtained according to the distribution of each element in the fluctuation distribution characteristic set; the relative abnormality between all the pixel points is obtained by changing the target pixel point, and the greater the relative abnormality is, the more likely the crack defect exists at the position of the pixel point.
Preferably, in one embodiment of the present invention, the method for acquiring the feature array includes:
the feature array comprises a gray array and a gradient array; along with superposition of singular value layers, gray level change of pixel points at the same position of the image tends to be stable, and gradient is small; calculating the gray value difference of the pixel points between each layer according to the gray characteristics of the pixel points at the same position between different layers, and storing the gray value difference into an array as a gray array; calculating the gradient value of each layer of pixel points according to the gradient characteristics of the pixel points at the same position among different layers, and storing the gradient value into an array as a gradient array; and analyzing the change rule of the same pixel point in the image. In one embodiment of the invention, a target pixel point is taken from an imageThe number of superimposed singular values is +.>Target pixel->At->The gray value of the layer is recorded as +.>Gradient values are noted->Gray scale array,/>,/>Is->Layer and->Target pixel point between layers->Gray value differences of (2); gradient array->The method comprises the steps of carrying out a first treatment on the surface of the The feature array is +.>
Preferably, in one embodiment of the present invention, the method for acquiring the deviation degree array set includes:
because the change of a single pixel point can not judge whether an abnormality exists, and in order to avoid being influenced by noise errors, the characteristic arrays at different positions are subjected to difference making to obtain a difference array; obtaining a difference distribution by multiplying elements in the difference array; according to the differenceAnd obtaining a deviation degree array set of the target pixel point relative to other pixel points. In one embodiment of the invention, a target pixel point is takenAnd any two other pixels in the image range +.>、/>For example, the feature arrays of the pixel points are respectively: />;/>;/>The method comprises the steps of carrying out a first treatment on the surface of the The difference array between the target pixel point and other pixel points is as follows: />;/>;/>,/>For the target pixel->Between the pixel and other pixels>Gray array differences between; />,/>For the target pixel->Between the pixel and other pixels>Gray array differences between; />,/>For the target pixel->Between the pixel and other pixels>Gradient array differences between; />,/>For the target pixel->Between the pixel and other pixels>Gradient array differences between; the deviation degree arrays are +.>;/>,/>Representing the target pixel point in the first layer +.>And other pixels->Degree of deviation between; />Is indicated at +.>Target pixel point in layer->And other pixels->Degree of deviation between; />,/>Representing the target pixel point in the first layer +.>And other pixels->Degree of deviation between->Is indicated at +.>Target pixel point in layer->Between the pixel and other pixels>The degree of deviation of (2); target pixel dot +.>The bias degree array set of (2) is +.>. It should be noted that, the objects involved in the operation in the above-mentioned differential expression are all arrays, that is, in the actual operation process, the absolute value of the difference value should be calculated by the element at the corresponding position between the two arrays, so as to obtain a new array, and the specific process is a technical means well known to those skilled in the art, and will not be described herein.
Preferably, in one embodiment of the present invention, the method for acquiring the fluctuation distribution feature set includes:
calculating the variance of the deviation degree array as a fluctuation distribution characteristic; and obtaining a fluctuation distribution characteristic set according to the fluctuation distribution characteristics of each element in the deviation degree array set. The variance may represent the difference in the degree of deviation between two pixels, the greater the variance, the greater the degree of deviation. In an embodiment of the invention, the wave distribution feature set isWherein->Representing the target pixel +.>And other pixels->Variance of the array of degree of deviation between; />Representing the target pixel +.>And other pixels->The variance of the array of degree of deviation therebetween.
Preferably, in one embodiment of the present invention, the method for acquiring relative abnormality includes:
distributing feature sets in a wave motionTaking the difference of the average value of the target element and other elements as the relative abnormality between the other pixel points corresponding to the target element and the target pixel point, wherein the smaller the distribution among the elements is, the smaller the relative abnormality is, which indicates that the pixel point has little possibility of crack defect. In one embodiment of the invention, a wave distribution feature set is fetchedElement->The relative anomaly is formulated as:
wherein,representing the target pixel point->And corresponding to other pixels->Other pixels obtained by the degree of difference +.>Is +.>;/>Representing the average value of the residual elements in the fluctuation distribution feature set after any element is taken out; />Representing the extraction target pixel +.>And other pixels->The variance obtained by the deviation degree array;
in the formulation of the relative anomaly,representing the extraction target pixel +.>And other pixels->The variation degree of variance after the deviation degree array shows that other pixel points are taken out +.>The degree of difference from other pixels in the image except for the pixel. The more pronounced the degree of difference, the more likely an abnormality is. It is noted that the characteristic set is distributed by fluctuation +.>For example, except->The other elements are->I.e. +.>
Step S3: obtaining relative abnormal degrees among the pixel points of each layer according to the deviation degree array among the pixel points in the downsampled image and the corresponding relative abnormality, and obtaining a first abnormal degree according to all the relative abnormal degrees corresponding to the pixel points of each layer; and obtaining a second abnormality degree of each pixel point in each layer according to the change trend and the gray level change trend of the relative abnormality between each pixel point in the singular value superposition image and other pixel points in the neighborhood range.
In the downsampled image, the larger the deviation degree array discrete degree between the pixel points is, the larger the corresponding relative abnormality is, the more abnormality is likely to exist, the influence of crack defects is larger, the relative abnormality degree between the pixel points of each layer is obtained according to the deviation degree array between the pixel points in the downsampled image and the corresponding relative abnormality, and because each pixel point in the image corresponds to a plurality of abnormality degrees, all the relative abnormality degrees are analyzed, and the first abnormality degree is obtained according to all the relative abnormality degrees corresponding to each layer of pixel point; however, the abnormality degree of the pixel points in the downsampled image cannot be accurately judged, and the second abnormality degree of each pixel point in each layer is obtained according to the change trend and the gray level change trend of the relative abnormality between each pixel point in the singular value superimposed image and other pixel points in the neighborhood range of the pixel points; the greater the degree of abnormality, the more abnormal the pixel is, and the crack defect area is.
Preferably, in one embodiment of the present invention, the method for acquiring the first degree of abnormality includes:
in the downsampled image, normalizing elements in the deviation degree array between pixel points to obtain a deviation degree weight corresponding to the number of layers; analyzing the deviation degree weight between the corresponding layers of the pixel points, wherein the larger the deviation degree weight is, the larger the relative abnormality is, the more the pixel points are likely to have abnormality, and the influence of crack defects is larger; obtaining the relative abnormality degree between each layer of pixel points according to the deviation degree weight and the relative abnormality between the corresponding pixel points; because the relative degree of abnormality of the corresponding other pixels will also change when the target pixel is changed, the detection effect is affected by a plurality of different results, and in each layer, the maximum relative degree of abnormality of the pixel relative to all other pixels is selected as the first degree of abnormality of the pixel. In one embodiment of the invention, a target pixel point is takenAnd other pixels->The array of degree of deviation of (2) is:the method comprises the steps of carrying out a first treatment on the surface of the Normalizing the deviation degree array; obtaining the corresponding relative abnormality degree of each layer, wherein the formula is as follows: />
Wherein,for other pixel j +.>At->The relative degree of anomaly in the layer; />Representing other pixels +.>Relative to the target pixel point->Is relatively abnormal; />Representing the target pixel +.>And other pixels->At->The corresponding degree of deviation weights in the layers.
Preferably, in one embodiment of the present invention, the method for acquiring the second degree of abnormality includes:
in the singular value superposition image, the change rate of gray scales and abnormal degrees in the pixel points and the adjacent areas is very slow under the condition that no crack defect exists, and the change rate is relatively fast under the condition that the crack defect exists, and the gray scale ratio between each pixel point and other pixel points in the adjacent areas is calculated and used as a gray scale change trend; calculating a variance mean value of products between relative abnormality and gray scale ratios of each pixel point and all other pixel points in a neighborhood range of the pixel point, obtaining abnormal association, and judging whether the pixel points are affected by crack defects; selecting the maximum relative abnormality between each pixel point and other pixel points in the neighborhood range, calculating the product of the maximum relative abnormality and the abnormality association to obtain a second abnormality degree of each pixel point, wherein the larger the relative abnormality is, the larger the abnormality association is, the larger the second abnormality degree is, the larger the probability of abnormality is, and the abnormality association and the maximum relative abnormality are in positive correlation with the second abnormality degree. In one embodiment of the invention, the second degree of anomaly is formulated as:
wherein,representing +.>Degree of abnormality of the individual pixel points; />Indicate->The +.>Relative abnormality of individual pixels, +.>Indicate->The +.>Gray scale variation trend of each pixel point; />Indicate->Average value of products of relative abnormality and gray scale change trend in neighborhood range of each pixel point; />Indicate->Relative anomalies of individual pixels.
Under the formula of the second degree of abnormality,the variance of the gray level change trend and the relative abnormality of the pixel points in the pixel point field is calculated to obtain the abnormal relevance of the pixel points and the neighborhood thereof, and the greater the abnormal relevance is, the higher the possibility that the pixel points are affected by crack defects is.Indicate->The greater the degree of abnormality of a pixel, the greater the degree of abnormality of the pixel.
It should be noted that, in other embodiments of the present invention, the positive-negative correlation and normalization method may be constructed by basic mathematical operation, and specific means are technical means well known to those skilled in the art, and will not be described herein.
It should be noted that, in one embodiment of the present invention, the size of the neighborhood range is set to 3×3, and in other embodiments of the present invention, the neighborhoodThe size of the range can be specifically set according to specific situations, and is not limited and described in detail herein. In one embodiment of the invention, the firstThe neighborhood range of each pixel point contains +.>And other pixels.
Step S4: and taking the pixel point position with the maximum second abnormal degree as a central position, and screening different layers according to first abnormal degree distribution of the central position in a neighborhood range between different layers in the downsampled image to obtain an optimal layer singular value threshold.
The singular value reflects the degree of change of images of different layers, and if the singular value of an image of a layer is far greater than that of other layers, the defect of the image of the layer is most obvious; because continuity exists in a crack defect area in an image, along with superposition of singular value layers, approximation exists on the relative abnormal degree of a pixel point at a position affected by the crack defect, so that the pixel point position with the maximum second abnormal degree is used as a central position, different layers are screened according to first abnormal degree distribution of the central position in a neighborhood range between different layers in a downsampled image, an optimal layer singular value threshold is obtained, enough singular values can be reserved to reflect the characteristics of a fan blade, and excessive noise interference is avoided.
Preferably, in an embodiment of the present disclosure, the method for obtaining the optimal layer number singular value threshold includes:
along with superposition of singular value layers, the relative anomaly degree of the pixel points is more approximate after being influenced by the crack defect, the pixel point position with the maximum second anomaly degree is taken as a central position, the sum of first anomaly degrees of the central position in a neighborhood range between different layers is calculated in a downsampled image, and an optimal layer singular value threshold is obtained according to the singular value corresponding to the layer number when the sum of the first anomaly degrees is maximum; the larger the sum of the first abnormality degrees of each layer is, the more obvious the abnormality features on the image are, and the better effect is achieved on determining the abnormal region by selecting the first abnormality degree and the layer number at the maximum.
It should be noted that, in one embodiment of the present invention, the neighborhood range is in the eight-chain code direction of the central position, and in other embodiments of the present invention, the size of the neighborhood range may be specifically set according to the specific situation, which is not limited and described herein.
Step S5: and detecting the defects of the fan blades according to the singular value threshold of the optimal layer number.
The singular value of the optimal layer number is determined by the singular value threshold value of the optimal layer number, the abnormal possibility of the layer number is maximum, the image with the most obvious crack defect characteristic is obtained, and the defects of the fan blades are detected.
Preferably, in one embodiment of the present invention, detecting the fan blade defect according to the optimal layer number singular value threshold includes:
and sequencing singular values in the singular value threshold of the optimal layer number from small to large, recombining images to obtain fan blade defects, and detecting the fan blade defects. And comparing the recombined image with the original image of the fan blade to detect defects. It should be noted that different defect types may need different singular value thresholds and recombination methods, and thus need to be adjusted according to specific situations, which are not limited and described herein.
To sum up: the method obtains relative abnormality between pixel points in each image; obtaining the relative abnormality degree between each layer of pixel points according to the deviation degree array among the pixel points in the downsampled image and the corresponding relative abnormality, thereby obtaining a first abnormality degree; obtaining a second abnormality degree of each pixel point in each layer according to the change trend and the gray level change trend of the relative abnormality between the pixel points in the singular value superposition image; in the downsampled image, different layers are screened according to first abnormal degree distribution of the pixel point position with the maximum second abnormal degree in a neighborhood range among different layers, and an optimal layer singular value threshold is obtained to detect the fan blade defect. According to the invention, the change rule of each layer of singular value decomposition superposition image is analyzed, the optimal layer number singular value threshold is determined, and the detection effect on the fine crack defect is improved.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (10)

1. A machine vision-based production detection method for an automatic assembly line of a cooling fan, which is characterized by comprising the following steps:
acquiring a blade gray image of a cooling fan on an automatic assembly line; singular value decomposition is carried out on the fan blade gray level image to obtain singular value superposition images of different layers; downsampling each singular value superposition image to obtain downsampled images;
according to a relative abnormality acquisition method, respectively acquiring the relative abnormality between each pixel point in each singular value superposition image and each downsampled image; the relative abnormality acquisition method includes:
selecting a pixel point at one position as a target pixel point; obtaining a feature array of each position according to the gray scale and gradient features of the pixel points at the same position among different layers; obtaining a deviation degree array set of the target pixel point relative to other pixel points according to the difference distribution of the feature arrays among different positions; obtaining a fluctuation distribution characteristic set according to the fluctuation distribution characteristics of the elements in the deviation degree array set, and obtaining the relative abnormality between each other pixel point and the target pixel point according to the distribution of each element in the fluctuation distribution characteristic set; changing the target pixel point to obtain the relative abnormality among all pixel points;
obtaining relative abnormal degrees among the pixel points of each layer according to the deviation degree array among the pixel points in the downsampled image and the corresponding relative abnormality, and obtaining a first abnormal degree according to all the relative abnormal degrees corresponding to the pixel points of each layer; obtaining a second abnormality degree of each pixel point in each layer according to the change trend and the gray level change trend of the relative abnormality between each pixel point in the singular value superposition image and other pixel points in the neighborhood range;
taking the pixel point position with the maximum second abnormal degree as a central position, and screening different layers according to first abnormal degree distribution of the central position in a neighborhood range between different layers in a downsampled image to obtain an optimal layer singular value threshold;
and detecting the defects of the fan blades according to the singular value threshold of the optimal layer number.
2. The machine vision-based automatic assembly line production detection method for cooling fans according to claim 1, wherein the singular value superposition image acquisition method comprises the following steps:
and after carrying out singular value decomposition on the fan blade gray level images, continuously superposing the fan blade gray level images according to the number of singular value layers to obtain singular value superposition images of different layers.
3. The machine vision-based automatic assembly line production detection method for cooling fans according to claim 1, wherein the feature array acquisition method comprises the following steps:
the feature array comprises a gray array and a gradient array;
calculating the gray value difference of the pixel points between each layer according to the gray characteristics of the pixel points at the same position between different layers, and storing the gray value difference into an array as the gray array;
and calculating the gradient value of each layer of pixel points according to the gradient characteristics of the pixel points at the same position among different layers, and storing the gradient value into an array as the gradient array.
4. The machine vision-based automatic assembly line production detection method for cooling fans according to claim 1, wherein the method for acquiring the deviation degree array set comprises the following steps:
performing difference making on the feature arrays at different positions to obtain a difference array; obtaining the difference distribution by multiplying the elements in the difference array;
and obtaining a deviation degree array set of the target pixel point relative to other pixel points according to the difference distribution.
5. The machine vision-based automatic assembly line production detection method for cooling fans according to claim 1, wherein the acquisition method for the fluctuation distribution feature set comprises the following steps:
calculating the variance of the deviation degree array as the fluctuation distribution characteristic; and obtaining a fluctuation distribution characteristic set according to the fluctuation distribution characteristics of each element in the deviation degree array set.
6. The machine vision-based automatic assembly line production detection method for cooling fans according to claim 1, wherein the relative abnormality acquisition method comprises:
and taking any element in the fluctuation distribution characteristic set as a target element, and taking the difference of the mean value of the target element and other elements as the relative abnormality between the other pixel points corresponding to the target element and the target pixel point.
7. The machine vision-based automatic assembly line production detection method for cooling fans of claim 1, wherein the first abnormality degree acquisition method comprises:
in the downsampled image, normalizing elements in the deviation degree array between pixel points to obtain a deviation degree weight corresponding to the number of layers; obtaining the relative abnormality degree between each layer of pixel points according to the deviation degree weight and the relative abnormality between the corresponding pixel points;
and in each layer, selecting the maximum relative abnormal degree of the pixel point relative to all other pixel points as the first abnormal degree of the pixel point.
8. The machine vision-based automatic assembly line production detection method for cooling fans according to claim 1, wherein the method for obtaining the second degree of abnormality of each pixel comprises:
in the singular value superposition image, calculating the gray scale ratio between each pixel point and other pixel points in the neighborhood range, and taking the gray scale ratio as the gray scale variation trend;
calculating a variance mean value of products between relative abnormality and gray scale ratios between each pixel point and all other pixel points in the neighborhood range to obtain abnormal relevance;
calculating the product of the maximum relative abnormality and abnormality association of each pixel point relative to other pixel points in the neighborhood range of the pixel point to obtain a second abnormality degree of each pixel point;
and the abnormal relevance and the maximum relative abnormality are in positive correlation with the second abnormality degree.
9. The machine vision-based automatic assembly line production detection method for cooling fans according to claim 1, wherein the method for obtaining the optimal layer number singular value threshold comprises the following steps:
and taking the pixel point position with the maximum second abnormal degree as a central position, calculating the sum of first abnormal degrees of the central position in a neighborhood range between different layers in the downsampled image, and obtaining the optimal layer number singular value threshold according to the singular value corresponding to the layer number when the sum of the first abnormal degrees is maximum.
10. The machine vision-based automatic assembly line for heat dissipation fans production detection method as defined in claim 1, wherein detecting fan blade defects according to the optimal floor singular value threshold comprises:
and sequencing singular values in the singular value threshold of the optimal layer number from small to large, recombining images to obtain fan blade defects, and detecting the fan blade defects.
CN202311331809.8A 2023-10-16 2023-10-16 Automatic assembly line production detection method for cooling fan based on machine vision Active CN117078679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311331809.8A CN117078679B (en) 2023-10-16 2023-10-16 Automatic assembly line production detection method for cooling fan based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311331809.8A CN117078679B (en) 2023-10-16 2023-10-16 Automatic assembly line production detection method for cooling fan based on machine vision

Publications (2)

Publication Number Publication Date
CN117078679A CN117078679A (en) 2023-11-17
CN117078679B true CN117078679B (en) 2023-12-15

Family

ID=88719870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311331809.8A Active CN117078679B (en) 2023-10-16 2023-10-16 Automatic assembly line production detection method for cooling fan based on machine vision

Country Status (1)

Country Link
CN (1) CN117078679B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114240888A (en) * 2021-12-17 2022-03-25 沭阳安宏木制品厂 Furniture assembly paint spraying defect repairing method and system based on image processing
CN115082467A (en) * 2022-08-22 2022-09-20 山东亿昌装配式建筑科技有限公司 Building material welding surface defect detection method based on computer vision
CN115953407A (en) * 2023-03-15 2023-04-11 深圳市科姆特精密科技有限公司 Semiconductor equipment maintenance system based on computer vision
CN116363133A (en) * 2023-06-01 2023-06-30 无锡斯达新能源科技股份有限公司 Illuminator accessory defect detection method based on machine vision
WO2023126030A1 (en) * 2022-09-28 2023-07-06 探长信息技术(苏州)有限公司 Switch interface integrity inspection method
CN116721106A (en) * 2023-08-11 2023-09-08 山东明达圣昌铝业集团有限公司 Profile flaw visual detection method based on image processing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114240888A (en) * 2021-12-17 2022-03-25 沭阳安宏木制品厂 Furniture assembly paint spraying defect repairing method and system based on image processing
CN115082467A (en) * 2022-08-22 2022-09-20 山东亿昌装配式建筑科技有限公司 Building material welding surface defect detection method based on computer vision
WO2023126030A1 (en) * 2022-09-28 2023-07-06 探长信息技术(苏州)有限公司 Switch interface integrity inspection method
CN115953407A (en) * 2023-03-15 2023-04-11 深圳市科姆特精密科技有限公司 Semiconductor equipment maintenance system based on computer vision
CN116363133A (en) * 2023-06-01 2023-06-30 无锡斯达新能源科技股份有限公司 Illuminator accessory defect detection method based on machine vision
CN116721106A (en) * 2023-08-11 2023-09-08 山东明达圣昌铝业集团有限公司 Profile flaw visual detection method based on image processing

Also Published As

Publication number Publication date
CN117078679A (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN109870461B (en) Electronic components quality detection system
CN111383209B (en) Unsupervised flaw detection method based on full convolution self-encoder network
CN115082482A (en) Metal surface defect detection method
JP5168215B2 (en) Appearance inspection device
CN117173187B (en) Intelligent valve fault detection system
CN117351019B (en) Welding defect detection method
US10636133B2 (en) Automated optical inspection (AOI) image classification method, system and computer-readable media
CN116758491B (en) Printing monitoring image analysis method and system applied to 3D printing
CN116091504B (en) Connecting pipe connector quality detection method based on image processing
US20190360942A1 (en) Information processing method, information processing apparatus, and program
JP2017219529A (en) Appearance abnormality inspection device, method, and program
CN115471503B (en) Equipment abnormity detection method for numerical control ingot splitting machine
CN114782329A (en) Bearing defect damage degree evaluation method and system based on image processing
CN115063430A (en) Electric pipeline crack detection method based on image processing
CN116777911A (en) Double-substrate radiator surface defect detection system based on image recognition
US8004564B1 (en) Automated systems and methods for testing infrared cameras
CN117078679B (en) Automatic assembly line production detection method for cooling fan based on machine vision
CN117237747A (en) Hardware defect classification and identification method based on artificial intelligence
US20240005477A1 (en) Index selection device, information processing device, information processing system, inspection device, inspection system, index selection method, and index selection program
Widodo et al. Application of self organizing map for intelligent machine fault diagnostics based on infrared thermography images
Muravyov et al. Weld Defects Automatic Visual Recognition by Combined Application of Canny Edge Detector and Interval Fusion with Preference Aggregation
CN115049641A (en) Electric data processing method and system for anomaly detection of mechanical parts
CN114529515A (en) Method for automatically identifying internal defects of solar cell
CN113610794A (en) Metal surface flaw detection method based on generative countermeasure network
CN110874837B (en) Defect automatic detection method based on local feature distribution

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