A method and system for monitoring drawer quality based on image recognition

By using high-definition industrial cameras and image recognition models on the drawer automated production assembly line, real-time monitoring and early warning of drawer quality abnormalities is achieved, and the problem of difficulty in monitoring drawer quality abnormalities in the existing technology is solved, and detection efficiency and accuracy are improved.

CN119785273AInactive Publication Date: 2025-04-08SHENZHEN FUJIN ELECTRIC POWER EQUIP CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510276350.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN119785273A_ABST
    Figure CN119785273A_ABST
Patent Text Reader

Abstract

The present invention proposes a method and system for monitoring drawer quality based on image recognition. The method for monitoring drawer quality based on image recognition includes: taking video of the drawers on the drawer automated production line through a high-definition industrial camera arranged on the drawer automated production line to obtain a frame image corresponding to the video; dividing each frame image into multiple image blocks, and using the grayscale intensity coefficient of the image block contained in each frame image to obtain a set of multiple image blocks corresponding to each frame image; using the grayscale threshold corresponding to each frame image to adjust the grayscale of the pixel block contained in each frame image; using an image recognition model to determine whether there are quality abnormal elements in the drawer contained in each grayscale adjusted frame image, and marking the frame image and warning of drawer quality abnormality when there are quality abnormal elements. The system includes modules corresponding to the steps of the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention proposes a drawer quality monitoring method and system based on image recognition, belonging to the technical field of image recognition processing. Background Art

[0002] In modern manufacturing, drawers are key components in furniture, office equipment, and various storage systems. Their quality directly affects the user experience and overall performance of the final product. Traditional methods of monitoring drawer quality mainly rely on manual sampling, which is not only inefficient, but also limited by human subjective judgment, and it is difficult to ensure the consistency and accuracy of detection. With the rapid development of automation technology and artificial intelligence, the use of machine vision technology to monitor product quality in the production process in real time has become a research hotspot in the industry. At present, although some machine vision-based quality monitoring systems have been applied to industrial production, most of these systems are designed for workpieces of specific shapes and materials, and their applicability is limited for products such as drawers with complex structures and diverse materials. The quality problems that may exist in the production process of drawers include but are not limited to: surface scratches, uneven color, material defects, assembly misalignment, etc. These problems not only affect the appearance, but may also affect the durability and functionality of the drawers.

[0003] In order to achieve comprehensive and efficient monitoring of drawer quality, a technology that can automatically identify and locate quality problems is needed. Image recognition technology, especially image recognition models based on deep learning, has shown great potential in the field of quality inspection due to its powerful feature extraction and pattern recognition capabilities. However, there are still many challenges in directly applying existing image recognition technology to drawer quality monitoring. For example, the position, angle and lighting conditions of drawers on the production line may change continuously, which requires the monitoring system to have high flexibility and robustness; in addition, the texture, color and possible reflection of the drawer surface will also increase the difficulty of image processing. Therefore, it is important to develop a drawer quality monitoring method and system based on image recognition, which can overcome the above challenges and realize real-time monitoring and early warning of quality anomalies in the drawer production process, which is of great significance for improving production efficiency and reducing defective product rate. The method needs to be able to automatically adapt to changes in the production environment, accurately identify various quality defects on the drawer surface, and issue early warnings in time so that production personnel can quickly take measures to correct them, thereby ensuring the quality and consistency of the final product. Summary of the invention

[0004] The present invention provides a drawer quality monitoring method and system based on image recognition to solve the technical problems existing in the above-mentioned prior art. The technical solutions adopted are as follows: A method for monitoring drawer quality based on image recognition, the method comprising: The drawers on the drawer automated production line are photographed using a high-definition industrial camera to obtain frame images corresponding to the video; Divide each frame image into multiple image blocks, and use the grayscale intensity coefficients of the image blocks contained in each frame image to obtain multiple image block sets corresponding to each frame image, and use the multiple image block sets to obtain the grayscale threshold corresponding to each frame image; Using the grayscale threshold corresponding to each frame image, grayscale adjustment is performed on the pixel blocks contained in each frame image to obtain a frame image after grayscale adjustment; The trained image recognition model is used to determine whether there are any quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, and when there are quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, the frame image is marked and a drawer quality abnormality warning is issued.

[0005] Furthermore, a high-definition industrial camera arranged on the drawer automated production line is used to shoot a video of the drawers on the production line to obtain a frame image corresponding to the video, including: Start the high-definition industrial camera deployed on the drawer automation production line; Controlling a high-definition industrial camera arranged on the automated production line of the drawer to shoot a video of the drawers on the line, and obtaining video data corresponding to the drawers; Perform frame processing on the video data to obtain a frame image corresponding to the video data.

[0006] Further, each frame image is divided into a plurality of image blocks, and a plurality of image block sets corresponding to each frame image are obtained using the grayscale intensity coefficients of the image blocks contained in each frame image, and a grayscale threshold corresponding to each frame image is obtained using the plurality of image block sets, including: Segment each frame image to obtain a plurality of image blocks corresponding to each frame image; wherein the sizes corresponding to the image blocks include 3×3, 5×5 and 9×9; Obtaining a grayscale intensity coefficient corresponding to each image block using the grayscale value of the pixel points contained in each image block; Comparing the grayscale intensity coefficient with a preset first intensity coefficient threshold and a second intensity coefficient threshold; Extracting image blocks whose grayscale intensity coefficients are lower than a first intensity coefficient threshold as a first image block set; Extracting image blocks whose grayscale intensity coefficient is not lower than the first intensity coefficient threshold but lower than the second intensity coefficient threshold as a second image block set; Extracting the image blocks whose grayscale intensity coefficients are not less than the second intensity coefficient threshold as a third image block set; The grayscale threshold corresponding to each frame image is obtained using the first image block set, the second image block set and the third image block set.

[0007] Furthermore, the gray intensity coefficient is obtained by the following method, including: Retrieve the grayscale value of the pixel contained in the image block; A grayscale matrix is ​​generated using the grayscale values ​​of the pixels contained in the image block; wherein the structure of the grayscale matrix is ​​as follows:

[0008] in, A represents the grayscale matrix; a imn Represents the grayscale value corresponding to each pixel block contained in the grayscale matrix, where m Indicates the row identification number corresponding to the grayscale matrix; n Indicates the column identification number corresponding to the grayscale matrix; The grayscale matrix is ​​generated by using the grayscale values ​​of the pixels contained in the image block to generate the grayscale intensity coefficient; wherein the grayscale intensity coefficient is obtained by the following formula:

[0009] in, K represents the gray intensity coefficient; m Indicates the row identification number corresponding to the grayscale matrix; n Indicates the column identification number corresponding to the grayscale matrix; a ij Represents the first i Line j The grayscale value corresponding to the pixel block in the column; s Indicates the grayscale standard deviation corresponding to the pixel block contained in the image block; a p Indicates the grayscale average value corresponding to the pixel block contained in the image block; a zp Indicates the grayscale average value corresponding to all pixel blocks contained in the frame image; a i+1j Represents the first i +1 line j The grayscale value corresponding to the pixel block in the column; a ij+1 Represents the first i +1 line j +The grayscale value corresponding to the pixel block in column 1; r It represents the local difference influence coefficient, which is used to control the sensitivity of the influence of the local difference of the gray matrix on the overall intensity, wherein the value range of the local difference influence coefficient is 0.37-0.61.

