CN110687120A - Flange appearance quality detecting system - Google Patents

Flange appearance quality detecting system Download PDF

Info

Publication number
CN110687120A
CN110687120A CN201910882455.3A CN201910882455A CN110687120A CN 110687120 A CN110687120 A CN 110687120A CN 201910882455 A CN201910882455 A CN 201910882455A CN 110687120 A CN110687120 A CN 110687120A
Authority
CN
China
Prior art keywords
module
flange
image
parameter
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
CN201910882455.3A
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.)
Zhejiang Gongshang University
Original Assignee
Zhejiang Gongshang University
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 Zhejiang Gongshang University filed Critical Zhejiang Gongshang University
Priority to CN201910882455.3A priority Critical patent/CN110687120A/en
Publication of CN110687120A publication Critical patent/CN110687120A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/045Combinations of 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
    • 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/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • 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
    • 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/20081Training; Learning
    • 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/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Abstract

The invention relates to the technical field of flange detection, in particular to a flange appearance quality detection system. The flange type data acquisition and analysis system comprises an image acquisition unit, an image analysis module and a quality data server, wherein the image acquisition unit and the image analysis module realize data interaction between the image analysis module and the quality data server through a data transmission module, the image analysis module comprises an image processing module and a flange type determination module, the image processing module is used for processing image data acquired by the image acquisition unit, and the flange type determination module is used for determining the type of a flange. In the flange appearance quality detection system, machine vision is applied to detection of various workpieces in a factory, and various appearance indexes of the workpieces are detected according to different detection requirements of workpiece classification, so that production is intelligently enhanced, industrial automation is realized, detection efficiency and detection precision can be greatly improved, and the requirements of an intelligent factory are met.

Description

