CN115760808A - Method, system and device for measuring size of plate glass and readable storage medium - Google Patents

Method, system and device for measuring size of plate glass and readable storage medium Download PDF

Info

Publication number
CN115760808A
CN115760808A CN202211484238.7A CN202211484238A CN115760808A CN 115760808 A CN115760808 A CN 115760808A CN 202211484238 A CN202211484238 A CN 202211484238A CN 115760808 A CN115760808 A CN 115760808A
Authority
CN
China
Prior art keywords
image
plate glass
glass
edge detection
network model
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
CN202211484238.7A
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.)
Hangzhou Jubo Technology Co ltd
Original Assignee
Hangzhou Jubo 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 Hangzhou Jubo Technology Co ltd filed Critical Hangzhou Jubo Technology Co ltd
Priority to CN202211484238.7A priority Critical patent/CN115760808A/en
Publication of CN115760808A publication Critical patent/CN115760808A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P40/00Technologies relating to the processing of minerals
    • Y02P40/50Glass production, e.g. reusing waste heat during processing or shaping
    • Y02P40/57Improving the yield, e-g- reduction of reject rates

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a method, a system and a device for measuring the size of plate glass, comprising the following steps: acquiring an image data set containing plate glass, and preprocessing to obtain a preprocessed image; inputting an image to be detected into a constructed and trained plate glass edge detection network model to obtain an edge detection image; subdividing the edge detection image to obtain a flat glass edge image; detecting and segmenting the edge image of the plate glass to obtain an image of a fit outline area of the plate glass and outline data of the plate glass, and segmenting the outline of the plate glass; and measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the plate glass profile. The size measurement difficulty of the existing computer vision is solved by combining with deep learning, the measurement precision is improved, the non-contact size measurement system and the non-contact size measurement method are applied to the size detection of the plate glass, the production efficiency is improved, and the production safety is ensured.

Description

