Polishing regulation and control method for box body quality detection and box body quality detection system

By integrating electrochromic glass and a light source into the cabinet quality inspection system, and combining various feature analysis technologies, the transmittance and brightness are dynamically adjusted, solving the problem of low visual inspection accuracy of electrochromic glass. This achieves precise illumination control for complex printing features, improving the accuracy and efficiency of inspection.

CN121253533APending Publication Date: 2026-01-02GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511516007.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing visual inspection methods based on electrochromic glass suffer from low accuracy, especially in semi-indoor/semi-outdoor scenarios where lighting conditions significantly affect detection accuracy.

Method used

By integrating electrochromic glass and a light source into the cabinet quality inspection system, and combining image processing technology, various features of the printed pattern image on the surface of the cabinet to be inspected are analyzed, including the feature recognition of color, concavity and convexity, printing process, material and shape. The light transmittance of the corresponding feature area of ​​the electrochromic glass and the brightness of the light source are dynamically adjusted to achieve precise lighting control.

Benefits of technology

It improves the accuracy of visual inspection, solves the shortcomings of traditional lighting control in detecting complex and variable printing features, and improves the accuracy and efficiency of inspection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121253533A_ABST
    Figure CN121253533A_ABST
Patent Text Reader

Abstract

The invention provides a lighting regulation and control method for box body quality detection and a box body quality detection system. The method is applied to a box body quality detection system comprising electrochromic glass, a camera and a light source, and the light source does not have orthographic projection on a to-be-detected surface of a box body. Acquiring a printing pattern image of a to-be-detected surface of the box body; the printing pattern image is subjected to multiple feature analysis, multiple feature region recognition results of the printing pattern image are obtained, the feature analysis and the feature region recognition results are in one-to-one correspondence, each feature region recognition result comprises at least one feature region, and the multiple feature analysis comprises color analysis, concavity and convexity analysis and the like; and fusing the identification results of the multiple feature regions to obtain a fused feature region identification result, and adjusting the light transmittance of the subareas, corresponding to the feature regions, of the electrochromic glass based on the fused feature region identification result, and adjusting the brightness of the light source. The problem that the detection result accuracy of visual detection based on the electrochromic glass is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image detection technology, and more specifically, to a lighting control method and a box quality detection system for box quality detection. Background Technology

[0002] In the packaging box production line of the factory, most of the inspection environment is a semi-indoor and semi-outdoor scene with a large impact of light. When visual inspection is carried out to check the product's conformity, it will be affected by the ambient light. Therefore, it is crucial to ensure that the product being inspected is properly lit.

[0003] In existing technologies, electrochromic glass is used to control the light transmittance and achieve overall light regulation of the product being tested. However, this can lead to unreasonable illumination of the target pattern being tested, resulting in inaccurate detection. Summary of the Invention

[0004] The main objective of this application is to provide a lighting control method and a cabinet quality inspection system for cabinet quality inspection, so as to at least solve the problem of low accuracy of visual inspection results based on electrochromic glass in the prior art.

[0005] To achieve the above objectives, according to one aspect of this application, a lighting control method for cabinet quality inspection is provided. The method is applied to a cabinet quality inspection system, which includes an electrochromic glass disposed above the surface of the cabinet to be inspected, a camera disposed above the electrochromic glass, and light sources located on both sides of the electrochromic glass. The light sources do not have orthographic projection onto the surface of the cabinet to be inspected. The method includes: acquiring a printed pattern image of the surface of the cabinet to be inspected; performing multiple feature analyses on the printed pattern image to obtain multiple feature region recognition results, wherein each feature analysis corresponds one-to-one with the feature region recognition results, each feature region recognition result includes at least one feature region, and the multiple feature analyses include at least two of color analysis, concavity / convexity analysis, printing process and material analysis, and shape analysis; fusing the multiple feature region recognition results to obtain a fused feature region recognition result; and adjusting the light transmittance of the electrochromic glass corresponding to the feature region based on the fused feature region recognition result, and adjusting the brightness of the light source.

[0006] Optionally, multiple feature analyses are performed on the printed pattern image to obtain multiple feature region recognition results of the printed pattern image, including: performing multiple feature analyses on the printed pattern image to obtain different feature regions of the printed pattern image, where one feature analysis corresponds to at least one feature region; using an external contour algorithm to determine the external contour region of the feature region corresponding to each feature analysis, and obtaining the coordinate information of the external contour region; and determining the coordinate information of the feature region corresponding to each feature analysis and the external contour region as the feature region recognition result.

[0007] Optionally, multiple feature region identification results are fused to obtain a fused feature region identification result, including: mapping the coordinate information of the circumscribed contour region to the electrochromic glass based on a preset transformation matrix to obtain the electrochromic glass partition corresponding to each feature region of each feature analysis; for each feature region corresponding to each feature analysis, determining the preset transmittance of each electrochromic glass partition and the preset brightness of the light source according to a preset feature lookup table; fusing the preset transmittance of each electrochromic glass partition corresponding to all feature regions to obtain a first fused feature region identification result, and fusing the preset brightness of the light source of all feature regions to obtain a second fused feature region identification result, wherein the fused feature region identification result includes the first fused feature region identification result and the second fused feature region identification result.

[0008] Optionally, the printed pattern image is subjected to various feature analyses to obtain different feature regions of the printed pattern image. Each feature analysis corresponds to at least one feature region, including: performing color analysis on the printed pattern image using a region recognition algorithm to obtain at least one color feature region; performing concavity / convexity analysis on the printed pattern image using photometric stereo method to obtain at least one concavity / convexity feature region; performing printing process and material analysis on the printed pattern image using multispectral imaging and color space analysis to obtain at least one printing process and material feature region; and performing shape analysis on the printed pattern image using Fourier transform to obtain at least one shape feature region. The different feature regions include the color feature region, the concavity / convexity feature region, the printing process and material feature region, and the shape feature region.

[0009] Optionally, the preset transmittance of each electrochromic glass partition corresponding to all the feature regions is fused to obtain a first fused feature region identification result, and the preset brightness of the light source in all the feature regions is fused to obtain a second fused feature region identification result. The fused feature region identification result includes the first fused feature region identification result and the second fused feature region identification result, including: calculating the weighted average of the preset transmittance of each electrochromic glass partition corresponding to all the feature regions to obtain the first fused feature region identification result, which is the target transmittance of each electrochromic glass partition; calculating the weighted average of the preset brightness of the light source in all the feature regions to obtain the second fused feature region identification result, which is the target brightness of the light source; adjusting the transmittance of the electrochromic glass partition corresponding to the feature region based on the fused feature region identification result, and adjusting the brightness of the light source, including: adjusting the transmittance of each electrochromic glass partition to the corresponding target transmittance, and simultaneously adjusting the brightness of the light source to the target brightness.

[0010] Optionally, acquiring the printed pattern image of the surface to be inspected of the housing includes: setting the initial transmittance of all zones of the electrochromic glass within a preset transmittance range; and setting the initial brightness of the light source within a preset brightness range.

[0011] Optionally, before acquiring the printed pattern image of the surface to be inspected of the box, the method further includes: acquiring multiple template images of the printed pattern image, wherein the template images are pre-selected images with typical features, including color features, concavity / convexity features, printing process and material features, and shape features; performing feature analysis on the multiple template images to obtain feature parameters of different feature regions in the template images, wherein the feature parameters include the color value, concavity / convexity degree, printing process attributes, material type, and shape attributes of each feature region; establishing a template library based on the feature parameters, wherein the template library is used to store the feature parameters of the different feature regions and the corresponding light transmittance and light source brightness, and the template library is also used to locate the feature regions of the printed pattern image by using the feature parameters in the template library as an initial reference before each of the multiple feature analyses of the printed pattern image.

[0012] Optionally, the printed pattern image is subjected to shape analysis using Fourier transform to obtain multiple shape feature regions, wherein the shape feature regions include dense stripe regions and non-dense stripe regions. This includes: converting the printed pattern image to the frequency domain using the Fourier transform to obtain the frequency domain features of the printed pattern image; analyzing the spectral characteristics of the stripes based on the frequency domain features, wherein the spectral characteristics include the frequency domain distribution of stripe direction consistency and grayscale values; and identifying the dense stripe regions and non-dense stripe regions of the printed pattern image based on the spectral characteristics.

