Methods for adjusting imaging parameters of a camera, camera systems and devices

By acquiring camera images and environmental data, the target scene model is determined and recommended imaging parameters are generated, which solves the problem of unstable imaging parameter adjustment of the camera in complex environments, and achieves stable image quality and reduces debugging costs.

CN122909453BActive Publication Date: 2026-11-17GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611382136.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-11-17
Estimated Expiration
2046-09-08

AI Technical Summary

Technical Problem

Existing cameras are easily affected by interference when adjusting imaging parameters in complex environments, leading to decreased image quality and high debugging costs.

Method used

By acquiring image data and environmental feature data from cameras, scene features are extracted and the target scene model is determined from the historical scene database. Recommended imaging parameters are generated, and temporary compensation imaging parameters are generated during transient illumination interference. Normal adjustment is restored after the recommended imaging parameters are restored.

Benefits of technology

To stabilize imaging quality in complex environments, reduce debugging costs, and minimize the impact of sudden changes in illumination on imaging parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122909453B_ABST
    Figure CN122909453B_ABST
Patent Text Reader

Abstract

This application relates to the field of intelligent vision technology, providing a method, system, and apparatus for adjusting imaging parameters of a camera. The method includes: acquiring image data and environmental feature data collected by the camera, and extracting scene feature data from the image data; determining a target scene model corresponding to the current scene from a historical scene database based on the scene feature data and the environmental feature data, and reading historical scene records matching the target scene model; generating recommended imaging parameters for the current scene based on historical imaging parameter configurations and performance records in the historical scene records; controlling an image signal processor to adjust the imaging parameters of the camera according to the recommended imaging parameters; and using temporary compensation imaging parameters to adjust the imaging for transient lighting interference scenarios. This solution effectively improves imaging quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent vision technology, and in particular relates to a method for adjusting the imaging parameters of a camera, a camera system, and a device. Background Technology

[0002] With the rapid development of intelligent monitoring, vehicle vision systems, smart homes, and industrial vision inspection equipment, cameras have become an important terminal for various information acquisition systems.

[0003] In existing technologies, cameras typically employ algorithms such as automatic exposure, automatic white balance, and automatic gain control to adjust imaging parameters. After the camera acquires an image frame, the aforementioned algorithms calculate imaging parameters based on statistical quantities such as the brightness and chromaticity distribution of the image frame, and apply the calculated imaging parameters to the camera's imaging link, thereby constituting real-time adjustment with the current image frame as input.

[0004] However, the above adjustment method focuses on using the statistics of the current image frame as input, and recalculates the imaging parameters for each adjustment. In installation environments with complex lighting conditions or periodic strong light interference, problems such as exposure fluctuations, increased noise, and overexposure in local areas are likely to occur, resulting in a decrease in image quality and subsequent target recognition accuracy. Furthermore, it requires on-site adjustment of imaging parameters by debugging personnel, which is costly due to manual debugging. Summary of the Invention

[0005] This application provides a method, system, and apparatus for adjusting the imaging parameters of a camera, in order to solve the problem that the existing camera adjustment methods are easily interfered with in complex environments, resulting in decreased image quality and high debugging costs.

[0006] The first aspect of this application provides a method for adjusting the imaging parameters of a camera, including: Acquire image data and environmental feature data captured by the camera, and extract scene feature data from the image data; Based on the scene feature data and the environment feature data, a target scene model corresponding to the current scene is determined from the historical scene database, and historical scene records that match the target scene model are read. Based on the historical imaging parameter configurations and operational performance records in the historical scene records, recommended imaging parameters for the current scene are generated; The image signal processor is controlled to adjust the imaging parameters of the camera according to the recommended imaging parameters; During the operation of the camera according to the recommended imaging parameters, the average brightness, the proportion of the highlight area, and the ambient illuminance collected synchronously with each of the analysis frames are obtained from the image data collected by the camera in multiple consecutive analysis frames. The image-side illumination abrupt change is determined based on the average brightness change and the change in the proportion of the highlight area in adjacent analysis frames, and the ambient-side illumination abrupt change is determined based on the change in the ambient illuminance in adjacent frames. When the sudden change in illumination on the image side exceeds a first change threshold, the sudden change in illumination on the environment side does not exceed a second change threshold, and the duration of the sudden change in illumination on the image side exceeding the first change threshold does not reach a preset duration, transient illumination interference is determined to have occurred. During the duration of the transient illumination interference, the target scene model remains unchanged, and temporary compensation imaging parameters are generated based on the recommended imaging parameters. The image signal processor is then controlled to adjust the imaging parameters of the camera according to the temporary compensation imaging parameters. After the transient illumination interference ends, the image signal processor is controlled according to the recommended imaging parameters.

[0007] Optionally, determining the target scene model corresponding to the current scene from the historical scene database based on the scene feature data and the environmental feature data includes: The scene feature data and the environment feature data are statistically analyzed according to a preset statistical period to obtain the scene description information of the current scene; Calculate the degree of difference between the scene description information and the existing scene models in the historical scene database; When there are existing scene models whose difference does not exceed a preset difference threshold, the existing scene model with the smallest difference is determined as the target scene model; When the difference degree corresponding to each existing scene model exceeds the preset difference threshold, a new scene model is established based on the scene description information, the new scene model is written into the historical scene database, and the new scene model is determined as the target scene model.

[0008] Optionally, the method further includes: The scene description information corresponding to each preset statistical period is associated with and stored with the target scene model; Select the target scene description information located within the sliding time window from the associated stored scene description information; The target scene description information is weighted and statistically analyzed in a manner that the closer to the current time, the greater the weight, and the target scene model is updated based on the weighted statistical results. Based on the updated target scene model, a scene profile of the current scene within its time period is generated, and the scene profile is written into the historical scene database.

[0009] Optionally, generating recommended imaging parameters for the current scene based on historical imaging parameter configurations and operational performance records in the historical scene records includes: Read at least one set of historical imaging parameter configurations associated with the historical scene records, as well as the running effect records corresponding to each set of historical imaging parameter configurations; The at least one set of historical imaging parameter configurations are evaluated based on the recorded operational results to obtain the evaluation results for each set of historical imaging parameter configurations. The historical imaging parameters that meet the preset recommendation conditions are configured as the recommended imaging parameters for the current scene.

[0010] Optionally, acquiring image data and environmental feature data captured by the camera, and extracting scene feature data from the image data, includes: According to a preset frame extraction period, an analysis frame is extracted from the video stream captured by the camera, and the analysis frame is used as the image data. At least four of the following are extracted from the analysis frame: average brightness, brightness standard deviation, highlight area ratio, shadow area ratio, image contrast, color temperature features, number of moving targets, and density of moving targets, to obtain a scene feature vector, and the scene feature vector is used as the scene feature data. While extracting the analysis frame, the ambient temperature, humidity, illuminance and current time information of the environment where the camera is located are collected to obtain an environmental feature vector, and the environmental feature vector is used as the environmental feature data.

[0011] Optionally, the control image signal processor adjusts the imaging parameters of the camera according to the recommended imaging parameters, including: The recommended imaging parameters are sent to the image signal processor. The recommended imaging parameters include at least two of the following: exposure compensation parameters, gain parameters, white balance parameters, high dynamic range enhancement level, noise reduction level, and sharpening level. The image signal processor adjusts at least two of the following parameters of the camera: automatic exposure processing, automatic gain processing, automatic white balance processing, high dynamic range processing, noise reduction processing, and sharpening processing, according to the recommended imaging parameters.

[0012] Optionally, after the image signal processor adjusts the imaging parameters of the camera according to the recommended imaging parameters, it further includes: The image data acquired by the camera is obtained after the imaging parameters are adjusted according to the recommended imaging parameters; The image data after the imaging parameters are adjusted is used to evaluate the image quality and obtain the running effect data; The operational performance data is used to update the operational performance records associated with the recommended imaging parameters in the historical scene database.

[0013] Optionally, after updating the operational performance record associated with the recommended imaging parameters in the historical scene database based on the operational performance data, the method further includes: Based on the updated operational performance records, determine the trend of operational performance changes of the recommended imaging parameters; When the trend of the running effect meets the preset effect improvement conditions, the recommendation priority of the recommended imaging parameters under the target scene model is increased; When the trend of the change in the running effect does not meet the preset effect improvement conditions, the recommendation priority of the recommended imaging parameters under the target scene model is reduced; When the recommended priority is lower than a preset priority threshold, the recommended imaging parameters for the current scene are regenerated, and the regenerated recommended imaging parameters and their performance data are written into the historical scene database.

[0014] Optionally, the regeneration of recommended imaging parameters for the current scene includes: From the historical scene records of the target scene model, select multiple sets of historical imaging parameter configurations and the corresponding running effect records of each set of historical imaging parameter configurations, where the parameter distance from the currently recommended imaging parameters does not exceed a preset neighborhood threshold. Based on the changes in each imaging parameter among the selected sets of historical imaging parameter configurations, and the changes in each image quality index in the corresponding operation effect records, a parameter-effect response relationship is established to characterize the impact of changes in imaging parameters on image quality indicators. Based on the deviation between each image quality index in the current operating effect data and the corresponding preset target quality range, candidate adjustment amounts for each imaging parameter are determined based on the parameter-effect response relationship. The candidate adjustment values ​​are constrained according to the maximum single adjustment value corresponding to each imaging parameter and at least one set of parameter coupling constraints, and the regenerated recommended imaging parameters are obtained based on the constrained candidate adjustment values.

[0015] Optionally, the step of evaluating the image quality of the image data after adjusting the imaging parameters to obtain operational performance data includes: From the image data after the imaging parameters are adjusted, determine the key target region corresponding to the back-end recognition task, as well as the background region other than the key target region; Extract at least two target region quality indicators from the key target region, including highlight saturation ratio, local contrast and edge sharpness, and extract at least one background quality indicator from the background region, including noise level and brightness fluctuation amplitude. Based on the target area quality index, the background quality index, and the recognition results output by the backend recognition task, a task-related quality score is generated according to the evaluation weight corresponding to the target type. The task-related quality score is used as at least a part of the performance data.

[0016] A second aspect of this application provides a camera system, including: The image acquisition module is used to acquire image data captured by the camera; A scene feature extraction module is used to extract scene feature data from the image data; An environmental data acquisition module is used to acquire environmental feature data from the camera. The scene learning module is used to determine the target scene model corresponding to the current scene from the historical scene database based on the scene feature data and the environmental feature data. The parameter decision module is used to read historical scene records that match the target scene model, and generate recommended imaging parameters for the current scene based on the historical imaging parameter configurations and running effect records in the historical scene records. An image signal processing control module is used to control the image signal processor to adjust the imaging parameters of the camera according to the recommended imaging parameters; A transient illumination interference processing module is configured to: acquire the average brightness, highlight area ratio, and ambient illuminance synchronously acquired with each analysis frame of image data collected by the camera during operation of the camera according to the recommended imaging parameters; determine the image-side illumination mutation amount based on the change in average brightness and highlight area ratio of adjacent analysis frames, and determine the ambient-side illumination mutation amount based on the change in ambient illuminance of adjacent frames; determine transient illumination interference when the image-side illumination mutation amount exceeds a first mutation threshold, the ambient-side illumination mutation amount does not exceed a second mutation threshold, and the duration of the image-side illumination mutation amount exceeding the first mutation threshold does not reach a preset duration; maintain the target scene model unchanged during the duration of the transient illumination interference, generate temporary compensation imaging parameters based on the recommended imaging parameters, and control the image signal processor to adjust the imaging parameters of the camera according to the temporary compensation imaging parameters; and resume controlling the image signal processor according to the recommended imaging parameters after the transient illumination interference ends.

