Intelligent control method based on automatic focusing and exposure of camera
Through multi-sensor data fusion and intelligent control methods, the problem of camera image quality degradation in complex environments is solved, intelligent adaptive imaging control is achieved, and image clarity and system reliability are improved.
Patent Information
- Application Number
- CN202511002560.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-21
AI Technical Summary
Traditional camera autofocus and exposure control systems have difficulty adapting to complex and changing environments and are unable to adjust parameters in a timely and effective manner, resulting in a decline in image quality. Especially when the camera is in an unstable state, image clarity and stability are difficult to guarantee.
Through multi-sensor data fusion, the camera's working status is monitored in real time, a temperature-focal length mapping relationship is established for temperature-compensated focus adjustment, vibration characteristics are analyzed to dynamically adjust anti-shake parameters, image quality characteristics are extracted to evaluate focus status, and reinforcement learning algorithms are applied to optimize focus strategies. Exposure parameters are adaptively adjusted according to scene characteristics, and working status change trends are predicted to achieve forward-looking control.
Maintain image clarity and stability in complex and changing environments, improve the camera's adaptability to different scenarios, achieve intelligent adaptive imaging control, and significantly improve image quality and system reliability.
Smart Images

Figure CN120751254A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera intelligent control, and in particular to an intelligent control method based on automatic focus and exposure of a camera. Background Art
[0002] Camera technology plays a vital role in security surveillance, industrial inspection, medical imaging, and other fields, and autofocus and exposure control are core functions for ensuring image quality. As application scenarios become more diverse and complex, traditional camera autofocus and exposure control systems face severe challenges and struggle to adapt to the demands of diverse environments.
[0003] Current mainstream camera automatic control systems rely primarily on image content analysis to adjust parameters. This approach works well under ideal conditions, but has significant limitations in complex and changing real-world environments. In particular, when the camera is unstable, relying solely on image content feedback often fails to effectively and timely adjust focus and exposure parameters, resulting in degraded image quality.
[0004] There's a complex relationship between a camera's operating status and image quality. Ambient temperature fluctuations can cause optical components to expand or contract, directly impacting focal length accuracy. If these physical changes aren't compensated for promptly, image clarity can degrade. Furthermore, the inevitable vibration and instability of cameras in real-world applications can make it difficult for traditional focusing algorithms to lock onto optimal focus, further degrading image quality. This relationship between operating status and imaging parameters is often overlooked in existing systems, which lack effective monitoring and response mechanisms.
[0005] Therefore, how to integrate the real-time working status information of the camera into the autofocus and exposure control system, establish an intelligent mapping relationship between the working status and imaging parameters, and achieve stable and high-quality imaging in various complex environments has become a key issue in the field of camera intelligent control. Summary of the Invention
[0006] The present invention provides an intelligent control method based on automatic focus and exposure of a camera, which mainly includes:
[0007] Collect multi-sensor data, including temperature data, acceleration data, light data, and humidity data; fuse the multi-sensor data to construct a working status data set; establish an optical element thermal expansion model based on the temperature data in the working status data set, calculate the influence coefficient of temperature change on focal length, and trigger a focal length compensation mechanism when the temperature change exceeds a preset threshold; extract acceleration sensor data from the working status data set, identify vibration mode and intensity through vibration spectrum analysis, and dynamically adjust anti-shake parameters; perform real-time analysis on the collected images, extract image quality features, construct a multi-dimensional feature vector based on the working status data set, and generate a focus status score; dynamically adjust the focus search strategy based on the focus status score and environmental parameters in the working status data set; calculate optimal exposure parameters based on the illumination data and image brightness histogram in the working status data set, combined with the focus status score; extract historical data from the working status data set, establish a time series prediction model, predict the trend of camera state changes, and adjust focus parameters and exposure parameters in advance.
[0008] Furthermore, the fusion processing of the multi-sensor data includes: using median filtering to remove pulse noise from the original signal; standardizing the filtered data; resampling other sensor data based on the acceleration data as the reference time axis; checking the timestamp deviation of each sensor and performing phase compensation on the data segment with a delay exceeding a preset time; calculating the signal-to-noise ratio of each sensor data in the sliding window; establishing a Kalman filter state vector, which includes four dimensions: temperature, acceleration root mean square value, light intensity, and humidity; and performing outlier detection on the fused state vector.
[0009] Furthermore, the thermal expansion model of the optical element is established based on the temperature data in the working status data set, including: obtaining the thermal expansion coefficient of the materials of each component of the optical system; establishing a physical model of the influence of temperature change on focal length; obtaining the temperature-focal length mapping function by least squares fitting; applying the Kalman filter algorithm to the original temperature signal to eliminate random fluctuations; calculating the ideal focal length value at the current temperature; converting the compensation amount into a stepper motor control signal; collecting image comparison data before and after compensation, and calculating the image clarity score.
[0010] Furthermore, the acceleration sensor data is extracted from the working status data set, and the vibration mode and intensity are identified through vibration spectrum analysis, including: using a Butterworth low-pass filter to remove high-frequency noise; performing a fast Fourier transform on the time domain vibration signal to obtain a vibration spectrum diagram; extracting the main frequency components and energy distribution from the spectrum diagram; calculating the vibration intensity value based on the sum of the vibration spectrum energy; querying the preset anti-shake parameter mapping table based on the vibration characteristic vector; when the vibration intensity exceeds the medium level, calculating the new exposure time according to the inverse function of the vibration intensity and the exposure time.
[0011] Furthermore, the real-time analysis of the captured image and the extraction of image quality features include: calculating the image edge clarity value through the Laplace operator; calculating the histogram distribution of the original image and using the standard deviation of the pixel brightness as the contrast value; analyzing the image HSV color space and calculating the S channel average value to obtain the color saturation index; reading the environmental parameters in the working status data set and combining them with the image quality index to construct a feature vector; the feature vector is normalized and then input into the convolutional neural network model; and the convolutional neural network output layer generates a focus quality score.
[0012] Furthermore, the focus search strategy is dynamically adjusted based on the focus status score and the environmental parameters in the working status data set, including: normalizing the data set using the Z-score method to output a standardized feature vector; constructing a state space model based on the feature vector; updating the state-action value table using the Q-learning algorithm; when the vibration intensity exceeds a preset value, setting the search step size to a preset proportion of the previous state and increasing the sampling frequency; monitoring the temperature change rate, and if it exceeds a preset threshold, expanding the focus search range; and adjusting the contrast threshold when the light intensity change exceeds a preset value.
[0013] Furthermore, the optimal exposure parameters are calculated based on the illumination data and image brightness histogram in the working status data set, combined with the focus status score, including: using an image processing library to calculate the image brightness histogram; detecting the histogram peak through a signal processing function, and recording the peak interval and distribution standard deviation; inputting the histogram standard deviation and the focus score into an optimizer, and outputting the exposure time and gain combination that minimizes the loss function; performing regional segmentation on the image and calculating the brightness difference coefficient of each region; when the brightness difference coefficient exceeds a preset threshold, it is determined to be a high-contrast scene; according to the histogram peak, multiple exposure values are calculated and images are collected separately; multi-exposure image alignment is performed using feature point matching, and fusion is achieved through the Laplacian pyramid.
[0014] Furthermore, historical data is extracted from the working status data set to establish a time series prediction model, including: reading the camera operation data within the past preset time; calculating the scene brightness change rate, focus distance change rate and camera movement speed for each frame of data; using a sliding window to process data; inputting the sample set into a long short-term memory neural network; the model outputs the predicted change amount of focus and exposure parameters within the future preset time; constructing a loss function including the parameter change amplitude and image difference; using a gradient descent optimizer to generate a parameter adjustment sequence; adjusting the camera parameters in advance according to the time nodes of the adjustment sequence; calculating the mean square error between the predicted value and the actual value, and triggering model retraining when the error continuously exceeds the threshold.
[0015] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0016] This invention discloses an intelligent control method and system for camera autofocus and exposure. The system monitors the camera's operating status in real time through multi-sensor data fusion, establishes a temperature-focal length mapping relationship for temperature-compensated focus adjustment, analyzes vibration characteristics to dynamically adjust anti-shake parameters, extracts image quality characteristics to assess focus status, applies a reinforcement learning algorithm to optimize focus strategies, adaptively adjusts exposure parameters based on scene characteristics, predicts operating state trends for proactive control, identifies the operating environment to automatically configure optimal parameters, and continuously learns and optimizes parameter adjustment strategies. This system can maintain image clarity and stability in complex and changing environments, improve the camera's adaptability to different scenarios, implement intelligent adaptive imaging control, and significantly enhance image quality and system reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The present invention is a flow chart of an intelligent control method and system based on automatic focus and exposure of a camera. DETAILED DESCRIPTION
[0018] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] like Figure 1 In this embodiment, an intelligent control method based on camera autofocus and exposure may specifically include:
[0020] Step S101: Multi-sensor data acquisition and fusion: Multi-sensor fusion technology is used to collect real-time camera operating status information. This includes temperature sensors monitoring optical component temperature changes, acceleration sensors detecting vibration, illumination sensors measuring ambient light intensity, and humidity sensors monitoring ambient humidity. The collected data is time-synchronized and standardized to construct a unified camera operating status dataset, providing basic data input for subsequent modules.
[0021] Raw voltage signals were acquired from the temperature sensor, accelerometer, light sensor, and humidity sensor, with sampling frequencies of 10 Hz, 100 Hz, 1 Hz, and 5 Hz, respectively. Median filtering was applied to the raw signals to remove impulse noise, with a threshold set at three times the median absolute deviation. Data points exceeding the threshold were filled with the mean of the two preceding and following points. The filtered temperature, acceleration, light, and humidity data were each subjected to min-max normalization, mapping the values to the range of 0 to 1. Using the 100 Hz acceleration data as the reference time axis, the 10 Hz temperature data was linearly interpolated to 100 Hz, the 1 Hz light data was extended to 100 Hz using nearest neighbor interpolation, and the 5 Hz humidity data was resampled to 100 Hz using cubic spline interpolation. The timestamp offset of each sensor was checked, and phase compensation was performed on data segments with delays exceeding 10 milliseconds. The signal-to-noise ratio (SNR) of each sensor data was calculated within a 30-second sliding window. The signal power was calculated as the square of the window mean, and the noise power was calculated as the window variance. The variance change rate of temperature data over a 5-minute period is analyzed. Any value exceeding a preset threshold of 0.05 is marked as unstable. The light data distribution is tested for conformance to a Weibull distribution, with a KS test p-value less than 0.01 identifying an abnormal pattern. Sensor reliability is classified into three levels: A, B, and C based on three metrics. A Kalman filter state vector is constructed, encompassing four dimensions: temperature, RMS acceleration, light intensity, and humidity. The state transition matrix is set to the identity matrix, with the diagonal elements of the observation matrix corresponding to sensor reliability levels A = 0.9, B = 0.7, and C = 0.5. The state estimate is updated every 100 milliseconds, and the fused device state vector is output. The Pearson correlation coefficient between light intensity and temperature is calculated with a sliding window of 300 seconds. When the absolute value of the correlation coefficient is greater than 0.8, a linear regression model is constructed for humidity and optical component temperature. An environmental anomaly flag is triggered when the residual exceeds 2 standard deviations. A 3σ outlier check is performed on the fused state vector, triggering an alarm when the temperature exceeds 35°C or the RMS acceleration exceeds 0.5g. An abnormal environment is identified when the rate of change in light intensity exceeds 100 lux per second or the rate of change in humidity exceeds 5% per minute. The optical stability index is calculated as the integral of the acceleration frequency energy in the 50-200 Hz frequency band. The combined temperature and humidity index is the product of the temperature value and the logarithm of the relative humidity. The mechanical stability score is based on the ratio of the peak acceleration to the fundamental frequency amplitude. The final health score is a weighted sum of the three indicators, with weights of 0.4, 0.3, and 0.3, respectively.
[0022] In one embodiment, a multi-sensor fusion system was built to monitor the working environment of precision optical equipment. The system integrated sensors with different sampling frequencies: temperature (10 Hz), acceleration (100 Hz), light (1 Hz), and humidity (5 Hz).
[0023] Specifically, the original signal is first processed by median filtering.
[0024] For example, when a temperature sensor experiences a transient spike of 35.7°C (with the preceding and following data points at 23.2°C and 23.5°C, respectively), the system determines that this point exceeds the 3x median absolute deviation threshold and automatically replaces it with 23.35°C. This processing effectively eliminates impulse noise caused by electromagnetic interference.
[0025] It should be noted that to unify the data timeline, the system resamples acceleration data based on 100Hz. Temperature data is scaled from 10Hz to 100Hz using linear interpolation to maintain smooth temperature changes. Light data is scaled from 1Hz to 100Hz using nearest neighbor interpolation, which is suitable for handling step-change lighting conditions. Humidity data is resampled from 5Hz to 100Hz using cubic spline interpolation to preserve the curvilinear characteristics of humidity changes.
[0026] For example, in sensor reliability assessment, the system calculates the signal-to-noise ratio within a 30-second sliding window. When the light sensor has a mean of 500 lux and a variance of 25 within the window, the signal-to-noise ratio is calculated to be 10,000 / 25 = 400, indicating good signal quality. However, when the accelerometer is subject to mechanical vibration, its signal-to-noise ratio may drop below 5, and the system will downgrade its reliability to Class C (0.5).
[0027] In one possible implementation, a Kalman filter fuses data from four sensors.
[0028] For example, when the temperature sensor (Grade A, 0.9) shows 24.5°C, and the vibration-affected accelerometer (Grade C, 0.5) shows an abnormally high RMS value of 0.8g, the filter will give higher confidence to the temperature data based on the reliability weight, resulting in a more accurate state estimate.
[0029] The system also establishes a correlation model between environmental parameters. When the Pearson correlation coefficient between light and temperature reaches 0.85, the system establishes a linear regression model between humidity and optical element temperature to predict the normal humidity value. If the actual humidity deviates from the predicted value by more than 2 standard deviations, the system triggers an environmental anomaly flag, indicating a possible condensation risk.
[0030] Step S102, Temperature Compensated Focus Adjustment: Based on the temperature data from the multi-sensor dataset, a thermal expansion model for the optical components is established to calculate the effect of temperature change on focal length. When a temperature change exceeding a preset threshold of 2°C is detected, the focal length compensation mechanism is automatically triggered. Based on a pre-established temperature-focal length mapping, the focal length parameters are fine-tuned in real time to offset focus shifts caused by temperature changes and maintain image clarity. The temperature-compensated focal length parameters are recorded alongside the original focal length parameters in the operating status dataset for subsequent analysis.
[0031] The thermal expansion coefficients of the materials of each optical system component are obtained. Combined with the distance between optical elements and the refractive index parameters, a physical model for the effect of temperature change on focal length is established. This physical model uses linear regression, with temperature change as the independent variable and focal length change as the dependent variable. A temperature-focal length mapping function is obtained through least squares fitting, optimized using the Python Scipy library. The temperature sensor data stream is read and the raw temperature signal is subjected to a Kalman filter algorithm to eliminate random fluctuations. The filtering process is implemented using the Python FilterPy library. The difference between the filtered temperature value and the previous temperature value is calculated using the formula: current temperature minus previous temperature value. A determination is made as to whether the temperature change exceeds a preset threshold. If so, focal length compensation is applied. The filtered temperature value is substituted into the mapping function to calculate the ideal focal length at the current temperature. This is then compared with the actual focal length to determine the focal length compensation. The compensation is converted into a pulse-width modulated control signal for the stepper motor. The stepper motor receives the control signal, driving the focus ring to adjust the lens position according to the calculated compensation. After adjustment is complete, the actual displacement is fed back, and the deviation between the actual compensation value and the theoretical compensation value is recorded. The deviation is calculated as the actual compensation value minus the theoretical compensation value. Image comparison data before and after compensation is collected, and the image clarity score is calculated using the Laplace operator. The scoring formula is the sum of the second-order derivatives of the image grayscale values. The relationship between the clarity score and the temperature change is plotted as a scatter plot using the Python Matplotlib library. The temperature-clarity impact model is updated using a linear regression model with the temperature change as the independent variable and the clarity score as the dependent variable. The focus drift trend after multiple consecutive compensations is monitored. If the drift direction is consistent and the amplitude is increasing, a self-learning mechanism is triggered. The self-learning mechanism uses a gradient descent method to adjust the influence coefficients in the temperature-focal length mapping function to reduce cumulative error. The temperature change process, focal length parameters before and after compensation, image clarity scores, and mapping function revision history are recorded to construct a temperature adaptability database for the optical system, which serves as basic data for optical component aging analysis and predictive maintenance.
[0032] In one embodiment, a high-precision astronomical observation system uses temperature adaptive focusing technology. The system integrates multiple optical components, including a primary mirror (quartz glass, thermal expansion coefficient 0.55×10⁻ 6 / ℃) and secondary mirror (aluminum alloy, thermal expansion coefficient 23×10⁻ 6 / ℃). The system achieves precise autofocus compensation by establishing a physical model of temperature and focal length changes.
[0033] Specifically, the system first obtains the material parameters and initial position data of each optical element.
[0034] For example, the initial distance between the primary and secondary mirrors is 500mm, and the focal length of the primary mirror is 1200mm. Experimental measurements show that for every 1°C increase in ambient temperature, the distance between the primary and secondary mirrors increases by approximately 0.011mm, resulting in a change in focal length of approximately 0.025mm. The system uses the least squares method to fit the temperature-focal length mapping function: ΔF = 0.025 × ΔT + 0.002, where ΔF is the focal length change (mm) and ΔT is the temperature change (°C).
[0035] It should be noted that the original temperature signal is often interfered by electronic noise.
[0036] For example, in one measurement, the temperature sensor read [22.1, 22.3, 24.8, 22.2, 22.4]°C over a 5-second period, with 24.8°C being a clear outlier. The system applies a Kalman filter to smooth the sequence: [22.1, 22.2, 22.3, 22.3, 22.4]°C, effectively eliminating the sudden noise.
[0037] For example, when the system detects a temperature increase from 22°C to 24°C (a change of 2°C), the mapping function calculates that the focal length should be compensated by 0.052mm. The system converts this compensation into a stepper motor control signal, with each step being 0.001mm, for a total of 52 steps. After compensation, the system calculates the image clarity score using the Laplace operator. The score before compensation was 78.5, which increased to 92.3 after compensation, verifying the effectiveness of the compensation.
[0038] The system also features a self-learning mechanism. During continuous observation, if the actual compensation effect deviates from the theoretical expectation, such as a theoretical compensation of 0.052mm but the actual optimal compensation is 0.058mm, the system will automatically adjust the mapping function parameters to ΔF = 0.029 × ΔT + 0.002, making subsequent compensation more accurate.
[0039] Step S103, Vibration Status Detection and Anti-Shake Processing: Accelerometer data is extracted from the working status dataset, and the camera vibration pattern and intensity are identified using a vibration spectrum analysis algorithm. Based on the vibration characteristics, anti-shake parameters are dynamically adjusted. When significant vibration is detected, the exposure time is automatically shortened to reduce motion blur. ISO sensitivity is also adjusted based on the illumination sensor data in the working status dataset to maintain appropriate brightness. Vibration status information and the corresponding anti-shake parameter adjustment results are recorded in the working status dataset, providing a basis for optimizing the focus strategy.
[0040] The accelerometer acquires raw triaxial data. A Butterworth low-pass filter is used to remove high-frequency noise, with a filter cutoff frequency of 50 Hz and an order of 4. The filtered triaxial data is converted into a time-domain vibration signal, and the vibration amplitude and frequency characteristics are calculated. A fast Fourier transform is performed on the time-domain vibration signal, and an FFT algorithm is used to obtain a vibration spectrum. The main frequency components and energy distribution are extracted from the spectrum. Based on the frequency distribution characteristics, the vibration mode is classified into three types: low-frequency jitter, medium-frequency vibration, and high-frequency jitter. The vibration intensity is calculated based on the total energy of the vibration spectrum. The vibration state is classified into three levels: mild, moderate, and severe, according to a preset vibration intensity threshold. The vibration intensity value and vibration type are combined to form a vibration feature vector. Based on the vibration feature vector, a preset image stabilization parameter mapping table is queried to obtain the corresponding optical image stabilization compensation, electronic image stabilization sensitivity, and exposure parameter adjustment coefficient. The current exposure time is read. When the vibration intensity exceeds the medium level, a new exposure time is calculated based on the inverse function of vibration intensity and exposure time. The reduction in exposure time increases with increasing vibration intensity. The light sensor data is read and, combined with the shortened exposure time, the required ISO sensitivity adjustment is calculated using the brightness compensation formula. The ISO value is increased while maintaining image brightness to compensate for the brightness loss caused by the shortened exposure time. The vibration feature vector, the anti-shake parameters before and after adjustment, the exposure time, and the ISO sensitivity value are written to the working status dataset, adding a timestamp and camera position information to establish a correlation between the vibration status and the anti-shake processing.
[0041] In one embodiment, a high-precision astronomical photography system employs vibration detection and adaptive anti-shake technology. The system installs a three-axis accelerometer on the telescope base with a sampling rate of 200 Hz to monitor vibrations in the observation environment in real time.
[0042] Specifically, the system first applies a Butterworth low-pass filter to the raw acceleration data.
[0043] For example, in one observation, the original X-axis data sequence [0.12, 0.18, 0.45, 0.15, 0.19]g was filtered to [0.13, 0.15, 0.17, 0.18, 0.19]g, effectively removing the sudden noise. The filtered triaxial data was converted into a time-domain vibration signal, with a calculated amplitude of 0.25g and a dominant frequency of approximately 12Hz.
[0044] For example, the system performs a 1024-point FFT on the vibration signal. The resulting spectrum shows that the energy is primarily distributed in the 10-15 Hz frequency range, typical of "medium-frequency vibration." The system calculates the total energy of the vibration spectrum to be 0.58, corresponding to a "medium" vibration intensity level.
[0045] It's important to note that the vibration eigenvector [12Hz, 0.58, "medium frequency vibration," "medium"] is used to query the image stabilization parameter mapping table. Based on this eigenvector, the system obtains an optical image stabilization compensation of ±0.8mm, an electronic image stabilization sensitivity of 0.65, and an exposure parameter adjustment factor of 0.7.
[0046] In one possible implementation, the system reads the current exposure time as 1 / 15 second. Since the vibration intensity is at the "medium" level, the system calculates the new exposure time using an inverse function: 1 / 15 x 0.7 = 1 / 21 second. At the same time, the light sensor reads 320 lux, and the system adjusts the ISO sensitivity from the original value of 400 to 570 to compensate for the loss of brightness caused by the shortened exposure time.
[0047] Preferably, the system writes the complete record [timestamp: 20230615-203045, position: right ascension 120.5° declination +45.2°, vibration eigenvector: [12Hz, 0.58, "medium frequency vibration", "medium"], exposure time: 1 / 15→1 / 21, ISO: 400→570] into the working status dataset for subsequent analysis and anti-shake strategy optimization.
[0048] Step S104, Image Quality Feature Extraction and Assessment: The captured image is analyzed in real time to extract key metrics such as edge sharpness, contrast, and color saturation. This is combined with temperature, vibration, light, and humidity data from the operating status dataset to construct a multidimensional feature vector. This feature vector is then fed into a pre-trained focus quality assessment network to generate a current focus score, which is then recorded in the operating status dataset and used as a basis for decision-making in optimizing the focus strategy.
[0049] Raw image data is acquired from the image acquisition device. The Laplacian operator is used to calculate the image edge sharpness. Higher edge sharpness indicates more accurate focus. A histogram distribution is calculated for the raw image, and the standard deviation of pixel brightness is used as the contrast value, which reflects the image's ability to reproduce detail. The image is analyzed in the HSV color space, and the average of the S channel is calculated to obtain the color saturation index, which reflects the image's color reproduction. Environmental parameters such as temperature, vibration, light intensity, and humidity are read from the working status dataset and combined with image quality indicators to construct a 20-dimensional feature vector. After normalization, the feature vector is input into a convolutional neural network model built using TensorFlow. The convolutional neural network extracts quality patterns from the feature vector using a three-layer convolutional structure with a kernel size of 3x3 and a stride of 1. The output layer of the convolutional neural network generates a focus quality score ranging from 0 to 100, with a score greater than 80 indicating high-quality focus. The focus quality score is associated with the environmental parameters and recorded in the working status dataset. The random forest algorithm built using Scikit-learn analyzes the variation in focus quality under different environmental conditions.
[0050] In one embodiment, a high-precision astronomical photography system employs an image quality assessment technique. The system first processes a star image using a Laplacian operator to calculate an edge sharpness value.
[0051] For example, applying a 5×5 Laplacian kernel to an original image of the edge of the Milky Way yields an edge sharpness value of 78.5, indicating good focus.
[0052] Specifically, the system calculated the pixel brightness histogram for the same image and found a standard deviation of 42.3, reflecting a high contrast level that clearly separates dark stars from the background. Simultaneously, the system analyzed the S channel in the HSV color space and calculated an average saturation value of 0.65, indicating professional-level color reproduction.
[0053] It should be noted that the system reads environmental parameters from the operating status dataset: temperature: -5°C, vibration: 0.12g, light intensity: 0.02 lux, and humidity: 35%. These environmental parameters are combined with image quality indicators to form a 20-dimensional feature vector [78.5, 42.3, 0.65, -5, 0.12, 0.02, 35, ...]. After Min-Max normalization, this vector is input into the convolutional neural network built using TensorFlow.
[0054] For example, the convolutional neural network uses a three-layer convolutional architecture. The first layer uses 32 3×3 convolution kernels to extract low-level features, the second layer uses 64 3×3 convolution kernels to extract mid-level features, and the third layer uses 128 3×3 convolution kernels to extract high-level features. After processing through the fully connected layer, the network outputs a focus quality score of 87.6, indicating a high-quality focus state.
[0055] In one possible implementation, the system associates the focus quality score with environmental parameters and records them in the working status dataset. Through random forest algorithm analysis, it was found that in a low temperature environment (-10℃ to 0℃), when the vibration value is less than 0.15g, the focus quality score is generally higher than 85 points; when the temperature rises to above 15℃, the focus quality score drops by an average of 12.3 points under the same vibration conditions, indicating that temperature changes have a significant impact on the focusing accuracy of the optical system.
[0056] Step S105, Adaptive Focus Strategy Optimization: Based on the focus state score and environmental parameters in the operating state dataset, a reinforcement learning algorithm is applied to dynamically adjust the focus search strategy. This includes reducing the search step size and increasing the sampling frequency in vibration conditions, expanding the search range in response to rapid temperature fluctuations, and adjusting the contrast threshold judgment criteria in response to drastic lighting changes, achieving environmentally adaptive optimization of the focusing process. The optimized focus parameters and corresponding operating states are recorded in the dataset for exposure control and parameter prediction.
[0057] Focus score data is acquired using an industrial camera. The original dataset is simultaneously collected from a triaxial accelerometer for vibration intensity, a thermocouple for temperature change, and a photoresistor for light intensity. The dataset is normalized using the Z-score method, outputting a standardized feature vector. The vector dimensions include the focus quality score (0-100), vibration intensity (g), temperature change rate (°C / s), and light intensity (lux). A state-space model is constructed based on the feature vector, with state variables defined as the current focus position (μm), search step size (μm / step), and sampling frequency (Hz). A Q-learning algorithm is used to update the state-action value table. The action set includes increasing or decreasing the step size by 10% and multiplying or dividing the frequency by 2. When the vibration intensity exceeds 0.5g, the search step size is set to 50% of the previous state, and the sampling frequency is increased to 200% of the previous state. The temperature change rate is monitored. If it exceeds 0.1°C / s, the focus search range is expanded to a multiple of the temperature change rate of the previous state. Within this expanded range, a binary search is performed, splitting the search interval in half with each iteration until the focus score difference is less than 5 points. When the light intensity changes by more than 50 lux, the contrast threshold is adjusted to the square root of the previous state (current light / baseline light) times the previous state. The optimized parameters are written to the time series database. Each record contains the timestamp, focus position, search step size, sampling frequency, contrast threshold, vibration intensity, temperature change rate, and light intensity. A prediction model is trained using the random forest regression algorithm. The input layer is the environmental parameters, and the output layer is the focus position and step size. Feature importance is sorted using the Gini coefficient. When the Euclidean distance between the new environmental data and the historical records is less than 0.2, the predicted parameters are directly loaded.
[0058] In one embodiment, a high-precision astronomical telescope autofocus system uses environmentally aware focus optimization technology. The system uses an industrial camera to capture celestial images in real time, calculates focus scores, and simultaneously collects environmental parameters to form a multidimensional dataset.
[0059] For example, during a Milky Way photography session, the system recorded raw data of a focus score of 78, a vibration intensity of 0.3g, a temperature change rate of 0.05°C / s, and a light intensity of 25lux.
[0060] Specifically, the system uses the Z-score normalization method to process this data, converting a focus score of 78 to 0.65, a vibration intensity of 0.3g to 0.42, a temperature change rate of 0.05°C / s to -0.38, and a light intensity of 25 lux to -0.72, forming the characteristic vector [0.65, 0.42, -0.38, -0.72]. Based on this characteristic vector, the system constructs a state-space model with the initial state variables set to: focus position 12500μm, search step size 5μm / step, and sampling frequency 10Hz.
[0061] It's important to note that the system uses a Q-learning algorithm to optimize its focus strategy. During one observation, the vibration intensity suddenly increased to 0.6g (exceeding the 0.5g threshold). The system immediately reduced the search step size from 5μm to 2.5μm and increased the sampling frequency from 10Hz to 20Hz, effectively suppressing the impact of vibration on focus accuracy. Simultaneously, the system detected a temperature change rate of 0.12°C / s and automatically expanded the focus search range from ±50μm to ±56μm (the original range multiplied by 1.12 times the temperature change rate). Within this range, a binary search method was used to search for the optimal focus position.
[0062] For example, when the light intensity suddenly changes from 25 lux to 85 lux (a change of more than 50 lux), the system adjusts the contrast threshold from 0.35 to 0.65 (the original threshold multiplied by the square root of (85 / 25), 1.84). The system records these optimized parameters in the time series database, including the timestamp 2023-05-15T20:30:45, focus position 12527μm, search step size 2.5μm, sampling frequency 20Hz, contrast threshold 0.65, vibration intensity 0.6g, temperature change rate 0.12℃ / s, and light intensity 85 lux.
[0063] In one possible implementation, the system uses a random forest regression algorithm to train a prediction model. Analysis reveals that the feature importance of vibration intensity is 0.42, temperature change rate is 0.35, and light intensity is 0.23, indicating that vibration has the greatest impact on focus. When the system detects that the Euclidean distance between the new environmental parameters [0.58g, 0.11°C / s, 80 lux] and the historical records is 0.15 (less than the threshold of 0.2), it directly loads the predicted focus position of 12525μm and a step size of 2.5μm, eliminating the need for a new search and significantly improving focus speed.
[0064] Step S106, State-Aware Exposure Control: Lighting data and real-time image brightness histograms are extracted from the working state dataset and combined with the focus state score to calculate optimal exposure parameters. When a high-contrast scene is detected, HDR mode is automatically activated based on the image feature evaluation results, capturing multiple images at different exposure values. High dynamic range images are generated using an exposure fusion algorithm to improve image quality in complex lighting environments. The exposure parameters and fusion results are recorded in the working state dataset, providing a data foundation for state prediction.
[0065] Read the current frame image and corresponding illumination sensor data from the working status dataset. Use OpenCV to calculate the image brightness histogram, detect the histogram peaks using scipy.signal.find_peaks, and record the peak interval and distribution standard deviation. Feed the histogram standard deviation and focus score into the Adam optimizer, set the learning rate to 0.01, and iterate 50 times. The output is the exposure time and gain combination that minimizes the loss function. Use OpenCV's GrabCut to segment the image into regions, and calculate the (max-min) / mean value for each region as the brightness difference coefficient. When the brightness difference coefficient exceeds a preset threshold of 0.7, it is considered a high-contrast scene. Based on the position of the histogram's two peaks, use a Gaussian mixture model to calculate underexposure, standard, and overexposure values, and then capture images separately. Use SIFT to align the multiple exposure images and use OpenCV's createLaplacianPyramid to fuse them, with weights determined by the contrast and saturation of each pixel. Apply OpenCV's TonemapDurand to the fused image for tone mapping, with parameters dynamically adjusted based on the histogram distribution. The final parameters and histogram features are stored in the SQLite database, and the RandomForestRegressor of scikit-learn is used to establish the mapping relationship between lighting parameters and exposure parameters.
[0066] In one embodiment, an automatic exposure control system for an astronomical telescope employs multi-exposure fusion technology. The system first reads the current frame of a starry sky image and illumination sensor data from a working status dataset, recording the starry sky brightness as 25 lux. The system then calculates the image brightness histogram using OpenCV. Using scipy.signal.find_peaks, two major peaks are detected: at grayscale values 35 and 178, with a peak separation of 143 and a distribution standard deviation of 52.3.
[0067] Specifically, the system fed a histogram standard deviation of 52.3 and a focus score of 82.5 into the Adam optimizer, set a learning rate of 0.01, and after 50 iterations, outputted an optimal exposure time of 1.2 seconds and a gain of 1.8. This combination reduced the loss function value to 0.023. The system used OpenCV's GrabCut algorithm to segment the starry sky image into star regions and background regions. The calculated brightness difference coefficient was 0.85, exceeding the preset threshold of 0.7, identifying it as a high-contrast scene.
[0068] It should be noted that the system uses a mixed Gaussian model to calculate three exposure values based on the positions of the two peaks in the histogram: underexposure (0.8 seconds), standard exposure (1.2 seconds), and overexposure (1.6 seconds). Images are then captured separately. The SIFT algorithm is used to align the multi-exposure images, ensuring that the positions of stars in the three images accurately match, with a maximum deviation of less than 0.5 pixels.
[0069] For example, the system uses OpenCV's createLaplacianPyramid function to achieve image fusion, with weights determined by the contrast and saturation of each pixel. In the star region, the contrast weight is 0.7, and the saturation weight is 0.3; in the background region, the contrast weight is 0.4, and the saturation weight is 0.6. The fused image is tone mapped using TonemapDurand, with parameters dynamically adjusted based on the histogram distribution to: contrast 0.85, saturation 1.2.
[0070] In one possible implementation, the system stores the final parameters and histogram features in a SQLite database, including the timestamp 2023-06-20T22:15:30, the histogram peak position [35,178], the exposure time 1.2 seconds, the gain 1.8, and the tone mapping parameters [0.85,1.2]. The system uses RandomForestRegressor to establish a mapping relationship between the lighting parameters and the exposure parameters. Feature importance analysis shows that the histogram standard deviation accounts for 0.45%, the peak interval accounts for 0.32%, and the light intensity accounts for 0.23.
[0071] Step S107: Operating Status Prediction and Proactive Control: Historical data and corresponding parameter adjustment records are extracted from the operating status dataset to establish a time series prediction model. This model predicts the camera's state change trends over the short term. Based on the prediction results, focus and exposure parameters are adjusted in advance to reduce image quality fluctuations caused by state changes and implement proactive parameter adjustment control. The prediction results and pre-adjusted parameters are recorded in the operating status dataset, providing predictive support for scene-adaptive parameter configuration.
[0072] The camera's operating data from the past 24 hours is read from the working status dataset, including focus parameters, exposure parameters, and scene feature vectors. For each frame, the scene brightness change rate (the brightness difference between the current and previous frames divided by the time interval), focus distance change rate (the focus position difference between the current frame divided by the time interval), and camera motion speed (obtained from the IMU sensor) are calculated. Data is processed using a sliding window with a window length of 5 minutes and a step size of 1 minute. Within each window, the data is arranged in chronological order, forming a sample set containing sequences of brightness change rate, focus change rate, and motion speed. This sample set is input into an LSTM neural network with 3 input layer nodes, 6 hidden layer nodes, and 2 output layer nodes (corresponding to the focus and exposure changes over the next 30 seconds). During training, iterations are terminated if the validation set loss function fails to decrease for five consecutive times. The model outputs the predicted changes in focus and exposure parameters over the next 30 seconds. When the changes exceed a preset threshold (focus change exceeds 5 units, exposure change exceeds 10 units), an adjustment process is initiated. A loss function was constructed that incorporates parameter change magnitude and image difference, with image difference calculated using the SSIM algorithm. This function was optimized using TensorFlow's GradientDescentOptimizer with a learning rate of 0.01, and iterated 20 times to generate a parameter adjustment sequence. Each node in the sequence contains a timestamp, target focus value, and target exposure value. The change magnitude between adjacent nodes did not exceed the hardware limit (focus step size of 0.5 units / millisecond, exposure step size of 1 unit / millisecond). Camera parameters were adjusted in advance based on the time nodes in the adjustment sequence, and the actual parameter values were recorded via encoder feedback. The mean squared error (MSE) between the predicted and actual values was calculated. Model retraining was triggered when the error exceeded a threshold 10 consecutive times. The prediction results, adjusted parameters, and actual values were written to the prediction_log table in the database. A B+ tree index based on the timestamp field was created, and records older than 30 days were deleted at dawn each day.
[0073] In one embodiment, an astronomical observation system uses predictive parameter adjustment technology to predict future parameter changes by analyzing historical data. The system extracts operational data from the past 24 hours from a working status dataset, including focus distance, exposure time, and scene feature vectors. The system calculates that the scene brightness change rate per frame is 0.8 units / second, the focus distance change rate is 0.3 units / second, and the camera movement speed is 0.5 degrees / second.
[0074] Specifically, the system processes data using a sliding window with a 5-minute duration and a 1-minute step size, generating a sample set consisting of 300 time points. Each sample contains three features: brightness change rate, focus change rate, and movement speed. These samples are input into an LSTM network with 3 input nodes, 6 hidden nodes, and 2 output nodes. Training is terminated when the validation set loss function remains at 0.023 for five consecutive times, resulting in a total of 87 iterations.
[0075] For example, the system predicts that within the next 30 seconds, the focus parameter will change by 7.2 units, and the exposure parameter will change by 12.5 units, both exceeding preset thresholds. The system constructs a loss function, weighting the magnitude of parameter change by 0.7 and image difference by 0.3. After 20 iterations of the TensorFlow optimizer, a parameter adjustment sequence consisting of six time nodes is generated.
[0076] In one possible implementation, the first node in the adjustment sequence is the current time + 5 seconds, with the focus value increased by 1.5 units and the exposure value increased by 3.0 units. The last node is the current time + 28 seconds, with a total increase of 7.0 units for the focus value and 12.0 units for the exposure value. The system adjusts parameters in advance based on this sequence, and the actual parameters are recorded via encoder feedback. The calculated mean squared error between the predicted and actual values is 0.18, which is below the threshold of 0.25 and does not require triggering model retraining.
[0077] It's important to note that the system writes the prediction results, adjustment parameters, and actual values to the database's prediction_log table. This record includes fields such as the timestamp 2023-07-15T03:42:18, predicted focus change 7.2, predicted exposure change 12.5, actual focus change 7.0, and actual exposure change 12.0. A timestamp-based B+ tree index is established for this table, improving query efficiency by approximately 85%.
[0078] Step S108: Scene-Adaptive Parameter Configuration: Based on the image feature analysis results and sensor data in the working status dataset, combined with the state prediction results, a scene recognition model is constructed to automatically identify the current working environment type. Based on the recognition results, the most suitable basic parameter configuration is selected from a preset scene parameter library. Fine-tuning is then performed based on the prediction results and real-time working status data to achieve scene-adaptive camera parameter configuration. The scene recognition results and parameter configuration plan are recorded in the working status dataset, providing training samples for continuous learning.
[0079] Image feature vectors, including eigenvalues such as contrast, color distribution, and texture complexity, are extracted from the working status dataset. The OpenCV library is used to calculate the image feature vectors. Sensor data is also loaded with information about light intensity, ambient temperature, and camera motion. Principal component analysis (PCA) is applied to the extracted image feature vectors for dimensionality reduction. The PCA function in the Scikit-learn library is used to retain the top N feature dimensions with the highest proportion of explained variance. The reduced image feature vectors are then merged with the sensor data to form a scene feature matrix. A random forest algorithm is used to classify the scene feature matrix and train a scene recognition model. The recognition results include environment type labels such as indoor, outdoor, low light, high light, and fast motion. Based on the identified environment type labels, a preset scene parameter library is queried to extract the basic parameter configuration template for the corresponding environment type. This template contains initial values for parameters such as focus range, exposure time, and white balance. A weighted fusion algorithm combines the basic parameter configuration with the state prediction results to calculate parameter adjustments. Weight coefficients are dynamically updated based on historical adjustment results. Weight updates are implemented using the LinearRegression function in the Scikit-learn library. Initially adjusted parameter values are obtained. Based on the initially adjusted parameter values, we combined the image clarity scores and exposure histogram distribution from real-time working status data to fine-tune the parameters. The adjustment step size varied with the image quality score and was calculated using the image quality assessment functions in the OpenCV library. The scene recognition results, parameter configuration plan, and actual adjusted parameter values were written to the working status dataset. Timestamp and scene type indexes were established. Expired data was regularly cleaned up, and representative samples were retained for model updates.
[0080] In one embodiment, an astronomical observation system improves image quality through scene-adaptive parameter configuration technology. The system first extracts image feature vectors from a working state dataset, including feature values such as a contrast mean of 0.72, a color saturation of 0.65, and a texture complexity of 0.43. It also reads sensor data for a light intensity of 2300 lux, an ambient temperature of 18.5°C, and a camera rotation speed of 0.8 degrees per second.
[0081] Specifically, the system applies PCA dimensionality reduction to the extracted 15-dimensional image feature vectors, retaining the top five feature dimensions that explain 92% of the variance. The reduced feature vectors are then combined with the sensor data to form an 8-dimensional scene feature matrix. A random forest algorithm (with a tree depth of 12 and 100 trees) is used to classify the feature matrix and train a scene recognition model with an accuracy of 87.5%.
[0082] For example, in one observation, the system identified the "Outdoor - Low Light - Slow Motion" environment type label with a confidence level of 0.92. The system then consulted the preset scene parameter library and extracted the basic parameter configuration template corresponding to this environment type: focus range 50-200 meters, exposure time 1.2 seconds, and color temperature 4200K. Using a weighted fusion algorithm, the basic parameters were combined with the state prediction results to calculate the parameter adjustment amount, with the basic parameters weighted 0.65 and the prediction results weighted 0.35.
[0083] It should be noted that the system fine-tunes the parameters based on the initial adjustment, combining the image clarity score (8.2 / 10) and exposure histogram distribution (15% left of center) from real-time operating status data. When the clarity score falls below 8.5, the system sets the focus adjustment step size to 2.0 units; when the score exceeds 8.5, the step size is reduced to 0.5 units. Ultimately, the system adjusts the focus distance to 125 meters, the exposure time to 1.35 seconds, and the color temperature to 4350K.
[0084] In one possible implementation, the system writes the scene recognition results, parameter configuration plan, and actual adjusted parameter values to the scene_config table in the working status dataset. This record includes fields such as the timestamp 2023-08-22T21:15:43, scene type ID 5, focus distance 125, exposure time 1.35, and color temperature 4350. This table also establishes a timestamp-based B-tree index and a scene type hash index, improving query efficiency by approximately 78%.
[0085] Step S109, Continuous Learning and Parameter Optimization: Operating status data, image quality assessment results, and parameter adjustment feedback are extracted from the operating status dataset. The adaptive parameter mapping network continuously learns the mapping relationship between operating status and optimal imaging parameters. The system continuously optimizes parameter adjustment strategies over time, analyzing historical adjustment data to identify best practices, improving the system's adaptability to diverse environmental conditions and image quality stability. Learning results are updated in the parameter mapping network and fed back into the operating status dataset, forming a closed-loop optimization mechanism.
[0086] The work status data, image quality scores, and parameter adjustment records for the past month were extracted from the work status dataset. These records were sorted by timestamp and outliers were removed to obtain a valid training sample set. Feature engineering was performed on this valid training sample set to extract pairs of work status feature vectors and corresponding optimal parameter configurations. Normalization was performed to eliminate differences in feature dimensions and construct a standardized feature matrix. A gradient boosting tree model was trained using the standardized feature matrix. The input of the work status feature vectors was the predicted optimal parameter configuration. Cross-validation was used during model training to select the optimal hyperparameter combination. K-means clustering was performed on historical parameter adjustment records based on image quality scores to identify parameter adjustment patterns under different environmental conditions. The parameter adjustment patterns and key parameter sensitivities for high-quality imaging were extracted. Based on the cluster analysis results, a parameter adjustment decision tree was constructed, with differentiated adjustment strategies set for branches under different environmental conditions. The adjustment step size was proportional to the rate of change of the image quality score, and the adjustment direction was determined by the quality score gradient. The gradient boosting tree model was updated using incremental learning, with higher weights assigned to newly added high-quality samples and reduced weights assigned to low-quality samples. Model parameters were updated weekly to maintain a balance between knowledge accumulation and environmental adaptability. The updated gradient boosting tree model and the adjusted decision tree are integrated into the adaptive parameter system. The model version and performance indicators are recorded at the same time to form a complete parameter optimization closed loop, continuously improving the system's adaptability to complex environments.
[0087] In one embodiment, an astronomical observation system uses a data-driven parameter optimization method to improve imaging quality. The system first extracts data records from the last 30 days of the operating status dataset, comprising 12,583 raw samples. After outlier detection, the system removes samples with a signal-to-noise ratio below 3.5 and records with abnormal exposure times (deviating from the mean by more than 3 standard deviations), ultimately retaining 11,247 valid training samples.
[0088] Specifically, the system performs feature engineering on each sample, extracting an 18-dimensional operating state feature vector, encompassing key parameters such as ambient light intensity, atmospheric transparency, target celestial brightness, and device temperature. These features are then combined with the corresponding optimal parameter configurations (such as exposure time, gain, and focus position) to form feature-label pairs. Using the Min-Max normalization method, the system normalizes features of varying dimensions to the [0, 1] range, constructing a standardized feature matrix.
[0089] For example, the system used the XGBoost algorithm to train a gradient boosting tree model, setting a learning rate of 0.05, a maximum tree depth of 8, and a regularization parameter λ of 1.2. The optimal hyperparameter combination was determined through 5-fold cross-validation. The final model achieved a mean squared error of 0.037 in parameter prediction on the validation set, a 42.3% reduction compared to the baseline model.
[0090] It should be noted that the system performed a K-means cluster analysis (K=5) on the historical parameter adjustment records to identify the parameter adjustment patterns under different environmental conditions.
[0091] For example, in the "low light, high humidity" environment, increasing the exposure time by 0.5 seconds and raising the gain by 2.3dB resulted in an average improvement of 1.7 points in the image quality score. In the "strong light, low humidity" environment, the most significant improvement in quality score was achieved when the exposure time was reduced by 0.3 seconds and the color temperature was adjusted to 5600K.
[0092] In one possible implementation, the system constructs a parameter adjustment decision tree, setting differentiated adjustment strategies for different environmental conditions. When the image quality score is below 7.5 and the rate of change is negative, the system adopts a larger adjustment step size (0.2 second exposure step); when the score is above 8.5 and tends to be stable, a finer adjustment step size (0.05 second exposure step) is used. This adaptive adjustment mechanism reduces the system's average convergence time by 37%.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An intelligent control method based on camera automatic focus and exposure, characterized in that: include: Collecting multi-sensor data, wherein the multi-sensor data includes temperature data, acceleration data, light data, and humidity data; Performing fusion processing on the multi-sensor data to construct a working status data set; Establishing a thermal expansion model of the optical element based on the temperature data in the working status data set, calculating the influence coefficient of temperature change on focal length, and triggering a focal length compensation mechanism when the temperature change exceeds a preset threshold; Extracting acceleration sensor data from the working status data set, identifying vibration patterns and intensities through vibration spectrum analysis, and dynamically adjusting anti-shake parameters; Performing real-time analysis on the captured images, extracting image quality features, building a multidimensional feature vector based on the working status data set, and generating a focus status score; Dynamically adjusting a focus search strategy based on the focus status score and environmental parameters in the working status dataset; Calculating optimal exposure parameters based on the illumination data and image brightness histogram in the working state dataset and the focus state score; Historical data is extracted from the working status data set, and a time series prediction model is established to predict the camera status change trend and adjust the focus parameters and exposure parameters in advance.
2. The method according to claim 1, wherein The fusing and processing the multi-sensor data includes: Median filtering is used to remove impulse noise from the original signal; Standardize the filtered data; Using acceleration data as the reference time axis, resample other sensor data; Check the time stamp deviation of each sensor and perform phase compensation on data segments whose delay exceeds the preset time; Calculate the signal-to-noise ratio of each sensor data within the sliding window; Establish a Kalman filter state vector, including four dimensions: temperature, acceleration root mean square value, light intensity, and humidity; Perform outlier detection on the fused state vector.
3. The method according to claim 1, wherein The step of establishing a thermal expansion model of an optical element according to the temperature data in the working state data set includes: Obtain the thermal expansion coefficient of each component material of the optical system; Establish a physical model of the effect of temperature change on focal length; The temperature-focal length mapping function is obtained by least square fitting; Apply Kalman filter algorithm to the raw temperature signal to eliminate random fluctuations; Calculate the ideal focal length value at the current temperature; Convert the compensation amount into a stepper motor control signal; Collect image comparison data before and after compensation and calculate the image clarity score.
4. The method according to claim 1, wherein The extracting acceleration sensor data from the working state data set and identifying the vibration mode and intensity through vibration spectrum analysis includes: Use Butterworth low-pass filter to remove high-frequency noise; Perform fast Fourier transform on the time domain vibration signal to obtain a vibration spectrum; Extract the main frequency components and energy distribution from the spectrum; Calculate the vibration intensity value based on the sum of the vibration spectrum energy; Querying a preset anti-shake parameter mapping table according to the vibration characteristic vector; When the vibration intensity exceeds the medium level, the new exposure time is calculated according to the inverse function of the vibration intensity and the exposure time.
5. The method according to claim 1, wherein The real-time analysis of the collected images and extraction of image quality features include: Calculate the image edge clarity value through the Laplace operator; Calculate the histogram distribution of the original image and use the standard deviation of pixel brightness as the contrast value; Analyze the image HSV color space and calculate the average value of the S channel to obtain the color saturation index; Read the environmental parameters in the working status data set and combine them with the image quality indicators to construct a feature vector; The feature vector is normalized and then input into the convolutional neural network model; The convolutional neural network output layer generates a focus quality score.
6. The method according to claim 1, wherein The dynamically adjusting the focus search strategy based on the focus state score and the environmental parameters in the working state data set includes: The Z-score method is used to normalize the data set and output the standardized feature vector; Construct a state space model based on the feature vector; Use the Q-learning algorithm to update the state-action value table; When the vibration intensity exceeds the preset value, the search step is set to the preset ratio of the previous state and the sampling frequency is increased; Monitor the temperature change rate and expand the focus search range if it exceeds a preset threshold; Adjust the contrast threshold when the light intensity changes beyond a preset value.
7. The method according to claim 1, wherein The calculating the optimal exposure parameters according to the illumination data and the image brightness histogram in the working state data set and the focus state score includes: Use the image processing library to calculate the image brightness histogram; The histogram peak position is detected by signal processing function, and the peak interval and distribution standard deviation are recorded; The histogram standard deviation and focus score are input into the optimizer, which outputs the exposure time and gain combination that minimizes the loss function. Perform regional segmentation on the image and calculate the brightness difference coefficient of each region; When the brightness difference coefficient exceeds the preset threshold, it is determined to be a high-contrast scene; According to the histogram peak position, multiple exposure values are calculated and images are collected respectively; Multi-exposure image alignment is performed using feature point matching and fusion is achieved through Laplacian pyramid.
8. The method according to claim 1, wherein The extracting historical data from the working status data set and establishing a time series prediction model includes: Read the camera operation data within the past preset time; Calculate the scene brightness change rate, focus distance change rate and camera movement speed for each frame of data; Use sliding windows to process data; The sample set is input into the long short-term memory neural network; The model outputs the predicted changes in focus and exposure parameters within a preset time period in the future; Construct a loss function that includes parameter variation and image difference; Generate parameter adjustment sequences using a gradient descent optimizer; Adjust the camera parameters in advance according to the time nodes of the adjustment sequence; Calculate the mean square error between the predicted value and the actual value, and trigger model retraining when the error exceeds the threshold continuously.
9. An intelligent control system based on automatic focus and exposure of a camera, based on the intelligent control method based on automatic focus and exposure of a camera according to any one of claims 1 to 8, characterized in that: Data acquisition and processing module, data fusion and state vector generation module, model construction and focal length compensation module, parameter adjustment module, strategy adjustment module, parameter optimization module and state prediction and timing adjustment module; Data acquisition and processing module, used to collect multi-sensor data, including temperature data, acceleration data, light data and humidity data; Data fusion and state vector generation module, used to fuse multi-sensor data and construct a working status data set; The model building and focal length compensation module is used to establish a thermal expansion model of the optical element based on the temperature data in the working status dataset, calculate the coefficient of influence of temperature change on focal length, and trigger the focal length compensation mechanism when the temperature change exceeds a preset threshold; The parameter adjustment module is used to extract acceleration sensor data from the working status data set, identify vibration patterns and intensities through vibration spectrum analysis, and dynamically adjust anti-shake parameters; A strategy adjustment module is used to perform real-time analysis on the collected images, extract image quality features, construct a multidimensional feature vector based on the working status data set, and generate a focus status score; Parameter optimization module and state prediction, used to dynamically adjust the focus search strategy based on the focus state score and environmental parameters in the working state dataset; The timing adjustment module is used to extract historical data from the working status data set, establish a timing prediction model, predict the camera status change trend, and adjust the focus parameters and exposure parameters in advance.
10. A computer device comprising: memory and processor; The memory stores a computer program, wherein the processor implements the steps of the intelligent control method based on automatic focus and exposure of a camera according to any one of claims 1 to 8 when executing the computer program.
Citation Information
Patent Citations
Camera adaptive adjustment method and system, and storage medium
CN119545164A
Imaging device and imaging method
JP2016142957A
Focal Compensation For Thermal Expansion of Camera Optics Using Chromatic Aberration
US20170195545A1
Fast auto-exposure method for camera, and storage medium
WO2022067496A1
Method and apparatus for determining exposure parameters, storage medium and program product
WO2024033425A1