Method, system and device for measuring size of plate glass and readable storage medium
Technical Field
The invention relates to the technical field of big data, in particular to a method, a system and a device for measuring the size of plate glass and a readable storage medium.
Background
Along with the popularization of automation and intellectualization of industrial production, the fine production requirement in the process of processing and manufacturing the plate glass is higher and higher, and the size requirement for plate glass production is stricter and stricter. In the existing production measurement, the size measurement of the plate glass mainly depends on manual operation, namely, the plate glass is conveyed to a fixed device and is measured by using a physical caliper.
In the existing dimension measuring system based on computer vision, the general detection process is as follows: firstly, feature extraction is carried out on an image to be measured, then whether the extracted features are object edges or not is judged, the edges are reserved, then an object contour is generated according to the object boundary, and finally the spacing distance of the object contour is calculated according to the relation between image pixels and physical dimensions.
But also has the following disadvantages: the method comprises the following steps that (1) plate glass is conveyed to a fixed device through manual operation and is measured through a physical caliper, and in the process, the conditions that the plate glass is easily scratched, and personnel are injured due to glass breakage caused by improper conveyance and the like often exist;
in the existing dimension measuring system based on computer vision, there is an important influence factor: the performance of the object edge detection and dimension measurement system depends on whether the system can sufficiently extract and utilize the relevant characteristic information of the object to be measured from the image in the edge detection link. However, due to some complexity, such as scale change, light source change and noise influence, there is a certain difficulty in extracting the feature information, and the features are set based on artificial priori knowledge, so that there is a great subjectivity, and a certain defect exists in the conventional edge detection, so that there is an error in subsequent contour detection based on the edge detection, and finally, there is an error in the size measurement result.
Disclosure of Invention
The invention provides a method, a system and a device for measuring the size of flat glass and a readable storage medium aiming at the defects in the prior art.
In order to solve the technical problem, the invention is solved by the following technical scheme:
a method for measuring the size of a flat glass comprises the following steps:
acquiring an image data set containing plate glass, and preprocessing all images to obtain preprocessed images;
inputting an image to be detected containing the plate glass into a plate glass edge detection network model which is constructed and trained on the basis of the preprocessed image to obtain an edge detection image containing the plate glass;
subdividing the edge detection image containing the plate glass to obtain a plate glass edge image;
detecting and segmenting the edge image of the plate glass to obtain an attaching contour area image of the plate glass, obtaining plate glass contour data based on the attaching contour area image and storing the plate glass contour data in a point vector mode, outlining the plate glass contour according to stored vector point information and segmenting the plate glass contour;
and measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the plate glass profile.
As an implementation mode, the acquiring an image data set containing a flat glass, and preprocessing all images to obtain a preprocessed image comprises the following steps:
an image containing sheet glass in the image dataset containing sheet glass is obtained using a high resolution CCD area-array camera;
performing image data enhancement processing on the image containing the plate glass to obtain a data enhanced image, wherein the image data enhancement comprises one or two of image geometric enhancement and image color enhancement;
carrying out image edge annotation on the data enhanced image to obtain an annotated image;
dividing the marked image into a training data set and a verification data set according to a preset proportion, wherein the training data set is used for training the edge detection network model of the plate glass, the verification data set is used for verifying the edge detection network model of the plate glass, and the image of the plate glass is collected in real time to serve as detection data.
As an implementation, the following steps are also included:
and performing noise pollution adding treatment on the data enhanced image, and cutting the data enhanced image into sub-images with the size of 960 x 960.
As an implementation manner, inputting an image containing the plate glass to be detected into a plate glass edge detection network model constructed and trained based on the preprocessed image to obtain an edge detection image containing the plate glass, including the following steps:
constructing a flat glass edge detection network model, wherein the flat glass edge detection network model comprises a feature processing network, a backbone network and an output network, the backbone network is a ResNeSt network structure, the feature processing structure is a multilayer connection convolution structure, the output network outputs a flat glass edge image, and the flat glass edge detection network model is trained by using a training data set;
and detecting the glass edge in the plate glass image based on the trained plate glass edge detection network model to obtain an edge detection image containing plate glass.
As an implementation mode, the method for constructing and training the flat glass edge detection network model comprises the following steps:
establishing a feature processing network, a backbone network and an output network, wherein the formula of the backbone network is as follows:
Figure BDA0003961818290000021
wherein the content of the first and second substances,I input for input images containing flat glass, W e And b e Respectively denote weight and offset of convolution operation in the backbone network, F extra For complex convolution operations, F e Extracting image features for the output of the backbone network;
the formula of the feature processing network is represented as:
Figure BDA0003961818290000031
wherein the input is the output F of the backbone network e ,W p And b p Respectively, weight and offset, F, of convolution operations in a feature processing network process For complex convolution operations, F p Processing the output of the network for the feature;
the formula of the output network is expressed as:
Figure BDA0003961818290000032
wherein the input is the output F of the feature processing network p ,W o And b o Respectively, weight and offset, F, of convolution operations in a feature processing network output For complex convolution operations, I output The image containing the fine edge of the plate glass is calculated by a network model;
optimizing parameters of the flat glass edge detection network model based on a weighted loss function, wherein the weighted loss function is expressed by a formula:
Figure BDA0003961818290000033
wherein beta is a weighted weight and a numerical value is adjusted according to the training condition, gamma is a constant and is set according to the training feedback result, and p is the probability that the object in the image is the plate glass;
and verifying the accuracy of the output result of the sheet glass edge detection network model, if the accuracy of the edge detection does not reach a preset value, adjusting parameters or training each network again until the accuracy reaches the preset value, and obtaining the sheet glass edge detection network model and the parameters.
As an implementation, the method further comprises the following steps:
and solidifying the trained plate glass edge detection network model, and permanently storing the plate glass edge detection network model and parameters into a file in a fixed format.
As an implementation, the method further comprises the following steps:
loading the solidified plate glass edge detection network model and parameters, establishing a plate glass edge detection network model, and waiting for the input of an image to be detected, wherein the image contains plate glass;
acquiring an image to be detected containing plate glass, preprocessing the image, inputting the preprocessed image as a plate glass edge detection network model, and inputting the preprocessed image into the plate glass edge detection network model;
and the panel glass edge detection network model performs algorithm processing on the input preprocessed image and outputs an edge detection image containing the panel glass.
As an embodiment, the subdividing process of the edge detection image containing the flat glass to obtain the flat glass edge image includes the following steps:
and adopting a sub-pixel edge fine algorithm to subdivide the edge detection image containing the plate glass, and fitting according to the gray value of the initial edge image and the minimum distance value of a fitting curve to obtain a plate glass edge image.
As an implementation manner, the method for measuring the correspondence between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the plate glass profile comprises the following steps:
measuring the corresponding relation between the pixel distance and the physical distance of the image containing the flat glass based on the standard size plate to obtain the pixel size ratio of the current image;
the actual sheet glass size is obtained by combining the pixel size ratio of the image and the boundary distance of the sheet glass outline.
A flat glass size measurement system comprises an acquisition preprocessing module, a detection output module, a subdivision module, a detection division module and a calculation module;
the acquisition preprocessing module is used for acquiring an image data set containing the plate glass and preprocessing all images to obtain preprocessed images;
the detection output module is used for inputting the image containing the plate glass to be detected into a plate glass edge detection network model which is constructed and trained on the basis of the preprocessed image to obtain an edge detection image containing the plate glass;
the subdivision module is used for subdividing the edge detection image containing the plate glass to obtain a plate glass edge image;
the detection and segmentation module is used for detecting and segmenting the edge image of the plate glass to obtain a joint contour region image of the plate glass, obtaining plate glass contour data based on the joint contour region image and storing the plate glass contour data in a point vector mode, outlining the plate glass contour according to stored vector point information and segmenting the plate glass contour;
and the calculating module is used for measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the contour of the plate glass.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method as set forth above.
A sheet glass sizing device comprising a memory, a processor and a computer program stored in the memory and run on the processor, the processor implementing the method as described above when executing the computer program.
Due to the adoption of the technical scheme, the invention has the remarkable technical effects that:
the safety risk of size detection in the existing production and processing process of the plate glass is solved; the defect that the existing dimension measurement based on computer vision is poor in measurement precision due to the fact that characteristics are manually set and the dimension measurement is easily influenced by environmental factors is overcome; the size measurement difficulty of the existing computer vision is solved by combining with deep learning, the measurement precision is improved, the non-contact size measurement system and the non-contact size measurement method are applied to the size detection of the plate glass, the production efficiency is improved, and the production safety is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic overall flow diagram of the process of the present invention;
FIG. 2 is a schematic diagram of the overall architecture of the system of the present invention;
FIG. 3 is a schematic flow diagram showing the details of the method of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples, which are illustrative of the present invention and are not to be construed as being limited thereto.
With the development of science and technology, the convolutional neural network based on deep learning has great success in the detection of targets in image processing tasks, scene recognition and other complex task processing, shows the strong processing capability of the convolutional neural network, and proves that the convolutional neural network can learn recognizable representation of targets from original visual data with the help of a large-scale supervision data set.
Although the convolutional neural network is widely applied, in the existing dimension measurement system based on computer vision, the dimension measurement is not accurate enough due to the uncertainty or large error of the edge detection of the object, so that the performance of the dimension measurement system can be determined to a great extent by whether the related feature information of the object to be measured can be fully extracted from the image in the edge detection link and utilized. However, due to some complexity, such as scale change, light source change and noise influence, there is a certain difficulty in extracting the feature information, and the features are set based on artificial priori knowledge, so that there is a great subjectivity, and a certain defect exists in the conventional edge detection, so that there is an error in subsequent contour detection based on the edge detection, and finally, there is an error in the size measurement result. The following is a scheme provided by the present invention, that is, the error of the transparent object in edge detection is inevitably larger than that of the normal object, so that the edge detection result can be improved and the size of the flat glass can be calculated quickly.
An exemplary method:
a method for measuring the size of a flat glass comprises the following steps:
acquiring an image data set containing plate glass, and preprocessing all images to obtain preprocessed images;
inputting an image to be detected containing the plate glass into a plate glass edge detection network model which is constructed and trained on the basis of the preprocessed image to obtain an edge detection image containing the plate glass;
subdividing the edge detection image containing the plate glass to obtain a plate glass edge image;
detecting and segmenting the edge image of the plate glass to obtain an attaching contour area image of the plate glass, obtaining plate glass contour data based on the attaching contour area image and storing the plate glass contour data in a point vector mode, outlining the plate glass contour according to stored vector point information and segmenting the plate glass contour;
and measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the plate glass profile.
An exemplary system:
a flat glass size measurement system comprises an acquisition preprocessing module, a detection output module, a subdivision module, a detection division module and a calculation module;
the acquisition preprocessing module is used for acquiring an image data set containing the plate glass and preprocessing all images to obtain preprocessed images;
the detection output module is used for inputting the image containing the plate glass to be detected into a plate glass edge detection network model which is constructed and trained on the basis of the preprocessed image to obtain an edge detection image containing the plate glass;
the subdivision module is used for subdividing the edge detection image containing the plate glass to obtain a plate glass edge image;
the detection and segmentation module is used for detecting and segmenting the edge image of the plate glass to obtain a joint contour region image of the plate glass, obtaining plate glass contour data based on the joint contour region image and storing the plate glass contour data in a point vector mode, outlining the plate glass contour according to stored vector point information and segmenting the plate glass contour;
and the calculating module is used for measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the contour of the plate glass.
Based on the method or the system, the safety risk of size detection in the conventional production and processing process of the plate glass can be solved; the defect of poor measurement precision caused by manually setting characteristics and being easily influenced by environmental factors in the existing dimension measurement based on computer vision can be overcome; the size measurement problem of the existing computer vision is solved by combining with deep learning, the measurement precision is improved, the non-contact size measurement system and the non-contact size measurement method are applied to the size detection of the plate glass, the production efficiency is improved, and the production safety is ensured.
Example 1:
a method for measuring the size of a flat glass sheet, as shown in fig. 1, comprising the steps of:
s100, acquiring an image data set containing plate glass, and preprocessing all images to obtain preprocessed images;
s200, inputting an image to be detected containing the plate glass into a plate glass edge detection network model which is constructed and trained on the basis of the preprocessed image to obtain an edge detection image containing the plate glass;
s300, subdividing the edge detection image containing the plate glass to obtain a plate glass edge image;
s400, detecting and segmenting the edge image of the plate glass to obtain a joint contour region image of the plate glass, obtaining plate glass contour data based on the joint contour region image and storing the plate glass contour data in a point vector mode, outlining the plate glass contour according to stored vector point information, and segmenting the plate glass contour;
s500, measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the plate glass outline.
In the whole process, it should be emphasized that the image data set including the plate glass generally includes acquired real-time image data and historical image data, the real-time image data is generally data to be detected, and the historical image data is generally training detection data of a network model.
In step S100, a high-resolution CCD area-array camera is used to collect an image containing plate glass with a fixed field of view in a production scene, and an LED auxiliary light source is used to supplement light to the image collection scene, so that the illumination in the field of view of the camera is uniform, and the reflection of the plate glass can be reduced, so that the collected image containing plate glass is illuminated more uniformly, and the positioning during the preprocessing is more accurate; the method comprises the steps of carrying out certain image data enhancement processing such as image geometric enhancement, image color enhancement and the like on an acquired image containing plate glass, carrying out image edge labeling by using special script software, dividing the labeled image data into a training data set and a verification data set according to the proportion of 8:2 for training a detection algorithm model, and using the image acquired in real time as detection data.
If the data is used for model training, noise pollution operation is required to be added to the image on the basis of data enhancement preprocessing, then the high-resolution image is cut into sub-images with the size of 960 x 960, certain redundancy exists between adjacent sub-images, and when the data is used for model verification, the image is only required to be cut into an input convolution network with the size of 960 x 960.
Referring to fig. 3, in step S200, inputting an image to be detected containing plate glass into a plate glass edge detection network model constructed and trained based on the preprocessed image to obtain an edge detection image containing plate glass, and the method at least includes the following steps:
and S210, training a plate glass edge detection network model, and designing, building and training the plate glass edge detection network model based on deep learning. The network model comprises three parts: and the backbone structure takes multilayer connection convolution as a characteristic processing structure, and the output image is the edge of the flat glass. Training a network model structure by using the preprocessed image data;
s220: loading the plate glass edge detection network model trained in the step S210 by using the trained plate glass edge detection network model, reading an image containing plate glass, and performing edge detection on the plate glass in the image to generate a refined edge of the plate glass;
in S210, the steps can be divided into model building S211, model training S212, model verification S213 and model curing S214, specifically:
s210 model building: the built flat glass edge detection network model mainly comprises 3 sub-networks which are respectively as follows: the ResNeSt network structure is used as a backbone network to extract image characteristics, the multilayer connection convolution structure is used as a characteristic processing network, an output network of a plate glass edge detection result is output, and a plate glass edge detection network model is constructed and trained, and the method comprises the following steps:
establishing a feature processing network, a backbone network and an output network, wherein the formula of the backbone network is as follows:
Figure BDA0003961818290000081
wherein, I input For an input image containing flat glass, W e And b e Respectively denote weight and bias of convolution operation in the backbone network, F extra For complex convolution operations, F e Extracting image characteristics for the output of the backbone network;
the formula of the feature processing network is represented as:
Figure BDA0003961818290000082
wherein the input is the output F of the backbone network e ,W p And b p Respectively, weight and offset, F, of convolution operations in a feature processing network process For complex convolution operations, F p Processing the output of the network for the feature;
the formula of the output network is expressed as:
Figure BDA0003961818290000083
wherein the input is the output F of the feature processing network p ,W o And b o Respectively, weight and offset, F, of convolution operations in a feature processing network output For complex convolution operations, I output The image containing the fine edge of the plate glass is calculated by a network model; the features of the input image in the ResNeSt backbone network are fully extracted, and the extracted features contain rich basic information of the image, such as textures, edges and the like; then the extracted feature information is further processed in a multilayer connection convolution network, and a certain amount of high-level features are extracted; finally, outputting a plate glass edge detection result in an output network, and finally outputting an accurate plate glass edge detection result after an input image is processed by three sub-networks with different functions in different stages;
s212 model training: during model training, a backbone network of the edge detection model is initialized by using pre-trained ResNeSt network parameters, and a parameter random initialization feature extraction network and an output network generated by Gaussian distribution are used. Optimizing network model parameters by using a weighted loss function, wherein the weighted loss function has the formula:
Figure BDA0003961818290000084
wherein: beta is a weighted weight, a numerical value is adjusted according to the training condition in the training, gamma is a constant, the numerical value is set according to the training feedback result, and p is the probability that the object in the image is the plate glass; specifically, in the training process, firstly, a three-stage network is initialized by using different parameter initialization modes, then, the image redundancy marked and preprocessed is cut into 960 × 960 subgraphs and input into the initialized detection network, each 128 subgraphs are sent into the network as one batch, all data training is completed to be called one round, and 500 rounds of single model training are performed. Because the network is a full convolution network, the size of an output image is the same as that of an input image, the detection network can be trained in a mode of cutting sub-images, and images with any size can be input when the network is used for detecting the edge of the plate glass. And in the training process, the accuracy of the test model is finished after each round of training, and the model training process is properly stopped according to the change condition of the model detection accuracy, so that the overfitting of the model is prevented. Further, when training starts, firstly fixing parameters in a backbone network in a detection network, setting an initialized learning rate to be 1e-3, carrying out iterative training on the model for 300 rounds by using the learning rate 1e-3 and an Adam optimizer, then removing parameter fixation of the backbone network, carrying out iterative training on the model for 200 rounds by using the learning rate 1e-4 and the Adam optimizer, and training for 500 rounds in total to achieve the optimal model detection result.
S213, model verification: after the model training S212 is finished, verifying the accuracy of the output result of the model by using a verification data set, if the accuracy of the edge detection is lower to reach the expected standard, changing part of model parameters or structures to perform model training again until the accuracy of the model meets the set requirement, and obtaining an excellent model structure and model parameters;
s214, solidifying the model: after the detection precision of the model is verified, the trained network structure and model parameters are permanently stored in a file in a fixed format, and the network structure and the parameters are ensured not to be changed in the detection and use process.
And step S220 may also include: the model loading S221, the reading of the data to be detected S222 and the edge detection of the flat glass S223 specifically include:
s221, loading a model: loading the stored network model structure and parameters of the solidification model, establishing a reasoning detection model, and continuously waiting for the input of data to be detected;
s222, reading data to be detected, namely reading real data containing plate glass by S100, preprocessing the real data, and inputting the preprocessed image data into an edge detection network as a network model;
s223, edge detection of the flat glass: for the image sent into the network model, the detection network carries out algorithm processing aiming at the input glass detection and finally outputs a plate glass edge detection image;
in step S300, the flat glass edge detection image output in S223 is subjected to more refined edge subdivision using a sub-pixel algorithm. Specifically, the sub-pixel edge refinement algorithm is a least square fitting algorithm, the fitting process does not need numerical differentiation, fitting is carried out according to the minimum distance between each gray value of the initial edge image and a fitting curve, the gray value with errors is reasonably utilized, and the processed image can obtain a more refined and high-contrast flat glass edge.
In step 500, the method comprises the following steps:
s510, measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the plate glass profile, wherein the method specifically comprises the following steps: under the condition that the camera position is fixed and the visual field is determined, measuring the corresponding relation between the pixel distance and the physical distance of the image pixel by using a standard-size plate, calculating the size ratio of the image pixel under the current camera visual field, and then storing the size ratio of the pixel;
and S520, calculating the physical size of the flat glass by combining the pixel size ratio of the image and the distance between the pixel size ratio and the outline boundary of the flat glass.
According to the invention, after the edge detection is carried out, a secondary thinning process is added, namely, the edge detection image containing the plate glass is subdivided through a sub-pixel algorithm, so that a more refined plate glass edge image with subdivided edges is obtained, and the error of the plate glass outline in the obtained plate glass edge image is smaller than the actual size, so that the subsequent calculation result is more accurate.
Example 2:
a flat glass size measuring system, as shown in FIG. 2, comprises an acquisition preprocessing module 100, a detection output module 200, a subdivision module 300, a detection division module 400 and a calculation module 500;
the acquisition preprocessing module 100 is configured to acquire an image dataset including a sheet glass, and preprocess all images to obtain a preprocessed image;
the detection output module 200 is used for inputting the image containing the plate glass to be detected into a plate glass edge detection network model which is constructed and trained on the basis of the preprocessed image, so as to obtain an edge detection image containing the plate glass;
the subdivision module 300 subdivides the edge detection image containing the plate glass to obtain a plate glass edge image;
the detection and segmentation module 400 is configured to perform detection and segmentation processing on the edge image of the sheet glass to obtain a fitting contour region image of the sheet glass, obtain sheet glass contour data based on the fitting contour region image and store the sheet glass contour data in a point vector manner, outline the sheet glass contour according to the stored vector point information, and segment the sheet glass contour;
the calculation module 500 measures a corresponding relationship between a pixel distance and a physical distance of an image pixel based on a standard size plate, and then obtains an actual size of the sheet glass based on the profile of the sheet glass.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that:
reference in the specification to one embodiment or an embodiment means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, the appearances of the phrase an embodiment or an embodiment in various places throughout this specification are not necessarily all referring to the same embodiment.
In addition, it should be noted that the specific embodiments described in the present specification may differ in the shape of the components, the names of the components, and the like. All equivalent or simple changes of the structure, the characteristics and the principle of the invention which are described in the patent conception of the invention are included in the protection scope of the patent of the invention. Various modifications, additions and substitutions for the specific embodiments described may be made by those skilled in the art without departing from the scope of the invention as defined in the accompanying claims.