[0017] A third aspect of this application provides a camera device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.

[0018] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0019] In this embodiment of the application, the above-described scheme extracts scene feature data from image data collected by the camera and combines it with environmental feature data of the environment in which the camera is located. It then determines the target scene model corresponding to the current scene from the historical scene database, so that the long-term features of the camera installation environment are continuously accumulated and reused in the form of scene models. Furthermore, it uses the historical imaging parameter configuration and operation effect records in the historical scene records that match the target scene model as the basis for decision-making to generate recommended imaging parameters. The image signal processor then adjusts the camera's imaging parameters according to the recommended imaging parameters, so that the determination of imaging parameters no longer depends solely on the statistics of the current image frame. This suppresses imaging parameter fluctuations, improves imaging quality in complex environments, and effectively reduces debugging costs.

[0020] Furthermore, by jointly judging the illumination mutation amount on the image side and the illumination mutation amount on the environment side, transient illumination interference can be identified where a significant illumination mutation occurs on the image side but the environment side does not change significantly at the same time, and the duration of the illumination mutation on the image side does not reach the preset duration. During the duration of transient illumination interference, the target scene model remains unchanged, and temporary compensation imaging parameters are generated based on the recommended imaging parameters for short-term adjustment. After the transient illumination interference ends, the recommended imaging parameters are restored, thereby reducing the impact of short-term illumination mutation on the stability of the target scene model and the continuity of imaging parameter control, reducing the contamination of the scene model and historical operation effect records by transient interference, and suppressing the rapid oscillation of imaging parameters such as exposure and gain. Attached Figure Description

[0021] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiments below. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic diagram of the structure of a camera system according to some embodiments of this application; Figure 2 This is a flowchart of a camera imaging parameter adjustment method according to some embodiments of this application. Figure 1 ; Figure 3 This is a flowchart of a camera imaging parameter adjustment method according to some embodiments of this application. Figure 2 ; Figure 4 This is a flowchart of a method for determining a target scene model according to some embodiments of this application; Figure 5 This is a flowchart of a method for generating recommended imaging parameters according to some embodiments of this application; Figure 6 This is an electronic structure diagram of the camera device provided in the embodiments of this application.

[0022] Figure labeling: 10-Image acquisition module, 20-Scene feature extraction module, 30-Environmental data acquisition module, 40-Scene learning module, 50-Parameter decision module, 60-Image signal processing control module, 70-Data storage module. Detailed Implementation

[0023] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0025] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0026] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0027] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0028] In some camera imaging parameter adjustment technologies, automatic exposure, automatic white balance, and automatic gain control algorithms use the statistics of the currently acquired image frame as the only input. The imaging parameters are recalculated in each adjustment process, without retaining the adjustment results obtained by the camera at the same installation location and time period, as well as the corresponding imaging quality. This results in the imaging parameter adjustment process lacking the ability to accumulate long-term characteristics of the installation environment, and the recurring illumination change patterns at the same installation location cannot be transformed into a priori basis for imaging parameters.

[0029] For example, in a parking lot at night, vehicle headlights enter the camera's field of view frequently. With an adjustment method that uses single-frame statistics as input, the automatic exposure algorithm rapidly reduces exposure when the headlights enter the field of view and rapidly increases exposure after they leave, causing the imaging parameters to oscillate repeatedly within a short period, resulting in decreased image brightness stability. Simultaneously, the license plate area is prone to localized overexposure under headlight illumination, leading to the loss of stroke information for the license plate characters. These problems are particularly pronounced in installation locations where low-light conditions coexist with high-contrast, strong light interference. Furthermore, in installation locations such as warehouse areas where low light conditions are persistent, the automatic gain control algorithm continuously applies high gain to increase image brightness, leading to increased image noise and decreased sharpness of target outlines.

[0030] If the above problems are not solved, the repeated oscillations of imaging parameters and the increase in noise levels will make it difficult to maintain stable image quality at the same installation location, and the success rate of license plate recognition, face recognition and target detection will decrease accordingly. At the same time, in order to obtain acceptable imaging effects for the camera at a specific installation location, the on-site parameters need to be adjusted by the debugging personnel one by one. The manual debugging cost is high, and the camera needs to be readjusted after seasonal changes in the lighting conditions of the installation environment. The adaptability of the camera in the long-term operation is limited.

[0031] For ease of understanding, the following explains some key terms in this embodiment: Image data: refers to images captured by a camera and used for scene feature extraction. It can be a single frame image in the video stream output by the camera, an analysis frame extracted from the video stream according to a preset frame extraction period, or an image sequence composed of several frames.

[0032] Scene feature data refers to data extracted from image data that characterizes the statistical properties of the image and the activity characteristics of targets in the current scene. Examples include average brightness, brightness standard deviation, highlight area ratio, shadow area ratio, image contrast, color temperature characteristics, number of moving targets, and density of moving targets. Optionally, the vector obtained by combining the above features in a preset order can be called the scene feature vector.

[0033] Environmental feature data refers to the state data of the external environment in which the camera is located, such as ambient temperature, humidity, illuminance, and current time information, which are collected by sensors installed inside or outside the camera. Optionally, the vector obtained by combining the above data in a preset order can be called the environmental feature vector.

[0034] Time period: refers to the time interval obtained by dividing the day according to a preset method, such as dividing a day into time intervals of 00:00 to 06:00, 06:00 to 11:00, 11:00 to 15:00, 15:00 to 18:00, and 18:00 to 24:00. The time period to which the current moment belongs is determined by the current moment information in the environmental feature data and participates in the establishment, matching, and updating of the scene model as a component of the scene description information.

[0035] Scene description information: refers to the information obtained by statistically analyzing scene feature data and environmental feature data according to a preset statistical period, which describes the overall state of the current scene within the statistical period. It may include the statistical values ​​of each scene feature component and each environmental feature component within the statistical period, as well as the time period to which the current scene belongs.

[0036] Scene model: A scene model is a model used to characterize the scene in which a camera is located during a certain time period and under certain environmental conditions. It is obtained by statistical analysis of several scene description information, including the center value and value range of each feature component. The scene model is continuously built and updated during the long-term operation of the camera.

[0037] Historical scene database: refers to a database used to store scene models, scene images, historical scene records, and operation effect records. It can be stored in the camera's local non-volatile memory or in a server that communicates with the camera.

[0038] Historical scene records: These refer to records stored in the historical scene database that are associated with a specific scene model. They contain information such as scene feature information, historical imaging parameter configurations, running effect records, and the number of times parameters were used.

[0039] Historical imaging parameter configuration: refers to the set of values ​​of a set of imaging parameters that have been applied to the camera imaging link during historical operation, such as the set of values ​​for exposure compensation parameters, gain parameters, white balance parameters, high dynamic range enhancement level, noise reduction level, and sharpening level.

[0040] Operational performance records: These refer to records stored in historical scene records that are associated with each set of historical imaging parameter configurations and are used to characterize the effects achieved by that set of historical imaging parameter configurations during historical operation. These records may include image quality evaluation results and target recognition success rates. Optionally, the performance data obtained after adjusting the recommended imaging parameters can be called operational performance data. Once written into the operational performance record, this data becomes the basis for subsequent parameter decisions.

[0041] Recommended imaging parameters: These are a set of imaging parameters generated based on historical imaging parameter configurations and operational performance records from historical scene recordings, and are used for the current scene. They are sent to the image signal processor to adjust the camera's imaging parameters.

[0042] Image Signal Processor (ISP): A device or processing unit that processes the raw image signal output from an image sensor. It can perform functions such as automatic exposure processing, automatic gain processing, automatic white balance processing, high dynamic range processing, noise reduction processing, and sharpening processing.

[0043] Difference: This refers to a value used to measure the degree of deviation between scene description information and scene model. The smaller the difference, the closer the scene description information is to the scene model, and the larger the difference, the greater the degree of deviation between the two.

[0044] Sliding time window: refers to a fixed time interval that moves with the current time. Scene description information within this time interval participates in the update of the scene model, while scene description information outside this time interval no longer participates in the update of the scene model.

[0045] Scene profile: refers to a set of information generated based on the updated scene model, which describes the overall characteristics of the scene in which the camera is located during a certain time period and under certain environmental conditions.

[0046] Recommendation priority: refers to the degree to which a certain imaging parameter configuration is selected as a recommended imaging parameter in a certain scene model. The higher the recommendation priority, the more likely that imaging parameter configuration will be selected.

[0047] Image-side illumination abrupt change: This refers to a value determined based on the average brightness change and the change in the proportion of highlight areas between adjacent analysis frames, used to characterize the degree of abrupt change in image brightness or highlight distribution within the camera's field of view. A larger image-side illumination abrupt change indicates a more significant change in brightness and highlight distribution between adjacent analysis frames.

[0048] Ambient illumination abrupt change: This refers to a value determined based on the change in ambient illumination acquired synchronously with adjacent analysis frames, used to characterize the degree of overall illumination change in the environment in which the camera is located. The ambient illumination abrupt change is used in conjunction with the image-side illumination abrupt change to distinguish between local field-of-view interference and overall ambient illumination changes.

[0049] Transient illumination interference refers to a short-term illumination disturbance state determined by the sudden changes in image-side illumination, the sudden changes in ambient-side illumination, and the duration for which the image-side illumination sudden change exceeds a threshold. Transient illumination interference can be identified when the image-side illumination sudden change exceeds a first threshold, the ambient-side illumination sudden change does not exceed a second threshold, and the duration for which the image-side illumination sudden change exceeds the first threshold does not reach a preset duration. This transient illumination interference can be caused by, for example, vehicle headlights sweeping across the scene, specular reflection flash, short-term flash of a flashlight, or localized flickering, but is not limited to a specific source of interference.

[0050] Temporary compensation imaging parameters: These refer to a set of imaging parameters generated and temporarily applied to the image signal processor during the duration of transient illumination interference, based on the currently recommended imaging parameters. "Based on the currently recommended imaging parameters" means that the determination of the temporary compensation imaging parameters uses the currently recommended imaging parameters as a reference or initial parameter. The specific generation method can be determined based on factors such as sudden changes in image illumination, changes in average brightness, and changes in the proportion of highlight areas, or it can be determined based on preset adjustment rules, mapping relationships, or candidate parameter configurations. Optionally, in some implementations, a preset maximum compensation step size can be further set to limit the magnitude of single parameter changes during the temporary compensation process.

[0051] Parameter-effect response relationship: refers to the data relationship established based on multiple sets of historical imaging parameter configurations and their operational effect records under the target scene model, used to characterize the correspondence between the amount of change in imaging parameters and the amount of change in image quality indicators. It can be represented by response coefficients, lookup tables, local linear models or other regression models.

[0052] Task-related quality score: refers to the comprehensive quality score generated by combining the quality indicators of the key target area, the background area, and the recognition results output by the back-end recognition task, and according to the evaluation weight corresponding to the target type. It is used to characterize the degree of adaptation of the current imaging parameters to the specific back-end recognition task.