[0013] Optionally, before mapping the coordinate information of the circumscribed contour region to the electrochromic glass based on a preset transformation matrix to obtain the electrochromic glass partition corresponding to each feature region for each feature analysis, the method further includes: acquiring an image of a calibration reference to generate a basic parameter set, the calibration reference covering and fitting the electrochromic glass; acquiring the physical coordinates of feature reference points on the electrochromic glass in the physical coordinate system of the electrochromic glass, and performing image feature recognition on the electrochromic glass to determine the pixel coordinates of the feature reference points in the image coordinate system, the feature reference points being the intersection points of the electrochromic glass partition grids; determining a set of coordinate correspondences between the physical coordinates and the pixel coordinates based on the physical coordinates and the pixel coordinates; and calculating the preset transformation matrix using planar projection transformation according to the basic parameter set and the set of coordinate correspondences, the preset transformation matrix being used to store the mapping relationship between the image coordinate system and the physical coordinate system.

[0014] According to another aspect of this application, a cabinet quality inspection system is provided, comprising: electrochromic glass disposed above the surface of the cabinet to be inspected; a camera disposed above the electrochromic glass for acquiring a printed pattern image of the surface of the cabinet to be inspected through the electrochromic glass; a light source disposed on both sides of the electrochromic glass, and the light source does not have a positive projection on the surface of the cabinet to be inspected; and a controller electrically connected to the electrochromic glass and the light source for executing any of the lighting control methods for cabinet quality inspection described above.

[0015] The technical solution of this application acquires an image of the printed pattern on the surface of a cabinet to be inspected; performs various feature analyses on the printed pattern image to obtain multiple feature region recognition results, with a one-to-one correspondence between the feature analysis and the feature region recognition results. Each feature region recognition result includes at least one feature region. The multiple feature analyses include at least two of the following: color analysis, concavity / convexity analysis, printing process and material analysis, and shape analysis; the multiple feature region recognition results are fused to obtain a fused feature region recognition result, and the transmittance of the electrochromic glass corresponding to the feature region and the brightness of the light source are adjusted based on the fused feature region recognition result. In this solution, by integrating electrochromic glass and light source control into the detection system and combining image processing technology, multiple feature analyses are performed on the printed pattern image of the surface of the cabinet to be inspected, including feature recognition of color, concavity / convexity, printing process, material, and shape. Based on the feature region recognition results and a preset feature lookup table, the transmittance of the electrochromic glass corresponding to different feature regions and the brightness of the light source can be dynamically adjusted, thereby achieving precise illumination control of various printing features. This method overcomes the shortcomings of traditional lighting control in dealing with complex and varied printing features, improves the accuracy of visual inspection, and thus solves the problem of low accuracy of visual inspection results based on electrochromic glass. Attached Figure Description

[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1 A hardware block diagram of a mobile terminal for performing a lighting control method for cabinet quality detection according to an embodiment of this application is shown.

[0018] Figure 2 A schematic flowchart of a lighting control method for box quality inspection according to an embodiment of this application is shown.

[0019] Figure 3 A hardware connection structure block diagram of a housing quality inspection system according to an embodiment of this application is shown;

[0020] Figure 4 A production line schematic diagram of a housing quality inspection system provided according to an embodiment of this application is shown;

[0021] Figure 5 A schematic diagram of a housing quality inspection system provided according to an embodiment of this application is shown;

[0022] Figure 6An electrochromic glass region diagram is shown for a lighting control method for cabinet quality inspection according to an embodiment of this application;

[0023] Figure 7 An example of the transparency conversion of different areas of electrochromic glass in a lighting control method for cabinet quality inspection according to an embodiment of this application is shown;

[0024] Figure 8 A schematic diagram of the detection areas of a lighting control method for box quality inspection provided according to an embodiment of this application is shown.

[0025] Figure 9 A schematic diagram of the working cycle of a lighting control method for box quality inspection provided according to an embodiment of this application is shown.

[0026] Figure 10 A schematic diagram of color adjustment is shown for a lighting control method for box quality inspection provided according to an embodiment of this application.

[0027] The above figures include the following reference numerals:

[0028] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation

[0029] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] As described in the background section, the use of electrochromic glass to control light transmittance in the prior art leads to inaccurate detection. To address the problem of low accuracy in visual inspection results based on electrochromic glass, embodiments of this application provide a lighting control method and a cabinet quality inspection system for cabinet quality inspection.

[0033] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0034] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a lighting control method for box quality inspection according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0035] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the lighting control method for cabinet quality detection in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0036] This embodiment provides a lighting control method for cabinet quality detection running on a mobile terminal, computer terminal or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although the logical order is shown in the flowchart, in some cases the steps shown or described can be executed in a different order than that shown here.

[0037] Figure 2 This is a schematic flowchart of a lighting control method for cabinet quality inspection according to an embodiment of this application. Figure 2 As shown, the method includes the following steps:

[0038] Step S201: Obtain the printed pattern image of the surface to be inspected of the box.

[0039] Specifically, the surface of the enclosure to be inspected refers to the part of the enclosure that needs to undergo quality inspection. This part usually has printed patterns or text, and its quality and integrity need to be checked by the enclosure quality inspection system, such as color consistency, pattern clarity, and printing accuracy. The printed pattern image is a digital image formed after the printed pattern on the surface to be inspected is captured by a camera. The printed pattern image contains detailed information about the printed pattern to be inspected, such as color, texture, and shape, and is the basis for subsequent feature analysis. This process is completed by a camera positioned above electrochromic glass, which can capture images of the surface of the enclosure to be inspected through the electrochromic glass.

[0040] This step is the starting point of the entire cabinet quality inspection lighting control method. The acquired printed pattern image will be used for subsequent analysis of various features, including color, concavity and convexity, printing process and material, shape, etc. Based on the analysis results, the light transmittance of the electrochromic glass and the brightness of the light source will be adjusted to optimize the lighting conditions during the inspection process and ensure the accuracy and reliability of the cabinet quality inspection system.

[0041] Step S202: Perform multiple feature analyses on the above printed pattern image to obtain multiple feature region recognition results of the above printed pattern image. The above feature analyses correspond one-to-one with the above feature region recognition results. Each of the above feature region recognition results includes at least one feature region. The multiple above feature analyses include at least two of the following: color analysis, concavity and convexity analysis, printing process and material analysis, and shape analysis.

[0042] Specifically, after acquiring the printed pattern image, various feature analyses are performed on it. The analysis process involves multiple feature recognition techniques, including at least two of the following: color analysis, relief analysis, printing process and material analysis, and shape analysis. Specifically, color analysis aims to identify different colored printing areas in the image, such as black, white, and highly saturated colors. This step helps understand which areas require more lighting to avoid loss of detail in dark areas and which areas may need less lighting to prevent overexposure. Relief analysis identifies the surface unevenness of the printed pattern, which helps determine which areas require softer lighting to highlight texture and avoid detection difficulties caused by highlights and shadows. Printing process and material analysis aims to identify the printing process (e.g., offset printing, screen printing, hot stamping) and material (e.g., metal, paper, plastic) used in the printed pattern. Different printing processes and materials have different light reflection and scattering characteristics, requiring corresponding lighting conditions to best display their features. Shape analysis aims to analyze the shape features of the pattern, such as the difference between dense and non-dense stripes, which is crucial for reducing visual interference such as moiré patterns and ensuring detection accuracy. Each feature analysis produces a specific feature region identification result, which describes regions in the image that have the same or similar features. For example, color analysis identifies all high-saturation regions, concavity / convexity analysis identifies all concave or convex regions, and so on. Each feature region identification result may include the identification of one or more specific feature regions, meaning that it is possible to accurately identify and classify multiple different features in an image.

