CN116993696A - Diamond saw blade crack detection method and device based on machine vision - Google Patents

Diamond saw blade crack detection method and device based on machine vision Download PDF

Info

Publication number
CN116993696A
CN116993696A CN202310968271.5A CN202310968271A CN116993696A CN 116993696 A CN116993696 A CN 116993696A CN 202310968271 A CN202310968271 A CN 202310968271A CN 116993696 A CN116993696 A CN 116993696A
Authority
CN
China
Prior art keywords
image
crack
saw blade
diamond saw
crack detection
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.)
Pending
Application number
CN202310968271.5A
Other languages
Chinese (zh)
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.)
Suzhou Apqi Internet Of Things Technology Co ltd
Original Assignee
Suzhou Apqi Internet Of Things 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 Suzhou Apqi Internet Of Things Technology Co ltd filed Critical Suzhou Apqi Internet Of Things Technology Co ltd
Priority to CN202310968271.5A priority Critical patent/CN116993696A/en
Publication of CN116993696A publication Critical patent/CN116993696A/en
Pending legal-status Critical Current

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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0499Feedforward networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/10Image enhancement or restoration using non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a machine vision-based diamond saw blade crack detection method and a machine vision-based diamond saw blade crack detection device, wherein the method comprises the following steps: s1, shooting a diamond saw blade image; s2, preprocessing the diamond saw blade image; s3, cutting the preprocessed diamond saw blade image to obtain a blade image; s4, performing frequency domain processing on the blade image; s5, performing crack fitting and screening on the blade image processed in the S4; s6, cutting out candidate crack pictures and inputting a crack detection model for detection; s7, outputting a result, wherein the crack detection model of S6 is obtained through homemade data set training. The method and the device for detecting the cracks of the diamond saw blade can realize the real-time detection of the cracks of the diamond saw blade, and the detection result is accurate and reliable.

Description