[0010] Further, obtaining a grayscale threshold corresponding to each frame image by using the first image block set, the second image block set, and the third image block set includes: Retrieving the grayscale intensity coefficient corresponding to each image block in the first image block set and the third image block set; Obtaining a first grayscale threshold using a grayscale intensity coefficient corresponding to each image block in the first image block set and the third image block set; The first grayscale threshold is obtained by the following formula:

[0011] in, Y 01 represents the first grayscale threshold; Y c01 represents a preset initial first grayscale threshold; K 01p and K 03p represent the average values ​​of gray intensity coefficients corresponding to the first image block set and the average values ​​of gray intensity coefficients corresponding to the third image block set respectively; K 01b and K 03b represent the standard deviation of gray intensity coefficients corresponding to the first image block set and the standard deviation of gray intensity coefficients corresponding to the third image block set respectively; Retrieving the grayscale intensity coefficient corresponding to each image block in the second image block set; Obtaining a second grayscale threshold using a grayscale intensity coefficient corresponding to each image block in the second image block set; The second grayscale threshold is obtained by the following formula:

[0012] in, Y 02 represents the second grayscale threshold; Y c02 represents a preset initial second grayscale threshold; K 02p respectively represent the average values ​​of gray intensity coefficients corresponding to the second image block set; K 02b They respectively represent the standard deviation of the gray intensity coefficient corresponding to the second image block set.

[0013] Further, grayscale adjustment is performed on the pixel blocks contained in each frame image using the grayscale threshold corresponding to each frame image to obtain the frame image after grayscale adjustment, including: Compare the grayscale values ​​of the pixel blocks included in each frame image with the first grayscale value threshold and the second grayscale value threshold respectively; Retrieving pixel blocks with grayscale values ​​lower than the first grayscale value as a first pixel block set; Retrieving pixel blocks whose grayscale values ​​are not lower than the first grayscale value threshold but lower than the second grayscale value threshold as the second pixel block set; Retrieving pixel blocks whose grayscale values ​​are not less than the second grayscale value threshold as a third pixel block set; Grayscale values ​​are adjusted by using the first pixel block set, the second pixel block set and the third pixel block set in combination with grayscale intensity coefficients corresponding to the pixel blocks contained therein.

[0014] Further, grayscale value adjustment is performed by using the first pixel block set, the second pixel block set, and the third pixel block set in combination with grayscale intensity coefficients corresponding to the pixel blocks contained therein, including: Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the first pixel block set belongs, obtaining a first target grayscale value of each pixel block in the first pixel block set by using a grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the first target grayscale value; Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the second pixel block set belongs, obtaining a second target grayscale value for each pixel block in the second pixel block set by using the grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the second target grayscale value; Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the third pixel block set belongs, obtaining a third target grayscale value of each pixel block in the third pixel block set by using the grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the third target grayscale value; The structure of the grayscale adjustment model is as follows:

[0015] in, a t Indicates the adjusted grayscale value corresponding to the pixel block; a Indicates the grayscale value of the pixel block before adjustment; K x Indicates the gray intensity coefficient corresponding to the image block set to which the pixel block belongs; a cb Indicates the standard deviation of the grayscale value corresponding to the set of image blocks to which the pixel block belongs.

[0016] Furthermore, the trained image recognition model is used to determine whether there are any quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, and when there are any quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, the frame image is marked and an abnormal drawer quality warning is issued, including: Retrieve the trained image recognition model and load the trained image recognition model; After the trained image recognition model is loaded, the grayscale-adjusted frame image is input into the trained image recognition model; Performing abnormality determination on the grayscale-adjusted frame image through the trained image recognition model to determine whether the grayscale-adjusted frame image contains abnormal drawer quality elements; wherein the abnormal drawer quality elements include scratches, dents, color difference and wear marks; When the frame image contains an element of abnormal drawer quality, the frame image is marked, and the drawer corresponding to the frame image is used as an abnormal target drawer to issue an abnormal drawer quality warning.

[0017] Furthermore, the structure of the image recognition model includes: Input layer, used to input the frame image after grayscale adjustment; The first convolutional layer is used to extract local features of the image; The first pooling layer is used to reduce the size of the feature map; A second convolutional layer is used to continue extracting image features from the reduced feature map to obtain a feature map; The second pooling layer is used to further reduce the size of the feature map; Fully connected layer, used to integrate features and perform classification; The output layer is used to output the final classification results.

[0018] A drawer quality monitoring system based on image recognition, the drawer quality monitoring system based on image recognition comprising: The frame image acquisition module is used to shoot the drawers on the drawer automation production line through a high-definition industrial camera arranged on the drawer automation production line to obtain the frame image corresponding to the video; A frame image segmentation module, used to segment each frame image into multiple image blocks, and obtain multiple image block sets corresponding to each frame image using the grayscale intensity coefficients of the image blocks contained in each frame image, and obtain the grayscale threshold corresponding to each frame image using the multiple image block sets; A grayscale adjustment module, used to adjust the grayscale of the pixel blocks contained in each frame image by using the grayscale threshold corresponding to each frame image, so as to obtain the frame image after the grayscale adjustment; The abnormal warning module is used to use the trained image recognition model to determine whether there are quality abnormal elements in the drawers contained in each grayscale adjusted frame image, and to mark the frame image and issue a drawer quality abnormality warning when there are quality abnormal elements in the drawers contained in each grayscale adjusted frame image.

[0019] Beneficial effects of the present invention: The present invention proposes a drawer quality monitoring method based on image recognition and a system automation monitoring method that can continuously and quickly process drawer images on the production line, significantly improving the efficiency of quality inspection. Compared with traditional manual sampling, automated monitoring can cover more products and reduce the possibility of missed inspections. The technology based on image recognition can accurately identify various quality defects on the drawer surface, avoiding the subjectivity and inconsistency of manual inspection. The accuracy of inspection is further improved by grayscale adjustment and training of image recognition models. The automated monitoring method reduces manual participation and reduces labor costs. Timely detection and handling of quality anomalies helps to reduce the defective rate and reduce rework and scrap costs. The monitoring system can adapt to drawers at different positions and angles on the production line, and has high flexibility and robustness. It can be quickly adjusted and optimized according to production needs to meet the quality inspection requirements of different products. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of the method of the present invention; Figure 2 The system block diagram of the system of the present invention. DETAILED DESCRIPTION

[0021] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0022] The embodiment of the present invention proposes a drawer quality monitoring method based on image recognition, such as Figure 1 As shown, the drawer quality monitoring method based on image recognition includes: The drawers on the drawer automated production line are photographed using a high-definition industrial camera to obtain frame images corresponding to the video; Divide each frame image into multiple image blocks, and use the grayscale intensity coefficients of the image blocks contained in each frame image to obtain multiple image block sets corresponding to each frame image, and use the multiple image block sets to obtain the grayscale threshold corresponding to each frame image; Using the grayscale threshold corresponding to each frame image, grayscale adjustment is performed on the pixel blocks contained in each frame image to obtain a frame image after grayscale adjustment; The trained image recognition model is used to determine whether there are any quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, and when there are quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, the frame image is marked and a drawer quality abnormality warning is issued.