[0043] By analyzing the aforementioned features, a comprehensive understanding of the characteristics of printed patterns can be achieved, providing detailed data support for subsequent lighting adjustments. This ensures that the transmittance of the electrochromic glass and the brightness of the light source can intelligently adapt to the specific needs of each feature region in the image, improving the accuracy and efficiency of detection. This analysis and control process can automatically identify and process complex image features, providing technical support for comprehensive inspection of cabinet quality.

[0044] Step S203: The recognition results of multiple feature regions are fused to obtain a fused feature region recognition result. Based on the fused feature region recognition result, the transmittance of the electrochromic glass corresponding to the feature region is adjusted, and the brightness of the light source is adjusted.

[0045] Specifically, the feature region recognition results obtained from color analysis, concavity / convexity analysis, printing process and material analysis, and shape analysis of the printed pattern image are fused. The purpose is to comprehensively consider the lighting requirements of each feature region, achieving unified control over the transmittance of the electrochromic glass and the brightness of the light source, thereby optimizing the overall lighting conditions of the detection environment. Specifically, after analyzing regions with different features (such as color, concavity / convexity, printing process and material, and shape) in the image separately, these recognition results need to be fused to generate a comprehensive fused feature region recognition result. This means combining the requirements of each feature region. Considering that the detected pattern may simultaneously possess multiple features, such as dark areas and raised textures, as well as areas with dense stripes or special materials, the goal of fusion is to find a solution that can meet the lighting requirements of all key feature regions.

[0046] Based on the fusion feature region identification results, it is determined which zones of the electrochromic glass require transmittance adjustment. The electrochromic glass is designed with multiple independently controllable zones, each with its transmittance adjustable independently. This allows for precise control of the transmittance of corresponding zones for different identified feature regions (such as high-saturation colors, uneven surfaces, and special materials), ensuring that each feature region receives optimal lighting conditions. Similarly, based on the fusion feature region identification results, the brightness of the light source is dynamically adjusted. The brightness adjustment of the light source is coordinated with the transmittance adjustment of the electrochromic glass zones, working together to improve the lighting quality of the printed image. For example, for areas requiring enhanced contrast, it may be necessary to reduce the transmittance of the electrochromic glass while increasing the brightness of the light source; conversely, for areas prone to overexposure, it may be necessary to increase the transmittance while reducing the brightness of the light source.

[0047] The entire integration and control process embodies intelligent and adaptive characteristics. Based on the specific needs of different feature areas in the printed pattern, the transmittance of the electrochromic glass and the brightness of the light source are dynamically adjusted, thus providing the optimal lighting environment for the enclosure quality inspection system. This not only improves the accuracy and efficiency of the inspection but also reduces the need for frequent manual adjustments due to changes in lighting conditions, further enhancing the automation level of enclosure quality inspection.

[0048] This embodiment integrates electrochromic glass and light source control into the detection system, combined with image processing technology, to perform various feature analyses on the printed pattern image of the surface to be inspected on the cabinet. These analyses include feature recognition of color, texture, printing process, material, and shape. Based on the feature region recognition results and a preset feature lookup table, the system can dynamically adjust the light transmittance of the electrochromic glass corresponding to different feature regions, as well as the brightness of the light source. This achieves precise illumination control for various printing features. This method overcomes the shortcomings of traditional lighting control in dealing with complex and variable printing features, improves the accuracy of visual inspection, and solves the problem of low accuracy in visual inspection results based on electrochromic glass.

[0049] In the specific implementation process, multiple feature analyses are performed on the above-mentioned printed pattern image to obtain multiple feature region recognition results of the above-mentioned printed pattern image, including: performing multiple feature analyses on the above-mentioned printed pattern image to obtain different feature regions of the above-mentioned printed pattern image, wherein one feature analysis corresponds to at least one feature region; using an external contour algorithm to determine the external contour region of the feature region corresponding to each feature analysis, and obtaining the coordinate information of the external contour region; and determining the coordinate information of the feature region corresponding to each feature analysis and the external contour region as the feature region recognition result.

[0050] Specifically, various feature analyses are performed on the printed pattern image, and each analysis (such as color analysis, relief analysis, etc.) will identify at least one region with specific characteristics. For example, color analysis can identify high-saturation and low-saturation regions; relief analysis can identify raised and recessed regions; printing process and material analysis can identify regions of different printing technologies (offset printing, screen printing, etc.) and materials (metal, paper, etc.); shape analysis can identify regions of dense stripes and non-dense stripes.

[0051] For each feature region obtained through feature analysis, the boundary of these regions, i.e., the circumscribed contour region, is determined using an circumscribed contour algorithm. Determining the circumscribed contour region helps to accurately identify the range of the feature region, facilitating subsequent adjustments to the transmittance of the electrochromic glass partitions. This ensures that illumination is specifically optimized for designated feature regions while avoiding unnecessary impacts on adjacent non-feature regions. The coordinate information of each circumscribed contour region is recorded. This coordinate information is crucial for mapping feature regions to specific electrochromic glass partitions, as the electrochromic glass is designed to consist of multiple independently controlled partitions, each with its transmittance adjustable independently. The acquired coordinate information is used to determine which electrochromic glass partition corresponds to which feature region, enabling precise illumination control of specific areas. The coordinate information of the feature region and its corresponding circumscribed contour region is defined as the feature region identification result. This clarifies the areas and locations requiring illumination optimization, providing a direct basis for adjusting the transmittance of the electrochromic glass partitions and optimizing the light source brightness.

[0052] By analyzing various features such as color, texture, printing process, material, and shape, multiple regions with different characteristics in the printed pattern can be identified. Using an circumscribed contour algorithm, the boundaries of these feature regions are determined, and their coordinate information in the image is further obtained. This coordinate information is integrated into the feature region recognition result, providing crucial data for subsequent intelligent control of transmittance and light source brightness based on electrochromic glass partitioning. This enhances the intelligence and flexibility of the cabinet quality inspection system, enabling automatic adjustment of lighting conditions for complex printed patterns, ensuring that each feature region can be accurately detected in the most suitable lighting environment, thus improving the accuracy and efficiency of cabinet visual inspection. Through intelligent multi-feature analysis and control, it can better adapt to changes in various lighting environments, reducing the need for manual intervention, thereby improving the accuracy and efficiency of inspection.

[0053] Furthermore, the recognition results of multiple feature regions are fused to obtain a fused feature region recognition result, including: mapping the coordinate information of the circumscribed contour region to the electrochromic glass based on a preset transformation matrix to obtain the electrochromic glass partitions corresponding to the feature regions of each feature analysis; for each feature region corresponding to each feature analysis, determining the preset transmittance of each electrochromic glass partition and the preset brightness of the light source according to a preset feature lookup table; fusing the preset transmittance of each electrochromic glass partition corresponding to all feature regions to obtain a first fused feature region recognition result, and fusing the preset brightness of the light source of all feature regions to obtain a second fused feature region recognition result, wherein the fused feature region recognition result includes the first fused feature region recognition result and the second fused feature region recognition result.

[0054] Specifically, using a preset transformation matrix, the circumscribed contour coordinates of the feature regions identified from the printed pattern image are mapped onto the actual electrochromic glass, determining the corresponding electrochromic glass partitions. The preset transformation matrix is ​​obtained by establishing a mapping relationship between the image coordinate system and the physical coordinate system of the electrochromic glass, ensuring that the feature regions in the image accurately correspond to the actual partitions of the electrochromic glass. Referring to a preset feature lookup table, the preset transmittance of the corresponding electrochromic glass partition and the preset brightness of the light source are determined for each initially identified feature region (such as color regions, raised or recessed regions, etc.). The feature lookup table predefines the relationship between different feature regions and optimal lighting conditions, enabling the intelligent selection of appropriate transmittance and brightness settings based on the characteristics of the feature regions. All feature region identification results are fused, and based on the lighting requirements of multiple feature regions, a comprehensive adjustment scheme for the transmittance of the electrochromic glass partitions (i.e., the first fused feature region identification result) and an adjustment scheme for the light source brightness (i.e., the second fused feature region identification result) are calculated. The fusion process can use a weighted average, the purpose of which is to find a balance point to ensure that all feature regions can be detected under the most suitable lighting conditions, thereby avoiding inaccurate detection caused by differences in lighting conditions between different feature regions.