Diamond saw blade crack detection method and device based on machine vision
Technical Field
The invention relates to the field of product surface defects, in particular to a machine vision-based diamond saw blade crack detection method and a machine vision-based diamond saw blade crack detection device.
Background
In the industrial manufacturing process, due to the reasons of the prior art, production conditions and the like, defective samples are inevitably generated, such as diamond saw blades, the manufacturing process is complex, defective products are inevitably generated in the manufacturing process, surface defects such as cracks, scratches and the like are visual manifestations of the affected product quality, and in order to ensure the qualification rate of the products, a quality detection link is arranged in the production flow in factories.
For crack detection of diamond saw blades, many factories still adopt traditional manual detection methods at present, but the method has the defects of low efficiency, easy fatigue of workers, easy influence of subjective factors, and the like, so that many students begin to explore other surface defect detection methods to replace the traditional methods. The existing industrial methods for detecting the surface crack defects of the products comprise laser detection, magnetic flux leakage detection, eddy current detection, fluorescent magnetic powder detection, image processing, deep learning and the like, but the four methods are complex and high in cost; the simple image processing method has low accuracy, high requirements on environment and low universality; there are methods for detecting cracks using deep learning, but many of them use relatively complex neural networks such as YOLO and CNN, which take a long time.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a diamond saw blade crack detection method and a device based on machine vision. The traditional image processing method and the deep learning method are combined, and the image details are enhanced by using the frequency domain, so that crack lines on the edge part can be extracted more accurately, the deep learning method is further introduced, and cracks are identified and judged again, so that the crack detection accuracy is improved effectively.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
in a first aspect, a method for detecting cracks of a diamond saw blade based on machine vision is provided, including the following steps:
s1, shooting a diamond saw blade image;
s2, preprocessing the diamond saw blade image;
s3, cutting the preprocessed diamond saw blade image to obtain a blade image;
s4, performing frequency domain processing on the blade image;
s5, performing crack fitting and screening on the blade image processed in the S4;
s6, cutting out candidate crack images and inputting a crack detection model for detection;
s7, outputting a result.
With reference to the first aspect, further, the preprocessing the diamond saw blade image in step S2 includes:
obtaining a foreground target image through threshold segmentation, denoising the foreground target image by adopting median filtering, and strengthening image details by using an enhancement operator, wherein the principle of the median filtering is as follows:
wherein ,is the image after median filtering, g (S, t) is the original image, S xy A set of coordinates representing a rectangular sub-image window (neighborhood) of size mxn centered at a point (x, y), m, n being the width and height of the rectangular sub-image window, both being odd integers;
cutting the preprocessed diamond saw blade image in the step S3 to obtain a blade image, wherein the cutting blade image comprises the following steps:
and setting a threshold value by utilizing the pixel value difference between the edge part and other parts in the preprocessed diamond saw blade image, obtaining images of other parts of the diamond saw blade by using binarization segmentation, and subtracting the images of other parts of the diamond saw blade from the preprocessed diamond saw blade image to obtain the diamond saw blade edge part image.
With reference to the first aspect, further, performing frequency domain processing on the blade image in step S4 includes:
the method comprises the steps of converting Fourier transform into a frequency domain, calculating an image by using a Gaussian filter, enhancing high-frequency information, and then performing inverse Fourier transform on the image to convert into a spatial domain, wherein the Fourier transform and the inverse Fourier transform are two-dimensional discrete Fourier transform and inverse Fourier transform, and the principle is as follows:
let F (x, y) denote an image of size mxn, M being the width of the image and N being the height of the image, wherein x=0, 1,2, …, M-1 and y=0, 1,2, …, N-1, the two-dimensional discrete fourier transform being denoted F (u, v), the formula:
where u=0, 1,2, …, M-1, v=0, 1,2, …, N-1, the two variables being coordinates in the frequency domain;
the inverse transform formula is:
where x=0, 1,2, …, M-1, y=0, 1,2, …, N-1, the two variables being coordinates in the spatial domain;
the gaussian filtering principle is as follows:
where (x, y) is the coordinates of a point in the image and σ is the standard deviation.
With reference to the first aspect, further, the performing crack fitting and screening on the blade image processed in step S4 in step S5 includes:
fitting the lines on the edge image processed in the frequency domain, setting a length and width threshold, extracting the lines in the edge image processed in the step S4, arranging the lines from long to short according to the length, selecting the lines from long to short according to the number of preset candidate cracks as candidate cracks, and entering the next step of detection.
With reference to the first aspect, further, the step S6 of cropping the candidate crack image and inputting the candidate crack image into the crack detection model for detection includes:
cutting off the selected candidate cracks, and inputting the cut candidate cracks into a crack detection model for detection, wherein the crack detection model is a SquezeNet model, and the structure of the crack detection model comprises the following components:
the method comprises the steps of using a linear rectification function (ReLU) as an activation function after each convolution layer, connecting an exit layer (dropout) with a loss rate of 0.5 after a ninth layer fire module (fire module) to prevent overfitting, finally normalizing by using a normalization index function (softmax), converting the output value of a previous layer network into probabilities of two categories of cracks and non-cracks, and selecting the category with the highest probability as a prediction result, wherein the principle of the linear rectification function (ReLU) is as follows:
f(x)=max(0,x)(5)
wherein x represents the output value of the convolution layer, and the problem of gradient disappearance can be overcome by using a linear rectification function (ReLU), so that the training speed of the network model is accelerated;
the normalized exponential function (softmax) principle is as follows:
wherein ,zi For the output value of the ith node, C is the number of output nodes, namely the number of classified categories, and the output value can be converted into [0,1 ] through a normalized exponential function]Probability distribution over a range;
the fire module (fire module) includes:
an extrusion layer (squeeze) and an expansion layer (expansion), wherein the extrusion layer is a convolution layer formed by a group of 1×1 convolutions, the expansion layer is formed by a group of 1×1 convolutions and a group of 3×3 convolutions, and two output results of the expansion layer are combined to be used as the output of a fire module (fire module);
furthermore, the crack detection model training method comprises the following steps:
s61, manufacturing crack and non-crack data sets;
s62, initializing a weight of the network;
s63, inputting the data set into an initialized SqueezeNet network model, and obtaining an output result through forward propagation of a convolution layer, a fire module (fire module), a down sampling layer and a full connection layer;
s64, normalizing by using a normalization exponential function (softmax), and converting the output value of the upper layer into a class probability value;
s65, calculating errors of the crack sample image detection results by using the cross entropy loss function;
s66, when the error is larger than a preset expected value, updating the weight according to the error, training the network, and ending training when the error is equal to or smaller than the preset expected value;
wherein, the step S61 of manufacturing the crack and non-crack data set includes:
and cutting off the line image obtained by the fitting of the S5, and manually classifying the line image into a crack data set and a non-crack data set.
With reference to the first aspect, further, the output result of step S7 includes:
and if the crack is not generated, outputting to display that the crack is not generated, if the crack is generated, outputting to display that the crack exists, marking each crack, and outputting the width, the height and the length-width ratio of the crack.
With reference to the first aspect, further, the capturing an image of the diamond saw blade in step S1 includes:
the camera shooting is used, the edge part of the diamond saw blade is placed in a camera shooting area, the diamond saw blade is divided into a plurality of parts in equal proportion according to the arc length which can be shot by the camera and the specification of the diamond saw blade, and then the diamond saw blade is rotated to shoot the edge part of each part.
In a second aspect, the present invention provides a machine vision-based crack detection device for a diamond saw blade, comprising:
the image acquisition module is used for shooting images of the diamond saw blade;
the cutting edge cutting module is used for preprocessing the diamond saw blade image and cutting the preprocessed diamond saw blade image to obtain a cutting edge image;
the image enhancement module is used for carrying out frequency domain processing on the blade image and enhancing crack details;
the crack screening module is used for carrying out crack fitting and screening on the blade images processed by the frequency domain;
the model training module is used for making a data set and training the SquezeNet neural network to obtain an optimal network model;
the crack detection module is used for cutting out candidate crack pictures and inputting a crack detection model for detection;
and the result output module is used for outputting a crack detection result.
Compared with the prior art, the invention has the advantages that: the detail of the crack lines in the diamond saw blade edge image is enhanced by using Fourier transformation, so that the crack lines are extracted more accurately, and the cut candidate cracks are distinguished again by introducing a SquezeNet model, so that the traditional image processing method and the deep learning method are combined, and the diamond saw blade crack detection method based on machine vision is constructed. The method can realize real-time and accurate detection of the cracks of the diamond saw blade, and has stronger robustness.
Drawings
FIG. 1 is a machine vision based method for detecting cracks in a diamond saw blade;
FIG. 2 is a diagram of a SquezeNet neural network;
FIG. 3 is a fire module (fire module) architecture in a SqueezeNet neural network;
FIG. 4 is a SquezeNet network model training process;
FIG. 5 is a block diagram of a machine vision based diamond saw blade crack detection device;
fig. 6 is a graph of results obtained using a machine vision based diamond saw blade crack detection method.
Detailed Description
The invention will be further described with reference to the accompanying drawings.
Example 1:
referring to fig. 1, a machine vision-based diamond saw blade crack detection method includes the steps of:
s1, shooting a diamond saw blade image;
s2, preprocessing the diamond saw blade image;
s3, cutting the preprocessed diamond saw blade image to obtain a blade image;
s4, performing frequency domain processing on the blade image;
s5, performing crack fitting and screening on the blade image processed in the S4;
s6, cutting out candidate crack images and inputting a crack detection model for detection;
s7, outputting a result.
Further, the capturing the image of the diamond saw blade in the step S1 includes:
the camera shooting is used, the edge part of the diamond saw blade is placed in a camera shooting area, the diamond saw blade is divided into a plurality of parts in equal proportion according to the arc length which can be shot by the camera and the specification of the diamond saw blade, and then the diamond saw blade is rotated to shoot the edge part of each part.
Further, the preprocessing the diamond saw blade image in the step S2 includes:
obtaining a foreground target image through threshold segmentation, denoising the foreground target image by adopting median filtering, and strengthening image details by using an enhancement operator, wherein the principle of the median filtering is as follows:
wherein ,is the image after median filtering, g (S, t) is the original image, S xy A set of coordinates representing a rectangular sub-image window (neighborhood) of size mxn centered at a point (x, y), m, n being the width and height of the rectangular sub-image window, both being odd integers;
cutting the preprocessed diamond saw blade image in the step S3 to obtain a blade image, wherein the cutting blade image comprises the following steps:
and setting a threshold value by utilizing the pixel value difference between the edge part and other parts in the preprocessed diamond saw blade image, obtaining images of other parts of the diamond saw blade by using binarization segmentation, and subtracting the images of other parts of the diamond saw blade from the preprocessed diamond saw blade image to obtain the diamond saw blade edge part image.
Further, the step S4 of performing frequency domain processing on the blade image includes:
the method comprises the steps of converting Fourier transform into a frequency domain, calculating an image by using a Gaussian filter, enhancing high-frequency information, and then performing inverse Fourier transform on the image to convert the image into a spatial domain, wherein the Fourier transform and the inverse Fourier transform are two-dimensional discrete Fourier transform and inverse Fourier transform, and the principle is as follows:
let F (x, y) denote an image of size mxn, M being the width of the image and N being the height of the image, wherein x=0, 1,2, …, M-1 and y=0, 1,2, …, N-1, the two-dimensional discrete fourier transform being denoted F (u, v), the formula:
where u=0, 1,2, …, M-1, v=0, 1,2, …, N-1, the two variables being coordinates in the frequency domain;
the inverse transform formula is:
where x=0, 1,2, …, M-1, y=0, 1,2, …, N-1, the two variables being coordinates in the spatial domain;
the gaussian filtering principle is as follows:
where (x, y) is the coordinates of a point in the image and σ is the standard deviation.
Further, the step S5 of performing crack fitting and screening on the blade image processed in the step S4 includes:
fitting the lines on the edge image processed in the frequency domain, setting a length and width threshold, extracting the lines in the edge image processed in the step S4, arranging the lines from long to short according to the length, selecting the lines from long to short according to the number of preset candidate cracks as candidate cracks, and entering the next step of detection.
Further, the step S6 of clipping the candidate crack image and inputting the candidate crack image into a crack detection model for detection includes:
cutting off the selected candidate cracks, and inputting the cut candidate cracks into an obtained crack detection model for detection;
the crack detection model is a SquezeNet model, see FIG. 2, and the structure of the SquezeNet neural network graph comprises:
the method comprises the steps of using a linear rectification function (ReLU) as an activation function after each convolution layer, connecting an exit layer (dropout) with a loss rate of 0.5 after a ninth layer fire module (fire module) to prevent overfitting, finally normalizing by using a normalization index function (softmax), converting the output value of a previous layer network into probabilities of two categories of cracks and non-cracks, and selecting the category with the highest probability as a prediction result, wherein the principle of the linear rectification function (ReLU) is as follows:
f(x)=max(0,x)(11)
wherein x represents the output value of the convolution layer, and the problem of gradient disappearance can be overcome by using a linear rectification function (ReLU), so that the training speed of the network model is accelerated;
the normalized exponential function (softmax) principle is as follows:
wherein ,zi For the output value of the ith node, C is the number of output nodes, namely the number of classified categories, and the output value can be converted into [0,1 ] through a normalized exponential function]Probability distribution over a range;
referring to fig. 3, the fire module (fire module) includes:
an extrusion layer (squeeze) and an expansion layer (expansion), wherein the extrusion layer is a convolution layer formed by a group of 1×1 convolutions, the expansion layer is formed by a group of 1×1 convolutions and a group of 3×3 convolutions, and two output results of the expansion layer are combined to be used as the output of a fire module (fire module);
referring to fig. 4, the crack detection model training method includes the steps of:
s61, manufacturing crack and non-crack data sets;
s62, initializing a weight of the network;
s63, inputting the data set into an initialized SqueezeNet network model, and obtaining an output result through forward propagation of a convolution layer, a fire module (fire module), a down sampling layer and a full connection layer;
s64, normalizing by using a normalization exponential function (softmax), and converting the output value of the upper layer into a class probability value;
s65, calculating errors of the crack sample image detection results by using the cross entropy loss function;
s66, when the error is larger than a preset expected value, updating the weight according to the error, training the network, and ending training when the error is equal to or smaller than the preset expected value;
wherein, the step S61 of manufacturing the crack and non-crack data set includes:
and cutting off the line image obtained by the fitting of the S5, and manually classifying the line image into a crack data set and a non-crack data set.
Further, the output result of the step S7 includes:
and if the crack is not generated, outputting to display that the crack is not generated, if the crack is generated, outputting to display that the crack exists, marking each crack, and outputting the width, the height and the length-width ratio of the crack.
Example 2:
referring to fig. 5, a block diagram of a machine vision-based diamond saw blade crack detection device includes:
the image acquisition module is used for shooting images of the diamond saw blade;
the cutting edge cutting module is used for preprocessing the diamond saw blade image and cutting the preprocessed diamond saw blade image to obtain a cutting edge image;
the image enhancement module is used for carrying out frequency domain processing on the blade image and enhancing crack details;
the crack screening module is used for carrying out crack fitting and screening on the blade images processed by the frequency domain;
the model training module is used for making a data set and training the SquezeNet neural network to obtain an optimal network model;
the crack detection module is used for cutting out candidate crack pictures and inputting a crack detection model for detection;
and the result output module is used for outputting a crack detection result, outputting and displaying no crack if no crack exists, outputting and displaying that a crack exists if the crack exists, marking the crack, and outputting the width, the height and the length-width ratio of the crack.
Example 3:
referring to fig. 6, a diamond saw blade is taken as an example, and fig. 6 shows the detection result of the diamond saw blade after the treatment by the method of the present invention, it can be seen that the cracks in the diamond saw blade are accurately identified and marked, and the width, height, length, width and height parameters of each crack are also displayed, which illustrates the effectiveness, accuracy and reliability of the proposed method. In addition, the model used by the invention is a lightweight model, so the method provided by the invention can be flexibly deployed on hardware with limited memory to realize real-time detection.
The above embodiments are only for illustrating the present invention, wherein each implementation step of the method may be changed, and any modification, equivalent change, improvement, etc. made on the basis of the technical solution of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. The machine vision-based diamond saw blade crack detection method is characterized by comprising the following steps of:
s1, shooting a diamond saw blade image;
s2, preprocessing the diamond saw blade image;
s3, cutting the preprocessed diamond saw blade image to obtain a blade image;
s4, performing frequency domain processing on the blade image;
s5, performing crack fitting and screening on the blade image processed in the S4;
s6, cutting out candidate crack images and inputting a crack detection model for detection;
s7, outputting a result.
2. The machine vision based diamond saw blade crack detection method according to claim 1, wherein the preprocessing of the diamond saw blade image in step S2 comprises:
obtaining a foreground target image through threshold segmentation, denoising the foreground target image by adopting median filtering, and strengthening image details by using an enhancement operator, wherein the principle of the median filtering is as follows:
wherein ,is the image after median filtering, g (S, t) is the original image, S xy A set of coordinates representing a rectangular sub-image window of size mxn centered at a point (x, y), m, n being the width and height of the rectangular sub-image window, both being odd integers;
cutting the preprocessed diamond saw blade image in the step S3 to obtain a blade image, wherein the cutting blade image comprises the following steps:
and setting a threshold value by utilizing the pixel value difference between the edge part and other parts in the preprocessed diamond saw blade image, obtaining images of other parts of the diamond saw blade by using binarization segmentation, and subtracting the images of other parts of the diamond saw blade from the preprocessed diamond saw blade image to obtain the diamond saw blade edge part image.
3. The machine vision-based diamond saw blade crack detection method according to claim 1, wherein the performing frequency domain processing on the blade image in step S4 includes:
the obtained blade image is subjected to color inversion, is converted into a frequency domain through Fourier transformation, is calculated by using a Gaussian filter, enhances high-frequency information, is subjected to inverse Fourier transformation, and is converted into a spatial domain, wherein the Fourier transformation and the inverse Fourier transformation are two-dimensional discrete Fourier transformation and inverse Fourier transformation, and the principle is as follows:
let F (x, y) denote an image of size mxn, M being the width of the image and N being the height of the image, wherein x=0, 1,2, …, M-1 and y=0, 1,2, …, N-1, the two-dimensional discrete fourier transform being denoted F (u, v), the formula:
where u=0, 1,2, …, M-1, v=0, 1,2, …, N-1, the two variables being coordinates in the frequency domain;
the inverse transform formula is:
where x=0, 1,2, …, M-1, y=0, 1,2, …, N-1, the two variables being coordinates in the spatial domain;
the gaussian filtering principle is as follows:
where (x, y) is the coordinates of a point in the image and σ is the standard deviation.
4. The machine vision-based diamond saw blade crack detection method according to claim 1, wherein the step S5 of performing crack fitting and screening on the blade image processed by S4 comprises:
fitting the lines on the edge image processed in the frequency domain, setting a length and width threshold, extracting the lines in the edge image processed in the step S4, arranging the lines from long to short according to the length, selecting the lines from long to short according to the number of preset candidate cracks as candidate cracks, and entering the next step of detection.
5. The machine vision-based diamond saw blade crack detection method according to claim 1, wherein the cutting out the candidate crack image and inputting the crack detection model for detection in step S6 comprises:
cutting off the selected candidate cracks, and inputting the cut candidate cracks into a crack detection model for detection, wherein the crack detection model is a SquezeNet model, and the structure of the crack detection model comprises the following components:
the method comprises the steps of using a linear rectification function as an activation function after each convolution layer, connecting an exit layer with a loss rate of 0.5 after a ninth layer fire module to prevent overfitting, finally normalizing by using a normalization exponential function, converting the output value of a previous layer of network into probabilities of two categories of cracks and non-cracks, and selecting the category with the highest probability as a prediction result, wherein the principle of the linear rectification function is as follows:
f(x)=max(0,x)(5)
wherein x represents the output value of the convolution layer, and the problem of gradient disappearance can be overcome by using a linear rectification function, so that the training speed of the network model is increased;
the normalized exponential function principle is as follows:
wherein ,zi For the output value of the ith node, C is the number of output nodes, namely the number of classified categories, and the output value can be converted into [0,1 ] through a normalized exponential function]Probability distribution over a range;
the fire module includes:
the extrusion layer is a convolution layer formed by a group of 1×1 convolutions, the expansion layer is formed by a group of 1×1 convolutions and a group of 3×3 convolutions, and two output results of the expansion layer are combined to be used as the output of the fire module;
furthermore, the crack detection model training method comprises the following steps:
s61, manufacturing crack and non-crack data sets;
s62, initializing a weight of the network;
s63, inputting the data set into the initialized SqueezeNet network model, and obtaining an output result through forward propagation of a convolution layer, a fire module, a down sampling layer and a full connection layer;
s64, normalizing by using a normalization exponential function, and converting the output value of the upper layer into a class probability value;
s65, calculating errors of the crack sample image detection results by using the cross entropy loss function;
s66, when the error is larger than a preset expected value, updating the weight according to the error, training the network, and ending training when the error is equal to or smaller than the preset expected value;
wherein, the step S61 of manufacturing the crack and non-crack data set includes:
and cutting off the line image obtained by the fitting of the S5, and manually classifying the line image into a crack data set and a non-crack data set.
6. The machine vision-based diamond saw blade crack detection method according to claim 1, wherein the output result of step S7 includes:
and if the crack is not generated, outputting to display that the crack is not generated, if the crack is generated, outputting to display that the crack exists, marking each crack, and outputting the width, the height and the length-width ratio of the crack.
7. The machine vision-based diamond saw blade crack detection method according to claim 1, wherein the capturing the image of the diamond saw blade in step S1 comprises:
the camera shooting is used, the edge part of the diamond saw blade is placed in a camera shooting area, the diamond saw blade is divided into a plurality of parts in equal proportion according to the arc length which can be shot by the camera and the specification of the diamond saw blade, and then the diamond saw blade is rotated to shoot the edge part of each part.
8. Diamond saw blade crack detection device based on machine vision, characterized by comprising:
the image acquisition module is used for shooting images of the diamond saw blade;
the cutting edge cutting module is used for preprocessing the diamond saw blade image and cutting the preprocessed diamond saw blade image to obtain a cutting edge image;
the image enhancement module is used for performing frequency domain processing on the blade image;
the crack screening module is used for carrying out crack fitting and screening on the blade images processed by the frequency domain;
the model training module is used for making a data set and training the SquezeNet neural network to obtain an optimal network model;
the crack detection module is used for cutting out candidate crack pictures and inputting a crack detection model for detection;
and the result output module is used for outputting a crack detection result.
CN202310968271.5A 2023-08-03 2023-08-03 Diamond saw blade crack detection method and device based on machine vision Pending CN116993696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310968271.5A CN116993696A (en) 2023-08-03 2023-08-03 Diamond saw blade crack detection method and device based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310968271.5A CN116993696A (en) 2023-08-03 2023-08-03 Diamond saw blade crack detection method and device based on machine vision