[0053] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0054] This embodiment provides a camera system for adjusting the imaging parameters of a camera. Specifically, it combines... Figure 1 As shown, the camera system includes an image acquisition module 10, a scene feature extraction module 20, an environmental data acquisition module 30, a scene learning module 40, a parameter decision module 50, and an image signal processing control module 60. The camera system may also include a data storage module 70.

[0055] In some implementations, the camera system also includes a transient illumination interference processing module. The transient illumination interference processing module can be implemented by a software functional unit running on a processor, dedicated logic circuitry, or a combination of both. Figure 1 The transient illumination interference processing module is not shown in the figure to avoid limiting the implementation location of the module due to the structure of the attached figure.

[0056] The output of the image acquisition module 10 is connected to the input of the scene feature extraction module 20 and the image signal processing control module 60, respectively. The output of the scene feature extraction module 20 and the output of the environmental data acquisition module 30 are both connected to the input of the scene learning module 40. The output of the scene learning module 40 is connected to the input of the parameter decision module 50. The output of the parameter decision module 50 is connected to the input of the image signal processing control module 60. The data storage module 70 is bidirectionally connected to the scene learning module 40 and the parameter decision module 50, respectively.

[0057] Optionally, the transient illumination interference processing module can be connected to the image acquisition module 10, the environmental data acquisition module 30, the scene learning module 40, and the image signal processing control module 60, respectively. The transient illumination interference processing module obtains image statistics of consecutive analysis frames from the image acquisition module 10 and ambient illuminance synchronized with each analysis frame from the environmental data acquisition module 30. When transient illumination interference is detected, it outputs control information to the scene learning module 40 to keep the target scene model unchanged during the duration of the interference, and outputs temporary compensation imaging parameters generated based on recommended imaging parameters to the image signal processing control module 60. The control information used to keep the target scene model unchanged can be set according to the specific implementation. For example, in one optional embodiment, it can be a control command to pause updating the target scene model based on the scene description information corresponding to the transient illumination interference.

[0058] The image acquisition module 10 is used to acquire image data captured by the camera, and it may include an image sensor, an image signal preprocessing unit, and an image buffer unit. The image sensor may be a CMOS image sensor or a CCD image sensor. The image signal preprocessing unit is used to convert the format of the raw image signal output by the image sensor, and the image buffer unit is used to buffer the image data to be analyzed.

[0059] The scene feature extraction module 20 is used to extract scene feature data from image data. It can be implemented by a processor running a feature extraction program or by a dedicated logic circuit with image statistical functions. In some implementations, the scene feature extraction module 20 obtains average brightness, brightness standard deviation, highlight area proportion, and shadow area proportion by statistically analyzing the brightness histogram of the image data; obtains color temperature features by statistically analyzing the chromaticity components of the image data; and obtains the number and density of moving targets by performing inter-frame differencing on adjacent image frames or by using a target detection algorithm.

[0060] The environmental data acquisition module 30 is used to acquire environmental characteristic data from the camera. It may include a temperature sensor, a humidity sensor, a light sensor, and a real-time clock module. The temperature and humidity sensors are used to collect the ambient temperature and humidity of the environment where the camera is located, the light sensor is used to collect the ambient illuminance of the environment where the camera is located, and the real-time clock module is used to provide the current time information. Optionally, some of the sensors in the environmental data acquisition module 30 can be replaced by statistical results from image data. For example, when no light sensor is set, an estimated value of ambient illuminance can be obtained from the average brightness of the image data.

[0061] The scene learning module 40 is used to determine the target scene model corresponding to the current scene from a historical scene database based on scene feature data and environmental feature data. Optionally, in some cases, the scene learning module 40 can be used to perform statistical analysis, scene modeling, and model updating of the long-term operating environment of the camera. It can include a scene feature statistics unit, a scene clustering unit, a scene model updating unit, and a scene image generation unit. The scene feature statistics unit is used to statistically analyze scene feature data and environmental feature data according to a preset statistical period; the scene clustering unit is used to classify the current scene into existing scene models based on the degree of difference, and to establish a new scene model when the degree of difference corresponding to each existing scene model exceeds a preset difference threshold; the scene model updating unit is used to perform weighted statistics on scene description information according to a sliding time window, and to update the scene model based on the weighted statistical results; the scene image generation unit is used to generate a scene image based on the updated scene model.

[0062] The parameter decision module 50 is used to generate recommended imaging parameters for the current scene, and it may include a scene matching unit, a parameter recommendation unit, and an effect feedback unit. The scene matching unit is used to read historical scene records that match the target scene model; the parameter recommendation unit is used to generate recommended imaging parameters based on historical imaging parameter configurations and operational effect records in the historical scene records; the effect feedback unit is used to evaluate the image quality of the image data after adjusting the imaging parameters, obtain operational effect data, and update the operational effect records based on the operational effect data.

[0063] The image signal processing control module 60 is used to control the image signal processor to adjust the imaging parameters of the camera according to the recommended imaging parameters. It can send the recommended imaging parameters to the image signal processor through the internal integrated circuit bus, serial peripheral interface or register mapping.

[0064] The transient illumination interference processing module is used to jointly analyze the average brightness, highlight area ratio, and synchronous ambient illuminance of multiple consecutive analysis frames in the image data acquired by the camera while the camera is operating according to the recommended imaging parameters. It determines the image-side illumination mutation amount based on the changes in average brightness and highlight area ratio between adjacent analysis frames, and determines the ambient-side illumination mutation amount based on the changes in adjacent ambient illuminance. Transient illumination interference is determined to have occurred when the image-side illumination mutation amount exceeds a first mutation threshold, the ambient-side illumination mutation amount does not exceed a second mutation threshold, and the duration of the image-side illumination mutation amount exceeding the first mutation threshold does not reach a preset duration. During the transient illumination interference, the target scene model remains unchanged, temporary compensation imaging parameters are generated based on the recommended imaging parameters, and the image signal processor is controlled to adjust the camera's imaging parameters according to the temporary compensation imaging parameters. After the transient illumination interference ends, the image signal processor is controlled according to the recommended imaging parameters.

[0065] The above functions can be implemented by one or more functional units. Optionally, the transient illumination interference processing module may include a mutation calculation unit, an interference determination unit, a model preservation unit, and a temporary compensation unit. The model preservation unit can maintain the target scene model unchanged by pausing specific scene description information to participate in model updates, isolating corresponding interference data, or maintaining the target scene model version before the interference occurred. The temporary compensation unit can directly generate temporary compensation imaging parameters based on recommended imaging parameters and illumination mutation information, or it can further generate temporary compensation imaging parameters according to a preset compensation step size.

[0066] Optionally, after the transient illumination interference ends, the transient illumination interference processing module causes the image signal processing control module 60 to resume controlling the image signal processor according to the recommended imaging parameters and terminates the temporary control state adopted to keep the target scene model unchanged. If model preservation is achieved by pausing the participation of specific scene description information in model updates, normal model updates can be resumed; if interference data isolation or model version preservation is adopted, normal processing of subsequent normal data can be resumed after the interference ends. By isolating the short-term interference control link from the long-term scene learning link, the long-term statistical characteristics of the target scene model can be avoided from being altered by short-term strong light samples.

[0067] The data storage module 70 is used to store a historical scene database, which can be implemented using an embedded multimedia card, non-volatile flash memory, or a server that communicates with the camera. In some implementations, the data storage module 70 stores a scene database, a parameter database, optimization records, and anomaly records. The record structure of the scene database includes scene number, time period, scene characteristics, environmental characteristics, parameter configuration, feedback results, and update time to support incremental learning and historical backtracking of imaging parameters.

[0068] Based on the structure of the aforementioned camera system, a real-time link and a long-term learning link are formed within the camera system. In the real-time link, the image data acquired by the camera is processed by the image signal processor to form an output image. In the long-term learning link, scene feature data and environmental feature data are processed by the scene learning module 40 and the parameter decision module 50 to form recommended imaging parameters, which are then applied to the camera's imaging link by the image signal processing control module 60. Simultaneously, the operational effect data is written back to the data storage module 70, thus forming a closed loop of continuous learning and optimization.

[0069] This application provides a method for adjusting the imaging parameters of a camera. The executing entity can be a processing module connected to each of the aforementioned modules, used to receive scene feature data and environmental feature data, and control an image signal processor to adjust the camera's imaging parameters based on the content of a historical scene database. Optionally, this processing module may include a scene learning module 40 and a parameter decision module 50, or the modules may be divided according to their specific functions and actual needs.

[0070] The processing module may include a microcontroller, an embedded processor, or a processor core in a system-on-a-chip. It is responsible for receiving data from the scene feature extraction module 20 and the environmental data acquisition module 30, determining the target scene model based on the received data and the historical scene database stored in the data storage module 70, generating recommended imaging parameters based on the historical scene records that match the target scene model, and controlling the imaging parameter adjustment process of the image signal processor.

[0071] Based on the above-described camera system structure, the following describes the method for adjusting the imaging parameters of the camera through some embodiments.

[0072] Combination Figure 2 As shown, in some embodiments, the method for adjusting the imaging parameters of the camera includes steps 201-204. Specifically: Step 201: Acquire image data and environmental feature data captured by the camera, and extract scene feature data from the image data.

[0073] Image data can be acquired in various ways. For example, the processing module can extract analysis frames from the video stream output by the camera according to a preset frame extraction period and use these analysis frames as image data; or, the processing module can read the image frame from the image buffer unit as image data after the camera has completed the exposure of one frame. The preset frame extraction period can be set according to the rate of change of light in the installation environment, for example, set to 5 minutes, that is, a set of analysis frames is extracted every 5 minutes for subsequent processing.

[0074] Environmental feature data can also be acquired in various ways. For example, the processing module can periodically read the sampled values ​​from the temperature sensor, humidity sensor, and light sensor, and read the current time information provided by the real-time clock module; or, the processing module can trigger the above-mentioned sensors to perform a sampling while extracting the analysis frame, so that the environmental feature data and image data remain corresponding in time.

[0075] Scene feature data can be extracted by statistically analyzing image data. For example, the processing module can create a luminance histogram for the luminance components of the image data, using the first moment of the luminance histogram as the average luminance, the square root of the second central moment as the luminance standard deviation, and the ratio of the number of pixels with luminance values ​​higher than a preset highlight threshold to the total number of pixels as the highlight area proportion, and the ratio of the number of pixels with luminance values ​​lower than a preset shadow threshold to the total number of pixels as the shadow area proportion. Alternatively, the processing module can divide the image data into blocks and calculate the image contrast based on the range of the average luminance values ​​of each image block.

[0076] Step 202: Based on scene feature data and environmental feature data, determine the target scene model corresponding to the current scene from the historical scene database, and read the historical scene records that match the target scene model.

[0077] In some implementation processes, the processing module statistically analyzes scene feature data and environmental feature data according to a preset statistical period to obtain scene description information for the current scene. This scene description information is then compared with the feature components of existing scene models in the historical scene database to determine the target scene model to which the current scene belongs. Each scene model in the historical scene database can be identified by a scene number, and historical scene records associated with a scene model can be indexed using the scene number.