[0023] The working principle of the above technical solution is as follows: a high-definition industrial camera is arranged on the drawer automated production line to continuously shoot videos of the drawers on the line. Continuous frame images are extracted from the captured video, and these frame images will be used as input for subsequent image processing and quality inspection. Each frame image is divided into multiple image blocks, which helps to analyze the image more carefully in the future. The grayscale intensity coefficient of the image block in each frame image is used to obtain multiple image block sets, and the grayscale threshold corresponding to each frame image is calculated based on these sets. The grayscale threshold is used to adjust the grayscale of the pixel blocks in the future to ensure the consistency of image quality and improve the accuracy of image recognition. According to the calculated grayscale threshold, the grayscale of the pixel blocks in each frame image is adjusted. The purpose of grayscale adjustment is to optimize image quality and reduce the influence of factors such as illumination changes and reflections on image recognition. The frame image after grayscale adjustment is analyzed using the trained image recognition model. The model can identify whether there are quality abnormal elements in the drawer in the frame image, such as scratches, uneven color, material defects, etc. When quality abnormal elements are detected, the corresponding frame image is marked and an abnormal drawer quality warning is issued.

[0024] The effects of the above technical solutions are as follows: the automated monitoring method can continuously and quickly process the drawer images on the production line, significantly improving the efficiency of quality inspection. Compared with traditional manual sampling, automated monitoring can cover more products and reduce the possibility of missed inspections. The image recognition-based technology can accurately identify various quality defects on the drawer surface, avoiding the subjectivity and inconsistency of manual inspection. The accuracy of inspection is further improved by grayscale adjustment and image recognition model training. The automated monitoring method reduces manual participation and reduces labor costs. Timely detection and handling of quality anomalies helps to reduce the defective rate and reduce rework and scrap costs. The monitoring system can adapt to drawers at different positions and angles on the production line, with high flexibility and robustness. It can be quickly adjusted and optimized according to production needs to meet the quality inspection requirements of different products.

[0025] In summary, the drawer quality monitoring method based on image recognition realizes real-time monitoring and early warning of quality anomalies in the drawer production process through high-definition industrial camera shooting, image segmentation and grayscale adjustment, quality anomaly detection and early warning, etc. This method has the advantages of high efficiency, accuracy, low cost and strong flexibility, which is of great significance for improving production efficiency and ensuring product quality.

[0026] In one embodiment of the present invention, a high-definition industrial camera arranged on an automated production line of drawers is used to shoot a video of the drawers on the line to obtain a frame image corresponding to the video, including: Start the high-definition industrial camera deployed on the drawer automation production line; Controlling a high-definition industrial camera arranged on the automated production line of the drawer to shoot a video of the drawers on the line, and obtaining video data corresponding to the drawers; Perform frame processing on the video data to obtain a frame image corresponding to the video data.

[0027] The working principle of the above technical solution is as follows: On the drawer automated production line, the high-definition industrial cameras are first started. These cameras have high resolution and fast response capabilities, and can capture the fine details of the drawers on the production line. After starting, the high-definition industrial cameras continuously shoot videos of the drawers on the production line according to preset parameters (such as frame rate, exposure time, etc.). This step ensures that the dynamic changes of the drawers during the production process can be captured. The video data captured by the camera is transmitted to the image processing system or storage device in real time. These data contain complete image information of the drawers during the production process. The acquired video data is frame processed, that is, the video data is decomposed into a series of continuous static frame images. These frame images are the basis for subsequent image processing and quality analysis. The frame processing process may include pre-processing steps such as denoising, contrast enhancement, and color adjustment to improve image quality and recognition accuracy.

[0028] The effect of the above technical solution is: through continuous shooting of high-definition industrial cameras, real-time monitoring of the drawer production process can be achieved. This helps to timely discover and solve problems in the production process and ensure product quality. High-definition industrial cameras have high resolution and fast response capabilities, and can capture subtle features and dynamic changes on the drawer surface. This helps to improve the accuracy and reliability of quality inspection. The video data contains complete image information of the drawer during the production process, which can be used for subsequent quality analysis and traceability. This helps companies establish a complete quality management system and improve product quality and production efficiency. The frame processing process realizes the automatic decomposition and image preprocessing of the video, reduces manual intervention, and improves processing efficiency and accuracy. This helps to reduce production costs and improve production efficiency. The technical solution can be integrated with other automation equipment and systems, such as image processing algorithms, machine learning models, etc., to achieve more advanced functions such as defect detection, classification recognition, etc. This helps to improve the production capacity and market competitiveness of enterprises.

[0029] In summary, by using high-definition industrial cameras arranged on the drawer automated production line to shoot videos and obtain the corresponding frame images of the videos, this technical solution realizes real-time monitoring of the drawer production process and high-precision image capture. It helps to improve the accuracy, reliability and efficiency of quality inspection, reduce production costs, and enhance the production capacity and market competitiveness of enterprises.

[0030] In one embodiment of the present invention, each frame image is divided into a plurality of image blocks, and a plurality of image block sets corresponding to each frame image are obtained using grayscale intensity coefficients of image blocks included in each frame image, and a grayscale threshold corresponding to each frame image is obtained using the plurality of image block sets, including: Segment each frame image to obtain a plurality of image blocks corresponding to each frame image; wherein the sizes of the image blocks include but are not limited to 3×3, 5×5 and 9×9; Obtaining a grayscale intensity coefficient corresponding to each image block using the grayscale value of the pixel points contained in each image block; Comparing the grayscale intensity coefficient with a preset first intensity coefficient threshold and a second intensity coefficient threshold; Extracting image blocks whose grayscale intensity coefficients are lower than a first intensity coefficient threshold as a first image block set; Extracting image blocks whose grayscale intensity coefficient is not lower than the first intensity coefficient threshold but lower than the second intensity coefficient threshold as a second image block set; Extracting the image blocks whose grayscale intensity coefficients are not less than the second intensity coefficient threshold as a third image block set; The grayscale threshold corresponding to each frame image is obtained using the first image block set, the second image block set and the third image block set.

[0031] The working principle of the above technical solution is as follows: first, each frame image is segmented to obtain multiple image blocks. The sizes of these image blocks can be selected according to actual needs, including but not limited to 3×3, 5×5 and 9×9. The purpose of image segmentation is to divide the original image into smaller areas so that the grayscale intensity coefficient of each area can be calculated and compared later. For each image block, the grayscale value of the pixels contained in it is calculated, and the grayscale intensity coefficient corresponding to each image block is obtained accordingly. The grayscale intensity coefficient is an indicator to measure the grayscale intensity of the image block, which can usually be obtained by calculating the average or weighted average of the grayscale values ​​of all pixels in the image block. The calculated grayscale intensity coefficient is compared with the preset first intensity coefficient threshold and the second intensity coefficient threshold. According to the comparison results, the image blocks are divided into three categories: the image blocks with grayscale intensity coefficients lower than the first intensity coefficient threshold are the first image block set; the image blocks with grayscale intensity coefficients not lower than the first intensity coefficient threshold but lower than the second intensity coefficient threshold are the second image block set; the image blocks with grayscale intensity coefficients not lower than the second intensity coefficient threshold are the third image block set. The grayscale threshold corresponding to each frame image is obtained by using the statistical information of the first image block set, the second image block set and the third image block set (such as the distribution and average value of the grayscale intensity coefficient), combined with a preset algorithm or rule.