Flange appearance quality detecting system
Technical Field
The invention relates to the technical field of flange detection, in particular to a flange appearance quality detection system.
Background
In order to ensure the quality of workpieces in industrial production, the quality detection of the workpieces is an indispensable link, the quality detection of produced products by quality departments of most small and medium-sized enterprises still remains on the level of manual detection, and the traditional detection means has the following defects: (1) the detection time is long; (2) the detection result is often related to the judgment of human eyes, and the detection precision is low; (3) the working attitude of the detector can influence the accuracy of the detection result; (4) human eyes are easily fatigued, resulting in a reduction in detection accuracy. With the development of scientific technology, intelligent manufacturing and intelligent factories are gradually developed, the production automation degree is gradually improved, the requirements of the market on the quality, the precision and the performance of products are higher and higher, and the traditional detection means can not meet the requirements of modernization.
Disclosure of Invention
The present invention is directed to a flange appearance quality inspection system that addresses one or more of the deficiencies set forth in the background above.
In order to achieve the above purpose, the present invention provides a flange appearance quality detection system, which includes an image acquisition unit, an image analysis module and a quality data server, wherein the image acquisition unit and the image analysis module, and the image analysis module and the quality data server realize data interaction through a data transmission module, the image analysis module includes an image processing module and a flange type determination module, the image processing module is configured to process image data acquired by the image acquisition unit, the flange type determination module is configured to determine a flange type, and the flange type determination module includes a manual selection module and an automatic identification module.
Preferably, the manual selection module comprises a flange type selection module, a parameter uploading module and a parameter downloading module, the flange type selection module is used for selecting the type of the flange to be detected, the parameter uploading module is used for uploading the selected flange type parameters to the quality data server, and the parameter downloading module is used for acquiring the specific size data requirements and tolerance requirements of each appearance parameter corresponding to the selected flange type parameters from the quality data server.
Preferably, the flange category selecting module comprises a standard number selecting module, a model selecting module, a nominal size selecting module and a nominal pressure selecting module, the standard number selecting module is used for selecting a standard number of a flange, the model selecting module is used for selecting a model of the flange, the nominal size selecting module is used for selecting a nominal size of the flange, and the nominal pressure selecting module is used for selecting a nominal pressure of the flange.
Preferably, the automatic identification module comprises a flange type identification module, a parameter import module and a judgment parameter module, the flange type identification module is used for identifying the type of the flange, the parameter import module is used for importing the identified flange parameters into the quality data server, and the judgment parameter module is used for judging and acquiring the specific size data requirements and tolerance requirements of each appearance parameter corresponding to the selected flange type parameters from the quality data server;
the image training module comprises a convolutional neural network and a residual error unit;
wherein the convolutional neural network comprises the following poses:
posture one: an input layer: the input layer has no input value and only has one output vector, and the size of the vector is the size of the picture, namely a 28-by-28 matrix;
and (5) posture II: and (3) rolling layers: the input of the convolutional layer is from an input layer or a sampling layer, each characteristic map of the convolutional layer is obtained by convolving all maps of the previous layer by different convolution kernels, adding an offset after corresponding elements are accumulated, and solving sigmod;
posture three: sampling layer: the sampling layer is used for sampling the previous map, wherein the sampling mode is that aggregation statistics is carried out on adjacent small regions of the previous map, the size of each region is scale, the maximum value of the small regions is taken in some implementations, and the average value of 2 x 2 small regions is adopted in the toolbox;
the residual unit combination is an error value obtained by an output value and a quasi-standard value, the residual of each middle layer is derived from the weighted sum of the residual of the next layer, and the residual of the output layer is calculated as follows:
Figure BDA0002206286520000021
preferably, the flange type identification module comprises an image acquisition and detection module, an image training module, an optimization model module and a network parameter determination module, wherein the image acquisition and detection module is used for acquiring a plurality of images of each type of flange to be detected, the image training module is used for extracting network parameters under an optimal training model, the optimization model module is used for storing the network parameters under the optimal model, and the network parameter determination module is used for testing the acquired images and optimizing and determining the network parameters.
Preferably, the image processing module comprises a graying processing module, an Otsu threshold method module, a Gaussian filtering processing module, a mean square error module, a binary segmentation module, a foreground region searching module and an image positioning module, wherein the graying processing module is used for converting an RGB image into a grayscale image, and the formula of the graying processing module is as follows:
f(i,j)=(R(i,,j)+G(i,,j)+B(i,j))/3,
the Otsu threshold method module is used for performing binary segmentation on the gray level image and searching all selectable thresholds, the Gaussian filtering processing module is used for performing Gaussian filtering processing on the image, and the formula is as follows:
where h is called the kernel of the filter i.e. the weights,
the mean square error module is used for determining the optimal segmentation threshold of the image, the binary segmentation module is used for performing binary segmentation on the image, and the method comprises the following steps:
①, using the average value and variance of image gray scale to calculate the average value and variance of gray scale for small blocks of image, setting a threshold value T, which is 3x3 block, so it is in 8 neighborhood, i.e. T is 4, if V isi>4, the small block is left as a target, is marked as 1 and is stored in the matrix A; if Vi<4, the block is taken as background and is removed, and the block is marked as 0 and also exists in the matrix A;
②, and
Figure BDA0002206286520000032
performing open operation on a known binary matrix A as a structural element to obtain a matrix B;
③, and
Figure BDA0002206286520000033
performing closed operation on the binary matrix B for the structural element to obtain a matrix C, wherein the matrix C is a binary matrix, the binary matrix only contains 1 and 0, the corresponding element of 1 is left as a target, and the corresponding element of 0 is removed as a background;
the foreground area searching module is used for searching all inner layers and outer layer contour lines of an image foreground area, the image positioning module is used for positioning the inner diameter and the outer diameter of a flange and the diameter of a bolt hole, and detection parameters to be obtained by side images are as follows: flange thickness, flange height.
Preferably, the image processing module comprises the following steps:
①, firstly converting the RGB image into a gray image, and then performing Gaussian filtering with a template of 3X 3;
②, performing binary segmentation on the gray level image, searching all selectable thresholds by adopting an Otsu threshold method, determining an optimal segmentation threshold according to the maximum value of the mean square error, and performing binary segmentation to segment an image foreground region larger than the segmentation threshold;
③, searching all inner layers and outer layer contour lines of the image foreground area;
④, the detection requirements in the front picture of the flange mainly include that the inner diameter and the outer diameter of the flange, the diameter of each bolt hole and the like are positioned, and the flange is circular, so that the maximum inscribed circle based on the sub-pixel level of each contour line is searched, the circle center coordinate and the circle diameter of the inscribed circle of each contour line are positioned, and the detection parameters of the flange thickness and the flange height can be obtained in the picture of the side surface of the flange;
⑤, according to the flange type determining module obtaining the parameters of each parameter size of the flange appearance, such as the size of the outer diameter, the size of the inner diameter, the diameter size of the bolt hole and the like from the quality data server, judging which parameter category the diameter of each inscribed circle obtained belongs to, thereby determining that each outline inscribed circle belongs to the outline of the flange outer circle, the outline of the flange inner circle or the outline of the flange bolt hole, comparing the flange appearance quality parameter obtained by the flange front side picture detection with each parameter required by the model flange standard obtained by the quality data server, detecting whether each parameter is in the allowable range of the tolerance defined by the standard, if so, obtaining the conclusion that the flange appearance quality is qualified, if not, listing the reasons of the specific disqualification and the unqualified conclusion, and then uploading each detected parameter and conclusion of the flange to the quality data server.
Compared with the prior art, the invention has the beneficial effects that:
1. in the flange appearance quality detection system, machine vision is applied to detection of various workpieces in a factory, and various appearance indexes of the workpieces are detected according to different detection requirements of workpiece classification, so that production is intelligently enhanced, industrial automation is realized, detection efficiency and detection precision can be greatly improved, and the requirements of an intelligent factory are met.
2. In the flange appearance quality detection system, the detection data are stored by the server uploaded through the network, so that a quality inspector, a quality detection responsible person, a manufacturer and other personnel with operation authority can check the detection data, corresponding analysis charts, statistical information and the like through the browser and the mobile phone terminal in time.
3. In the flange appearance quality detection system, product quality data are stored in a database of a server side, and subsequent further big data tracking and analysis are facilitated, so that preparation can be made for further improving the product quality.
Drawings
FIG. 1 is a general framework of the present invention;
FIG. 2 is a schematic diagram of an overall module of the present invention;
FIG. 3 is a diagram of an image analysis module of the present invention;
FIG. 4 is a block diagram of a flange type determination module of the present invention;
FIG. 5 is a diagram of a manual selection module of the present invention;
FIG. 6 is a block diagram of a select flange class module of the present invention;
FIG. 7 is a diagram of an auto-id module of the present invention;
FIG. 8 is a block diagram of a flange type identification module of the present invention;
FIG. 9 is a block diagram of an image processing module according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a flange appearance quality detection system, which comprises an image acquisition unit, an image analysis module and a quality data server, wherein the image acquisition unit, the image analysis module and the quality data server realize data interaction through a data transmission module, the image analysis module comprises an image processing module and a flange type determination module, the image processing module is used for processing image data acquired by the image acquisition unit, the flange type determination module is used for determining the type of a flange, and the flange type determination module comprises a manual selection module and an automatic identification module.
In this embodiment, the image acquisition unit includes detecting support, industrial camera, bar light source, backlight for the collection and the transmission of image. The flange to be detected is placed on a support on the detection table, a calibrated industrial camera is arranged right above the flange to be detected, a backlight source is adopted and used for shooting a picture of the front face of the flange, and a calibrated industrial camera is arranged on the side of the flange and used for shooting a picture of the side face of the flange by using bar-shaped light.
Furthermore, the quality data server is developed based on JAVA, Mysql is used as a database for storing flange data, the flange appearance detection data and detection results transmitted from the image analysis and detection unit are stored in the database through the data server, quality inspectors, quality inspection responsible persons, operators with operation authority such as manufacturers can log in a flange quality data server platform through a browser or a mobile phone APP, all flange appearance quality data and detection result information records are checked, and various analysis data and reports can be checked.
Referring to fig. 5 and 6, the manual selection module includes a flange category selection module, a parameter uploading module, and a parameter downloading module, the flange category selection module is configured to select a flange category to be detected, the parameter uploading module is configured to upload a selected flange category parameter to the quality data server, and the parameter downloading module is configured to obtain a specific size data requirement and a tolerance requirement of each appearance parameter corresponding to the selected flange category parameter from the quality data server.
In this embodiment, the flange category selecting module includes a standard number selecting module, a model selecting module, a nominal size selecting module, and a nominal pressure selecting module, where the standard number selecting module is used to select a standard number of a flange, the model selecting module is used to select a model of the flange, the nominal size selecting module is used to select a nominal size of the flange, and the nominal pressure selecting module is used to select a nominal pressure of the flange.
The specific flow of the manual selection module is as follows: before detection, the type of the flange to be detected is selected on a UI interface of an analysis detection unit, the specific information of the type is four items of a standard number, a model, a nominal size and a nominal pressure of the flange, then the four items of parameters are uploaded to a flange quality data server, and the server goes to a flange type database to obtain the specific size data requirements and tolerance requirements of various appearance parameters corresponding to the flange under the type and returns the specific size data requirements and tolerance requirements to an image analysis detection unit.
Referring to fig. 7 and 8, the automatic identification module includes a flange type identification module, a parameter import module, and a parameter judgment module, where the flange type identification module is configured to identify a flange type, the parameter import module is configured to import an identified flange parameter into the quality data server, and the parameter judgment module is configured to judge and acquire a specific size data requirement and a tolerance requirement of each external parameter corresponding to a selected flange type parameter from the quality data server.
In this embodiment, the flange type identification module includes an image acquisition and detection module, an image training module, an optimization model module, and a network parameter determination module, where the image acquisition and detection module is configured to acquire a plurality of images of each type of flange to be detected, the image training module is configured to extract network parameters under an optimal training model, the optimization model module is configured to store the network parameters under the optimal model, and the network parameter determination module is configured to test the acquired images and optimize and determine the network parameters.
Furthermore, the image acquisition and detection module acquires a plurality of images of flanges of various types to be detected, and the number of the images of the flanges of each type is not less than 200.
Specifically, the image training module is used for training a convolutional neural network by using 80% of the acquired images, the network comprises the convolutional neural network and a residual unit which are combined into a convolutional residual network, a multi-classification model is constructed by using the convolutional residual network and is trained, and network parameters under the optimal training model are extracted.
Wherein, convolutional neural network includes input layer, convolutional layer and sampling layer, and the input layer: the input layer has no input value and only has one output vector, and the size of the vector is the size of the picture, namely a 28-by-28 matrix; and (3) rolling layers: the input of the convolutional layer is from the input layer or the sampling layer, each characteristic map of the convolutional layer is obtained by convolution of different convolution kernels on all maps of the previous layer and adding an offset after adding corresponding elements, and then sigma is calculated, and the number of maps of the convolutional layer is specified in network initialization, the size of the map of the convolutional layer is determined by the sizes of the convolution kernels and the input map of the previous layer, and if the size of the map of the previous layer is n, and the size of the convolution kernel is k, the size of the map of the layer is (n-k +1), and the sampling layer: the sampling layer is used for sampling the previous map, wherein the sampling mode is that aggregation statistics is carried out on adjacent small regions of the previous map, the size of the region is scale, some implementations are to take the maximum value of the small region, the implementation inside the toolbox is to use the average value of 2 x 2 small regions, it is noted that the calculation windows of convolution are overlapped, the adopted calculation windows are not overlapped, the calculation sampling inside the toolbox is also realized by convolution (conv2(A, K, 'valid')), the convolution kernel is 2 x 2, each element is 1/4, and the overlapped part in the convolution result obtained by calculation is removed.
In addition, the residual unit combination is an error value obtained by the output value and the index value, the residual of each middle layer is derived from the weighted sum of the residual of the next layer, and the residual of the output layer is calculated as follows:
Figure BDA0002206286520000071
the specific working principle of the automatic identification module of the embodiment is as follows: firstly, a plurality of images of flanges of various types to be detected are collected, and the number of the images of the flanges of each type is not less than 200. 80% of the acquired images are then used to train the convolutional neural network. The network comprises a convolution neural network and a residual unit which are combined into a convolution residual network, a multi-classification model is constructed and trained by utilizing the convolution residual network, and network parameters under an optimal training model are extracted; and then continuously optimizing the model by using transfer learning, storing the network parameters under the optimal model, and testing and optimizing the rest 20% of collected images after the network parameters are trained to determine the network parameters. And before detecting the appearance parameters of the flange, sending the front picture of the flange acquired by the image acquisition unit into a convolutional neural network to judge the type of the flange, uploading the specific information of the type to a quality data server, and then sending the quality data server to a flange type database to acquire the specific size data requirements and tolerance requirements of each appearance parameter corresponding to the flange under the type and returning the requirements to an image analysis module.
As shown in fig. 9, the image processing module includes a graying processing module, an oxford threshold method module, a gaussian filter processing module, a mean square error module, a binary segmentation module, a foreground region search module, and an image positioning module, where the graying processing module is configured to convert an RGB image into a grayscale image, the oxford threshold method module is configured to perform binary segmentation on the grayscale image, search all selectable thresholds, the gaussian filter processing module is configured to perform gaussian filter processing on the image, the mean square error module is configured to determine an optimal segmentation threshold of the image, the binary segmentation module is configured to perform binary segmentation on the image, the foreground region search module is configured to search all inner layers and outer layer contours of a foreground region of the image, the image positioning module is configured to position an inner diameter and an outer diameter of a flange and a diameter of a bolt hole, and detection parameters to be obtained by a side image are: flange thickness, flange height.
In this embodiment, the image graying processing module is configured to remove colors in an image and perform image graying processing, and the image graying processing module uses an average value method to obtain a simple average value of the luminances of R, G, B three components in a color image, and outputs the obtained average value as a grayscale value to obtain a grayscale image, where the formula is as follows:
f(i,j)=(R(i,j)+G(i,j)+B(i,j))/3
further, the gaussian filtering processing module adopts a linear filter, and the formula is as follows:
Figure BDA0002206286520000081
where h is called the kernel function of the filter, i.e. the weights.
Specifically, the binary segmentation module image is used for segmenting and edge detecting a grayed image, and the image binarization processing module comprises the following steps:
1) and calculating the average value and the variance of the gray scale of the small blocks of the image by using the average value and the variance of the gray scale of the image, and setting a threshold value T which is 3-by-3 modules and is in an 8-neighborhood, namely T is 4, if V is Vi>4, the small block is left as a target, is marked as 1 and is stored in the matrix A; if Vi<4, the block is taken as background and is removed, and the block is marked as 0 and also exists in the matrix A;
2) to therebyPerforming open operation on a known binary matrix A as a structural element to obtain a matrix B;
3) to thereby
Figure BDA0002206286520000092
And performing closed operation on the binary matrix B for the structural elements to obtain a matrix C, wherein the matrix C is a binary matrix, the binary matrix only contains 1 and 0, the corresponding element of 1 is left as a target, and the corresponding element of 0 is removed as a background.
The average value formula of the image gray scale is as follows:
Figure BDA0002206286520000093
the formula of the variance value of the image gray scale is as follows:
Figure BDA0002206286520000094
the specific working principle of the image processing module of this embodiment is as follows: firstly, converting an RGB image into a gray image, and then performing Gaussian filtering with a template of 3X 3; performing binary segmentation on the gray level image, searching all selectable thresholds by adopting an Otsu threshold method, determining an optimal segmentation threshold according to the maximum value of the mean square error, and performing binary segmentation to segment an image foreground region larger than the segmentation threshold; searching all inner layer and outer layer contour lines of the image foreground area; the detection requirements in the front picture of the flange mainly comprise that the inner diameter and the outer diameter of the flange, the diameter of each bolt hole and the like are positioned and are all circular, so that the maximum inscribed circle of each contour line based on the sub-pixel level is searched, the circle center coordinate and the circle diameter of the inscribed circle of each contour line are positioned, and the detection parameters of the thickness and the height of the flange can be obtained in the picture of the side surface of the flange; according to data such as the size of the outer diameter, the size of the inner diameter, the size of the diameter of a bolt hole and the like of the flange appearance obtained from the quality data server by the flange type determining module, judging which parameter category the diameter of each obtained inscribed circle belongs to, and accordingly determining that each contour inscribed circle belongs to the contour of the outer circle of the flange, the contour of the inner circle of the flange or the contour of the bolt hole of the flange; and comparing the appearance quality parameters of the flange obtained by detecting the picture on the front side of the flange with the parameters required by the standard of the flange of the model obtained by the quality data server, detecting whether the parameters are within the range allowed by the tolerance defined by the standard, if so, obtaining the conclusion that the appearance quality of the flange is qualified, if not, listing the reasons of the specific disqualification and the disqualification conclusion, and then uploading the detection parameters and the conclusion of the flange to the quality data server.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and the preferred embodiments of the present invention are described in the above embodiments and the description, and are not intended to limit the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (7)