[0078] The target scene model can be determined by comparing the differences. For example, the processing module can calculate the differences between the scene description information and each existing scene model, and determine the existing scene model with the smallest difference that does not exceed a preset difference threshold as the target scene model; or, when the differences corresponding to each existing scene model exceed the preset difference threshold, the current scene is determined to be a new scene that has not yet been learned, and a new scene model is built based on the scene description information.

[0079] Step 203: Generate recommended imaging parameters for the current scene based on the historical imaging parameter configurations and operational effect records in the historical scene records.

[0080] In some implementation processes, multiple sets of historical imaging parameter configurations are stored together in the same historical scene record, and each set of historical imaging parameter configurations corresponds to a running effect record. The processing module can evaluate each set of historical imaging parameter configurations based on the running effect record, and determine the set of historical imaging parameter configurations whose evaluation results meet the preset recommendation conditions as the recommended imaging parameters; or, when only one set of historical imaging parameter configurations is stored together in the historical scene record, the processing module can directly use that set of historical imaging parameter configurations as the recommended imaging parameters.

[0081] Furthermore, when the target scene model is a newly established scene model and the historical scene records have not yet associated with and stored historical imaging parameter configurations, the processing module can use the preset default imaging parameters as recommended imaging parameters, and update the imaging parameters of this group according to the running effect data during subsequent operation, so that the newly established scene model gradually has reusable imaging parameter configurations.

[0082] Step 204: Control the image signal processor to adjust the camera's imaging parameters according to the recommended imaging parameters.

[0083] Recommended imaging parameters can be issued in several ways. For example, the processing module can write the recommended imaging parameters into the control register of the image signal processor; or, the processing module can send parameter configuration instructions to the image signal processor via the internal integrated circuit bus, and the image signal processor can parse the instructions and adjust the parameters of the corresponding processing steps.

[0084] After receiving the recommended imaging parameters, the image signal processor adjusts at least two of the following parameters: automatic exposure processing, automatic gain processing, automatic white balance processing, high dynamic range processing, noise reduction processing, and sharpening processing. The adjustment results are applied to the camera's imaging link in real time, enabling the camera to output an image according to imaging parameters adapted to the current scene.

[0085] In some implementations, a transient illumination interference processing procedure is also performed while the camera is operating according to recommended imaging parameters. Combined with Figure 3 As shown, the process includes: Step 205: Obtain the average brightness, the proportion of the highlight area, and the ambient illuminance collected synchronously with each analysis frame for multiple consecutive analysis frames. Step 206: Determine the image-side illumination abrupt change based on the average brightness change and the highlight area proportion change of adjacent analysis frames, and determine the ambient-side illumination abrupt change based on the ambient illuminance change of adjacent frames. Step 207: When the image-side illumination mutation exceeds the first mutation threshold, the ambient-side illumination mutation does not exceed the second mutation threshold, and the duration of the image-side illumination mutation exceeding the first mutation threshold does not reach the preset duration, transient illumination interference is determined to have occurred. Step 208: Keep the target scene model unchanged during the duration of transient illumination interference, generate temporary compensation imaging parameters based on the recommended imaging parameters, and control the image signal processor to adjust the camera's imaging parameters according to the temporary compensation imaging parameters. Step 209: After the transient illumination interference ends, resume controlling the image signal processor according to the recommended imaging parameters.

[0086] It should be noted that the above-described transient illumination interference processing is not limited to a specific target scene model preservation mechanism or a specific temporary compensation imaging parameter generation algorithm. Preserving the target scene model means ensuring that the current target scene model itself does not change due to the transient illumination interference during its duration. Generating temporary compensation imaging parameters based on recommended imaging parameters means that the temporary compensation imaging parameters use the currently recommended imaging parameters as a reference or initial parameter.

[0087] In some specific implementations, keeping the target scene model unchanged can be achieved by not triggering model updates for the transient illumination interference data, isolating the data corresponding to the transient illumination interference from the model update data, temporarily storing the data corresponding to the transient illumination interference without using it for the current model update, or maintaining the target scene model version before the interference occurred during the interference's duration. Temporary compensation imaging parameters can be obtained by adjusting at least one of the recommended imaging parameters, or determined based on preset adjustment rules, parameter mapping relationships, lookup tables, or candidate parameter configurations centered on the recommended imaging parameters. All of the above methods are optional implementations and are not limited to these.

[0088] In this process, multiple consecutive analysis frames used for transient lighting interference processing can be acquired at a higher sampling frequency than the long-term scene learning pipeline. For example, the long-term scene learning pipeline can acquire analysis frames at a preset frame extraction period of 1 to 10 minutes, while transient lighting interference processing can statistically analyze each frame in the video stream, or extract one frame as a transient analysis frame every 1 to 10 frames. Thus, long-term scene learning is used to characterize environmental changes on a timescale of minutes or longer, while transient lighting interference processing is used to characterize local lighting abrupt changes on a timescale of milliseconds to seconds, and the two can run in parallel.

[0089] Let the average brightness of the t-th transient analysis frame be L(t), the proportion of the highlight region be H(t), and the ambient illuminance acquired synchronously with this transient analysis frame be E(t). In one implementation, the image-side illumination change amount Jimg(t) can be expressed as a×|L(t)-L(t-1)| / Lref+b×|H(t)-H(t-1)|, and the ambient-side illumination change amount Jenv(t) can be expressed as |E(t)-E(t-1)| / Eref, where a and b are preset weights, and Lref and Eref are the brightness reference value and illuminance reference value used for normalization, respectively. Alternatively, thresholds can be set for the change in average brightness and the change in the proportion of the highlight region, and the image-side illumination change amount can be determined based on the triggering results of the two thresholds.

[0090] The first mutation threshold is used to determine whether a significant mutation occurs on the image side, and the second mutation threshold is used to determine whether the overall ambient illumination changes significantly at the same time. The preset duration is used to distinguish between transient interference and persistent scene changes; it can be set according to the camera's installation location and the typical duration of interference, for example, from 0.5 seconds to 3 seconds. The duration can be accumulated starting from the moment the image-side illumination mutation first exceeds the first mutation threshold. If the duration has not reached the preset duration and the ambient illumination mutation has not exceeded the second mutation threshold, the current mutation is treated as transient illumination interference.

[0091] In one optional implementation, the conditions for determining transient illumination interference can be continuously verified within the judgment window. If, when determining transient illumination interference, the ambient illumination change exceeds a second change threshold, or the duration for which the statistically recorded image illumination change exceeds a first change threshold has reached a preset duration, then the illumination change does not meet the conditions for determining transient illumination interference and can be handled by the normal scene matching, scene model update, and recommended imaging parameter generation process. For cases that meet the aforementioned conditions and are determined to be transient illumination interference, the recommended imaging parameters are restored according to the aforementioned steps after the transient illumination interference ends.

[0092] In one optional implementation, the target scene model can remain unchanged during the duration of transient illumination interference by pausing the use of scene description information corresponding to the transient illumination interference to update the model. For example, the processing module can keep the model identifier, feature component center values, and value ranges of the current target scene model unchanged, and pause the use of the scene description information corresponding to the transient illumination interference for model updates. Alternatively, interference tags can be written to the analysis frames or scene description information generated during the transient illumination interference, preventing data with interference tags from entering the weighted statistical process of the current sliding time window, or temporarily storing the relevant data in an isolated buffer without participating in the current model update. The above methods are only optional implementations to keep the target scene model unchanged, as long as the target scene model does not change due to the interference during its duration. Further optionally, data with interference tags may also not be used to update the long-term performance records of the recommended imaging parameters to maintain the stability of long-term learning samples.

[0093] Temporary compensation imaging parameters are generated based on the recommended imaging parameters P_rec. The specific generation method can be set according to the actual control strategy. For example, the temporary adjustment amount relative to the recommended imaging parameters can be determined based on at least one of the following: sudden changes in image illumination, changes in average brightness, and changes in the proportion of highlight areas, and at least one of the recommended imaging parameters can be adjusted accordingly. Alternatively, temporary compensation imaging parameters can be determined from candidate parameter configurations associated with the recommended imaging parameters based on preset adjustment rules, parameter mapping relationships, or lookup tables. As a further optional implementation, to limit parameter jumps caused by transient compensation, the absolute value of each temporary adjustment amount can be specified to not exceed the corresponding preset maximum compensation step size. For example, when the average brightness and the proportion of highlight areas suddenly increase, the exposure compensation parameter, gain parameter, and / or high dynamic range enhancement level can be reduced within the maximum compensation step size; when the average brightness suddenly decreases and the ambient illuminance does not decrease synchronously, the exposure compensation parameter or gain parameter can be increased within the maximum compensation step size.

[0094] In embodiments employing a preset maximum compensation step size, this preset maximum compensation step size can be set for different imaging parameters. For example, the exposure compensation parameter can be adjusted no more than 0.5 stops per adjustment, the gain parameter no more than 100 preset gain units per adjustment, and the high dynamic range enhancement level no more than 1 level per adjustment. The above values ​​are merely examples and can also be determined based on the parameter quantization method of the image signal processor. The processing module can approximate the temporary compensation target successively according to each transient analysis cycle to avoid causing new brightness jumps due to a one-time large change in imaging parameters.

[0095] Specifically, the temporary compensation imaging parameters are short-term control quantities for transient illumination interference, and their benchmark remains the recommended imaging parameters. When the interference termination condition is met, such as when the illumination abrupt change in the image side falls below the first abrupt change threshold for several consecutive analysis frames, the processing module causes the image signal processor to restore the recommended imaging parameters. The restoration process can be completed in one step; in embodiments employing step-by-step compensation or a preset maximum compensation step size, it can also gradually revert to the recommended imaging parameters according to a preset recovery step size.

[0096] This implementation simultaneously observes changes on both the image and environmental sides. It identifies transient illumination interference when the overall environmental illumination does not undergo a synchronous and significant change, and the duration of the image-side illumination change does not reach a preset duration. During the interference, the target scene model remains unchanged, and temporary compensation imaging parameters are generated based on recommended imaging parameters. This allows the camera to temporarily adjust to short-term illumination changes, and the recommended imaging parameters are restored after the interference ends, thus balancing the stability of the target scene model with short-term imaging adaptability. Further measures, such as pausing specific interference data from participating in model updates and setting a maximum compensation step size, can further reduce the impact of interference data on long-term learning samples and decrease the possibility of parameter jumps caused by short-term compensation.

[0097] The above technical solution will be illustrated with a specific example below.

[0098] Assuming a camera is installed at the entrance / exit of a parking lot, its imaging parameters are adjusted using the method provided in this embodiment. Between 18:00 and 24:00, the processing module extracts a set of analysis frames every 5 minutes and simultaneously collects environmental feature data. After statistical analysis, it obtains the scene description information for the current scene, including an average brightness of 18 Lux, a highlight area ratio of 35%, and 380 moving targets. The processing module compares this scene description information with existing scene models in the historical scene database. It calculates that the difference between the model and the parking lot nighttime scene model is the smallest and does not exceed a preset difference threshold. Therefore, the parking lot nighttime scene model is determined as the target scene model, and the historical scene records associated with this scene model are read. The historical scene record contains three sets of historical imaging parameter configurations and corresponding operational effect records. The processing module evaluates the three sets of historical imaging parameter configurations based on the operational effect records, and determines the set of historical imaging parameter configurations with the highest image quality evaluation result and license plate recognition success rate—namely, an exposure compensation parameter of -1, a gain parameter of 600, a white balance parameter of 4200K, a high dynamic range enhancement level of 5, a noise reduction level of 4, and a sharpening level of 3—as the recommended imaging parameters for the current scene, and sends them to the image signal processor. The image signal processor adjusts the automatic exposure processing, automatic gain processing, automatic white balance processing, high dynamic range processing, noise reduction processing, and sharpening processing according to the recommended imaging parameters, ensuring that the license plate area is no longer overexposed when the vehicle's headlights enter the field of view, and that the image brightness remains stable during this time period.