[0032] The effect of the above technical solution is: by dividing the frame image into multiple image blocks and classifying the image blocks based on the grayscale intensity coefficient, more refined processing of the image can be achieved. This helps to improve the flexibility and accuracy of image processing. The grayscale threshold is automatically determined by the grayscale intensity coefficient of the image block, avoiding the tediousness and subjectivity of manually selecting the threshold. This helps to achieve more objective and accurate image segmentation or binarization. Since the grayscale intensity coefficient of the image block is calculated based on the grayscale value of the pixel point, the technical solution can adapt to the image processing requirements under different lighting conditions. Under different lighting conditions, the grayscale intensity coefficient of the image block will change, but the technical solution can maintain the stability and accuracy of image processing by automatically adjusting the grayscale threshold. By dividing the frame image into multiple image blocks and processing them in parallel, the efficiency of image processing can be significantly improved. At the same time, by classifying and screening the image blocks using the grayscale intensity coefficient, the calculation amount and complexity of subsequent processing can be reduced. On the other hand, due to the changes in shooting light, each frame image has its own grayscale characteristics. The traditional fixed grayscale threshold makes it impossible to adjust the grayscale adjustment process in real time according to the shooting light of the frame image. Therefore, the above technical solution sets the corresponding grayscale threshold for each frame image, which can be set in combination with the actual situation of each frame image, so that the grayscale threshold setting can be matched with the specific situation of each frame image in real time.

[0033] In summary, this technical solution achieves fine processing of frame images and automatic determination of grayscale thresholds through steps such as image segmentation, grayscale intensity coefficient calculation and comparison, and grayscale threshold acquisition. This helps to improve the flexibility, accuracy, and efficiency of image processing and adapt to image processing requirements under different lighting conditions.

[0034] In one embodiment of the present invention, the gray intensity coefficient is obtained by the following method, including: Retrieve the grayscale value of the pixel contained in the image block; A grayscale matrix is ​​generated using the grayscale values ​​of the pixels contained in the image block; wherein the structure of the grayscale matrix is ​​as follows:

[0035] in, A represents the grayscale matrix; a imn Represents the grayscale value corresponding to each pixel block contained in the grayscale matrix, where m Indicates the row identification number corresponding to the grayscale matrix; n Indicates the column identification number corresponding to the grayscale matrix; The grayscale matrix is ​​generated by using the grayscale values ​​of the pixels contained in the image block to generate the grayscale intensity coefficient; wherein the grayscale intensity coefficient is obtained by the following formula:

[0036] in, K represents the gray intensity coefficient; m Indicates the row identification number corresponding to the grayscale matrix; n Indicates the column identification number corresponding to the grayscale matrix; a ij Represents the first i Line j The grayscale value corresponding to the pixel block in the column; s Indicates the grayscale standard deviation corresponding to the pixel block contained in the image block; a p Indicates the grayscale average value corresponding to the pixel block contained in the image block; a zp Indicates the grayscale average value corresponding to all pixel blocks contained in the frame image; a i+1j Represents the first i +1 line j The grayscale value corresponding to the pixel block in the column; a ij+1 Represents the first i +1 line j +The grayscale value corresponding to the pixel block in column 1; rIt represents the local difference influence coefficient, which is used to control the sensitivity of the influence of the local difference of the gray matrix on the overall intensity, wherein the value range of the local difference influence coefficient is 0.37-0.61.

[0037] The working principle of the above technical solution is: retrieve the gray value of each pixel from the image block. This is the basic data processing step, which provides raw data for subsequent analysis. Use the retrieved pixel gray values ​​to construct a gray matrix A. In this matrix, a mn Represents the grayscale value corresponding to the pixel block located in the mth row and the nth column. This step converts the two-dimensional image information into a matrix form, which is convenient for subsequent mathematical processing. Based on the grayscale matrix A, the grayscale intensity coefficient K is calculated by a specific formula. This formula comprehensively considers the grayscale value of the pixel block, the grayscale standard deviation s, the grayscale average ap, and the grayscale average of all pixel blocks in the frame image. In addition, the local difference influence coefficient r is introduced to adjust the influence of the local difference of the grayscale matrix on the overall intensity. a ij , a i+1j , a ij+1 They respectively represent the grayscale values ​​of pixel blocks at specific positions in the image block, and these values ​​are used to reflect local grayscale changes.

[0038] The effect of the above technical solution is that the grayscale intensity coefficient K can more accurately characterize the grayscale characteristics of the image block. This helps to improve the accuracy and robustness of the algorithm in the fields of image processing and image recognition. r , so that the calculation of the grayscale intensity coefficient not only considers the overall grayscale distribution, but also pays attention to the local grayscale changes. This helps to capture subtle features in the image and improve the sensitivity of the algorithm. Since the value range of the local difference influence coefficient r is within a certain interval (0.37-0.61), this technical solution has a certain flexibility. By adjusting the value of r, it can adapt to the needs of different images and different application scenarios. The grayscale intensity coefficient K can be used as one of the basic features in image processing, image analysis and other fields. It can provide strong support for subsequent tasks such as image segmentation, target recognition, and image enhancement.

[0039] On the other hand, by accurately calculating the grayscale intensity coefficient K, the technical solution can more accurately characterize the grayscale features of the image block. This is due to the careful construction of the grayscale matrix and the comprehensive consideration of the local and overall grayscale differences. Due to the introduction of the local difference influence coefficient r, and the coefficient is adjustable within a certain range, the technical solution can adapt to the image processing requirements under different images, different lighting conditions and different noise levels. This enhances the robustness of the algorithm and improves its applicability in different environments. The mathematical operations involved in the technical solution include the construction of the grayscale matrix, the calculation of the grayscale intensity coefficient, etc., but efficient calculation can be achieved through optimization algorithms and hardware acceleration. This ensures that the technical solution can meet the requirements of real-time or batch processing in practical applications. The local difference influence coefficient r in the technical solution is adjustable, so that users can adjust it according to specific application scenarios and needs. This flexibility enables the technical solution to be applicable to a wider range of image processing tasks, such as image segmentation, target recognition, image enhancement, etc. By accurately calculating the grayscale intensity coefficient K, the technical solution can provide more accurate basic features for subsequent image processing tasks. This helps improve the accuracy of image segmentation, the reliability of target recognition, and the effect of image enhancement, thereby improving the overall image quality. The design of the technical solution takes into account the needs of easy integration and deployment. By providing standardized interfaces and documents, the technical solution can be seamlessly connected with other image processing systems or applications, reducing the difficulty of integration and deployment.

[0040] In summary, the above technical solution has significant technical effects in terms of performance indicators, can accurately characterize the grayscale characteristics of image blocks, improve the robustness and computational efficiency of the algorithm, enhance scalability and flexibility, improve image quality, and is easy to integrate and deploy. These technical effects make the technical solution have broad application prospects in the field of image processing and analysis. At the same time, the technical solution comprehensively considers the local and overall grayscale characteristics of the image by accurately calculating the grayscale intensity coefficient K, providing a powerful tool for image processing and analysis.

[0041] In one embodiment of the present invention, obtaining a grayscale threshold corresponding to each frame image by using the first image block set, the second image block set, and the third image block set includes: Retrieving the grayscale intensity coefficient corresponding to each image block in the first image block set and the third image block set; Obtaining a first grayscale threshold using a grayscale intensity coefficient corresponding to each image block in the first image block set and the third image block set; The first grayscale threshold is obtained by the following formula:

[0042] in, Y 01represents the first grayscale threshold; Y c01 represents a preset initial first grayscale threshold; K 01p and K 03p represent the average values ​​of gray intensity coefficients corresponding to the first image block set and the average values ​​of gray intensity coefficients corresponding to the third image block set respectively; K 01b and K 03b represent the standard deviation of gray intensity coefficients corresponding to the first image block set and the standard deviation of gray intensity coefficients corresponding to the third image block set respectively; Retrieving the grayscale intensity coefficient corresponding to each image block in the second image block set; Obtaining a second grayscale threshold using a grayscale intensity coefficient corresponding to each image block in the second image block set; The second grayscale threshold is obtained by the following formula:

[0043] in, Y 02 represents the second grayscale threshold; Y c02 represents a preset initial second grayscale threshold; K 02p respectively represent the average values ​​of gray intensity coefficients corresponding to the second image block set; K 02b They respectively represent the standard deviation of the gray intensity coefficient corresponding to the second image block set.

[0044] The working principle of the above technical solution is as follows: First, the grayscale values ​​of the pixels contained in each image block are retrieved from the first image block set, the second image block set, and the third image block set. A grayscale matrix is ​​constructed for each image block using the retrieved pixel grayscale values. The elements in the grayscale matrix represent the grayscale values ​​of the corresponding pixel blocks. According to the grayscale matrix, the grayscale intensity coefficient of each image block is calculated. This usually involves complex mathematical operations, including the average and standard deviation calculation of the grayscale values, and possible weighted average.

[0045] The first grayscale threshold calculation: The grayscale intensity coefficient of each image block in the first image block set and the third image block set is retrieved.

[0046] Calculate the mean (K01p and K03p) and standard deviation (K01b and K03b) of the grayscale intensity coefficients of the two sets.

[0047] The first grayscale threshold (Y01) is calculated by a specific formula using the preset initial first grayscale threshold (Yc01) and the above statistics.

[0048] The second grayscale threshold calculation: The grayscale intensity coefficient of each image block in the second image block set is retrieved.

[0049] Calculate the mean (K02p) and standard deviation (K02b) of the grayscale intensity coefficients of the set.

[0050] The second grayscale threshold (Y02) is calculated by a specific formula using the preset initial second grayscale threshold (Yc02) and the above statistics.

[0051] The calculated grayscale thresholds (Y01 and Y02) can be used for subsequent image processing tasks, such as image segmentation, target recognition, etc. By comparing the grayscale value of the pixel in the image with the grayscale threshold, image segmentation or target recognition can be achieved. This technical solution provides an accurate basis for subsequent image processing tasks by accurately calculating the grayscale intensity coefficient and grayscale threshold. Its working principle involves complex mathematical operations and statistical methods, but through these operations and methods, it can achieve accurate description and quantification of image grayscale features.

[0052] The effect of the above technical solution is: by comprehensively considering the grayscale intensity coefficients of the first image block set, the second image block set and the third image block set, the technical solution can more accurately determine the grayscale threshold corresponding to each frame image. This accuracy helps to improve the accuracy of subsequent image processing tasks, such as image segmentation, target recognition, etc. The grayscale threshold calculation method in the technical solution takes into account the average value and standard deviation of the grayscale intensity coefficient of the image block set, which enables the algorithm to adapt to different image contents and lighting conditions. At the same time, due to the use of statistical characteristics (such as average value and standard deviation), the algorithm has strong robustness to image noise and local changes. The technical solution involves multiple image block sets and complex grayscale intensity coefficient calculations, but efficient calculations can be achieved by optimizing the algorithm and selecting appropriate calculation strategies. In addition, due to the use of indicators with strong stability such as statistical average and standard deviation, the calculation results of the algorithm are relatively stable and are not easily affected by individual outliers. The grayscale threshold calculation method in the technical solution has certain scalability. With the development of image processing technology and the emergence of new application scenarios, the performance of the algorithm can be improved by adjusting the selection of image block sets, the calculation method of grayscale intensity coefficients, or introducing new features. In addition, the formulas and parameter settings in the technical solution also have a certain degree of flexibility and can be adjusted and optimized according to specific application scenarios. Accurate grayscale threshold determination helps improve the performance of image processing tasks. For example, in image segmentation tasks, accurate grayscale thresholds can help the algorithm better distinguish between foreground and background; in target recognition tasks, grayscale thresholds can be used as one of the features to improve recognition accuracy and robustness.

[0053] In summary, the technical solution has significant technical effects in terms of performance indicators, can accurately determine the grayscale threshold, improve adaptability and robustness, achieve efficient calculation, has scalability and flexibility, and provides strong support for image processing tasks. These technical effects make the technical solution have broad application prospects in the field of image processing and analysis.

[0054] In one embodiment of the present invention, grayscale adjustment is performed on pixel blocks included in each frame image using the grayscale threshold corresponding to each frame image to obtain the frame image after grayscale adjustment, including: Compare the grayscale values ​​of the pixel blocks included in each frame image with the first grayscale value threshold and the second grayscale value threshold respectively; Retrieving pixel blocks with grayscale values ​​lower than the first grayscale value as a first pixel block set; Retrieving pixel blocks whose grayscale values ​​are not lower than the first grayscale value threshold but lower than the second grayscale value threshold as the second pixel block set; Retrieving pixel blocks whose grayscale values ​​are not less than the second grayscale value threshold as a third pixel block set; Grayscale values ​​are adjusted by using the first pixel block set, the second pixel block set and the third pixel block set in combination with grayscale intensity coefficients corresponding to the pixel blocks contained therein.

[0055] The grayscale value adjustment is performed by using the first pixel block set, the second pixel block set and the third pixel block set in combination with the grayscale intensity coefficients corresponding to the pixel blocks contained therein, including: Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the first pixel block set belongs, obtaining a first target grayscale value of each pixel block in the first pixel block set by using a grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the first target grayscale value; Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the second pixel block set belongs, obtaining a second target grayscale value for each pixel block in the second pixel block set by using the grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the second target grayscale value; Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the third pixel block set belongs, obtaining a third target grayscale value of each pixel block in the third pixel block set by using the grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the third target grayscale value; The structure of the grayscale adjustment model is as follows:

[0056] in, a t Indicates the adjusted grayscale value corresponding to the pixel block; a Indicates the grayscale value of the pixel block before adjustment; K x Indicates the gray intensity coefficient corresponding to the image block set to which the pixel block belongs; a cb Indicates the standard deviation of the grayscale value corresponding to the set of image blocks to which the pixel block belongs.

[0057] The working principle of the above technical solution is as follows: first, the grayscale value of the pixel block in each frame image is compared with the preset first grayscale threshold and the second grayscale threshold. According to the comparison result, the pixel blocks are divided into three categories: pixel blocks with grayscale values ​​lower than the first grayscale threshold (first pixel block set), pixel blocks with grayscale values ​​between the first and second grayscale thresholds (second pixel block set), and pixel blocks with grayscale values ​​not lower than the second grayscale threshold (third pixel block set). For each pixel block set, the grayscale intensity coefficient corresponding to the image block set to which each pixel block belongs is retrieved. Using the grayscale adjustment model, the target grayscale value of each pixel block is calculated by combining the original grayscale value of the pixel block, the grayscale intensity coefficient of the image block set to which it belongs, and the standard deviation of the grayscale value. According to the calculated target grayscale value, the grayscale of the corresponding pixel block is adjusted. The core of the grayscale adjustment model is to accurately calculate the target grayscale value by comprehensively considering the original grayscale value of the pixel block, the grayscale intensity coefficient of the image block set to which it belongs, and the standard deviation of the grayscale value. This model can achieve differentiated adjustment of pixel blocks in different grayscale ranges, thereby improving the overall quality and visual effect of the image.