[0055] By using coordinate mapping, the system ensures a precise correspondence between feature regions in the image and the partitions of the electrochromic glass. Then, based on a preset feature lookup table, it intelligently sets the transmittance and light source brightness of each partition. The preset transmittance and brightness values ​​obtained from different feature analyses are fused to generate a first fused feature region recognition result (transmittance fusion result) and a second fused feature region recognition result (brightness fusion result). The final fused feature region recognition result guides the comprehensive control of the transmittance and light source brightness of the electrochromic glass partitions. This effectively solves the problem that single feature analysis cannot simultaneously meet multiple lighting requirements, achieving precise lighting control for multi-characteristic detection of printed patterns on boxes under complex environments, significantly improving the accuracy and efficiency of detection.

[0056] Furthermore, various feature analyses are performed on the printed pattern image to obtain different feature regions of the printed pattern image. Each feature analysis corresponds to at least one feature region, including: performing color analysis on the printed pattern image using a region recognition algorithm to obtain at least one color feature region; performing concavity / convexity analysis on the printed pattern image using photometric stereo method to obtain at least one concavity / convexity feature region; performing printing process and material analysis on the printed pattern image using multispectral imaging and color space analysis to obtain at least one printing process and material feature region; and performing shape analysis on the printed pattern image using Fourier transform to obtain at least one shape feature region. The different feature regions include the color feature region, the concavity / convexity feature region, the printing process and material feature region, and the shape feature region.

[0057] Specifically, region recognition algorithms are used to analyze the color of printed patterns, identifying and extracting characteristic regions of different colors, such as high-saturation regions, low-saturation regions, and metallic regions. Identifying these color characteristic regions is crucial for determining the light reflection characteristics of different colors, providing necessary data support for subsequent adjustments to the transmittance of electrochromic glass. Photometric stereochemistry can analyze the concavity and convexity features of the printed pattern, identifying raised and recessed areas. Photometric stereochemistry is a technique based on analyzing the surface structure of an object based on changes in the direction and angle of illumination. The information on concavity and convexity feature regions obtained through this method helps to understand the texture characteristics of the pattern surface, providing a basis for optimizing the illumination scheme. Multispectral imaging and color space analysis can identify characteristic regions of different processes (such as offset printing, screen printing, UV printing, and hot stamping) and materials (such as metal, paper, and plastic) in the printed pattern. Different processes and materials have different optical reflection characteristics, which is extremely critical for the selection of illumination conditions, ensuring that different types of printed patterns receive optimal light supplementation during inspection. By analyzing the shape of the printed pattern using Fourier transform, regions with shape features such as dense stripes and non-dense stripes are identified. This analysis pays particular attention to the influence of pattern shape on lighting conditions, especially in dense stripe areas, which are more prone to interference such as moiré patterns due to improper lighting conditions, requiring special lighting optimization strategies.

[0058] By combining advanced image processing technologies such as region recognition algorithms, photometric stereochemistry, multispectral imaging and color space analysis, and Fourier transform, a comprehensive feature analysis was performed on the printed pattern images of the cabinet. This series of analyses covered multiple dimensions, including color, texture, printing process and material, and shape, ensuring a detailed understanding of the various characteristics of the printed pattern. It accurately identified and divided different feature regions in the image, including color feature regions, texture feature regions, printing process and material feature regions, and shape feature regions. The identification of these feature regions provided rich information for subsequent fine-tuning based on the transmittance of electrochromic glass and the brightness of the light source, allowing the lighting conditions to be specifically matched to the unique needs of each feature region, thereby greatly optimizing the lighting environment for cabinet quality inspection. This not only enhanced the accuracy and reliability of the inspection but also improved inspection efficiency by reducing misjudgments caused by unsuitable lighting conditions.

[0059] Furthermore, the preset transmittance of each electrochromic glass partition corresponding to all the aforementioned feature regions is fused to obtain a first fused feature region identification result, and the preset brightness of the light source in all the aforementioned feature regions is fused to obtain a second fused feature region identification result. The fused feature region identification result includes the first fused feature region identification result and the second fused feature region identification result, including: calculating the weighted average of the preset transmittance of each electrochromic glass partition corresponding to all the aforementioned feature regions to obtain the first fused feature region identification result, which is the target transmittance of each electrochromic glass partition; calculating the weighted average of the preset brightness of the light source in all the aforementioned feature regions to obtain the second fused feature region identification result, which is the target brightness of the light source; adjusting the transmittance of the electrochromic glass partition corresponding to the aforementioned feature regions and adjusting the brightness of the light source based on the fused feature region identification result, including: adjusting the transmittance of each electrochromic glass partition to the corresponding target transmittance, and simultaneously adjusting the brightness of the light source to the target brightness.

[0060] Specifically, the weighted average of the preset transmittance of each feature region (including color, texture, material, and shape) corresponding to the electrochromic glass partitions obtained through feature analysis is calculated to generate the first fused feature region identification result. This weighted averaging is based on the importance or light sensitivity of different feature regions, calculating the average of their respective preset transmittance values ​​to ensure that the final target transmittance balances the lighting requirements of different feature regions. Similarly, the weighted average of the preset brightness of the light source for all feature regions is calculated to generate the second fused feature region identification result. The target brightness is also determined based on the specific brightness requirements of different regions. Through fusion processing, a comprehensive solution that satisfies both high-brightness and low-brightness requirements is obtained. After obtaining the first fused feature region identification result (target transmittance) and the second fused feature region identification result (target brightness), the partition transmittance of the corresponding feature regions of the electrochromic glass and the actual brightness of the light source are adjusted according to these results to ensure that the lighting conditions meet the optimal fused solution, thereby providing a more accurate and adaptable lighting environment for cabinet inspection.

[0061] This fusion processing essentially involves comprehensively evaluating and adjusting the transmittance and light source brightness of the electrochromic glass based on multi-dimensional feature analysis results to address the complex and varied lighting requirements of different areas in the printed pattern. By employing statistical methods such as weighted averaging, the light sensitivity of each feature area can be intelligently considered, and lighting parameters can be dynamically optimized. This improves the accuracy and efficiency of cabinet inspection while reducing inspection errors and costs caused by mismatched lighting conditions.

[0062] In some embodiments of this application, obtaining the printed pattern image of the surface to be tested of the aforementioned housing includes: setting the initial transmittance of all zones of the electrochromic glass within a preset transmittance range; and setting the initial brightness of the aforementioned light source within a preset brightness range.

[0063] Specifically, before starting the inspection, the transmittance of all sections of the electrochromic glass is adjusted to a preset transmittance range. This preset transmittance range is usually selected based on empirical values, such as around 50%. This avoids excessive light that could cause detail loss while ensuring sufficient illumination to clearly display the details of the printed pattern. This setting provides basic lighting conditions for subsequent feature analysis, ensuring a consistent starting point for the inspection process. Simultaneously, the overall brightness of the light source is adjusted to a preset brightness range, also based on empirical values. For example, the initial brightness can be set near the middle of the adjustable range of the light source, such as 10,000 lx. This avoids excessively extreme brightness, providing a stable lighting environment while allowing sufficient adjustment space for targeted brightness enhancement or reduction in specific areas based on the results of feature analysis.

[0064] Standardized initialization lays the foundation for acquiring images of the box inspection surfaces, ensuring that all inspections are conducted under a uniform and comparable lighting environment before analyzing various features (color, texture, process material, shape, etc.) of the printed pattern image. This not only improves the accuracy of feature detection but also ensures better consistency of inspection results across different times and batches, thereby enhancing the overall quality and efficiency of box quality inspection.

[0065] In some embodiments of this application, before acquiring the printed pattern image of the surface to be inspected of the aforementioned housing, the method further includes: acquiring multiple template images of the printed pattern image, wherein the template images are pre-selected images with typical features, including color features, concavity / convexity features, printing process and material features, and shape features; performing feature analysis on the multiple template images to obtain feature parameters of different feature regions in the template images, wherein the feature parameters include the color value, concavity / convexity degree, printing process attributes, material type, and shape attributes of each feature region; establishing a template library based on the feature parameters, wherein the template library is used to store the feature parameters of the different feature regions and the corresponding light transmittance and light source brightness, and the template library is also used to use the feature parameters in the template library as an initial reference to locate the feature regions of the printed pattern image before each of the multiple feature analyses of the printed pattern image.