Publications (1)

Publication Number Publication Date
CN116993696A true CN116993696A (en) 2023-11-03

Family

ID=88533446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310968271.5A Pending CN116993696A (en) 2023-08-03 2023-08-03 Diamond saw blade crack detection method and device based on machine vision

Country Status (1)

Country Link
CN (1) CN116993696A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109637660A (en) * 2018-12-19 2019-04-16 新绎健康科技有限公司 A kind of lingual diagnosis analysis method and system based on depth convolutional neural networks
CN110142228A (en) * 2019-06-01 2019-08-20 哈尔滨理工大学 Saw blade crack detection identifies sorting system and method for sorting
CN110210407A (en) * 2019-06-04 2019-09-06 武汉科技大学 A kind of Misty Image well-marked target detection method
CN114049340A (en) * 2021-11-22 2022-02-15 江苏科技大学 Diamond saw wire abrasion on-line detection method and device based on machine vision
CN114723701A (en) * 2022-03-31 2022-07-08 南通博莹机械铸造有限公司 Gear defect detection method and system based on computer vision
CN114755243A (en) * 2022-04-15 2022-07-15 翊腾电子科技(昆山)有限公司 FPC connector surface crack detection method based on machine vision

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109637660A (en) * 2018-12-19 2019-04-16 新绎健康科技有限公司 A kind of lingual diagnosis analysis method and system based on depth convolutional neural networks
CN110142228A (en) * 2019-06-01 2019-08-20 哈尔滨理工大学 Saw blade crack detection identifies sorting system and method for sorting
CN110210407A (en) * 2019-06-04 2019-09-06 武汉科技大学 A kind of Misty Image well-marked target detection method
CN114049340A (en) * 2021-11-22 2022-02-15 江苏科技大学 Diamond saw wire abrasion on-line detection method and device based on machine vision
CN114723701A (en) * 2022-03-31 2022-07-08 南通博莹机械铸造有限公司 Gear defect detection method and system based on computer vision
CN114755243A (en) * 2022-04-15 2022-07-15 翊腾电子科技(昆山)有限公司 FPC connector surface crack detection method based on machine vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
姜帅: "基于深度学习的金刚石锯片裂纹检测方法研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》, 15 February 2021 (2021-02-15), pages 8 - 11 *
王月 等: "基于SqueezeNet的混凝土表面裂纹检测研究", 《大连民族大学学报》, vol. 23, no. 5, 30 September 2021 (2021-09-30), pages 458 - 462 *

