A multi-type defect detection system and method for glass panels
By designing a multi-type defect detection system, the problem of low reusability of the defect detection algorithm for LCD liquid crystal panels in the prior art is solved, and efficient detection of multiple types of defects of glass panels is achieved in multiple scenarios, improving detection efficiency and algorithm multiplexing rate.
Patent Information
- Application Number
- CN202210380919.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-04-12
AI Technical Summary
When detecting defects of LCD liquid crystal panels, the prior art has many types of defects and many detection scenarios, resulting in low algorithm reusability, long development cycle and high cost.
A multi-type defect detection system is designed, including image acquisition module, scene selection module, detection library module, picture inspection partition module, preprocessing module, threshold segmentation module, measurement fitting module and judgment summary module. The system can detect multiple types of defects of glass panels in a variety of scenarios, improving detection efficiency and algorithm multiplexing rate.
It realizes efficient detection of multiple types of glass panel defects in various scenarios, shortens detection time, improves detection efficiency and algorithm multiplexing rate, and reduces development costs.
Smart Images

Figure CN114937003B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine vision, and more particularly, to a system and method for detecting multiple types of defects of a glass panel. Background Art
[0002] Liquid crystal display is a flat ultra-thin display device composed of a certain number of color or black and white pixels. Placing it in front of a light source or a reflective surface and applying an electric field to the liquid crystal will change its molecular arrangement. At this time, with the polarizer, it has the effect of preventing light from passing through, that is, when no electric field is applied, the light can pass smoothly, and when the electric field is applied, the light is blocked. If it is combined with a color filter, by changing the applied voltage, the amount of light transmittance of a certain color can be changed. It can also be said that changing the voltage at both ends of the liquid crystal can change its transmittance. With the mass production of LCD panels, there is an increasing need to detect the production quality of LCD panels. LCD panel defects are mainly divided into point defects, line defects and mura defects. Among them, point defects are divided into bright spots and dark spots; line defects are divided into vertical, horizontal and oblique line defects; mura defects are subdivided into multiple types of defects. Therefore, in LCD panel detection, corresponding detection is required for these defects. The existing detection scheme generates a detection algorithm logic for each type of defect in different detection scenarios. The purpose of setting up multi-scenario detection is to set different external environments for the same workpiece to highlight a certain type of defect, so as to cover all abnormal defects generated in the production process. For example, point defects in the white screen scenario require the development of a specific algorithm, and other defects require the development of other detection operators. LCD panel defect detection has the characteristics of many defect types and many detection scenarios. Therefore, the current detection method greatly reduces the reusability of the algorithm, prolongs the development cycle, and increases development costs.
[0003] The prior art discloses a method and system for detecting surface defects of small-sized glass panels, the method comprising: first extracting the panel edge contour and the sound hole contour, and on this basis extracting the grayscale image of the internal area; further obtaining the internal area feature map, and calculating the grayscale mean of the feature map; setting a threshold based on the grayscale mean of the feature map for segmentation, and performing BLOB analysis on the segmented results to judge according to the selected area, aspect ratio and other features, excluding pseudo defects such as dust, and detecting defects. This application can only detect defects of glass panels in a single scenario, with low detection efficiency and low reuse rate of detection algorithms. Summary of the invention
[0004] In order to overcome the defect that the above-mentioned prior art can only detect a single defect of a glass panel in a single scenario, the present invention provides a multi-type defect detection system and method for glass panels, which can detect multiple types of defects on glass panels in multiple scenarios, thereby improving the detection efficiency and the reuse rate of the detection algorithm.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] The present invention provides a multi-type defect detection system for a glass panel, comprising:
[0007] An image acquisition module, used to acquire an original image of the glass panel;
[0008] A scene selection module is used to select a detection scene from an existing detection scene library;
[0009] The detection library module is used to determine whether there is an intermediate process image of the original image of the glass panel in the current detection scene in the detection library; if so, return to the scene selection module to select the next scene; otherwise, send the original image of the glass panel to the image inspection partition module;
[0010] The image inspection partition module is used to draw the region of interest on the original image of the glass panel to obtain an image of the region of interest;
[0011] A preprocessing module is used to perform preprocessing operations on the image of the region of interest to obtain a preprocessed image;
[0012] A threshold segmentation module is used to calculate the image threshold of the preprocessed image and segment the preprocessed image using the image threshold to obtain a binary image;
[0013] The measurement fitting module is used to fit the defect shape of the binary image, calculate the characteristic parameters of the fitted defect shape, and compare them with the preset parameter threshold to obtain the defect type of the glass panel in the current detection scene;
[0014] The judgment summary module determines whether all the inspection scenes have been traversed; if not, the image of the region of interest, the preprocessed image and the binarized image obtained in the current inspection scene are sent to the inspection library module for storage as intermediate process images, and then return to the scene selection module to select the next inspection scene and repeat the above process; if so, the defect types of the glass panel in each inspection scene obtained by the measurement fitting module are summarized and output.
[0015] Preferably, in the image inspection and partitioning module, the specific method for obtaining the image of the region of interest is:
[0016] On the original image of the glass panel, the detection area is obtained by automatically selecting a rectangle operation or manually selecting an arbitrary shape operation; a mask of an arbitrary shape is added to the detection area as a shielding area to form a region of interest, which is extracted as a region of interest image.
[0017] Since most glass panels are rectangular, a rectangle can be automatically selected according to the distribution of the glass panels in the entire field of view, or a detection area of any shape such as a rectangle, circle, polygon, etc. can be manually selected as needed; a mask of any shape can be added to the detection area as a shielding area to avoid unnecessary interference information, narrow the scope for subsequent detection, and improve the overall detection speed.
[0018] Preferably, the preprocessing operation includes filtering operation, morphological processing, color space conversion and image enhancement operation;
[0019] The filtering operation includes spatial filtering and frequency domain filtering;
[0020] The morphological processing includes dilation, erosion, opening operation, closing operation and top-hat transformation;
[0021] The color space conversion includes the mutual conversion between RGB space and gray space, the mutual conversion between HSV space and gray space, and the mutual conversion between RGB space and HSV space;
[0022] The image enhancement operation includes a histogram averaging operation, an image normalization operation and an image calculation operation;
[0023] The preprocessing module selects at least one of the above preprocessing operations according to the current detection scene, processes the image of the region of interest, and obtains a preprocessed image.
[0024] The purpose of filtering is to eliminate noise interference on the original image of the glass panel, such as Gaussian noise, salt and pepper noise, regular textures, etc. The purpose of morphological processing is to eliminate the influence of uneven lighting; the color space conversion is to adapt to the scene that needs to use other color spaces; the purpose of image enhancement is to stretch the contrast of the original image and highlight the defects with weak contrast. Using at least one of the above preprocessing operations to process the original image of the glass panel can greatly reduce the difficulty of subsequent detection.
[0025] Preferably, the threshold segmentation module calculates the image threshold of the preprocessed image using a global threshold method or a local threshold method, and uses the image threshold to segment the preprocessed image to obtain a binary image.
[0026] The global threshold method includes the OTSU adaptive threshold method and the fixed threshold method; the local threshold method adopts the idea of sliding window to find the mean or median of each window as the threshold; for the preprocessed image whose grayscale histogram has single peak and double peak characteristics, the OTSU adaptive threshold method is applicable, which can not only obtain the ideal binary image but also segment the preprocessed image by calculating the appropriate threshold, greatly improving the robustness of the algorithm; for the preprocessed image with uneven illumination, such as the preprocessed image is a grayscale image with poor consistency, the local threshold method is applicable; for the preprocessed image is a color image, the color scale based on the RGB or HSV three channels is used as the threshold.
[0027] Preferably, the measurement fitting module performs defect shape fitting on the binary image according to the BLOB analysis algorithm, including standard circle fitting, ellipse fitting, straight line fitting, clumping fitting, minimum circumscribed polygon fitting, maximum inscribed polygon fitting, minimum circumscribed rectangle fitting, and maximum circumscribed rectangle fitting; the characteristic parameters of the defect shape calculated by fitting include contrast, area, perimeter, and aspect ratio;
[0028] The characteristic parameter is compared with a preset parameter threshold. If the characteristic parameter is greater than the parameter threshold, the glass panel in the current detection scene has a defect type corresponding to the defect shape; otherwise, it does not have the corresponding defect type.
[0029] The present invention also provides a method for detecting multiple types of defects on a glass panel, comprising:
[0030] S1: Get the original image of the glass panel;
[0031] S2: Select the front detection scene from the existing detection scene library;
[0032] S3: Determine whether there is an intermediate process image of the original image of the glass panel in the current detection scene in the detection library; if so, return to step S2 and select the next scene; otherwise, execute step S4;
[0033] S4: Scratch a region of interest on the original image of the glass panel to obtain an image of the region of interest;
[0034] S5: performing a preprocessing operation on the image of the region of interest to obtain a preprocessed image;
[0035] S6: calculating an image threshold of the preprocessed image, and using the image threshold to segment the preprocessed image to obtain a binary image;
[0036] S7: fitting the defect shape of the binary image, calculating the characteristic parameters of the fitted defect shape, and comparing them with the preset parameter threshold to obtain the defect type of the glass panel in the current detection scene;
[0037] S8: Determine whether all inspection scenes have been traversed; if not, save the region of interest image, preprocessed image and binarized image obtained in the current inspection scene as intermediate process images to the inspection gallery, and return to step S2, select the next inspection scene, and repeat steps S3-S7; if yes, summarize the defect types of the glass panel in each inspection scene and output them.
[0038] Preferably, in step S4, the specific method of obtaining the image of the region of interest is:
[0039] On the original image of the glass panel, the detection area is obtained by automatically selecting a rectangle operation or manually selecting an arbitrary shape operation; a mask of an arbitrary shape is added to the detection area as a shielding area to form a region of interest, which is extracted as a region of interest image.
[0040] Preferably, in step S5, the preprocessing operation includes filtering operation, morphological processing, color space conversion and image enhancement operation;
[0041] The filtering operation includes spatial filtering and frequency domain filtering;
[0042] The morphological processing includes dilation, erosion, opening operation, closing operation and top-hat transformation;
[0043] The color space conversion includes the mutual conversion between RGB space and gray space, the mutual conversion between HSV space and gray space, and the mutual conversion between RGB space and HSV space;
[0044] The image enhancement operation includes a histogram averaging operation, an image normalization operation and an image calculation operation;
[0045] The preprocessing module selects at least one of the above preprocessing operations according to the current detection scene, processes the image of the region of interest, and obtains a preprocessed image.
[0046] Preferably, in step S6, the image threshold of the preprocessed image is calculated using a global threshold method or a local threshold method, and the image threshold is used to segment the preprocessed image to obtain a binary image.
[0047] Preferably, in step S7, defect shape fitting is performed on the binary image according to the BLOB analysis algorithm, including standard circle fitting, ellipse fitting, straight line fitting, clumping fitting, minimum circumscribed polygon fitting, maximum inscribed polygon fitting, minimum circumscribed rectangle fitting, and maximum circumscribed rectangle fitting; characteristic parameters of the defect shape fitted are calculated to include contrast, area, perimeter, and aspect ratio;
[0048] The characteristic parameter is compared with a preset parameter threshold. If the characteristic parameter is greater than the parameter threshold, the glass panel in the current detection scene has a defect type corresponding to the defect shape; otherwise, it does not have the corresponding defect type.
[0049] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0050] The image acquisition module of the present invention first acquires the original image of the glass panel, the scene selection module selects a detection scene, and the detection gallery module determines whether the original image has been through the detection scene, which saves the detection process; the image inspection partition module is used to determine the image of the region of interest of the glass panel, narrow the detection range for subsequent detection, and improve the overall detection speed; and the region of interest graphics can be reused in other detection scenes, which improves the detection efficiency; the preprocessing module performs preprocessing operations on the image of the region of interest, removes noise interference, enhances contrast, and reduces the difficulty of subsequent detection; the threshold segmentation module calculates the threshold of the preprocessed image, and uses the threshold to perform a binarization operation on the preprocessed image to achieve the effect of threshold segmentation; the measurement fitting module performs defect shape fitting on the binarized image, calculates the characteristic parameters of the defect shape, and determines the defect type of the original image of the glass panel in the current scene; the judgment summary module realizes the traversal of all detection scenes and summarizes the defect detection results in multiple scenes. The present invention realizes the detection of multiple types of defects on the glass panel in multiple detection scenes, with short detection time, high detection efficiency, and high reuse rate of detection algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a schematic structural diagram of a multi-type defect detection system for glass panels described in Example 1.
[0052] Figure 2 This is a schematic diagram of the detection architecture of each module described in Example 2.
[0053] Figure 3 This is a flow chart of a method for detecting multiple types of defects on a glass panel as described in Example 3. DETAILED DESCRIPTION
[0054] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0055] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;
[0056] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0057] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0058] Example 1
[0059] This embodiment provides a multi-type defect detection system for glass panels, such as Figure 1 As shown, including:
[0060] An image acquisition module, used to acquire an original image of the glass panel;
[0061] A scene selection module is used to select a detection scene from an existing detection scene library;
[0062] The detection library module is used to determine whether there is an intermediate process image of the original image of the glass panel in the current detection scene in the detection library; if so, return to the scene selection module to select the next scene; otherwise, send the original image of the glass panel to the image inspection partition module;
[0063] The image inspection partition module is used to draw the region of interest on the original image of the glass panel to obtain an image of the region of interest;
[0064] A preprocessing module is used to perform preprocessing operations on the image of the region of interest to obtain a preprocessed image;
[0065] A threshold segmentation module is used to calculate the image threshold of the preprocessed image and segment the preprocessed image using the image threshold to obtain a binary image;
[0066] The measurement fitting module is used to fit the defect shape of the binary image, calculate the characteristic parameters of the fitted defect shape, and compare them with the preset parameter threshold to obtain the defect type of the glass panel in the current detection scene;
[0067] The judgment summary module determines whether all the inspection scenes have been traversed; if not, the image of the region of interest, the preprocessed image and the binarized image obtained in the current inspection scene are sent to the inspection library module for storage as intermediate process images, and then return to the scene selection module to select the next inspection scene and repeat the above process; if so, the defect types of the glass panel in each inspection scene obtained by the measurement fitting module are summarized and output.
[0068] In the specific implementation process, the image acquisition module in this embodiment first acquires the original image of the glass panel, the scene selection module selects a detection scene, and the detection library module determines whether the original image has passed through the detection scene, thereby saving the detection process; the image inspection partition module is used to determine the image of the region of interest of the glass panel, thereby narrowing the detection range for subsequent detection and improving the overall detection speed; and the graphics of the region of interest can be reused in other detection scenarios, thereby improving the detection efficiency; the preprocessing module performs preprocessing operations on the image of the region of interest to remove noise interference, enhance contrast, and reduce the difficulty of subsequent detection; the threshold segmentation module calculates the threshold of the preprocessed image, and uses the threshold to perform a binarization operation on the preprocessed image to achieve the effect of threshold segmentation; the measurement fitting module performs defect shape fitting on the binary image, calculates the characteristic parameters of the defect shape, and determines the defect type of the original image of the glass panel in the current scene; the judgment summary module realizes the traversal of all detection scenes and summarizes the defect detection results in multiple scenes.
[0069] Example 2
[0070] Taking the LCD glass panel of a mobile phone screen as an example, this embodiment provides a multi-type defect detection system for the glass panel, including:
[0071] An image acquisition module, used to acquire an original image of the glass panel;
[0072] A scene selection module is used to select a detection scene from an existing detection scene library;
[0073] Common detection scenarios for mobile phone screen LCD glass panels include dust removal screen scenario, grayscale screen scenario, white screen scenario, and red screen scenario. These scenarios are saved in the detection scenario library.
[0074] The detection library module is used to determine whether there is an intermediate process image of the original image of the glass panel in the current detection scene in the detection library; if so, return to the scene selection module to select the next scene; otherwise, send the original image of the glass panel to the image inspection partition module;
[0075] like Figure 2 As shown, it is a schematic diagram of the detection architecture of each module;
[0076] The image inspection partition module is used to draw the region of interest on the original image of the glass panel to obtain an image of the region of interest;
[0077] On the original image of the glass panel, the detection area is obtained by automatically selecting a rectangle operation or manually selecting an arbitrary shape operation; a mask of an arbitrary shape is added to the detection area as a shielding area to form a region of interest, which is extracted as a region of interest image.
[0078] A preprocessing module is used to perform preprocessing operations on the image of the region of interest to obtain a preprocessed image;
[0079] The preprocessing operation includes filtering operation, morphological processing, color space conversion and image enhancement operation;
[0080] The filtering operation includes spatial filtering and frequency domain filtering;
[0081] The morphological processing includes dilation, erosion, opening operation, closing operation and top-hat transformation;
[0082] The color space conversion includes the mutual conversion between RGB space and gray space, the mutual conversion between HSV space and gray space, and the mutual conversion between RGB space and HSV space;
[0083] The image enhancement operation includes a histogram averaging operation, an image normalization operation and an image calculation operation;
[0084] The preprocessing module selects at least one of the above preprocessing operations according to the current detection scene, processes the image of the region of interest, and obtains a preprocessed image.
[0085] A threshold segmentation module calculates the image threshold of the preprocessed image using a global threshold method or a local threshold method, and uses the image threshold to segment the preprocessed image to obtain a binary image;
[0086] The measurement fitting module is used to fit the defect shape of the binary image according to the BLOB analysis algorithm, calculate the characteristic parameters of the fitted defect shape, and compare them with the preset parameter threshold to obtain the defect type of the glass panel in the current detection scene;
[0087] There are three common defect types for LCD glass panels of mobile phone screens, namely point defects, cluster defects and line defects. The characteristic parameters of point defects include contrast, area and perimeter; the characteristic parameters of cluster defects include perimeter, contrast and area; the characteristic parameters of line defects include aspect ratio, contrast, area and perimeter. Through fitting processing, the characteristic parameters of all point, line and cluster defects on the binary image are obtained and compared with the preset parameter threshold. If the characteristic parameter is greater than the parameter threshold, the glass panel has a defect type corresponding to the defect shape in the current detection scenario; otherwise, it does not have the corresponding defect type.
[0088] The judgment summary module determines whether all the inspection scenes have been traversed; if not, the image of the region of interest, the preprocessed image and the binarized image obtained in the current inspection scene are sent to the inspection library module for storage as intermediate process images, and then return to the scene selection module to select the next inspection scene and repeat the above process; if so, the defect types of the glass panel in each inspection scene obtained by the measurement fitting module are summarized and output.
[0089] Example 3
[0090] This embodiment provides a multi-type defect detection method for a glass panel, such as Figure 3 As shown, including:
[0091] S1: Get the original image of the glass panel;
[0092] S2: Select a detection scene from the existing detection scene library;
[0093] S3: Determine whether there is an intermediate process image of the original image of the glass panel in the current detection scene in the detection library; if so, return to step S2 and select the next scene; otherwise, execute step S4;
[0094] S4: Scratch a region of interest on the original image of the glass panel to obtain an image of the region of interest;
[0095] S5: performing a preprocessing operation on the image of the region of interest to obtain a preprocessed image;
[0096] S6: calculating an image threshold of the preprocessed image, and using the image threshold to segment the preprocessed image to obtain a binary image;
[0097] S7: fitting the defect shape of the binary image, calculating the characteristic parameters of the fitted defect shape, and comparing them with the preset parameter threshold to obtain the defect type of the glass panel in the current detection scene;
[0098] S8: Determine whether all inspection scenes have been traversed; if not, save the region of interest image, preprocessed image and binarized image obtained in the current inspection scene as intermediate process images to the inspection gallery, and return to step S2, select the next inspection scene, and repeat steps S3-S7; if yes, summarize the defect types of the glass panel in each inspection scene and output them.
[0099] In step S4, the specific method of obtaining the image of the region of interest is:
[0100] On the original image of the glass panel, the detection area is obtained by automatically selecting a rectangle operation or manually selecting an arbitrary shape operation; a mask of an arbitrary shape is added to the detection area as a shielding area to form a region of interest, which is extracted as a region of interest image.
[0101] In step S5, the preprocessing operation includes filtering operation, morphological processing, color space conversion and image enhancement operation;
[0102] The filtering operation includes spatial filtering and frequency domain filtering;
[0103] The morphological processing includes dilation, erosion, opening operation, closing operation and top-hat transformation;
[0104] The color space conversion includes the mutual conversion between RGB space and gray space, the mutual conversion between HSV space and gray space, and the mutual conversion between RGB space and HSV space;
[0105] The image enhancement operation includes a histogram averaging operation, an image normalization operation and an image calculation operation;
[0106] The preprocessing module selects at least one of the above preprocessing operations according to the current detection scene, processes the image of the region of interest, and obtains a preprocessed image.
[0107] In step S6, the image threshold of the preprocessed image is calculated using a global threshold method or a local threshold method, and the image threshold is used to segment the preprocessed image to obtain a binary image.
[0108] In the step S7, defect shape fitting is performed on the binary image according to the BLOB analysis algorithm, including standard circle fitting, ellipse fitting, straight line fitting, clumping fitting, minimum circumscribed polygon fitting, maximum inscribed polygon fitting, minimum circumscribed rectangle fitting, and maximum circumscribed rectangle fitting; characteristic parameters of the defect shape fitted are calculated, including contrast, area, perimeter, and aspect ratio;
[0109] The characteristic parameter is compared with the preset parameter threshold. If the characteristic parameter is greater than the parameter threshold, the glass panel in the current detection scene has a defect type corresponding to the defect shape; otherwise, it does not have the corresponding defect type.
[0110] The same or similar reference numerals correspond to the same or similar components;
[0111] The terms used in the drawings to describe positional relationships are only used for illustrative purposes and should not be construed as limiting this patent;
[0112] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A multi-type defect detection system for glass panels, characterized in that: include: An image acquisition module, used to acquire an original image of the glass panel; A scene selection module is used to select a detection scene from an existing detection scene library; The detection library module is used to determine whether there is an intermediate process image of the original image of the glass panel in the current detection scene in the detection library; if so, return to the scene selection module to select the next scene; otherwise, send the original image of the glass panel to the image inspection partition module; The image inspection partition module is used to draw the region of interest on the original image of the glass panel to obtain an image of the region of interest; A preprocessing module is used to perform preprocessing operations on the image of the region of interest to obtain a preprocessed image; A threshold segmentation module is used to calculate the image threshold of the preprocessed image and segment the preprocessed image using the image threshold to obtain a binary image; The measurement fitting module is used to fit the defect shape of the binary image, calculate the characteristic parameters of the fitted defect shape, and compare them with the preset parameter threshold to obtain the defect type of the glass panel in the current detection scene; The judgment summary module determines whether all the inspection scenes have been traversed; if not, the image of the region of interest, the preprocessed image and the binarized image obtained in the current inspection scene are sent to the inspection library module for storage as intermediate process images, and then return to the scene selection module to select the next inspection scene and repeat the above process; if so, the defect types of the glass panel in each inspection scene obtained by the measurement fitting module are summarized and output.
2. The multi-type defect detection system for glass panels according to claim 1, characterized in that: In the image inspection and partitioning module, the specific method for obtaining the image of the region of interest is: On the original image of the glass panel, the detection area is obtained by automatically selecting a rectangle operation or manually selecting an arbitrary shape operation; a mask of an arbitrary shape is added to the detection area as a shielding area to form a region of interest, which is extracted as a region of interest image.
3. The multi-type defect detection system for glass panels according to claim 1, characterized in that: The preprocessing operation includes filtering operation, morphological processing, color space conversion and image enhancement operation; The filtering operation includes spatial filtering and frequency domain filtering; The morphological processing includes dilation, erosion, opening operation, closing operation and top-hat transformation; The color space conversion includes the mutual conversion between RGB space and gray space, the mutual conversion between HSV space and gray space, and the mutual conversion between RGB space and HSV space; The image enhancement operation includes a histogram averaging operation, an image normalization operation and an image calculation operation; The preprocessing module selects at least one of the above preprocessing operations according to the current detection scene, processes the image of the region of interest, and obtains a preprocessed image.
4. The multi-type defect detection system for glass panels according to claim 1, characterized in that: The threshold segmentation module calculates the image threshold of the preprocessed image using a global threshold method or a local threshold method, and segments the preprocessed image using the image threshold to obtain a binary image.
5. The multi-type defect detection system for glass panels according to claim 1, characterized in that: The measurement fitting module performs defect shape fitting on the binary image according to the BLOB analysis algorithm, including standard circle fitting, ellipse fitting, straight line fitting, cluster fitting, minimum circumscribed polygon fitting, maximum inscribed polygon fitting, minimum circumscribed rectangle fitting, and maximum circumscribed rectangle fitting; the characteristic parameters of the defect shape calculated by fitting include contrast, area, perimeter, and aspect ratio; The characteristic parameter is compared with a preset parameter threshold. If the characteristic parameter is greater than the parameter threshold, the glass panel in the current detection scene has a defect type corresponding to the defect shape; otherwise, it does not have the corresponding defect type.
6. A method for detecting multiple types of defects on a glass panel, characterized in that: include: S1: Get the original image of the glass panel; S2: Select a detection scene from the existing detection scene library; S3: Determine whether there is an intermediate process image of the original image of the glass panel in the current detection scene in the detection library; if so, return to step S2 and select the next scene; otherwise, execute step S4; S4: Scratch a region of interest on the original image of the glass panel to obtain an image of the region of interest; S5: performing a preprocessing operation on the image of the region of interest to obtain a preprocessed image; S6: calculating an image threshold of the preprocessed image, and using the image threshold to segment the preprocessed image to obtain a binary image; S7: fitting the defect shape of the binary image, calculating the characteristic parameters of the fitted defect shape, and comparing them with the preset parameter threshold to obtain the defect type of the glass panel in the current detection scene; S8: Determine whether all inspection scenes have been traversed; if not, save the region of interest image, preprocessed image and binarized image obtained in the current inspection scene as intermediate process images to the inspection gallery, and return to step S2, select the next inspection scene, and repeat steps S3-S7; if yes, summarize the defect types of the glass panel in each inspection scene and output them.
7. The multi-type defect detection system for glass panels according to claim 6, characterized in that: In step S4, the specific method of obtaining the image of the region of interest is: On the original image of the glass panel, the detection area is obtained by automatically selecting a rectangle operation or manually selecting an arbitrary shape operation; a mask of an arbitrary shape is added to the detection area as a shielding area to form a region of interest, which is extracted as a region of interest image.
8. The multi-type defect detection system for glass panels according to claim 6, characterized in that: In step S5, the preprocessing operation includes filtering operation, morphological processing, color space conversion and image enhancement operation; The filtering operation includes spatial filtering and frequency domain filtering; The morphological processing includes dilation, erosion, opening operation, closing operation and top-hat transformation; The color space conversion includes the mutual conversion between RGB space and gray space, the mutual conversion between HSV space and gray space, and the mutual conversion between RGB space and HSV space; The image enhancement operation includes a histogram averaging operation, an image normalization operation and an image calculation operation; The preprocessing module selects at least one of the above preprocessing operations according to the current detection scene, processes the image of the region of interest, and obtains a preprocessed image.
9. The multi-type defect detection system for glass panels according to claim 6, characterized in that: In step S6, the image threshold of the preprocessed image is calculated using a global threshold method or a local threshold method, and the preprocessed image is segmented using the image threshold to obtain a binary image.
10. The multi-type defect detection system for glass panels according to claim 6, characterized in that: In the step S7, defect shape fitting is performed on the binary image according to the BLOB analysis algorithm, including standard circle fitting, ellipse fitting, straight line fitting, clumping fitting, minimum circumscribed polygon fitting, maximum inscribed polygon fitting, minimum circumscribed rectangle fitting, and maximum circumscribed rectangle fitting; characteristic parameters of the defect shape fitted are calculated, including contrast, area, perimeter, and aspect ratio; The characteristic parameter is compared with a preset parameter threshold. If the characteristic parameter is greater than the parameter threshold, the glass panel in the current detection scene has a defect type corresponding to the defect shape; otherwise, it does not have the corresponding defect type.
Citation Information
Patent Citations
Product defect detection method and computer storage medium
CN111640091A
Signal processing method and video sound processing device
JP2000285242A