CN113327257B - Method and device for judging automobile glass in different areas - Google Patents

Method and device for judging automobile glass in different areas Download PDF

Info

Publication number
CN113327257B
CN113327257B CN202110614813.XA CN202110614813A CN113327257B CN 113327257 B CN113327257 B CN 113327257B CN 202110614813 A CN202110614813 A CN 202110614813A CN 113327257 B CN113327257 B CN 113327257B
Authority
CN
China
Prior art keywords
defect
area
glass
coordinate
automobile
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110614813.XA
Other languages
Chinese (zh)
Other versions
CN113327257A (en
Inventor
墨磊
汪洋
王雪巍
陈文涛
刘玉莹
许涛
潘亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bengbu Triumph Engineering and Technology Co Ltd
Original Assignee
Bengbu Triumph Engineering and 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 Bengbu Triumph Engineering and Technology Co Ltd filed Critical Bengbu Triumph Engineering and Technology Co Ltd
Priority to CN202110614813.XA priority Critical patent/CN113327257B/en
Publication of CN113327257A publication Critical patent/CN113327257A/en
Application granted granted Critical
Publication of CN113327257B publication Critical patent/CN113327257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a method and a device for judging automobile glass areas and the like, wherein the method comprises the following steps: detecting edge coordinates of an automobile glass area on the flat glass, and calculating the area A of the automobile glass area through the edge coordinates; detecting defects on the flat glass and determining whether defect coordinates are on the flat glass, if so, adding the defect coordinates to a cache area, and forming a defect set S by all the defect coordinates in the cache area; calculating the area of a graph formed by the current defect coordinate and two adjacent edge coordinates on the automobile glass area, and accumulating the areas of all the images to obtain a total area B; if A is smaller than B, the defect is outside the automobile glass area, and if A is equal to B, the defect is in the automobile glass area; judging the grade of each plate glass; the invention has the advantages that: the method of judging by regions and the like reduces the grade requirement on the regions outside the automobile glass region and improves the finished product rate of the automobile glass.

Description

Method and device for judging automobile glass in different areas
Technical Field
The invention relates to the field of automobile glass judgment and the like, in particular to a method and a device for judging automobile glass in different areas.
Background
The automobile glass judgment and the like are used as important composition steps for production and stacking realization of the automobile glass, and the main function is to divide the plate glass into equal parts according to attributes such as defect positions, sizes and types of the plate glass, and ensure that the plate glass is stacked and sold according to client requirements. Because the rear-end processing technology and the size of the automobile glass are different, the manufacturing requirements of customers on different types of orders can not be met only by a single overall area judgment mode and the like of each piece of glass, and the functions of realizing the regional online judgment of each substrate and the like are particularly important. At present, methods such as automobile glass judgment and the like on the market are mostly carried out in modes such as off-line judgment and automatic national standard judgment, the former can reduce the automatic production efficiency of the automobile glass, and the latter improves the former mode, but still cannot complete multi-process and multi-type automobile glass production. The automobile glass can be set into different shapes according to the process requirements of different manufacturers, the automobile glass with different shapes is cut based on the plate glass, the requirement on the defect grade of an area needing to be cut is not strict, the requirement on the defect grade of the area of the automobile glass is strict, if the automobile glass is divided according to the traditional grade division method, the defect that a plurality of plate glasses do not meet the grade requirement in the area needing to be cut can be caused, the plate glass can not be used for producing the automobile glass, and the finished product rate is reduced.
Chinese patent application No. 202010483687.4 discloses a glass defect visual inspection algorithm, including: polishing differently aiming at each different defect so as to respectively obtain a plurality of channel images of each defect in different polishing; respectively selecting an image extraction edge system which is most suitable for extracting one channel image of the edge system for each defect; applying the selected image extraction edge system to the image of the channel so as to divide the channel image of each channel into a window area and an edge area; marking the defects of the edge area and the window area; screening small image blocks with defects by using a machine vision algorithm, and reserving the small image blocks with the defects for further analysis of a deep learning model; detecting the defect position and attribute with the category by using a defect detection model and a classification model; and training a grade discriminator by using machine learning according to the defect attribute of the defect, and dividing the defect significance into a plurality of grades from weak to strong. If defect categories are required to be added, only marking training is required, no additional classifier is required to be designed, and product switching is conveniently realized. The method mainly divides the glass grade, cannot judge the automobile glass in different areas and cannot solve the problem of low finished product rate of the automobile glass.
Disclosure of Invention
The invention aims to provide a method for judging automobile glass in different regions and the like so as to improve the yield of the automobile glass.
The invention solves the technical problems through the following technical means: a method for judging regions of automobile glass and the like, comprising the following steps:
a, step a: detecting edge coordinates of an automobile glass area on the plate glass according to a threshold edge algorithm and calculating the area A of the automobile glass area through the edge coordinates; the automobile glass area is detected through an edge algorithm, so that the automobile glass area and the area outside the automobile glass area are divided on the plate glass, the area outside the automobile glass area is not considered too much when the subsequent grading division is carried out, the area is cut out finally, the yield can be improved, and the calculation of the area A of the automobile glass area is convenient for distinguishing the coordinates of the defect point in the subsequent area which is not in the automobile area through an area comparison mode.
Step b: detecting defects on the flat glass by using a defect detector and determining whether defect coordinates are on the flat glass, if so, adding the defect coordinates to a cache region, and forming a defect set S by all the defect coordinates in the cache region; the purpose of forming the defect set S is to find the coordinates of all defect points on the flat glass by a defect detector, so as to divide the defect coordinates later and confirm whether each defect coordinate is in the automobile glass area or outside the automobile glass area.
Step c: calculating the area of a graph formed by surrounding the current defect coordinate and two adjacent edge coordinates on the automobile glass area, and accumulating the areas of all the images to obtain a total area B; after the edge of the automobile glass area is detected, the area of a graph formed by the current defect coordinate and two adjacent edge coordinates on the automobile glass area is equivalent to the triangular structure formed by the current defect coordinate and the two adjacent edge coordinates, when all the areas are accumulated, if the defect coordinate is in the automobile glass area, the total area B is certainly equal to A within an error range, and if the defect coordinate is outside the automobile glass area, the total area B is certainly larger than A within the error range, so that the calculation of the total area B is convenient for subsequent judgment of whether the defect is in the automobile glass area.
Step d: if A is smaller than B, the defect is outside the automobile glass area, and if A is equal to B, the defect is in the automobile glass area;
step e: taking the next defect coordinate as the current defect coordinate, returning to execute the step c and the step d until all the defect coordinates are traversed, and storing the attribute of each defect coordinate into a defect set S, wherein the attribute of each defect coordinate indicates whether the defect coordinate is in the automobile glass area; and c, returning the next defect coordinate as the current defect coordinate, judging whether all the defect coordinates are in the automobile glass area when the step c and the step d are executed, storing each defect coordinate in the front defect set S, and storing the attribute corresponding to each defect coordinate in the defect set S at the moment so as to count the number of the defect coordinates in the automobile glass area or outside the automobile glass area in the later period.
Step f: and judging the grade of each sheet glass according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, and taking the sheet glass which meets the qualified grade of the automobile glass as a finished product. The step is to grade by regions, for example, the number of defects allowed to exist in an automobile glass region is 3, and the number of defects allowed to exist outside the automobile glass region is equal to one when the number of defects allowed to exist outside the automobile glass region is not limited, and then the automobile glass region is judged to be equal to one when the number of defects of a certain flat glass in the automobile glass region is less than or equal to 3.
According to the invention, on the plate glass, the edge coordinates of the automobile glass area are detected according to the threshold edge algorithm, then each defect coordinate is judged not to be in the automobile glass area, each plate glass grade is judged according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, the plate glass in accordance with the automobile glass qualified grade is taken as a finished product, and the grade requirement on the area outside the automobile glass area is reduced by the methods of regional judgment and the like, so that the whole piece of glass is eliminated when the automobile glass area meets the grade requirement but the glass outside the automobile glass area does not meet the requirement, and the yield of the automobile glass is improved.
Further, the step a comprises: the method comprises the steps of collecting images of a flat glass and an automobile glass area on the flat glass, carrying out RGB format decomposition on the images, carrying out coordinate division on the flat glass and the automobile glass area on the flat glass with the resolution ratio of 1, recording edge coordinates of the automobile glass area one by one, taking any coordinate point in the automobile glass area as a reference point, sequentially calculating the area of a triangle formed by the reference point and an adjacent edge coordinate, and accumulating the areas of all triangles to obtain the area A of the automobile glass area.
Further, the step b comprises:
step b 1: establishing a List type cache region;
step b 2: obtaining the coordinate of each defect through a defect detector, and if the defect coordinate is Q (X, Y), when X is more than or equal to Xs, X is less than or equal to Xe, Y is more than or equal to Ys, and Y is less than or equal to Ye, the defect coordinate is on the current float glass, wherein Xs represents the X-direction starting coordinate of the current float glass, Xe represents the X-direction ending coordinate of the current float glass, Ys represents the Y-direction starting coordinate of the current float glass, and Ye represents the Y-direction ending coordinate of the current float glass;
step b 3: the defect coordinates Q (X, Y) obtained in step b2 are added to the List type cache area, all defect coordinates forming a defect set S.
Further, in the step d, a is equal to B, which means that the ratio of a to B is within an allowable error range.
Still further, the allowable error range is 100% ± 0.1%.
The invention also provides a device for judging the areas of the automobile glass and the like, which comprises:
the automobile glass region dividing module is used for detecting the edge coordinates of the automobile glass region on the plate glass according to a threshold edge algorithm and calculating the area A of the automobile glass region through the edge coordinates;
the defect set acquisition module is used for detecting defects on the plate glass by using the defect detector and determining whether defect coordinates are on the plate glass, if so, the defect coordinates are added to the cache area, and all the defect coordinates in the cache area form a defect set S;
the defect area acquisition module is used for calculating the area of a graph formed by surrounding the current defect coordinate and two adjacent edge coordinates on the automobile glass area, and accumulating the areas of all the images to obtain a total area B;
the defect area judging module is used for judging whether the defect is outside the automobile glass area if A is smaller than B or whether the defect is in the automobile glass area if A is equal to B;
the traversing module is used for returning the next defect coordinate as the current defect coordinate to execute the step c and the step d until all the defect coordinates are traversed, and storing the attribute of each defect coordinate into a defect set S, wherein the attribute of the defect coordinate indicates whether the defect coordinate is in the automobile glass area;
and the grade division module is used for judging each sheet glass grade according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, and taking the sheet glass meeting the qualified automobile glass grade as a finished product.
Further, the automobile glass region dividing module is also used for: the method comprises the steps of collecting images of a flat glass and an automobile glass area on the flat glass, carrying out RGB format decomposition on the images, carrying out coordinate division on the flat glass and the automobile glass area on the flat glass with the resolution ratio of 1, recording edge coordinates of the automobile glass area one by one, taking any coordinate point in the automobile glass area as a reference point, sequentially calculating the area of a triangle formed by the reference point and an adjacent edge coordinate, and accumulating the areas of all triangles to obtain the area A of the automobile glass area.
Further, the defect set obtaining module is further configured to:
step b 1: establishing a List type cache region;
step b 2: obtaining the coordinate of each defect through a defect detector, and if the defect coordinate is Q (X, Y), when X is more than or equal to Xs, X is less than or equal to Xe, Y is more than or equal to Ys, and Y is less than or equal to Ye, the defect coordinate is on the current float glass, wherein Xs represents the X-direction starting coordinate of the current float glass, Xe represents the X-direction ending coordinate of the current float glass, Ys represents the Y-direction starting coordinate of the current float glass, and Ye represents the Y-direction ending coordinate of the current float glass;
step b 3: the defect coordinates Q (X, Y) obtained in step b2 are added to the List type cache area, all defect coordinates forming a defect set S.
Further, the defect area determination module that a is equal to B means that the ratio of a to B is within an allowable error range.
Still further, the allowable error range is 100% ± 0.1%.
The invention has the advantages that: according to the invention, on the plate glass, the edge coordinates of the automobile glass area are detected according to the threshold edge algorithm, then each defect coordinate is judged not to be in the automobile glass area, each plate glass grade is judged according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, the plate glass which meets the automobile glass qualified grade is taken as a finished product, the grade requirement on the area outside the automobile glass area is reduced by the methods of regional judgment and the like, so that the whole piece of glass is eliminated when the automobile glass area meets the grade requirement but the glass outside the automobile glass area does not meet the requirement, and the yield of the automobile glass is improved.
Drawings
Fig. 1 is a flowchart of a method for judging areas of automobile glass according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Example 1
As shown in fig. 1, a method for judging regions of automobile glass, the method comprises:
a, step a: detecting edge coordinates of an automobile glass area on the plate glass according to a threshold edge algorithm and calculating the area A of the automobile glass area through the edge coordinates; the automobile glass area is detected through an edge algorithm, so that the automobile glass area and the area outside the automobile glass area are divided on the flat glass, the area outside the automobile glass area is not considered too much when the subsequent grading is carried out, the area is finally cut, the yield can be improved, and the area A of the automobile glass area is calculated, so that the defect point coordinate is distinguished from the area outside the automobile area through an area comparison mode. The specific process of the step a comprises the following steps: the method comprises the steps of collecting images of a flat glass and an automobile glass area on the flat glass, carrying out RGB format decomposition on the images, carrying out coordinate division on the flat glass and the automobile glass area on the flat glass with the resolution ratio of 1, recording edge coordinates of the automobile glass area one by one, taking any coordinate point in the automobile glass area as a reference point, sequentially calculating the area of a triangle formed by the reference point and an adjacent edge coordinate, and accumulating the areas of all triangles to obtain the area A of the automobile glass area. It should be noted that the edge algorithm belongs to the algorithm in the prior art, and the step of the present invention mainly aims to obtain the edge coordinates of the automobile glass area, and is not a key point for what algorithm is used to obtain the edge coordinates, and any existing technology capable of obtaining the edge coordinates can be adopted.
Step b: detecting defects on the plate glass by using a defect detector and determining whether defect coordinates are on the plate glass, if so, adding the defect coordinates to a cache region, and forming a defect set S by all the defect coordinates in the cache region; the purpose of forming the defect set S is to find the coordinates of all defect points on the flat glass by a defect detector, so as to divide the defect coordinates later and confirm whether each defect coordinate is inside or outside the automobile glass area. The specific process of the step b is as follows:
step b 1: establishing a List type cache region;
step b 2: obtaining the coordinate of each defect through a defect detector, and if the defect coordinate is Q (X, Y), when X is more than or equal to Xs, X is less than or equal to Xe, Y is more than or equal to Ys, and Y is less than or equal to Ye, the defect coordinate is on the current float glass, wherein Xs represents the X-direction starting coordinate of the current float glass, Xe represents the X-direction ending coordinate of the current float glass, Ys represents the Y-direction starting coordinate of the current float glass, and Ye represents the Y-direction ending coordinate of the current float glass; the model of the defect detector is FS-5D.
Step b 3: the defect coordinates Q (X, Y) obtained in step b2 are added to the List type cache area, all defect coordinates forming a defect set S.
Step c: calculating the area of a graph formed by the current defect coordinate and two adjacent edge coordinates on the automobile glass area, and accumulating the areas of all the images to obtain a total area B; after the edge of the automobile glass area is detected, the area of a graph formed by the current defect coordinate and two adjacent edge coordinates on the automobile glass area is equivalent to a triangular structure formed by the current defect coordinate and the two adjacent edge coordinates, when all the areas are accumulated, if the defect coordinate is in the automobile glass area, the total area B is certainly equal to A within an error range, and if the defect coordinate is outside the automobile glass area, the total area B is certainly larger than A within the error range, so that the calculation of the total area B is convenient for subsequent judgment of whether the defect is in the automobile glass area.
Step d: if A is less than B, the defect is outside the automobile glass area, and if A is equal to B, the defect is inside the automobile glass area; wherein A is equal to B means that the ratio of A to B is within an allowable error range. The allowable error range is 100% ± 0.1%.
Step e: c, taking the next defect coordinate as the current defect coordinate, returning to execute the step c and the step d until all the defect coordinates are traversed, and storing the attribute of each defect coordinate into a defect set S, wherein the attribute of each defect coordinate indicates whether the defect coordinate is in the automobile glass area or not; and c, returning the next defect coordinate as the current defect coordinate, judging whether all the defect coordinates are in the automobile glass area when the step c and the step d are executed, storing each defect coordinate in the front defect set S, and storing the attribute corresponding to each defect coordinate in the defect set S at the moment so as to count the number of the defect coordinates in the automobile glass area or outside the automobile glass area in the later period.
Step f: and judging the grade of each plate glass according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, and taking the plate glass which meets the qualified grade of the automobile glass as a finished product. The step is to grade by regions, for example, the number of defects allowed to exist in an automobile glass region is 3, and the number of defects allowed to exist outside the automobile glass region is equal to one when the number of defects allowed to exist outside the automobile glass region is not limited, and then the automobile glass region is judged to be equal to one when the number of defects of a certain flat glass in the automobile glass region is less than or equal to 3.
According to the technical scheme, the edge coordinates of the automobile glass area are detected on the plate glass according to the threshold edge algorithm, then each defect coordinate is judged to be not in the automobile glass area, the grade of each plate glass is judged according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, the plate glass which meets the qualified grade of the automobile glass is used as a finished product, the grade requirement on the area outside the automobile glass area is reduced through methods such as zone judgment, the whole piece of glass is eliminated when the automobile glass area meets the grade requirement but the glass outside the automobile glass area does not meet the requirement, and the finished product rate of the automobile glass is improved.
Example 2
Based on embodiment 1 of the present invention, embodiment 2 of the present invention further provides a device for judging the regions of the automobile glass, and the device includes:
the automobile glass region dividing module is used for detecting the edge coordinates of the automobile glass region on the plate glass according to a threshold edge algorithm and calculating the area A of the automobile glass region through the edge coordinates;
the defect set acquisition module is used for detecting defects on the plate glass by using the defect detector and determining whether defect coordinates are on the plate glass, if so, the defect coordinates are added to the cache area, and all the defect coordinates in the cache area form a defect set S;
the defect area acquisition module is used for calculating the area of a graph formed by the current defect coordinate and two adjacent edge coordinates on the automobile glass area, and the total area B is obtained by accumulating the areas of all the images;
the defect area judging module is used for judging whether the defect is outside the automobile glass area if A is smaller than B or whether the defect is in the automobile glass area if A is equal to B;
the traversing module is used for returning the next defect coordinate as the current defect coordinate to execute the step c and the step d until all the defect coordinates are traversed, and storing the attribute of each defect coordinate into a defect set S, wherein the attribute of the defect coordinate indicates whether the defect coordinate is in the automobile glass area;
and the grade division module is used for judging the grade of each plate glass according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, and taking the plate glass which meets the qualified grade of the automobile glass as a finished product.
Specifically, the automobile glass region dividing module is further used for: the method comprises the steps of collecting images of a flat glass and an automobile glass area on the flat glass, carrying out RGB format decomposition on the images, carrying out coordinate division on the flat glass and the automobile glass area on the flat glass with the resolution ratio of 1, recording edge coordinates of the automobile glass area one by one, taking any coordinate point in the automobile glass area as a reference point, sequentially calculating the area of a triangle formed by the reference point and an adjacent edge coordinate, and accumulating the areas of all triangles to obtain the area A of the automobile glass area.
Specifically, the defect set obtaining module is further configured to:
step b 1: establishing a List type cache region;
step b 2: obtaining the coordinate of each defect through a defect detector, and if the defect coordinate is Q (X, Y), when X is more than or equal to Xs, X is less than or equal to Xe, Y is more than or equal to Ys, and Y is less than or equal to Ye, the defect coordinate is on the current float glass, wherein Xs represents the X-direction starting coordinate of the current float glass, Xe represents the X-direction ending coordinate of the current float glass, Ys represents the Y-direction starting coordinate of the current float glass, and Ye represents the Y-direction ending coordinate of the current float glass;
step b 3: the defect coordinates Q (X, Y) obtained in step b2 are added to the List-type buffer, and all the defect coordinates form a defect set S.
Specifically, the fact that a is equal to B in the defective area determination module means that the ratio of a to B is within an allowable error range.
More specifically, the allowable error range is 100% ± 0.1%.
The above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for judging areas of automobile glass and the like is characterized by comprising the following steps:
step a: detecting edge coordinates of an automobile glass area on the flat glass, and calculating the area A of the automobile glass area through the edge coordinates;
step b: detecting defects on the flat glass and determining whether the defect coordinates are on the flat glass, if so, adding the defect coordinates to a cache region, and forming a defect set S by all the defect coordinates in the cache region;
step c: calculating the area of a graph formed by surrounding the current defect coordinate and two adjacent edge coordinates on the automobile glass area, and accumulating the areas of all the graphs to obtain a total area B;
step d: if A is less than B, the defect is outside the automobile glass area, and if A is equal to B, the defect is inside the automobile glass area;
step e: c, taking the next defect coordinate as the current defect coordinate, returning to execute the step c and the step d until all the defect coordinates are traversed, and storing the attribute of each defect coordinate into a defect set S, wherein the attribute of each defect coordinate indicates whether the defect coordinate is in the automobile glass area or not;
step f: and judging the grade of each plate glass according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, and taking the plate glass which meets the qualified grade of the automobile glass as a finished product.
2. The method for judging the areas of the glass of the automobile according to claim 1, wherein the step a comprises the following steps: the method comprises the steps of collecting images of a flat glass and an automobile glass area on the flat glass, carrying out RGB format decomposition on the images, carrying out coordinate division on the flat glass and the automobile glass area on the flat glass with the resolution ratio of 1, recording edge coordinates of the automobile glass area one by one, taking any coordinate point in the automobile glass area as a reference point, sequentially calculating the area of a triangle formed by the reference point and an adjacent edge coordinate, and accumulating the areas of all triangles to obtain the area A of the automobile glass area.
3. The method for judging the regions of the glass of the automobile according to claim 1, wherein the step b comprises the following steps:
step b 1: establishing a List type cache region;
step b 2: obtaining the coordinate of each defect through a defect detector, and if the defect coordinate is Q (X, Y), when X is more than or equal to Xs, X is less than or equal to Xe, Y is more than or equal to Ys, and Y is less than or equal to Ye, the defect coordinate is on the current float glass, wherein Xs represents the X-direction start coordinate of the current float glass, Xe represents the X-direction end coordinate of the current float glass, Ys represents the Y-direction start coordinate of the current float glass, and Ye represents the Y-direction end coordinate of the current float glass;
step b 3: the defect coordinates Q (X, Y) obtained in step b2 are added to the List-type buffer, and all the defect coordinates form a defect set S.
4. The method according to claim 1, wherein the condition that A is equal to B in step d means that the ratio of A to B is within an allowable error range.
5. The method according to claim 4, wherein the allowable error range is 100% ± 0.1%.
6. A device for judging the zone of automobile glass and the like is characterized by comprising:
the automobile glass area dividing module is used for detecting the edge coordinates of the automobile glass area on the plate glass and calculating the area A of the automobile glass area through the edge coordinates;
the defect set acquisition module is used for detecting defects on the plate glass and determining whether defect coordinates are on the plate glass, if so, the defect coordinates are added to the cache area, and all the defect coordinates in the cache area form a defect set S;
the defect area acquisition module is used for calculating the area of a graph formed by the current defect coordinate and two adjacent edge coordinates on the automobile glass area in a surrounding manner, and the total area B is obtained by accumulating the areas of all the graphs;
the defect area judging module is used for judging whether the defect is outside the automobile glass area if A is smaller than B or whether the defect is in the automobile glass area if A is equal to B;
the traversing module is used for returning the next defect coordinate as the current defect coordinate to execute the step c and the step d until all the defect coordinates are traversed, and storing the attribute of each defect coordinate into the defect set S, wherein the attribute of the defect coordinate indicates whether the defect coordinate is in the automobile glass area;
and the grade division module is used for judging the grade of each plate glass according to the number of the defects allowed to exist in the automobile glass area under each grade and the number of the defects allowed to exist outside the automobile glass area, and taking the plate glass which meets the qualified grade of the automobile glass as a finished product.
7. The device for judging the regions of the glass of the automobile according to claim 6, wherein the module for dividing the glass regions of the automobile is further used for: the method comprises the steps of collecting images of a plate glass and an automobile glass area on the plate glass, carrying out RGB format decomposition on the images, carrying out coordinate division on the plate glass and the automobile glass area on the plate glass with the resolution ratio of 1, recording edge coordinates of the automobile glass area one by one, taking any coordinate point in the automobile glass area as a reference point, calculating the area of a triangle formed by the reference point and an adjacent edge coordinate in sequence, and accumulating the areas of all triangles to obtain the area A of the automobile glass area.
8. The device for judging the regions of the glass of the automobile according to claim 6, wherein the defect set obtaining module is further configured to:
step b 1: establishing a List type cache region;
step b 2: obtaining the coordinate of each defect through a defect detector, and if the defect coordinate is Q (X, Y), when X is more than or equal to Xs, X is less than or equal to Xe, Y is more than or equal to Ys, and Y is less than or equal to Ye, the defect coordinate is on the current float glass, wherein Xs represents the X-direction starting coordinate of the current float glass, Xe represents the X-direction ending coordinate of the current float glass, Ys represents the Y-direction starting coordinate of the current float glass, and Ye represents the Y-direction ending coordinate of the current float glass;
step b 3: the defect coordinates Q (X, Y) obtained in step b2 are added to the List-type buffer, and all the defect coordinates form a defect set S.
9. The device according to claim 6, wherein the defect area determination module is configured to determine whether A is equal to B, which means that the ratio of A to B is within an allowable error range.
10. The device according to claim 9, wherein the allowable error range is 100% ± 0.1%.
CN202110614813.XA 2021-06-02 2021-06-02 Method and device for judging automobile glass in different areas Active CN113327257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110614813.XA CN113327257B (en) 2021-06-02 2021-06-02 Method and device for judging automobile glass in different areas

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110614813.XA CN113327257B (en) 2021-06-02 2021-06-02 Method and device for judging automobile glass in different areas

Publications (2)

Publication Number Publication Date
CN113327257A CN113327257A (en) 2021-08-31
CN113327257B true CN113327257B (en) 2022-07-26

Family

ID=77421481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110614813.XA Active CN113327257B (en) 2021-06-02 2021-06-02 Method and device for judging automobile glass in different areas

Country Status (1)

Country Link
CN (1) CN113327257B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102305798A (en) * 2011-08-02 2012-01-04 上海交通大学 Method for detecting and classifying glass defects based on machine vision
FR2971588A1 (en) * 2011-02-11 2012-08-17 Peugeot Citroen Automobiles Sa METHOD FOR DETECTING OPTICAL DEFECT IN A WINDSHIELD
CN108956613A (en) * 2018-05-04 2018-12-07 湖南科创信息技术股份有限公司 Glass tin defects vision identification system
CN110223296A (en) * 2019-07-08 2019-09-10 山东建筑大学 A kind of screw-thread steel detection method of surface flaw and system based on machine vision
CN111612781A (en) * 2020-05-27 2020-09-01 歌尔股份有限公司 Screen defect detection method and device and head-mounted display equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108335283A (en) * 2017-12-28 2018-07-27 江苏易润信息技术有限公司 A kind of method of automatic detection classification glass defect
CN111709919B (en) * 2020-06-01 2023-09-05 深圳市深视创新科技有限公司 Glass defect visual detection algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2971588A1 (en) * 2011-02-11 2012-08-17 Peugeot Citroen Automobiles Sa METHOD FOR DETECTING OPTICAL DEFECT IN A WINDSHIELD
CN102305798A (en) * 2011-08-02 2012-01-04 上海交通大学 Method for detecting and classifying glass defects based on machine vision
CN108956613A (en) * 2018-05-04 2018-12-07 湖南科创信息技术股份有限公司 Glass tin defects vision identification system
CN110223296A (en) * 2019-07-08 2019-09-10 山东建筑大学 A kind of screw-thread steel detection method of surface flaw and system based on machine vision
CN111612781A (en) * 2020-05-27 2020-09-01 歌尔股份有限公司 Screen defect detection method and device and head-mounted display equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
缺陷汽车玻璃检测方法;陈晨;《智能计算机与应用》;20210531;198-201 *

Also Published As

Publication number Publication date
CN113327257A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN108562589B (en) Method for detecting surface defects of magnetic circuit material
CN103267764B (en) Hot-rolled steel plate surface defect image identification method based on neighborhood information estimation
CN104504388B (en) A kind of pavement crack identification and feature extraction algorithm and system
CN104101600B (en) Cross Section of CC Billet testing of small cracks method
CN102175700B (en) Method for detecting welding seam segmentation and defects of digital X-ray images
CN109543753B (en) License plate recognition method based on self-adaptive fuzzy repair mechanism
CN102095731A (en) System and method for recognizing different defect types in paper defect visual detection
CN109580652A (en) A kind of quality of battery pole piece detection method, electronic equipment and storage medium
CN102020036A (en) Visual detection method for transparent paper defect of outer package of strip cigarette
CN110309765B (en) High-efficiency detection method for video moving target
CN110567969B (en) Image recognition method and system for detecting fabric defects
US11869247B2 (en) Perception data detection method and apparatus
CN113340909A (en) Glue line defect detection method based on machine vision
CN109543498B (en) Lane line detection method based on multitask network
CN103679214A (en) Vehicle detection method based on online area estimation and multi-feature decision fusion
CN111783672A (en) Image feature identification method for improving bridge dynamic displacement precision
CN107247967B (en) Vehicle window annual inspection mark detection method based on R-CNN
CN108492306A (en) A kind of X-type Angular Point Extracting Method based on image outline
CN116258682A (en) PCB solder paste defect detection method based on PSPNet and improved YOLOv7
CN113327257B (en) Method and device for judging automobile glass in different areas
CN102313740B (en) Solar panel crack detection method
CN111582332B (en) Picture identification method for high-speed railway contact net dropper component
Li et al. Detection of small size defects in belt layer of radial tire based on improved faster r-cnn
CN117173133A (en) Glass bead defect detection algorithm based on Ghostnet and attention mechanism
CN116030013A (en) Multi-target multi-category damage defect detection method, system and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant