Imaging environment parameter optimization method, electronic device, and medium

By automatically adjusting imaging environment parameters through image quality analysis and artificial intelligence closed-loop optimization mechanisms, the problem of poor imaging quality of imaging equipment in dynamic environments has been solved, and efficient and stable digital management of imaging environment parameter optimization and debugging experience has been achieved.

CN123185444APending Publication Date: 2026-11-27WEIFANG GOERTEK ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611424042.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing imaging equipment lacks the ability to actively optimize and dynamically adapt to imaging environment parameters, resulting in poor image quality in dynamically fluctuating environments.

Method used

By automatically adjusting imaging environment parameters through image quality analysis and utilizing an artificial intelligence closed-loop optimization mechanism, the entire process of imaging environment parameter optimization is automated and intelligent, including environmental parameter simulation, automatic control of hardware equipment, image data acquisition and quality analysis, intelligent parameter decision optimization, and firmware compilation and burning.

Benefits of technology

It significantly improves the efficiency of imaging environment parameter optimization, enhances the stability and consistency of imaging quality, shortens the tuning cycle, reduces manual input costs, and enables the digital archiving and reuse of parameter tuning experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185444A_ABST
    Figure CN123185444A_ABST
Patent Text Reader

Abstract

The present disclosure provides an imaging environment parameter optimization method, an electronic device and a medium. The method comprises: in response to receiving an imaging task, obtaining a first image captured by an imaging device under a first imaging environment parameter, and obtaining a first image quality parameter of the first image through image quality analysis; if there is at least one problem parameter in the first image quality parameter that is not within a preset standard parameter range, determining a second imaging environment parameter after optimization according to the problem parameter, the preset standard parameter range and the first imaging environment parameter; obtaining a second image captured by the imaging device under the second imaging environment parameter, and obtaining a second image quality parameter of the second image through image quality analysis; and if there is no problem parameter in the second image quality parameter, determining that the imaging task has been completed. The present disclosure can improve the imaging environment parameter optimization efficiency and the imaging environment parameter optimization effect through full-process automation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of optical imaging technology, and in particular to a method for optimizing imaging environment parameters, an electronic device, and a medium. Background Technology

[0002] In today's rapidly evolving electronic information technology and optical imaging technology, imaging equipment has been widely used in various fields such as consumer electronics, industrial inspection, medical imaging, space exploration, and security monitoring. The image quality (IQ) of imaging equipment directly determines the accuracy and reliability of subsequent tasks such as image analysis, target recognition, and information extraction. As a key external factor affecting imaging quality, the rationality and stability of optical imaging environmental parameters play a decisive role in the imaging effect.

[0003] Currently, most existing imaging devices rely on fixed optical environment adaptation modes, lacking the ability to actively optimize and dynamically adapt to imaging environment parameters. However, in actual imaging scenarios, optical environment parameters are often in a state of dynamic fluctuation, easily leading to various unfavorable operating conditions. Existing technologies for optimizing image quality mostly focus on adjusting the imaging device's own parameters (such as exposure, gain, and aperture) or rely on manual adjustments to the optical environment (such as adding supplementary lighting equipment or adjusting the light source angle), both of which have significant technical shortcomings.

[0004] Therefore, how to optimize imaging environment parameters more accurately and efficiently has become a problem that needs to be solved. Summary of the Invention

[0005] In a first aspect, embodiments of this disclosure provide an imaging environment parameter optimization method, the method comprising: in response to receiving an imaging task, acquiring a first image captured by an imaging device under first imaging environment parameters, and obtaining a first image quality parameter of the first image through image quality analysis; if at least one problematic parameter outside a preset standard parameter range exists in the first image quality parameter, then determining optimized second imaging environment parameters based on the problematic parameter, the preset standard parameter range, and the first imaging environment parameter; after adjusting the imaging environment parameter from the first imaging environment parameter to the second imaging environment parameter, acquiring a second image captured by the imaging device under the second imaging environment parameter, and obtaining a second image quality parameter of the second image through image quality analysis; if no problematic parameter exists in the second image quality parameter, then determining that the imaging task has been completed.

[0006] In some embodiments, if at least one problematic parameter in the first image quality parameters is outside the preset standard parameter range, determining the optimized second imaging environment parameter based on the problematic parameter, the preset standard parameter range, and the first imaging environment parameter includes: when there are at least two problematic parameters, determining the priority of each problematic parameter according to a preset priority determination rule, and sorting the problematic parameters in descending order of priority to obtain a problematic parameter sequence; sequentially performing imaging environment parameter optimization processing based on each problematic parameter in the problematic parameter sequence, the preset standard parameter range, and the first imaging environment parameter to determine the optimized second imaging environment parameter.

[0007] In some embodiments, determining the optimized second imaging environment parameter according to each problem parameter in the problem parameter sequence, the preset standard parameter range, and the first imaging environment parameter sequentially includes: taking the first problem parameter in the problem parameter sequence as a target parameter, performing imaging environment parameter optimization processing on the first imaging environment parameter according to the preset standard parameter range corresponding to the target parameter to obtain an optimized parameter; taking the next problem parameter of the target parameter as a new target parameter, performing imaging environment parameter optimization processing according to the preset standard parameter range corresponding to the new target parameter and the optimized parameter obtained from the previous target parameter to obtain a new optimized parameter; and after all problem parameters in the problem parameter sequence have been used as target parameters for imaging environment parameter optimization processing, using the finally obtained optimized parameter as the second imaging environment parameter.