[0066] Specifically, to improve the accuracy and efficiency of image feature analysis for box inspection surfaces, a template image library was pre-constructed before the formal inspection began. Specifically, a series of representative printed pattern images were collected. These template images showcased different typical features, such as various colors, different embossing properties, multiple printing processes (e.g., offset printing, screen printing), and materials (e.g., metal, plastic), as well as complex shape attributes, such as the contrast between dense and non-dense stripes. The collection of these template images established a basic sample for subsequent feature parameter analysis. Feature analysis was performed on these template images to extract specific feature parameters for different feature regions, including but not limited to color values ​​(for color contrast analysis), embossing degree (reflecting the three-dimensional information of the pattern), printing process attributes (distinguishing the subtle differences between different processes), material type (understanding the material's light reflection characteristics), and shape attributes (e.g., stripe density). Quantifying these parameters is crucial for intelligently adjusting lighting conditions based on image features.

[0067] Based on the extracted feature parameters, a template library was established, which includes not only the feature parameters of each feature region, but also suggestions for optimal transmittance and light source brightness for these features. Before performing multiple feature analyses on each printed pattern image, the feature parameters in the template library are used as initial references. This is done to quickly locate and preliminarily determine the possible feature types and their distribution in the printed pattern to be detected. By applying the template library, a certain degree of predictive capability is achieved before formal analysis, enabling faster determination of the electrochromic glass zones and light source brightness that need adjustment, significantly shortening analysis time and reducing computational burden.

[0068] The creation and application of the template library significantly improves the accuracy and speed of feature analysis during the box inspection process. It allows for preliminary settings based on known feature parameters before analyzing new images, reducing unnecessary parameter search time. Simultaneously, by comparing feature parameters with those in the template library, feature regions in the image can be quickly located and identified, providing crucial reference for subsequent fine-tuning of transmittance and light source brightness. This ensures that each printed pattern image to be inspected can be accurately analyzed under optimal lighting conditions, thereby improving the quality and efficiency of the inspection results.

[0069] In other embodiments of this application, Fourier transform is used to perform the shape analysis on the printed pattern image to obtain multiple shape feature regions, wherein the shape feature regions include dense stripe regions and non-dense stripe regions. This includes: using the Fourier transform to convert the printed pattern image to the frequency domain to obtain the frequency domain features of the printed pattern image; analyzing the spectral characteristics of the stripes based on the frequency domain features, wherein the spectral characteristics include the frequency domain distribution of stripe direction consistency and grayscale values; and identifying the dense stripe regions and non-dense stripe regions of the printed pattern image based on the spectral characteristics.

[0070] Specifically, Fourier transform is used to convert the printed pattern image from the spatial domain to the frequency domain. Fourier transform reveals the frequency components of different features in the image, making the directional consistency of the stripes and the grayscale distribution characteristics, which are difficult to observe directly in the spatial domain, apparent in the frequency domain. In the frequency domain, the spectral characteristics of the printed pattern image are analyzed, with particular attention to the spectral characteristics of the stripes. The spectral characteristics of the stripes mainly include the directional consistency of the stripes (reflecting whether the stripes are parallel) and the frequency distribution of grayscale values ​​(reflecting the frequency of the alternation of bright and dark stripes). By analyzing these spectral characteristics, the stripes in the printed pattern can be understood more intuitively, especially their periodicity and directionality. Based on the above spectral characteristic analysis, dense and non-dense stripe regions in the printed pattern image can be identified. Dense stripe regions typically appear as narrow, high-intensity peaks in the frequency domain, reflecting high-frequency stripe variations; while non-dense stripe regions appear as wide, relatively low-intensity peaks, reflecting low-frequency stripe variations. This identification process fully utilizes the visualization advantages of stripe features in the frequency domain, enabling precise location of regions with dense and non-dense stripes, thus providing an important basis for subsequent adaptive adjustment of illumination conditions.

[0071] By transforming the image to the frequency domain using Fourier transform and then analyzing the spectral characteristics of the stripes based on frequency domain features, the dense and non-dense stripe regions are finally identified, providing a deep analysis of the shape features of the printed pattern image. Since different types of stripes exhibit significant differences in detail under different lighting conditions, especially dense stripe regions prone to moiré patterns, this method allows for targeted identification of these regions. Differential lighting strategies can then be employed, such as adjusting the local transmittance of the electrochromic glass and the brightness of the light source, to effectively suppress moiré patterns and ensure the detection quality of all feature regions.

[0072] In some embodiments of this application, before mapping the coordinate information of the circumscribed contour region to the electrochromic glass based on a preset transformation matrix to obtain the electrochromic glass partitions corresponding to the feature regions of each feature analysis, the method further includes: acquiring an image of a calibration reference to generate a basic parameter set, wherein the calibration reference covers and adheres to the electrochromic glass; acquiring the physical coordinates of feature reference points on the electrochromic glass in the physical coordinate system of the electrochromic glass, and performing image feature recognition on the electrochromic glass to determine the pixel coordinates of the feature reference points in the image coordinate system, wherein the feature reference points are the intersection points of the electrochromic glass partition grids; determining a set of coordinate correspondences between the physical coordinates and the pixel coordinates based on the physical coordinates and the pixel coordinates; and calculating the preset transformation matrix using a planar projection transformation based on the basic parameter set and the set of coordinate correspondences, wherein the preset transformation matrix is ​​used to store the mapping relationship between the image coordinate system and the physical coordinate system.

[0073] Specifically, a calibration reference with a regular array of features is used, which must completely cover and closely adhere to the surface of the electrochromic glass. Multiple images of the calibration reference in different poses are acquired using a camera. Employing camera calibration methods commonly used in industrial vision, a set of fundamental parameters, including camera intrinsics, distortion correction parameters, and extrinsic parameters, is calculated. This parameter set describes the camera's optical characteristics, lens distortion compensation, and the relative position and pose of the camera and the electrochromic glass, laying the foundation for subsequent coordinate transformation. The physical coordinates of the intersection points of each grid section on the electrochromic glass are determined; these intersection points serve as feature reference points. Simultaneously, images of the electrochromic glass are acquired, and image feature recognition technology is used to extract the pixel coordinates of these feature reference points in the image coordinate system. Through a one-to-one correspondence between multiple sets of physical coordinates and pixel coordinates, a preliminary set of correspondences between the two coordinate systems is established, providing crucial data for constructing the preset transformation matrix.

[0074] Based on the set of fundamental parameters and their corresponding coordinate relationships, a pre-defined transformation matrix is ​​generated using planar projection transformation. This matrix specifically describes the mapping relationship between the image coordinate system and the physical coordinate system of the electrochromic glass, enabling the accurate mapping of the coordinate information of any image feature region to the corresponding partition position on the electrochromic glass, thereby achieving precise control over the light transmittance of the electrochromic glass.

[0075] Generating the preset transformation matrix is ​​a core step in ensuring the accuracy of the coordinate mapping between electrochromic glass zones. Through the aforementioned calibration and calculation process, a precise correspondence between image features and actual physical locations can be established. In subsequent feature analysis, once specific feature regions are identified, the preset transformation matrix can be used to quickly and accurately transform the coordinate information of these regions onto the physical coordinate system of the electrochromic glass, locating specific zones. This allows for adjustment of the transmittance of the zone based on its illumination requirements, providing robust technical support for adaptive control of illumination conditions in enclosure inspection. This not only improves the accuracy of feature analysis but also ensures the immediacy and accuracy of illumination control, contributing to improved inspection efficiency and quality.

[0076] In some embodiments of this application, an intelligent learning and adaptive enhancement mechanism is introduced, which can automatically learn and optimize the transmittance and light source brightness settings of different feature regions through machine learning algorithms. Specifically, it continuously collects and analyzes the lighting effect feedback during the actual detection process, including image quality indicators (such as contrast and sharpness), detection accuracy, and miss detection rate, to construct a lighting parameter optimization model. During the model training process, the preset values ​​of transmittance and light source brightness of each feature region can be continuously adjusted and optimized, enabling better adaptation to various complex printing patterns that may appear in the future, thereby improving the overall detection efficiency and accuracy. In addition, the intelligent learning mechanism can also dynamically adjust the initial transmittance of the electrochromic glass and the reference brightness of the light source according to environmental factors such as seasonal changes and time cycles, in order to cope with seasonal or periodic changes in lighting conditions and ensure detection quality at any time and in any environment.

[0077] This application also provides a cabinet quality inspection system, comprising: electrochromic glass disposed above the surface of the cabinet to be inspected; a camera disposed above the electrochromic glass for acquiring a printed pattern image of the surface of the cabinet to be inspected through the electrochromic glass; a light source disposed on both sides of the electrochromic glass, and the light source does not have a positive projection on the surface of the cabinet to be inspected; and a controller electrically connected to the electrochromic glass and the light source for executing any of the above-described lighting control methods for cabinet quality inspection.

[0078] The hardware connection structure diagram of the enclosure quality inspection system is as follows: Figure 3As shown, the connection logic is as follows: The camera is connected to an image processing industrial control computer. After acquiring the image, the industrial control computer judges the characteristics of the object to be detected, such as color, material, printing process, and target shape, and transmits the information to the controller. The controller is connected to the electrochromic glass to provide the corresponding voltage. Simultaneously, the controller is connected to a bar light source to control the switching and intensity of the light source. Based on data feedback, the controller continuously adjusts the transparency of the electrochromic glass to meet the detection requirements and achieve unmanned management.

[0079] Figure 4 This is a production line diagram of the enclosure quality inspection system. Figure 5 This is a schematic diagram of the enclosure quality inspection system, such as... Figure 4 and Figure 5 As shown, the camera (an industrial camera is used in this embodiment) is fixed directly above the inspection area (e.g., a vertical distance of 30cm-50cm). Electrochromic glass is installed between the camera and the object being inspected (10-15cm from the object). Two strip light sources are installed on either side of the electrochromic glass (at a 30-45° tilt angle, the angle between the light source and the horizontal plane) to ensure that the light from both sides does not obstruct the camera's field of view (default is 50% light intensity). An even number of light sources is sufficient to ensure uniform illumination. They are symmetrically placed on opposite sides of the inspected product. Furthermore, the tilt angle is determined based on actual conditions and is not fixed; it only needs to ensure that the illumination meets the requirements. This is just an example.

[0080] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the lighting control method for box quality inspection of this application will be described in detail below with reference to specific embodiments.

[0081] This embodiment relates to a specific method for adjusting the lighting during cabinet quality inspection. The electrochromic glass area diagram is shown below. Figure 6 As shown, electrochromic glass features a multi-region electrode design, meaning that each region can be independently charged, ensuring that each zone can independently control transparency and color changes. Examples of transparency transitions in different regions are shown below. Figure 7As shown in the example: Assume the area is divided into 4×10 rectangular grids (40 independent control zones, or more, depending on the actual situation). Each zone can independently adjust its transmittance (0-100%). Using the intersection of two lines as the center point, the 40 regions are divided into (X1, Y1) — (X10, Y4). A mapping between the image coordinate system and the physical coordinate system of the electrochromic glass is established through camera calibration and homography matrix. Specifically, a calibration reference object (such as a calibration plate with regular array characteristics) that meets the detection accuracy requirements is selected and fixedly attached to the detection plane of the electrochromic glass, ensuring that the calibration reference object covers the entire zone range of the electrochromic glass. Multiple sets of calibration reference object images under different postures are acquired by the camera. Using camera calibration methods commonly used in industrial vision, the camera's intrinsic parameters (parameters describing the camera's optical characteristics), distortion correction parameters (used to compensate for lens nonlinear distortion), and extrinsic parameters (parameters describing the relative position and posture of the camera and the electrochromic glass) are calculated, forming a basic parameter set that can be used for subsequent coordinate transformation.