Similar Documents

Publication Publication Date Title
CN111402248B (en) Power transmission line wire defect detection method based on machine vision
CN108562589B (en) Method for detecting surface defects of magnetic circuit material
CN110070008B (en) Bridge disease identification method adopting unmanned aerial vehicle image
CN110264448B (en) Insulator fault detection method based on machine vision
CN111784633B (en) Insulator defect automatic detection algorithm for electric power inspection video
CN111797890A (en) Method and system for detecting defects of power transmission line equipment
CN111008961B (en) Transmission line equipment defect detection method and system, equipment and medium thereof
CN111652098B (en) Product surface defect detection method and device
CN112233067A (en) Hot rolled steel coil end face quality detection method and system
CN111179250A (en) Industrial product defect detection system based on multitask learning
CN105931246A (en) Fabric flaw detection method based on wavelet transformation and genetic algorithm
CN113177924A (en) Industrial production line product flaw detection method
CN116071315A (en) Product visual defect detection method and system based on machine vision
CN115639248A (en) System and method for detecting quality of building outer wall
CN117455917B (en) Establishment of false alarm library of etched lead frame and false alarm on-line judging and screening method
CN110276747B (en) Insulator fault detection and fault rating method based on image analysis
CN110751667A (en) Method for detecting infrared dim small target under complex background based on human visual system
CN114359167A (en) Insulator defect detection method based on lightweight YOLOv4 in complex scene
CN111915565B (en) Method for analyzing cracks of porcelain insulator of power transmission and transformation line in real time based on YOLACT algorithm
CN113160209A (en) Target marking method and target identification method for building facade damage detection
CN117351472A (en) Tobacco leaf information detection method and device and electronic equipment
CN112750113A (en) Glass bottle defect detection method and device based on deep learning and linear detection
CN116485802A (en) Insulator flashover defect detection method, device, equipment and storage medium
CN116993696A (en) Diamond saw blade crack detection method and device based on machine vision
CN115797314A (en) Part surface defect detection method, system, equipment and storage medium

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