[0008] In some embodiments, determining the optimized second imaging environment parameters based on the problem parameters, the preset standard parameter range, and the first imaging environment parameters includes: inputting the problem parameters, the preset standard parameter range, and the first imaging environment parameters into a pre-trained parameter optimization model, and obtaining the optimized second imaging environment parameters through the parameter optimization model; wherein, the parameter optimization model is trained based on the image quality parameters of images captured by the imaging device under different imaging environment parameters and historical environment optimization data.

[0009] In some embodiments, the method further includes: if at least one problematic parameter exists among the second image quality parameters, then returning to the step of determining an optimized third imaging environment parameter based on the problematic parameter, the preset standard parameter range, and the second imaging environment parameter, until a preset iteration stop condition is reached.

[0010] In some embodiments, the preset iteration stop condition includes: there are no problematic parameters in the image quality parameters of the image captured by the imaging device under optimized imaging environment parameters, or the number of iterations reaches a preset maximum number.

[0011] In some embodiments, the method further includes: using the second imaging environment parameters, the preset standard parameter range, and the second image quality parameters as new training data to perform model optimization processing on the parameter optimization model used for parameter optimization.

[0012] In some embodiments, the first imaging environment parameter and the second imaging environment parameter include at least one of ambient illuminance, ambient color temperature, incident angle of illumination, ambient stray light intensity, light source spectral distribution, illumination uniformity, and scene brightness contrast level; the first image quality parameter and the second image quality parameter include at least one of modulation transfer function parameter, color error parameter, image noise parameter, signal-to-noise ratio parameter, geometric distortion parameter, dynamic range parameter, sharpness parameter, and white balance parameter.

[0013] Secondly, embodiments of this disclosure provide an electronic device, including: one or more processors; and a memory storing one or more programs thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-described imaging environment parameter optimization method.

[0014] Thirdly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the above-described imaging environment parameter optimization method.

[0015] This disclosure provides an imaging environment parameter optimization method, electronic device, and medium. The method includes: in response to receiving an imaging task, acquiring a first image captured by an imaging device under first imaging environment parameters, and obtaining a first image quality parameter of the first image through image quality analysis; if at least one problematic parameter outside a preset standard parameter range exists in the first image quality parameter, then determining optimized second imaging environment parameters based on the problematic parameter, the preset standard parameter range, and the first imaging environment parameters; after adjusting the imaging environment parameters from the first imaging environment parameters to the second imaging environment parameters, acquiring a second image captured by the imaging device under the second imaging environment parameters, and obtaining a second image quality parameter of the second image through image quality analysis; if no problematic parameter exists in the second image quality parameter, then determining that the imaging task has been completed. This disclosure can improve the efficiency and effectiveness of imaging environment parameter optimization through full-process automation. Attached Figure Description

[0016] Figure 1 This is a flowchart of an imaging environment parameter optimization method provided in an embodiment of the present disclosure.

[0017] Figure 2Another flowchart of an imaging environment parameter optimization method provided in this disclosure embodiment.

[0018] Figure 3 A flowchart illustrating the imaging environment parameter optimization process provided in this embodiment of the disclosure.

[0019] Figure 4 A schematic diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions of this disclosure will be described in detail below with reference to the accompanying drawings.

[0021] Exemplary embodiments will be described more fully below with reference to the accompanying drawings; however, these exemplary embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of this disclosure.

[0022] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0023] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0024] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded.

[0025] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0026] In existing conventional technical solutions, optimization methods that rely on adjusting imaging scene environmental parameters to improve imaging effects generally have many shortcomings, specifically in the following aspects: 1. Highly dependent on manual operation: The entire debugging process requires technicians to manually complete a series of operations such as adjusting the light source box, switching color temperature and brightness, setting up equipment positions, debugging the camera, running the analysis software, adjusting parameter configurations, and burning firmware. Not only are the operation steps complicated and the labor input cost high, but the final optimization effect also depends heavily on the professional experience level of the technicians.

[0027] 2. Low efficiency of testing and optimization, and easy for human error to occur in the results: The processing speed of manual testing is limited and it is not suitable for large-scale synchronous testing; human operation is prone to various errors, resulting in multiple sets of test data that cannot be unified, and the final imaging optimization results are not stable and have low reliability.

[0028] 3. Difficulty in achieving continuous parameter iteration optimization around the clock: Manual work is subject to time scheduling limitations, making it impossible to rely on hardware equipment to carry out uninterrupted, large-scale parameter traversal optimization and long-term stability verification testing, making it difficult to break through the existing upper limit of imaging parameter optimization.

[0029] 4. Industry experience in parameter tuning is difficult to standardize, retain, and reuse: Imaging parameter tuning often relies on the experience and skills accumulated by individual technical personnel. This kind of experience is tacit knowledge that is difficult to visualize. It is not convenient to form standardized operating procedures, nor can it be efficiently copied, reused, archived, and stored. When new projects are launched, repeated trial and error debugging is often required, which wastes R&D time.

[0030] To overcome the shortcomings of existing technologies, this disclosure proposes an imaging environment parameter optimization method based on an artificial intelligence closed-loop optimization mechanism. The aim is to automate and intelligently transform the entire process of imaging environment parameter tuning and optimization, significantly improving the overall efficiency of parameter tuning. This solution establishes a fully automated optimization closed loop of "testing-analysis-tuning-verification," with the core design concept as follows: 1. Fully automated closed-loop operation: From scene environment simulation, automatic control of hardware equipment, image data acquisition and quality analysis, intelligent parameter decision optimization, to firmware compilation and burning, no human intervention is required in any step, enabling unattended, lights-out automated operation mode in the laboratory.