[0058] The effect of the above technical solution is: through the application of the grayscale adjustment model, the pixel blocks in different grayscale ranges can be accurately adjusted, thereby improving the overall quality and visual effect of the image. The adjusted image has a more uniform grayscale distribution, clearer details, and enhanced contrast. The grayscale threshold comparison and grayscale adjustment model in the technical solution have certain adaptability and robustness. It can adapt to changes in different image content and lighting conditions, and has strong anti-interference ability against image noise and local changes. Although the technical solution involves complex grayscale threshold comparison and grayscale adjustment model calculations, efficient calculations can be achieved by optimizing the algorithm and selecting appropriate calculation strategies. At the same time, due to the use of statistical characteristics (such as grayscale intensity coefficient and grayscale value standard deviation) for grayscale adjustment, the calculation results of the algorithm are relatively stable and not easily affected by individual outliers. The grayscale adjustment model in the technical solution has certain scalability. With the development of image processing technology and the emergence of new application scenarios, the performance of the algorithm can be improved by adjusting model parameters or introducing new features.

[0059] At the same time, through the application of grayscale threshold comparison and grayscale adjustment model, the technical solution can make differential adjustments for pixel blocks with different grayscale ranges. This adjustment helps to enhance the details in the image, especially in the area where the grayscale value changes greatly, making the image clearer and more delicate. The technical solution can improve the contrast of the image by adjusting the grayscale value of the pixel block. After the grayscale value is adjusted, the difference between the bright and dark areas in the image is more obvious, which helps to improve the visual effect and readability of the image. After the grayscale adjustment, the grayscale distribution of the image is more uniform. This helps to reduce grayscale mutations and noise in the image, making the image look smoother and more natural. The grayscale threshold comparison and grayscale adjustment model in the technical solution are both adaptive and robust. This means that the solution can adapt to changes in different image content and lighting conditions, and has strong anti-interference ability to image noise and local changes. This is very important in practical applications because images are often affected by various factors, such as lighting changes, noise interference, etc. Although the technical solution involves grayscale threshold comparison and grayscale adjustment model calculation, efficient calculation can be achieved by optimizing the algorithm and selecting a suitable calculation strategy. At the same time, due to the use of statistical characteristics (such as grayscale intensity coefficient and grayscale value standard deviation) for grayscale adjustment, the calculation results of the algorithm are relatively stable and not easily affected by individual outliers. This ensures the reliability and stability of the technical solution in practical applications. The grayscale adjustment model in the technical solution has certain scalability. With the development of image processing technology and the emergence of new application scenarios, the performance of the algorithm can be improved by adjusting model parameters or introducing new features. In addition, the technical solution can also be combined with other image processing technologies, such as image enhancement, image segmentation, etc., to further improve the effect of image processing.

[0060] In summary, the technical effects of the above technical solution in terms of performance indicators are mainly reflected in image detail enhancement, contrast improvement, grayscale distribution uniformity, adaptability and robustness, computational efficiency and stability, as well as scalability and flexibility. These technical effects make the technical solution have broad application prospects and potential value in the field of image processing and analysis. At the same time, the technical solution realizes the precise adjustment of pixel blocks in different grayscale ranges through the application of grayscale threshold comparison and grayscale adjustment model, thereby improving the overall quality and visual effect of the image. At the same time, the technical solution also has the advantages of adaptability and robustness, computational efficiency and stability, as well as scalability and flexibility.

[0061] In one embodiment of the present invention, a trained image recognition model is used to determine whether a drawer included in each grayscale-adjusted frame image has quality abnormal elements, and when a drawer included in each grayscale-adjusted frame image has quality abnormal elements, the frame image is marked and an abnormal drawer quality warning is issued, including: Retrieve the trained image recognition model and load the trained image recognition model; After the trained image recognition model is loaded, the grayscale-adjusted frame image is input into the trained image recognition model; Performing abnormality determination on the grayscale-adjusted frame image through the trained image recognition model to determine whether the grayscale-adjusted frame image contains abnormal drawer quality elements; wherein the abnormal drawer quality elements include scratches, dents, color difference, and wear marks, etc.; When the frame image contains an element of abnormal drawer quality, the frame image is marked, and the drawer corresponding to the frame image is used as an abnormal target drawer to issue an abnormal drawer quality warning.

[0062] The structure of the image recognition model includes: Input layer, used to input the frame image after grayscale adjustment; The first convolutional layer is used to extract local features of the image; Specifically, multiple convolution kernels (filters) are used to convolve the input image to extract local features such as edges, textures, and shapes in the image. Each convolution kernel generates a feature map, and nonlinearity is introduced through activation functions (such as ReLU), so that the model can learn complex features. The first pooling layer is used to reduce the size of the feature map. Specifically, the maximum pooling is usually used to take the maximum value in each pooling window, retaining important features and discarding redundant information. By reducing the size of the feature map, the calculation of the subsequent convolutional layer is more efficient, and the translation invariance of the model is increased (that is, the model can better recognize the object regardless of the change of its position in the image); The second convolution layer is used to continue to extract image features from the reduced feature map to obtain a feature map; specifically, by increasing the number of convolution kernels (for example, from 32 to 64) and the number of layers, the model can learn more complex and advanced features. This layer is similar to the previous layer in operation, but due to the increase in the depth of the input feature map, the extracted features are richer and more expressive; The second pooling layer is used to further reduce the size of the feature map. Specifically, it repeats the function of the previous pooling layer, reduces the resolution of the feature map, reduces the number of parameters, and strengthens the model's ability to abstract features.

[0063] The fully connected layer is used to integrate features and classify them; specifically, the two-dimensional feature map of the previous layer is flattened into a one-dimensional vector for further processing. Through the fully connected method, the extracted features are converted into the probability distribution of the output category. Each node is connected to all nodes in the previous layer, so that the model can comprehensively consider all features.

[0064] The output layer is used to output the final classification results. Specifically, based on the output of the fully connected layer, the Softmax activation function is used to convert the obtained value into a probability distribution, indicating the probability of each category (such as scratches, dents, color difference, wear marks, etc.) being predicted as abnormal. The category with the highest probability is selected as the final prediction result.

[0065] The working principle of the above technical solution is as follows: first, retrieve the trained image recognition model and load it. This model has been trained with a large number of samples and can identify quality abnormal elements in the drawer image, such as scratches, dents, color difference and wear marks. Input the grayscale-adjusted frame image into the trained image recognition model. These frame images have been grayscale-adjusted, making the details in the image clearer and the contrast improved, which helps the model to more accurately identify quality abnormal elements. The input grayscale-adjusted frame image is judged abnormally by the image recognition model. The model analyzes the pixel blocks and features in the image and compares them with the features of normal and abnormal samples learned during the training process to determine whether the image contains drawer quality abnormal elements. When it is determined that the frame image contains drawer quality abnormal elements, the frame image is marked. The mark can be a label, border or color change on the image, so that the user can intuitively identify the abnormal area. At the same time, the drawer corresponding to the frame image is used as an abnormal target drawer for drawer quality abnormality warning. The warning can be made by sound, light, text prompt, etc., so as to notify relevant personnel in time for processing.

