CN113578778A - Method and system for detecting automobile glass mixed line by utilizing contour characteristic and color characteristic - Google Patents

Method and system for detecting automobile glass mixed line by utilizing contour characteristic and color characteristic Download PDF

Info

Publication number
CN113578778A
CN113578778A CN202110853548.0A CN202110853548A CN113578778A CN 113578778 A CN113578778 A CN 113578778A CN 202110853548 A CN202110853548 A CN 202110853548A CN 113578778 A CN113578778 A CN 113578778A
Authority
CN
China
Prior art keywords
glass
color
image
contour
automobile glass
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
CN202110853548.0A
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.)
Fujian University of Technology
Original Assignee
Fujian University of Technology
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 Fujian University of Technology filed Critical Fujian University of Technology
Priority to CN202110853548.0A priority Critical patent/CN113578778A/en
Publication of CN113578778A publication Critical patent/CN113578778A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/04Sorting according to size
    • B07C5/10Sorting according to size measured by light-responsive means
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • B07C5/342Sorting according to other particular properties according to optical properties, e.g. colour
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C2501/00Sorting according to a characteristic or feature of the articles or material to be sorted
    • B07C2501/0072Sorting of glass

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method and a system for detecting automobile glass mixed lines by utilizing contour characteristics and color characteristics, wherein after image information of automobile glass is collected, automobile glass with a non-batch appearance is removed by utilizing contour detection, and then automobile glass with a material and a thickness inconsistent with that of the batch is removed by utilizing color detection; the contour detection adopts a contour matching algorithm combining geometric moments and area characteristics; the color detection adopts an automobile glass material and thickness detection algorithm combining Euclidean distance and color characteristics. The contour characteristics are used for distinguishing different appearances, the color characteristics are used for distinguishing different materials and thicknesses, whether the automobile glass on the current production line meets the specification requirements of production scheduling is judged, and therefore mixed line detection of the automobile glass is achieved.

Description