[0031] 2. AI-driven intelligent parameter optimization: Relying on intelligent algorithms such as reinforcement learning and Bayesian optimization, and combined with the quantitative evaluation results of image quality, it autonomously outputs the optimal parameter configuration scheme, which can traverse the parameter space beyond the scope of human experience and continuously iterate to improve the imaging effect.

[0032] 3. End-to-end automated engineering iteration: The system can automatically convert the optimization strategies output by artificial intelligence into source code configuration update instructions, and automatically complete operations such as program compilation, firmware flashing, and device restart and retesting in sequence, continuously driving the high-speed iterative operation of the "test-analysis-optimization-verification" closed loop.

[0033] This disclosure provides a method for optimizing imaging environment parameters. The workflow of this method can be implemented by electronic devices, such as computers, handheld smart terminals, etc. For ease of explanation, the embodiments of this disclosure are described with computers as the main body for method execution.

[0034] Figure 1 This is a flowchart illustrating an imaging environment parameter optimization method provided in an embodiment of the present disclosure. Figure 2 Another flowchart of an imaging environment parameter optimization method provided in this disclosure embodiment is shown below. Figure 1 as well as Figure 2 As shown, this disclosure provides a method for optimizing imaging environment parameters, the method comprising steps S1 to S4, as follows: S1. In response to receiving an imaging task, acquire the first image captured by the imaging device under the first imaging environment parameters, and obtain the first image quality parameters of the first image through image quality analysis.

[0035] Specifically, after receiving an imaging task (such as a test task or an optimization task), this step involves image acquisition and initial analysis. First, the environmental parameters of the imaging scene are set to the first imaging environment parameters (e.g., color temperature 5000K, illuminance 1000 lux, etc.), and an image is captured to obtain the original first image.

[0036] Then, image quality analysis is performed on the first captured image. For example, the Imatest software API is called to perform quantitative analysis to obtain the first image quality parameters of the first image. The image quality parameters are indicators used to quantitatively evaluate the quality of the output image of the imaging device.

[0037] In some embodiments, the first imaging environment parameters include at least one of ambient illuminance, ambient color temperature, incident angle of light, ambient stray light intensity, light source spectral distribution, illumination uniformity, and scene brightness contrast level.

[0038] In this disclosure, the imaging environment parameters that affect image quality mainly include at least one of the following parameters: (1) Ambient illuminance: The light intensity of the imaging scene, in lux, representing the overall brightness of the environment.

[0039] (2) Ambient color temperature: The color temperature value of the light source, which represents the color attributes of light sources such as natural light, warm yellow light, cool white light, and fluorescent mixed light.

[0040] (3) Light incident angle: the incident angle of light rays such as front light, side light, back light, and oblique light relative to the imaging visual axis.

[0041] (4) Ambient stray light intensity: The intensity of irrelevant reflected light, diffuse stray light and ambient reflection in the scene.

[0042] (5) Spectral distribution of light source: Differences in spectral composition of different light sources, such as monochromatic light, continuous spectrum, narrowband spectrum, etc.

[0043] (6) Illumination uniformity: The degree of uniformity of light and dark distribution within the field of view.

[0044] (7) Scene brightness contrast level: The optical brightness contrast level between the highlight area and the shadow area of ​​the scene.

[0045] In some embodiments, the first image quality parameter includes at least one of the following: modulation transfer function (MTF), color error parameter, image noise parameter (ΔE), signal-to-noise ratio (SNR), geometric distortion parameter, dynamic range parameter, sharpness parameter, and white balance parameter.

[0046] Among them, the modulation transfer function parameter is the core indicator for measuring the optical reproduction and detail resolution capability of an imaging system. It is used to characterize the ability of imaging equipment to transmit and reproduce scene information at different spatial frequencies. It can objectively reflect the resolution and reproduction effect of the lens and imaging optical path on the edge contour and fine texture of the target. The quality of this parameter directly determines the detail resolution and contour reproduction accuracy of the image, and is a key parameter for evaluating the optical performance of the imaging system.

[0047] For example, when photographing a standard resolution test card with fine lines, this parameter can quantify whether the imaging system can clearly distinguish dense black and white stripes. The higher the value, the better it can reproduce tiny details such as circuit board traces, fabric textures, and text strokes, and it is less likely to have blurry edges or texture adhesion.

[0048] Among them, the color error parameter is used to quantify the degree of deviation between the pixel color of the image output by the imaging device and the standard reference true color. It covers dimensions such as hue deviation, saturation deviation and brightness color shift. It can accurately characterize the color reproduction accuracy of the imaging device in various scenarios. The smaller the color error value, the closer the image color is to the true color of the scene, and the less likely it is to have problems such as overall color cast, local color cast and color distortion.

[0049] For example, using a standard color chart as a reference, if the red, green, blue, and gray color blocks appear reddish, yellowish, cyanish, or have saturation distortion after imaging, they can be quantitatively evaluated through color error parameters. This is suitable for scenarios with high requirements for color reproduction, such as industrial color sorting, product photography, and medical pathology imaging.

[0050] Among them, the image noise parameter is used to characterize the level of random interference noise in the image that does not belong to the real scene information. It includes various useless interference signals such as dark field noise, fixed pattern noise, grain noise and salt and pepper noise. It can objectively measure the purity of the image. The lower the parameter, the weaker the graininess of the image, the less noise interference, and the cleaner and more delicate the overall image appearance.