Claims (12)

1. A method for measuring the size of a sheet glass, characterized by comprising the steps of:
acquiring an image data set containing plate glass, and preprocessing all images to obtain preprocessed images;
inputting an image to be detected containing the plate glass into a plate glass edge detection network model which is constructed and trained on the basis of the preprocessed image to obtain an edge detection image containing the plate glass;
subdividing the edge detection image containing the plate glass to obtain a plate glass edge image;
detecting and segmenting the edge image of the plate glass to obtain an attaching contour area image of the plate glass, obtaining plate glass contour data based on the attaching contour area image and storing the plate glass contour data in a point vector mode, outlining the plate glass according to the stored vector point information, and segmenting the plate glass contour;
and measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the plate glass profile.
2. A method for measuring a dimension of a sheet glass according to claim 1, wherein said acquiring an image data set containing a sheet glass, and preprocessing all images to obtain a preprocessed image, comprises the steps of:
an image containing the sheet glass in the image dataset containing the sheet glass is obtained using a high resolution CCD area array camera;
performing image data enhancement processing on the image containing the plate glass to obtain a data enhanced image, wherein the image data enhancement comprises one or two of image geometric enhancement and image color enhancement;
carrying out image edge annotation on the data enhanced image to obtain an annotated image;
dividing the marked image into a training data set and a verification data set according to a preset proportion, wherein the training data set is used for training the edge detection network model of the plate glass, the verification data set is used for verifying the edge detection network model of the plate glass, and the image of the plate glass is collected in real time to serve as detection data.
3. The method for measuring a sheet glass dimension as claimed in claim 2, further comprising the steps of:
and performing noise pollution adding treatment on the data enhanced image, and cutting the data enhanced image into sub-images with the size of 960 x 960.
4. The method for measuring the size of a sheet glass according to claim 2, wherein the image containing the sheet glass to be detected is input to a sheet glass edge detection network model constructed and trained based on the preprocessed image to obtain an edge detection image containing the sheet glass, comprising the steps of:
constructing a flat glass edge detection network model, wherein the flat glass edge detection network model comprises a feature processing network, a backbone network and an output network, the backbone network is a ResNeSt network structure, the feature processing structure is a multilayer connection convolution structure, the output network outputs a flat glass edge image, and the flat glass edge detection network model is trained by using a training data set;
and detecting the glass edge in the plate glass image based on the trained plate glass edge detection network model to obtain an edge detection image containing plate glass.
5. The sheet glass dimension measurement method of claim 4, wherein constructing and training the sheet glass edge detection network model comprises the steps of:
establishing a feature processing network, a backbone network and an output network, wherein the formula of the backbone network is as follows:
Figure FDA0003961818280000021
wherein, I input For input images containing flat glass, W e And b e Respectively denote weight and offset of convolution operation in the backbone network, F extra For complex convolution operations, F e Extracting image characteristics for the output of the backbone network;
the formula of the feature processing network is represented as:
Figure FDA0003961818280000022
wherein the input is the output F of the backbone network e ,W p And b p Respectively refer to featuresWeights and offsets for convolution operations in a processing network, F process For complex convolution operations, F p Processing the output of the network for the feature;
the formula of the output network is expressed as:
Figure FDA0003961818280000023
wherein the input is the output F of the feature processing network p ,W o And b o Weights and biases, F, respectively, for convolution operations in feature processing networks output For complex convolution operations, I output The image containing the fine edge of the plate glass is calculated by a network model;
optimizing parameters of the sheet glass edge detection network model based on a weighted loss function, wherein the weighted loss function is expressed by a formula:
Figure FDA0003961818280000024
wherein beta is a weighted weight and a numerical value is adjusted according to the training condition, gamma is a constant and is set according to the training feedback result, and p is the probability that the object in the image is the plate glass;
and verifying the accuracy of the output result of the sheet glass edge detection network model, if the accuracy of the edge detection does not reach a preset value, adjusting parameters or training each network again until the accuracy reaches the preset value, and obtaining the sheet glass edge detection network model and the parameters.
6. The method for measuring a sheet glass dimension as claimed in claim 5, further comprising the steps of:
and solidifying the trained plate glass edge detection network model, and permanently storing the plate glass edge detection network model and parameters into a file in a fixed format.
7. The method for measuring a sheet glass dimension as claimed in claim 6, further comprising the steps of:
loading the solidified plate glass edge detection network model and parameters, establishing a plate glass edge detection network model, and waiting for the input of an image to be detected, wherein the image contains plate glass;
acquiring an image to be detected containing plate glass, preprocessing the image, inputting the preprocessed image as a plate glass edge detection network model, and inputting the preprocessed image into the plate glass edge detection network model;
and the panel glass edge detection network model performs algorithm processing on the input preprocessed image and outputs an edge detection image containing the panel glass.
8. The method for measuring a sheet glass dimension according to claim 1, wherein the step of subdividing the edge detection image containing the sheet glass to obtain a sheet glass edge image comprises the steps of:
and adopting a sub-pixel edge fine algorithm to subdivide the edge detection image containing the plate glass, and fitting according to the gray value of the initial edge image and the minimum distance value of a fitting curve to obtain a plate glass edge image.
9. The method for measuring a sheet glass dimension according to claim 1, wherein the correspondence between the pixel distance of the image pixel and the physical distance is measured based on a standard-size sheet, and further the actual dimension of the sheet glass is obtained based on the sheet glass profile, comprising the steps of:
measuring the corresponding relation between the pixel distance and the physical distance of the image containing the flat glass based on the standard size plate to obtain the pixel size ratio of the current image;
the actual sheet glass size is obtained by combining the pixel size ratio of the image and the boundary distance of the sheet glass outline.
10. A plate glass size measuring system is characterized by comprising an acquisition preprocessing module, a detection output module, a subdivision module, a detection division module and a calculation module;
the acquisition preprocessing module is used for acquiring an image data set containing the plate glass and preprocessing all images to obtain preprocessed images;
the detection output module is used for inputting the preprocessed image into a constructed and trained flat glass edge detection network model to obtain an edge detection image containing flat glass;
the subdivision module is used for subdividing the edge detection image containing the plate glass to obtain a plate glass edge image;
the detection and segmentation module is used for detecting and segmenting the edge image of the plate glass to obtain a joint contour region image of the plate glass, obtaining plate glass contour data based on the joint contour region image and storing the plate glass contour data in a point vector mode, outlining the plate glass contour according to stored vector point information and segmenting the plate glass contour;
and the calculating module is used for measuring the corresponding relation between the pixel distance and the physical distance of the image pixel based on the standard size plate, and further obtaining the actual size of the plate glass based on the contour of the plate glass.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 9.
12. A sheet glass sizing device comprising a memory, a processor and a computer program stored in said memory and run on said processor, wherein said processor implements the method of any of claims 1 to 9 when executing said computer program.
CN202211484238.7A 2022-11-24 2022-11-24 Method, system and device for measuring size of plate glass and readable storage medium Pending CN115760808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211484238.7A CN115760808A (en) 2022-11-24 2022-11-24 Method, system and device for measuring size of plate glass and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211484238.7A CN115760808A (en) 2022-11-24 2022-11-24 Method, system and device for measuring size of plate glass and readable storage medium