[0082] Feature reference points with clear physical locations (such as the intersection of the partition grid) are selected on the partition structure of the electrochromic glass. The coordinates of each feature reference point in the physical coordinate system of the electrochromic glass are determined by measurement methods with the required accuracy. At the same time, the electrochromic glass is image acquired, and the pixel coordinates of the above feature reference points in the image coordinate system are extracted by image feature recognition technology, forming multiple sets of "physical coordinates-pixel coordinates" correspondences.

[0083] To establish the projection correspondence between the image coordinate system and the physical coordinate system of the electrochromic glass, it is necessary to obtain the feature corresponding points of the two coordinate systems. Using conventional calculation methods in the field of planar projection transformation, a transformation matrix is ​​constructed to describe the mapping relationship between the two planar coordinates (i.e., to realize the projection transformation between image pixels and the physical positions of the glass). By verifying the mapping accuracy of this transformation matrix, the final usable coordinate mapping relationship is determined.

[0084] Initial settings: all zones of the electrochromic glass are set to neutral gray (e.g., 50% transmittance), and the overall light source is turned on with a base brightness (the light source brightness can be adjusted from 5000 to 50000 lx, and the base brightness is set to 10000 lx here).

[0085] In the printed patterns on packaging boxes, different colors are used, and in practice, different colors of printed patterns have different lighting requirements. This embodiment extracts the outlines of different colors in the printed pattern. Based on the lighting requirements of these different color outlines, the transmittance of the electrochromic glass is adjusted to ensure that different color patterns achieve optimal lighting. Specifically, the camera is triggered to acquire the packaging box pattern, and color analysis is performed, taking black and white as an example. A region recognition algorithm is run; the black printed area is identified using connected components with a grayscale value < 50, and the white label area is identified using connected components with a grayscale value > 200 (other colors can be extracted by setting thresholds or using color extraction algorithms). Then, a region marking report (including coordinates / area / partition) is output.

[0086] like Figure 8 As shown, black printing areas B1 and B2, and white printing area W1 are extracted. Based on the output area marker coordinates and area, such as the coordinate position and area size of area B2, and according to the aforementioned electrochromic glass partition design unit, and based on the shape of the electrochromic glass unit (smallest unit) (assuming it is rectangular), an external contour algorithm is used to create an external contour for B2 (the external contour is to adapt to the shape of the electrochromic glass unit, ensuring that the electrochromic glass can cover the target area without interfering with other areas; here, a rectangle can be selected for the external contour). Then, based on the area coordinate position of the external contour, the corresponding electrochromic glass partition is determined, and the light transmittance of the glass is adjusted. Execution process: Send partition control commands and adjust according to the actual image capture effect. Table 1 shows an example table of light transmittance adjustment for electrochromic glass under various colors.

[0087] Table 1. Examples of transmittance adjustment for electrochromic glass under various colors.

[0088]

[0089] Different textures in printed patterns require different lighting conditions. Image photometric stereoscopic methods are used to identify the texture of printed patterns, such as... Figure 8 As shown, for the convex region P1 and the concave region P2, based on the output region marker coordinates and area, such as the coordinate position and area size of region P2, and according to the aforementioned electrochromic glass partitioning design unit, based on the shape of the electrochromic glass unit (smallest unit) (assumed to be rectangular), an external contour algorithm is used to construct the external contour of P2. Then, based on the region coordinate position of the external contour, the corresponding electrochromic glass partition is determined, and the light transmittance of the glass is adjusted. Execution process: Send partitioning control commands and adjust according to the actual image acquisition effect. Table 2 is an example table of light transmittance adjustment for electrochromic glass under concave-convex performance.

[0090] Table 2 Examples of transmittance adjustment for electrochromic glass under concave-convex properties

[0091]