1. Flange appearance quality detecting system, including image acquisition unit, image analysis module and quality data server, its characterized in that: the image acquisition unit and the image analysis module, the image analysis module and the quality data server realize data interaction through the data transmission module, the image analysis module comprises an image processing module and a flange type determination module, the image processing module is used for processing image data acquired by the image acquisition unit, the flange type determination module is used for determining the type of a flange, and the flange type determination module comprises a manual selection module and an automatic identification module.
2. A flange appearance quality inspection system according to claim 1, wherein: the manual selection module comprises a flange type selection module, a parameter uploading module and a parameter downloading module, the flange type selection module is used for selecting the type of the flange to be detected, the parameter uploading module is used for uploading the selected flange type parameters to the quality data server, and the parameter downloading module is used for acquiring the specific size data requirements and tolerance requirements of various appearance parameters corresponding to the selected flange type parameters from the quality data server.
3. The flange appearance quality inspection system of claim 2, wherein: the flange type selection module comprises a standard number selection module, a model selection module, a nominal size selection module and a nominal pressure selection module, the standard number selection module is used for selecting the standard number of the flange, the model selection module is used for selecting the model of the flange, the nominal size selection module is used for selecting the nominal size of the flange, and the nominal pressure selection module is used for selecting the nominal pressure of the flange.
4. A flange appearance quality inspection system according to claim 1, wherein: the automatic identification module comprises a flange type identification module, a parameter import module and a judgment parameter module, wherein the flange type identification module is used for identifying the type of the flange, the parameter import module is used for importing the identified flange parameters into the quality data server, and the judgment parameter module is used for judging and acquiring the specific size data requirements and tolerance requirements of various appearance parameters corresponding to the selected flange type parameters from the quality data server;
the image training module comprises a convolutional neural network and a residual error unit;
wherein the convolutional neural network comprises the following poses:
posture one: an input layer: the input layer has no input value and only has one output vector, and the size of the vector is the size of the picture, namely a 28-by-28 matrix;
and (5) posture II: and (3) rolling layers: the input of the convolutional layer is from an input layer or a sampling layer, each characteristic map of the convolutional layer is obtained by convolving all maps of the previous layer by different convolution kernels, adding an offset after corresponding elements are accumulated, and solving sigmod;
posture three: sampling layer: the sampling layer is used for sampling the previous map, wherein the sampling mode is that aggregation statistics is carried out on adjacent small regions of the previous map, the size of each region is scale, the maximum value of the small regions is taken in some implementations, and the average value of 2 x 2 small regions is adopted in the toolbox;
the residual unit combination is an error value obtained by an output value and a quasi-standard value, the residual of each middle layer is derived from the weighted sum of the residual of the next layer, and the residual of the output layer is calculated as follows:
Figure FDA0002206286510000021
5. the flange appearance quality inspection system of claim 4, wherein: the flange type identification module comprises an image acquisition and detection module, an image training module, an optimization model module and a network parameter determination module, wherein the image acquisition and detection module is used for acquiring a plurality of images of various types of flanges to be detected, the image training module is used for extracting network parameters under an optimal training model, the optimization model module is used for storing the network parameters under the optimal model, and the network parameter determination module is used for testing the acquired images and optimizing and determining the network parameters.
6. A flange appearance quality inspection system according to claim 1, wherein: the image processing module comprises a graying processing module, an Otsu threshold method module, a Gaussian filtering processing module, a mean square error module, a binary segmentation module, a foreground area searching module and an image positioning module, wherein the graying processing module is used for converting an RGB image into a grayscale image, and the formula is as follows:
f(i,j)=(R(i,j)+G(i,j)+B(i,j))/3,
the Otsu threshold method module is used for performing binary segmentation on the gray level image and searching all selectable thresholds, the Gaussian filtering processing module is used for performing Gaussian filtering processing on the image, and the formula is as follows:
where h is called the kernel of the filter i.e. the weights,
the mean square error module is used for determining the optimal segmentation threshold of the image, the binary segmentation module is used for performing binary segmentation on the image, and the method comprises the following steps:
①, using the average value and variance of image gray scale to calculate the average value and variance of gray scale for small blocks of image, setting a threshold value T, which is 3x3 block, so it is in 8 neighborhood, i.e. T is 4, if V isi>4, the small block is left as a target, is marked as 1 and is stored in the matrix A; if Vi<4, the block is taken as background and is removed, and the block is marked as 0 and also exists in the matrix A;
②, and
Figure FDA0002206286510000031
performing open operation on a known binary matrix A as a structural element to obtain a matrix B;
③, andperforming closed operation on the binary matrix B for the structural element to obtain a matrix C, wherein the matrix C is a binary matrix, the binary matrix only comprises 1 and 0, and the corresponding element is 1 and is reserved as a targetNext, the corresponding element 0 is removed as a background;
the foreground area searching module is used for searching all inner layers and outer layer contour lines of an image foreground area, the image positioning module is used for positioning the inner diameter and the outer diameter of a flange and the diameter of a bolt hole, and detection parameters to be obtained by side images are as follows: flange thickness, flange height.
7. The flange appearance quality inspection system of claim 6, wherein: the image processing module comprises the following steps:
①, firstly converting the RGB image into a gray image, and then performing Gaussian filtering with a template of 3X 3;
②, performing binary segmentation on the gray level image, searching all selectable thresholds by adopting an Otsu threshold method, determining an optimal segmentation threshold according to the maximum value of the mean square error, and performing binary segmentation to segment an image foreground region larger than the segmentation threshold;
③, searching all inner layers and outer layer contour lines of the image foreground area;
④, the detection requirements in the front picture of the flange mainly include that the inner diameter and the outer diameter of the flange, the diameter of each bolt hole and the like are positioned, and the flange is circular, so that the maximum inscribed circle based on the sub-pixel level of each contour line is searched, the circle center coordinate and the circle diameter of the inscribed circle of each contour line are positioned, and the detection parameters of the flange thickness and the flange height can be obtained in the picture of the side surface of the flange;
⑤, according to the flange type determining module obtaining the parameters of each parameter size of the flange appearance, such as the size of the outer diameter, the size of the inner diameter, the diameter size of the bolt hole and the like from the quality data server, judging which parameter category the diameter of each inscribed circle obtained belongs to, thereby determining that each outline inscribed circle belongs to the outline of the flange outer circle, the outline of the flange inner circle or the outline of the flange bolt hole, comparing the flange appearance quality parameter obtained by the flange front side picture detection with each parameter required by the model flange standard obtained by the quality data server, detecting whether each parameter is in the allowable range of the tolerance defined by the standard, if so, obtaining the conclusion that the flange appearance quality is qualified, if not, listing the reasons of the specific disqualification and the unqualified conclusion, and then uploading each detected parameter and conclusion of the flange to the quality data server.
CN201910882455.3A 2019-09-18 2019-09-18 Flange appearance quality detecting system Pending CN110687120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910882455.3A CN110687120A (en) 2019-09-18 2019-09-18 Flange appearance quality detecting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910882455.3A CN110687120A (en) 2019-09-18 2019-09-18 Flange appearance quality detecting system

