Camera Adaptive Adjustment Method, System and Storage Medium
By acquiring multi-source environmental sensing datasets for adaptive camera adjustment, the problem of poor image quality in traditional cameras in different lighting and dynamic scenes is solved, and high-quality image capture and target recognition are achieved in changing environments.
Patent Information
- Application Number
- CN202411769985.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Traditional cameras have significant differences in performance under different lighting conditions, especially in strong or low-light environments, and their image quality is degraded, and they cannot adapt to the rapid changes in dynamic scenes in real time, resulting in unclear monitoring images, affecting the accuracy and security of recognition.
By acquiring the multi-source environmental sensing data set, environmental feature recognition and semantic scene segmentation are performed, the target vehicle-scene motion semantic diagram is generated, and the camera is adjusted according to the diagram, and the camera is adaptively adjusted by combining the fuzzy controller and feedback adjustment.
It improves the image quality of the camera under different lighting conditions and the recognition ability of the dynamic environment, ensures the clarity and real-timeness of the monitoring images, and enhances the stability and response speed of the monitoring system.
Smart Images

Figure CN119545164B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera adjustment, and particularly to a camera adaptive adjustment method, system and storage medium. Background Art
[0002] The performance of traditional cameras varies significantly under different lighting conditions. In strong light or low light environments, the quality of the images captured by the camera will drop significantly, resulting in loss of details or overexposure, which is a serious problem for application scenarios that require clear images for accurate analysis. For example, in traffic monitoring, the low lighting conditions at night or in tunnels will seriously affect the recognition accuracy of vehicles and pedestrians, increasing safety risks. Secondly, when facing dynamic scenes, existing cameras often cannot adjust parameters in real time to adapt to the rapidly changing environment. For example, in urban traffic monitoring, the rapid movement of vehicles and changing traffic flows require the camera to be able to quickly adjust parameters such as focal length and exposure to maintain image clarity and real-time performance. However, most camera systems lack this dynamic adjustment ability, resulting in an inability to provide stable and reliable monitoring images in complex dynamic scenes. Summary of the Invention
[0003] Based on this, it is necessary for the present invention to provide a camera adaptive adjustment method, system and storage medium to solve at least one of the above technical problems.
[0004] To achieve the above object, a camera adaptive adjustment method includes the following steps:
[0005] Step S1: Obtain a multi-source environmental sensing data set and an initial environmental image; perform environmental feature recognition on the initial environmental image according to the multi-source environmental sensing data set to obtain a scene environmental feature map;
[0006] Step S2: Perform semantic scene segmentation on the scene environmental feature map to obtain a semantic scene macro feature map; perform temporal attention object tracking on the scene environmental feature map to obtain a target vehicle motion feature map; perform feature constraint fusion on the semantic scene macro feature map and the target vehicle motion feature map to obtain a target vehicle-scene motion semantic map;
[0007] Step S3: Adjust the parameters of the camera according to the target vehicle-scene motion semantic map to obtain a camera parameter adjustment strategy set; screen the camera parameter adjustment strategy set to obtain an initial parameter adjustment plan; perform prediction compensation on the initial parameter adjustment plan to obtain a real-time parameter adjustment strategy;
[0008] Step S4: Based on the real-time parameter adjustment strategy, perform multi-parameter linkage modeling on the camera to obtain a camera parameter combination model; evaluate the camera parameter combination model using a fuzzy controller to obtain parameter linkage evaluation data; perform feedback control adjustment according to the parameter linkage evaluation data to obtain an optimized parameter regulation scheme;
[0009] Step S5: According to the optimized parameter regulation scheme, perform intelligent parameter reconstruction and image acquisition on the camera to obtain a real-time monitoring image; evaluate the quality of the real-time monitoring image to obtain image quality evaluation data; update the parameters of the optimized parameter regulation scheme according to the image quality evaluation data to obtain the final camera configuration parameters.
[0010] By obtaining a multi-source environmental sensing data set and an initial environmental image and performing environmental feature recognition, the present invention can accurately capture the environmental features of the scene and generate a scene environmental feature map. This enables the camera to adapt to different lighting conditions. Whether in strong light or weak light environments, it can maintain image quality, reduce detail loss and overexposure phenomena, thereby improving the performance of the camera under various lighting conditions and the usability of the image. Through semantic segmentation and temporal attention object tracking of the scene environmental feature map, a target vehicle-scene motion semantic map can be generated, which not only improves the understanding of static environmental elements but also enhances the recognition and tracking capabilities of dynamic targets such as vehicles and pedestrians. This is particularly important for application scenarios such as traffic monitoring that require accurate identification and tracking of targets, and can significantly improve the accuracy and response speed of the monitoring system. By generating a set of camera parameter adjustment strategies, screening and predicting compensation for them, a real-time parameter adjustment strategy is obtained. This means that the camera can intelligently adjust its parameters such as focal length and exposure according to real-time environmental changes and target dynamics to maintain image clarity and real-time performance. This intelligent adjustment ability enables the camera to better adapt to rapidly changing dynamic scenes and provide stable and reliable monitoring images. Through multi-parameter linkage modeling and fuzzy controller evaluation, parameter linkage evaluation data can be obtained, and feedback control adjustment can be performed according to these data to obtain an optimized parameter regulation scheme. This not only improves the efficiency and accuracy of camera parameter adjustment but also ensures that the camera can work in the best state under various complex environments, further improving the quality of the monitoring image. The present invention also includes evaluating the quality of the real-time monitoring image and updating the parameters of the parameter regulation scheme according to the evaluation data to obtain the final camera configuration parameters. This enables the camera system to self-optimize, continuously adapt to environmental changes, and ensure long-term stable provision of high-quality monitoring images.
[0011] Preferably, the present invention also provides a camera adaptive adjustment system for executing the above-mentioned camera adaptive adjustment method. The camera adaptive adjustment system includes:
[0012] An environmental feature recognition module, which is used to obtain a multi-source environmental sensing data set and an initial environmental image; perform environmental feature recognition on the initial environmental image according to the multi-source environmental sensing data set to obtain a scene environmental feature map;
[0013] A target tracking module, which is used to perform semantic scene segmentation on the scene environmental feature map to obtain a semantic scene macro feature map; perform temporal attention target tracking on the scene environmental feature map to obtain a target vehicle motion feature map; perform feature constraint fusion on the semantic scene macro feature map and the target vehicle motion feature map to obtain a target vehicle-scene motion semantic map;
[0014] An adjustment strategy generation module, which is used to adjust the parameters of the camera according to the target vehicle-scene motion semantic map to obtain a set of camera parameter adjustment strategies; screen the set of camera parameter adjustment strategies to obtain an initial parameter adjustment plan; perform prediction compensation on the initial parameter adjustment plan to obtain a real-time parameter adjustment strategy;
[0015] A feedback control and regulation module, which is used to perform multi-parameter linkage modeling on the camera based on the real-time parameter adjustment strategy to obtain a camera parameter combination model; evaluate the camera parameter combination model with a fuzzy controller to obtain parameter linkage evaluation data; perform feedback control and regulation according to the parameter linkage evaluation data to obtain an optimized parameter regulation plan;
[0016] A parameter update module, which is used to perform intelligent parameter reconstruction and image acquisition on the camera according to the optimized parameter regulation plan to obtain a real-time monitoring image; evaluate the quality of the real-time monitoring image to obtain image quality evaluation data; update the parameters of the optimized parameter regulation plan according to the image quality evaluation data to obtain the final camera configuration parameters.
[0017] The present invention realizes the comprehensive and dynamic adjustment of camera parameters by integrating an environmental feature recognition module, a target tracking module, an adjustment strategy generation module, a feedback control and regulation module, and a parameter update module. The system can quickly identify environmental features and track targets, generate detailed semantic maps and motion feature maps, thereby improving the resolution of monitoring images and the accuracy of target recognition. By adjusting the camera parameters in real time, the system can adapt to various lighting and dynamic environments, ensuring that high-quality images can be captured under different conditions. The system generates real-time parameter adjustment strategies through screening and prediction compensation, effectively allocates camera resources, and improves the operation efficiency of the monitoring system. Through multi-parameter linkage modeling and fuzzy controller evaluation, the system can achieve fine regulation of parameters, enhancing the stability and reliability of the camera in complex environments. The system can continuously update the parameter regulation plan according to the image quality evaluation data, enabling the camera system to have the ability of self-optimization and maintaining the best monitoring effect in the long term.
[0018] Preferably, a computer-readable storage medium stores a camera adaptive adjustment method as described above that can be loaded and executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Other features, objects, and advantages of the present invention will become more apparent by reading the following detailed description with reference to the accompanying drawings:
[0020] Figure 1 FIG. shows a schematic flow chart of the steps of a camera adaptive adjustment method according to an embodiment.
[0021] Figure 2 FIG. shows a detailed schematic flow chart of step S3 according to an embodiment.
[0022] Figure 3 FIG. shows a detailed schematic flow chart of step S37 according to an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] The technical method of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0024] In addition, the accompanying drawings are only schematic diagrams of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.
[0025] It should be understood that although the terms "first", "second", etc. may be used here to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit can be called the second unit, and similarly the second unit can be called the first unit. The term "and / or" used here includes any and all combinations of one or more of the listed related items.
[0026] To achieve the above object, please refer to Figures 1 to 3 , the present invention provides a camera adaptive adjustment method, including the following steps:
[0027] Step S1: Obtain a multi-source environmental sensing data set and an initial environmental image; identify environmental features of the initial environmental image based on the multi-source environmental sensing data set to obtain a scene environmental feature map;
[0028] Step S2: Perform semantic scene segmentation on the scene environmental feature map to obtain a semantic scene macro feature map; perform temporal attention object tracking on the scene environmental feature map to obtain a target vehicle motion feature map; perform feature constraint fusion on the semantic scene macro feature map and the target vehicle motion feature map to obtain a target vehicle-scene motion semantic map;
[0029] Step S3: Adjust the parameters of the camera according to the target vehicle-scene motion semantic map to obtain a set of camera parameter adjustment strategies; screen the set of camera parameter adjustment strategies to obtain an initial parameter adjustment plan; perform prediction compensation on the initial parameter adjustment plan to obtain a real-time parameter adjustment strategy;
[0030] Step S4: Perform multi-parameter linkage modeling on the camera based on the real-time parameter adjustment strategy to obtain a camera parameter combination model; evaluate the camera parameter combination model with a fuzzy controller to obtain parameter linkage evaluation data; perform feedback control adjustment according to the parameter linkage evaluation data to obtain an optimized parameter regulation plan;
[0031] Step S5: Reconstruct the intelligent parameters of the camera and collect images according to the optimized parameter regulation plan to obtain a real-time monitoring image; evaluate the quality of the real-time monitoring image to obtain image quality evaluation data; update the parameters of the optimized parameter regulation plan according to the image quality evaluation data to obtain the final camera configuration parameters.
[0032] In this embodiment, environmental sensors and camera hardware are used. First, a multi-source environmental sensing data set is obtained, including an illumination intensity data stream, a depth measurement data stream, and an initial environmental image. These data are transmitted to the data processing server in real time through the APIs of the sensors and the camera. Using the deep learning framework TensorFlow, the initial environmental image and the multi-source environmental sensing data set are analyzed to identify the scene environmental feature map. This involves training a convolutional neural network (CNN) to process the image data and extract the environmental features. Using the image segmentation algorithm in the OpenCV library, semantic segmentation is performed on the scene environmental feature map to obtain the semantic scene macro feature map. This includes applying a pre-trained deep learning model to identify different objects and scene parts in the image. Using the PyTorch framework to implement a temporal attention network, temporal attention object tracking is performed on the scene environmental feature map to obtain the target vehicle motion feature map. This network can identify and track the target vehicle in the image sequence. The semantic scene macro feature map and the target vehicle motion feature map are fused with feature constraints to obtain the target vehicle-scene motion semantic map. Based on the target vehicle-scene motion semantic map, a genetic algorithm is used to generate a set of camera parameter adjustment strategies. This algorithm can simulate the natural selection process and optimize the parameter settings of the camera. From the set of parameter adjustment strategies, a greedy selection strategy is used to filter out the initial parameter adjustment scheme, which is the best estimate based on the current environment and scene requirements. Prediction compensation is performed on the initial parameter adjustment scheme. The ARIMA model is used to predict environmental changes and adjust the parameters accordingly to obtain the real-time parameter adjustment strategy. Based on the real-time parameter adjustment strategy, multi-parameter linkage modeling is performed using MATLAB to obtain the camera parameter combination model. This involves establishing the mathematical relationships between the parameters and simulating how they jointly affect the camera performance. The camera parameter combination model is evaluated using a fuzzy controller. The Fuzzy Logic Toolbox of MATLAB is used to handle uncertainties and nonlinear problems to obtain the parameter linkage evaluation data. According to the parameter linkage evaluation data, a PID controller is used for feedback control adjustment to obtain the optimized parameter regulation scheme. This controller can adjust the parameters according to the error signal to achieve the expected image quality. According to the optimized parameter regulation scheme, intelligent parameter reconstruction of the camera is performed through the API of the camera, and real-time monitoring images are collected. Image quality evaluation is performed on the real-time monitoring images. Image quality evaluation tools such as IMQE (Image Quality Expert) are used to obtain the image quality evaluation data. According to the image quality evaluation data, the genetic algorithm is used again to update the parameters of the optimized parameter regulation scheme to obtain the final camera configuration parameters, ensuring that the camera can provide the best image quality in various environments.
[0033] Preferably, step S1 includes the following steps:
[0034] Step S11: Collect environmental parameters of the environment where the camera is located to obtain a multi-source environmental sensing data set; among them, the multi-source environmental sensing data set includes an illumination intensity data stream and a depth measurement data stream;
[0035] Specifically, a set of sensors can be deployed in the environment where the camera is located, including a photosensitive sensor and a depth camera. The photosensitive sensor is responsible for capturing the illumination intensity. It can monitor the changes in environmental light in real time and convert the optical signal into an electrical signal. These electrical signals are then converted into digital format through an analog-to-digital converter (ADC) to obtain the illumination intensity data stream. At the same time, the depth camera obtains the depth information of the environment by emitting infrared light and measuring the reflected time, generating a depth measurement data stream. These data streams contain the distance information from each pixel point to the camera.
[0036] Step S12: Collect a range image of the environment where the camera is located to obtain an initial environmental image;
[0037] Specifically, a digital camera can be used to collect the range image of the environment. This camera is equipped with a wide-angle lens that can cover a wider field of view, thus capturing a more comprehensive environmental image. The collected image is saved in a secure digital storage medium, such as a solid-state drive (SSD) or a high-speed SD card, and finally the initial environmental image is obtained.
[0038] Step S13: Perform compensated illumination enhancement on the initial environmental image according to the illumination intensity data stream to obtain an environmental enhanced illumination feature map;
[0039] Specifically, image processing software, such as Adobe Photoshop or GIMP, can be used to analyze the illumination intensity data stream. These data streams provide real-time information about the environmental illumination level, including the intensity and direction of the illumination. Import the initial environmental image into the image processing software and use the histogram tool of the software to analyze the brightness distribution of the image to determine which areas in the image are too dark or too bright. According to the results of the illumination intensity data stream and histogram analysis, manually or automatically adjust the brightness and contrast of the image. For example, if the data shows that the environmental illumination is dim, increase the overall brightness of the image, or use the "Shadow / Highlight" tool to restore the details in the dark areas while avoiding overexposing the bright areas, and finally obtain the environmental enhanced illumination feature map.
[0040] Step S14: Perform distance gradient calibration on the initial environmental image according to the depth measurement data stream to obtain an environmental calibrated depth measurement map;
[0041] Specifically, for the detailed implementation process of this embodiment, please refer to the sub-steps of Step S14.
[0042] Step S15: Perform feature fusion on the environment-enhanced light feature map and the environment-calibrated depth measurement map to obtain a scene environment feature map.
[0043] Specifically, an image processing software such as OpenCV can be used to extract features from the environment-enhanced light feature map and the environment-calibrated depth measurement map. For the environment-enhanced light feature map, color and texture features are extracted; for the environment-calibrated depth measurement map, edge and contour features are extracted. Through a feature matching algorithm, such as SIFT (Scale-Invariant Feature Transform) or ORB (Oriented FAST and Rotated BRIEF), corresponding feature points are found in the two images. Since there are slight differences in perspective or scale between the depth map and the light map, the feature point matching results are used to align the two images to ensure their spatial consistency. The alignment can be achieved through affine transformation or perspective transformation, depending on the degree of difference between the images. Based on the alignment, an image fusion technique, such as Laplacian pyramid fusion or Poisson fusion, is used to fuse the two images into a scene environment feature map.
[0044] By collecting light intensity and depth measurement data, the present invention enhances the comprehensiveness of image acquisition, significantly improves the image quality under different lighting conditions, reduces overexposure or underexposure phenomena, and at the same time improves the accuracy of depth information. Through the optimization of the feature fusion technique, the scene understanding ability is further improved, and it is more accurate in semantic segmentation and object tracking. By accurately collecting environmental parameters and image calibration, the reliability of the monitoring system is improved, especially reducing false alarms and missed alarms in key fields such as security monitoring.
[0045] Preferably, step S14 includes the following steps:
[0046] Step S141: Perform bilateral filtering on the initial environment image according to the depth measurement data stream to obtain a filtered environment image;
[0047] Specifically, the depth measurement data stream can be aligned with the initial environmental image to ensure that the spatial resolutions and coordinate systems of both are consistent. This involves scaling or cropping the depth image to match the dimensions of the environmental image. Set up the OpenCV environment and import the necessary libraries. Prepare the initial environmental image and the corresponding depth measurement data stream, ensuring that both have been loaded into memory. According to the depth information provided by the depth measurement data stream, adjust the parameters of bilateral filtering. The diameter parameter (D) is set to 9 to determine the size of the filtering window. The standard deviation of the color space (sigmaColor) is set to 75 to control the weight of color similarity. The standard deviation of the coordinate space (sigmaSpace) is also set to 75 to control the weight of spatial proximity. The setting of these parameters takes into account the influence of depth information on image noise. Use the cv2.bilateralFilter function in OpenCV, taking the initial environmental image and the set parameters as input, and perform the bilateral filtering operation. The function will traverse each pixel of the image and, based on the depth measurement data stream and color information, perform weighted averaging on the surrounding pixels to generate the filtered environmental image. After the filtering is completed, check the filtered environmental image to ensure that the noise is effectively reduced while the edge and detail features of the image are retained. Pay special attention to areas with large depth changes, such as object edges, to ensure that these areas remain clear after filtering. If the filtering result is not ideal, such as blurred edges or ineffective noise removal, adjust the parameters of bilateral filtering according to the characteristics of the depth measurement data stream and perform the filtering again.
[0048] Step S142: Calculate the depth gradient of the filtered environmental image to obtain the spatial depth gradient map;
[0049] Specifically, the Sobel operator can be used to calculate the depth gradient because it can effectively detect edge and texture information in the image. Use the cv2.Sobel function in the OpenCV library to calculate the gradient. Set the parameters of the function, including the input filtered environmental image, the order of derivatives in the x and y directions (select the first-order derivative), and the depth of the resulting image (select CV_32F, i.e., 32-bit floating-point number). Calculate the gradients of the image in the x and y directions respectively. For each direction, the cv2.Sobel function will calculate the first-order derivative of the image to generate two gradient images, representing the gradient intensities in the x and y directions respectively. To obtain the gradient magnitude of each pixel point, use the cv2.magnitude function, which takes the two gradient images in the two directions as input and outputs the gradient magnitude of each pixel point to generate the spatial depth gradient map.
[0050] Step S143: Construct the depth calibration transformation matrix based on the spatial depth gradient map to obtain the image depth calibration parameter set;
[0051] Specifically, image processing software (such as MATLAB or OpenCV) can be used to load the spatial depth gradient map and analyze its depth change characteristics. Identify the depth discontinuity points and edges in the map. Use the stereo vision calibration method in camera calibration technology, which involves using a known reference object (such as a checkerboard) to determine the internal and external parameters of the camera. Use a stereo matching algorithm (such as semi-global matching or block matching) to estimate the disparity map between two views. The disparity map provides the displacement information of pixel points in the depth direction. According to the disparity map and the known camera parameters, calculate the image depth calibration parameter set. This includes the construction of a depth transformation matrix, which will be used to convert the disparity map into a depth map.
[0052] Step S144: Use the image depth calibration parameter set to perform perspective transformation correction on the filtered environmental image to obtain an environmental depth correction map;
[0053] Specifically, the image depth calibration parameter set and the filtered environmental image can be loaded. These parameters include the depth transformation matrix and the internal parameters of the camera. Using image processing software (such as OpenCV), call the perspective transformation function (such as cv2.perspectiveTransform) and apply the depth calibration parameter set to the initial environmental image. During the perspective transformation process, the transformation matrix and the region of interest (ROI) of the image need to be provided. The transformation matrix is provided by the image depth calibration parameter set, and the ROI can be the entire image or a specific region in the image. The software performs perspective transformation correction on the filtered environmental image according to the provided transformation matrix and ROI, thereby obtaining an environmental depth correction map. This process involves recalculating the position of each pixel point in the image to compensate for the distortion caused by the camera's perspective. The corrected image (environmental depth correction map) is compared with the original image to verify the effect of the correction. Check whether the geometric distortion of the image is effectively corrected and whether the depth information of the image is consistent with the expectation.
[0054] Step S145: Perform three-dimensional space reconstruction on the environmental depth correction map to obtain an environmental calibrated depth measurement map.
[0055] Specifically, professional 3D reconstruction software such as MeshLab or CloudCompare can be used. These software can process depth images and generate 3D point clouds or meshes. Import the environmental depth correction map into the 3D reconstruction software. This image contains depth information corrected by perspective transformation, providing accurate input data for 3D reconstruction. Set the necessary reconstruction parameters in the software. This includes the internal parameters of the camera (such as focal length, principal point coordinates) and external parameters (such as the position and rotation of the camera), which are usually obtained through the camera calibration process. Use the 3D reconstruction function of the software to convert the 2D depth correction map into a 3D point cloud. This process involves converting the depth value of each pixel into a point in 3D space and constructing a point cloud according to the camera perspective. From the point cloud data, the mesh generation function of the software can be used to create a 3D mesh or surface. This mesh represents the 3D structure of the environment and can be used for further analysis or visualization. Finally, verify the accuracy of the reconstruction by visualizing the 3D model. The model can be observed from different angles to check for obvious distortions or missing parts. If the model meets the expectations, then it is the environmental calibration depth measurement map.
[0056] The present invention effectively improves the accuracy and smoothness of depth data, reduces noise and preserves edge information by processing the depth measurement data stream through bilateral filtering. The resolution of depth information is enhanced through depth gradient calculation, enabling a detailed understanding of the scene depth changes. The accuracy of the calibration process is optimized by constructing a depth calibration transformation matrix and an image depth calibration parameter set, improving the reliability of depth information. The geometric accuracy of the image is improved by perspective transformation correction, reducing distortion, while the 3D space reconstruction enhances the authenticity of the depth measurement map.
[0057] Preferably, step S2 includes the following steps:
[0058] Step S21: Decompose the scene environment feature map to obtain an environmental scene scale feature set;
[0059] Specifically, the image processing software OpenCV and the machine learning library scikit-learn can be used for scene decomposition. Use the segmentation algorithm in OpenCV to segment the scene environment feature map to identify different objects and backgrounds. Algorithms such as K-means clustering or watershed algorithm are used to distinguish different regions in the image. These algorithms can segment the image into multiple parts according to features such as color and texture. For each segmented region, extract scale features such as the area, perimeter, and shape descriptors (such as circularity, rectangularity) of the region. These features describe the scale and shape characteristics of each region. Store the extracted scale features in an environmental scene scale feature set, with each region corresponding to a feature vector.
[0060] Step S22: Calculate the regional importance of the scene environmental feature map based on the environmental scene scale feature set to obtain the environmental scene attention distribution map;
[0061] Specifically, OpenCV can be used for regional importance calculation. Define a series of criteria to evaluate the importance of each region, such as the area size of the region, the complexity of the shape, the degree of association with specific targets, etc. For each region in the feature set, calculate its importance score according to the defined criteria. For example, a region with a larger area is given a higher score, and a region with a complex shape also gets a higher score. According to the importance scores of each region, an environmental scene attention distribution map is generated. In this distribution map, the color or brightness of each region represents its importance score, and the darker the color or the higher the brightness of the region, the higher its importance. Finally, check the environmental scene attention distribution map to ensure that the regional importance distribution in the map meets the expectations. Pay special attention to whether the key regions, such as pedestrians and vehicles, are correctly highlighted in the map.
[0062] Step S23: Perform sliding window feature extraction on the environmental scene attention distribution map to obtain the scene local feature data set;
[0063] Specifically, Python programming language can be used in combination with the OpenCV library to implement sliding window feature extraction. Define a window of a fixed size, such as 32x32 pixels. This window will slide on the attention distribution map to cover the entire image. The size and step size (the number of pixels the window moves each time) of the window are determined according to the resolution of the image and the scale of the features expected to be extracted. When the window slides, a series of features are calculated for all the pixels within the window, including color histograms, texture features (such as gray-level co-occurrence matrices), shape features, etc. These features can describe the local attributes of the region within the window. For each window position, the extracted features are stored as a feature vector, and these feature vectors are combined into a scene local feature data set. This scene local feature data set contains the local features of all window positions in the image.
[0064] Step S24: Perform scene region segmentation on the scene environmental feature map according to the environmental scene attention distribution map and the scene local feature data set to obtain the semantic scene macro feature map;
[0065] Specifically, Python and the OpenCV library can be used, combined with image segmentation algorithms such as graph-based segmentation or deep learning methods, to segment the scene regions. First, use the attention values in the environmental scene attention distribution map as weights and combine them with the feature vectors in the local feature dataset. This allows regions with higher attention to be prioritized during the segmentation process. Use the weighted local features and attention information to define the boundaries of the regions. For example, a graph-based segmentation algorithm can be used to represent the image as a graph, where nodes represent pixels and edges represent the similarity between pixels. Merge or split regions based on the attention of the nodes and feature similarity. For each segmented region, further extract semantic features such as the class label of the region (e.g., person, vehicle, building). This can be achieved by training a classifier (such as a support vector machine or a deep neural network) that classifies the regions based on the local feature dataset. Finally, construct a semantic scene macro feature map that represents the semantic information and macro features of each region in the scene. In this map, each region is labeled with its corresponding semantic label and macro features. Check the semantic scene macro feature map to ensure that the segmented regions accurately reflect the semantic structure of the scene and that the boundaries of the regions are clear and reasonable.
[0066] Step S25: Generate a temporal feature sequence for the scene environment feature map to obtain a moving object temporal feature set;
[0067] Specifically, the Python programming language can be used in conjunction with the OpenCV library and the NumPy library to process the scene environment feature map, and the SciPy library can be used to analyze the temporal data. First, obtain a series of temporally consecutive scene environment feature maps, which can be captured by a camera at fixed time intervals. For each frame of the image, use image processing algorithms to extract the features of the moving objects, such as edges, corners, optical flow, etc. These features can describe the movement and changes of the objects over time. Track and compare the features of each moving object between consecutive frames to generate a temporal feature sequence. For example, use the optical flow algorithm to track the position changes of the object in consecutive frames to obtain temporal features such as speed and acceleration. Store the temporal feature sequences of all moving objects in a moving object temporal feature set, with each object corresponding to a temporal feature sequence. This dataset contains the temporal information of all moving objects in the scene.
[0068] Step S26: Model the spatio-temporal attention mechanism for the moving object temporal feature set to obtain the attention weight map of the target vehicle;
[0069] Specifically, the Python programming language can be used in conjunction with deep learning frameworks such as TensorFlow or PyTorch to implement the spatio-temporal attention mechanism. First, integrate the temporal feature sequence with spatial features (such as the shape, size, color, etc. of the target) to form a spatio-temporal feature set. Design a spatio-temporal attention network model that can automatically learn which features are most important for the recognition and tracking of the target vehicle in different scenarios and at different time points. Use a convolutional neural network (CNN) to extract spatial features and a recurrent neural network (RNN) or long short-term memory network (LSTM) to process temporal features. By training the spatio-temporal attention network model, obtain the attention weights for each pixel or region. These weights represent the degree of attention of the model to each position, and regions with high weights indicate that the model considers these regions to be more important for the recognition of the target vehicle. Apply the attention weights to the scene environment feature map to generate the target vehicle attention weight map. In this map, regions of different colors or brightness represent different levels of attention weights.
[0070] Step S27: Perform target localization on the temporal feature set of the moving target based on the target vehicle attention weight map to obtain the target vehicle motion feature map;
[0071] Specifically, the Python programming language can be used in conjunction with the deep learning framework TensorFlow and the computer vision library OpenCV to process the target vehicle attention weight map and the temporal feature set of the moving target. Combine the target vehicle attention weight map with the temporal feature set of the moving target to determine the position of the target vehicle in consecutive frames. The attention weight map provides importance information for each pixel point, and it is used as a weighting factor to strengthen the localization of the target vehicle in the temporal feature set. Use tracking algorithms in OpenCV, such as Kalman filtering or Mean-Shift, combined with the attention weights, to track the target vehicle. These algorithms can locate the target in each frame and predict its position in the next frame. For each frame, extract motion features such as speed, direction, and acceleration based on the position and temporal features of the target vehicle. These features are used to generate the target vehicle motion feature map, which shows the motion information of the target vehicle spatially.
[0072] Step S28: Perform feature constraint fusion on the semantic scene macro feature map and the target vehicle motion feature map to obtain the target vehicle - scene motion semantic map.
[0073] Specifically, the Python programming language can be used in conjunction with the image processing library OpenCV and the machine learning library scikit-learn for feature fusion. First, preprocess the semantic scene macro feature map and the target vehicle motion feature map, including normalization and feature alignment, to ensure that the two feature maps are consistent in spatial resolution and feature scale. Use feature fusion techniques, such as weighted fusion, graph-based fusion, or deep learning fusion networks, to combine the two feature maps. For example, a deep learning network can be designed with the two feature maps as inputs and the fused target vehicle-scene motion semantic map as the output. During the fusion process, apply feature constraints, such as spatial consistency, semantic consistency, and motion consistency, to ensure that the fused feature map is logically reasonable. For example, ensure that the motion features correspond to the semantic features in spatial position. The fused feature map contains the macro semantic information of the scene and the motion information of the target vehicle, generating the target vehicle-scene motion semantic map. This map provides a comprehensive perspective for understanding the dynamic relationship between the scene and the target vehicle.
[0074] Through in-depth analysis of the scene environment feature map, the present invention enhances the scene understanding ability, can accurately identify key regions and understand the scene structure. The efficiency and accuracy of feature extraction are improved through sliding window feature extraction. By combining the attention distribution map and the local feature dataset, the scene area segmentation is optimized to generate the semantic scene macro feature map. The accuracy of moving target tracking is improved through the generation of temporal feature sequences and the modeling of spatio-temporal attention mechanisms, especially in complex dynamic scenes. The target vehicle motion feature map is further improved in accuracy based on the attention weight map. Through the feature constraint fusion technology, the deep fusion of the semantic scene macro feature map and the target vehicle motion feature map is realized, generating the target vehicle-scene motion semantic map, which enhances the comprehensive analysis ability of static and dynamic targets.
[0075] Preferably, step S3 includes the following steps:
[0076] Step S31: Perform spatio-temporal feature encoding on the target vehicle-scene motion semantic map to obtain a set of scene state vectors;
[0077] Specifically, the Python programming language can be used in conjunction with the deep learning library PyTorch to process spatio-temporal feature encoding. PyTorch provides flexible tensor operations and automatic differentiation capabilities, making it suitable for complex spatio-temporal feature encoding. Extract key spatio-temporal features from the target vehicle-scene motion semantic map, including the position, speed, acceleration of the target vehicle, as well as static and dynamic features in the scene. Design a spatio-temporal encoding network that can map the extracted spatio-temporal features into a high-dimensional space to form a scene state vector. This network includes convolutional layers to extract spatial features and recurrent layers (such as LSTM or GRU) to extract temporal features. For each time point, a scene state vector is obtained through the spatio-temporal encoding network, and these vectors are collected to form a set of scene state vectors. This set can represent the state of the scene at different time points. Examine the set of scene state vectors to ensure that each vector can accurately reflect the scene state at the corresponding time point, and that the vector set can capture the dynamic changes of the scene.
[0078] Step S32: Construct a dual-network architecture for the set of scene state vectors to obtain a parameter adjustment strategy-evaluation network; among them, the parameter adjustment strategy-evaluation network includes a parameter action generation network and a state value evaluation network;
[0079] Specifically, the Python programming language can be used in conjunction with the deep learning library PyTorch to construct a dual-network architecture. Design two deep neural networks: a parameter action generation network and a state value evaluation network. The parameter action generation network is responsible for generating actions for camera parameter adjustment based on the scene state vector, while the state value evaluation network is responsible for evaluating the value of these actions. This network includes multiple fully connected layers, with the input being the scene state vector and the output being the action space for parameter adjustment. Use supervised learning to train this network so that it can generate effective parameter adjustment actions. This network also includes multiple fully connected layers, with the input being the scene state vector and the parameter adjustment action, and the output being the value score of these actions. Use reinforcement learning to train this network so that it can evaluate the long-term value of the actions. Integrate these two networks into a dual-network architecture, where the output of the parameter action generation network is used as one of the inputs to the state value evaluation network. In this way, the state value evaluation network can not only evaluate the value of the actions but also provide feedback to guide the generation process of the parameter action generation network. Verify the performance of the dual-network architecture through a simulation environment to ensure that the parameter adjustment strategy-evaluation network can generate effective parameter adjustment strategies and can make dynamic adjustments according to changes in the scene state.
[0080] Step S33: Use the parameter action generation network to map the set of scene state vectors to the parameter action space to obtain an initial set of camera parameter actions;
[0081] Specifically, historical data can be used to train the parameter action generation network. This network can predict the parameter adjustment actions that should be performed under a given scene state by learning the association between the scene state vector and the camera parameter adjustment. The parameter action generation network is constructed and trained using the Python programming language in conjunction with the deep learning frameworks TensorFlow and Keras. The set of scene state vectors is used as the input, and these vectors contain the spatio-temporal features of the target vehicle and the scene. The parameter action generation network maps the scene state vector to a continuous action space through a series of fully connected layers and activation functions. For example, if the camera parameters include focal length, exposure time, and ISO, the network will output a three-dimensional vector representing the adjustment amounts of these three parameters. For each vector in the set of scene state vectors, the network generates a corresponding parameter adjustment action, forming an initial camera parameter action set. Check the initial camera parameter action set to ensure that each action is reasonable and matches the corresponding scene state vector.
[0082] Step S34: Use the state value evaluation network to evaluate the action value of the initial camera parameter action set, and obtain a camera parameter action value score set;
[0083] Specifically, reinforcement learning methods such as Q-learning or policy gradient methods can be used to train the state value evaluation network. This network learns to evaluate the value of performing specific parameter adjustment actions under a given scene state. The state value evaluation network is constructed and trained using the Python programming language in conjunction with the deep learning frameworks TensorFlow and Keras. The initial camera parameter action set and the corresponding scene state vectors are used as the input and provided to the state value evaluation network. The state value evaluation network calculates a value score for each parameter adjustment action through a series of fully connected layers and activation functions. This score reflects the expected effect of the action, such as the improvement of image quality or the accuracy of target tracking. For each action in the initial camera parameter action set, the network generates a corresponding value score, forming a camera parameter action value score set.
[0084] Step S35: Based on the camera parameter action value score set, perform policy gradient update on the parameter adjustment policy-evaluation network to obtain an optimized parameter adjustment policy-evaluation network;
[0085] Specifically, the Python environment can be configured, and the deep learning framework PyTorch and its related dependency libraries can be installed. Set up a PyTorch project and create a script to define and train the policy network. Define the parameter adjustment policy - the structure of the evaluation network. This network is a deep neural network, including an input layer, multiple hidden layers, and an output layer. The input layer receives the scene state vector, and the output layer outputs the value scores for each parameter adjustment action. Use the value score set obtained in step S34 as the training data. These data include parameter adjustment actions and their corresponding value scores, which are used to train the network to learn how to evaluate the value of actions. Define a loss function, usually using mean squared error (MSE) or cross - entropy loss, to measure the difference between the value scores output by the network and the actual value scores. Select an optimizer, such as Adam or RMSprop, to update the weights of the network. The optimizer adjusts the network parameters according to the gradients of the loss function to minimize the loss. In each training iteration, first calculate the output value scores of the network through forward propagation, and then calculate the loss function. Next, calculate the gradients of the loss with respect to the network parameters through backpropagation. Using the calculated gradients and a preset learning rate, the optimizer updates the weights of the network. This process aims to increase the probability of the network outputting actions with high value scores. Repeat the training process multiple times, updating the network parameters in each iteration until the network converges or reaches the preset number of iterations. Through multiple iterations of training and gradient updates, the network gradually learns the strategy of selecting the best parameter adjustment actions in different scene states, thus obtaining an optimized parameter adjustment policy - evaluation network.
[0086] Step S36: Use the optimized parameter adjustment policy - evaluation network to perform parameter mapping on the set of scene state vectors to obtain a set of camera parameter adjustment policies;
[0087] Specifically, the Python programming language can be used in combination with the deep learning framework PyTorch and the previously trained and optimized parameter adjustment policy - evaluation network. Input the set of scene state vectors obtained in step S31 into the optimized parameter adjustment policy - evaluation network. The network outputs a set of parameter adjustment actions according to each scene state vector. These actions are the camera parameter adjustments that the network considers to be optimal in the current scene state. For each vector in the set of scene state vectors, the network generates a corresponding parameter adjustment policy, forming a set of camera parameter adjustment policies. Apply these parameter adjustment policies to the actual camera system to guide the camera to make adaptive adjustments according to the scene state. Monitor the performance metrics of the camera, such as image clarity, target tracking accuracy, etc., to ensure that the camera performance is improved after applying the parameter adjustment policy.
[0088] Step S37: Screen the camera parameter adjustment policy set to obtain an initial parameter adjustment plan; perform prediction compensation on the initial parameter adjustment plan to obtain a real-time parameter adjustment strategy.
[0089] Specifically, for the detailed implementation process of this embodiment, please refer to the sub-steps of Step S37.
[0090] The present invention captures the dynamic changes of the scene through spatio-temporal feature encoding, improving the accuracy of parameter adjustment. By constructing a dual-network architecture, including a parameter action generation network and a state value evaluation network, the intelligence of policy generation is enhanced, and the quality and applicability of the adjustment strategy are improved. The selection of parameter actions is optimized through parameter action space mapping, while the state value evaluation network improves the efficiency of parameter adjustment and quickly identifies the most effective adjustment actions. The self-optimization of the strategy is achieved through policy gradient update, making the parameter adjustment strategy more accurate and efficient. The real-time performance of parameter adjustment is enhanced through the optimized parameter adjustment strategy-evaluation network, ensuring that the camera parameters can quickly respond to environmental changes.
[0091] Preferably, Step S37 includes the following steps:
[0092] Step S371: Collect historical adjustment effects of the camera parameter adjustment policy set to obtain historical adjustment effect data;
[0093] Specifically, a database system such as MySQL or MongoDB can be used to store and retrieve the historical data of camera parameter adjustment. This data includes the detailed information of each parameter adjustment, such as the image quality metrics, environmental conditions, adjustment strategies, etc. before and after the adjustment. Extract the records related to camera parameter adjustment from the database, including the description of the adjustment strategy, the objective quality metrics (such as clarity, contrast, noise level, etc.) and subjective scores (such as the results of user satisfaction surveys) of the adjusted images. Organize the collected data to form structured historical adjustment effect data. This data includes the unique identifier of each adjustment strategy, the adjusted parameters, environmental conditions, image quality metrics, and user scores.
[0094] Step S372: Construct a policy priority scoring model based on the historical adjustment effect data to obtain a camera policy scoring model;
[0095] Specifically, the Python programming language can be used in conjunction with the machine learning library scikit-learn to build a policy priority scoring model. Select features related to policy effects from historical adjustment effect data, such as adjustment parameters, environmental conditions, image quality metrics, and user ratings. Use regression analysis or classification algorithms (such as random forests, gradient boosting trees, etc.) to train the model. The input of the model is the selected features, and the output is the priority score of the policy. Evaluate the accuracy and generalization ability of the model through cross-validation and external validation. Use a portion of the data to train the model and another portion to test the predictive performance of the model. According to the validation results, adjust the model parameters and algorithms to optimize the predictive ability of the model.
[0096] Step S373: Use the camera policy scoring model to perform a priority scoring evaluation on the camera parameter adjustment policy set to obtain a camera policy priority sequence;
[0097] Specifically, the camera policy scoring model can be used to score each parameter adjustment policy. Select the Python programming language in conjunction with the machine learning library scikit-learn to load and apply the scoring model. Take the camera parameter adjustment policy set as the input, and these policies include different parameter adjustment actions, such as exposure, focal length, etc. For each policy in the policy set, extract relevant features and use the scoring model to score. The model outputs a score representing the priority of the policy. Generate a camera policy priority sequence based on the scores given by the model, where each policy is sorted from high to low according to its score. Check the priority sequence to ensure that the scoring logic is reasonable, and high-scoring policies correspond to the more optimal parameter adjustment actions expected.
[0098] Step S374: Sort and filter the camera parameter adjustment policy set according to the camera policy priority sequence to obtain an initial parameter adjustment plan;
[0099] Specifically, the Python programming language can be used to sort and filter the policies. Sort the policy set according to the camera policy priority sequence. The sorting can be in descending order to ensure that the policy with the highest score is ranked first. According to business requirements and resource limitations, select a certain number of policies from the sorted policy set as the initial parameter adjustment plan. For example, only select the top 10% of the policies. The selected policies constitute the initial parameter adjustment plan, and these policies are considered to have the greatest potential to improve camera performance.
[0100] Step S375: Perform a time series prediction on the initial parameter adjustment plan to obtain a camera parameter change trend graph;
[0101] Specifically, the time series prediction models in the time series analysis library such as statsmodels or the machine learning library scikit - learn, such as ARIMA (Autoregressive Integrated Moving Average Model) or LSTM (Long Short - Term Memory Network), can be used with the Python programming language. Collect historical data on camera parameter adjustments, including the time points of adjustments, parameter values, etc., to form a time series data set. Based on the historical data, train a time series prediction model. For example, use an LSTM network to learn the patterns of parameter changes over time and predict future parameter changes. Input the data in the initial parameter adjustment plan into the trained time series prediction model, and the model outputs the changing trends of camera parameters over a period of time in the future. According to the prediction results of the model, generate a graph of the changing trends of camera parameters, which shows the predicted curves of different parameters over time. By comparing with the actual data of camera parameter changes, verify the accuracy of the prediction, and adjust the model parameters as needed to improve the prediction accuracy.
[0102] Step S376: Compensate and correct the initial parameter adjustment plan according to the graph of the changing trends of camera parameters to obtain a real - time parameter adjustment strategy.
[0103] Specifically, the Python programming language can be used and combined with feedback control algorithms in control theory, such as the PID controller (Proportional - Integral - Derivative controller), to correct parameters according to the trend graph. Analyze the graph of the changing trends of camera parameters to identify whether the predicted parameter changes deviate from the expected trajectory. Based on the analysis results of the trend graph, calculate the required compensation amount. For example, if the predicted exposure time deviates from the target value, calculate the amount of exposure to be increased or decreased. According to the calculated compensation amount, make real - time adjustments to the parameters in the initial parameter adjustment plan. These adjustments can be executed immediately or planned to be executed at a certain future time point. The set of adjusted parameters constitutes the real - time parameter adjustment strategy.
[0104] By collecting historical adjustment effect data, the present invention improves the accuracy of strategy selection, enabling the system to select the best camera parameter adjustment strategy based on actual effects rather than just theoretical analysis. By constructing a camera strategy scoring model, the objectivity of strategy evaluation is enhanced, and the quality of strategies is evaluated based on actual effect data rather than subjective judgment. By using the scoring model to score and evaluate the priorities of the strategy set, the priority ranking of strategies is optimized, and the parameter adjustment strategy with the best chance of producing the best effect can be quickly identified, thereby improving the efficiency of parameter adjustment. By applying time series prediction, the accuracy of prediction is enhanced, the changing trends of camera parameters can be predicted, and adjustments can be made in advance. By compensating and correcting the initial parameter adjustment plan according to the predicted trend graph, dynamic compensation and correction are realized, which can dynamically adapt to environmental changes and maintain the real - time nature and effectiveness of parameter adjustment.
[0105] Preferably, step S4 includes the following steps:
[0106] Step S41: Extract key parameter control points from the real-time parameter adjustment strategy to obtain a camera parameter control sequence;
[0107] Specifically, the Python programming language can be used in conjunction with data analysis libraries such as Pandas to process and analyze the real-time parameter adjustment strategy. First, identify the key parameters that have the greatest impact on camera performance, such as focal length, exposure time, ISO sensitivity, etc. The selection of these parameters is based on camera performance metrics and expert experience. For each key parameter, extract the control points from the real-time parameter adjustment strategy. These control points define the adjustment range and target values of the parameter. For example, for the focal length, the control points include the trigger conditions for autofocus and the target distance. Arrange the control points of each key parameter in chronological order to form a camera parameter control sequence. This sequence guides how the camera adjusts its parameters in different situations.
[0108] Step S42: Perform three-dimensional parameter state space modeling on the camera to obtain a camera parameter space model;
[0109] Specifically, MATLAB or Python can be used in conjunction with computer vision libraries such as OpenCV and three-dimensional modeling tools such as Blender to construct a three-dimensional parameter state space model of the camera. Define the three-dimensional parameters of the camera, including physical parameters (such as focal length, aperture size) and environmental parameters (such as light intensity, scene depth). Construct a three-dimensional state space where each dimension represents a parameter and each point represents a parameter combination state. For example, one dimension represents different values of the focal length, and another dimension represents different values of the exposure time. Use a three-dimensional modeling tool to create a virtual camera model and define the adjustment range and mutual relationship of the parameters in the model. This model allows simulating the effects of parameter adjustment in a virtual environment.
[0110] Step S43: Evaluate the parameter coupling of the camera parameter control sequence to obtain a camera parameter correlation matrix;
[0111] Specifically, the Python programming language can be used in conjunction with statistical analysis libraries such as NumPy and SciPy to evaluate the coupling between parameters. Extract historical adjustment data of key parameters in the camera parameter control sequence from the database, including but not limited to focal length, exposure time, ISO sensitivity, etc. Use statistical methods, such as Pearson correlation coefficient or Spearman rank correlation coefficient, to evaluate the correlation between different parameters. Based on the results of the coupling analysis, construct a camera parameter correlation matrix. In this matrix, each element represents the strength of the correlation between two parameters, and the diagonal elements of the matrix represent the correlation of the parameter itself (always 1), and the off-diagonal elements represent the correlation between different parameters.
[0112] Step S44: Based on the camera parameter correlation matrix, construct a parameter linkage constraint equation to obtain a camera parameter linkage constraint model, and integrate the camera parameter space model and the camera parameter linkage constraint model to obtain a camera parameter combination model;
[0113] Specifically, data analysis software (such as the Pandas library in Python) can be used to analyze the camera parameter correlation matrix to identify strong correlations and potential dependencies between parameters. For example, it is found that under low light conditions, an increase in ISO sensitivity is usually accompanied by an adjustment of the shutter speed. Collect physical laws and empirical rules related to camera parameter adjustment. These rules are derived from photographic theory, camera technical manuals, or the experience sharing of professional photographers. Use MATLAB or Python in conjunction with the symbolic computation library SymPy to start constructing parameter linkage constraint equations. For example, there is a rule that "when the ISO sensitivity increases, the exposure time should be reduced to avoid overexposure". Translate this rule into a mathematical equation, such as ExposureTime = f(ISO), where f is a function defined based on empirical data. In SymPy, define symbolic variables to represent camera parameters, such as ISO, ExposureTime, etc., and use these symbolic variables to construct constraint equations. Ensure that these equations can accurately describe the linkage relationship between parameters. Integrate all the constructed constraint equations into a parameter linkage constraint model. This model can represent the complex dependencies between parameters at the symbolic level. Integrate the parameter linkage constraint model with the camera parameter space model. This involves applying the constraint equations to the parameter space model to ensure that all parameter adjustments satisfy physical limitations and coupling relationships. For example, integrate the linkage relationship between exposure time and ISO sensitivity into the parameter space model to ensure that when adjusting ISO, the exposure time can be automatically adjusted accordingly. Verify the integrated camera parameter combination model by simulating different shooting scenarios. Check whether the model can accurately guide parameter adjustment under different conditions to achieve the best shooting effect. This integration takes into account the physical limitations and coupling relationships of parameters and generates a comprehensive camera parameter combination model.
[0114] Step S45: Construct a fuzzy rule base for the camera parameter combination model to obtain a fuzzy control rule set;
[0115] Specifically, the Fuzzy Logic Toolbox of MATLAB or the Skfuzzy library of Python can be used to construct a fuzzy rule base. First, define fuzzy variables related to camera parameters, such as exposure time, ISO sensitivity, and focal length, etc., and define fuzzy sets for each variable, such as "low", "medium", and "high". Determine the membership functions for each fuzzy set, which describe the degree to which each exact value belongs to the fuzzy set. For example, for ISO sensitivity, define a triangular membership function, where 0 - 200 is "low", 200 - 400 is "medium", and 400 - 800 is "high". Based on expert knowledge and historical data, formulate fuzzy rules. For example, if the scene brightness is "low", then the ISO sensitivity should be set to "high"; if the scene brightness is "high", then the ISO sensitivity should be set to "low". Combine all the fuzzy rules into a fuzzy control rule set, which will be used for subsequent fuzzy inference operations.
[0116] Step S46: Perform fuzzy inference operations on the camera parameter combination model based on the fuzzy control rule set to obtain parameter linkage evaluation data;
[0117] Specifically, the Fuzzy Logic Toolbox of MATLAB or the Skfuzzy library of Python can be used to perform fuzzy inference operations. Fuzzify the specific parameter values in the real-time parameter adjustment strategy, that is, determine the membership degrees of these values in each fuzzy set. Use the fuzzy control rule set to perform inference operations on the fuzzified input values. This process involves fuzzy logic operations such as fuzzy AND, OR, and NOT, as well as the aggregation of fuzzy rules. The output of the inference operation is the fuzzy value of each parameter, which represents the recommended adjustment direction and degree of the parameter in the current scene. To convert the fuzzy value into a specific parameter adjustment value, apply defuzzification methods such as the centroid method or the maximum membership method to obtain specific parameter adjustment evaluation values. Integrate the evaluation values of each calculated parameter into parameter linkage evaluation data, which provides a quantitative basis for the specific adjustment of camera parameters.
[0118] Step S47: Optimize and iterate the camera parameter control sequence according to the parameter linkage evaluation data to obtain an optimized camera parameter control sequence, and perform parameter regulation on the camera according to the optimized camera parameter control sequence to obtain an optimized parameter regulation scheme.
[0119] Specifically, the Python programming language can be used in conjunction with an optimization algorithm library such as SciPy, which provides various optimization algorithms such as gradient descent or genetic algorithms. The camera parameter control sequence is optimized based on the parameter linkage evaluation data. For example, the gradient descent method is used to minimize image quality evaluation metrics such as mean squared error (MSE) or structural similarity index (SSIM). The parameter control sequence is adjusted iteratively, and after each adjustment, the image quality evaluation metric is used to evaluate the effect, and the control sequence is updated according to the evaluation result. The effectiveness of the optimization is verified by applying the optimized parameter control sequence to the camera in actual use and observing the change in image quality. After multiple iterations of optimization, an optimized camera parameter control sequence is obtained, which can maximize image quality or meet other performance metrics. The camera is subjected to real-time parameter regulation according to the optimized parameter control sequence, an optimized parameter regulation scheme is generated, and its effect is continuously monitored for further fine-tuning.
[0120] The present invention improves the accuracy of parameter control by extracting key parameter control points, enabling the system to accurately identify and adjust the parameters that have the greatest impact on the camera performance. The spatial awareness of parameter adjustment is enhanced through three-dimensional parameter state space modeling, making the relationship between parameters and the adjustment effect more intuitive and easy to manage. The synergy between parameters is optimized through parameter coupling evaluation and the construction of an association matrix, improving the overall effect of parameter adjustment. The efficiency and effect of parameter linkage are improved through the construction and integration of a parameter linkage constraint model, enabling efficient parameter linkage adjustment. The intelligence of parameter adjustment is enhanced through the construction of a fuzzy rule base and fuzzy inference operations, improving the flexibility and adaptability of parameter adjustment. The fast response of parameter adjustment is achieved through defuzzification processing, accelerating the response speed of parameter adjustment. The iterative optimization ability of parameter adjustment is improved through the optimization iteration based on parameter linkage evaluation data, continuously optimizing the parameter control sequence.
[0121] Preferably, step S5 includes the following steps:
[0122] Step S51: Perform intelligent parameter reconstruction on the camera according to the optimized parameter regulation scheme, and collect monitoring images of the camera after parameter reconstruction to obtain real-time monitoring images;
[0123] Specifically, the API or SDK of the camera can be used. These tools allow for programming to adjust the parameters of the camera, such as focal length, exposure, ISO, etc. According to the optimized parameter regulation scheme, the parameters of the camera are automatically adjusted by writing scripts or using control software. For example, if the scheme requires adjusting the exposure time to adapt to low-light environments, the exposure time parameter of the camera will be set through the API. After the parameter adjustment is completed, the camera is started to collect real-time monitoring images. This can be achieved by triggering the shutter of the camera or starting the continuous shooting mode. The collected image data is transmitted to the processing system through the data interface of the camera. These data streams are processed in real time to ensure the continuity and stability of the images.
[0124] Step S52: Extract the quality features of the real-time monitoring images to obtain an image quality feature set;
[0125] Specifically, an image processing library such as OpenCV can be used to extract the image quality features. The quality of the real-time monitoring images is evaluated, and features such as sharpness, contrast, and color saturation are extracted. For example, edge detection algorithms are used to evaluate the sharpness of the image, and histogram analysis is used to evaluate the contrast and color saturation. For each image, a series of quality feature values are calculated. For example, sharpness can be calculated through the edge response function (ERF) or the Laplacian operator, and contrast can be evaluated through the histogram distribution of the image. The quality feature values of each image are integrated into an image quality feature set. This set includes multiple quality features of multiple images.
[0126] Step S53: Input the image quality feature set into a preset image quality evaluation network for image quality evaluation to obtain image quality evaluation data;
[0127] Specifically, a deep learning model such as a convolutional neural network (CNN) can be used. This model has been trained to be able to evaluate the image quality. This model is trained using a large amount of labeled image data. The image quality feature set is used as the input data and input into the image quality evaluation network. These feature sets include features such as the sharpness, contrast, and color saturation of the image. The image quality evaluation network processes the input feature sets. Through the multi-layer structure of the network, an evaluation result is finally output. This result is a score or a probability distribution, indicating the quality level of the image. The image quality evaluation data output by the network is a quantitative index, which can be a score from 0 to 5 or a percentage from 0 to 100, depending on the design and training method of the network. By comparing the evaluation data output by the network with the results of manual evaluation, the accuracy of the network evaluation is verified. If the results of the network evaluation are consistent with the manual evaluation, it indicates that the network can accurately evaluate the image quality.
[0128] Step S54: Quantitatively map the image quality assessment data to obtain an image quality assessment feature vector;
[0129] Specifically, the Python programming language can be used in conjunction with data processing libraries such as Pandas and NumPy to perform the quantitative mapping of the evaluation metrics. According to the preset quantization rules, map the image quality assessment data to a quantized feature space. For example, if the assessment data is a score from 0 to 5, map it to an interval from 0 to 1. Construct a feature vector from the quantized evaluation metrics. This vector contains multiple quantized metrics of the image quality, such as sharpness score, contrast score, etc. Verify the effectiveness of the quantitative mapping by analyzing the changes in the feature vector. If the feature vector can accurately reflect the changing trend of the image quality, it indicates that the quantitative mapping is successful.
[0130] Step S55: Based on the real-time monitoring image, identify the sensitivity of the camera parameters to the image quality assessment feature vector to obtain a set of sensitive camera parameters, and rank the set of sensitive camera parameters to obtain a camera parameter regulation and optimization sequence;
[0131] Specifically, the Python programming language can be used in conjunction with statistical analysis libraries such as Statsmodels for sensitivity analysis. First, perform a correlation analysis between the image quality assessment feature vector and the camera parameters. This includes analyzing the degree of influence of each parameter change on the image quality metrics. Use regression analysis or machine learning models (such as random forests) to identify which parameters are most sensitive to the image quality. The model will evaluate the impact of each parameter change on the image quality metrics and give a sensitivity score. Based on the sensitivity scores, rank the set of sensitive camera parameters. The parameter with the highest priority will be considered for adjustment first because it has the greatest impact on the image quality. Generate a camera parameter regulation and optimization sequence according to the priority ranking of the parameters. This sequence adjusts the camera parameters in the order of priority to optimize the image quality. Verify the effectiveness of the sensitivity identification and priority ranking by simulating or actually adjusting the camera parameters and observing the changes in the image quality.
[0132] Step S56: Update the parameters of the optimized parameter regulation scheme according to the camera parameter regulation and optimization sequence to obtain the final camera configuration parameters.
[0133] Specifically, the API or SDK of the camera can be used to perform dynamic updates of parameters. According to the camera parameters, the optimization sequence is adjusted. By writing scripts or using control software, the camera parameters are automatically adjusted in the order of priority. The camera parameters are adjusted dynamically. After each adjustment, the image is re - acquired, and the image quality evaluation network is used to evaluate the quality of the new image. According to the new image quality evaluation data, the optimization parameter adjustment scheme is updated. This involves adjusting the values of the parameters or changing the order of parameter adjustment. After a series of dynamic adjustments and evaluations, the final camera configuration parameters are determined. These parameters not only meet the image quality requirements but also consider other factors in practical applications, such as response speed and system stability. The effectiveness of the final configuration parameters is verified by continuously monitoring the camera performance and image quality. If necessary, the parameters can be adjusted again according to the new data.
[0134] The present invention improves the real - time performance and quality of image acquisition through intelligent parameter reconstruction, ensuring that the camera can quickly adjust parameters and acquire high - definition real - time monitoring images, thereby improving the response speed of the monitoring system. By extracting and evaluating the quality features of real - time monitoring images, the image quality can be objectively quantified. Through the quantization mapping of evaluation indicators and the generation of image quality evaluation feature vectors, the image quality can be analyzed in detail and the accuracy of evaluation can be improved. Through the identification of camera parameter sensitivity and priority sorting based on the image quality evaluation feature vectors, the parameters that have the greatest impact on the image quality can be identified and adjusted preferentially, optimizing the efficiency and effect of parameter adjustment. By dynamically iteratively optimizing the parameters, the camera configuration parameters can always be kept in the best state.
[0135] Preferably, the present invention also provides a camera adaptive adjustment system for executing the camera adaptive adjustment method as described above. The camera adaptive adjustment system includes:
[0136] An environmental feature recognition module, which is used to obtain a multi - source environmental sensing data set and an initial environmental image; perform environmental feature recognition on the initial environmental image according to the multi - source environmental sensing data set to obtain a scene environmental feature map;
[0137] A target tracking module, which is used to perform semantic scene segmentation on the scene environmental feature map to obtain a semantic scene macro feature map; perform temporal attention target tracking on the scene environmental feature map to obtain a target vehicle motion feature map; perform feature - constrained fusion on the semantic scene macro feature map and the target vehicle motion feature map to obtain a target vehicle - scene motion semantic map;
[0138] An adjustment strategy generation module, configured to adjust the parameters of the camera according to the target vehicle-scenario motion semantic map to obtain a set of camera parameter adjustment strategies; screen the set of camera parameter adjustment strategies to obtain an initial parameter adjustment plan; perform prediction compensation on the initial parameter adjustment plan to obtain a real-time parameter adjustment strategy;
[0139] A feedback control adjustment module, configured to perform multi-parameter linkage modeling on the camera based on the real-time parameter adjustment strategy to obtain a camera parameter combination model; evaluate the camera parameter combination model with a fuzzy controller to obtain parameter linkage evaluation data; perform feedback control adjustment according to the parameter linkage evaluation data to obtain an optimized parameter regulation plan;
[0140] A parameter update module, configured to perform intelligent parameter reconstruction and image acquisition on the camera according to the optimized parameter regulation plan to obtain a real-time monitoring image; evaluate the quality of the real-time monitoring image to obtain image quality evaluation data; update the parameters of the optimized parameter regulation plan according to the image quality evaluation data to obtain the final camera configuration parameters.
[0141] Preferably, a computer-readable storage medium stores a camera adaptive adjustment method that can be loaded and executed by a processor as described above.
[0142] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the application document are intended to be included in the present invention.
[0143] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A camera self - adaptive adjustment method, characterized in that, It includes the following steps: Step S1: Obtain a multi-source environmental sensing data set and an initial environmental image; identify environmental features of the initial environmental image according to the multi-source environmental sensing data set to obtain a scene environmental feature map; Step S2: Perform semantic scene segmentation on the scene environmental feature map to obtain a semantic scene macro feature map; Perform temporal attention object tracking on the scene environmental feature map to obtain a target vehicle motion feature map; perform feature constraint fusion on the semantic scene macro feature map and the target vehicle motion feature map to obtain a target vehicle-scene motion semantic map; Step S3: Adjust the parameters of the camera according to the target vehicle-scene motion semantic map to obtain a camera parameter adjustment strategy set; screen the camera parameter adjustment strategy set to obtain an initial parameter adjustment plan; perform prediction compensation on the initial parameter adjustment plan to obtain a real-time parameter adjustment strategy; Step S4: Perform multi-parameter linkage modeling on the camera based on the real-time parameter adjustment strategy to obtain a camera parameter combination model; evaluate the camera parameter combination model with a fuzzy controller to obtain parameter linkage evaluation data; Perform feedback control adjustment according to the parameter linkage evaluation data to obtain an optimized parameter regulation plan; Step S5: Reconstruct the intelligent parameters of the camera and collect images according to the optimized parameter regulation plan to obtain a real-time monitoring image; evaluate the quality of the real-time monitoring image to obtain image quality evaluation data; update the parameters of the optimized parameter regulation plan according to the image quality evaluation data to obtain the final camera configuration parameters.
2. The camera adaptive adjustment method according to claim 1, wherein Step S1 includes the following steps: Step S11: Collect environmental parameters of the environment where the camera is located to obtain a multi-source environmental sensing data set; among them, the multi-source environmental sensing data set includes an illumination intensity data stream and a depth measurement data stream; Step S12: Collect a range image of the environment where the camera is located to obtain an initial environmental image; Step S13: Compensate and enhance the illumination of the initial environmental image according to the illumination intensity data stream to obtain an environment-enhanced illumination feature map; Step S14: Calibrate the distance gradient of the initial environmental image according to the depth measurement data stream to obtain an environment-calibrated depth measurement map; Step S15: Perform feature fusion on the environment-enhanced illumination feature map and the environment-calibrated depth measurement map to obtain a scene environmental feature map.
3. The camera adaptive adjustment method according to claim 2, wherein Step S14 includes the following steps: Step S141: Perform bilateral filtering on the initial environmental image according to the depth measurement data stream to obtain a filtered environmental image; Step S142: Calculate the depth gradient of the filtered environmental image to obtain a spatial depth gradient map; Step S143: Construct a depth calibration transformation matrix according to the spatial depth gradient map to obtain an image depth calibration parameter set; Step S144: Perform perspective transformation correction on the filtered environmental image by using the image depth calibration parameter set to obtain an environment depth correction map; Step S145: Perform three-dimensional space reconstruction on the environment depth correction map to obtain an environment-calibrated depth measurement map.
4. The camera self - adaptive adjustment method according to claim 1, wherein, Step S2 includes the following steps: Step S21: Decompose the scene environmental feature map to obtain an environmental scene scale feature set; Step S22: Calculate the regional importance of the scene environmental feature map based on the environmental scene scale feature set to obtain the environmental scene attention distribution map; Step S23: Extract sliding window features from the environmental scene attention distribution map to obtain the scene local feature data set; Step S24: Segment the scene environmental feature map according to the environmental scene attention distribution map and the scene local feature data set to obtain the semantic scene macro feature map; Step S25: Generate a time-series feature sequence for the scene environmental feature map to obtain a moving target time-series feature set; Step S26: Build a spatio-temporal attention mechanism model for the moving target time-series feature set to obtain the target vehicle attention weight map; Step S27: Locate the moving target based on the target vehicle attention weight map in the moving target time-series feature set to obtain the target vehicle motion feature map; Step S28: Perform feature constraint fusion on the semantic scene macro feature map and the target vehicle motion feature map to obtain the target vehicle-scene motion semantic map.
5. The camera self - adaptive adjustment method according to claim 1, characterized in that Step S3 includes the following steps: Step S31: Perform spatio-temporal feature encoding on the target vehicle-scene motion semantic map to obtain the scene state vector set; Step S32: Build a dual-network architecture for the scene state vector set to obtain the parameter adjustment strategy-evaluation network; among them, the parameter adjustment strategy-evaluation network includes a parameter action generation network and a state value evaluation network; Step S33: Use the parameter action generation network to map the scene state vector set to the parameter action space to obtain the initial camera parameter action set; Step S34: Use the state value evaluation network to evaluate the action value of the initial camera parameter action set to obtain the camera parameter action value score set; Step S35: Update the policy gradient of the parameter adjustment strategy-evaluation network based on the camera parameter action value score set to obtain the optimized parameter adjustment strategy-evaluation network; Step S36: Use the optimized parameter adjustment strategy-evaluation network to map the scene state vector set to obtain the camera parameter adjustment strategy set; Step S37: Screen the camera parameter adjustment strategy set to obtain the initial parameter adjustment plan; perform prediction compensation on the initial parameter adjustment plan to obtain the real-time parameter adjustment strategy.
6. The camera adaptive adjustment method according to claim 5, wherein Step S37 includes the following steps: Step S371: Collect the historical adjustment effects of the camera parameter adjustment strategy set to obtain the historical adjustment effect data; Step S372: Build a policy priority scoring model based on the historical adjustment effect data to obtain the camera policy scoring model; Step S373: Use the camera policy scoring model to evaluate the priority of the camera parameter adjustment strategy set to obtain the camera policy priority sequence; Step S374: Sort and screen the camera parameter adjustment strategy set according to the camera policy priority sequence to obtain the initial parameter adjustment plan; Step S375: Perform time-series prediction on the initial parameter adjustment plan to obtain the camera parameter change trend graph; Step S376: Compensate and correct the initial parameter adjustment plan according to the camera parameter change trend graph to obtain the real-time parameter adjustment strategy.
7. The camera self - adaptive adjustment method according to claim 1, wherein, Step S4 includes the following steps: Step S41: Extract key parameter control points from the real-time parameter adjustment strategy to obtain a camera parameter control sequence; Step S42: Perform three-dimensional parameter state space modeling on the camera to obtain a camera parameter space model; Step S43: Evaluate the parameter coupling of the camera parameter control sequence to obtain a camera parameter correlation matrix; Step S44: Based on the camera parameter correlation matrix, construct a parameter linkage constraint equation to obtain a camera parameter linkage constraint model, and integrate the camera parameter space model and the camera parameter linkage constraint model to obtain a camera parameter combination model; Step S45: Construct a fuzzy rule base for the camera parameter combination model to obtain a set of fuzzy control rules; Step S46: Perform fuzzy inference operations on the camera parameter combination model based on the set of fuzzy control rules to obtain parameter linkage evaluation data; Step S47: Optimize and iterate the camera parameter control sequence according to the parameter linkage evaluation data to obtain an optimized camera parameter control sequence, and adjust the camera parameters according to the optimized camera parameter control sequence to obtain an optimized parameter adjustment scheme.
8. The camera adaptive adjustment method according to claim 1, wherein Step S5 includes the following steps: Step S51: Reconstruct the camera's intelligent parameters according to the optimized parameter adjustment scheme, and collect monitoring images of the camera after parameter reconstruction to obtain real-time monitoring images; Step S52: Extract quality features from the real-time monitoring images to obtain an image quality feature set; Step S53: Input the image quality feature set into a preset image quality evaluation network for image quality evaluation to obtain image quality evaluation data; Step S54: Perform quantization mapping of evaluation indicators on the image quality evaluation data to obtain an image quality evaluation feature vector; Step S55: Identify the sensitivity of camera parameters to the image quality evaluation feature vector based on the real-time monitoring images to obtain a set of sensitive camera parameters, and sort the set of sensitive camera parameters by priority to obtain a camera parameter adjustment optimization sequence; Step S56: Update the parameters of the optimized parameter adjustment scheme according to the camera parameter adjustment optimization sequence to obtain the final camera configuration parameters.
9. A camera adaptive adjustment system, characterized in that, A camera adaptive adjustment system for executing the camera adaptive adjustment method as described in claim 1, the camera adaptive adjustment system comprising: An environmental feature recognition module, configured to obtain a multi-source environmental sensing data set and an initial environmental image; perform environmental feature recognition on the initial environmental image according to the multi-source environmental sensing data set to obtain a scene environmental feature map; A target tracking module, configured to perform semantic scene segmentation on the scene environmental feature map to obtain a semantic scene macro feature map; perform temporal attention target tracking on the scene environmental feature map to obtain a target vehicle motion feature map; perform feature constraint fusion on the semantic scene macro feature map and the target vehicle motion feature map to obtain a target vehicle-scene motion semantic map; An adjustment strategy generation module, configured to adjust the camera parameters according to the target vehicle-scene motion semantic map to obtain a set of camera parameter adjustment strategies; screen the set of camera parameter adjustment strategies to obtain an initial parameter adjustment scheme; perform prediction compensation on the initial parameter adjustment scheme to obtain a real-time parameter adjustment strategy; A feedback control adjustment module, configured to perform multi-parameter linkage modeling on a camera based on a real-time parameter adjustment strategy to obtain a camera parameter combination model; evaluate the camera parameter combination model using a fuzzy controller to obtain parameter linkage evaluation data; perform feedback control adjustment based on the parameter linkage evaluation data to obtain an optimized parameter regulation scheme; A parameter update module, configured to perform intelligent parameter reconstruction and image acquisition on the camera according to the optimized parameter regulation scheme to obtain a real-time monitoring image; evaluate the quality of the real-time monitoring image to obtain image quality evaluation data; update the parameters of the optimized parameter regulation scheme according to the image quality evaluation data to obtain the final camera configuration parameters.
10. A computer-readable storage medium storing a camera adaptive adjustment method that can be loaded and executed by a processor as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Dynamic automatic exposure control method and device, and electronic equipment
CN111246091A
Camera automatic tracking method and system based on holder control
CN118394134A