Publications (1)

Publication Number Publication Date
CN115760808A true CN115760808A (en) 2023-03-07

Family

ID=85338575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211484238.7A Pending CN115760808A (en) 2022-11-24 2022-11-24 Method, system and device for measuring size of plate glass and readable storage medium

Country Status (1)

Country Link
CN (1) CN115760808A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116589171A (en) * 2023-07-14 2023-08-15 江西省博信玻璃有限公司 Intelligent tempering method and system with automatic glass detection function

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116589171A (en) * 2023-07-14 2023-08-15 江西省博信玻璃有限公司 Intelligent tempering method and system with automatic glass detection function
CN116589171B (en) * 2023-07-14 2024-01-09 江西省博信玻璃有限公司 Intelligent tempering method and system with automatic glass detection function

Similar Documents

Publication Publication Date Title
CN108124487B (en) Cloud meter reading method and device
CN111027547B (en) Automatic detection method for multi-scale polymorphic target in two-dimensional image
CN111325203B (en) American license plate recognition method and system based on image correction
CN109635806B (en) Ammeter value identification method based on residual error network
CN111724355B (en) Image measuring method for abalone body type parameters
CN112233067A (en) Hot rolled steel coil end face quality detection method and system
CN111242899B (en) Image-based flaw detection method and computer-readable storage medium
CN111754538B (en) Threshold segmentation method for USB surface defect detection
CN111369526B (en) Multi-type old bridge crack identification method based on semi-supervised deep learning
CN116310845B (en) Intelligent monitoring system for sewage treatment
CN111695609A (en) Target damage degree determination method, target damage degree determination device, electronic device, and storage medium
CN115147363A (en) Image defect detection and classification method and system based on deep learning algorithm
CN115760808A (en) Method, system and device for measuring size of plate glass and readable storage medium
CN113435407A (en) Small target identification method and device for power transmission system
CN115995056A (en) Automatic bridge disease identification method based on deep learning
CN115546795A (en) Automatic reading method of circular pointer instrument based on deep learning
CN114004858A (en) Method and device for identifying aviation cable surface code based on machine vision
CN114881998A (en) Workpiece surface defect detection method and system based on deep learning
CN113205511B (en) Electronic component batch information detection method and system based on deep neural network
CN111178405A (en) Similar object identification method fusing multiple neural networks
CN110889418A (en) Gas contour identification method
CN112329845B (en) Method and device for changing paper money, terminal equipment and computer readable storage medium
CN115761613A (en) Automatic tunnel crack detection method based on convolutional network
CN115082416A (en) Lens flaw detection method, device, equipment and storage medium
CN113469955A (en) Photovoltaic module fault area image detection method and system

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