Method and system for detecting automobile glass mixed line by utilizing contour characteristic and color characteristic
Technical Field
The invention relates to the technical field of automobile glass detection, in particular to a method and a system for detecting automobile glass mixed lines based on the utilization of contour characteristics and color characteristics.
Background
Interpretation of terms:
automobile glass: the automobile glass is manufactured by heating glass to be close to softening temperature in a heating furnace, then quickly feeding the glass into air grids with different cooling strengths, and carrying out uneven cooling on the glass, so that different stresses are generated in a main visual area and a peripheral area of the glass, and the automobile glass is different from other glass in that a black glue printing area with the width of 3-10cm exists in the edge part of the glass.
Mixed line detection: means that the automobile glass which does not meet the current production requirement (non-batch type) is identified from the industrial production line.
Machine vision: machine vision mainly uses a computer to simulate the visual function of a human, extracts information from an image of an objective object, processes and understands the information, and is applied to actual detection, measurement and control.
In the production process of the automobile glass, the manufacturing process of the automobile glass is complex, sectional production is needed, and the automobile glass of non-batch specifications is easily mixed in the production and transportation processes. Because the automobile glass is various in types, the appearance and the contour of some types of glass are very similar, and the material and the thickness of the glass are also very similar, so that the difficulty of mixed line detection of finished automobile glass is very high.
At present, a large number of glass manufacturers still mainly perform manual detection aiming at the problem of mixed line detection of automobile finished glass. However, with the vigorous development of the automobile glass industry, the traditional manual detection can not meet the ever-increasing productivity demand. And some models of automobile glass not only have very similar appearance profiles, but also have very similar colors, and the automobile glass is subjected to line mixing detection by means of naked eyes, so that the sorting difficulty is high, and false detection is very easy to occur.
Some automobile glass production enterprises adopt a light transmittance detection method to realize mixed line detection. However, the light transmittance detection method is not accurate enough for detecting glass with similar materials, and can not perform accurate mixed line detection on automobile glass with the same material and different outlines.
The existing glass detection technology based on machine vision is mainly used for detecting the appearance of fully transparent original glass and is not completely suitable for carrying out mixed line detection on finished automobile glass with screen printing.
In summary, the solutions adopted in the prior art mainly include:
artificially detecting: the appearance, material and thickness of the automobile glass are identified and detected by naked eyes, so that whether the automobile glass to be detected meets the specification requirements of the batch or not is judged.
A light transmittance detection technology: the light transmittance of the glass is detected by a light transmittance instrument to determine the material and thickness of the glass. The light transmittance is an optical characteristic of glass, and under the irradiation of the same light source at a fixed angle, the light transmittance of glass made of different materials is different. In addition, the absorption rate of the glass to light depends on the thickness of the glass, and generally, the thicker the thickness, the higher the absorption rate.
The machine vision detection technology comprises the following steps: and the contour detection of the original glass sheet is realized by utilizing a machine vision mixed line detection technology.
But they have the following drawbacks, respectively:
problem of manual detection: the manual input is large, and the detection efficiency is low. And some models of automobile glass not only have very similar appearance profiles, but also have very similar colors, and the automobile glass is subjected to line mixing detection by means of naked eyes, so that the sorting difficulty is high, and false detection is very easy to occur.
Problem of light transmittance detection: because the middle part of the finished product automobile glass to be detected is a transparent area and the edge part is a black glue printing area, the light transmittance of the two parts is completely different. Only when the detection light beam hits the transparent area, the obtained transmittance value can really reflect the material of the glass. The production line is fast, so that error data is easy to appear in a plurality of sampling data obtained when the optical transmission instrument carries out multi-point detection on 1 piece of glass, and the detection accuracy is influenced. In addition, the light transmittance detection method can only detect the material of the glass, and cannot detect the shape of the glass.
The machine vision detection technology comprises the following steps: at present, most of the technology is used for realizing the shape detection of original glass, is not suitable for the outline detection of a screen printing area of finished automobile glass, and can not realize the material detection of the automobile glass.
Disclosure of Invention
The invention provides a method and a system for detecting automobile glass mixed line by utilizing contour characteristics and color characteristics, which are mainly applied to sectional production and transportation of automobile glass, and provide a method for judging whether the automobile glass on a current production line meets the specification requirements of production scheduling or not by utilizing the contour characteristics to distinguish different appearances and the color characteristics to distinguish different materials and thicknesses aiming at the problem that some glasses with similar appearances or similar materials are easy to mix, thereby realizing the mixed line detection of the automobile glass. The main technical problem to be solved is how to utilize machine vision technology to replace manual detection, solve the problem of mixed line detection of finished automobile glass, and reach the detection accuracy rate that the industry produces the line requirement, utilize machine vision detection technology, realize the detection of shape, black border profile, material and thickness of finished automobile glass simultaneously through 1 image acquisition, finally realize mixed line detection through the integration of multiple characteristics.
The technical scheme is as follows:
a method for detecting automobile glass mixed lines by utilizing contour characteristics and color characteristics is characterized by comprising the following steps of: after the image information of the automobile glass is collected, firstly utilizing contour detection to remove the automobile glass with a non-batch shape, and then utilizing color detection to remove the automobile glass with a material and a thickness inconsistent with the batch;
the contour detection adopts a contour matching algorithm combining geometric moments and area characteristics; the color detection adopts an automobile glass material and thickness detection algorithm combining Euclidean distance and color characteristics.
Further, the image information of the automobile glass is collected under the conditions of a white background and double light sources.
Further, the contour matching algorithm combining geometric moment and area features specifically includes the following steps:
step S11: preprocessing an image to be detected;
step S12, calculating the geometric moment of the image;
step S13, calculating the similarity of the shapes;
step S14, area similarity calculation;
and step S15, comprehensive similarity calculation.
Further, step S12 specifically includes:
geometric moments hu formed by the second-order center distance of the image1And hu2The calculation of (c) is shown in equations (1) and (2).
hu1=η2002 (1)
Figure BDA0003182328280000031
In the formula eta20、η02And η11Is the second order normalized center distance of the image, and the calculation thereof is as shown in formula (3):
Figure BDA0003182328280000032
wherein p + q is 2; mu.s00And mupqIs the center-to-center distance of the image, which is calculated as shown in equation (4):
Figure BDA0003182328280000033
wherein f (x, y) is a function of an image to be measured or a function of a template image;
Figure BDA0003182328280000034
and
Figure BDA0003182328280000035
is the centroid coordinates of the image, which is calculated as shown in equation (5):
Figure BDA0003182328280000041
in the formula, m10And m01Is the 1 st moment of the image, representing the centroid of the image; m is00Is the 0 th moment of the image, representing the quality of the image, i.e. the sum of the pixel values within the image area; the calculation of these 3 parameters is shown in equation (6):
Figure BDA0003182328280000042
step S13 specifically includes:
setting A, B as a template image and an image to be detected of the automobile glass respectively, and calculating the geometrical moments of A, B two images
Figure BDA0003182328280000043
And
Figure BDA0003182328280000044
obtained by amplifying by using a sign function and a logarithm function
Figure BDA0003182328280000045
And
Figure BDA0003182328280000046
as shown in formula (7):
Figure BDA0003182328280000047
wherein i is 1, 2;
the shape similarity I of images A and B is then calculated using equation (8)(A,B)In which I(A,B)The smaller the value, the phaseThe higher the similarity is:
Figure BDA0003182328280000048
step S14 specifically includes:
let SAAnd SBThe area of the automobile glass on the template image and the image to be measured respectively passes through 0 order moment m00Obtaining; area similarity S between two images(A,B)Calculated by the formula (9), S(A,B)The smaller the value of (d), the closer the areas of the two images are:
Figure BDA0003182328280000049
step S15 specifically includes:
using shape similarity I(A,B)And area similarity S(A,B)The weighted value of (2) is used as a judgment basis of the comprehensive similarity, as shown in formula (10), if the comprehensive value is smaller than the threshold, the error is within an allowable range, and the contour matching is successful:
I(A,B)+2S(A,B)<δ1 (10)
in the formula, delta1Is a threshold for determining contour similarity.
Further, the detection algorithm for the material and thickness of the automobile glass combined with the Euclidean distance and the color characteristics specifically comprises the following steps:
step S21: preprocessing an image to be detected;
step S22: collecting color information;
step S23: calculating a color characteristic value;
step S24: and calculating the color similarity.
Further, the automobile glass material and thickness detection algorithm combining the Euclidean distance and the color characteristics adopts an RGB color space.
Further, step S21 specifically includes:
generating a mask plate through ROI extraction and morphological processing algorithms, covering the mask plate on the image after mean filtering, and only leaving a transparent area part in the obtained image;
step S22 specifically includes:
acquiring N groups of color information for each glass image, and respectively calculating the average value of R/G/B in the N groups of data to be used as color matching data;
step S23 specifically includes:
the acquired R/G/B data are preprocessed to obtain the following three data: c1: sum of three components R/G/B, C2: ratio of R component to R/G/B component and C3: the proportion of the G component in the R/G/B three components;
step S24 specifically includes:
the Euclidean distance is adopted to measure the color correlation between the glass to be detected and the standard glass, and the formula is shown as 11-13:
Figure BDA0003182328280000051
Figure BDA0003182328280000052
Figure BDA0003182328280000053
wherein A represents a glass to be tested, B represents a standard glass, and delta1、δ2And delta3Is a set comparison threshold; only when the above 3 equations are all true will it be shown that the material and thickness of A and B match.
And, a system for detecting automotive glass blending using profile characteristics and color characteristics, comprising: the system comprises an automobile glass image acquisition module, a contour detection module and a color detection module;
the automobile glass image acquisition module is used for acquiring image information of automobile glass;
the contour detection module adopts a contour matching algorithm combining geometric moment and area characteristics to remove automobile glass with non-current batch appearance;
the color detection module adopts an automobile glass material and thickness detection algorithm combining Euclidean distance and color characteristics to remove automobile glass with material and thickness inconsistent with the batch.
And an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps of the method for detecting automotive glass cord using contour and color features as described above.
A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for detecting automotive glass cord using contour and color features as described above.
The invention and the preferred scheme thereof use the contour characteristics to distinguish the difference of the shapes and the color characteristics to distinguish the difference of the materials and the thicknesses to judge whether the automobile glass on the current production line meets the specification requirements of the scheduling, thereby realizing the mixed line detection of the automobile glass. The geometric moment contour detection algorithm is improved, the area characteristic is increased, the contour of the automobile glass is detected, the contour detection accuracy is improved, and meanwhile the detection efficiency is hardly influenced. Before color information is collected, the problem of color information distortion caused by factors such as dust, illumination, stains, edges and the like is solved by using a mask plate and an average filtering algorithm. And the difference of glass color data is enlarged through three parameters of C1, C2 and C3, and the accuracy of detecting the material and the thickness of the automobile glass is improved.
Drawings
The invention is described in further detail below with reference to the following figures and detailed description:
FIG. 1 is a schematic diagram of the general flow of the mixed line detection scheme according to the embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an image acquisition system according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of an automobile glass contour matching algorithm based on improved geometric moments according to an embodiment of the invention;
FIG. 4 is a schematic diagram illustrating an image preprocessing flow in a contour matching process according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of an algorithm for detecting the material and thickness of the glass of the vehicle based on color information according to the embodiment of the present invention;
FIG. 6 is a schematic diagram of an image preprocessing flow in the color matching process according to an embodiment of the present invention.
Detailed Description
In order to make the features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail as follows:
in the production process of the automobile glass, the manufacturing process of the automobile glass is complex, sectional production is needed, and the automobile glass of non-batch specifications is easily mixed in the production and transportation processes. Because the automobile glass is various in types, the appearance and the contour of some types of glass are very similar, and the material and the thickness of the glass are also very similar, so that the difficulty of mixed line detection of finished automobile glass is very high.
The characteristics of the automobile glass are divided into three aspects through analysis, namely profile characteristics, material characteristics and thickness characteristics. The profile characteristics are mainly represented by the difference of the glass appearance and the profile of the black edge area. The material is characterized in that 0.4-0.7% of colorant is added into the glass raw material to make the glass have different colors, and the glass is mainly divided into six categories, namely white glass-C (clear), blue glass-B (blue), green glass-G (green), SOLAR green glass-SG (SOLAR green), tea glass-Z (blue) and gray glass-Y (gray). The change of the thickness characteristic also causes the change of color information, and the glass of the same material has heavier color along with the increase of the thickness. In summary, the mixed line detection of the automobile glass is realized by starting from the detection of the outline characteristic and the color characteristic.
The mixed line detection of the finished automobile glass is realized through the following technical scheme: the contour detection of the automobile glass is realized by combining an improved geometric moment algorithm of area characteristics; the detection of the material and the thickness of the automobile glass is realized by combining a Euclidean distance color matching algorithm. The general overview of the mixed line detection scheme is shown in fig. 1.
The mixed line detection comprises two parts of profile detection and material and thickness detection, wherein the automobile glass with non-batch appearance is removed by utilizing the profile detection, and then the automobile glass with inconsistent material and thickness with the batch is removed by utilizing the color detection.
First, an image capturing system for an automobile glass designed in this embodiment is shown in fig. 2. Compared with common glass, the automobile glass is provided with a black frame which is subjected to screen printing, the white background plate can highlight the outline information of the automobile glass, and the white automobile glass has the full-reflection characteristic and can well acquire the color information of the automobile glass. The angle of the double light sources is adjustable, the shadow problem and the local high exposure problem caused by the irradiation of a single light source can be eliminated, light is supplemented for the collection of the automobile glass images, and the quality of the image collection is improved.
It should be noted that the design scheme is completed based on a laboratory environment, but based on the design principle, the design scheme can also be directly transplanted into an automobile glass production line, namely the arrangement of the white-background double light sources.
The contour matching algorithm flow combining geometric moment and area features comprises the following steps:
for automobile glass, the contour image is simple, no complex texture information exists, the real-time performance of detection is considered, and the shape matching is carried out by adopting a geometric moment algorithm. The geometric rectangle is simple, takes far less computation time than other moment descriptors (such as orthogonal moment, complex moment and the like), and has translation, rotation and scaling invariance.
In an actual production line, because the distance from a lens to a conveyor belt is fixed and invariable, if the scaling invariance of geometric moments is directly adopted, the glass with the same shape and different sizes can be identified into the same class of glass, and the accuracy of an algorithm is influenced. In order to remove the influence of the scaling invariance on the accuracy of the mixed line detection, the embodiment adds an area feature to the traditional geometric moment matching algorithm to perform the contour detection. Because the area characteristics are obtained when the geometric moment is calculated, the improved geometric moment matching algorithm does not increase extra calculated amount and does not influence the real-time detection speed. The flow of the improved geometric moment matching algorithm is shown in fig. 3, and the shape similarity, the area similarity and the comprehensive similarity of the automobile glass image to be detected and the template image are calculated to determine whether the current outline of the automobile glass meets the specification requirements of the scheduling.
The following is the implementation process of the contour matching algorithm:
(1) preprocessing of images to be measured
The image preprocessing is mainly used for removing irrelevant information, improving the image quality and simplifying the calculation. The flow of the preprocessing algorithm of the image to be detected is shown in fig. 4, and comprises conventional processing processes such as graying, binarization and the like. Since the preprocessing algorithm is not the main design content of the present embodiment, the explanation is not given.
(2) Computing geometric moments of images
Geometric moments hu due to second-order center-to-center construction of images1And hu2True rotation, scaling and translation invariance. This example also uses only hu1And hu2And realizing the shape matching of the two images. hu (pharmaceutical)1And hu2The calculation of (c) is shown in equations (1) and (2).
hu1=η2002 (1)
Figure BDA0003182328280000081
In the formula eta20、η02And η11The second-order normalized center distance of the image is calculated as shown in the formula (3).
Figure BDA0003182328280000082
Wherein p + q is 2; mu.s00And mupqIs the center-to-center distance of the image, and its calculation is shown in equation (4).
Figure BDA0003182328280000083
Wherein f (x, y) is the function of the image to be measured or the template;
Figure BDA0003182328280000084
and
Figure BDA0003182328280000085
is the centroid coordinates of the image, which is calculated as shown in equation (5).
Figure BDA0003182328280000091
In the formula, m10And m01Is the 1 st moment of the image, representing the centroid of the image; m is00Is the 0 th moment of the image, representing the quality of the image, i.e. the sum of the pixel values within the image area; the calculation of these 3 parameters is shown in equation (6).
Figure BDA0003182328280000092
(3) Shape similarity calculation
Setting A, B as a template image and an image to be detected of the automobile glass respectively, and calculating the geometrical moments of A, B two images
Figure BDA0003182328280000093
And
Figure BDA0003182328280000094
obtained by amplifying by using a sign function and a logarithm function
Figure BDA0003182328280000095
And
Figure BDA0003182328280000096
as shown in equation (7).
Figure BDA0003182328280000097
Wherein i is 1, 2.
The shape similarity I of images A and B is then calculated using equation (8)(A,B)In which I(A,B)The smaller the value, the higher the similarity.
Figure BDA0003182328280000098
(4) Area similarity calculation
Let SAAnd SBThe area of the automobile glass on the template image and the image to be measured can pass through the 0 order moment m00And (4) obtaining. Area similarity S between two images(A,B)Can be calculated by equation (9). S(A,B)The smaller the value of (a), the closer the areas of the two images are.
Figure BDA0003182328280000099
(5) Comprehensive similarity calculation
In order to comprehensively consider the influence of the shape similarity and the area similarity on the matching result, the present embodiment uses the shape similarity I(A,B)And area similarity S(A,B)The weighted value of (2) is used as the judgment basis of the comprehensive similarity degree, as shown in formula (10). If the comprehensive value is smaller than the threshold value, the error is in an allowable range, and the contour matching is successful.
I(A,B)+2S(A,B)<δ1 (10)
In the formula, delta1Is a threshold value for judging the similarity of the contours, the embodiment delta1The value is 0.1.
When the inequality of the formula (10) is satisfied, the currently detected glass is the production scheduling glass. The smaller the value on the left side of the inequality is, the greater the similarity of the outline of the glass to be measured and the outline of the template glass is. If the outline of the glass to be measured is identical to that of the template glass, the area difference between the two can be more than 5 percentSimilarity S(A,B)The difference between the two pieces of glass can be judged by the algorithm when the difference is more than or equal to 0.05.
In fact, although the relative position of the lens and the conveyer belt is fixed, the conveyer belt always shakes slightly after running, so that the glass on the conveyer belt also shakes up and down, and therefore the distance between the lens and the glass changes slightly every time, so that even the glass of a production line type collects a glass image with the size slightly changing from the template image. In order to avoid the above situation from affecting the detection result, the algorithm proposed in this embodiment allows the area difference between the image to be detected and the template image to be within 5%.
Contour detection experimental data:
table 1 shows the results of the detection using the conventional geometric moment matching algorithm, and table 2 shows the results of the detection using the improved geometric moment matching algorithm. The detection data shows that the improved geometric moment matching algorithm keeps the excellent performance of the traditional geometric moment algorithm on self matching (translation and rotation), and successfully identifies the difference between the zoomed glass and the original glass, and the matching success rate is more than 99 percent; meanwhile, the improved matching algorithm also improves the recognition rate of other glass products, and the accuracy rate is more than 96%.
TABLE 1 detection results of conventional geometric moment matching algorithm
Figure BDA0003182328280000101
TABLE 2 improved geometric moment matching algorithm results
Figure BDA0003182328280000102
Figure BDA0003182328280000111
Based on the above scheme, it is also feasible to replace the contour detection algorithm with an image contour detection method using hough transform, but the effect is inferior to the scheme provided by the embodiment.
The detection algorithm flow of the material and thickness of the automobile glass combined with the Euclidean distance and the color characteristics comprises the following steps:
the color of the automobile glass is mainly formed by adding different coloring agents in the production process, and the shade of the glass color changes along with the change of the thickness of the glass. The flow of the algorithm for discriminating the glass material and thickness through the detection of the color information is shown in fig. 5.
(1) Selection of color spaces
Common color spaces are RGB color space, HSI color space, CMY color space, YIQ color space, and the like. For the automobile glass, the light source is stable during detection, so that the brightness of an image cannot be changed, the color types of the automobile glass are not more than hundreds, and the RGB color space is enough to realize the description of the color. Table 1 shows color data of automobile glass with different materials and thicknesses, wherein the number represents the thickness (unit is mm) and the english letter represents the glass material. It can be seen from table 3 that the RGB color space can distinguish the changes in the material and thickness of the automotive glass well. The present embodiment thus uses the RGB color space to describe the color of automotive glass.
TABLE 3 color information of automotive glass of different materials and thicknesses
2.0C 2.0G 2.0SG 3.0C 3.0G 3.0SG
R 234.91 216.04 131.20 227.08 190.05 127.70
G 254.29 239.52 167.92 242.28 219.53 165.04
B 229.96 213.08 139.66 221.98 199.38 134.95
(2) Preprocessing of images to be measured
Firstly, abnormal areas caused by factors such as background, illumination, dust and the like are removed through mean value filtering. Meanwhile, considering that the automobile glass has a black edge area, an extremely narrow color transition area exists between the black edge area and the transparent area, and if the color information of the black edge area and the transition area is used as data to be matched, detection errors can be caused. In order to avoid the above problems, in this embodiment, a mask is generated by ROI (region of interest) extraction and a morphological processing algorithm, the image after the mean value filtering is covered by the mask, only a transparent region part remains in the finally obtained image, and the color data of the region can represent the real color information of the automobile glass. The flow of the image preprocessing algorithm is shown in fig. 6.
(3) Collection of color information
The size of the color information acquisition quantity N of the automobile glass image influences the accuracy of the glass color information and the speed of data acquisition. When the value of N is larger, the color information can be presented very accurately. The method reduces the influence of external factors on colors by reducing the proportion of abnormal values in the acquired amount, but has larger calculation amount and increases the sampling and processing time. When the N value is small, the calculated amount is small, the processing time is short, but the influence of the abnormal value on the color information is large, and the acquired data can be easily misjudged for two pieces of automobile glass with very similar colors. In this embodiment, experiments are performed on a plurality of types of glass, and under the condition that the stability of data and the accuracy of matching are ensured, the smaller the N value is, the better the N value is, and the finally selected collection amount N is 1500.
1500 groups of color information are collected on each glass image, and the average value of R/G/B in 1500 groups of data is calculated respectively to serve as subsequent color matching data.
(4) Color feature value calculation
The difference value of the single R/G/B components of two pieces of glass with similar colors is very small, so that detection errors are easily caused. In order to avoid misjudgment, in this embodiment, before comparing the color data, the acquired R/G/B data is preprocessed to obtain the following three data: c1(sum of three components R/G/B), C2(ratio of R component to three components of R/G/B) and C3(the ratio of the G component to the three R/G/B components). The difference of the glass color data can be enlarged by utilizing the three data, and the detection accuracy is improved.
(5) Color similarity calculation
The embodiment adopts the Euclidean distance to measure the color correlation between the glass to be detected and the standard glass, and the formula is shown in 11-13.
Figure BDA0003182328280000121
Figure BDA0003182328280000122
Figure BDA0003182328280000123
Wherein A represents a glass to be tested, B represents a standard glass, and delta1、δ2And delta3Is a set comparison threshold. Only when the above 3 equations are all true will it be shown that the material and thickness of A and B match.
Material and thickness detection experimental data:
the results of the detection of the material and thickness of the automotive glass by matching the color information are shown in table 4. In 900 images to be detected, the accuracy of the matching algorithm provided by the scheme is 99.89%, the condition that glass made of other materials is mistaken as template glass does not occur, and only 1 time of errors occur in the recognition of glass of the same type. Moreover, the color matching algorithm combined with the Euclidean distance not only can accurately identify the thin white glass (C) and the green glass (G), but also can accurately distinguish the thick green glass (G) and the green glass (SG).
TABLE 4 color test results
Glass type 2.0C 2.1C 2.1G 2.1SG 3.5G 3.5SG 4.0G 4.0SG 4.2SG
2.0C 100 1 0 0 0 0 0 0 0
2.1C 0 99 0 0 0 0 0 0 0
3.5G 0 0 0 0 100 0 0 0 0
4.0G 0 0 0 0 0 0 99 0 0
Mixed line detection experimental data:
the contour detection algorithm and the color detection algorithm provided by the scheme are integrated, and the mixed line detection experiment is carried out on the glass to be detected. When any detection link fails to match, the glass to be detected does not meet the production requirement of the batch, and mixed lines appear. As shown in Table 5, the results of the mixed line test are shown. As a result, ten pieces of white glass (C), green glass (G) and green glass (SG) having thicknesses of 2.0mm, 2.1mm, 3.5mm and 4.0mm were respectively used, and the outline shapes thereof were very similar and varied greatly, and a total of 120 pieces of automobile glass were examined. According to detection data, the accuracy rate is generally higher than 95%, wherein the accuracy rate of 10 groups is higher than 97%, and the accuracy rate of 4 groups is 100%. The average detection success rate reaches 98.62 percent. Therefore, the mixed line detection algorithm provided by the scheme is feasible and effective and is applicable to industrial fields.
TABLE 5 results of mixed line testing
Figure BDA0003182328280000131
Figure BDA0003182328280000141
The above method provided by this embodiment can be stored in a computer readable storage medium in a coded form, and implemented in a computer program, and inputs basic parameter information required for calculation through computer hardware, and outputs the calculation result.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, 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 is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, 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 apparatus 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 apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.
The present invention is not limited to the above preferred embodiments, and other various methods and systems for detecting vehicle glass blending using contour and color features can be devised by anyone with the benefit of the present disclosure.