[0099] Furthermore, in the aforementioned parking lot nighttime scene, when vehicle headlights rapidly sweep in from the edge of the field of view, transient illumination interference processing can read continuous analysis frames at a higher sampling frequency. Assuming the average brightness of two adjacent analysis frames increases from a normalized value of 0.28 to 0.52, the proportion of highlight areas increases from 8% to 34%, while the synchronous ambient illuminance only changes from 18.2 Lux to 18.4 Lux, the image-side illumination mutation amount obtained from the change in average brightness and the change in highlight area proportion can exceed the first mutation threshold, while the ambient-side illumination mutation amount still does not exceed the second mutation threshold. If the duration of this mutation from its first appearance to the present is 0.8 seconds, which does not reach the preset duration of 1.5 seconds, the processing module determines that the current situation is transient illumination interference.

[0100] As a more specific implementation example that simultaneously suspends specific interference data in model updates and presets a maximum compensation step size, during the 0.8-second transient illumination interference, the processing module keeps the parking lot night scene model unchanged and pauses updating the scene model with corresponding analysis frames. Based on the recommended imaging parameters of -1 exposure compensation, 600 gain, and 5 high dynamic range enhancement level, if the preset maximum compensation step sizes are 0.5 stops, 100 gain units, and 1 stop respectively, temporary compensation imaging parameters of -1.5 exposure compensation, 550 gain, and 6 high dynamic range enhancement level can be generated to reduce the high saturation of the license plate area. After the headlights leave the field of view and the illumination abruptly decreases on the image side, the recommended imaging parameters of -1 exposure compensation, 600 gain, and 5 high dynamic range enhancement level are restored.

[0101] This embodiment extracts scene feature data from image data and combines it with environmental feature data to determine the target scene model, allowing the long-term characteristics of the camera installation environment to be continuously accumulated in the form of a scene model. By using historical imaging parameter configurations and operational effect records from historical scene records as the basis for decision-making, recommended imaging parameters are generated, enabling parameter configurations that have achieved good imaging results in the same scene to be directly reused, avoiding parameter oscillations caused by recalculating imaging parameters based on the statistics of the current image frame for each adjustment. By controlling the image signal processor to adjust according to the recommended imaging parameters, the imaging parameters are adapted to the current scene, improving imaging quality and target recognition accuracy in complex lighting environments while reducing the amount of manual debugging work during on-site camera deployment.

[0102] In some implementations, step 201 involves acquiring image data and environmental feature data captured by the camera, and extracting scene feature data from the image data, including: According to a preset frame extraction cycle, analysis frames are extracted from the video stream captured by the camera and used as image data. At least four items are extracted from the analysis frames, including average brightness, brightness standard deviation, highlight area ratio, shadow area ratio, image contrast, color temperature features, number of moving targets, and density of moving targets, to obtain a scene feature vector, which is used as scene feature data. At the same time as extracting analysis frames, the ambient temperature, ambient humidity, ambient illuminance, and current time information of the environment where the camera is located are collected to obtain an environmental feature vector, which is used as environmental feature data.

[0103] The preset frame extraction period refers to the time interval between two consecutive extracted and analyzed frames. The video stream output by the camera typically has a frame rate of 25 or 30 frames per second. If scene features are extracted from each frame, the computational load and power consumption of the processing module will be high. However, the lighting conditions of the installation environment change relatively slowly on a timescale of minutes. Therefore, extracting and analyzing frames according to the preset frame extraction period can reduce the computational load while maintaining the ability to track changes in the installation environment. The preset frame extraction period can be set to, for example, 5 minutes, or it can be adjusted according to the rate of change of lighting in the installation environment. For example, it can be shortened to 1 minute during the sunrise and sunset periods, and extended to 10 minutes under stable lighting conditions at night.

[0104] The extraction of analysis frames can be triggered by a timer, that is, when the timer overflows, the processing module reads an image frame from the image buffer unit as an analysis frame; or, the extraction of analysis frames can be triggered by changes in image statistics, that is, when the processing module detects that the average brightness difference between adjacent image frames exceeds a preset change threshold, it extracts an image frame in advance as an analysis frame so that the scene feature data can reflect the sudden changes in the installation environment in a timely manner.

[0105] A scene feature vector is a vector obtained by combining the scene feature components in a preset order. It can be represented as F={Lavg, Lstd, HR, SR, Contrast, CT, OC, OD}. Here, Lavg represents the average brightness, Lstd represents the brightness standard deviation, HR represents the proportion of highlight areas, SR represents the proportion of shadow areas, Contrast represents the image contrast, CT represents the color temperature feature, OC represents the number of moving targets, and OD represents the density of moving targets.

[0106] During implementation, at least four of the above components can be selected to form the scene feature vector based on the characteristics of the installation environment. For example, in a parking lot scene where vehicles are the main observation target, the average brightness, brightness standard deviation, highlight area ratio, and number of moving targets can be selected to form the scene feature vector.

[0107] An environmental feature vector is a vector obtained by combining various environmental feature components in a preset order, and can be represented as E={T, H, Lux, Time}. Here, T represents ambient temperature, H represents ambient humidity, Lux represents ambient illuminance, and Time represents the current time. Collecting environmental feature data simultaneously with the extraction and analysis frames ensures a one-to-one temporal correspondence between the scene feature vector and the environmental feature vector, avoiding discrepancies in scene description information caused by inconsistencies in their acquisition times.

[0108] The above-described embodiments of this application achieve a balance between computational load and tracking capability by extracting analysis frames according to a preset frame extraction period and using the analysis frames as image data. By combining multiple image statistical features into scene feature vectors and multiple environmental state data into environmental feature vectors, the current scene can be described in a structured form, providing a unified data foundation for the establishment, matching and updating of subsequent scene models, and making scenes at different installation locations and time periods comparable.

[0109] In some implementations, combined Figure 4 As shown, step 202 involves determining the target scene model corresponding to the current scene from the historical scene database based on scene feature data and environmental feature data, including steps 301-304. Specifically: Step 301: Perform statistical analysis on scene feature data and environmental feature data according to a preset statistical period to obtain scene description information for the current scene.

[0110] The preset statistical period refers to the length of time covered by a single statistical analysis of scene feature data and environmental feature data. It is greater than or equal to the preset frame extraction period, such as 30 minutes or 1 hour. Within a preset statistical period, the processing module can obtain multiple sets of scene feature vectors and environmental feature vectors. By calculating the mean, median, or truncated mean of the corresponding components of the multiple sets of vectors, the statistical value of each feature component within the preset statistical period is obtained.

[0111] In addition to the aforementioned statistical values, the scene description information also includes the time period to which the current scene belongs. The processing module determines the time period of the current scene based on the current time information in the environmental feature data. A day can be divided into five time periods: 00:00 to 06:00, 06:00 to 11:00, 11:00 to 15:00, 15:00 to 18:00, and 18:00 to 24:00. The division of each time period can be adjusted according to the lighting variation patterns of the installation environment. By incorporating the time period into the scene description information, different lighting conditions at the same installation location during different time periods can be distinguished as different scenes.

[0112] Step 302: Calculate the difference between the scene description information and the existing scene models in the historical scene database.

[0113] The difference can be calculated in several ways. For example, the processing module can first normalize each feature component in the scene description information and the existing scene model, so that the values ​​of each feature component fall into the same numerical range. Then, the deviations of the normalized components are weighted and summed according to the weight coefficients corresponding to each feature component to obtain the difference. The calculation formula can be expressed as D = w1·|x1 c1| + w2·|x2 c2| + … + wn·|xn cn|, where xi represents the i-th normalized feature component in the scene description information, ci represents the center value of the i-th normalized feature component in the existing scene model, wi represents the weight coefficient corresponding to the i-th feature component, and n represents the number of feature components involved in the calculation. Alternatively, the processing module can treat the feature components of the scene description information and the existing scene model as vectors respectively, and use the Euclidean distance or cosine distance between them as the degree of difference.

[0114] The weight coefficients for each feature component can be set according to its influence on the imaging effect. For example, in installation locations where license plate recognition is the primary backend task, average brightness and the proportion of highlight areas have a significant impact on the imaging effect, so higher weight coefficients can be assigned to them; while ambient temperature and humidity have a smaller impact on the imaging effect, so lower weight coefficients can be assigned to them. Furthermore, the processing module can first filter existing scene models based on the time period to which the current scene belongs, calculating only the difference between the scene description information and the existing scene models corresponding to that time period, thereby reducing the number of comparisons.

[0115] Step 303: When there are existing scene models whose difference does not exceed the preset difference threshold, the existing scene model with the smallest difference is determined as the target scene model.

[0116] A preset difference threshold is used to determine whether the current scene belongs to a learned scene. When there is an existing scene model whose difference does not exceed the preset difference threshold, it means that the current scene is basically consistent with the scene represented by that existing scene model in terms of lighting conditions, target activity characteristics, and environmental state. Therefore, the existing scene model with the smallest difference is determined as the target scene model, and the historical scene records associated with that scene model are read. The preset difference threshold can be a fixed value or can be adjusted according to the number of samples of existing scene models. For example, when the number of scene description information collected by a certain scene model is small, the threshold can be appropriately relaxed to avoid frequently building new scene models due to insufficient samples.

[0117] Step 304: When the difference degree corresponding to each existing scene model exceeds the preset difference threshold, a new scene model is established based on the scene description information, the new scene model is written into the historical scene database, and the new scene model is determined as the target scene model.

[0118] When the difference degree corresponding to each existing scene model exceeds the preset difference threshold, it indicates that the current scene deviates significantly from all the scenes learned in the historical scene database. For example, a new lighting fixture may have been added near the installation location, or the field of view of the camera may have changed. At this time, the processing module uses the statistical values ​​of each feature component in the current scene description information as the feature component center values ​​of the new scene model, assigns a scene number to the new scene model, and writes the scene number, time period, scene features, environmental features, and update time into the historical scene database, so that the newly emerging scene can be included in the subsequent learning and matching process.

[0119] The above-described embodiments of this application statistically analyze scene feature data and environmental feature data according to a preset statistical period, so that the scene description is based on the statistical results over a period of time, avoiding the interference of occasional fluctuations in single-frame images on scene determination; the target scene model is determined by comparing the difference degree with the preset difference threshold, so that the current scene can be accurately classified into the learned scene, and a new scene model can be triggered when the environment changes significantly, thereby continuously expanding the coverage of the historical scene database as the camera operates, providing an accurate scene attribution basis for the reuse of imaging parameters.

