CN110596120A - Glass boundary defect detection method, device, terminal and storage medium - Google Patents

Glass boundary defect detection method, device, terminal and storage medium Download PDF

Info

Publication number
CN110596120A
CN110596120A CN201910841702.5A CN201910841702A CN110596120A CN 110596120 A CN110596120 A CN 110596120A CN 201910841702 A CN201910841702 A CN 201910841702A CN 110596120 A CN110596120 A CN 110596120A
Authority
CN
China
Prior art keywords
glass
curvature
boundary
edge
image
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
CN201910841702.5A
Other languages
Chinese (zh)
Inventor
周凯
吴小飞
庞凤江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xinshizhi Technology Co Ltd
Original Assignee
Shenzhen Xinshizhi 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 Shenzhen Xinshizhi Technology Co Ltd filed Critical Shenzhen Xinshizhi Technology Co Ltd
Priority to CN201910841702.5A priority Critical patent/CN110596120A/en
Publication of CN110596120A publication Critical patent/CN110596120A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8854Grading and classifying of flaws
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Abstract

The embodiment of the invention discloses a method, a device, a terminal and a storage medium for detecting glass boundary defects, wherein the method comprises the following steps: acquiring an image corresponding to glass to be detected; generating an edge contour map corresponding to the image through an edge detection algorithm and an edge tracking algorithm; calculating the curvature of the edge contour map by using a k-cosine curvature algorithm, comparing the curvature with a preset curvature threshold, if the curvature is smaller than the curvature threshold, judging that the edge of the glass to be detected corresponding to the edge contour map has a defect, performing characteristic screening on the defect, and judging whether the defect is the actual defect on the edge of the glass to be detected; and if the curvature is larger than or equal to the curvature threshold, judging that no defect exists in the boundary of the glass to be detected. In addition, the embodiment of the invention also discloses a device for detecting the glass boundary defect, a terminal and a computer readable storage medium. By adopting the invention, the speed and the precision of glass boundary detection can be improved.

Description

