Glass defect detection method and system based on RGB image and infrared image and medium
Through the feature fusion detection of RGB images and infrared images, the problem that traditional human eye detection cannot recognize internal defects in glass is solved, and high-precision and efficient glass defect detection are achieved.
Patent Information
- Application Number
- CN202510335356.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-04
AI Technical Summary
Traditional human eye detection glass defects cannot be detected internal problems, the detection accuracy is low, the efficiency is slow, and it is greatly affected by human factors, so it cannot meet the high-speed accurate detection needs of modern glass manufacturers.
RGB cameras and infrared cameras are used to simultaneously acquire RGB images and thermal imaging infrared images of glass, feature extraction and fusion are performed through feature fusion networks, and defect detection is performed using deep learning models.
It improves the accuracy and efficiency of glass defect detection, can accurately identify internal problems, reduce false detection and missed detection, and achieve standardized and efficient detection.
Smart Images

Figure CN120259823A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of glass defect detection in the chemical manufacturing field, and particularly relates to a glass defect detection method, system and medium based on RGB images and infrared images. Background Art
[0002] As an essential part of modern industry, glass products with various uses and properties are widely used in many fields such as architecture, daily use, art, instruments, etc. Traditional glass relies on the human eye for surface defect detection, and there are many problems in this detection process:
[0003] 1. The detection process can only be carried out on the glass surface and cannot detect internal problems of glass products;
[0004] 2. The human eye is not sensitive to subtle defects, and false detections and missed detections are likely to occur;
[0005] 3. Detection workers cannot stably carry out high-intensity repetitive work, and the detection efficiency is low and the speed is slow;
[0006] 4. The detection process is affected by factors such as the mood and thinking of the detection personnel, and the standardization degree is low.
[0007] When the human eye detection cannot meet the high-speed and accurate detection requirements of modern glass production enterprises, with the development of machine vision technology, using machine vision detection technology to replace and complete product defect detection, positioning and classification has become an inevitable trend in the industry development. Summary of the Invention
[0008] The main purpose of the present invention is to propose a glass defect detection method, system and medium based on RGB images and infrared images, aiming to improve the glass defect detection accuracy and detection efficiency.
[0009] To achieve the above object, the present invention provides a glass defect detection method based on RGB images and infrared images, and the method includes the following steps:
[0010] Step S10, collecting an RGB image of the glass under a fixed light source through an RGB camera, and collecting a thermal imaging infrared image of the glass through an infrared camera;
[0011] Step S20, after processing the RGB image and the thermal imaging infrared image, splicing them on the image channel and inputting them into a deep learning model;
[0012] Step S30: Extract the features of the RGB image in the input through the RGB image feature extractor of the feature fusion network, and extract the features of the infrared image in the input through the infrared image feature extractor. Then, fuse the features of the RGB image and the infrared image to obtain fused features. Use the multi-head detector of the feature fusion network to perform different detections on the feature maps of different dimensional sizes of the fused features to obtain the final glass defect detection features.
[0013] A further technical solution of the present invention is that the step S20 includes:
[0014] Step S201: Crop the collected RGB image and infrared image, and select the same image area as the input of the deep learning model;
[0015] Step S202: Preprocess the cropped images, and the preprocessing includes noise reduction and enhancement operations;
[0016] Step S203: Stitch the preprocessed RGB image and the thermal imaging infrared image on the image channels as the final model input.
[0017] To achieve the above object, the present invention also proposes a glass defect detection system based on RGB images and infrared images. The system includes a memory, a processor, and a glass defect detection program based on RGB images and infrared images stored on the processor. When the glass defect detection program based on RGB images and infrared images is run by the processor, the following steps are executed:
[0018] Collect the RGB image of the glass under a fixed light source through an RGB camera, and collect the thermal imaging infrared image of the glass through an infrared camera;
[0019] After processing the RGB image and the thermal imaging infrared image, stitch them on the image channels and input them into the deep learning model;
[0020] Extract the features of the RGB image in the input through the RGB image feature extractor of the feature fusion network, and extract the features of the infrared image in the input through the infrared image feature extractor. Then, fuse the features of the RGB image and the infrared image to obtain fused features. Use the multi-head detector of the feature fusion network to perform different detections on the feature maps of different dimensional sizes of the fused features to obtain the final glass defect detection features.
[0021] A further technical solution of the present invention is that when the glass defect detection program based on RGB images and infrared images is run by the processor, the following steps are also executed:
[0022] Crop the collected RGB image and infrared image, and select the same image area as the input of the deep learning model;
[0023] Preprocess the cropped image, and the preprocessing includes noise reduction and enhancement operations;
[0024] Stitch the preprocessed RGB image and the thermal infrared image on the image channels as the final model input.
[0025] To achieve the above object, the present invention also provides a computer-readable storage medium storing a glass defect detection program based on RGB images and infrared images. When the glass defect detection program based on RGB images and infrared images is called by a processor, it executes the steps of the method described above.
[0026] The beneficial effects of the glass defect detection based on RGB images and infrared images in the present invention are as follows:
[0027] 1. The present invention simultaneously collects RGB images and infrared images, which can provide richer image information and help improve the accuracy of subsequent processing;
[0028] 2. The present invention performs regional cropping on RGB images and infrared images, and performs image preprocessing operations on RGB images, which is beneficial to highlighting key features of the images and improving the detection efficiency;
[0029] 3. In the feature fusion detection network of the present invention, feature extraction is performed on RGB images and infrared images respectively and then feature fusion is carried out, which can improve the information contained in the features and improve the detection accuracy. Description of the Drawings
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0031] Figure 1 is a schematic flowchart of a preferred embodiment of the glass defect detection method based on RGB images and infrared images in the present invention;
[0032] Figure 2 is a detailed flowchart of step S20;
[0033] Figure 3 is a schematic diagram of an RGB image;
[0034] Figure 4 is a schematic diagram of an infrared image;
[0035] Figure 5It is the system architecture diagram of the glass defect detection system based on RGB images and infrared images of the present invention.
[0036] The realization, functional characteristics and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0037] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0038] The present invention provides a glass defect detection method based on RGB images and infrared images. As Figure 1 shown, the preferred embodiment of the present invention includes the following steps:
[0039] Step S10: Collect the RGB image of the glass under a fixed light source through an RGB camera, and collect the thermal imaging infrared image of the glass through an infrared camera. Among them, the RGB image is as Figure 2 shown, and the thermal imaging infrared image is as Figure 3 shown.
[0040] In this embodiment, an RGB camera is used to collect the RGB image of the glass under a certain fixed light source, and at the same time, an infrared camera is used to collect the thermal imaging infrared image of the glass, which can provide richer image information and help improve the accuracy of subsequent processing.
[0041] Step S20: After processing the RGB image and the thermal imaging infrared image, splice them on the image channel and input them into the deep learning model.
[0042] As Figure 4 shown, the step S20 specifically includes:
[0043] Step S201: Crop the collected RGB image and infrared image, and select the same image area as the input of the deep learning model.
[0044] Step S202: Preprocess the cropped images, and the preprocessing includes noise reduction and enhancement operations.
[0045] In this embodiment, by cropping the regions of the RGB image and the infrared image, and performing image preprocessing operations on the RGB image, it is beneficial to highlight the key features of the image and improve the detection efficiency.
[0046] Step S203: Stitch the preprocessed RGB image and the thermal infrared image on the image channel as the final model input.
[0047] Step S30: Extract the features of the RGB image in the input through the RGB image feature extractor of the feature fusion network, and extract the features of the infrared image in the input through the infrared image feature extractor. Fuse the features of the RGB image and the infrared image features to obtain fused features. Perform different detections on the feature maps of different dimensional sizes of the fused features through the multi-head detector of the feature fusion network to obtain the final glass defect detection features.
[0048] The feature fusion network involved in this embodiment consists of an RGB image extractor, an infrared image feature extractor, a feature fuser, and a multi-head detector. The RGB image feature extractor extracts the features of the RGB image in the input, the infrared image feature extractor extracts the infrared image in the input, the feature fuser fuses the infrared features and the RGB features to obtain fused features, and the multi-head detector performs different detections on the feature maps of different dimensional sizes of the fused features.
[0049] In the feature fusion detection network, feature extraction is performed separately on the RGB image and the infrared image and then feature fusion is carried out, which can improve the information contained in the features and thus improve the detection accuracy.
[0050] In summary, the beneficial effects of the glass defect detection based on RGB images and infrared images in the present invention are as follows:
[0051] 1. The present invention uses simultaneous acquisition of RGB images and infrared images, which can provide richer image information and help improve the accuracy of subsequent processing;
[0052] 2. The present invention performs regional cropping on the RGB image and the infrared image, and performs image preprocessing operations on the RGB image, which is conducive to highlighting key features in the image and improving the detection efficiency;
[0053] 3. In the feature fusion detection network of the present invention, feature extraction is performed separately on the RGB image and the infrared image and then feature fusion is carried out, which can improve the information contained in the features and improve the detection accuracy.
[0054] To achieve the above object, the present invention also proposes a glass defect detection system based on RGB images and infrared images, as Figure 5As shown in the figure, the system includes a processor 1001, a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002, and a glass defect detection program based on RGB images and infrared images stored on the processor. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0055] Those skilled in the art can understand that Figure 5 the system structure shown in the figure does not constitute a limitation on the system, and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.
[0056] As Figure 5 shown, the memory 1005, as a computer storage medium, may include an operating device, a network communication module, a user interface module, and a glass defect detection program based on RGB images and infrared images.
[0057] In Figure 5 the system shown in the figure, the network interface 1004 is mainly used to connect to a network server and communicate with the network server for data; the user interface 1003 is mainly used to interact with a user terminal and receive instructions input by the user; and the processor 1001 can be used to call the glass defect detection program stored in the memory 1005.
[0058] When the glass defect detection program based on RGB images and infrared images is called by the processor, the following steps are executed:
[0059] Collect RGB images of the glass under a fixed light source through an RGB camera, and collect thermal imaging infrared images of the glass through an infrared camera;
[0060] After processing the RGB images and thermal imaging infrared images, splice them on the image channel and input them into a deep learning model;
[0061] Extract the features of the RGB image in the input through the RGB image feature extractor of the feature fusion network, extract the features of the infrared image in the input through the infrared image feature extractor, fuse the features of the RGB image and the infrared image features to obtain fused features, and perform different detections on the feature maps of different dimensional sizes of the fused features through the multi-head detector of the feature fusion network to obtain the final glass defect detection features.
[0062] When the glass defect detection program based on RGB images and infrared images is called by the processor, the following steps are also executed:
[0063] Crop the collected RGB images and infrared images, and select the same image area as the input of the deep learning model;
[0064] Preprocess the cropped images, and the preprocessing includes noise reduction and enhancement operations;
[0065] Stitch the preprocessed RGB images and thermal imaging infrared images on the image channels as the final model input.
[0066] To achieve the above object, the present invention also proposes a computer-readable storage medium, which stores a glass defect detection program based on RGB images and infrared images. When the glass defect detection program based on RGB images and infrared images is run by a processor, it executes the steps of the method described above, which will not be elaborated here.
[0067] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structural transformation made under the concept of the present invention by using the content of the specification and drawings of the present invention, or directly / indirectly applied in other related technical fields, is included in the patent protection scope of the present invention.
Claims
1. A glass defect detection method based on RGB images and infrared images, characterized in that, The method includes the following steps: Step S10: Collect the RGB image of the glass under a fixed light source through an RGB camera, and collect the thermal infrared image of the glass through an infrared camera; Step S20: After processing the RGB image and the thermal infrared image, splice them on the image channel and input them into a deep learning model; Step S30: Extract the features of the RGB image in the input through the RGB image feature extractor of the feature fusion network, extract the features of the infrared image in the input through the infrared image feature extractor, fuse the features of the RGB image and the features of the infrared image to obtain fused features, and perform different detections on the feature maps of different dimensional sizes of the fused features through the multi-head detector of the feature fusion network to obtain the final glass defect detection features.
2. The glass defect detection method based on RGB images and infrared images according to claim 1, wherein Step S20 includes: Step S201: Crop the collected RGB image and infrared image, and select the same image area as the input of the deep learning model; Step S202: Preprocess the cropped images, and the preprocessing includes noise reduction and enhancement operations; Step S203: Splice the preprocessed RGB image and the thermal infrared image on the image channel as the final model input.
3. A glass defect detection system based on RGB images and infrared images, characterized in that, The system includes a memory, a processor, and a glass defect detection program based on RGB images and infrared images stored on the processor. When the glass defect detection program based on RGB images and infrared images is run by the processor, it performs the following steps: Collect the RGB image of the glass under a fixed light source through an RGB camera, and collect the thermal infrared image of the glass through an infrared camera; After processing the RGB image and the thermal infrared image, splice them on the image channel and input them into a deep learning model; Extract the features of the RGB image in the input through the RGB image feature extractor of the feature fusion network, extract the features of the infrared image in the input through the infrared image feature extractor, fuse the features of the RGB image and the features of the infrared image to obtain fused features, and perform different detections on the feature maps of different dimensional sizes of the fused features through the multi-head detector of the feature fusion network to obtain the final glass defect detection features.
4. The glass defect detection system based on RGB images and infrared images according to claim 3, characterized in that, When the glass defect detection program based on RGB images and infrared images is run by the processor, it also performs the following steps: Crop the collected RGB image and infrared image, and select the same image area as the input of the deep learning model; Preprocess the cropped images, and the preprocessing includes noise reduction and enhancement operations; Splice the preprocessed RGB image and the thermal infrared image on the image channel as the final model input.
5. A computer-readable storage medium, characterized in that, The medium stores a glass defect detection program based on RGB images and infrared images. When the glass defect detection program based on RGB images and infrared images is called by a processor, it performs the steps of the method according to any one of claims 1 or 2.