[0120] In some implementations, the method for adjusting the imaging parameters of the camera further includes: The scene description information corresponding to each preset statistical period is associated and stored with the target scene model; the target scene description information located within the sliding time window is selected from the associated and stored scene description information; the target scene description information is weighted and statistically analyzed according to the principle that the closer to the current time, the greater the weight, and the target scene model is updated according to the weighted statistical results; the scene profile of the current scene in the time period is generated according to the updated target scene model, and the scene profile is written into the historical scene database.

[0121] The process of associating and storing the scene description information corresponding to each preset statistical period with the target scene model means that after each scene matching is completed, the scene description information obtained in this statistical analysis, along with its corresponding time information, is written into the storage area corresponding to the target scene model in the historical scene database, so that a sequence of scene description information arranged in chronological order is accumulated under the target scene model.

[0122] The length of the sliding time window can be set in days, for example, to the most recent 30 days. This means that only scene description information from the most recent 30 days is selected as the target scene description information for updating the scene model; scene description information outside this time window is no longer included in the update. As the current moment progresses, this time window moves forward synchronously, ensuring that the samples used by the scene model are always recent samples. The length of the sliding time window can also be set according to the rate of change of the installation environment. For example, in outdoor installation locations where lighting conditions vary significantly with the seasons, a shorter number of days can be set to improve the scene model's ability to adapt to environmental changes.

[0123] Weighted statistics, where weights increase with proximity to the current time, mean assigning weights to each target scene description, with these weights decreasing as the interval between them and the current time increases. For example, an exponential decay method can be used to assign weights, where the weight of the k-th target scene description can be represented as λ(N) The formula is k), where λ is a decay coefficient greater than 0 and less than 1, N represents the total number of target scene descriptions within the sliding time window, and k represents the chronological index of the target scene description. Correspondingly, the weighted statistical result of each feature component is the ratio of the sum of the products of the feature component's value and its weight in each target scene description to the sum of all weights. The processing module updates the center value and value range of each feature component in the target scene model using the weighted statistical result.

[0124] Scene profiling can be generated in various forms. For example, the processing module can combine the center values, value ranges, and corresponding time periods of each feature component in the updated target scene model to form a scene profiling; or, based on the above, the processing module can further statistically analyze the frequency of typical events within that time period, such as the frequency of bright car headlights in a parking lot at night, and use the statistical results as part of the scene profiling. The generated scene profiling is written into a historical scene database for subsequent scene matching and parameter decision-making.

[0125] The above-described embodiments of this application, by associating and storing scene description information with the target scene model, enable the update of the scene model to have a traceable sample source; by selecting recent target scene description information through a sliding time window, expired historical samples no longer affect the scene model; by updating the target scene model through a weighted statistical method that gives greater weight to those closer to the current time, the scene model can maintain long-term statistical characteristics while following the gradual changes in the installation environment, such as changes in daylight hours caused by seasonal changes; by generating scene profiles and writing them into the historical scene database, the scene features of the camera at different time periods are solidified in a structured form, improving the accuracy of subsequent scene matching and the applicability of parameter recommendations.

[0126] In some implementations, combined Figure 5 As shown, step 203 generates recommended imaging parameters for the current scene based on historical imaging parameter configurations and operational performance records from historical scene logs, including steps 401-403. Details are as follows: Step 401: Read at least one set of historical imaging parameter configurations associated with the historical scene record, as well as the running effect record corresponding to each set of historical imaging parameter configurations.

[0127] During the long-term operation of the camera, multiple imaging parameter configurations may be used successively under the same scene model, and each imaging parameter configuration generates a corresponding performance record after use. The processing module indexes the corresponding historical scene record through the scene number of the target scene model, and reads each set of historical imaging parameter configurations and their performance records from the historical scene record. Among them, the performance records can store information such as image quality evaluation results, target recognition success rate, and the number of times the parameters were used.

[0128] Step 402: Evaluate at least one set of historical imaging parameter configurations based on the operation effect records to obtain the evaluation results of each set of historical imaging parameter configurations.

[0129] Evaluation can be achieved in several ways. For example, the processing module can normalize the image quality evaluation results, target recognition success rate, and parameter usage frequency in the operation effect record, and then perform weighted calculations according to preset weights to obtain the evaluation score for each group of historical imaging parameter configurations. The calculation formula can be expressed as S = α·Q + β·R + γ·U, where Q represents the normalized image quality evaluation result, R represents the normalized target recognition success rate, U represents the normalized parameter usage frequency, and α, β, and γ represent the corresponding weights, with the sum of the three being 1. Alternatively, the processing module can select the evaluation criteria according to the type of backend task. For example, in installation locations where license plate recognition is the main backend task, the license plate recognition success rate can be used as the evaluation criterion; in installation locations where face recognition is the main backend task, the face recognition success rate can be used as the evaluation criterion.

[0130] Step 403: Configure the historical imaging parameters that meet the preset recommendation conditions based on the evaluation results, and determine them as the recommended imaging parameters for the current scene.

[0131] The preset recommendation criteria are used to select a set of historical imaging parameter configurations for the current scene. For example, the preset recommendation criteria can be set to the highest evaluation score among all historical imaging parameter configurations; or, the preset recommendation criteria can be set to the highest evaluation score among all historical imaging parameter configurations, but not lower than a preset score threshold, to avoid using one of the historical imaging parameter configurations as the recommended imaging parameter when the performance of all historical imaging parameter configurations is poor. When the evaluation scores of all historical imaging parameter configurations are lower than the preset score threshold, the processing module can adjust some imaging parameters based on the historical imaging parameter configuration with the highest evaluation score and use it as the recommended imaging parameter.

[0132] The above-described embodiments of this application, by reading multiple sets of historical imaging parameter configurations and their operational effect records under the same scene model, enable the selection of imaging parameters to be based on the historical operational results under that scene; by evaluating each set of historical imaging parameter configurations and selecting them according to preset recommended conditions, imaging parameter configurations that have achieved good image quality and target recognition effects under that scene are preferentially reused, so that when the camera re-enters the same scene, there is no need to re-search for parameters, shortening the time required for imaging parameters to reach an adapted state and improving the matching degree between imaging parameters and the scene.

[0133] In some implementations, step 204, controlling the image signal processor to adjust the camera's imaging parameters according to recommended imaging parameters, includes: Recommended imaging parameters are sent to the image signal processor. The recommended imaging parameters include at least two of the following: exposure compensation parameters, gain parameters, white balance parameters, high dynamic range enhancement level, noise reduction level, and sharpening level. The image signal processor then adjusts at least two of the following parameters of the camera's automatic exposure processing, automatic gain processing, automatic white balance processing, high dynamic range processing, noise reduction processing, and sharpening processing according to the recommended imaging parameters.

[0134] The exposure compensation parameter adjusts the target brightness of the automatic exposure processing; the gain parameter adjusts the gain applied by the automatic gain processing; the white balance parameter adjusts the color temperature reference of the automatic white balance processing; the high dynamic range enhancement level adjusts the compression intensity of the high dynamic range processing on bright and dark areas; the noise reduction level adjusts the filtering intensity of the noise reduction processing; and the sharpening level adjusts the enhancement intensity of the sharpening processing on edges. These parameters form a set of imaging parameter configurations in the form of a set of values, for example, an exposure compensation parameter of -1, a gain parameter of 600, a white balance parameter of 4200K, a high dynamic range enhancement level of 5, a noise reduction level of 4, and a sharpening level of 3.

[0135] Recommended imaging parameters can be sent in two ways: a one-time sending method, where the processing module writes all recommended imaging parameters into the control register of the image signal processor; or a step-by-step sending method, where the processing module gradually adjusts the current imaging parameters to the recommended imaging parameters over several image frame periods according to a preset step size, to avoid sudden changes in the brightness of the output image caused by abrupt changes in imaging parameters. The step-by-step sending method is suitable for situations where the camera is in continuous recording mode.

[0136] Since noise reduction and sharpening processes are mutually restrictive in terms of the degree to which image details are preserved, and high dynamic range processing and automatic exposure processing are interrelated in terms of the degree to which highlight information is preserved, adjusting the parameters of at least two of these processes simultaneously according to the same set of recommended imaging parameters can maintain coordination between the various processing stages. For example, in low-light nighttime scenes, simultaneously increasing the gain parameter and noise reduction level can improve image brightness while suppressing noise introduced by the gain; in backlit scenes, simultaneously increasing the high dynamic range enhancement level and decreasing the exposure compensation parameter can suppress overexposure in highlight areas while preserving details in shadow areas.

[0137] The above-described embodiments of this application, by sending recommended imaging parameters containing at least two items to an image signal processor, and having the image signal processor adjust the parameters of the corresponding at least two processing items, enable multiple interconnected processing links in the imaging chain to work collaboratively according to the optimal parameter combination under the same scene, thereby avoiding the mutual cancellation of effects caused by independent adjustment of each processing link, and thus improving the imaging quality of the camera in complex lighting environments.

[0138] In some embodiments, after step 204 controls the image signal processor to adjust the camera's imaging parameters according to recommended imaging parameters, the camera's imaging parameter adjustment method further includes: Acquire image data captured by the camera after adjusting the imaging parameters according to the recommended imaging parameters; evaluate the image quality of the image data after adjusting the imaging parameters to obtain the operation effect data; update the operation effect records associated with the recommended imaging parameters in the historical scene database based on the operation effect data.

[0139] The acquisition of image data after the imaging parameters are adjusted can be carried out after a preset delay after the recommended imaging parameters are issued and take effect, so as to avoid starting the evaluation before the imaging parameters have been stably applied to the imaging link. Alternatively, after the recommended imaging parameters have been running for a preset evaluation period, several frames can be extracted from the image data collected within that evaluation period for evaluation, so that the evaluation results can reflect the overall performance of the imaging parameters over a period of time.

[0140] Image quality assessment can be achieved in various ways. For example, the processing module can statistically analyze the fluctuation range of the average brightness of image data across several image frames, using this fluctuation range as a measure of image brightness stability; it can calculate the standard deviation of pixel values ​​in flat areas of the image data, using this standard deviation as a measure of image noise level; and it can statistically analyze the change in the number of pixels with brightness values ​​exceeding a preset highlight threshold before and after adjusting imaging parameters, using this change as a measure of highlight suppression effectiveness. Alternatively, the processing module can call backend recognition algorithms to process the image data, and include license plate recognition success rate, face recognition success rate, and target detection accuracy as components of the performance data.

[0141] In some implementations, image quality assessment of the image data after adjusting imaging parameters can also be performed in conjunction with the back-end recognition task. Specifically, key target regions corresponding to the back-end recognition task, as well as background regions other than the key target regions, can be determined from the image data after adjusting imaging parameters; at least two target region quality indicators, including highlight saturation ratio, local contrast, and edge sharpness, can be extracted from the key target regions, and at least one background quality indicator, including noise level and brightness fluctuation amplitude, can be extracted from the background regions; based on the target region quality indicators, background quality indicators, and the recognition results output by the back-end recognition task, a task-related quality score is generated according to the evaluation weight corresponding to the target type, and the task-related quality score is used as at least a part of the performance data.