[0066] The effect of the above technical solution is: due to the use of the trained image recognition model, the solution can accurately identify the abnormal quality elements of the drawer in the frame image after grayscale adjustment. The features of a large number of samples are learned during the training process of the model, so it has high recognition accuracy and stability. The solution realizes the rapid detection of abnormal quality elements of the drawer by combining grayscale adjustment and image recognition model. Compared with the traditional manual detection method, the solution can greatly improve the detection efficiency and reduce the manpower and time cost. The solution realizes the automation and intelligence of image recognition. Once the model is loaded, the input grayscale adjusted frame image can be automatically detected and analyzed without manual intervention. This helps to improve the automation level of the production line and reduce the possibility of human error. The technical solution has certain scalability and flexibility. With the development of image processing technology and machine learning algorithms, the image recognition model can be further optimized and improved to improve the recognition accuracy and efficiency. At the same time, the solution can also be combined with other image processing technologies to achieve more complex image processing tasks.

[0067] In summary, this technical solution uses the trained image recognition model to perform abnormality judgment on the grayscale adjusted frame image, thus achieving rapid and accurate detection of abnormal elements in drawer quality. This solution has shown significant technical effects in terms of accuracy, efficiency, automation and intelligence, as well as scalability and flexibility.

[0068] The embodiment of the present invention proposes a drawer quality monitoring system based on image recognition, such as Figure 2 As shown, the drawer quality monitoring system based on image recognition includes: The frame image acquisition module is used to shoot the drawers on the drawer automation production line through a high-definition industrial camera arranged on the drawer automation production line to obtain the frame image corresponding to the video; A frame image segmentation module, used to segment each frame image into multiple image blocks, and obtain multiple image block sets corresponding to each frame image using the grayscale intensity coefficients of the image blocks contained in each frame image, and obtain the grayscale threshold corresponding to each frame image using the multiple image block sets; A grayscale adjustment module, used to adjust the grayscale of the pixel blocks contained in each frame image by using the grayscale threshold corresponding to each frame image, so as to obtain the frame image after the grayscale adjustment; The abnormal warning module is used to use the trained image recognition model to determine whether there are quality abnormal elements in the drawers contained in each grayscale adjusted frame image, and to mark the frame image and issue a drawer quality abnormality warning when there are quality abnormal elements in the drawers contained in each grayscale adjusted frame image.

[0069] The working principle of the above technical solution is as follows: a high-definition industrial camera is arranged on the drawer automated production line to continuously shoot videos of the drawers on the line. Continuous frame images are extracted from the captured video, and these frame images will be used as input for subsequent image processing and quality inspection. Each frame image is divided into multiple image blocks, which helps to analyze the image more carefully in the future. The grayscale intensity coefficient of the image block in each frame image is used to obtain multiple image block sets, and the grayscale threshold corresponding to each frame image is calculated based on these sets. The grayscale threshold is used to adjust the grayscale of the pixel blocks in the future to ensure the consistency of image quality and improve the accuracy of image recognition. According to the calculated grayscale threshold, the grayscale of the pixel blocks in each frame image is adjusted. The purpose of grayscale adjustment is to optimize image quality and reduce the influence of factors such as illumination changes and reflections on image recognition. The frame image after grayscale adjustment is analyzed using the trained image recognition model. The model can identify whether there are quality abnormal elements in the drawer in the frame image, such as scratches, uneven color, material defects, etc. When quality abnormal elements are detected, the corresponding frame image is marked and an abnormal drawer quality warning is issued.

[0070] The effects of the above technical solutions are as follows: the automated monitoring method can continuously and quickly process the drawer images on the production line, significantly improving the efficiency of quality inspection. Compared with traditional manual sampling, automated monitoring can cover more products and reduce the possibility of missed inspections. The image recognition-based technology can accurately identify various quality defects on the drawer surface, avoiding the subjectivity and inconsistency of manual inspection. The accuracy of inspection is further improved by grayscale adjustment and image recognition model training. The automated monitoring method reduces manual participation and reduces labor costs. Timely detection and handling of quality anomalies helps to reduce the defective rate and reduce rework and scrap costs. The monitoring system can adapt to drawers at different positions and angles on the production line, with high flexibility and robustness. It can be quickly adjusted and optimized according to production needs to meet the quality inspection requirements of different products.

[0071] In summary, the drawer quality monitoring method based on image recognition realizes real-time monitoring and early warning of quality anomalies in the drawer production process through high-definition industrial camera shooting, image segmentation and grayscale adjustment, quality anomaly detection and early warning, etc. This method has the advantages of high efficiency, accuracy, low cost and strong flexibility, which is of great significance for improving production efficiency and ensuring product quality.

[0072] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A drawer quality monitoring method based on image recognition, characterized in that: The drawer quality monitoring method based on image recognition includes: The drawers on the drawer automated production line are photographed using a high-definition industrial camera to obtain frame images corresponding to the video; Divide each frame image into multiple image blocks, and use the grayscale intensity coefficients of the image blocks contained in each frame image to obtain multiple image block sets corresponding to each frame image, and use the multiple image block sets to obtain the grayscale threshold corresponding to each frame image; Using the grayscale threshold corresponding to each frame image, grayscale adjustment is performed on the pixel blocks contained in each frame image to obtain a frame image after grayscale adjustment; The trained image recognition model is used to determine whether there are any quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, and when there are quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, the frame image is marked and a drawer quality abnormality warning is issued.

2. The drawer quality monitoring method based on image recognition according to claim 1 is characterized in that: The drawers on the drawer automated production line are filmed using a high-definition industrial camera to obtain the frame images corresponding to the video, including: Start the high-definition industrial camera deployed on the drawer automation production line; Controlling a high-definition industrial camera arranged on the automated production line of the drawer to shoot a video of the drawers on the line, and obtaining video data corresponding to the drawers; Perform frame processing on the video data to obtain a frame image corresponding to the video data.

3. The drawer quality monitoring method based on image recognition according to claim 1 is characterized in that: Each frame image is divided into a plurality of image blocks, and a plurality of image block sets corresponding to each frame image are obtained by using the gray intensity coefficients of the image blocks contained in each frame image, and a gray threshold corresponding to each frame image is obtained by using the plurality of image block sets, including: Segment each frame image to obtain a plurality of image blocks corresponding to each frame image; wherein the sizes corresponding to the image blocks include 3×3, 5×5 and 9×9; Obtaining a grayscale intensity coefficient corresponding to each image block using the grayscale value of the pixel points contained in each image block; Comparing the grayscale intensity coefficient with a preset first intensity coefficient threshold and a second intensity coefficient threshold; Extracting image blocks whose grayscale intensity coefficients are lower than a first intensity coefficient threshold as a first image block set; Extracting image blocks whose grayscale intensity coefficient is not lower than the first intensity coefficient threshold but lower than the second intensity coefficient threshold as a second image block set; Extracting the image blocks whose grayscale intensity coefficients are not less than the second intensity coefficient threshold as a third image block set; The grayscale threshold corresponding to each frame image is obtained using the first image block set, the second image block set and the third image block set.