[0051] For example, in low-light indoor environments at night or in low-light outdoor scenes on cloudy days, images are prone to appearing with dense colored grains and bright and dark specks. These grains and random bright and dark spots can be quantitatively characterized by image noise parameters. The lower the parameter, the cleaner the image with no noise interference.

[0052] The signal-to-noise ratio (SNR) parameter is the ratio of the effective imaging signal power to the useless noise signal power. It is used to quantify and distinguish the relative proportion of effective scene information and random noise interference during the imaging process. The higher the SNR, the greater the proportion of effective imaging information, the better the noise suppression effect, and the stronger the image transparency and sense of layering. It can avoid the phenomenon that dark details are drowned out by noise and the image becomes gray and hazy.

[0053] For example, in security nighttime supplementary lighting imaging and industrial low-light microscopic imaging scenarios, the higher the signal-to-noise ratio, the more prominent the outline and detail signals of the scene, and the noise is effectively suppressed; when the signal-to-noise ratio is low, the image is prone to appearing gray and hazy, and the details in the dark areas are covered by noise, making it impossible to clearly identify the target features.

[0054] Among them, geometric distortion parameters are used to characterize the geometric deformation errors of the image relative to the real scene in terms of spatial structure, shape proportion and pixel position. They cover deformation types such as barrel distortion, pincushion distortion and trapezoidal perspective distortion, and are used to evaluate the straightness of the image lines and the fidelity of the object proportions. The better the distortion parameter control, the less curved the image lines, the less stretched and squeezed the target objects, and the more accurate the spatial geometric shape restoration.

[0055] For example, when photographing square buildings or standard checkerboard calibration boards, if the originally straight horizontal and vertical lines of the wall become bulging outward, concave inward, or inconsistent in width from top to bottom, the degree of deformation can be quantified by geometric distortion parameters. This is applicable to scenarios with high geometric accuracy requirements, such as vehicle surround view, industrial dimension measurement, and aerial surveying.

[0056] Among them, the dynamic range parameter characterizes the ability of an imaging device to simultaneously capture and distinguish the brightness span between the brightest and darkest areas of an image, reflecting the imaging system's ability to adapt to scenes with high contrast. The larger the dynamic range, the better it can ensure that highlights are not overexposed and shadows are not completely black and lose details, thus fully preserving effective image information in both bright and dark areas in high-contrast scenes.

[0057] For example, when shooting backlit scenery and indoor scenes, switching between light and dark at tunnel entrances and exits, or inspecting industrial workpieces under strong light and shadow, excellent dynamic range parameters can preserve the bright scenes outside the window without them becoming washed out and overexposed, while also showing the details in the indoor and shadow areas, avoiding highlight clipping and loss of information due to completely black shadows.

[0058] Among them, the sharpness parameter is a quantitative indicator that comprehensively evaluates the edge sharpness, texture fineness, and ability to distinguish minute details of an image. It focuses on the overall visual transparency and edge transition characteristics of the image and can intuitively reflect whether there are problems such as fogging, softening, or blurred edges in the image. The higher the sharpness parameter, the crisper the image edge contour, the richer the texture details, and the sharper the overall imaging appearance.

[0059] For example, when photographing a person's hair, tiny scratches on a product's surface, or the markings on a dashboard, the higher the resolution parameter, the sharper and crisper the edges, and the more distinct the texture. Poor parameters result in a hazy, foggy overall image with blurred and sticky edges, making it difficult to distinguish minute details.

[0060] Among them, the white balance parameter is used to characterize the imaging device's ability to adjust the white reference and correct the overall color shift of the image under different color temperature light source environments. It is suitable for complex lighting scenarios such as natural light, indoor lighting, backlight, and warm and cool color light sources. By precisely controlling the white balance parameter, color temperature shift problems such as yellow, blue, and green tones in the image can be corrected, ensuring the purity of the white reference and the natural and realistic color tone of the entire image.

[0061] For example, in scenarios with mixed light sources such as natural sunlight, warm yellow indoor lighting, cool skylight on cloudy days, and fluorescent lights, when the white balance parameter is accurately calibrated, white objects in the image will not appear yellowish, bluish, or greenish, and the overall color tone of the scene will match the real vision of the human eye, avoiding overall color temperature shift and distortion in the entire image.

[0062] In this disclosure, optical imaging environmental parameters such as ambient illuminance, ambient color temperature, incident angle of illumination, stray light intensity, spectral distribution of light source, illumination uniformity, and scene contrast all have a direct and significant impact on various image quality parameters, including modulation transfer function (MTF), color error (ΔE), image noise, signal-to-noise ratio (SNR), geometric distortion, dynamic range, sharpness, and white balance. Among these, illuminance directly changes the level of image noise and SNR; color temperature and spectral distribution of light source dominate the magnitude of white balance deviation and color error ΔE; incident angle of illumination, stray light, and illumination uniformity degrade image sharpness, modulation transfer function performance, and introduce additional optical distortion; and scene contrast directly determines the performance of imaging dynamic range. Changes in any optical environmental parameter will cause synchronous fluctuations in the entire set of image quality indicators.

[0063] S2. If there is at least one problematic parameter among the first image quality parameters that is not within the preset standard parameter range, then the optimized second imaging environment parameter is determined based on the problematic parameter, the preset standard parameter range, and the first imaging environment parameter.