Claims (10)

1. A method for detecting automobile glass mixed lines by utilizing contour characteristics and color characteristics is characterized by comprising the following steps of: after the image information of the automobile glass is collected, firstly utilizing contour detection to remove the automobile glass with a non-batch shape, and then utilizing color detection to remove the automobile glass with a material and a thickness inconsistent with the batch; the contour detection adopts a contour matching algorithm combining geometric moments and area characteristics; the color detection adopts an automobile glass material and thickness detection algorithm combining Euclidean distance and color characteristics.
2. The method for detecting the automotive glass blending line by using the contour characteristic and the color characteristic as claimed in claim 1, wherein: the image information of the automobile glass is collected under the conditions of a white background and double light sources.
3. The method for detecting the automotive glass blending line by using the contour feature and the color feature as claimed in claim 1 or 2, wherein: the contour matching algorithm combining geometric moment and area features specifically comprises the following steps:
step S11: preprocessing an image to be detected;
step S12, calculating the geometric moment of the image;
step S13, calculating the similarity of the shapes;
step S14, area similarity calculation;
and step S15, comprehensive similarity calculation.
4. The method for detecting the automotive glass blending line by using the contour characteristic and the color characteristic as claimed in claim 3, wherein:
step S12 specifically includes:
geometric moments hu formed by the second-order center distance of the image1And hu2Is calculated as shown in equations (1) and (2):
hu1=η2002 (1)
Figure FDA0003182328270000011
in the formula eta20、η02And η11Is the second order normalized center distance of the image, and the calculation thereof is as shown in formula (3):
Figure FDA0003182328270000012
wherein p + q is 2; mu.s00And mupqIs the center-to-center distance of the image, which is calculatedAs shown in formula (4):
Figure FDA0003182328270000013
wherein f (x, y) is a function of an image to be measured or a function of a template image;
Figure FDA0003182328270000014
and
Figure FDA0003182328270000015
is the centroid coordinates of the image, which is calculated as shown in equation (5):
Figure FDA0003182328270000021
in the formula, m10And m01Is the 1 st moment of the image, representing the centroid of the image; m is00Is the 0 th moment of the image, representing the quality of the image, i.e. the sum of the pixel values within the image area; the calculation of these 3 parameters is shown in equation (6):
Figure FDA0003182328270000022
step S13 specifically includes:
setting A, B as a template image and an image to be detected of the automobile glass respectively, and calculating the geometrical moments of A, B two images
Figure FDA0003182328270000023
And
Figure FDA0003182328270000024
obtained by amplifying by using a sign function and a logarithm function
Figure FDA0003182328270000025
And
Figure FDA0003182328270000026
as shown in formula (7):
Figure FDA0003182328270000027
wherein i is 1, 2; the shape similarity I of images A and B is then calculated using equation (8)(A,B)In which I(A,B)The smaller the value, the higher the similarity:
Figure FDA0003182328270000028
step S14 specifically includes:
let SAAnd SBThe area of the automobile glass on the template image and the image to be measured respectively passes through 0 order moment m00Obtaining; area similarity S between two images(A,B)Calculated by the formula (9), S(A,B)The smaller the value of (d), the closer the areas of the two images are:
Figure FDA0003182328270000029
step S15 specifically includes:
using shape similarity I(A,B)And area similarity S(A,B)The weighted value of (2) is used as a judgment basis of the comprehensive similarity, as shown in formula (10), if the comprehensive value is smaller than the threshold, the error is within an allowable range, and the contour matching is successful:
I(A,B)+2S(A,B)<δ1 (10)
in the formula, delta1Is a threshold for determining contour similarity.
5. The method for detecting the automotive glass blending line by using the contour feature and the color feature as claimed in claim 1 or 4, wherein: the detection algorithm for the material and thickness of the automobile glass combining the Euclidean distance and the color characteristics is specific
The method comprises the following steps:
step S21: preprocessing an image to be detected;
step S22: collecting color information;
step S23: calculating a color characteristic value;
step S24: and calculating the color similarity.
6. The method for detecting the automotive glass blending line by using the contour characteristic and the color characteristic as claimed in claim 5, wherein: the automobile glass material and thickness detection algorithm combining the Euclidean distance and the color characteristics adopts an RGB color space.
7. The method for detecting the automotive glass blending line by using the contour characteristic and the color characteristic as claimed in claim 6, wherein:
step S21 specifically includes:
generating a mask plate through ROI extraction and morphological processing algorithms, covering the mask plate on the image after mean filtering, and only leaving a transparent area part in the obtained image;
step S22 specifically includes:
acquiring N groups of color information for each glass image, and respectively calculating the average value of R/G/B in the N groups of data to be used as color matching data;
step S23 specifically includes:
the acquired R/G/B data are preprocessed to obtain the following three data: c1: sum of three components R/G/B, C2: ratio of R component to R/G/B component and C3: the proportion of the G component in the R/G/B three components;
step S24 specifically includes:
the Euclidean distance is adopted to measure the color correlation between the glass to be detected and the standard glass, and the formula is shown as 11-13:
Figure FDA0003182328270000031
Figure FDA0003182328270000032
Figure FDA0003182328270000033
wherein A represents a glass to be tested, B represents a standard glass, and delta1、δ2And delta3Is a set comparison threshold; only when the above 3 equations are all true will it be shown that the material and thickness of A and B match.
8. A system for detecting automotive glass blending using contour and color features, comprising: the system comprises an automobile glass image acquisition module, a contour detection module and a color detection module; the automobile glass image acquisition module is used for acquiring image information of automobile glass; the contour detection module adopts a contour matching algorithm combining geometric moment and area characteristics to remove automobile glass with non-current batch appearance; the color detection module adopts an automobile glass material and thickness detection algorithm combining Euclidean distance and color characteristics to remove automobile glass with material and thickness inconsistent with the batch.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the method for detecting automotive glass cord using contour and color features as claimed in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for detecting automotive glass-blending using contour features and color features as set forth in any one of claims 1 to 7.
CN202110853548.0A 2021-07-27 2021-07-27 Method and system for detecting automobile glass mixed line by utilizing contour characteristic and color characteristic Pending CN113578778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110853548.0A CN113578778A (en) 2021-07-27 2021-07-27 Method and system for detecting automobile glass mixed line by utilizing contour characteristic and color characteristic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110853548.0A CN113578778A (en) 2021-07-27 2021-07-27 Method and system for detecting automobile glass mixed line by utilizing contour characteristic and color characteristic