Publications (1)

Publication Number Publication Date
CN110687120A true CN110687120A (en) 2020-01-14

Family

ID=69109440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910882455.3A Pending CN110687120A (en) 2019-09-18 2019-09-18 Flange appearance quality detecting system

Country Status (1)

Country Link
CN (1) CN110687120A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112508939A (en) * 2020-12-22 2021-03-16 郑州金惠计算机系统工程有限公司 Flange surface defect detection method, system and equipment
TWI758998B (en) * 2020-12-07 2022-03-21 國立清華大學 Method of identifying flange specification based on augmented reality interface
CN116433700A (en) * 2023-06-13 2023-07-14 山东金润源法兰机械有限公司 Visual positioning method for flange part contour

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04236310A (en) * 1991-01-21 1992-08-25 Kubota Corp Method for discriminating kind of pipe
JPH11241913A (en) * 1998-02-25 1999-09-07 Hitachi Metals Ltd Method for judging variety of work
US20030223639A1 (en) * 2002-03-05 2003-12-04 Vladimir Shlain Calibration and recognition of materials in technical images using specific and non-specific features
JP2007040866A (en) * 2005-08-04 2007-02-15 Dainippon Printing Co Ltd Inspection device and inspection method
CN101738396A (en) * 2008-11-18 2010-06-16 北京凌云光视数字图像技术有限公司 Recheck platform and quality inspection system of prints
US20120134576A1 (en) * 2010-11-26 2012-05-31 Sharma Avinash Automatic recognition of images
CN103207185A (en) * 2012-01-11 2013-07-17 宝山钢铁股份有限公司 Steel coil end portion quality detection system and method thereof
JP2016035396A (en) * 2014-08-01 2016-03-17 Nok株式会社 Work-piece item identifying apparatus
CN105891215A (en) * 2016-03-31 2016-08-24 浙江工业大学 Welding visual detection method and device based on convolutional neural network
CN205861565U (en) * 2016-07-13 2017-01-04 天津日安科技有限公司 A kind of flange vision inspection apparatus
CN108694716A (en) * 2018-05-15 2018-10-23 苏州大学 A kind of workpiece inspection method, model training method and equipment
CN109900711A (en) * 2019-04-02 2019-06-18 天津工业大学 Workpiece, defect detection method based on machine vision

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04236310A (en) * 1991-01-21 1992-08-25 Kubota Corp Method for discriminating kind of pipe
JPH11241913A (en) * 1998-02-25 1999-09-07 Hitachi Metals Ltd Method for judging variety of work
US20030223639A1 (en) * 2002-03-05 2003-12-04 Vladimir Shlain Calibration and recognition of materials in technical images using specific and non-specific features
JP2007040866A (en) * 2005-08-04 2007-02-15 Dainippon Printing Co Ltd Inspection device and inspection method
CN101738396A (en) * 2008-11-18 2010-06-16 北京凌云光视数字图像技术有限公司 Recheck platform and quality inspection system of prints
US20120134576A1 (en) * 2010-11-26 2012-05-31 Sharma Avinash Automatic recognition of images
CN103207185A (en) * 2012-01-11 2013-07-17 宝山钢铁股份有限公司 Steel coil end portion quality detection system and method thereof
JP2016035396A (en) * 2014-08-01 2016-03-17 Nok株式会社 Work-piece item identifying apparatus
CN105891215A (en) * 2016-03-31 2016-08-24 浙江工业大学 Welding visual detection method and device based on convolutional neural network
CN205861565U (en) * 2016-07-13 2017-01-04 天津日安科技有限公司 A kind of flange vision inspection apparatus
CN108694716A (en) * 2018-05-15 2018-10-23 苏州大学 A kind of workpiece inspection method, model training method and equipment
CN109900711A (en) * 2019-04-02 2019-06-18 天津工业大学 Workpiece, defect detection method based on machine vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
全燕鸣: "《机械制造自动化》", 30 June 2008, 华南理工大学出版社 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI758998B (en) * 2020-12-07 2022-03-21 國立清華大學 Method of identifying flange specification based on augmented reality interface
US11703992B2 (en) 2020-12-07 2023-07-18 National Tsing Hua University Method of identifying flange specification based on augmented reality interface
CN112508939A (en) * 2020-12-22 2021-03-16 郑州金惠计算机系统工程有限公司 Flange surface defect detection method, system and equipment
CN112508939B (en) * 2020-12-22 2023-01-20 郑州金惠计算机系统工程有限公司 Flange surface defect detection method, system and equipment
CN116433700A (en) * 2023-06-13 2023-07-14 山东金润源法兰机械有限公司 Visual positioning method for flange part contour
CN116433700B (en) * 2023-06-13 2023-08-18 山东金润源法兰机械有限公司 Visual positioning method for flange part contour