[0092] Different printing processes and materials result in different light requirements for printed patterns. Figure 8 Section 3 lists several common printing processes used on packaging boxes, and section 4 lists various materials. Processes include offset printing, screen printing, UV printing, and hot stamping; materials include metals and paper products. The differences between these printing processes and materials are manifested in variations in light and color. Using existing multispectral imaging and color space analysis, the differences between printing processes and materials can be distinguished (specific details are based on current image processing technology and will not be explored further here). Figure 8 As shown, the process regions T1, T2, T3, and T4 in section 3, and M1, M2, M3, M4, and M5 in section 4, are based on the output region marker coordinates and areas. For example, the coordinate position and area size of region T3 are used. Based on the aforementioned electrochromic glass partitioning design unit, and according to the shape of the electrochromic glass unit (smallest unit) (assumed to be rectangular), an external contour algorithm is used to construct the external contour of T3. Then, based on the region coordinate position of the external contour, the corresponding electrochromic glass partition is determined, and the light transmittance of the glass is adjusted. Execution process: Send partitioning control commands and adjust according to the actual image capture effect. Table 3 shows an example table of light transmittance adjustment for electrochromic glass under different factor processes. Table 4 shows an example table of light transmittance adjustment for electrochromic glass under different factor materials.

[0093] Table 3. Examples of transmittance adjustment for electrochromic glass under different process factors.

[0094]

[0095] Table 4. Examples of transmittance adjustment for electrochromic glass under different material factors.

[0096]

[0097] The shape described in this embodiment mainly addresses the presence of dense lines in the pattern, because dense lines can produce moiré patterns. Compared to non-dense stripe areas, for dense stripe areas, it's necessary to reduce the light intensity and transmittance parameters in the dense stripe areas while maintaining normal exposure in the non-dense areas. This effectively suppresses moiré patterns without sacrificing overall image quality. For example, Fourier transform is used to convert the printed image into frequency domain features. Based on the consistency of stripe direction and grayscale value calculation (the alternating light and dark characteristics of the stripes), dense stripe areas are marked (this part of the technical solution is existing). Using the above technology... Figure 8The algorithm identifies dense and non-dense striped areas on the packaging box. In this algorithm, Q1 and Q3 are dense striped areas, and Q2 is a non-dense striped area. Based on the output area markers and their coordinates and areas (e.g., the coordinates and area of ​​Q1), and according to the aforementioned electrochromic glass partitioning design unit, the algorithm uses an external contour algorithm to create an external contour for Q1 based on the shape of the electrochromic glass unit (the smallest unit, assumed to be rectangular). Then, based on the area coordinates of the external contour, the corresponding electrochromic glass partition is determined, and the glass transmittance is adjusted. The execution process involves sending partitioning control commands and adjusting the settings based on the actual image capture effect. Table 5 shows an example of transmittance adjustment for electrochromic glass in dense striped areas.

[0098] Table 5. Examples of transmittance adjustment for electrochromic glass in dense stripe areas.

[0099]

[0100] Based on the above settings for transmittance and light intensity for each test item, the transmittance and light intensity of each test item are superimposed. For example: If a certain test area meets the process test characteristics, with electrochromic glass and light intensity of: transmittance a1%, light intensity b1%, and also meets the dense area characteristics, with electrochromic glass and light intensity of: transmittance a2%, light intensity b2%, then the dimming control superposition for this target area is: transmittance (a1+a2) / 2%, light intensity (b1+b2) / 2%. For areas with more than one test item, the superposition follows this rule.

[0101] The above color analysis, convexity / concaveness analysis, printing process and material analysis, and shape analysis do not have a specific order and can be combined in any way.

[0102] The light adjustment for the above-mentioned tests all involve adjusting the transmittance of the electrochromic glass and the light source. In the examples above, the adjustment simultaneously adjusts the transmittance and the light intensity. In an alternative embodiment, the transmittance of the electrochromic glass is adjusted first (relative to the transmittance in the table, the transmittance adjustment at this time needs to be determined according to the initial light intensity). When the maximum transmittance still does not meet the light requirements, the light intensity is adjusted (increased).

[0103] The schematic diagram of the work cycle flow in this embodiment is as follows: Figure 9 As shown, the process begins with capturing template images and establishing a template library. Then, the system detects the object's location, triggers a rapid pre-capture by the camera, transmits a low-resolution image, performs rapid detection and classification of items (color, material, embossing, printing process, shape), and adjusts the electrochromic glass and lighting according to the specific category. An example of color adjustment has already been provided. Figure 10To quickly classify colors according to the color adjustment diagram, the test items are performed to obtain various categories such as high saturation + high brightness, high saturation + low brightness, and low saturation + high brightness. Then, the electrochromic glass and lights are adjusted according to the color. For example, in the case of high saturation + high brightness, the light transmittance of the electrochromic glass is adjusted to 20%~40%, and the light brightness is adjusted to 50%~70%.

[0104] In some embodiments of this application, a strategy of multi-light source collaborative control and ambient light fusion is introduced. In traditional methods, visual inspection systems rely on only a single light source, which limits their flexibility and adaptability when processing complex printed patterns. However, by introducing multi-light source collaborative control, the brightness and direction of each light source can be dynamically adjusted according to the characteristics of the printed pattern to achieve optimal illumination for a specific area or the entire surface to be inspected. Furthermore, ambient light and artificial light sources can be intelligently fused. Through the dynamic adjustment of electrochromic glass, the intensity and color of artificial light and ambient light are optimally balanced, avoiding the adverse effects of ambient light on the inspection results while fully utilizing the natural advantages of ambient light, reducing the energy consumption of additional light sources, and improving the system's environmental adaptability. This strategy not only improves the accuracy of inspection but also reduces the system's operating costs to a certain extent, improving overall energy efficiency and environmental friendliness.

[0105] The lighting control method for cabinet quality inspection proposed in this application analyzes the printed patterns on the surface to be inspected of the cabinet based on the color, concavity / convexity, process, material, and shape of the target pattern image. This includes: identifying the color of the target image region using grayscale thresholding and color analysis; identifying the concavity / convexity regions of the target image using photometric stereo method; simultaneously identifying regions of various printing processes and material categories of the target image using multispectral imaging and color extraction; and calculating the dense regions of the target image using frequency domain analysis grayscale. Then, based on the circumscribed contour coordinates of the identified image characteristic regions, it maps them to specific electrochromic glass regions. Finally, by superimposing the transmittance of each detection feature and the light intensity, adaptive control of the electrochromic glass based on the image target features is achieved, solving the problem of unreasonable transmittance settings in existing electrochromic glass and improving the illumination quality of the image.

[0106] For the printed patterns on the surfaces to be inspected on the enclosure, feature analysis is performed based on the color, texture, process, material, and shape of the target pattern image. This enables adaptive control of electrochromic glass based on the target image features, improving the image's illumination quality. This solves the problem of low manual operation efficiency in traditional visual inspection systems that require frequent changes to the light source or background when simultaneously handling multiple features such as color, material, and texture.

[0107] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the lighting control method for cabinet quality detection.

[0108] This invention provides a processor for running a program, wherein the program executes the lighting control method for cabinet quality detection.

[0109] This application also provides a computer program product that, when executed on a data processing device, is adapted to perform the steps of initializing the lighting control method for the above-described cabinet quality detection.

[0110] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0111] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0112] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0113] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0114] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0115] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0116] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0117] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0118] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0120] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A light adjustment method for box quality detection, characterized in that, The method is applied to a box quality detection system, the box quality detection system comprising an electrochromic glass arranged above a detection surface of the box, a camera arranged above the electrochromic glass, and light sources arranged on both sides of the electrochromic glass, wherein the light sources do not have a direct projection on the detection surface of the box, and the method comprises: acquiring a printed pattern image of the detection surface of the box; performing a plurality of feature analyses on the printed pattern image to obtain a plurality of feature region identification results of the printed pattern image, wherein the feature analyses and the feature region identification results are one-to-one corresponding, each of the feature region identification results comprises at least one feature region, and the plurality of feature analyses comprises at least two of color analysis, concave-convex analysis, printing process and material analysis, and shape analysis; fusing the plurality of feature region identification results to obtain a fused feature region identification result, and adjusting the light transmittance of a partition of the electrochromic glass corresponding to the feature region and the brightness of the light source based on the fused feature region identification result.