Glass boundary defect detection method, device, terminal and storage medium
Technical Field
The invention relates to the technical field of machine vision, in particular to a method, a device, a terminal and a storage medium for detecting glass boundary defects.
Background
In order to ensure the quality of glass products, generally, the quality of glass is detected after the production is finished, some defects on the appearance of the glass need to be detected when the appearance quality of the glass is detected, the size and the trend of the glass are measured, and sprayed grade marks on the surface of the glass are identified; the traditional method for detecting the quality of the glass adopts a manual detection method, namely, workers directly observe the glass to be detected under a certain light source condition and judge whether the glass has defects or not by visual perception. The method is easily influenced by artificial subjective factors to cause false detection or missing detection, has low detection efficiency and is not suitable for the requirement of modern mass production at all; for measuring the size and the trend of the glass, identifying the sprayed grade marks on the surface of the glass can not be finished by manual detection; this results in inefficient detection and failure to accurately detect quality problems with the glass.
Disclosure of Invention
In view of this, the invention provides a method, an apparatus, a terminal and a storage medium for detecting glass boundary defects, which are used to solve the problems of low detection efficiency and low detection accuracy in the prior art. The invention provides a method, a device, a terminal and a storage medium for detecting glass boundary defects, wherein the method comprises the following steps:
in a first aspect, an embodiment of the present invention provides a method for detecting a glass boundary defect, including:
acquiring a target image corresponding to glass to be detected;
generating an edge contour map corresponding to the image through an edge detection algorithm and an edge tracking algorithm;
and calculating the curvature of the edge contour graph by using a k-cosine curvature algorithm, comparing the curvature with a preset curvature threshold, and judging that the boundary of the glass to be detected has defects if the curvature is smaller than the curvature threshold.
Preferably, the acquiring a target image corresponding to the glass to be detected comprises:
and judging whether the target image is a color image, and if the target image is the color image, performing graying processing on the target image to generate a corresponding grayscale image as the target image.
Preferably, the generating an edge contour map corresponding to the image through an edge detection algorithm and an edge tracking algorithm includes:
extracting edges of the gray-scale image by an edge detection algorithm, an
And extracting the boundary of the gray image through a boundary tracking algorithm based on the extracted edge to serve as an edge contour map of the target image.
Preferably, the extracting the boundary of the grayscale image by a boundary tracking algorithm based on the edge includes:
scanning the extracted edges;
and selecting a pixel point as a starting point, and extracting a boundary corresponding to the starting point through the boundary tracking algorithm based on the extracted edge.
Preferably, the calculating the curvature of the edge profile by using a k-cosine curvature algorithm includes:
selecting a pixel point in the edge profile graph as a first pixel point; and
extracting a second pixel point and a third pixel point which have the same distance with the first pixel point;
and calculating the curvature of the edge contour graph by utilizing a k-cosine curvature algorithm based on the first pixel point, the second pixel point and the third pixel point.
Preferably, the calculating the curvature of the edge contour map based on the first pixel point, the second pixel point and the third pixel point by using a k-cosine curvature algorithm includes:
constructing a first vector between the first pixel point and the second pixel point; and
constructing a second vector between the first pixel point and the third pixel point;
and calculating the curvature of the edge contour map by using a k-cosine curvature algorithm according to the first vector and the second vector.
Preferably, after determining that the edge of the glass to be detected has a defect, the method further comprises:
and (3) performing characteristic screening on the existing defects:
calculating a defect feature value of the existing defect, wherein the defect feature value comprises at least one of concavity, compactness, roundness, circumference, area, and/or gray scale mean;
classifying and screening the existing defects according to at least one of the concavity, compactness, roundness, perimeter, area and/or gray level mean value obtained by calculation;
and if the existing defects are judged to be the defects on the boundary of the glass to be detected according to the classification screening result, outputting the existing defects.
In a second aspect, an embodiment of the present invention provides a glass boundary defect detecting apparatus, including:
the image acquisition module is used for acquiring an image corresponding to the glass to be detected;
the image processing module is used for carrying out gray processing and edge and boundary extraction on the image corresponding to the glass to be detected to obtain an edge profile corresponding to the image;
the defect judging module is used for calculating the curvature of the edge contour map and judging whether the glass to be detected has defects according to the curvature;
and the characteristic screening module is used for calculating each characteristic of the defects and classifying and screening the defects according to the calculation result of the characteristics.
In a third aspect, an embodiment of the present invention further provides a terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the glass boundary defect detection method as described above when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium, including computer instructions, which, when executed on a computer, cause the computer to perform the glass boundary defect detection method as described above.
The embodiment of the invention has the following beneficial effects:
after the glass boundary defect detection method, the device, the terminal and the computer readable medium are adopted, when the quality detection of the glass is carried out, for the quality detection parameters which can not be obtained through manual detection, the glass to be detected can be comprehensively detected after image processing, and corresponding quality detection parameters are obtained; the method comprises the steps of obtaining an edge contour map of glass to be detected through edge detection and edge tracking, calculating curvatures of all pixel points in the edge contour map through a k-cosine curvature algorithm, obtaining the curvature of the whole edge contour map, comparing the curvature with a preset curvature threshold value, judging whether the corresponding edge of the glass to be detected has a defect, and screening the defect through feature calculation and screening after the defect is determined, so as to remove the false detection condition caused by environmental pollution and fine dust, and improve the detection precision of the defect. By adopting the embodiment of the invention, the efficiency and the precision of the glass boundary defect detection are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a schematic view of a flow chart of an implementation of the glass boundary defect detection method in one embodiment;
FIG. 2 is a schematic diagram of an image of glass to be inspected obtained in one embodiment;
FIG. 3 is a schematic diagram illustrating an implementation of an algorithm for extracting a boundary by using a boundary tracking algorithm for a gray image of glass to be inspected in one embodiment;
FIG. 4 is a schematic diagram of an edge contour map corresponding to glass to be inspected obtained after image algorithm processing in one embodiment;
FIG. 5 is a schematic diagram illustrating an implementation principle of a k-cosine curvature algorithm in one embodiment;
FIG. 6 is a schematic diagram illustrating an embodiment of calculating a trend of curvature change of a pixel in an edge profile;
FIG. 7 is a schematic diagram illustrating defect detection after glass boundary defect detection is performed in one embodiment;
FIG. 8 is a schematic representation of the characteristics of a glass boundary defect detected in one embodiment;
FIG. 9 is a schematic structural diagram of the glass boundary defect detecting apparatus according to an embodiment;
FIG. 10 is a schematic diagram showing the internal structure of a computer device for executing the glass boundary defect detecting method in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problem that the glass quality cannot be efficiently and accurately checked in the glass quality detection process in the conventional technology, in the embodiment, a glass boundary defect detection method is particularly provided, which can be realized by depending on a computer program which can run on a computer system based on a von neumann system. The glass boundary defect detection method in the embodiment is completed based on digital image processing and machine learning.
Specifically, as shown in FIG. 1, the method for detecting the glass boundary defect includes the following steps S102-S108
Step S102: acquiring a target image corresponding to glass to be detected;
in a specific embodiment, in order to improve the efficiency and higher detection accuracy in the glass detection process, the glass boundary defect detection method of the embodiment first needs to obtain a target image including a glass edge, and then performs digital image processing on the obtained target image; specifically, if the obtained image corresponding to the glass to be detected is a color image, in order to increase the processing speed of the target image on the basis of maintaining the gradient information of the original image, the embodiment needs to perform graying processing on the color image to generate a corresponding grayscale image; in the RGB model, if R ═ G ═ B, the color of the image represents a gray-scale color, where the value of R ═ G ═ B is called the gray-scale value; in the graying process of the color image, a component method, a maximum value method, an average value method, a weighted average method, or the like can be used.
The component method uses the brightness of three components in the color image as the gray values of three gray images, and selects the corresponding gray image according to the actual application requirement, i.e. it is assumed that the RGB model at a certain pixel point (i, j) can be expressed as f1(i,j)=R(i,j),f2(i,j)=G(i,j),f3(i, j) ═ B (i, j), then f can be changedk(i, j) (k is 1,2,3) performing a gray-level conversion process on the image pixel as a gray-level value to obtain a corresponding gray-level value; the maximum value method performs image graying processing by taking the maximum value of the three-component brightness in the color image as a gray value to obtain a corresponding gray image, namely f (i, j) is max (R (i, j), G (i, j), B (i, j)); the average method obtains a gray value for graying an image by averaging the three component luminances in a color image, i.e., f (i, j) — (R (i, j) + G (i, j) + B (i, j))/3; the weighted average method performs weighted average on three components in the color image according to different weights according to importance and setting indexes, for example, based on the principle that human eyes have the highest sensitivity to green and the lowest sensitivity to blue, the weights corresponding to RGB can be respectively set as: for a red color of 0.30, a green color of 0.59, and a blue color of 0.11, the gray scale values for the color image graying are: f (i, j) ═ 0.30R (i, j) +0.59G (i, j) +0.11B (i, j). Specifically, which way to perform the graying processing is adopted, and the embodiment is not limited and fixed herein, and can be selected according to the actual situation.
After the target image corresponding to the glass to be detected is subjected to graying processing to obtain the corresponding grayscale image, the speed in the detection process can be increased to a certain extent, so that the detection efficiency is improved.
Step S104: generating an edge contour map corresponding to the image through an edge detection algorithm and an edge tracking algorithm;
with reference to fig. 2, it is assumed that the diagram is a gray image obtained by graying an image of glass to be detected, because the method of the present embodiment implements defect detection on a glass boundary, it is necessary to perform edge definition on the gray image before determining whether a defect exists, specifically, the method is implemented by extracting an edge of the gray image and then extracting a corresponding boundary; the edge of the gray level image can be extracted through an edge detection algorithm such as a Scharr operator, a Sobels operator, a Canny operator, a Laplacian operator and the like; after the edge corresponding to the gray image is extracted, extracting the boundary through a boundary tracking algorithm, for example, extracting the boundary corresponding to the gray image through a Square tracking algorithm, specifically, as shown in fig. 3, in the process of extracting the boundary through the Square tracking algorithm, the Square tracking algorithm finds a black boundary pixel a in the gray image, that is, a group of black pixels on a white pixel background of a grid plane as shown in fig. 3, and finishes the operation of extracting the boundary of the whole gray image after the edge is extracted by taking the black boundary pixel a as a starting point until the starting point a is searched again; specifically, in the position of the arrow at the point a in fig. 3, the direction of the arrow is upward, that is, the direction indicated by the arrow, in the process of extracting the boundary, the pixel reached by the arrow each time needs to be determined, if the pixel where the arrow is located is a black pixel, the arrow turns left to enter the adjacent pixel, and if the pixel where the arrow is located is a white pixel, the arrow turns right to enter the adjacent pixel; and returning the arrow to the initial pixel point A again until all black pixel points passed by the arrow are used as boundaries.
By means of boundary extraction, an edge profile corresponding to the gray level image of the glass to be detected can be obtained, and therefore subsequent defect detection operation can be conducted on the boundary of the glass to be detected.
Furthermore, after the edge of the gray image is extracted, when the starting point A of the boundary extraction is obtained, the gray image with the extracted edge needs to be scanned, and specifically, the gray image can be scanned from top to bottom, or a scanning operation from left to right and from right to left, thereby obtaining the starting point a required for boundary extraction, and in order to extract the complete boundary of the gray image, the present embodiment performs a boundary extraction operation on the gray image in multiple directions, for example, from four directions of up, down, left and right, or extracting from the directions of up-down, left-right, left-up, right-up, left-down, right-down and the like to obtain a more comprehensive convenient contour map corresponding to the boundary of the glass to be detected, therefore, the defect detection can be carried out on the boundary of the glass to be detected more comprehensively, and the detection quality is improved.
Step S106: calculating the curvature of the edge contour map by using a k-cosine curvature algorithm, comparing the curvature with a preset curvature threshold value, and judging whether the corresponding boundary on the glass to be detected has a defect or not according to the comparison result;
in the specific embodiment, after the edge and the boundary are extracted, the edge profile shown in fig. 4 is obtained, it can be known that the edge profile corresponding to the glass to be detected has corresponding defects, and in order to accurately determine the detailed positions and types of the defects, the curvature of the edge profile is calculated by using a k-cosine curvature algorithm. Specifically, as shown in fig. 5, any pixel point is extracted from the edge contour map as a first pixel point, which is assumed to be PiAnd respectively extracting the first pixel point PiSecond pixel point P with preset distance ki-kAnd a third pixel point Pi+kRespectively connecting the first pixel points PiAnd the second pixel point Pi-kThe third pixel point Pi+kConnecting the first and second vectors to form a corresponding first vector, wherein the first vector is expressed as (x)i-xi-k,yi-yi-k) The second vector is b ═ xi-xi+k,yi-yi+k) And an included angle theta is formed between the first vector and the second vector, and the first pixel point P can be calculated according to a k-cosine curvature algorithmiThe curvature value of (a) is equal to (a.b)/| a | | | b |, wherein the cosine value of the included angle theta is the same as the curvature value c ═ b)/| a | | | b |, and。
further, in order to implement the defect detection operation of the whole boundary of the glass to be detected, all pixel points of the whole edge profile graph need to be traversed, that is, curvature calculation is performed on the pixel points in all the edge profile graphs, wherein if the calculated curvature is smaller than a set curvature threshold, it can be determined that the boundary position of the glass to be detected corresponding to the pixel point has a defect; otherwise, if the calculated curvature is larger than or equal to the set curvature threshold, judging that no defect exists at the boundary position of the glass to be detected corresponding to the pixel point. Specifically, as shown in fig. 6, it is assumed that curvature calculation is performed on 1000 pixels in the edge contour diagram one by one, and it can be known that, when curvature calculation is performed on about 420 th pixel to about 550 th pixel, curvature values of the pixels are mutated, or curvature values are smaller than a preset curvature threshold value, the curvature threshold value is set to 1, and curvature values between about 420 th pixel and about 550 th pixel are all smaller than 1, and then it can be determined that there is a defect at a position corresponding to the edge of the glass to be inspected at this time, and conversely, if the curvature of the calculated pixels is greater than or equal to the curvature threshold value, it is determined that there is no defect.
This embodiment is through carrying out the curvature calculation to all pixel points in the edge profile to detect whole edge profile, guaranteed to correspond the integrality of waiting to examine glass edge detection in-process, can promote the quality of detection.
Step S108: and performing characteristic screening on the defects.
After the edge contour map is subjected to curvature calculation and compared with a preset curvature threshold value, if the edge of the glass to be detected corresponding to the edge contour map is judged to have defects, an image as shown in fig. 7 can be obtained, and the defects are found in a frame in the image; however, in an actual operation scenario, external environmental factors such as dirt and fiber dust may interfere with the detection effect of the k-cosine curvature algorithm, as shown in fig. 8, if a line head exists at the boundary of the glass to be detected, the k-cosine curvature algorithm is used to determine that a misjudgment situation may exist; here, in order to further improve the detection accuracy of the k-cosine curvature algorithm on the glass edge defect, in this embodiment, after the edge defect is detected by the k-cosine curvature algorithm, feature screening needs to be performed on the detected defect. Specifically, the calculation obtains each feature of the defect through a k-cosine curvature algorithm, such as: the concavity, the compactness, the roundness, the perimeter, the area and the gray average value are calculated to obtain the concavity, the compactness, the roundness, the perimeter, the area or the gray average value, and the defects are classified and screened; specifically, the feature information calculated based on each defect, noise and the like is different, for example, the notch gray level average value is close to the background gray level value, the roundness and the convexity are close to 1, the difference between the width and the height of the edge break is large, the area of the noise point is small, and the gray level average value is smaller than the panel area but larger than the background. Screening according to the conditions, so that the precision of detecting the glass boundary defects is further improved, and the effect of classifying the defects is achieved.
In addition, based on the same concept, as shown in fig. 9, the present embodiment further provides a glass boundary defect detecting apparatus.
Specifically, the glass boundary defect detecting apparatus includes:
the image acquisition module 101 is used for acquiring an image corresponding to glass to be detected;
the image processing module 102 is configured to perform graying processing and edge and boundary extraction on the image corresponding to the glass to be detected, so as to obtain an edge profile corresponding to the image;
the defect judging module 103 is used for calculating the curvature of the edge profile and judging whether the glass to be detected has defects according to the curvature;
and the feature screening module 104 is configured to calculate each feature of the defect, and perform classification screening on the defect according to a calculation result of the feature.
Corresponding to the above method for inspecting glass boundary defects, the apparatus for inspecting glass boundary defects of the present embodiment first obtains an image of a glass to be inspected through the image obtaining module 101, wherein the image can be obtained through a camera, such as a video camera; then, inputting the image into an image processing module 102, such as a designated image processing software (PS, etc.), and performing graying processing and edge and boundary extraction operations to obtain a corresponding edge contour map; then, calculating the curvature of each pixel point in the edge contour diagram by using a k-cosine curvature algorithm through a defect judging module 103, and judging whether the edge position corresponding to the glass to be detected has a defect or not according to the curvature; finally, in order to further improve the detection precision, the feature value of the defect is calculated by the feature screening module 104, so that the type of the defect is determined, and the detection precision is improved.
It should be noted that, the implementation of the glass boundary defect detecting device in this embodiment is consistent with the implementation concept of the glass boundary defect detecting device, and specific implementation principles thereof are not described herein again, and reference may be made to corresponding contents in the above method.
After the glass boundary defect detection method and the device are adopted, quality inspection parameters which can not be obtained through manual detection can be obtained during glass detection quality detection, the glass to be detected can be comprehensively detected after image processing, and corresponding quality inspection parameters can be obtained; the method comprises the steps of obtaining an edge contour map of glass to be detected through edge detection and edge tracking, calculating curvatures of all pixel points in the edge contour map through a k-cosine curvature algorithm to obtain the curvature of the whole edge contour map, comparing the curvatures with a preset curvature threshold value to judge whether the corresponding edge of the glass to be detected has a defect, and further performing feature screening on the defect after the defect is determined to improve the detection precision of the defect; the invention improves the efficiency and precision of detection.
FIG. 10 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a server or a terminal. As shown in fig. 10, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the edge detection method. The internal memory may also have a computer program stored therein, which when executed by the processor, causes the processor to perform the edge detection method. Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the method for detecting glass boundary defects provided herein can be implemented in the form of a computer program that can be run on a computer device as shown in fig. 10. The memory of the computer device may store various program modules constituting the edge detection apparatus. Such as the defect determination module 103.
In one embodiment, a computer device is proposed, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of: acquiring an image corresponding to glass to be detected; generating an edge contour map corresponding to the image through an edge detection algorithm and an edge tracking algorithm; calculating the curvature of the edge contour graph by using a k-cosine curvature algorithm, comparing the curvature with a preset curvature threshold, judging that the boundary of the glass to be detected has a defect if the curvature is not equal to the curvature threshold, and performing characteristic screening on the defect; and if the curvature is equal to the curvature threshold, judging that no defect exists in the boundary of the glass to be detected.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A glass boundary defect detection method is characterized by comprising the following steps:
acquiring a target image corresponding to glass to be detected;
generating an edge contour map corresponding to the image through an edge detection algorithm and an edge tracking algorithm;
and calculating the curvature of the edge contour graph by using a k-cosine curvature algorithm, comparing the curvature with a preset curvature threshold, and judging that the boundary of the glass to be detected has defects if the curvature is smaller than the curvature threshold.
2. The method for detecting glass boundary defects of claim 1, wherein said obtaining a target image corresponding to the glass to be inspected comprises:
and judging whether the target image is a color image, and if the target image is the color image, performing graying processing on the target image to generate a corresponding grayscale image as the target image.
3. The glass boundary defect detection method of claim 2, wherein generating an edge contour map corresponding to the image by an edge detection algorithm and an edge tracking algorithm comprises:
extracting edges of the gray-scale image by an edge detection algorithm, an
And extracting the boundary of the gray image through a boundary tracking algorithm based on the extracted edge to serve as an edge contour map of the target image.
4. The glass boundary defect detection method of claim 3, wherein said extracting the boundary of the grayscale image based on the edge by a boundary tracking algorithm comprises:
scanning the extracted edges;
and selecting a pixel point as a starting point, and extracting a boundary corresponding to the starting point through the boundary tracking algorithm based on the extracted edge.
5. The glass boundary defect detection method of claim 1 or 2, wherein said calculating the curvature of the edge profile using a k-cosine curvature algorithm comprises:
selecting a pixel point in the edge profile graph as a first pixel point; and
extracting a second pixel point and a third pixel point which have the same distance with the first pixel point;
and calculating the curvature of the edge contour graph by utilizing a k-cosine curvature algorithm based on the first pixel point, the second pixel point and the third pixel point.
6. The glass boundary defect detection method of claim 5, wherein said calculating the curvature of the edge profile based on the first, second, and third pixel points using a k-cosine curvature algorithm comprises:
constructing a first vector between the first pixel point and the second pixel point; and
constructing a second vector between the first pixel point and the third pixel point;
and calculating the curvature of the edge contour map by using a k-cosine curvature algorithm according to the first vector and the second vector.
7. The method for detecting the defect of the glass boundary as claimed in claim 1, wherein after determining that the defect exists at the boundary of the glass to be detected, the method further comprises the following steps:
and (3) performing characteristic screening on the existing defects:
calculating a defect feature value of the existing defect, wherein the defect feature value comprises at least one of concavity, compactness, roundness, circumference, area, and/or gray scale mean;
classifying and screening the existing defects according to at least one of the concavity, compactness, roundness, perimeter, area and/or gray level mean value obtained by calculation;
and if the existing defects are judged to be the defects on the boundary of the glass to be detected according to the classification screening result, outputting the existing defects.
8. A glass boundary defect detection apparatus, comprising:
the image acquisition module is used for acquiring an image corresponding to the glass to be detected;
the image processing module is used for carrying out gray processing and edge and boundary extraction on the image corresponding to the glass to be detected to obtain an edge profile corresponding to the image;
the defect judging module is used for calculating the curvature of the edge contour map and judging whether the glass to be detected has defects according to the curvature;
and the characteristic screening module is used for calculating each characteristic of the defects and classifying and screening the defects according to the calculation result of the characteristics.
9. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the method of any one of claims 1 to 7.
10. A computer readable storage medium comprising computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-7.
CN201910841702.5A 2019-09-06 2019-09-06 Glass boundary defect detection method, device, terminal and storage medium Pending CN110596120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910841702.5A CN110596120A (en) 2019-09-06 2019-09-06 Glass boundary defect detection method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910841702.5A CN110596120A (en) 2019-09-06 2019-09-06 Glass boundary defect detection method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN110596120A true CN110596120A (en) 2019-12-20