Publications (1)

Publication Number Publication Date
CN113578778A true CN113578778A (en) 2021-11-02

Family

ID=78250774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110853548.0A Pending CN113578778A (en) 2021-07-27 2021-07-27 Method and system for detecting automobile glass mixed line by utilizing contour characteristic and color characteristic

Country Status (1)

Country Link
CN (1) CN113578778A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114659453A (en) * 2022-03-25 2022-06-24 广东精达里亚特种漆包线有限公司 Method and system for detecting paint film thickness of enameled wire

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107665489A (en) * 2017-09-18 2018-02-06 华中科技大学 A kind of glass dihedral angle detection method based on computer vision
CN109668909A (en) * 2017-10-13 2019-04-23 南京敏光视觉智能科技有限公司 A kind of glass defect detection method
CN109816675A (en) * 2018-12-28 2019-05-28 歌尔股份有限公司 Detection method, detection device and the storage medium of object
CN110261410A (en) * 2019-05-24 2019-09-20 西安交通大学 A kind of detection device and method of glass lens defect
CN111415376A (en) * 2020-02-27 2020-07-14 湖南大学 Automobile glass sub-pixel contour extraction method and automobile glass detection method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107665489A (en) * 2017-09-18 2018-02-06 华中科技大学 A kind of glass dihedral angle detection method based on computer vision
CN109668909A (en) * 2017-10-13 2019-04-23 南京敏光视觉智能科技有限公司 A kind of glass defect detection method
CN109816675A (en) * 2018-12-28 2019-05-28 歌尔股份有限公司 Detection method, detection device and the storage medium of object
CN110261410A (en) * 2019-05-24 2019-09-20 西安交通大学 A kind of detection device and method of glass lens defect
CN111415376A (en) * 2020-02-27 2020-07-14 湖南大学 Automobile glass sub-pixel contour extraction method and automobile glass detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李建兴等: "基于机器视觉的汽车角窗玻璃混线检测算法", 《福建工程学院学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114659453A (en) * 2022-03-25 2022-06-24 广东精达里亚特种漆包线有限公司 Method and system for detecting paint film thickness of enameled wire

Similar Documents

Publication Publication Date Title
CN110349126B (en) Convolutional neural network-based marked steel plate surface defect detection method
CN105067638B (en) Tire fetal membrane face character defect inspection method based on machine vision
CN111179225B (en) Test paper surface texture defect detection method based on gray gradient clustering
CN115082683B (en) Injection molding defect detection method based on image processing
EP3343440A1 (en) Identifying and excluding blurred areas of images of stained tissue to improve cancer scoring
CN102426649B (en) Simple steel seal digital automatic identification method with high accuracy rate
CN113239930B (en) Glass paper defect identification method, system, device and storage medium
CN115170572B (en) BOPP composite film surface gluing quality monitoring method
CN105913093A (en) Template matching method for character recognizing and processing
CN111127383A (en) Digital printing online defect detection system and implementation method thereof
CN108596880A (en) Weld defect feature extraction based on image procossing and welding quality analysis method
CN105069790A (en) Rapid imaging detection method for gear appearance defect
CN110298840B (en) Yarn defect detection method based on image
CN102974551A (en) Machine vision-based method for detecting and sorting polycrystalline silicon solar energy
CN104408707A (en) Rapid digital imaging fuzzy identification and restored image quality assessment method
CN107622277A (en) A kind of complex-curved defect classification method based on Bayes classifier
CN110490826B (en) Fog drop sample image processing method in camera
CN108318491A (en) A kind of fabric defect detection method based on frequency spectrum curvature analysis
CN103439348A (en) Remote controller key defect detection method based on difference image method
CN112819844B (en) Image edge detection method and device
CN111161237A (en) Fruit and vegetable surface quality detection method, storage medium and sorting device thereof
CN110853013A (en) Method for detecting spraying quality of outer wall of white household appliance
CN115294116A (en) Method, device and system for evaluating dyeing quality of textile material based on artificial intelligence
CN113578778A (en) Method and system for detecting automobile glass mixed line by utilizing contour characteristic and color characteristic
CN115311250A (en) Cigarette appearance detection method based on deep learning and space-time feature fusion

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: 20211102