Camera equipment, cloud system and camera equipment illumination compensation and optimization method based on backlight scene
By obtaining the image and expected brightness values in the backlight scene in the imaging device, dynamically adjusting the exposure compensation value, and combining multi-frame image fusion and adaptive ambient light compensation strategies, the image effect of the imaging device in the backlight environment is optimized, solving the problem of image clarity and exposure imbalance in the backlight environment.
Patent Information
- Application Number
- CN202510457734.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-06-13
AI Technical Summary
Existing cameras are difficult to clearly capture subject images in backlight environments, and there are problems of uneven exposure and missing image details.
The camera device obtains the target area image and expected brightness value in the backlight scene, calculates the exposure compensation value, and dynamically adjusts the camera device parameters, combining multi-frame image fusion and adaptive ambient light compensation strategy to optimize the image effect.
The image clarity, brightness balance and color restoration of the camera equipment in the backlight environment are improved, and the problems of exposure imbalance and lack of image details are solved.
Smart Images

Figure CN120151659A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical fields of image processing and computer vision, and particularly to a camera device, a cloud system, and a method for compensating and optimizing the illumination of a camera device based on a backlight scene. Background Art
[0002] With the rapid development of camera technology, cameras have been widely used in various scenarios, such as smartphone photography, security monitoring systems, vehicle assisted driving, drone shooting, etc. However, under complex lighting conditions, especially in backlight scenes, traditional cameras often have difficulty obtaining clear and balanced images. In a backlight environment, since the subject is located behind the light source and the light shines from behind the object being photographed, it causes the loss of dark details or complete blurring of the subject in the image, while the background appears glaring due to overexposure; this problem seriously affects the quality and detail performance of the image.
[0003] Existing methods usually adopt automatic exposure (AE) or fixed exposure compensation strategies to deal with the backlight scenes of cameras, but these methods have limitations in dealing with complex lighting environments. For example, the automatic exposure system often cannot adapt to rapidly changing light in real time, resulting in exposure delay or insufficiency. In addition, simple exposure compensation usually only adjusts the overall picture, which is likely to cause overexposure of the background or overexposure of the subject, and ultimately fails to obtain satisfactory image effects.
[0004] To solve the above problems, techniques such as high dynamic range imaging (HDR) and multi-frame image fusion are introduced to process the camera images. However, these techniques still face challenges in practical applications, such as dynamic blur easily generated during the multi-frame image processing, and the unstable performance of the high dynamic range imaging HDR technique in dynamic scenes. Existing technologies also lack precise perception of the light source position and local illumination compensation for specific regions, and cannot flexibly cope with the complex changes in the backlight environment. Summary of the Invention
[0005] The present application provides a camera device, a cloud system, and a method for compensating and optimizing the illumination of a camera device based on a backlight scene, which are used to solve the technical problems that existing cameras are difficult to clearly capture the subject image under complex lighting conditions, especially in a backlight environment, and there are problems of uneven exposure and missing image details.
[0006] To achieve the above object, the present application provides the following technical solutions:
[0007] On the one hand, a method for compensating and optimizing the illumination of a camera device based on a backlight scene is provided, including the following steps:
[0008] Obtain the scene image of the target area and the desired brightness value in the backlight scene through a camera device, process the scene image to obtain the current brightness value of the target area;
[0009] Calculate the exposure compensation value according to the current brightness value and the desired brightness value; adjust the parameters of the camera device according to the exposure compensation value using an adjustment rule to obtain a locally exposure-compensated camera device, denoted as the first camera device;
[0010] Obtain the historical illumination data that fuses multiple models and the images captured by the camera device, process the historical illumination data using the fused multiple models to obtain an illumination prediction value; dynamically adjust the parameters of the first camera device according to the illumination prediction value as the exposure compensation value using an adjustment rule to obtain a dynamically exposure-compensated second camera device;
[0011] Obtain multiple frames of images of a moving target in the target area with different exposure values through the second camera device; perform image fusion processing on all the multiple frames of images to obtain a synthesized image;
[0012] Obtain an adaptive ambient light compensation strategy, and use the adaptive ambient light compensation strategy to adjust the exposure value of the second camera device to process the synthesized image to obtain an optimized image.
[0013] Preferably, processing the scene image to obtain the current brightness value of the target area includes:
[0014] Obtain the three pixel values of RGB for each pixel point from the scene image, and calculate the brightness value corresponding to the pixel point according to the three pixel values of each pixel point;
[0015] Calculate the current brightness value of the target area according to all the brightness values.
[0016] Preferably, the parameters include the gain, shutter speed, and aperture size of the camera device, and the adjustment rule includes:
[0017] Obtain the current parameters of the camera device, where the current parameters include the current gain, current shutter speed, and current aperture size;
[0018] Calculate the adjustment parameters according to the current parameters and the exposure compensation value;
[0019] Adjust the parameters of the camera device according to the adjustment parameters to obtain the first camera device with local exposure compensation.
[0020] Preferably, the fusion multi - model at least includes a binary classification model, a random forest model, and a light prediction model established by a long - short - term memory network. Processing the historical light data with the fusion multi - model to obtain a light prediction value includes:
[0021] Training the historical light data with the binary classification model, the random forest model, and the light prediction model respectively, and outputting their respective light prediction values;
[0022] Calculating all the light prediction values to obtain a light prediction value.
[0023] Preferably, performing image fusion processing on all the multi - frame images to obtain a synthesized image includes:
[0024] Determining a moving target in all the multi - frame images, and performing registration processing on all the multi - frame images according to the moving target to obtain processed images that are correspondingly aligned;
[0025] Using high - dynamic - range imaging technology to fuse and synthesize all the processed images to obtain a synthesized image.
[0026] Preferably, the adaptive ambient light compensation strategy includes a reverse exposure evaluation model. The reverse exposure evaluation model is used to output a main light source corresponding to the scene image according to the scene image, and adjust the exposure value of the second imaging device according to the intensity of the main light source.
[0027] Preferably, before using the adaptive ambient light compensation strategy to adjust the exposure value of the second imaging device to process the synthesized image, the method includes: performing contrast enhancement and color adjustment processing on the synthesized image.
[0028] Preferably, before adjusting the parameters of the imaging device using an adjustment rule, the method includes: obtaining the scene type of the target area, determining the priority of the parameters according to the scene type, and adjusting the parameters according to the priority.
[0029] Preferably, during the process of obtaining multi - frame images of a moving target in the target area with different exposure values by the second imaging device, the method includes: performing super - resolution enhancement processing on the multi - frame images obtained by the imaging device.
[0030] On the other hand, an imaging device is provided, including a device housing and a control board built in the device housing. A control system is provided on the control board, and the control system operates according to the above - mentioned method for compensating and optimizing the light of an imaging device based on a backlight scene.
[0031] Preferably, the control system includes a processor module, and an optical acquisition module, a communication module, a power supply module, an energy storage module, and a heat dissipation module connected to the processor module. The processor module operates according to the above-mentioned method for compensating and optimizing the illumination of a camera device based on a backlight scenario.
[0032] In another aspect, a cloud system of a camera device is provided, which includes a user terminal, a camera device, an edge processing device, a cloud analysis server, and a data repository connected in sequence. The cloud analysis server is also connected to the user terminal;
[0033] The user terminal is configured to send a first request instruction for obtaining a real-time monitoring video to the camera device, a second request instruction for obtaining historical video data to the cloud analysis server, and a third request instruction for sending historical illumination data to the edge processing device;
[0034] The camera device is configured to send a video stream to the edge processing device according to the first request instruction;
[0035] The edge processing device is configured to screen and process the images of the video stream to obtain a monitoring image of the processed scene and upload the monitoring image to the cloud analysis server;
[0036] The cloud analysis server is configured to store the monitoring image in the data repository and send the monitoring image to the user terminal, and obtain the historical video data from the storage database according to the second request instruction and send the historical video data to the user terminal;
[0037] Wherein, the user terminal is further configured to send the historical illumination data in the historical video data to the edge processing device according to the third request instruction; the cloud analysis server is configured to process the historical illumination data according to the above-mentioned method for compensating and optimizing the illumination of a camera device based on a backlight scenario to obtain adjustment parameters for adjusting the camera device, and send the adjustment parameters to the camera device through the edge processing device. The camera device is further configured to update the parameters of the camera device according to the adjustment parameters.
[0038] In another aspect, a device for compensating and optimizing the illumination of a camera device based on a backlight scenario is provided, which includes a brightness acquisition unit, a first parameter adjustment unit, a second parameter adjustment unit, an image synthesis unit, and an image optimization unit;
[0039] The brightness acquisition unit is configured to obtain a scene image and an expected brightness value of a target area in a backlight scenario through a camera device, process the scene image, and obtain the current brightness value of the target area;
[0040] The first parameter adjustment unit is configured to calculate an exposure compensation value based on the current brightness value and the desired brightness value; adjust the parameters of the imaging device according to the exposure compensation value using an adjustment rule to obtain a locally exposure-compensated imaging device, denoted as the first imaging device;
[0041] The second parameter adjustment unit is configured to obtain historical illumination data of the fused multi-model and the images captured by the imaging device, process the historical illumination data using the fused multi-model to obtain an illumination prediction value; dynamically adjust the parameters of the first imaging device according to the illumination prediction value as the exposure compensation value using an adjustment rule to obtain a second imaging device with dynamic exposure compensation;
[0042] The image synthesis unit is configured to obtain multiple frames of images of a moving target in the target area with different exposure values through the second imaging device; perform image fusion processing on all the multiple frames of images to obtain a synthesized image;
[0043] The image optimization unit is configured to obtain an adaptive ambient light compensation strategy, and adjust the exposure value of the second imaging device using the adaptive ambient light compensation strategy to process the synthesized image to obtain an optimized image.
[0044] On the other hand, a terminal device is provided, including a processor and a memory;
[0045] The memory is configured to store program code and transmit the program code to the processor;
[0046] The processor is configured to execute the above-mentioned method for illumination compensation and optimization of an imaging device based on a backlight scenario according to the instructions in the program code.
[0047] The camera device, cloud system, and method for compensating and optimizing the illumination of a camera device based on a backlight scenario. The method for compensating and optimizing the illumination of a camera device based on a backlight scenario includes obtaining a scene image and an expected brightness value of a target area in a backlight scenario through the camera device, processing the scene image to obtain the current brightness value of the target area; calculating an exposure compensation value based on the current brightness value and the expected brightness value; adjusting the parameters of the camera device according to the exposure compensation value using an adjustment rule to obtain a camera device with local exposure compensation, denoted as the first camera device; obtaining historical illumination data that fuses multiple models and the images captured by the camera device, and processing the historical illumination data using the fused multiple models to obtain an illumination prediction value; dynamically adjusting the parameters of the first camera device according to the illumination prediction value as the exposure compensation value using the adjustment rule to obtain a second camera device with dynamic exposure compensation; obtaining multiple frames of images of a moving target in the target area with different exposure values through the second camera device; performing image fusion processing on all the multiple frames of images to obtain a synthesized image; obtaining an adaptive ambient light compensation strategy, and adjusting the exposure value of the second camera device using the adaptive ambient light compensation strategy to process the synthesized image to obtain an optimized image.
[0048] As can be seen from the above technical solutions, the present application has the following advantages: The method for compensating and optimizing the illumination of a camera device based on a backlight scenario optimizes the illumination processing effect of the camera device in a backlight scenario through local exposure compensation, dynamic exposure adjustment, multi-frame image fusion, etc., improving the clarity, brightness balance, and color restoration degree of the images captured by the camera device, and solving the technical problems that existing cameras are difficult to clearly capture the main body image and there are problems of uneven exposure and missing image details under complex illumination conditions, especially in a backlight environment.
[0049] The method for compensating and optimizing the illumination of a camera device based on a backlight scenario by the camera device through the control system can reduce the overall power consumption of a large-scale static monitoring scenario.
[0050] The cloud system of the camera device realizes remote control of the camera device through the user terminal, camera device, edge processing device, cloud analysis server, and data storage repository to ensure the image quality of the camera device under dynamic monitoring conditions.
[0051] The device for compensating and optimizing the illumination of a camera device based on a backlight scenario performs local exposure compensation, dynamic exposure adjustment, multi-frame image fusion, etc. on the camera device through a brightness acquisition unit, a first parameter adjustment unit, a second parameter adjustment unit, an image synthesis unit, and an image optimization unit, optimizing the illumination processing effect of the camera device in a backlight scenario and improving the clarity, brightness balance, and color restoration degree of the images captured by the camera device. Brief Description of the Drawings
[0052] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0053] Figure 1 It is a flowchart of the steps of the method for light compensation and optimization of a camera device based on a backlight scenario according to the embodiments of the present application;
[0054] Figure 2 It is a flowchart of the method for light compensation and optimization of a camera device based on a backlight scenario according to the embodiments of the present application;
[0055] Figure 3 It is a schematic diagram of the framework of the camera device according to the embodiments of the present application;
[0056] Figure 4 It is a schematic diagram of the framework of the cloud system of the camera device according to the embodiments of the present application;
[0057] Figure 5 It is a schematic diagram of the framework of the device for light compensation and optimization of a camera device based on a backlight scenario according to the embodiments of the present application;
[0058] Figure 6 It is a schematic diagram of the terminal device according to the embodiments of the present application. Detailed implementation manners
[0059] To make the objectives, features, and advantages of the present application more obvious and understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the embodiments described below are only some embodiments of the present application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.
[0060] In the description of the embodiments of the present application, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, "a plurality" means two or more, unless otherwise specifically defined.
[0061] In the embodiments of the present application, unless otherwise clearly specified and defined, terms such as "installation", "connection", "linkage", "fixation" shall be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral one; it may be a mechanical connection or an electrical connection; it may be a direct connection or an indirect connection through an intermediate medium, and it may be the communication inside two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.
[0062] Explanation of patent terms of the present application:
[0063] A backlight scene refers to a situation where, in the picture captured by a camera, the main light source is located behind the subject being photographed, resulting in the subject being in a relatively dark state while the background is overexposed due to strong light. A backlight scene usually makes the subject blurry or unclear, affecting the quality of the image.
[0064] Light compensation is an image processing technology used to automatically adjust the exposure settings of a camera during shooting, so that when the lighting conditions are not ideal (such as backlight or low light), the subject remains clearly visible and the overall brightness of the picture is balanced.
[0065] An optimization algorithm is a series of calculation rules in the field of image processing used to improve the imaging effect of a camera under complex lighting conditions. Through the optimization algorithm, the brightness, contrast, and color restoration of the image can be effectively improved, and noise and halos can be reduced.
[0066] Intelligent scene detection is a function based on computer vision technology that can automatically identify information such as lighting conditions, light source direction, and subject position in the shooting scene, and adjust the shooting parameters of the camera according to this data. Intelligent scene detection is a prerequisite for light compensation optimization.
[0067] Local exposure compensation refers to the situation where, in a backlight scene, the camera only adjusts the exposure of some areas in the picture (usually the subject being photographed), while the exposure of other areas remains unchanged. This local exposure compensation technology can avoid overexposure or underexposure of the overall image and highlight the details of the subject.
[0068] Dynamic exposure adjustment means that in an environment where the light changes rapidly, the camera can automatically adjust its exposure settings according to the real-time light change to ensure the clarity and stability of the image. Dynamic exposure adjustment usually relies on light sensors and calculation algorithms to predict light changes and make adjustments.
[0069] Multi-frame image fusion is an image processing technology that captures multiple frames of images with different exposure degrees in a short time, synthesizes them, and generates an image with a higher dynamic range. This multi-frame image fusion technology helps to maintain the clarity of the subject and enhance the details of the image in a backlight scene.
[0070] High Dynamic Range (HDR) is an imaging technology that captures image information of both bright and dark areas simultaneously, and through synthetic processing, generates an image that has details in both high - light areas and can present details in dark areas. This High Dynamic Range (HDR) technology is particularly effective in back - light scenarios and can improve the overall quality of the image.
[0071] Real - time light source localization means that the camera system can automatically detect and determine the position and direction of the main light source in the scene. By accurately identifying the orientation of the light source, the camera can intelligently adjust the exposure and compensation strategies, thereby improving the image performance in back - light scenarios.
[0072] The adaptive compensation strategy is a technology that automatically adjusts the camera parameters according to the changes in scene illumination. The camera determines the current shooting environment (such as indoor, outdoor, strong light or low light) through environmental recognition algorithms, and dynamically adjusts the light compensation settings to meet the requirements of different scenarios.
[0073] Visual perception optimization is an image adjustment technology based on the perception characteristics of the human eye for brightness, contrast, and color, aiming to enhance the comfort and clarity when the human eye views images. This visual perception optimization technology ensures that in back - light environments, the illumination difference between the subject and the background is not too large, providing a natural visual effect.
[0074] The light mixing technology is a technology that combines natural light and artificial fill light. Especially in back - light environments with insufficient light, the camera can automatically adjust the fill - light device and fuse the two light sources through algorithms to ensure that the overall illumination of the picture is uniform and natural.
[0075] The brightness histogram is a graphical tool used to visually present the distribution of pixel brightness in a photo. In the brightness histogram, the abscissa (brightness axis): represents the brightness range in the photo from the darkest (left end, pure black) to the brightest (right end, pure white); this axis is usually linear, indicating a uniform increase in brightness levels. The ordinate (pixel count axis): represents the number of pixels at the corresponding brightness level. The higher the height on the ordinate, the more pixels there are in that brightness range.
[0076] The embodiments of this application provide a camera device, a cloud system, and a method for compensating and optimizing the illumination of a camera device based on back - light scenarios, which solve the technical problems that existing cameras are difficult to clearly capture the main body image in complex illumination conditions, especially in back - light environments, and there are problems such as uneven exposure and missing image details. The camera device, the cloud system, and the method for compensating and optimizing the illumination of a camera device based on back - light scenarios combine technologies such as machine learning, image processing, and scene recognition to improve the shooting effect of the camera device and ensure the imaging quality and stability in complex illumination conditions.
[0077] Embodiment 1:
[0078] Figure 1 It is a flowchart of the steps of the method for light compensation and optimization of a camera device based on a backlight scene according to the embodiment of the present application. Figure 2 It is a flowchart of the method for light compensation and optimization of a camera device based on a backlight scene according to the embodiment of the present application.
[0079] As Figure 1 and Figure 2 shown, the embodiment of the present application provides a method for light compensation and optimization of a camera device based on a backlight scene, including the following steps:
[0080] S1. Obtain the scene image and the desired brightness value of the target area in the backlight scene through the camera device, process the scene image, and obtain the current brightness value of the target area.
[0081] It should be noted that in step S1, the scene image and the desired brightness value are obtained first, and then the obtained scene image is processed to obtain the current brightness value, providing data for subsequent steps. In this embodiment, the method for light compensation and optimization of the camera device based on the backlight scene can obtain the light source data through multiple sensors in the target area, analyze the ratio of natural light and artificial light according to the intensity and direction of the light source data, and achieve more accurate backlight scene recognition. Backlight scene recognition can distinguish the influence of different light sources in the scene, effectively avoiding misidentifying whether the target area is in a backlight scene. Among them, the camera device can be a camera.
[0082] In the embodiment of the present application, the content of identifying the scene type according to the light source data includes: data acquisition: using the camera device and the ambient light sensor to collect images containing light source data such as light intensity, color temperature, and light source direction in the target area in real time; image processing: identifying the light source intensity and position in the image through image processing algorithms (such as brightness histogram analysis); intelligent algorithm: using machine learning or deep learning algorithms (such as convolutional neural network) to analyze the light source data and identify the current scene type of the target area.
[0083] It should be noted that in the brightness histogram, the light source usually forms one or more peaks in the high-brightness area. By detecting the peaks in the brightness histogram, the intensity of the light source can be identified. Among them, algorithms (such as local maximum detection) are used to find the peak positions in the brightness histogram. Intensity calculation: The height of the peak can represent the intensity of the light source. Higher peaks usually correspond to stronger light sources. To identify the light source position, first in the original image, the image is divided into foreground and background using a threshold segmentation method (such as the Otsu method); then, connected component analysis is performed on the segmented image to identify the specific position of the light source. A contour detection algorithm (such as Canny edge detection) can be used to extract the boundary of the light source. The foreground part usually contains the light source area.
[0084] S2. Calculate the exposure compensation value based on the current brightness value and the desired brightness value; adjust the parameters of the imaging device according to the exposure compensation value using the adjustment rule to obtain the imaging device after local exposure compensation, denoted as the first imaging device.
[0085] It should be noted that in step S2, firstly, the exposure compensation value is calculated based on the current brightness value obtained in step S1 and the acquired desired brightness value; secondly, the parameters of the imaging device are adjusted according to the exposure compensation value using the adjustment rule to obtain the first imaging device after local exposure compensation. In this embodiment, the method for compensating and optimizing the illumination of the imaging device based on the backlight scene adjusts the parameters of the imaging device by using the adjustment rule through the exposure compensation value, ensuring that the main body of the image captured by the imaging device is clearly visible without affecting the naturalness of the surrounding environment. Among them, the desired brightness value can be set according to requirements and is not specifically limited in this embodiment.
[0086] In the embodiment of the present application, the difference between the desired brightness value and the current brightness value is used as the exposure compensation value.
[0087] In the embodiment of the present application, the parameters include the gain, shutter speed, and aperture size of the imaging device, and the adjustment rule includes:
[0088] Obtain the current parameters of the imaging device, where the current parameters include the current gain, current shutter speed, and current aperture size;
[0089] Calculate the adjustment parameters based on the current parameters and the exposure compensation value;
[0090] Adjust the parameters of the imaging device according to the adjustment parameters to obtain the first imaging device after local exposure compensation.
[0091] It should be noted that the content of calculating the adjustment parameters includes: calculating the adjusted gain by using the first formula according to the current gain and the exposure compensation value; calculating the adjusted shutter speed by using the second formula according to the current shutter speed and the exposure compensation value; calculating the adjusted aperture size by using the third formula according to the current aperture size and the exposure compensation value. Among them, the first formula is Inew = Icurrent × 2Ecomp, the second formula is Snew = Scurrent × 2EcompS, and the third formula is Anew = Acurrent × 2Ecomp. In the formula, Inew is the adjusted gain, Ecomp is the exposure compensation value, Icurrent is the current gain, Snew is the adjusted shutter speed, Scurrent is the current shutter speed, Anew is the adjusted aperture size, and Acurrent is the current aperture size. If the exposure compensation value is positive, it means increasing the exposure; if the exposure compensation value is negative, it means reducing the exposure. In this embodiment, the light compensation and optimization method for the camera device based on the backlight scene adjusts the parameters of the camera device according to the adjustment parameters to obtain the first camera device with the modified parameters. Dynamically adjust the shutter speed of the camera device according to the adjusted shutter speed to increase or decrease the amount of light entering the camera device. When necessary, adjust the aperture size of the camera device according to the adjusted aperture size to control the amount of light entering the camera device.
[0092] S3. Obtain the historical light data of the fused multi-model and the image captured by the camera device, process the historical light data by using the fused multi-model to obtain the light prediction value; use the light prediction value as the exposure compensation value and dynamically adjust the parameters of the first camera device according to the adjustment rule to obtain the second camera device after dynamic exposure compensation.
[0093] It should be noted that in step S3, first obtain the historical light data of the camera device, obtain the light prediction value of the moving target captured through the fused multi-model, and then use the light prediction value as the exposure compensation value and dynamically adjust the parameters of the first camera device according to the adjustment rule, so that the camera device can automatically optimize the exposure compensation decision for a specific scene and reduce manual intervention. The light compensation and optimization method for the camera device based on the backlight scene realizes real-time adjustment of the parameters of the camera device by using the light prediction value as the exposure compensation value and dynamically adjusting the parameters of the first camera device according to the adjustment rule, ensuring that the image quality captured by the camera device is always stable in a dynamic scene; also uses the light prediction value as the exposure compensation value and dynamically adjusts the parameters of the first camera device according to the adjustment rule to enable the camera device to realize continuous adjustment of the exposure compensation value of the camera device by real-time monitoring of the brightness change of the target area to adapt to the rapidly changing light conditions.
[0094] In the embodiment of the present application, the method for compensating and optimizing the illumination of a camera device based on a backlight scene dynamically adjusts the parameters of the first camera device by using the illumination prediction value as the exposure compensation value and adopting an adjustment rule, so that the camera device maintains continuous exposure adjustment for a moving target, ensuring that the image of the moving target captured under backlight conditions is always clear. The method for compensating and optimizing the illumination of a camera device based on a backlight scene is applicable to monitoring dynamic subjects in a video by a camera device, and the dynamic subjects such as pedestrians and vehicles.
[0095] S4. Obtain multiple frames of images of the moving target in the target area with different exposure values through the second camera device; perform image fusion processing on all the multiple frames of images to obtain a synthesized image.
[0096] It should be noted that in step S4, multiple frames of images are obtained by the camera device quickly acquiring multiple images of the moving target with different exposure values (such as exposure values under normal exposure, overexposure, and underexposure) in a short time under backlight conditions. Then, the multiple frames of images are aligned to eliminate motion blur; the HDR synthesis algorithm is applied to fuse all the aligned images to generate a high-dynamic-range image as the synthesized image, so that the dark details and bright information of the synthesized image can be clearly presented. In this embodiment, the exposure value of normal exposure can be theoretically: within the parameter ranges of shutter speed 1 / 125s - 1 / 60s, aperture value F2.8 - F4.0, and gain value 400 - 800, it belongs to normal exposure; the exposure value of overexposure can be theoretically: within the parameter ranges of shutter speed 1 / 60s - 1 / 30s, aperture value F2.0 - F2.8, and gain value 800 - 1600, it belongs to overexposure; the exposure value of underexposure can be theoretically: within the parameter ranges of shutter speed 1 / 250s - 1 / 125s, aperture value F4.0 - F5.6, and gain value 200 - 400, it belongs to underexposure.
[0097] S5. Obtain an adaptive ambient light compensation strategy, and use the adaptive ambient light compensation strategy to adjust the exposure value of the second camera device to process the synthesized image and obtain an optimized image.
[0098] It should be noted that in step S5, the adaptive ambient light compensation strategy is used to perform more detailed processing on the synthesized image to optimize the image quality and obtain an optimized image.
[0099] In the embodiments of the present application, the method for light compensation and optimization of a camera device based on a backlight scene adjusts the parameters of the camera device by using an adjustment rule for the exposure compensation value, significantly improving the clarity and visibility of the monitored images captured by the camera device under backlight conditions and ensuring that the moving targets to be monitored are not affected by light. The method for light compensation and optimization of a camera device based on a backlight scene dynamically adjusts the parameters of the camera device by using the light prediction value as the exposure compensation value and adopting an adjustment rule, enabling the camera device to adapt to complex and rapidly changing environments, providing stable image quality, and enhancing the dynamic scene processing ability of the camera device. The method for light compensation and optimization of a camera device based on a backlight scene enables the images captured by the camera device in a backlight environment to retain the details of the dark and bright parts through the multi-frame image fusion in step S4, making the monitored video captured by the camera device more comprehensive and richer in information.
[0100] It should be noted that the method for light compensation and optimization of a camera device based on a backlight scene optimizes the light processing effect of the camera device in a backlight scene through processes such as local exposure compensation, dynamic exposure adjustment, and multi-frame image fusion, improving the clarity, brightness balance, and color restoration degree of the images captured by the camera device. The camera device has an adaptive adjustment ability through the method for light compensation and optimization of a camera device based on a backlight scene, can automatically select a compensation strategy according to environmental changes, reduce manual intervention, and improve the automation level of the camera device.
[0101] A method for light compensation and optimization of a camera device based on a backlight scene provided by the present application includes obtaining a scene image and an expected brightness value of a target area in a backlight scene through the camera device, processing the scene image to obtain the current brightness value of the target area; calculating an exposure compensation value based on the current brightness value and the expected brightness value; adjusting the parameters of the camera device according to the exposure compensation value using an adjustment rule to obtain a camera device with local exposure compensation, denoted as the first camera device; obtaining historical light data that fuses multiple models and images captured by the camera device, and processing the historical light data using the fused multiple models to obtain a light prediction value; dynamically adjusting the parameters of the first camera device according to the light prediction value as the exposure compensation value using an adjustment rule to obtain a second camera device with dynamic exposure compensation; obtaining multiple frames of images of a moving target in the target area with different exposure values through the second camera device; performing image fusion processing on all the multiple frames of images to obtain a composite image; obtaining an adaptive ambient light compensation strategy, and adjusting the exposure value of the second camera device using the adaptive ambient light compensation strategy to process the composite image to obtain an optimized image. This method for light compensation and optimization of a camera device based on a backlight scene optimizes the light processing effect of the camera device in a backlight scene through local exposure compensation, dynamic exposure adjustment, multi-frame image fusion, etc., improves the clarity, brightness balance and color restoration degree of the images captured by the camera device, and solves the technical problems that existing cameras are difficult to clearly capture the main body image in complex lighting conditions, especially in backlight environments, and there are problems of uneven exposure and missing image details.
[0102] In an embodiment of the present application, processing the scene image to obtain the current brightness value of the target area includes:
[0103] Obtaining the three pixel values of RGB of each pixel point from the scene image, and calculating based on the three pixel values of each pixel point to obtain the brightness value of the corresponding pixel point;
[0104] Calculating based on all the brightness values to obtain the current brightness value of the target area.
[0105] It should be noted that the brightness value of the corresponding pixel point is calculated using the brightness formula based on the three pixel values of each pixel point. The brightness formula is L = 0.299×R + 0.587×G + 0.114×B, where L is the brightness value, and R, G, and B are the R pixel value, G pixel value, and B pixel value of the pixel point respectively. The current brightness value of the target area is calculated by calculating the average value of all the brightness values.
[0106] In an embodiment of the present application, the fused multiple models at least include a binary classification model, a random forest model, and a light prediction model established by a long short-term memory network. Processing the historical light data using the fused multiple models to obtain a light prediction value includes:
[0107] Train the historical light data using a binary classification model, a random forest model, and a light prediction model respectively, and output their respective light prediction values;
[0108] Calculate all the light prediction values to obtain a light prediction estimate.
[0109] It should be noted that the light prediction estimate is obtained by averaging all the light prediction values. In this embodiment, the binary classification model is established using a support vector machine (SVM). The light prediction model is established using a long short-term memory network (LSTM). The light prediction model can predict rapidly changing light conditions, such as thunderstorm weather and changes in building shading, to ensure that the imaging device is always in an appropriate exposure setting. The light prediction model trains the historical light data to capture long-term dependencies in the time series and generate preliminary light prediction values. Other machine learning models, such as the binary classification model and the random forest model, are trained based on the same input features (such as historical light data, environmental conditions, etc.) to generate their respective light prediction values. The multi-model fusion outputs multiple light prediction values according to multiple models, and then the mean value of all the light prediction values is obtained to get a stable and accurate light prediction estimate, providing a more reliable basis for dynamically adjusting the parameters of the imaging device.
[0110] In an embodiment of the present application, image fusion processing is performed on all multiple frames of images to obtain a synthesized image, including:
[0111] Determine a moving target in all the multiple frames of images, and perform registration processing on all the multiple frames of images according to the moving target to obtain corresponding aligned processed images;
[0112] Use high dynamic range imaging technology to fuse and synthesize all the processed images to obtain a synthesized image.
[0113] It should be noted that registration processing is performed on all the multiple frames of images according to the moving target to ensure the precise alignment of the moving target. During the acquisition of multiple frames of images, ensure the precise spatial alignment of images under different exposure conditions to eliminate blurring caused by the movement of the moving target; then use high dynamic range imaging technology (such as HDR synthesis algorithm) to fuse and synthesize all the processed images to obtain a synthesized image to retain image details to the greatest extent.
[0114] In an embodiment of the present application, performing registration processing on all the multiple frames of images according to the moving target to obtain corresponding aligned processed images includes:
[0115] Feature point detection: Use a feature detection algorithm (such as SIFT, SURF, ORB, etc.) to identify the key feature points of the moving target in all the multiple frames of images;
[0116] Feature matching: Feature points in different images are matched through matching algorithms (such as brute-force matching, FLANN, etc.) to find corresponding feature point pairs;
[0117] Transformation model selection: Select an appropriate transformation model (such as affine transformation, perspective transformation, etc.) according to the relationship between images to describe the geometric relationship between pairwise images;
[0118] Transformation parameter estimation: Use the least squares method or the RANSAC algorithm to calculate the transformation parameters of the transformation model based on the feature point pairs and the transformation model;
[0119] Image transformation: Transform all multi-frame images according to the calculated transformation parameters to align them with the moving target, and obtain the aligned processed images.
[0120] It should be noted that the least squares method is a mathematical tool widely used in many disciplines of data processing such as error estimation, uncertainty, system identification, prediction, and forecasting. The least squares method (also known as the method of least squares) is a mathematical optimization technique that finds the best function match for data by minimizing the sum of the squares of the errors. Using the least squares method, unknown data can be easily obtained, and the sum of the squares of the errors between the obtained data and the actual data is minimized. The RANSAC (Random Sample Consensus) algorithm is a robust fitting algorithm used to estimate the parameters of a mathematical model in data containing a large number of outliers. The core idea of the RANSAC algorithm is to find the optimal inlier set through random sampling and iterative verification, thereby excluding the interference of outliers. The transformation parameters include 6 parameters of affine transformation or 8 parameters of perspective transformation.
[0121] In an embodiment of the present application, the adaptive ambient light compensation strategy includes a reverse exposure evaluation model, and the reverse exposure evaluation model is used to output the main light source corresponding to the scene image according to the scene image and adjust the exposure value of the second imaging device according to the intensity of the main light source.
[0122] It should be noted that the method for light compensation and optimization of a camera device based on a backlight scene analyzes the direction and intensity of each light source through a reverse exposure evaluation model, selects the main light source as the reference for exposure compensation, ensures that the moving targets in the monitoring image of the camera device are optimized and compensated, and thus obtains an optimized image. In this embodiment, the content of constructing the reverse exposure evaluation model includes: obtaining images under different light source conditions and recording the direction and intensity of each light source; extracting light source features from the images, where the light source features include brightness, color temperature, and position; constructing a training model using a machine learning model (such as SVM, random forest) based on the light source features, and the training model is used to analyze the direction and intensity of each light source; training the model to identify the main light source and evaluate its impact on the image. The main light source obtained by the reverse exposure evaluation model of the method for light compensation and optimization of a camera device based on a backlight scene is the light source that has the greatest impact on the monitoring image of the camera device, and the main light source can be used as a reference for exposure compensation. The method for light compensation and optimization of a camera device based on a backlight scene adjusts the exposure settings of the camera device according to the intensity of the main light source output by the reverse exposure evaluation model, ensuring that the moving targets in the monitoring image of the camera device are optimized and compensated.
[0123] In an embodiment of the present application, the method for light compensation and optimization of a camera device based on a backlight scene further includes: an event-driven dynamic compensation mode. The event-driven dynamic compensation mode is used to adjust the parameters of the camera device in real time according to the light data obtained from the changes of specific events or conditions to optimize the image quality. The event-driven dynamic compensation mode automatically triggers an adjustment rule to perform compensation adjustment on the camera device by detecting sudden events (such as a moving target entering the frame, a sudden change in light, etc.). This event-driven dynamic compensation mode can avoid the problem of untimely manual setting in the actual scene and achieve a fast response.
[0124] It should be noted that the content of constructing the event-driven dynamic compensation mode includes: data collection: collecting image data in different scenarios and recording the light conditions and camera device settings when the event occurs; event classification: analyzing the collected image data using machine learning or a rule engine to identify and classify different types of events; model training: training all events using a training model (such as a decision tree, neural network) to predict the light data under specific events.
[0125] In an embodiment of the present application, before processing the composite image by adjusting the exposure value of the second camera device using an adaptive ambient light compensation strategy, the method includes: performing contrast enhancement and color adjustment processing on the composite image.
[0126] It should be noted that the method for light compensation and optimization of a camera device based on a backlight scene enhances the contrast and adjusts the color of the synthesized image, improving the clarity and readability of the monitoring images of the camera device. In this embodiment, the contrast enhancement includes histogram equalization and linear contrast adjustment. Histogram equalization is used to adjust the brightness distribution of the image to make the contrast more obvious. Linear contrast adjustment is used to adjust the brightness through a simple linear transformation. The color adjustment includes color balance and saturation adjustment. Color balance is used to adjust the proportion of the three colors of red, green, and blue to improve color performance. Saturation adjustment is used to enhance or weaken the vividness of the color.
[0127] In one embodiment of the present application, before adjusting the parameters of the camera device using an adjustment rule, the method includes: obtaining the scene type of the target area, determining the priority of the parameters according to the scene type, and adjusting the parameters according to the priority.
[0128] It should be noted that the scene types include dynamic scenes, low-light environments, and depth-of-field environments. If the scene type is a dynamic scene, the shutter speed is preferentially adjusted; if the scene type is a low-light environment, the gain is preferentially adjusted; if the scene type is a depth-of-field environment, the aperture size is preferentially adjusted.
[0129] In one embodiment of the present application, during the process of obtaining multiple frames of images of a moving target in the target area with different exposure values by a second camera device, the method includes: performing super-resolution enhancement processing on the multiple frames of images obtained by the camera device.
[0130] It should be noted that a convolutional neural network (such as a pre-trained super-resolution model SRCNN or VDSR) is used to perform super-resolution enhancement processing on the multiple frames of images obtained by the camera device to achieve an improvement in image resolution.
[0131] Embodiment 2:
[0132] Figure 3 It is a schematic framework diagram of the camera device described in the embodiments of the present application.
[0133] As Figure 3 shown, the embodiments of the present application provide a camera device, including a device housing 1 and a control board built in the device housing 1. A control system is provided on the control board, and the control system operates according to the above-mentioned method for light compensation and optimization of a camera device based on a backlight scene; wherein, the control system includes a processor module 3 and an optical acquisition module 4, a communication module 5, a power supply module 6, an energy storage module 7, and a heat dissipation module 8 connected to the processor module 3, and the processor module 3 operates according to the above-mentioned method for light compensation and optimization of a camera device based on a backlight scene.
[0134] It should be noted that the content of the illumination compensation and optimization method for camera devices based on backlight scenarios has been described in Embodiment 1, and will not be repeated in this embodiment. The optical acquisition module 4 is used to acquire illumination data, and the communication module 5 is used for data interaction. The power supply module 6 is used to supply power to at least the processor module 3, and the storage module 7 is used to store data. The heat dissipation module 8 is used for heat dissipation. In this embodiment, the camera device automatically reduces the frame rate through the control system to reduce calculation and power consumption; once a moving target is detected, the normal frame rate is immediately restored. The camera device can reduce the overall power consumption of a large-scale static monitoring scenario through the illumination compensation and optimization method for camera devices based on backlight scenarios of the control system. The camera device also assigns priorities to each monitoring task through this illumination compensation and optimization method for camera devices based on backlight scenarios. When the camera device is in the low-power mode, only high-priority events such as face recognition and license plate detection are processed, effectively saving resources. When the camera device is in the low-power sleep mode, the optical acquisition module 4 is used to detect light changes, continuously perceive the surrounding environment with lower energy consumption, and quickly wake up the control system when abnormal light changes occur.
[0135] In the embodiments of the present application, the endurance of the camera device is extended through the illumination compensation and optimization method for camera devices based on backlight scenarios of the control system, which is suitable for monitoring environments with long-term operation.
[0136] Embodiment 3:
[0137] Figure 4 It is a schematic framework diagram of the cloud system of the camera device described in the embodiments of the present application.
[0138] As Figure 4 shown, the embodiments of the present application provide a cloud system for a camera device, including a client 101, a camera device 102, an edge processing device 103, a cloud analysis server 104, and a data repository 105 that are connected in sequence. The cloud analysis server 104 is also connected to the client 101;
[0139] The client 101 is used to send a first request instruction for obtaining real-time monitoring video to the camera device 102, a second request instruction for obtaining historical video data to the cloud analysis server 104, and a third request instruction for sending historical illumination data to the edge processing device 103;
[0140] The camera device 102 is used to send a video stream to the edge processing device 103 according to the first request instruction;
[0141] The edge processing device 103 is used to screen and process the images of the video stream, obtain the monitoring images of the processed scene, and upload the monitoring images to the cloud analysis server 104;
[0142] A cloud analysis server 104 is used to transmit the monitoring images to a data repository 105 for storage and to a client 101, and to obtain historical video data from the storage database according to a second request instruction and transmit the historical video data to the client 101;
[0143] Among them, the client 101 is further used to transmit the historical light data in the historical video data to the edge processing device 103 according to a third request instruction; the cloud analysis server 104 is used to process the historical light data according to the above-mentioned method for compensating and optimizing the light of a camera device based on a backlight scene to obtain adjustment parameters for the camera device 102, and transmit the adjustment parameters to the camera device 102 through the edge processing device 103. The camera device 102 is further used to update the parameters of the camera device 102 according to the adjustment parameters.
[0144] It should be noted that the content of the method for compensating and optimizing the light of a camera device based on a backlight scene has been described in Embodiment 1, and will not be repeated in this embodiment. The cloud system of the camera device realizes remote control of the camera device through the client, the camera device, the edge processing device, the cloud analysis server and the data repository to ensure the image quality of the camera device under dynamic monitoring conditions. In this embodiment, the edge processing device 103 also adjusts the parameters of the camera device 102 for the monitoring images according to the above-mentioned method for compensating and optimizing the light of a camera device based on a backlight scene to perform the first exposure compensation on the camera device 102; it also synthesizes and optimizes the images obtained after updating the parameters of the camera device 102 according to the above-mentioned method for compensating and optimizing the light of a camera device based on a backlight scene to obtain optimized images.
[0145] Embodiment 4:
[0146] Figure 5 It is a framework schematic diagram of the device for compensating and optimizing the light of a camera device based on a backlight scene described in the embodiments of the present application.
[0147] As Figure 5 shown, the embodiments of the present application provide a device for compensating and optimizing the light of a camera device based on a backlight scene, including a brightness acquisition unit 10, a first parameter adjustment unit 20, a second parameter adjustment unit 30, an image synthesis unit 40 and an image optimization unit 50;
[0148] The brightness acquisition unit 10 is used to obtain a scene image and an expected brightness value of a target area in a backlight scene through a camera device, process the scene image, and obtain the current brightness value of the target area;
[0149] The first parameter adjustment unit 20 is configured to calculate an exposure compensation value based on the current brightness value and the desired brightness value; adjust the parameters of the imaging device according to the exposure compensation value using an adjustment rule to obtain a locally exposure-compensated imaging device, denoted as the first imaging device;
[0150] The second parameter adjustment unit 30 is configured to obtain historical illumination data that fuses multiple models and the images captured by the imaging device, process the historical illumination data using the fused multiple models to obtain an illumination prediction value; dynamically adjust the parameters of the first imaging device using the illumination prediction value as the exposure compensation value according to the adjustment rule to obtain a second imaging device with dynamic exposure compensation;
[0151] The image synthesis unit 40 is configured to obtain multiple frames of images of a moving target in a target area with different exposure values through the second imaging device; perform image fusion processing on all the multiple frames of images to obtain a synthesized image;
[0152] The image optimization unit 50 is configured to obtain an adaptive ambient light compensation strategy, and adjust the exposure value of the second imaging device using the adaptive ambient light compensation strategy to process the synthesized image to obtain an optimized image.
[0153] It should be noted that the content of the modules in the device of Embodiment 4 has been elaborated in the steps of the method in Embodiment 1, and the content of the modules of the illumination compensation and optimization device for the imaging device based on the backlight scenario will not be repeated in this embodiment. In this embodiment, the illumination compensation and optimization device for the imaging device based on the backlight scenario performs local exposure compensation, dynamic exposure adjustment, multi-frame image fusion, etc. on the imaging device through the brightness acquisition unit, the first parameter adjustment unit, the second parameter adjustment unit, the image synthesis unit, and the image optimization unit, optimizes the illumination processing effect of the imaging device in the backlight scenario, and improves the clarity, brightness balance, and color restoration degree of the images captured by the imaging device.
[0154] Embodiment 5:
[0155] Figure 6 It is a schematic diagram of the terminal device described in the embodiments of the present application.
[0156] As Figure 6 shown, the embodiments of the present application provide a terminal device, including a processor and a memory;
[0157] The memory is used to store program code and transmit the program code to the processor;
[0158] The processor is configured to execute the above-mentioned illumination compensation and optimization method for the imaging device based on the backlight scenario according to the instructions in the program code.
[0159] It should be noted that the processor is used to execute the steps in the above embodiments of the method for compensating and optimizing the illumination of a camera device based on a backlight scene according to the instructions in the program code. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above system / device embodiments.
[0160] Exemplarily, the computer program can be divided into one or more modules / units. One or more modules / units are stored in the memory and executed by the processor to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the terminal device.
[0161] The terminal device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that this does not constitute a limitation on the terminal device, and it may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the terminal device may further include input / output devices, network access devices, a bus, etc.
[0162] The so-called processor may be a central processing unit (CPU), or may also be 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 may be a microprocessor or the processor may also be any conventional processor, etc.
[0163] The memory may be an internal storage unit of the terminal device, such as the hard disk or memory of the terminal device. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk equipped on the terminal device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory may also include both the internal storage unit and the external storage device of the terminal device. The memory is used to store the computer program and other programs and data required by the terminal device. The memory may also be used to temporarily store the data that has been output or will be output.
[0164] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0165] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0166] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, in each embodiment of the present invention, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0168] If the above-mentioned integrated unit is implemented in the form of 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, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0169] As described above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. A method for illumination compensation and optimization of a camera device based on a backlit scene, characterized in that: The following steps are involved: Acquire a scene image and an expected brightness value of a target area in a backlit scene by a camera device, and process the scene image to obtain a current brightness value of the target area; An exposure compensation value is calculated according to the current brightness value and the expected brightness value; a parameter of the camera device is adjusted according to the exposure compensation value using an adjustment rule to obtain a camera device after local exposure compensation and record it as a first camera device; Acquire historical illumination data of the fused multi-model and the image captured by the camera device, process the historical illumination data using the fused multi-model to obtain an illumination estimation value; dynamically adjust the parameters of the first camera device using an adjustment rule based on the illumination estimation value as an exposure compensation value to obtain a second camera device after dynamic exposure compensation; Acquire multiple frames of images of a moving target in the target area with different exposure values by the second camera device; perform image fusion processing on all the multiple frames of images to obtain a composite image; An adaptive ambient light compensation strategy is obtained, and the adaptive ambient light compensation strategy is used to adjust the exposure value of the second camera device to process the composite image to obtain an optimized image.
2. The method for illumination compensation and optimization of a camera device based on a backlit scene according to claim 1, characterized in that: Processing the scene image to obtain the current brightness value of the target area includes: Obtaining three pixel values of RGB for each pixel point from the scene image, and calculating according to the three pixel values of each pixel point to obtain a brightness value corresponding to the pixel point; The current brightness value of the target area is obtained by calculation based on all the brightness values.
3. The method for illumination compensation and optimization of a camera device based on a backlit scene according to claim 1, characterized in that: The parameters include the gain, shutter speed and aperture size of the camera device, and the adjustment rules include: Acquire current parameters of the camera device, wherein the current parameters include current gain, current shutter speed and current aperture size; Calculate according to the current parameter and the exposure compensation value to obtain an adjustment parameter; The parameters of the camera device are adjusted according to the adjustment parameters to obtain a first camera device after partial exposure compensation.
4. The method for illumination compensation and optimization of a camera device based on a backlit scene according to claim 1, characterized in that: The fusion multi-model at least includes a binary classification model, a random forest model and a lighting prediction model established by a long short-term memory network. The historical lighting data is processed using the fusion multi-model to obtain a lighting estimation value including: The binary classification model, the random forest model and the illumination prediction model are used to train the historical illumination data respectively, and output respective illumination prediction values; All the illumination prediction values are calculated to obtain an illumination estimation value.
5. The method for illumination compensation and optimization of a camera device based on a backlit scene according to claim 1, characterized in that: Performing image fusion processing on all the multiple frames of images to obtain a composite image includes: Determine a moving target in all the multiple frames of images, and perform registration processing on all the multiple frames of images according to the moving target to obtain corresponding aligned processed images; High dynamic range imaging technology is used to fuse and synthesize all the processed images to obtain a synthesized image.
6. The method for illumination compensation and optimization of a camera device based on a backlit scene according to claim 1, characterized in that: The adaptive ambient light compensation strategy includes a reverse exposure evaluation model, which is used to output a main light source corresponding to the scene image according to the scene image, and adjust the exposure value of the second camera device according to the intensity of the main light source.
7. The method for illumination compensation and optimization of a camera device based on a backlit scene according to any one of claims 1 to 6, characterized in that: Before using the adaptive ambient light compensation strategy to adjust the exposure value of the second camera device to process the composite image, the method includes: performing contrast enhancement and color adjustment processing on the composite image.
8. The method for illumination compensation and optimization of a camera device based on a backlit scene according to any one of claims 1 to 6, characterized in that: Before adjusting the parameters of the camera device using adjustment rules, the method includes: obtaining the scene type of the target area, determining the priority of the parameters according to the scene type, and adjusting the parameters according to the priority; and / or, in the process of obtaining multiple frames of images of a moving target in the target area with different exposure values through the second camera device, the method includes: performing super-resolution enhancement processing on the multiple frames of images obtained by the camera device.
9. A camera device, characterized in that: It includes a device shell and a control board built into the device shell, wherein the control board is provided with a control system, wherein the control system includes a processor module and an optical acquisition module, a communication module, a power supply module, an energy storage module and a heat dissipation module connected to the processor module, and the processor module operates according to the illumination compensation and optimization method for a camera device based on a backlight scene as described in any one of claims 1 to 8.
10. A cloud system for a camera device, characterized in that: It includes a user terminal, a camera device, an edge processing device, a cloud analysis server and a data storage repository connected in sequence, wherein the cloud analysis server is also connected to the user terminal; The user end is used for a first request instruction to obtain real-time monitoring video from the camera device, a second request instruction to obtain historical video data from the cloud analysis server, and a third request instruction to send historical lighting data to the edge processing device; The camera device is used to send a video stream to the edge processing device according to the first request instruction; The edge processing device is used to filter and process the images of the video stream to obtain a monitoring image of the processed scene and upload the monitoring image to the cloud analysis server; The cloud analysis server is used to transmit the monitoring image to the data storage repository for storage and transmit the monitoring image to the user terminal, and to obtain the historical video data from the storage database according to the second request instruction and transmit the historical video data to the user terminal; Among them, the user end is also used to transmit the historical lighting data in the historical video data to the edge processing device according to the third request instruction; the cloud analysis server is used to process the historical lighting data according to the camera device lighting compensation and optimization method based on the backlighting scene according to any one of claims 1-8 to obtain adjustment parameters for adjusting the camera device, and transmit the adjustment parameters to the camera device through the edge processing device, and the camera device is also used to update the parameters of the camera device according to the adjustment parameters.
Citation Information
Cited By
Vehicle visual identification method and system for unmanned parking lot
CN121685912A