[0064] Specifically, the first image quality parameter is compared with a preset standard parameter range stored in the database to determine whether each parameter is within the preset standard parameter range. If a parameter is within the preset standard parameter range, it is determined to be a normal parameter; otherwise, if a parameter is not within the preset standard parameter range, it is determined to be a problematic parameter.

[0065] When at least one problematic parameter in the first image quality parameters is outside the preset standard parameter range, it indicates that the first image quality parameter does not meet the standard image quality requirements and needs to be optimized for the imaging environment parameters of the imaging scene. Based on this, this step determines the optimized second imaging environment parameters according to the problematic parameter, the first image, and the first imaging environment parameters.

[0066] In some embodiments, the method further includes: if there are no problematic parameters among the first image quality parameters, it indicates that the first image quality parameters meet the standard image quality requirements and there is no need to perform imaging environment parameter optimization processing for the imaging scene. Therefore, it is determined that the imaging task has been completed.

[0067] In some embodiments, this disclosure employs a priority strategy for parameter optimization, prioritizing the optimization of imaging environment parameters based on high-priority problem parameters, followed by optimization of imaging environment parameters based on low-priority problem parameters. This mainly includes: when there are at least two problem parameters, determining the priority of each problem parameter according to a preset priority determination rule, and sorting the problem parameters in descending order of priority to obtain a problem parameter sequence; sequentially optimizing the imaging environment parameters based on each problem parameter in the problem parameter sequence, the preset standard parameter range, and the first imaging environment parameter to determine the optimized second imaging environment parameter.

[0068] Figure 3 A flowchart for the imaging environment parameter optimization process provided in the embodiments of this disclosure is shown below. Figure 3 As shown, the step of determining the optimized second imaging environment parameter according to each problem parameter in the problem parameter sequence, the preset standard parameter range, and the first imaging environment parameter includes: taking the first problem parameter in the problem parameter sequence as the target parameter, performing imaging environment parameter optimization processing on the first imaging environment parameter according to the preset standard parameter range corresponding to the target parameter to obtain an optimized parameter; determining whether all problem parameters in the problem parameter sequence are used as target parameters for imaging environment parameter optimization processing; if not, taking the next problem parameter of the target parameter as the new target parameter, performing imaging environment parameter optimization processing according to the preset standard parameter range corresponding to the new target parameter and the optimized parameter obtained from the previous target parameter to obtain a new optimized parameter; when all problem parameters in the problem parameter sequence are used as target parameters for imaging environment parameter optimization processing, the finally obtained optimized parameter is used as the second imaging environment parameter.

[0069] Specifically, this disclosure selects the first problem parameter from the pre-sorted problem parameter sequence as the target parameter to be debugged in this round. Combined with the pre-set standard parameter value range of the target parameter, it performs imaging environment parameter optimization calculation and debugging operation for the current initial first imaging environment parameter. After parameter iterative optimization, it outputs the optimized parameter that adapts to the constraint conditions of the target parameter.

[0070] Then, after completing the tuning of the current target parameter, the next problem parameter in the problem parameter sequence that follows the current target parameter is selected and determined as the new target parameter to be optimized in the next round. In this parameter optimization process, it is necessary not only to follow the preset standard parameter value range corresponding to the new target parameter for constraint, but also to retain the optimized parameter results obtained after the previous round of target parameter optimization as the basic parameters for this optimization. On this basis, iterative optimization of imaging environment parameters is carried out to obtain the new optimized parameters corresponding to this round.

[0071] Following the optimization logic described above, the problem parameters in the subsequent positions of the problem parameter sequence are selected as target parameters for continuous parameter tuning. Each parameter optimization is based on the parameters obtained in the previous round of optimization, combined with the preset standard parameter range corresponding to the current target parameter to complete the constraint optimization. After all the problem parameters in the problem parameter sequence have been selected as target parameters and one round of imaging environment parameter optimization has been completed, the optimal parameter finally output after all parameter iterations is determined as the second imaging environment parameter after multi-dimensional defect correction.

[0072] This disclosure optimizes parameters sequentially from high to low priority, which can prioritize solving core issues affecting image quality, accelerate parameter optimization convergence speed, and shorten overall optimization time. At the same time, it can avoid coupling interference caused by simultaneous adjustment of multiple parameters, ensure the accuracy and reliability of the optimization direction, rationally allocate computing power and testing resources, and gradually optimize detail image quality while ensuring that key imaging indicators meet the standards, thereby improving optimization efficiency and the stability of imaging optimization results.

[0073] In some embodiments, in S2, determining the optimized second imaging environment parameters based on the problem parameters, the preset standard parameter range, and the first imaging environment parameters includes: inputting the problem parameters, the preset standard parameter range, and the first imaging environment parameters into a pre-trained parameter optimization model, and obtaining the optimized second imaging environment parameters through the parameter optimization model; wherein, the parameter optimization model is trained based on the image quality parameters of images captured by the imaging device under different imaging environment parameters and historical environment optimization data.

[0074] Specifically, the image quality parameters that do not meet the standard image quality requirements, the corresponding first image (or the image feature vector after feature extraction), the preset standard parameter range, and the current first imaging environment parameters are input into a pre-trained AI model for parameter optimization. The parameter optimization model analyzes and learns based on the input information and outputs a set of optimized imaging environment parameter suggestions.

[0075] The training data for the parameter optimization model includes positive and negative samples. Positive samples are images that meet the standard image quality requirements, the corresponding image quality parameters and imaging environment parameters, and historical environment optimization data that makes the image quality meet the standard requirements after optimizing the imaging environment parameters. Negative samples are images that do not meet the standard image quality requirements, the corresponding image quality parameters and imaging environment parameters, and historical environment optimization data that still does not meet the standard requirements after optimizing the imaging environment parameters.