Similar Documents

Publication Publication Date Title
CN110543878B (en) Pointer instrument reading identification method based on neural network
CN110349126B (en) Convolutional neural network-based marked steel plate surface defect detection method
CN109141232B (en) Online detection method for disc castings based on machine vision
CN110806736B (en) Method for detecting quality information of forge pieces of die forging forming intelligent manufacturing production line
CN111325713A (en) Wood defect detection method, system and storage medium based on neural network
CN109584227A (en) A kind of quality of welding spot detection method and its realization system based on deep learning algorithm of target detection
CN109490316A (en) A kind of surface defects detection algorithm based on machine vision
CN105046700B (en) Fruit surface defect detection method and system based on gamma correction and color classification
CN110687120A (en) Flange appearance quality detecting system
CN108074231A (en) A kind of magnetic sheet detection method of surface flaw based on convolutional neural networks
CN111862037A (en) Method and system for detecting geometric characteristics of precision hole type part based on machine vision
CN111899296B (en) Log volume detection method and device based on computer vision
CN105160652A (en) Handset casing testing apparatus and method based on computer vision
CN105574161B (en) A kind of brand logo key element recognition methods, device and system
CN111401419A (en) Improved RetinaNet-based employee dressing specification detection method
CN116645367B (en) Steel plate cutting quality detection method for high-end manufacturing
WO2022236876A1 (en) Cellophane defect recognition method, system and apparatus, and storage medium
CN113554631B (en) Chip surface defect detection method based on improved network
CN104063873A (en) Shaft sleeve part surface defect on-line detection method based on compressed sensing
CN113869162A (en) Violation identification method and system based on artificial intelligence
CN111415339B (en) Image defect detection method for complex texture industrial product
CN113222913B (en) Circuit board defect detection positioning method, device and storage medium
CN110186375A (en) Intelligent high-speed rail white body assemble welding feature detection device and detection method
CN104200215A (en) Method for identifying dust and pocking marks on surface of big-caliber optical element
CN105957116A (en) Dynamic coding point designing and decoding method based on frequency

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200114