2. The method of claim 1, wherein, The method is applied to a box quality detection system, the box quality detection system comprising an electrochromic glass arranged above a detection surface of the box, a camera arranged above the electrochromic glass, and light sources arranged on both sides of the electrochromic glass, wherein the light sources do not have a direct projection on the detection surface of the box, and the method comprises: acquiring a printed pattern image of the detection surface of the box; performing a plurality of feature analyses on the printed pattern image to obtain a plurality of feature region identification results of the printed pattern image, wherein the feature analyses and the feature region identification results are one-to-one corresponding, each of the feature region identification results comprises at least one feature region, and the plurality of feature analyses comprises at least two of color analysis, concave-convex analysis, printing process and material analysis, and shape analysis; fusing the plurality of feature region identification results to obtain a fused feature region identification result, and adjusting the light transmittance of a partition of the electrochromic glass corresponding to the feature region and the brightness of the light source based on the fused feature region identification result.

3. The method of claim 2, wherein, The method is applied to a box quality detection system, the box quality detection system comprising an electrochromic glass arranged above a detection surface of the box, a camera arranged above the electrochromic glass, and light sources arranged on both sides of the electrochromic glass, wherein the light sources do not have a direct projection on the detection surface of the box, and the method comprises: acquiring a printed pattern image of the detection surface of the box; performing a plurality of feature analyses on the printed pattern image to obtain a plurality of feature region identification results of the printed pattern image, wherein the feature analyses and the feature region identification results are one-to-one corresponding, each of the feature region identification results comprises at least one feature region, and the plurality of feature analyses comprises at least two of color analysis, concave-convex analysis, printing process and material analysis, and shape analysis; fusing the plurality of feature region identification results to obtain a fused feature region identification result, and adjusting the light transmittance of a partition of the electrochromic glass corresponding to the feature region and the brightness of the light source based on the fused feature region identification result.

4. The method of claim 2, wherein, The method is applied to a box quality detection system, the box quality detection system comprising an electrochromic glass arranged above a detection surface of the box, a camera arranged above the electrochromic glass, and light sources arranged on both sides of the electrochromic glass, wherein the light sources do not have a direct projection on the detection surface of the box, and the method comprises: acquiring a printed pattern image of the detection surface of the box; performing a plurality of feature analyses on the printed pattern image to obtain a plurality of feature region identification results of the printed pattern image, wherein the feature analyses and the feature region identification results are one-to-one corresponding, each of the feature region identification results comprises at least one feature region, and the plurality of feature analyses comprises at least two of color analysis, concave-convex analysis, printing process and material analysis, and shape analysis; fusing the plurality of feature region identification results to obtain a fused feature region identification result, and adjusting the light transmittance of a partition of the electrochromic glass corresponding to the feature region and the brightness of the light source based on the fused feature region identification result. The method is applied to a box quality detection system, the box quality detection system comprising an electrochromic glass arranged above a detection surface of the box, a camera arranged above the electrochromic glass, and light sources arranged on both sides of the electrochromic glass, wherein the light sources do not have a direct projection on the detection surface of the box, and the method comprises: acquiring a printed pattern image of the detection surface of the box; performing a plurality of feature analyses on the printed pattern image to obtain a plurality of feature region identification results of the printed pattern image, wherein the feature analyses and the feature region identification results are one-to-one corresponding, each of the feature region identification results comprises at least one feature region, and the plurality of feature analyses comprises at least two of color analysis, concave-convex analysis, printing process and material analysis, and shape analysis; fusing the plurality of feature region identification results to obtain a fused feature region identification result, and adjusting the light transmittance of a partition of the electrochromic glass corresponding to the feature region and the brightness of the light source based on the fused feature region identification result. adopting multi-spectral imaging and color space analysis to analyze the printing process and material of the printed pattern image, to obtain at least one printing process and material characteristic region; adopting Fourier transform to analyze the shape of the printed pattern image, to obtain at least one shape characteristic region; wherein the different characteristic regions include the color characteristic region, the concave-convex characteristic region, the printing process and material characteristic region, and the shape characteristic region.

5. The method of claim 3, wherein, fusing the preset light transmittance of each of the electrochromic glass sub-regions corresponding to all the characteristic regions to obtain a first fused characteristic region identification result, and fusing the preset brightness of the light source of all the characteristic regions to obtain a second fused characteristic region identification result, the fused characteristic region identification result including the first fused characteristic region identification result and the second fused characteristic region identification result, comprising: weighting and averaging the preset light transmittance of each of the electrochromic glass sub-regions corresponding to all the characteristic regions to obtain the first fused characteristic region identification result, the first fused characteristic region identification result being the target light transmittance of each of the electrochromic glass sub-regions; weighting and averaging the preset brightness of the light source of all the characteristic regions to obtain the second fused characteristic region identification result, the second fused characteristic region identification result being the target brightness of the light source; adjusting the light transmittance of the sub-regions of the electrochromic glass corresponding to the characteristic regions and adjusting the brightness of the light source based on the fused characteristic region identification result, comprising: adjusting the light transmittance of each of the electrochromic glass sub-regions to the corresponding target light transmittance, and adjusting the brightness of the light source to the target brightness.

6. The method of claim 1, wherein, acquiring the printed pattern image of the detection surface of the box, comprising: setting the initial light transmittance of all the sub-regions of the electrochromic glass within a preset light transmittance range; setting the initial brightness of the light source within a preset brightness range.

7. The method of claim 1, wherein, Before acquiring the printed pattern image of the detection surface of the box, the method further comprises: acquiring a plurality of template images of the printed pattern image, the template images being pre-selected images with typical characteristics, the typical characteristics including color characteristics, concave-convex characteristics, printing process and material characteristics, and shape characteristics; performing characteristic analysis on a plurality of the template images to obtain characteristic parameters of different characteristic regions in the template images, the characteristic parameters including color values, concave-convex degrees, printing process attributes, material types, and shape attributes of each of the characteristic regions; establishing a template library according to the characteristic parameters, the template library being used to store the characteristic parameters of the different characteristic regions and corresponding light transmittance and light source brightness, the template library also being used to take the characteristic parameters in the template library as initial references to locate characteristic regions of the printed pattern image before performing each of the plurality of characteristic analyses of the printed pattern image.

8. The method of claim 4, wherein, The shape analysis is performed on the printed pattern image by using Fourier transform to obtain a plurality of shape feature regions, wherein the shape feature regions include dense stripe regions and non-dense stripe regions, comprising: The printed pattern image is converted to a frequency domain by using the Fourier transform to obtain frequency domain features of the printed pattern image; The frequency spectrum characteristics of the stripes are analyzed based on the frequency domain features, and the frequency spectrum characteristics include stripe direction consistency and frequency domain distribution of gray value; The dense stripe regions and the non-dense stripe regions of the printed pattern image are identified according to the frequency spectrum characteristics.

9. The method of claim 3, wherein, Before mapping the coordinate information of the circumscribed contour region to the electrochromic glass based on a preset transformation matrix to obtain the feature region corresponding to each feature analysis corresponding to the electrochromic glass partition, the method further comprises: An image of a calibration reference is obtained to generate a basic parameter set, and the calibration reference covers and fits the electrochromic glass; Physical coordinates of feature reference points on the electrochromic glass in a physical coordinate system of the electrochromic glass are obtained, and the electrochromic glass is subjected to image feature recognition to determine pixel coordinates of the feature reference points in an image coordinate system, and the feature reference points are intersection points of the electrochromic glass partition grid; Based on the physical coordinates and the pixel coordinates, a coordinate correspondence relationship set of the physical coordinates and the pixel coordinates is determined; According to the basic parameter set and the coordinate correspondence relationship set, a plane projection transformation is used to calculate the preset transformation matrix, and the preset transformation matrix is used to store the mapping relationship between the image coordinate system and the physical coordinate system.

10. A box quality detection system, characterized by, Comprising: The electrochromic glass is arranged above the detection surface of the box body; The camera is arranged above the electrochromic glass and is used to obtain a printed pattern image of the detection surface of the box body through the electrochromic glass; The light source is arranged on both sides of the electrochromic glass, and the light source does not have an orthographic projection on the detection surface of the box body; The controller is electrically connected with the electrochromic glass and the light source, and is used to execute the light control method for box quality detection according to any one of claims 1 to 9.