[0076] The parameter optimization model can be constructed, trained, and optimized based on algorithms such as deep reinforcement learning, multilayer perceptron, genetic algorithm, or Bayesian optimization.

[0077] S3. After adjusting the imaging environment parameters from the first imaging environment parameters to the second imaging environment parameters, the second image captured by the imaging device under the second imaging environment parameters is obtained, and the second image quality parameters of the second image are obtained through image quality analysis.

[0078] After obtaining the optimized imaging environment parameters, the imaging environment parameters are first adjusted from the first imaging environment parameters to the second imaging environment parameters. Then, the second image captured by the imaging device under the second imaging environment parameters is obtained. The second imaging environment parameters include at least one of the following: ambient illuminance, ambient color temperature, incident angle of light, ambient stray light intensity, light source spectral distribution, illumination uniformity, and scene brightness contrast level.

[0079] The same imaging environment parameter adjustment method can be adopted to adjust the imaging environment parameters to the first imaging environment parameter and the second imaging environment parameter respectively, so as to ensure that the number and type of the first imaging environment parameter and the second imaging environment parameter are the same.

[0080] After obtaining the second image, the second image quality parameters of the second image are obtained through image quality analysis. The second image quality parameters include at least one of the following: modulation transfer function parameters, color error parameters, image noise parameters, signal-to-noise ratio parameters, geometric distortion parameters, dynamic range parameters, sharpness parameters, and white balance parameters.

[0081] The same image quality analysis method can be used to analyze the quality of the first image and the second image respectively, so as to ensure that the number and type of the quality parameters of the first image and the quality parameters of the second image are the same.

[0082] S4. If there are no problematic parameters in the second image quality parameters, then the imaging task is determined to be completed.

[0083] After obtaining the second image quality parameter, the second image quality parameter is compared with the preset standard parameter range stored in the database to determine whether each parameter is within the preset standard parameter range. If the parameter is within the preset standard parameter range, it is determined to be a normal parameter; otherwise, if the parameter is not within the preset standard parameter range, it is determined to be a problematic parameter.

[0084] If no problematic parameters are found in the second image quality parameters, it indicates that the second image quality parameters meet the standard image quality requirements. Therefore, the imaging task is determined to be completed.

[0085] In some embodiments, the method further includes: if at least one problematic parameter exists among the second image quality parameters, then returning to the step of determining an optimized third imaging environment parameter based on the problematic parameter, the preset standard parameter range, and the second imaging environment parameter, until a preset iteration stop condition is reached.

[0086] Specifically, when there is at least one problematic parameter in the second image quality parameters that is not within the preset standard parameter range, it indicates that the second image quality parameter does not meet the standard image quality requirements and the imaging environment parameters of the imaging scene need to be optimized again. Based on this, the process returns to the step of re-optimizing the imaging environment parameters and iterates through the subsequent steps in sequence until the preset iteration stop condition is reached.

[0087] In some embodiments, the preset iteration stop condition includes: there are no problematic parameters in the image quality parameters of the image captured by the imaging device under optimized imaging environment parameters, or the number of iterations reaches a preset maximum number.

[0088] In this disclosure, the process of "image quality analysis - imaging environment parameter adjustment - image quality re-analysis" is an iterative process. This iterative process can be iterated without limit until there are no problematic parameters in the image quality parameters, thereby ensuring that the optimal imaging environment parameters are found.

[0089] In addition, the maximum number of iterations can be limited to reasonably limit the computational overhead and runtime of iterative processing, avoiding the waste of computing resources and redundant processing time caused by unlimited iteration.

[0090] In some embodiments, the method further includes: using the second imaging environment parameters, the preset standard parameter range, and the second image quality parameters as new training data to perform model optimization processing on the parameter optimization model used for parameter optimization.

[0091] In this step, the second imaging environment parameters, the preset standard parameter range, and the second image quality parameters are used as new training data to optimize the parameter optimization model. This new training data can be used as negative samples in model training, allowing the model to learn the feature distributions of various interferences, similar false targets, and background noise while learning the target features of positive samples. This effectively optimizes and tightens the model's decision boundary, enhances the model's ability to finely distinguish between target and non-target samples, significantly reduces false detection and false alarm rates, suppresses overfitting caused by training with only positive samples, and greatly improves the model's generalization ability and recognition robustness in real-world scenarios such as complex lighting, cluttered backgrounds, and unknown conditions.

[0092] The imaging environment parameter optimization method proposed in this disclosure has the following outstanding technical advantages compared with traditional technical solutions: 1. Fully automated unmanned operation: This solution can build a complete automated closed-loop chain covering environmental configuration, automatic equipment control, intelligent algorithm parameter optimization and firmware upgrade, which greatly reduces the cost of manual input, frees R&D personnel from repetitive debugging work, and allows technical personnel to focus on high-value work such as top-level product solution design and core technology R&D.

[0093] 2. Significantly reduce parameter tuning cycle and improve R&D iteration efficiency: Relying on automated hardware actuators and software control systems, it can achieve uninterrupted operation around the clock, and can reduce the parameter tuning work that takes several days or even weeks in the traditional way to several hours or even several minutes, effectively accelerating the product iteration R&D progress and shortening the new product launch cycle.