[0142] Key target regions can be determined based on the intermediate or output results of the backend recognition task. For example, in license plate recognition, the license plate detection bounding box or the license plate character segmentation region can be used as the key target region; in face recognition, the face detection bounding box can be used as the key target region; in general object detection, the region corresponding to the object detection bounding box or the instance segmentation mask can be used as the key target region. When there are multiple key target regions in a frame, the quality index of each key target region can be calculated separately, and then summarized according to the target confidence, target area, or preset weight.

[0143] The background region can be determined by the area in the current image excluding the key target region. To reduce the impact of target edges on background noise statistics, an exclusion band can be formed by extending the key target region by a preset pixel width, and the area outside the exclusion band can be used as the background region; alternatively, flat image patches with texture intensity lower than a preset texture threshold can be further selected from the background region for calculating the noise level.

[0144] Highlight saturation ratio can be expressed as the ratio of the number of pixels in the key target area whose brightness value reaches or exceeds a preset saturation threshold to the total number of pixels in the key target area; local contrast can be calculated based on the brightness standard deviation, block brightness range, or high and low quantile difference of the key target area; edge sharpness can be calculated based on the average gradient magnitude, Laplacian response energy, or target edge expansion width of the key target area. A lower highlight saturation ratio, and when local contrast and edge sharpness are within a suitable range, it generally indicates that the key target area is more conducive to backend recognition.

[0145] The noise level of the background region can be estimated by the pixel standard deviation, high-frequency residual energy, or temporal differential noise of the flat image patch; the brightness fluctuation amplitude can be determined by the difference between the maximum and minimum values, standard deviation, or statistical measure of the difference between adjacent frames of the average brightness of the background region over several consecutive frames. The background noise level and brightness fluctuation amplitude can serve as constraints on the overall image stability, avoiding a significant increase in background noise or image flicker caused by optimizing only the target region.

[0146] The recognition results output by the backend recognition task can include whether the recognition was successful, recognition confidence, character recognition completeness, target detection confidence, or the recognition success rate statistically calculated within a preset evaluation period. The processing module can normalize the above recognition results and image quality indicators to a unified score range of 0 to 1, and convert the highlight saturation ratio, noise level, and brightness fluctuation amplitude into inverse scores where larger values ​​indicate better quality.

[0147] In one implementation, the task-related quality score can be expressed as: Score = w1×S_h + w2×S_c + w3×S_e + w4×S_n + w5×S_b + w6×S_r, where S_h is the highlight quality score obtained by converting the highlight saturation ratio, S_c is the local contrast score, S_e is the edge sharpness score, S_n is the background noise score, S_b is the background brightness stability score, S_r is the recognition result score, and w1 to w6 are the evaluation weights corresponding to the target type. In actual calculation, at least two of S_h, S_c, and S_e can be selected, and at least one of S_n and S_b can be selected for calculation.

[0148] Evaluation weights can be pre-configured and stored according to the target type. For example, for license plate recognition tasks, the weights corresponding to highlight quality scores, edge sharpness scores, and recognition result scores can be increased to reduce character overexposure caused by strong headlights; for face recognition tasks, the weights corresponding to local contrast, background noise, and recognition result scores can be increased to balance facial details and low-light noise. Thus, the same set of imaging parameters can yield different task-related quality scores under different backend tasks.

[0149] The task-related quality score, along with the target area quality index, background quality index, and recognition result used to generate the score, can be written into the performance record. Subsequent evaluations of historical imaging parameter configurations, assessments of performance trends, and establishment of parameter-performance response relationships can directly utilize the task-related quality score, or one or more of the original quality indices, ensuring that the optimization direction of the recommended imaging parameters remains consistent with the specific backend recognition task.

[0150] The update of the performance record can be done by overwriting, that is, replacing the original performance record of the imaging parameter configuration with the performance data obtained this time; or by using the cumulative statistics method, that is, writing the current performance data and the original performance record after weighted averaging, and incrementing the number of times the parameters of the imaging parameter configuration of the group are used, so that the performance record can reflect the average performance of the imaging parameter configuration of the group in multiple uses.

[0151] The above-described embodiments of this application obtain operational effect data by performing image quality assessment on the image data after adjusting the imaging parameters, and update the operational effect records in the historical scene database with the operational effect data. This allows the actual effect of the current imaging parameter adjustment to be fed back to the historical scene database, thereby continuously correcting the operational effect records in the historical scene records as the camera operates. The evaluation results used for subsequent parameter decisions in the same scene are more accurate, and the imaging parameter adjustment process of the camera thus forms a closed loop of continuous learning and optimization.

[0152] In some implementations, after updating the recommended imaging parameter-related operational performance records in the historical scene database based on operational performance data, the camera's imaging parameter adjustment method further includes: Based on the updated performance records, determine the performance trend of the recommended imaging parameters. When the performance trend meets the preset performance improvement conditions, increase the recommendation priority of the recommended imaging parameters in the target scene model. When the performance trend does not meet the preset performance improvement conditions, decrease the recommendation priority of the recommended imaging parameters in the target scene model. When the recommendation priority is lower than the preset priority threshold, regenerate the recommended imaging parameters for the current scene and write the regenerated recommended imaging parameters and their performance data into the historical scene database.

[0153] The determination of the trend of operational performance can be achieved in several ways. For example, the processing module can read the operational performance data corresponding to the most recent use of the recommended imaging parameters from the updated operational performance record, calculate the difference between two adjacent operational performance data, and determine the trend of operational performance based on the sign and magnitude of the difference; or, the processing module can perform linear fitting on the most recent operational performance data and use the slope of the fitted line to characterize the trend of operational performance.

[0154] Preset performance enhancement conditions are used to determine whether the performance is improving. For example, a preset performance enhancement condition can be set to ensure that the current performance data is not lower than the previous performance data; or, a preset performance enhancement condition can be set to ensure that the slope of the fitted line is greater than or equal to zero, in order to avoid frequent adjustments to the recommendation priority caused by occasional fluctuations in performance data.

[0155] The recommendation priority can be adjusted in a step-by-step manner. That is, when the trend of performance improvement meets the preset improvement conditions, the recommendation priority is increased by a preset step size; when the preset improvement conditions are not met, the recommendation priority is decreased by a preset step size. When the processing module has multiple imaging parameter configurations under the same scene model, it sorts the imaging parameter configurations in descending order of recommendation priority and selects the one with the highest recommendation priority as the recommended imaging parameter.

[0156] When the recommended priority is lower than a preset priority threshold, it indicates that the recommended imaging parameters are no longer applicable to the current scene, for example, due to continuous changes in the lighting conditions of the installation environment. In this case, the processing module regenerates recommended imaging parameters for the current scene. These parameters can be selected from a set of historical imaging parameters with the second-highest recommended priority under the scene model, or they can be obtained by adjusting exposure compensation parameters, gain parameters, or high dynamic range enhancement levels according to a preset adjustment step size based on the original recommended imaging parameters. The regenerated recommended imaging parameters and their performance data are written to the historical scene database and used as a new set of imaging parameter configurations under the scene model for subsequent evaluation and selection.

[0157] In some implementations, regenerating recommended imaging parameters for the current scene specifically includes: From the historical scene records of the target scene model, select multiple sets of historical imaging parameter configurations whose parameter distance from the current recommended imaging parameters does not exceed a preset neighborhood threshold, along with the corresponding operational effect records for each set of historical imaging parameter configurations. Based on the changes in each imaging parameter among the selected sets of historical imaging parameter configurations, and the changes in each image quality index in the corresponding operational effect records, establish a parameter-effect response relationship to characterize the impact of imaging parameter changes on image quality indicators. Based on the deviation between each image quality index in the current operational effect data and the corresponding preset target quality interval, determine the candidate adjustment amount for each imaging parameter based on the parameter-effect response relationship. Constrain the candidate adjustment amounts according to the single maximum adjustment amount corresponding to each imaging parameter and at least one set of parameter coupling constraints, and obtain the regenerated recommended imaging parameters based on the constrained candidate adjustment amounts.

[0158] Parameter distance measures the proximity of two imaging parameter configurations in the parameter space. First, exposure compensation parameters, gain parameters, white balance parameters, high dynamic range enhancement level, noise reduction level, and sharpening level are normalized according to the allowable value range of each imaging parameter. Then, the weighted Euclidean distance, Manhattan distance, or other distance between the currently recommended imaging parameters and historical imaging parameter configurations is calculated. A preset neighborhood threshold is used to limit the historical samples participating in the establishment of response relationships, ensuring that the selected samples are located near the currently recommended imaging parameters, thereby improving the applicability of the local response relationship to the current parameter state.

[0159] For example, a set of imaging parameters can be represented as a parameter vector P=[p1,p2,…,pm], and the image quality indices in the performance record can be represented as a quality vector Q=[q1,q2,…,qn]. For any two sets of historical records in the neighborhood, the parameter change ΔP and the corresponding quality index change ΔQ can be obtained. The processing module can perform least-squares fitting on multiple sets of ΔP and ΔQ to obtain a local response matrix J, such that ΔQ≈J×ΔP; alternatively, it can statistically analyze the average change of each image quality index when a certain imaging parameter changes by one unit, forming a parameter-performance response relationship in the form of a lookup table.

[0160] Preset target quality ranges can be set individually for each image quality metric. For example, a target range can be set for highlight saturation ratio not exceeding a preset upper limit, for edge sharpness not lower than a preset lower limit, for noise level not exceeding a preset upper limit, and for task-related quality scores not lower than preset target scores. When an image quality metric in the current performance data is within its corresponding target quality range, the deviation of that metric can be recorded as zero; when it exceeds the target quality range, the difference between it and the nearest target boundary is used as the deviation of that metric.

[0161] The processing module determines candidate adjustment amounts for each imaging parameter based on the direction and magnitude of the deviation of each image quality index, combined with the parameter-effect response relationship. These adjustments can cause the quality index to change towards the target quality range. For example, when the highlight saturation ratio is higher than the target upper limit and the local response relationship indicates that reducing the exposure compensation parameter, reducing the gain parameter, or increasing the high dynamic range enhancement level can reduce the highlight saturation ratio, candidate adjustment amounts can be generated along the corresponding direction. When the noise level is higher than the target upper limit and the edge sharpness is still higher than the target lower limit, the noise reduction level can be increased and the gain parameter can be appropriately reduced.

[0162] The maximum adjustment amount for each imaging parameter in a single operation is used to limit the magnitude of parameter changes during a single regeneration process. This is a constraint parameter in this parameter-effect response relationship implementation and can be set independently. If the system sets a preset maximum compensation step size in certain transient illumination compensation implementations, the values ​​of the two can be the same or different. Parameter coupling constraints are used to limit the combined relationships between multiple mutually influential imaging parameters. For example, the simultaneous large increase of exposure compensation parameters and gain parameters can be limited to avoid excessive overall exposure; the synchronous increase of sharpening levels can be limited when increasing noise reduction levels to prevent noise from being amplified again by sharpening; and the upward adjustment of exposure compensation parameters can be limited when increasing high dynamic range enhancement levels to maintain highlight information.

[0163] In one implementation, the processing module first obtains the candidate adjustment vector ΔP_cand based on the parameter-effect response relationship. Then, it truncates each component according to the corresponding maximum single adjustment amount and projects the truncated adjustment vector onto the feasible region that satisfies the parameter coupling constraints to obtain the constrained adjustment vector ΔP_con. The regenerated recommended imaging parameters can be expressed as P_new = P_cur + ΔP_con, where P_cur is the current recommended imaging parameter.