4. The drawer quality monitoring method based on image recognition according to claim 3 is characterized in that: The gray intensity coefficient is obtained by the following method, including: Retrieve the grayscale value of the pixel contained in the image block; A grayscale matrix is ​​generated using the grayscale values ​​of the pixels contained in the image block; wherein the structure of the grayscale matrix is ​​as follows: in, A represents the grayscale matrix; a imn Represents the grayscale value corresponding to each pixel block contained in the grayscale matrix, where m Indicates the row identification number corresponding to the grayscale matrix; n Indicates the column identification number corresponding to the grayscale matrix; The grayscale matrix is ​​generated by using the grayscale values ​​of the pixels contained in the image block to generate the grayscale intensity coefficient; wherein the grayscale intensity coefficient is obtained by the following formula: in, K represents the gray intensity coefficient; m Indicates the row identification number corresponding to the grayscale matrix; n Indicates the column identification number corresponding to the grayscale matrix; a ij Represents the first i Line j The grayscale value corresponding to the pixel block in the column; s Indicates the grayscale standard deviation corresponding to the pixel block contained in the image block; a p Indicates the grayscale average value corresponding to the pixel block contained in the image block; a zp Indicates the grayscale average value corresponding to all pixel blocks contained in the frame image; a i+1j Represents the first i +1 line j The grayscale value corresponding to the pixel block in the column; a ij+1 Represents the first i +1 line j +The grayscale value corresponding to the pixel block in column 1; r It represents the local difference influence coefficient, which is used to control the sensitivity of the influence of the local difference of the gray matrix on the overall intensity, wherein the value range of the local difference influence coefficient is 0.37-0.

61.

5. The drawer quality monitoring method based on image recognition according to claim 3 is characterized in that: Obtaining a grayscale threshold corresponding to each frame image by using the first image block set, the second image block set, and the third image block set includes: Retrieving the grayscale intensity coefficient corresponding to each image block in the first image block set and the third image block set; Obtaining a first grayscale threshold using a grayscale intensity coefficient corresponding to each image block in the first image block set and the third image block set; The first grayscale threshold is obtained by the following formula: in, Y 01 represents the first grayscale threshold; Y c01 represents a preset initial first grayscale threshold; K 01p and K 03p represent the average values ​​of gray intensity coefficients corresponding to the first image block set and the average values ​​of gray intensity coefficients corresponding to the third image block set respectively; K 01b and K 03b represent the standard deviation of gray intensity coefficients corresponding to the first image block set and the standard deviation of gray intensity coefficients corresponding to the third image block set respectively; Retrieving the grayscale intensity coefficient corresponding to each image block in the second image block set; Obtaining a second grayscale threshold using a grayscale intensity coefficient corresponding to each image block in the second image block set; The second grayscale threshold is obtained by the following formula: in, Y 02 represents the second grayscale threshold; Y c02 represents a preset initial second grayscale threshold; K 02p respectively represent the average values ​​of gray intensity coefficients corresponding to the second image block set; K 02b They respectively represent the standard deviation of the gray intensity coefficient corresponding to the second image block set.

6. The drawer quality monitoring method based on image recognition according to claim 1 is characterized in that: Using the grayscale threshold corresponding to each frame image to adjust the grayscale of the pixel blocks contained in each frame image to obtain the frame image after the grayscale adjustment, including: Compare the grayscale values ​​of the pixel blocks included in each frame image with the first grayscale value threshold and the second grayscale value threshold respectively; Retrieving pixel blocks with grayscale values ​​lower than the first grayscale value as a first pixel block set; Retrieving pixel blocks whose grayscale values ​​are not lower than the first grayscale value threshold but lower than the second grayscale value threshold as the second pixel block set; Retrieving pixel blocks whose grayscale values ​​are not less than the second grayscale value threshold as a third pixel block set; Grayscale values ​​are adjusted by using the first pixel block set, the second pixel block set and the third pixel block set in combination with grayscale intensity coefficients corresponding to the pixel blocks contained therein.

7. The drawer quality monitoring method based on image recognition according to claim 6 is characterized in that: The grayscale value is adjusted by using the first pixel block set, the second pixel block set and the third pixel block set in combination with the grayscale intensity coefficients corresponding to the pixel blocks contained therein, including: Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the first pixel block set belongs, obtaining a first target grayscale value of each pixel block in the first pixel block set by using a grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the first target grayscale value; Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the second pixel block set belongs, obtaining a second target grayscale value for each pixel block in the second pixel block set by using the grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the second target grayscale value; Retrieving the grayscale intensity coefficient corresponding to the image block set to which each pixel block in the third pixel block set belongs, obtaining a third target grayscale value of each pixel block in the third pixel block set by using the grayscale adjustment model, and performing grayscale adjustment on the corresponding pixel block according to the third target grayscale value; The structure of the grayscale adjustment model is as follows: in, a t Indicates the adjusted grayscale value corresponding to the pixel block; a Indicates the grayscale value of the pixel block before adjustment; K x Indicates the gray intensity coefficient corresponding to the image block set to which the pixel block belongs; a cb Indicates the standard deviation of the grayscale value corresponding to the set of image blocks to which the pixel block belongs.

8. The drawer quality monitoring method based on image recognition according to claim 1 is characterized in that: Using the trained image recognition model to determine whether there are any quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, and marking the frame image and issuing a drawer quality abnormality warning when there are any quality abnormal elements in the drawers contained in each grayscale-adjusted frame image, including: Retrieve the trained image recognition model and load the trained image recognition model; After the trained image recognition model is loaded, the grayscale-adjusted frame image is input into the trained image recognition model; Performing abnormality determination on the grayscale-adjusted frame image through the trained image recognition model to determine whether the grayscale-adjusted frame image contains abnormal drawer quality elements; wherein the abnormal drawer quality elements include scratches, dents, color difference and wear marks; When the frame image contains an element of abnormal drawer quality, the frame image is marked, and the drawer corresponding to the frame image is used as an abnormal target drawer to issue an abnormal drawer quality warning.

9. The drawer quality monitoring method based on image recognition according to claim 1 or 8, characterized in that: The structure of the image recognition model includes: Input layer, used to input the frame image after grayscale adjustment; The first convolutional layer is used to extract local features of the image; The first pooling layer is used to reduce the size of the feature map; A second convolutional layer is used to continue extracting image features from the reduced feature map to obtain a feature map; The second pooling layer is used to further reduce the size of the feature map; Fully connected layer, used to integrate features and perform classification; The output layer is used to output the final classification results.

10. A drawer quality monitoring system based on image recognition, characterized in that: The drawer quality monitoring system based on image recognition includes: The frame image acquisition module is used to shoot the drawers on the drawer automation production line through a high-definition industrial camera arranged on the drawer automation production line to obtain the frame image corresponding to the video; A frame image segmentation module, used to segment each frame image into multiple image blocks, and obtain multiple image block sets corresponding to each frame image using the grayscale intensity coefficients of the image blocks contained in each frame image, and obtain the grayscale threshold corresponding to each frame image using the multiple image block sets; A grayscale adjustment module, used to adjust the grayscale of the pixel blocks contained in each frame image by using the grayscale threshold corresponding to each frame image, so as to obtain the frame image after the grayscale adjustment; The abnormal warning module is used to use the trained image recognition model to determine whether there are quality abnormal elements in the drawers contained in each grayscale adjusted frame image, and to mark the frame image and issue a drawer quality abnormality warning when there are quality abnormal elements in the drawers contained in each grayscale adjusted frame image.

Citation Information

Patent Citations

  • Improved self-adapting histogram equilibrium method

    CN101510305A

  • Image consistency enhancing device

    CN102968769A

  • Building material welding surface defect detection method based on computer vision

    CN115082467A

  • Heart ultrasound image optimization enhancement method

    CN117474775A

  • Fingerprint identification access control method and system

    CN117576819A