[0094] 3. Strong stability and high repeatability of test results: Completely avoids deviations in test conditions caused by operating habits and errors during manual operation, ensuring a high degree of uniformity in test conditions and execution processes for each group, and ensuring that test data can be stably reproduced, effectively guaranteeing the consistency of imaging performance of batch products.

[0095] 4. Achieve intelligent optimization of parameters across the entire domain by leveraging artificial intelligence: By using intelligent algorithms to perform a full-domain traversal search of the multi-dimensional parameter space, the optimal parameter configuration scheme can be discovered beyond the scope of human experience, fully releasing the upper limit of the imaging performance of hardware devices and further optimizing the final imaging effect.

[0096] 5. Achieve digital archiving, reusability and traceability of debugging experience: The system fully retains all operational data in each round of parameter optimization, and builds a standardized imaging parameter tuning database. This can not only provide a reference for parameter debugging in subsequent new projects and shorten the trial and error cycle of new project development, but also be used for iterative training of artificial intelligence models, while realizing full-process product quality traceability and verification.

[0097] To enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of this disclosure, the technical solutions provided by the embodiments of this disclosure will be described in detail below through specific embodiments.

[0098] Example 1 This disclosure provides a fully automated, intelligent optical laboratory system for optimizing imaging environment parameters, including: Central control unit: As the brain of the system, it runs the core control algorithm, coordinates the workflow of all modules, and stores task configurations and judgment criteria.

[0099] Controllable optical environment module: Includes programmable controllable light boxes and light-shielding components, which can precisely switch color temperature (such as D65, D50, A light, etc.), illuminance level and light source type according to instructions to simulate various real lighting scenarios.

[0100] Robot operation module: including multi-axis robotic arm, special gripper and vision positioning system, used to accurately grasp and place the device to be tested (such as camera module, mobile phone), and can operate its physical buttons (such as power on, shutter).

[0101] Device interface and power supply module: Provides a stable programmable power supply for the device under test and establishes a data connection with the device through a physical interface (such as USB, PCIe) or wireless means (such as Wi-Fi) for transmitting control commands, image data and firmware.

[0102] Image acquisition and processing module: controls the device under test to capture test specimens (such as 24-color cards, grayscale cards, resolution cards) in a specified environment, and automatically exports the original images or YUV images.

[0103] Image quality analysis module: Calls or integrates industry-standard image quality analysis tools (such as Imatest, IQ-Analyzer) or self-developed algorithms to perform quantitative analysis on the acquired images and generate reports including parameters such as color error ΔE, signal-to-noise ratio SNR, sharpness MTF, and uniformity shading.

[0104] AI Parameter Optimization and Code Generation Module: This is the intelligent core of the system. When the analysis results do not meet the preset standards, the AI ​​engine (using reinforcement learning, Bayesian optimization, or neural network models) generates a set of optimized tuning parameters (such as AWB gain, LSC correction table, and color correction matrix CCM) based on the current quality gap, historical data, and prior knowledge. Subsequently, this module automatically updates the parameters to the source code configuration file or register map table of the device driver or image signal processing (ISP).

[0105] Automatic compilation and flashing module: Receives updated source code or configuration files, calls the corresponding cross-compilation toolchain (such as GCC, ARMCC, Keil) to automatically compile and generate binary firmware files, and flashes the new firmware to the device under test through the device interface module.

[0106] Data Management and Traceability Module: The database records environmental parameters, device identifiers, original images, analysis results, AI decision logs, modified code, and the final firmware version for each iteration, enabling full-process traceability and knowledge accumulation.

[0107] Example 2 Based on the fully automated intelligent optical laboratory system in Embodiment 1, this disclosure provides a method for optimizing the imaging environment parameters of a fully automated intelligent optical laboratory system, including: (1) Task initialization The central control unit receives the tuning task and analyzes the target standard (e.g., ΔE<3), the test scenario list (e.g., D651000lux, A light 100lux), the upper limit of the number of iterations, etc. The robot operation module picks up the device under test from the tray and accurately places it on the test station, and the device interface module completes the electrical connection.

[0108] (2) Environment setup and image acquisition The central control unit instructs the controllable optical environment module to set the light source conditions for the current test scene (e.g., color temperature 5000K, illuminance 1000 lux). After stabilization, the device is woken up through the device interface module, which controls it to photograph the specified test target and automatically export the image to the image acquisition and processing module.

[0109] (3) Image quality analysis The image quality analysis module performs calculations and analysis on the acquired images to obtain quantitative indicators (such as color error ΔE and brightness uniformity), and feeds the results back to the central control unit.

[0110] (4) Standards assessment The central control unit compares the analysis results with preset standards. If the standards are met, it proceeds to step (7). If the standards are not met and the maximum number of iterations has not been reached, it executes step (5).

[0111] (5) AI parameter optimization and code generation The AI ​​parameter optimization module calculates new optimization parameters based on the current image quality gap, current environmental parameters, and historical optimization data. Then, it automatically parses the ISP source code or configuration file structure, writes the new parameters into the corresponding code locations, and generates an updated source code file.

[0112] (6) Automatic compilation, burning and device restart The automatic compilation module calls the compilation toolchain to compile the new code into executable binary firmware. The flashing module writes the firmware to the device under test through the device interface and instructs the device to restart so that the new parameters take effect. After completion, the process returns to step (2) to conduct the next round of iterative testing under the same lighting environment.