[0164] When the number of historical imaging parameter configurations within the preset neighborhood threshold is insufficient to establish a stable parameter-effect response relationship, the processing module can expand the neighborhood threshold to the preset upper limit, or revert to using the recommended historical imaging parameter configuration with the second highest priority and the preset adjustment step size to regenerate recommended imaging parameters. As the number of samples in the historical scene database increases, the parameter-effect response relationship can be re-established or updated.

[0165] By establishing a local parameter-effect response relationship near the current recommended imaging parameters using historical imaging parameter configurations and operational performance records, and by back-calculating candidate adjustment amounts based on the deviation of the current quality index from the target quality range, aimless parameter probing can be reduced. Furthermore, by limiting parameter changes through single maximum adjustment amounts and parameter coupling constraints, the regenerated recommended imaging parameters maintain adjustment stability while having a clear optimization direction.

[0166] The above-described embodiments of this application determine the trend of the recommended imaging parameters' performance based on the updated performance records, and accordingly increase or decrease the recommendation priority of the recommended imaging parameters in the target scene model. This ensures that imaging parameter configurations with consistently good performance are reused first, while imaging parameter configurations with continuously declining performance are gradually removed from the selection range. By regenerating recommended imaging parameters and writing them into the historical scene database when the recommendation priority is lower than a preset priority threshold, the camera can autonomously obtain new imaging parameter configurations when the installation environment changes continuously, without the need for manual readjustment, further improving the camera's environmental adaptability during long-term operation.

[0167] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0168] In the above embodiments of this application, the various embodiments and implementation methods can be combined with each other, and there is no obstacle to their combination due to the separate description of the embodiments and implementation methods. The implementation processes of the various embodiments and implementation methods can be referred to each other, and features can be integrated to form an overall solution that includes the technical features of the various embodiments or implementation methods.

[0169] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0170] Based on the same inventive concept, the camera system provided in the foregoing embodiments of this application can implement the various processes of the above-described camera imaging parameter adjustment method embodiments and achieve the same technical effect. Therefore, the specific limitations of one or more camera system embodiments provided below can be found in the above-described limitations of the camera imaging parameter adjustment method. To avoid repetition, they will not be repeated here.

[0171] In one embodiment, such as Figure 6 As shown, a camera device is provided. The camera device 5 of this embodiment includes: at least one processor 500 (… Figure 6(Only one is shown in the diagram), memory 501, and computer program 502 stored in said memory 501 and executable on said at least one processor 500, wherein said processor 500 executes said computer program 502 to implement the steps in any of the above method embodiments.

[0172] The camera device 5 may include, but is not limited to, a processor 500 and a memory 501. Those skilled in the art will understand that... Figure 6 This is merely an example of camera device 5 and does not constitute a limitation on camera device 5. It may include more or fewer components than shown, or combine certain components, or different components. For example, the camera device 5 may also include input / output devices, network access devices, buses, etc.

[0173] The processor 500 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0174] The memory 501 can be an internal storage unit of the camera device 5, such as a hard drive or memory of the camera device 5. The memory 501 can also be an external storage device of the camera device 5, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the camera device 5. Furthermore, the memory 501 can include both internal and external storage units of the camera device 5. The memory 501 is used to store the computer program and other programs and data required by the camera device 5. The memory 501 can also be used to temporarily store data that has been output or will be output.

[0175] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0176] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0177] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0178] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0179] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0180] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0181] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to requirements; for example, the computer-readable storage medium may not include electrical carrier signals and telecommunication signals.

[0182] The methods described in this application can be implemented in whole or in part by a computer program product. When the computer program product is run on a processor, the processor implements the steps in the various method embodiments described above.

[0183] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for adjusting imaging parameters of a camera, characterized in that, include: Acquire image data and environmental feature data captured by the camera, and extract scene feature data from the image data; Based on the scene feature data and the environment feature data, a target scene model corresponding to the current scene is determined from the historical scene database, and historical scene records that match the target scene model are read. Based on the historical imaging parameter configurations and operational performance records in the historical scene records, recommended imaging parameters for the current scene are generated; The image signal processor is controlled to adjust the imaging parameters of the camera according to the recommended imaging parameters; During the operation of the camera according to the recommended imaging parameters, the average brightness, the proportion of the highlight area, and the ambient illuminance collected synchronously with each of the analysis frames are obtained from the image data collected by the camera in multiple consecutive analysis frames. The image-side illumination abrupt change is determined based on the average brightness change and the change in the proportion of the highlight area in adjacent analysis frames, and the ambient-side illumination abrupt change is determined based on the change in the ambient illuminance in adjacent frames. When the sudden change in illumination on the image side exceeds a first change threshold, the sudden change in illumination on the environment side does not exceed a second change threshold, and the duration of the sudden change in illumination on the image side exceeding the first change threshold does not reach a preset duration, transient illumination interference is determined to have occurred. During the duration of the transient illumination interference, the target scene model remains unchanged, and temporary compensation imaging parameters are generated based on the recommended imaging parameters. The image signal processor is then controlled to adjust the imaging parameters of the camera according to the temporary compensation imaging parameters. After the transient illumination interference ends, the image signal processor is controlled according to the recommended imaging parameters.

2. The imaging parameter adjustment method according to claim 1, characterized in that, The step of determining the target scene model corresponding to the current scene from the historical scene database based on the scene feature data and the environmental feature data includes: The scene feature data and the environment feature data are statistically analyzed according to a preset statistical period to obtain the scene description information of the current scene; Calculate the degree of difference between the scene description information and the existing scene models in the historical scene database; When there are existing scene models whose difference does not exceed a preset difference threshold, the existing scene model with the smallest difference is determined as the target scene model; When the difference degree corresponding to each existing scene model exceeds the preset difference threshold, a new scene model is established based on the scene description information, the new scene model is written into the historical scene database, and the new scene model is determined as the target scene model.

3. The imaging parameter adjustment method according to claim 2, characterized in that, Also includes: The scene description information corresponding to each preset statistical period is associated with and stored with the target scene model; Select the target scene description information located within the sliding time window from the associated stored scene description information; The target scene description information is weighted and statistically analyzed in a manner that the closer to the current time, the greater the weight, and the target scene model is updated based on the weighted statistical results. Based on the updated target scene model, a scene profile of the current scene within its time period is generated, and the scene profile is written into the historical scene database.

4. The imaging parameter adjustment method according to claim 1, characterized in that, The step of generating recommended imaging parameters for the current scene based on historical imaging parameter configurations and operational performance records in the historical scene records includes: Read at least one set of historical imaging parameter configurations associated with the historical scene records, as well as the running effect records corresponding to each set of historical imaging parameter configurations; The at least one set of historical imaging parameter configurations are evaluated based on the recorded operational results to obtain the evaluation results for each set of historical imaging parameter configurations. The historical imaging parameters that meet the preset recommendation conditions are configured as the recommended imaging parameters for the current scene.

5. The imaging parameter adjustment method according to claim 1, characterized in that, The process of acquiring image data and environmental feature data captured by the camera, and extracting scene feature data from the image data, includes: According to a preset frame extraction period, an analysis frame is extracted from the video stream captured by the camera, and the analysis frame is used as the image data. At least four of the following are extracted from the analysis frame: average brightness, brightness standard deviation, highlight area ratio, shadow area ratio, image contrast, color temperature features, number of moving targets, and density of moving targets, to obtain a scene feature vector, and the scene feature vector is used as the scene feature data. While extracting the analysis frame, the ambient temperature, humidity, illuminance and current time information of the environment where the camera is located are collected to obtain an environmental feature vector, and the environmental feature vector is used as the environmental feature data.

6. The imaging parameter adjustment method according to claim 1, characterized in that, The control image signal processor adjusts the imaging parameters of the camera according to the recommended imaging parameters, including: The recommended imaging parameters are sent to the image signal processor. The recommended imaging parameters include at least two of the following: exposure compensation parameters, gain parameters, white balance parameters, high dynamic range enhancement level, noise reduction level, and sharpening level. The image signal processor adjusts at least two of the following parameters of the camera: automatic exposure processing, automatic gain processing, automatic white balance processing, high dynamic range processing, noise reduction processing, and sharpening processing, according to the recommended imaging parameters.

7. The imaging parameter adjustment method according to claim 1, characterized in that, After the image signal processor adjusts the imaging parameters of the camera according to the recommended imaging parameters, it further includes: The image data acquired by the camera is obtained after the imaging parameters are adjusted according to the recommended imaging parameters; The image data after the imaging parameters are adjusted is used to evaluate the image quality and obtain the running effect data; The operational performance data is used to update the operational performance records associated with the recommended imaging parameters in the historical scene database.

8. The imaging parameter adjustment method according to claim 7, characterized in that, After updating the operational performance record associated with the recommended imaging parameters in the historical scene database based on the operational performance data, the method further includes: Based on the updated operational performance records, determine the trend of operational performance changes of the recommended imaging parameters; When the trend of the running effect meets the preset effect improvement conditions, the recommendation priority of the recommended imaging parameters under the target scene model is increased; When the trend of the change in the running effect does not meet the preset effect improvement conditions, the recommendation priority of the recommended imaging parameters under the target scene model is reduced; When the recommended priority is lower than a preset priority threshold, the recommended imaging parameters for the current scene are regenerated, and the regenerated recommended imaging parameters and their performance data are written into the historical scene database.

9. A camera system, characterized in that, include: The image acquisition module is used to acquire image data captured by the camera; A scene feature extraction module is used to extract scene feature data from the image data; An environmental data acquisition module is used to acquire environmental feature data from the camera; The scene learning module is used to determine the target scene model corresponding to the current scene from the historical scene database based on the scene feature data and the environmental feature data. The parameter decision module is used to read historical scene records that match the target scene model, and generate recommended imaging parameters for the current scene based on the historical imaging parameter configurations and running effect records in the historical scene records. An image signal processing control module is used to control the image signal processor to adjust the imaging parameters of the camera according to the recommended imaging parameters; A transient illumination interference processing module is used to acquire, during the operation of the camera according to the recommended imaging parameters, the average brightness, the proportion of highlight areas, and the ambient illuminance synchronously acquired with each analysis frame in the image data acquired by the camera; determine the image-side illumination mutation amount based on the change in average brightness and the change in the proportion of highlight areas of adjacent analysis frames, and determine the ambient-side illumination mutation amount based on the change in adjacent ambient illuminance; determine that transient illumination interference has occurred when the image-side illumination mutation amount exceeds a first mutation threshold, the ambient-side illumination mutation amount does not exceed a second mutation threshold, and the duration of the image-side illumination mutation amount exceeding the first mutation threshold does not reach a preset duration. During the duration of the transient illumination interference, the target scene model remains unchanged, and temporary compensation imaging parameters are generated based on the recommended imaging parameters. The image signal processor is then controlled to adjust the imaging parameters of the camera according to the temporary compensation imaging parameters. After the transient illumination interference ends, the image signal processor is controlled according to the recommended imaging parameters.

10. A camera device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the imaging parameter adjustment method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Multi-camera intelligent self-adaptive shooting method and system of embedded device

    CN122554718A

  • Dual-spectrum camera system based on a single sensor and image processing method

    US20210044763A1