Family

ID=68857858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910841702.5A Pending CN110596120A (en) 2019-09-06 2019-09-06 Glass boundary defect detection method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110596120A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111462147A (en) * 2020-04-30 2020-07-28 柳州智视科技有限公司 Method for cutting and filling image block based on image block outer contour and angular point thereof
CN112801106A (en) * 2021-01-28 2021-05-14 安徽师范大学 Machining defect classification method of tooth restoration product based on machine vision
CN113312400A (en) * 2021-06-02 2021-08-27 蚌埠凯盛工程技术有限公司 Float glass grade determination method and device
CN113763407A (en) * 2021-09-16 2021-12-07 合肥合滨智能机器人有限公司 Ultrasonic image nodule edge analysis method
CN114354628A (en) * 2022-01-05 2022-04-15 威海若维信息科技有限公司 Root agricultural product defect detection method based on machine vision
CN114581444A (en) * 2022-05-06 2022-06-03 济宁海富光学科技有限公司 Glass cover polishing process monitoring method based on image processing
WO2022143814A1 (en) * 2020-12-31 2022-07-07 Saint-Gobain Glass France Method, device, computer readable medium, and program product for manufacturing laminated glass
CN114723755A (en) * 2022-06-08 2022-07-08 深圳新视智科技术有限公司 Fillet defect detection method, device and equipment for glass screen and storage medium
CN115953373A (en) * 2022-12-22 2023-04-11 青岛创新奇智科技集团股份有限公司 Glass defect detection method and device, electronic equipment and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6263292B1 (en) * 1997-02-28 2001-07-17 Peter J. Fiekowsky High accuracy particle dimension measurement system
US20020179708A1 (en) * 1999-06-07 2002-12-05 Metrologic Instruments, Inc. Automated method of and system for dimensioning objects over a conveyor belt structure by applying contouring tracing, vertice detection, corner point detection, and corner point reduction methods to two-dimensional range data maps of the space above the conveyor belt captured by an amplitude modulated laser scanning beam
CN101620676A (en) * 2009-07-02 2010-01-06 浙江省电力公司 Fast image recognition method of insulator contour
CN102305798A (en) * 2011-08-02 2012-01-04 上海交通大学 Method for detecting and classifying glass defects based on machine vision
CN103942777A (en) * 2014-03-13 2014-07-23 华南理工大学 Mobile phone glass cover plate defect detecting method based on principal component analysis
CN104021568A (en) * 2014-06-25 2014-09-03 山东大学 Automatic registering method of visible lights and infrared images based on polygon approximation of contour
CN105405142A (en) * 2015-11-12 2016-03-16 冯平 Edge defect detection method and system for glass panel
CN105447854A (en) * 2015-11-12 2016-03-30 程涛 Small-size glass panel surface defect detection method and small-size glass panel surface defect detection system
CN105548212A (en) * 2016-02-03 2016-05-04 杭州晶耐科光电技术有限公司 System and method for online automatically detecting defects on glass surface of touch screen
CN106504231A (en) * 2016-10-11 2017-03-15 广州视源电子科技股份有限公司 Component defects detection method and system
CN106651837A (en) * 2016-11-14 2017-05-10 中国科学院自动化研究所 White glass plate surface edge breakage defect detecting method
CN106990119A (en) * 2017-04-27 2017-07-28 中科慧远视觉技术(洛阳)有限公司 The vision detection system and detection method of a kind of white glass surface defect of automatic detection
CN109272521A (en) * 2018-10-11 2019-01-25 北京理工大学 A kind of characteristics of image fast partition method based on curvature analysis
CN109668909A (en) * 2017-10-13 2019-04-23 南京敏光视觉智能科技有限公司 A kind of glass defect detection method
CN109692820A (en) * 2018-12-19 2019-04-30 河南大学 Optical fiber metalwork surface defect on-line measuring device and method based on image procossing
CN109916910A (en) * 2019-03-27 2019-06-21 中建材凯盛机器人(上海)有限公司 Photovoltaic glass edge fault detection system and corresponding method

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6263292B1 (en) * 1997-02-28 2001-07-17 Peter J. Fiekowsky High accuracy particle dimension measurement system
US20020179708A1 (en) * 1999-06-07 2002-12-05 Metrologic Instruments, Inc. Automated method of and system for dimensioning objects over a conveyor belt structure by applying contouring tracing, vertice detection, corner point detection, and corner point reduction methods to two-dimensional range data maps of the space above the conveyor belt captured by an amplitude modulated laser scanning beam
CN101620676A (en) * 2009-07-02 2010-01-06 浙江省电力公司 Fast image recognition method of insulator contour
CN102305798A (en) * 2011-08-02 2012-01-04 上海交通大学 Method for detecting and classifying glass defects based on machine vision
CN103942777A (en) * 2014-03-13 2014-07-23 华南理工大学 Mobile phone glass cover plate defect detecting method based on principal component analysis
CN104021568A (en) * 2014-06-25 2014-09-03 山东大学 Automatic registering method of visible lights and infrared images based on polygon approximation of contour
CN105405142A (en) * 2015-11-12 2016-03-16 冯平 Edge defect detection method and system for glass panel
CN105447854A (en) * 2015-11-12 2016-03-30 程涛 Small-size glass panel surface defect detection method and small-size glass panel surface defect detection system
CN105548212A (en) * 2016-02-03 2016-05-04 杭州晶耐科光电技术有限公司 System and method for online automatically detecting defects on glass surface of touch screen
CN106504231A (en) * 2016-10-11 2017-03-15 广州视源电子科技股份有限公司 Component defects detection method and system
CN106651837A (en) * 2016-11-14 2017-05-10 中国科学院自动化研究所 White glass plate surface edge breakage defect detecting method
CN106990119A (en) * 2017-04-27 2017-07-28 中科慧远视觉技术(洛阳)有限公司 The vision detection system and detection method of a kind of white glass surface defect of automatic detection
CN109668909A (en) * 2017-10-13 2019-04-23 南京敏光视觉智能科技有限公司 A kind of glass defect detection method
CN109272521A (en) * 2018-10-11 2019-01-25 北京理工大学 A kind of characteristics of image fast partition method based on curvature analysis
CN109692820A (en) * 2018-12-19 2019-04-30 河南大学 Optical fiber metalwork surface defect on-line measuring device and method based on image procossing
CN109916910A (en) * 2019-03-27 2019-06-21 中建材凯盛机器人(上海)有限公司 Photovoltaic glass edge fault detection system and corresponding method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈晓红: "基于机器视觉的触摸屏玻璃缺陷检测方法研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111462147A (en) * 2020-04-30 2020-07-28 柳州智视科技有限公司 Method for cutting and filling image block based on image block outer contour and angular point thereof
CN111462147B (en) * 2020-04-30 2022-07-05 柳州智视科技有限公司 Method for cutting and filling image block based on image block outer contour and angular point thereof
WO2022143814A1 (en) * 2020-12-31 2022-07-07 Saint-Gobain Glass France Method, device, computer readable medium, and program product for manufacturing laminated glass
CN112801106A (en) * 2021-01-28 2021-05-14 安徽师范大学 Machining defect classification method of tooth restoration product based on machine vision
CN113312400A (en) * 2021-06-02 2021-08-27 蚌埠凯盛工程技术有限公司 Float glass grade determination method and device
CN113312400B (en) * 2021-06-02 2024-01-30 蚌埠凯盛工程技术有限公司 Float glass grade judging method and device
CN113763407A (en) * 2021-09-16 2021-12-07 合肥合滨智能机器人有限公司 Ultrasonic image nodule edge analysis method
CN113763407B (en) * 2021-09-16 2024-03-19 合肥合滨智能机器人有限公司 Nodule edge analysis method of ultrasonic image
CN114354628B (en) * 2022-01-05 2023-10-27 威海若维信息科技有限公司 Rhizome agricultural product defect detection method based on machine vision
CN114354628A (en) * 2022-01-05 2022-04-15 威海若维信息科技有限公司 Root agricultural product defect detection method based on machine vision
CN114581444B (en) * 2022-05-06 2022-08-02 济宁海富光学科技有限公司 Glass cover polishing process monitoring method based on image processing
CN114581444A (en) * 2022-05-06 2022-06-03 济宁海富光学科技有限公司 Glass cover polishing process monitoring method based on image processing
CN114723755B (en) * 2022-06-08 2023-03-21 深圳新视智科技术有限公司 Fillet defect detection method, device and equipment for glass screen and storage medium
CN114723755A (en) * 2022-06-08 2022-07-08 深圳新视智科技术有限公司 Fillet defect detection method, device and equipment for glass screen and storage medium
CN115953373A (en) * 2022-12-22 2023-04-11 青岛创新奇智科技集团股份有限公司 Glass defect detection method and device, electronic equipment and storage medium
CN115953373B (en) * 2022-12-22 2023-12-15 青岛创新奇智科技集团股份有限公司 Glass defect detection method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110596120A (en) Glass boundary defect detection method, device, terminal and storage medium
US9773302B2 (en) Three-dimensional object model tagging
JP7004145B2 (en) Defect inspection equipment, defect inspection methods, and their programs
CN107543828B (en) Workpiece surface defect detection method and system
WO2021000524A1 (en) Hole protection cap detection method and apparatus, computer device and storage medium
CN108629775B (en) Thermal state high-speed wire rod surface image processing method
CN108369650B (en) Method for identifying possible characteristic points of calibration pattern
CN111028213A (en) Image defect detection method and device, electronic equipment and storage medium
CN109580630B (en) Visual inspection method for defects of mechanical parts
CN111179243A (en) Small-size chip crack detection method and system based on computer vision
CN110033431B (en) Non-contact detection device and detection method for detecting corrosion area on surface of steel bridge
CN113109368B (en) Glass crack detection method, device, equipment and medium
CN111833306A (en) Defect detection method and model training method for defect detection
JP2018506046A (en) Method for detecting defects on the tire surface
CN115018846B (en) AI intelligent camera-based multi-target crack defect detection method and device
CN115760820A (en) Plastic part defect image identification method and application
CN112200790B (en) Cloth defect detection method, device and medium
CN115830004A (en) Surface defect detection method, device, computer equipment and storage medium
KR102242996B1 (en) Method for atypical defects detect in automobile injection products
CN116057949A (en) System and method for quantifying flare in an image
CN115861259A (en) Lead frame surface defect detection method and device based on template matching
CN112750113B (en) Glass bottle defect detection method and device based on deep learning and linear detection
KR20230116847A (en) Image Augmentation Technology for Automated Visual Inspection
CN114359414A (en) Lens smudge identification method and device, computer equipment and storage medium
CA2997335C (en) Automatically generating image datasets for use in image recognition and detection

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

Application publication date: 20191220

RJ01 Rejection of invention patent application after publication