[0113] (7) Scene switching or task completion If the current scene test meets the standard, the central control unit checks if there are any untested scenes. If so, it switches to the next scene (modifies the lightbox parameters) and returns to step (2) to start a new round of optimization. If all scenes have been completed or the maximum number of iterations has been reached, the loop stops. The system saves the final standard-compliant device parameters and corresponding firmware versions to the database and generates a detailed test report. The robot operation module moves the device back to the designated position and waits for the next task.

[0114] Figure 3 A schematic diagram of an electronic device provided in an embodiment of this disclosure, such as... Figure 3 As shown, in some embodiments, this disclosure provides an electronic device including: one or more processors 201; a memory 202 storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the imaging environment parameter optimization method of any one of the above; and one or more I / O interfaces 203 connected between the processors and the memory, configured to enable information interaction between the processors and the memory.

[0115] The processor 201 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 202 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 203 is connected between the processor 201 and the memory 202, enabling information exchange between the processor 201 and the memory 202, including but not limited to a data bus (Bus).

[0116] In some embodiments, the processor 201, memory 202, and I / O interface 203 are interconnected via bus 204, and thus connected to other components of the computing device.

[0117] In some embodiments, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described imaging environment parameter optimization methods.

[0118] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0119] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for optimizing imaging environment parameters, characterized in that, The method includes: In response to receiving an imaging task, the system acquires a first image captured by the imaging device under first imaging environment parameters, and obtains a first image quality parameter of the first image through image quality analysis. If at least one problematic parameter in the first image quality parameters is outside the preset standard parameter range, then the optimized second imaging environment parameters are determined based on the problematic parameter, the preset standard parameter range, and the first imaging environment parameters. After adjusting the imaging environment parameters from the first imaging environment parameters to the second imaging environment parameters, the second image captured by the imaging device under the second imaging environment parameters is obtained, and the second image quality parameters of the second image are obtained through image quality analysis. If no problematic parameters are found in the second image quality parameters, then the imaging task is determined to be complete.

2. The imaging environment parameter optimization method according to claim 1, characterized in that, If at least one problematic parameter in the first image quality parameters is outside the preset standard parameter range, then an optimized second imaging environment parameter is determined based on the problematic parameter, the preset standard parameter range, and the first imaging environment parameter, including: When there are at least two problem parameters, the priority of each problem parameter is determined according to a preset priority determination rule, and the problem parameters are sorted in descending order of priority to obtain a problem parameter sequence. The imaging environment parameters are optimized sequentially based on each of the problem parameters in the problem parameter sequence, the preset standard parameter range, and the first imaging environment parameter to determine the optimized second imaging environment parameter.

3. The imaging environment parameter optimization method according to claim 2, characterized in that, The step of determining the optimized second imaging environment parameters sequentially based on each problem parameter in the problem parameter sequence, the preset standard parameter range, and the first imaging environment parameter includes: The first problem parameter in the problem parameter sequence is taken as the target parameter. The first imaging environment parameter is optimized according to the preset standard parameter range corresponding to the target parameter to obtain the optimized parameter. The next problem parameter of the target parameter is taken as the new target parameter. Based on the preset standard parameter range corresponding to the new target parameter and the optimization parameter obtained from the previous target parameter, the imaging environment parameter is optimized to obtain the new optimized parameter. After all the problem parameters in the problem parameter sequence are used as target parameters for imaging environment parameter optimization, the final optimized parameters are used as the second imaging environment parameters.

4. The imaging environment parameter optimization method according to claim 1, characterized in that, The step of determining the optimized second imaging environment parameters based on the problem parameters, the preset standard parameter range, and the first imaging environment parameters includes: The problem parameters, the preset standard parameter range, and the first imaging environment parameters are input into a pre-trained parameter optimization model, and the optimized second imaging environment parameters are obtained through the parameter optimization model. The parameter optimization model is trained based on the image quality parameters of images captured by the imaging device under different imaging environment parameters and historical environment optimization data.

5. The imaging environment parameter optimization method according to claim 1, characterized in that, Also includes: If at least one problematic parameter exists among the second image quality parameters, the process returns to the step of determining the optimized third imaging environment parameter based on the problematic parameter, the preset standard parameter range, and the second imaging environment parameter, until the preset iteration stop condition is reached.

6. The imaging environment parameter optimization method according to claim 5, characterized in that, The preset iteration stop conditions include: there are no problematic parameters in the image quality parameters of the images captured by the imaging device under the optimized imaging environment parameters, or the number of iterations reaches the preset maximum number.

7. The imaging environment parameter optimization method according to claim 5, characterized in that, Also includes: The second imaging environment parameters, the preset standard parameter range, and the second image quality parameters are used as new training data to perform model optimization processing on the parameter optimization model used for parameter optimization.

8. The imaging environment parameter optimization method according to claim 1, characterized in that, The first imaging environment parameter and the second imaging environment parameter include at least one of the following: ambient illuminance, ambient color temperature, incident angle of light, ambient stray light intensity, light source spectral distribution, illumination uniformity, and scene brightness contrast level; The first image quality parameter and the second image quality parameter include at least one of the following: modulation transfer function parameter, color error parameter, image noise parameter, signal-to-noise ratio parameter, geometric distortion parameter, dynamic range parameter, sharpness parameter, and white balance parameter.

9. An electronic device, characterized in that, include: One or more processors; A memory having stored one or more programs that, when executed by one or more processors, cause the one or more processors to implement the imaging environment parameter optimization method according to any one of claims 1 to 8.

10. A computer-readable medium, characterized in that, It stores a computer program that, when executed by a processor, implements the imaging environment parameter optimization method according to any one of claims 1 to 8.