Automatic dimming and focusing method of camera for photoelectric pod, photoelectric pod, program product and storage medium
By combining CMOS image processing and gyroscope monitoring with a feedback focusing mechanism, brightness and sharpness are dynamically optimized, solving the problems of low target tracking accuracy and high false alarm rate in complex environments, and achieving efficient and accurate target tracking.
Patent Information
- Application Number
- CN202511612903.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies suffer from low target tracking accuracy and high false alarm rate in complex reconnaissance environments, making it difficult to meet the requirements of high-precision tracking and low false alarm rate. This is mainly due to the difficulty in model matching caused by the complex and variable movement of targets and the uncertainty of image features.
By capturing real-time image frames with CMOS, calculating brightness evaluation values, adjusting exposure time and electronic gain values, and combining this with gyroscope monitoring of platform stability, a feedback focusing mechanism is formed to dynamically optimize brightness and sharpness and drive the front lens group to shift in order to improve image quality.
It improves image accuracy and efficiency, enhances target tracking precision, reduces false alarm rate, resolves the conflict between focusing and gimbal stabilization control, and avoids stagnation caused by blind focusing and prolonged inactivity.
Smart Images

Figure CN121509820A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unmanned aerial vehicle (UAV) pod technology, and in particular to an automatic dimming and focusing method for a camera in an optoelectronic pod, the optoelectronic pod, the program product, and the storage medium. Background Technology
[0002] In modern operations, unmanned helicopters equipped with electro-optical turrets play a crucial role. For example, when conducting reconnaissance of target areas, the integrated visible light camera and infrared thermal imager within the electro-optical turret can acquire real-time images of the target area and transmit them back to the ground station via the unmanned helicopter's data link. This facilitates observation by ground operators and subsequent operations such as target identification, target tracking, and laser ranging.
[0003] Currently, in target tracking, the relevant technology is based on a pre-set general motion model to determine the target's trajectory. This involves analyzing the target's positional changes in the transmitted images according to a predetermined model algorithm. Then, based on the analysis results, the UAV system's data link is used to control the television and thermal imaging to switch the field of view, attempting to keep the field of view always focused on the target, thereby maintaining target tracking. For false alarm rate control, a fixed threshold range is set at the ground station based on standard image feature parameters derived from statistical analysis of a large amount of past image data. After feature extraction, the parameters of the transmitted images are compared with this threshold range. If the parameters exceed the range, it is considered a false alarm, thus reducing the occurrence of false alarms and improving the reliability of reconnaissance results.
[0004] In real-world reconnaissance environments, the actual movement of targets is often complex and variable, making it difficult to perfectly match pre-defined general motion models. For example, targets may exhibit movement changes that do not conform to the model's expectations due to external interference or their own unique maneuvers. This makes it impossible to accurately follow targets when relying on established model algorithms to analyze and adjust the field of view, resulting in a significant reduction in tracking accuracy. Furthermore, due to their unique shapes and dynamic environmental changes, complex targets possess highly uncertain and specific image features, making it difficult to accurately match them with fixed threshold ranges set based on statistical analysis of a large amount of conventional image data. This often leads to misjudgments, misidentifying real targets as false alarms or missing genuine false alarms, making it difficult to effectively reduce the false alarm rate. Therefore, related technologies cannot meet the requirements for high tracking accuracy and low false alarm rates in complex real-world scenarios. Summary of the Invention
[0005] This application provides an automatic dimming and focusing method for a camera in an optoelectronic pod, an optoelectronic pod, a program product, and a storage medium, for improving tracking accuracy and reducing false alarm rate.
[0006] In a first aspect, this application provides an automatic dimming and focusing method for a camera used in an optoelectronic pod, comprising: capturing real-time image frames via a CMOS; calculating a brightness evaluation value for a preset central field of view in the real-time image frame; comparing the brightness evaluation value with a preset target brightness range; if the comparison result shows that the brightness evaluation value is outside the target brightness range, adjusting the exposure time by sending a command to the CMOS under the constraint of a fixed aperture to make the brightness evaluation value approach the target brightness range; when the brightness evaluation values corresponding to the exposure time adjustment actions within the adjustment range are not within the target brightness range, compensating for the exposure-optimized image whose brightness evaluation value is closest to the target brightness range by adjusting the electronic gain value; calculating a sharpness evaluation value based on the central field of view of the brightness-optimized image frame; driving the front lens group to perform axial displacement; determining the next movement direction by comparing the change in sharpness evaluation value before and after the displacement, performing axial displacement according to the next movement direction until the sharpness evaluation value reaches the optimal focal position of the peak, and obtaining an output image.
[0007] By employing the aforementioned technical solution, raw data is acquired through CMOS image frame capture. Brightness evaluation values are calculated with the central field of view as the key focus area, allowing for control of overall brightness by focusing on critical parts of the image. Through cyclic comparisons, adjustments to exposure time and electronic gain, dynamic optimization is performed based on actual lighting conditions, ensuring precise brightness adaptation to different environments. Subsequently, sharpness adjustments are made to the brightness-optimized image. This is achieved by driving the front lens group to shift and determining the direction based on the change in sharpness, forming a feedback-based focusing mechanism. This overall approach works together to address changes in lighting and targets in complex reconnaissance environments, improving image quality, ensuring the accuracy and efficiency of reconnaissance, and ultimately increasing tracking accuracy and reducing false alarm rates.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, before determining the next direction of movement by comparing the change in sharpness evaluation values before and after displacement, and performing axial displacement according to the next direction of movement, the method further includes: acquiring angular velocity data of the carrier's three axes by using a gyroscope coupled to the CMOS; determining the platform stability based on the angular velocity data; determining whether the platform stability is less than a preset stability threshold; if not less than, then performing the step of determining the next direction of movement by comparing the change in sharpness evaluation values before and after displacement, and performing axial displacement according to the next direction of movement; if less than, then maintaining the current position of the front lens group unchanged.
[0009] By adopting the above technical solution, the focus is on resolving the conflict between focusing and gimbal stabilization control. A gyroscope coupled to the CMOS sensor is used to acquire carrier angular velocity data to determine platform stability, enabling proactive monitoring and quantification of external interference factors. When platform stability is below a threshold, the front lens group position remains unchanged. To avoid misjudgments in the focusing algorithm, the error feedback chain caused by gimbal jitter is severed, allowing the focusing system and gimbal stabilization system to perform their respective functions, avoiding internal friction, and fundamentally ensuring image stability, preventing external shaking interference, and maintaining stable image quality.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of maintaining the current position of the front lens group unchanged if the stability is less than the preset stability threshold, the method further includes: acquiring all brightness optimization images within a time window; wherein the larger the difference between the platform stability and the preset stability threshold, the longer the time window; filtering out all brightness optimization images within the time window whose platform stability is not less than the preset stability threshold; and extracting the corresponding movement direction; filling the movement direction into the action sequence in chronological order, and filling all brightness optimization images within the time window whose platform stability is less than the preset stability threshold into the action sequence as placeholders; inputting the action sequence into the decision model to obtain the movement direction with the highest return; and performing axial displacement according to the movement direction with the highest return.
[0011] By adopting the above technical solution, images are acquired within a time window and correlated with platform stability and time window length. This means that system stability and time factors are comprehensively considered, and information is extracted from images flexibly based on different levels of stability. This information is then organized into an action sequence and input into a decision model to obtain the optimal movement direction, overcoming the focusing problem in special scenarios. This avoids both stagnation caused by prolonged inactivity and blind focusing, thus solving the problem of stagnation in focusing actions.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the step of inputting the action sequence into the decision model to obtain the movement direction with the highest return specifically includes: based on the movement direction, determining whether there is a reversal signal at the end of the action sequence; the reversal signal is that there are at least two consecutive same-direction movement directions at the end of the action sequence, followed by a reverse movement direction opposite to the same-direction movement direction; if there is a reversal signal, the reverse movement direction is determined as the movement direction with the highest return.
[0013] By employing the above technical solution, the characteristic signals of the action sequence are used to accurately guide the focusing direction. The design of judging whether a reversal signal exists at the end of the action sequence uncovers hidden regularities within the sequence, thereby identifying key turning points in the focusing process. When a reversal signal is present, determining the reverse movement direction is optimal, reflecting an adjustment that follows the pattern of image sharpness changes. This avoids the blind reverse operation that may occur with conventional methods, making the focusing action more proactive.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, after determining whether there is a reversal signal at the end of the action sequence based on the movement direction, the method further includes: if there is no reversal signal, tracing back from the end of the action sequence to locate the last movement direction and defining the direction as an end trend direction; the end trend direction is the movement trend that was verified to improve the clarity evaluation value before the placeholder appeared; the end trend direction is determined as the movement direction with the highest yield.
[0015] By adopting the above technical solution, the overall trend of the action sequence is used to rationally determine the focusing direction, especially in special cases where there is no reversal signal. Tracing back from the end of the action sequence to find the final trend direction and determining it as the optimal one, respecting the previously verified effective focusing trends, even in the absence of obvious reversal signal cues, the next action can still be decided based on the effective trends reflected in historical data, ensuring the continuity and rationality of the focusing action and avoiding falling into disordered focusing.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, the step of compensation adjustment by adjusting the electronic gain value specifically includes: obtaining the current real-time focal length value of the camera; querying and determining the dynamic gain upper limit from a preset focal length-gain mapping table based on the real-time focal length value; performing compensation adjustment by adjusting the electronic gain value, wherein the adjusted electronic gain value is not greater than the dynamic gain upper limit; and calculating the sharpness evaluation value based on the brightness optimization of the central field of view of the image frame, specifically including: determining the focal length type based on the real-time focal length value; selecting an adaptive sharpness evaluation function from a preset function library based on the focal length type; and calculating the sharpness evaluation value using the adaptive sharpness evaluation function based on the brightness optimization of the central field of view of the image frame.
[0017] By adopting the above technical solutions, electronic gain adjustment and sharpness evaluation can be carried out more realistically and accurately. Obtaining real-time focal length values and determining the dynamic gain upper limit accordingly, as well as selecting an adaptive sharpness evaluation function, implicitly considers the impact of focal length changes on the image. Electronic gain is adjusted adaptively according to different focal length states, while a matching evaluation function is used to accurately measure sharpness. This results in better synergy among all components, effectively addressing imaging requirements at different focal lengths, improving overall image quality, and ensuring clear and usable images are acquired even in diverse and complex reconnaissance environments.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the step of driving the front lens group to perform axial displacement specifically includes: querying and obtaining the corresponding theoretical focal position from the calibrated focal length-focal point position relationship data based on the target focal length value; moving to the obtained theoretical focal point position; determining the next movement direction by comparing the change in sharpness evaluation value before and after displacement; and performing axial displacement according to the next movement direction. Specifically, this step includes: determining the next movement direction starting from the theoretical focal point position by comparing the change in sharpness evaluation value before and after displacement; and performing axial displacement according to the next movement direction.
[0019] By adopting the above technical solution, the theoretical focal position is obtained by querying the calibrated focal length-focal point position relationship data based on the target focal length value. The initial target can be clearly identified by accurate measurement data in the early stage, avoiding blind focusing. Then, it is accurately moved to the theoretical focal point position, and the displacement accuracy is ensured by the drive mechanism, laying a good foundation for subsequent steps. Then, starting from the theoretical focal point position, the direction of the next movement is determined by comparing the change in sharpness evaluation value before and after the displacement, and axial displacement is performed for dynamic optimization, which effectively improves the efficiency and accuracy of finding the initial focal point.
[0020] In a second aspect, this application provides an optoelectronic pod, which includes: one or more processors and a memory; the memory is coupled to one or more processors, and the memory is used to store computer program code, which includes computer instructions, and the one or more processors invoke the computer instructions to cause the optoelectronic pod to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, this application provides a computer program product containing instructions that, when the computer program product is run on an optoelectronic pod, cause the optoelectronic pod to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, this application provides a computer-readable storage medium including instructions that, when executed on an optoelectronic pod, cause the optoelectronic pod to perform the method described in the first aspect and any possible implementation thereof.
[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. Raw data is acquired by capturing image frames through CMOS. A brightness evaluation value is calculated with the central field of view as the key focus area, focusing on key parts of the image to control the overall brightness. Through cyclic comparison, adjustment of exposure time and electronic gain, and other operations, the system dynamically optimizes the brightness according to actual lighting conditions, ensuring precise adaptation to different environments. Subsequently, sharpness adjustment is performed based on the brightness-optimized image. This is achieved by driving the front lens group to shift and determining the direction based on the change in sharpness, forming a feedback focusing mechanism. The entire system works together to cope with changes in lighting and targets in complex reconnaissance environments, improving image quality, ensuring the accuracy and efficiency of reconnaissance, and ultimately increasing tracking accuracy and reducing false alarm rates.
[0024] 2. Focusing on resolving the conflict between focusing and gimbal stabilization control. A gyroscope coupled to the CMOS sensor acquires carrier angular velocity data to determine platform stability, actively monitoring and quantifying external interference factors. When platform stability falls below a threshold, the front lens group position remains unchanged. To avoid misjudgments in the focusing algorithm, the error feedback chain caused by gimbal jitter is severed, allowing the focusing system and gimbal stabilization system to perform their respective functions, avoiding internal friction, and fundamentally ensuring image stability, preventing external shaking interference, and maintaining stable image quality.
[0025] 3. Acquiring images within a time window and correlating them with platform stability and time window length signifies a comprehensive consideration of system stability and time factors, flexibly filtering images to extract information based on varying levels of stability. This information is then organized into an action sequence and input into a decision model to obtain the optimal movement direction, overcoming the focusing challenges in special scenarios. This avoids both stagnation caused by prolonged inactivity and blind focusing, thus resolving the issue of stagnation in focusing actions. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating the automatic dimming and focusing method of the camera used in the optoelectronic pod in this embodiment of the application; Figure 2 This is a schematic diagram of the principle of the photoelectric pod in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the optoelectronic pod under long focal length in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the optoelectronic pod in the embodiment of this application under short focal length. Figure 5 This is a schematic diagram of field curvature and distortion of the photoelectric pod at a focal length of 25mm in the embodiments of this application; Figure 6This is a schematic diagram of field curvature and distortion of the optoelectronic pod at a focal length of 500mm in an embodiment of this application; Figure 7 This is a schematic diagram of an exemplary hardware structure of the optoelectronic pod in an embodiment of this application. Detailed Implementation
[0027] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0028] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0029] In some embodiments, the optoelectronic pod includes multiple fully functional and cooperative modules that cover a range of key operations from CMOS control to parameter readout, aiming to comprehensively ensure that the detector assembly can output high-quality images that meet system requirements. The specific descriptions of each functional module are as follows: CMOS control module: This module plays a fundamental role in the entire optoelectronic pod system, primarily focusing on the operation and control of the CMOS sensor. Specifically, it encompasses crucial functions such as CMOS initialization, CMOS operating parameter delivery, and status reading. The CMOS initialization function ensures that the CMOS chip completes all preset initialization settings upon startup, placing it in a stable and operational state. The CMOS operating parameter delivery function allows for the precise transmission of various operating parameters, such as exposure time and gain value, to the CMOS chip based on different application scenarios and image acquisition requirements, ensuring it operates according to the desired mode. The status reading function monitors the CMOS chip's operating status in real time, promptly acquiring key status information such as temperature and operating voltage, providing data support for subsequent troubleshooting and performance optimization.
[0030] CMOS data acquisition module: This module is primarily responsible for processing the data output from the CMOS chip, mainly implementing core functions such as deserialization of the 24 pairs of LVDS outputs from the CMOS chip and pixel reconstruction. In the actual data acquisition process, the CMOS chip outputs data through 24 pairs of LVDS channels. This data exists in a high-speed serial format. The data deserialization function converts it into parallel data, facilitating subsequent processing and analysis. The pixel reconstruction function, based on the specific image sensor pixel arrangement rules and data transmission protocol, rearranges and combines the deserialized data to restore it into complete pixel data that meets the image format requirements, laying the foundation for further image processing.
[0031] BLC calibration module: The BLC correction module aims to perform real-time and dynamic black level correction on the CMOS output data by effectively utilizing the chip's dark line data. During image acquisition, due to the physical characteristics of the CMOS chip itself and environmental factors, there may be a certain black level offset in the output image data, which may lead to an overall dark image or loss of detail in dark areas. This module calculates and adjusts the black level value in each frame of image data in real time based on the black level reference information reflected by the chip's dark lines (usually reserved line data for detecting dark current and other information during image acquisition). This ensures that the output image data remains accurate in terms of black level, effectively improving image quality and the accuracy of subsequent processing.
[0032] AE Mean Statistics Module: The AE (Image Image) average value module plays a crucial role in acquiring the average brightness of the current image, providing key data support for the automatic exposure control module. During each image acquisition cycle, this module comprehensively analyzes the acquired image data, calculating the average brightness of the entire image using a specific brightness calculation algorithm (such as a weighted average algorithm based on pixel grayscale values). This information is then fed back to the automatic exposure control module in real time. Based on the received average brightness information, and in conjunction with a preset target brightness range and exposure strategy, the automatic exposure control module dynamically adjusts parameters such as exposure time and gain to ensure that the image brightness remains within a suitable range, meeting the shooting needs under different lighting conditions.
[0033] DPC bad pixel correction module: The DPC dead pixel correction module boasts powerful automatic repair capabilities, primarily targeting dead pixel issues that arise in CMOS chips under various conditions. Due to their manufacturing processes, prolonged use, or operating in special environments such as high gain and high temperature, CMOS chips may develop dead pixels. These dead pixels appear in images with abnormal pixel values, severely impacting image quality. This module utilizes advanced algorithms and detection mechanisms to automatically identify these dynamic dead pixels, whether inherent to the chip itself or generated under specific conditions. Then, based on information from surrounding normal pixels, it automatically repairs the dead pixels using appropriate methods such as interpolation and mean replacement. This results in a more complete and clearer visual image, effectively improving the overall image quality.
[0034] Bayer interpolation module: The Bayer interpolation module focuses on converting color Bayer images into RGB color images, a crucial step in transforming images from their original sensor acquisition format to a universal color image format. In CMOS image sensors, a Bayer color filter array is typically used to acquire color image information. The output image data is arranged according to a specific Bayer pattern, with each pixel recording only one of the three primary colors: red, green, and blue. The Bayer interpolation module, based on the color information of surrounding pixels and specific interpolation algorithms (such as bilinear interpolation and cubic spline interpolation), estimates and fills in the missing two color information for each pixel, thus interpolating the Bayer image into a complete RGB color image. This enriches the image's color information and prepares it for subsequent, more refined color correction and display processing.
[0035] AWB & CCM calibration module: The core function of the AWB & CCM correction module is to perform color white balance correction on RGB images and improve image color reproduction, ensuring that the image accurately and realistically reproduces the shooting scene in terms of color. White balance correction mainly addresses the problem of color cast caused by differences in the color temperature of the light source under different lighting conditions. By analyzing the color deviation of white objects (or preset reference white areas) in the image, it automatically adjusts the proportion of the three primary colors of red, green, and blue, making white objects in the image appear truly white, thereby restoring the natural colors of the entire image. CCM correction (Color Correction Matrix Correction), based on a more accurate color model and a pre-calibrated correction matrix, further refines the colors of the image, improving the image color reproduction and making the colors of the image more vivid and realistic, meeting the high requirements of professional image applications for color accuracy.
[0036] Image enhancement and electronic defogging module: The image enhancement and electronic defogging module, based on the specific requirements of the system, utilizes professional image processing techniques to perform targeted enhancement and electronic defogging on images. In image enhancement, it focuses on multiple key dimensions such as image contrast, detail resolution, and color saturation. By employing algorithms such as histogram equalization, sharpening filtering, and color enhancement, it improves the visual effect of the image, making details clearer, colors more vibrant and saturated, and overall contrast more pronounced, thus enhancing the image's aesthetics and recognizability. The electronic defogging function addresses the problems of blurriness, reduced contrast, and color distortion in images captured in adverse weather conditions such as fog and sandstorms. It uses defogging algorithms based on physical models or deep learning to defog the image, restoring the clarity and color effects expected in fog-free environments, effectively expanding the detector components' application capabilities in complex environments.
[0037] Parameter reading module: The parameter reading module provides convenient parameter management for the optoelectronic pod. The camera allows for the saving of various parameters, and upon each power-on startup, this module automatically retrieves the previously configured parameters and loads them into the corresponding functional modules, ensuring that the detector components continue to operate stably according to previous settings. This feature not only simplifies operation by eliminating the need for parameter reconfiguration each time, but also ensures relative consistency in the detector components' operating status and image output across different work cycles, improving the equipment's usability and operational efficiency.
[0038] In some embodiments, a detailed description is provided for a camera used in an optoelectronic pod. First, the focus is on the principle of its optical system, specifically the refractive optical system employed by the camera in the optoelectronic pod (see [reference]). Figure 2 , Figure 2 (This is a schematic diagram of the principle of the photoelectric pod in the embodiments of this application). In terms of spectral applications, it is mainly used in the visible and near-infrared spectral regions, but there are also a few cases in which it is used in the thermal infrared spectral region.
[0039] Refractive optical systems have certain advantages in optoelectronic pod applications because they have many adjustable variables, making it relatively easy to meet the requirements of a large field of view and high imaging quality. However, for refractive systems with a wide spectral range, large aperture, and long focal length, implementation is quite difficult due to the limitations imposed by various optical properties of glass materials (including refractive index stability, material homogeneity, and material physical properties).
[0040] Specifically, refractive optical systems have the following significant characteristics: Optical efficiency and image quality advantages: The system works directly without any central obstruction. This characteristic enables it to achieve high optical efficiency and effectively avoids the image quality degradation caused by central obstruction, ensuring the stability of image quality in this aspect.
[0041] Manufacturing cost considerations: The surfaces of most refractive systems are spherical, a structure that cleverly avoids the high manufacturing costs associated with using aspherical surfaces. In actual manufacturing, spherical surface processing technology is relatively mature, and costs are easier to control, helping to reduce the overall manufacturing cost of the optical system while ensuring its feasibility.
[0042] Aberration Correction Capability: Refractive optical systems can correct various aberrations by adding optical elements. This feature creates the possibility of designing systems with large field of view and large relative aperture. By properly configuring and optimizing these optical elements, aberration problems that may be caused by factors such as system structure and materials can be effectively compensated for, thereby improving the sharpness and accuracy of imaging.
[0043] After selecting the optical system structure, a comprehensive optical system design must be carried out based on the specific performance requirements of the optoelectronic pod. To ensure that all technical specifications of the optoelectronic pod are met, the following series of technical measures were adopted: Regarding chromatic aberration correction: The front lens group and focusing group are designed with FK61 glass, which has a good effect on eliminating secondary chromatic aberration. In telephoto and sub-telephoto imaging, secondary chromatic aberration often has a significant impact on image quality. FK61 glass, with its unique optical properties, can effectively reduce this type of chromatic aberration, thereby improving the color accuracy and sharpness of the image, and making the color reproduction of the image more realistic and natural at different focal lengths.
[0044] Focusing Group Design: This lens utilizes a precision mechanical structure to achieve accurate reciprocating movement of the focusing group along the optical axis. In actual observation scenarios, the observation distance range is often quite wide. This precision mechanical structure ensures that a clear image can be obtained on the camera at any focal length, meeting the imaging requirements for observations at different distances and enhancing the lens's adaptability and practicality in real-world applications.
[0045] Zoom Group Functionality: As the core component enabling the zoom function of a zoom lens, the zoom group also utilizes a precision mechanical structure to achieve accurate back-and-forth movement along the optical axis. This method successfully achieves flexible focal length changes within the range of 25mm-500mm, allowing the lens to quickly and accurately adjust the focal length according to actual shooting needs, capturing objects at different distances and from different angles, thus expanding the lens's application range and shooting flexibility.
[0046] The function and implementation of the compensation group: Although the zoom group can achieve focal length variations within the range of 25mm-500mm, the imaging position corresponding to each focal length is different for any fixed target. To ensure the consistency of the imaging position throughout the entire focal length variation range, a movable compensation group is introduced, and a precision mechanical structure is also used to ensure its accurate back-and-forth movement along the optical axis. In this way, regardless of how the focal length varies within the specified range, the stability of the imaging position can be guaranteed, avoiding the impact on the observation effect caused by the shift in imaging position due to focal length changes.
[0047] Function of the rear fixing group: The rear fixing group plays a crucial role in the entire optical system. It not only achieves the focal length required by the system but also provides sufficient rear working distance. A suitable rear working distance is key to subsequent detector installation, optical path layout, and the stable performance of the overall system, ensuring the coordinated operation of the optical system with other components and the integrity of its overall function.
[0048] After design, the optical system exhibits the following clear design results: Focal length range: The focal length is set at 25mm-500mm. This focal length range is set after comprehensively considering the overall structure of the lens. The distance the zoom group moves directly affects the zoom ratio. The rear fixed group is ultimately responsible for determining this focal length range required by the system, so as to meet the shooting needs of targets at different distances and achieve clear imaging from close-up to distant scenes.
[0049] Relative aperture: The relative aperture is in the range of F3.6-F7.3. To ensure that the relative aperture meets this requirement at focal lengths from 25mm to 500mm, specific conditions must be met during the design phase. Specifically, for each focal length, the on-axis field of view must ensure that the projection range of the entrance pupil on each lens in the optical system is strictly within the light transmission diameter range of that lens. Meeting this condition has a crucial impact on the effective transmission of light and the brightness and sharpness of the image, and is one of the key design considerations for ensuring the imaging quality of the optical system.
[0050] Zoom structure selection: (see below) Figure 3 , Figure 4 , Figure 3 This is a schematic diagram of the structure of the optoelectronic pod under long focal length in the embodiments of this application; Figure 4This is a schematic diagram of the optoelectronic pod in a short focal length configuration according to an embodiment of this application;) The zoom structure employs a mechanical compensation method, implemented through a precision cam. During rotation, the precision cam drives the zoom group and compensation group to move precisely back and forth along the optical axis, thereby achieving the zoom function. Simultaneously, through precision machining and assembly techniques, the stability of the optical axis is effectively ensured, guaranteeing the accuracy and stability of the optical path during zooming and preventing image quality degradation due to optical axis misalignment or other issues.
[0051] Initial structural parameters were determined: based on requirements such as focal length, relative aperture, and target surface size, the entrance pupil diameter for the telephoto lens was first determined, thus clarifying the diameter of the front fixed lens group. It is worth noting that the longer the focal length, the larger the relative aperture, and the larger the target surface size, the longer the lens often needs to be. When installation space allows, designing a longer lens is more beneficial for ensuring aberration control at each focal length, thus improving image quality. This is a reasonable design consideration made after comprehensively balancing system performance, space constraints, and imaging effects.
[0052] Initial structural configuration selection for each group: After determining the initial structural parameters, the focal length and position of each group are determined sequentially, following principles favorable to aberrations. Subsequently, based on the requirements of relative aperture and target size, the light transmission diameter of each lens group is precisely determined, thus completing the determination of the entire initial structural parameters. This process is a gradual refinement and precise matching process, aiming to optimize the imaging performance of the optical system to the greatest extent and reduce the impact of aberrations on image quality by rationally configuring the parameters of each optical group.
[0053] After determining the structural scheme and initial parameters, adhering to the principle of maximizing aberrations, the surface curvature of the optical materials and lenses is further determined to complete the entire optical design work.
[0054] Subsequently, design optimization and image quality evaluation were carried out on the completed optical system. Optical characteristic parameters, such as focal length, entrance pupil distance, image size or object height, object distance, air gap between lenses, and lens thickness, etc., are directly related to the basic optical characteristics and structural layout of the optical system, playing a decisive role in the size and position of the image, as well as the propagation of light.
[0055] Image quality parameters, such as image distortion, field curvature, coma, and astigmatism, are key indicators for measuring image quality. Optimizing these parameters can effectively improve image sharpness, accuracy, and geometric fidelity, ensuring the final image meets high-quality requirements.
[0056] All these desired objectives are treated as optimization elements, and weighted accordingly to form an optimization function. By changing the structural parameters, this optimization function is minimized, thereby optimizing the optical system. Its evaluation function (MF) is defined as follows: In the formula, For the evaluation function, This indicates the importance of each optimization element. A higher weight indicates that the corresponding optimization element is given more importance during the optimization process, and its actual value's proximity to the target value has a greater impact on the optimization function value. For example, if the weight of optimization elements related to image sharpness is set higher, when changing structural parameters to minimize the optimization function, the system will be more inclined to allow the sharpness-related parameters to reach the target value. This refers to the current actual value of each optimization element in the optical system. For example, if the optimization element is focal length, This refers to the focal length value of the current optical system; if it refers to image quality parameters (such as distortion). This refers to the actual measured or calculated value of that image quality parameter in the current system. This represents the ideal value that each optimization element is expected to achieve. For example, for focal length, It is the target focal length preset according to the optical system design requirements; for image quality parameters, It is an ideal image quality index set to ensure image quality.
[0057] The optimization process of optical systems can be divided into two types: local optimization and global optimization. Local optimization refers to the process of calculating the values of various optimization elements by changing the values of system structural parameters (such as radius, thickness, optical glass materials, etc.), thereby forming the overall optimization function value. The core idea of this process is that when the current state of the system is already at a certain position in a "U"-shaped curve, the parameters are adjusted to make it fall to the minimum position in the middle of the "U", that is, to find the local optimum, so as to improve the current imaging quality and system performance.
[0058] Global optimization, unlike local optimization, is more like a search process, where optimization is performed within a region defined by structural parameters. During this process, the optimization function may experience several peaks and troughs (i.e., multiple extrema). Different methods have led to various global optimization algorithms. The advantage of global optimization lies in its ability to avoid local extrema, thereby finding a better structural form. This allows optical design to move further towards full automation, helps to uncover the potential for better performance in optical systems, and improves overall imaging quality.
[0059] The optical system optimization process can be broken down into the following four steps: Constructing a suitable optical system for ray tracing: First, a suitable optical system with ray tracing capabilities needs to be established, which forms the basis for subsequent optimization work. Only when the propagation path of light can be accurately simulated can system parameters be evaluated and adjusted based on the light propagation situation, thereby achieving the optimization goal.
[0060] Variable setting: Identify the variables that need to be optimized. These variables cover various key elements of the optical system, such as lens curvature, thickness, and materials. Appropriate selection and setting of variable ranges play a crucial role in the effectiveness and accuracy of the optimization process, guiding the optimization algorithm towards improving image quality.
[0061] Evaluation function construction: Based on the specific requirements of the optical system and the optimization objectives, a corresponding evaluation function is constructed. The evaluation function comprehensively considers multiple factors such as optical characteristic parameters and image quality parameters, and by reasonably allocating weight coefficients, it reflects the importance of different parameters to image quality, providing an accurate measurement standard for the optimization process.
[0062] Optimization execution: After completing the above preparations, the optimization algorithm is started. According to the set variables and evaluation function, the structural parameters are continuously adjusted to minimize the evaluation function, thereby realizing the gradual optimization of the optical system until satisfactory imaging quality and performance requirements are achieved.
[0063] In addition, the following important directions are emphasized in the selection of optical materials: Band transmittance: Optical materials with high transmittance in the applied band (such as visible and near-infrared bands) should be selected first. This can not only ensure the effective transmission of light in the optical system and reduce energy loss, but also improve the cost performance of the system to a certain extent, so that the optical system can meet the imaging quality requirements while reducing the cost investment.
[0064] Refractive index temperature coefficient: Choosing materials with a smaller refractive index temperature coefficient aims to reduce the likelihood of the material being affected by large temperature variations. In practical applications, optoelectronic pods may face different temperature environments. If the refractive index of the material changes significantly with temperature, it will exacerbate imaging problems such as aberrations and affect image quality. Therefore, this characteristic is crucial for ensuring the stability of the optical system under different temperature conditions.
[0065] Material Hardness: Select materials with relatively high hardness to prevent damage during assembly and adjustment. The assembly and adjustment of an optical system involves the precise installation and debugging of multiple components. If the material hardness is insufficient, it is easily damaged during operation, which will affect the performance and reliability of the entire optical system. Therefore, the hardness characteristics of the material are also an important factor that cannot be ignored when selecting materials.
[0066] Furthermore, a protective glass for the CMOS detector is incorporated into the system, and its aberration effects are fully considered. Through reasonable design and optimization measures, the imaging quality of the system is further improved. Simultaneously, appropriate boundary conditions are set, and comprehensive optimization and image quality evaluation are performed using ZEMAX optical design software.
[0067] The optical transfer function (OF) is a concept that treats an object as a spectrum of different frequencies and an optical system as a linear, invariant spatial frequency filter. It primarily represents the contrast relationship between the image and the object, reflecting the object's ability to transmit different frequencies. It is typically divided into three parts: high-frequency, mid-frequency, and low-frequency. Low-frequency range: mainly reflects the contour transmission of an object. It plays a key role in presenting the overall shape and general outline of an object, allowing the observer to clearly distinguish the basic form and structure of the object.
[0068] Mid-frequency range: This range focuses on reflecting the layering of objects, such as the texture of the object's surface and the details of the transition between different parts. Through the effective transmission of the mid-frequency range, the image becomes more layered and three-dimensional, enriching the information content contained in the image.
[0069] High-frequency range: Focuses on reflecting the details of an object. Details such as the sharpness of object edges and minute structures rely on the good transmission of high-frequency range to be displayed. For imaging applications that require high definition and high resolution, the performance of high-frequency range is crucial.
[0070] When the influence of the optical system on the object is ignored, this is the modulation transfer function (MTF), and the MTF curve is usually used to evaluate image quality. Based on the design results of this optical system, at short and long focal lengths (see [link to relevant documentation]). Figure 5 and Figure 6 , Figure 5 This is a schematic diagram of field curvature and distortion of the photoelectric pod at a focal length of 25mm in the embodiments of this application; Figure 6(This is a schematic diagram of field curvature and distortion of the optoelectronic pod at a focal length of 500mm in the embodiments of this application). The transfer function at the Nyquist frequency is better than 0.25, which indicates that the optical system has good imaging quality at different focal lengths, can effectively transmit various frequency information of objects, and ensure that the image can achieve high clarity and fidelity in terms of contour, layer and detail, thus meeting the strict requirements of the optoelectronic pod for imaging quality in practical applications.
[0071] An automatic dimming and focusing method for a camera used in an optoelectronic pod includes: S101. Capture real-time image frames through CMOS; execute a brightness adjustment strategy on the real-time image frames; wherein the brightness adjustment strategy includes: using the brightness evaluation value as a change quantity, repeating the following steps until the brightness evaluation value enters the target brightness range or reaches the preset number of adjustments, and obtaining a brightness-optimized image frame whose brightness evaluation value is closest to the target brightness range. The steps of the cycle are S102 to S105; It should be noted that in practical applications, automatic dimming aims to adjust key elements of the optical imaging system, such as aperture size, exposure, and gain, to alter the luminous flux and adapt it well to the current ambient lighting conditions, ultimately achieving good image quality. However, in the specific scenario described in this embodiment—specifically, when an unmanned helicopter equipped with an electro-optical turret is typically conducting long-distance tracking at night—aperture adjustment is not used for dimming. Adjusting the aperture would inevitably increase light intensity, leading to a significant change in luminous flux. This change could easily alert the tracked object, which is extremely detrimental to missions requiring covert tracking. Furthermore, improper aperture control could introduce noise interference, severely impacting image quality—an unacceptable defect in this scenario.
[0072] Based on the above considerations, this optoelectronic pod was designed with a fixed aperture size. Instead, the entire dimming control process was completed by precisely adjusting the gain value and exposure time. This ensures that the quality of the acquired images is guaranteed while meeting the requirements of long-distance tracking at night, thus ensuring that the entire tracking operation can be carried out smoothly and covertly.
[0073] "CMOS" is a common type of image sensor. "Real-time image frame" refers to a complete picture captured by the camera at a specific moment. It contains visual information formed by the light reflected from various objects in the shooting scene, and it is continuously updated as shooting continues to reflect the dynamic changes of the scene.
[0074] S102. Calculate the brightness evaluation value for the preset center field of view in the real-time image frame; The central field of view refers to a pre-defined area located at the center of the entire captured image frame, within the full scope of the real-time image frame, based on actual needs and image characteristics. This is because, in practical use, this area often contains the most critical observation targets and numerous detailed information that reflects the core features of the image, playing a vital role in the analysis and subsequent operations of the entire image. Therefore, this area is selected for subsequent related operations.
[0075] S103. Compare the brightness evaluation value with the preset target brightness range; S104. If the comparison result shows that the brightness evaluation value is outside the target brightness range, under the constraint of a fixed aperture, the exposure time is adjusted by sending a command to the CMOS to make the brightness evaluation value approach the target brightness range. It should be noted that the meaning of "brightness evaluation value approaching the target brightness range" mentioned here includes the situation where the brightness evaluation value reaches the target brightness range. In other words, as long as the brightness evaluation value is in the process of continuously approaching the target brightness range until it finally enters the range, it falls under the category of "approaching".
[0076] Exposure time refers to the duration for which a CMOS sensor receives light and is exposed to light. By changing this duration, the total amount of light entering the sensor can be controlled, thereby affecting the brightness of the image.
[0077] S105. When the brightness evaluation values corresponding to the exposure time adjustment actions within the adjustment range are not located in the target brightness range, compensation adjustment is made by adjusting the electronic gain value for the exposure optimization image whose brightness evaluation value is closest to the target brightness range. The phrase "when the brightness evaluation values corresponding to all exposure time adjustments within the adjustment range are not within the target brightness range" means that after multiple adjustments to adjust image brightness by changing the exposure time as described in the previous steps, within the allowable adjustment range (such as the preset maximum number of exposure time adjustments, the upper and lower limits of adjustable exposure time, etc.), none of the obtained brightness evaluation values fall within the target brightness range. This indicates that adjusting the exposure time alone cannot achieve the ideal image brightness, and other adjustment methods are needed to further optimize the brightness. The phrase "the exposure-optimized image whose brightness evaluation value is closest to the target brightness range" refers to an image where, after a series of exposure time adjustments, although all brightness evaluation values are not within the target brightness range, one image has the closest brightness evaluation value to the target brightness range. This image serves as the basis for subsequent electronic gain compensation adjustments, and it is closer to the ideal state in terms of brightness compared to other images.
[0078] Specifically, after a series of exposure time adjustments, and finding that the brightness evaluation value after each adjustment falls outside the target brightness range within the preset adjustment range, the system selects the image with the closest brightness evaluation value to the target brightness range from all previously adjusted images. Then, for this image, compensation is applied by adjusting the electronic gain value. First, based on the difference between the current brightness evaluation value and the target brightness range, the required electronic gain value is calculated. If the image is too dark, the electronic gain value is increased to amplify the electrical signal output by the CMOS sensor, thus improving image brightness; if the image is too bright, the electronic gain value is decreased accordingly. Next, the adjusted electronic gain value is set in the corresponding circuit parameters, causing the CMOS to output an electrical signal according to the new gain value, thereby generating a new image. The brightness evaluation value of the new image is then calculated to see if it can enter the target brightness range. If it still does not meet the requirements, the electronic gain value may continue to be adjusted or other adjustment methods may be combined to further optimize the image brightness until the expected brightness effect is achieved or other relevant stopping conditions are met (such as reaching the maximum number of gain adjustments).
[0079] A sharpness adjustment strategy is applied to the brightness-optimized image frame; the sharpness adjustment strategy includes: using the sharpness evaluation value as a change, repeating the following steps until the sharpness evaluation value reaches the optimal focus position of the peak, and obtaining the output image; The steps of the cycle are S106 to S108; Among them, the brightness-optimized image frame refers to the image frame whose brightness evaluation value has reached a relatively optimal state (such as entering the target brightness range or being closest to the target brightness range) after a series of operations of the previous brightness adjustment strategy.
[0080] After completing the brightness adjustment of the real-time image frames and obtaining the brightness-optimized image frames, in order to further improve the image quality and ensure that the image not only has appropriate brightness but also achieves a good level of sharpness, it is necessary to implement a sharpness adjustment strategy.
[0081] S106. Calculate the sharpness evaluation value based on the central field of view of the brightness-optimized image frame. The "sharpness rating" is a numerical value obtained by quantifying the image sharpness within the central field of view using a specific algorithm. It measures the sharpness of the image in that area, and its value reflects the sharpness of object edges and the degree of detail discernibility in the image. It is an important basis for subsequent judgment of image sharpness and for making sharpness adjustments.
[0082] During the execution of the sharpness adjustment strategy, after each relevant adjustment operation on the image (such as driving the front lens group displacement), it is necessary to calculate the sharpness evaluation value of the current image to evaluate the adjustment effect and determine the direction of the next adjustment. This step will be executed at this time.
[0083] S107, Drive the front mirror assembly to perform axial displacement; The front lens group refers to a set of optical lenses located at the front of the camera lens system. By changing the position of the front lens group, the focal length of the lens can be adjusted, thereby affecting the image sharpness and focusing effect. Axial displacement refers to the movement of the front lens group along the optical axis of the lens. The optical axis is the central axis of the lens optical system. The movement of the front lens group along this direction changes the relationship between the focal length and the object distance of the lens, thus allowing the image to focus on objects at different distances, thereby adjusting the image sharpness.
[0084] This step is performed when the lens focal length needs to be changed to find the optimal focus position during the execution of the sharpness adjustment strategy.
[0085] Specifically, when the system determines that the lens focal length needs to be adjusted to improve image sharpness based on the sharpness evaluation value, it sends a control command to the lens's drive mechanism. This drive mechanism typically consists of a motor (such as a stepper motor or servo motor) and a transmission device (such as gears or screws). The command includes the direction of displacement (forward or backward) and the amount of displacement (a specific distance value). After receiving the command, the drive mechanism starts operating the motor, which converts the rotational motion of the motor into linear motion of the front lens assembly through the transmission device, causing the front lens assembly to move along the optical axis as required by the command. After the displacement is completed, the lens focal length changes accordingly, and the image sharpness also changes. The system then recalculates the sharpness evaluation value to assess the effect of the displacement adjustment and determines the next step based on the new evaluation value.
[0086] S108. By comparing the change in sharpness evaluation value before and after displacement, determine the direction of movement for the next step, and perform axial displacement according to the direction of movement for the next step. The change in sharpness evaluation value before and after displacement refers to the difference between the sharpness evaluation value after displacement and the sharpness evaluation value before displacement, calculated after the front lens group is driven to make axial displacement. This difference can intuitively reflect the change in image sharpness after displacement operation. A positive difference indicates improved sharpness, and a negative difference indicates decreased sharpness. The absolute value of the difference indicates the degree of change.
[0087] As can be seen, by capturing image frames through CMOS to obtain raw data, and calculating the brightness evaluation value with the central field of view as the key focus area, the overall brightness is controlled by focusing on the key parts of the image. Through operations such as cyclic comparison, adjustment of exposure time and electronic gain, the brightness is dynamically optimized according to the actual lighting conditions, allowing it to accurately adapt to different environments. Subsequently, based on the brightness-optimized image, sharpness adjustment is performed. This is achieved by driving the front lens group to shift and determining the direction based on the change in sharpness, forming a feedback focusing mechanism. The entire mechanism works together to cope with changes in lighting and targets in complex reconnaissance environments, improving image quality, ensuring the accuracy and efficiency of reconnaissance, and ultimately increasing tracking accuracy and reducing the false alarm rate.
[0088] In actual use, when a drone is hovering, it will inevitably generate high-frequency vibrations; during flight, the drone will also be affected by airflow and sway. Faced with these interferences, the gyroscope and servo motors equipped on the gimbal are constantly doing their best to perform mechanical compensation, trying to "smooth out" these vibrations in order to maintain the stability of the image.
[0089] However, the compensation actions of these gimbals leave some small and rapid residual wobbling marks on the image.
[0090] It is worth noting that step S108 of this application determines the next movement direction by the change in the sharpness evaluation value. However, when faced with a situation where the image sharpness drops instantly due to gimbal compensation shaking, a misjudgment may occur, mistakenly interpreting it as "my previous focus movement direction was wrong".
[0091] Based on this misjudgment, the focusing algorithm issues a reverse movement command, blindly "chasing" the false changes in sharpness caused by gimbal shake. This creates a conflict of control with the gimbal's stabilization control system. In this situation, the focusing system is actually "doing more harm than good," attempting to "correct" a problem the gimbal is already working to fix, ultimately causing high-frequency vibrations near the focus point and exacerbating image instability.
[0092] Therefore, in some specific embodiments, before step S108, the following is also included: S201. Obtain the angular velocity data of the three axes of the carrier through a gyroscope coupled to CMOS; Among them, the angular velocity data of the three axes refers to the angular velocity values along the three mutually perpendicular coordinate axes (X, Y, and Z axes) of the carrier. By obtaining the angular velocities in these three directions, the rotation of the carrier in space can be fully and accurately grasped, and its stability and other states can be analyzed.
[0093] S202. Determine the platform stability based on angular velocity data; After acquiring the three-axis angular velocity data of the carrier, this step is necessary to assess whether the current platform's attitude stability meets the stability requirements for image acquisition and subsequent processing (such as focusing and sharpness adjustment). For example, when using a drone for aerial photography, the drone is constantly affected by factors such as airflow, resulting in attitude changes. After acquiring the angular velocity data, it is necessary to determine the platform's stability and see if there is a conflict in control of the gimbal's stabilization control system.
[0094] In some specific embodiments, pre-set angular velocity thresholds for different axes and their corresponding stability weights are read from a storage module (such as a system configuration file or a dedicated parameter storage area). For example, the X-axis angular velocity threshold is set to 5° / s with a weight of 0.3, the Y-axis angular velocity threshold is set to 8° / s with a weight of 0.4, and the Z-axis angular velocity threshold is set to 6° / s with a weight of 0.3. The second step involves comparing the acquired three-axis angular velocity data with the corresponding axial thresholds. If the angular velocity of a certain axis exceeds its threshold, points are deducted based on the degree of excess (e.g., a certain percentage is deducted for exceeding the threshold, and the score corresponds to the stability level). Then, the scores for each axis are weighted and summed to obtain a comprehensive stability score. The third step determines the platform stability level based on the range of the comprehensive stability score (e.g., 0-30 points for low stability, 31-70 points for medium stability, and 71-100 points for high stability), and outputs this as the final platform stability result for subsequent steps. This is not limited to a single step.
[0095] S203. Determine whether the platform stability is less than the preset stability threshold; S204. If it is not less than, then proceed to step S108; This step will be executed when the platform stability is determined to be no less than the preset stability threshold after the previous steps, meaning the platform is relatively stable and suitable for image sharpness adjustment.
[0096] S205. If it is less than, then the current position of the front lens group remains unchanged.
[0097] Once the preceding judgment determines that the platform stability is less than the preset stability threshold, meaning the platform is in an unstable state, the system will send an instruction to the relevant control module (such as the motor drive circuit) responsible for driving the front mirror assembly to perform axial displacement. The instruction clearly states that all operations that may change the current position of the front mirror assembly should be stopped, so that the power components such as the motor driving the front mirror assembly remain in their current stationary state, preventing them from receiving other erroneous signals that may change the position of the front mirror assembly or executing inappropriate displacement commands.
[0098] It is evident that the focus is on resolving the conflict between focusing and gimbal stabilization control. A gyroscope coupled to the CMOS sensor acquires carrier angular velocity data to determine platform stability, actively monitoring and quantifying external interference factors. When platform stability falls below a threshold, the front lens group position remains unchanged. To avoid misjudgments in the focusing algorithm, the error feedback chain caused by gimbal jitter is severed, allowing the focusing system and gimbal stabilization system to perform their respective functions, avoiding internal friction, and fundamentally ensuring image stability, preventing external shaking interference, and maintaining stable image quality.
[0099] While the above embodiments have solved the relevant problems to some extent, they have also introduced a new problem. Specifically, when the current position of the front lens group is kept unchanged, if this state is maintained for a long time, it will adversely affect the sharpness adjustment operation, thereby interfering with the entire image acquisition and optimization process and affecting the final use effect.
[0100] Therefore, after step S205, the method further includes: S301. Acquire all brightness-optimized images within the time window; the greater the difference between the platform stability and the preset stability threshold, the longer the time window. The time window refers to a specific time range during which images are collected. It is not a fixed duration but changes dynamically based on the difference between the platform stability and the preset stability threshold. The purpose is to select an appropriate number of brightness-optimized images for subsequent analysis and other operations under different platform stability conditions.
[0101] S302. Filter out all brightness-optimized images within the time window whose platform stability is not less than the preset stability threshold; and extract the corresponding movement direction; In some embodiments, all brightness-optimized images within the previously acquired and stored time window are traversed. For each image, its corresponding platform stability record is located (this record can be synchronously recorded during image acquisition and stored in association with the image data). Then, the stability value is compared with a preset stability threshold. If it is not less than the preset stability threshold, the image is selected and placed into a new set (such as an array or linked list data structure) as a brightness-optimized image that meets the requirements. Next, for these selected images, the associated records of the movement direction of the front lens group axial displacement during sharpness adjustment are searched (this record can be synchronously recorded and saved each time axial displacement is performed and has a corresponding relationship with the image). This movement direction information is extracted and arranged sequentially according to the image order to provide a data basis for subsequent operations such as filling the movement direction into the action sequence.
[0102] S303. Fill the motion direction into the action sequence in chronological order, and fill all brightness-optimized images within the time window whose platform stability is less than the preset stability threshold into the action sequence as placeholders. The process of filling the action sequence with the movement direction in chronological order involves extracting the front lens group movement directions extracted earlier for image sharpness adjustments at different time points and adding them sequentially according to their actual occurrence time. This ensures that the action sequence fully reflects the dynamic situation of the adjustment process. All brightness optimization images with a platform stability less than a preset stability threshold within the time window refer to those brightness optimization images acquired within the previously determined time window where the corresponding platform is in an unstable state (stability less than the preset stability threshold). Filling these images into the action sequence as placeholders means adding these unstable images to the action sequence using a specific placeholder representation (such as a specific symbol or code) to mark the platform instability during these time periods, allowing for differentiation of different states during subsequent analysis.
[0103] S304. Input the action sequence into the decision model to obtain the movement direction with the highest return. It should be noted that the decision model involved here is a key module in the entire image processing workflow used to comprehensively judge and determine the optimal movement direction. It has its own independent and specific operating logic and decision-making mechanism. The decision-making process based on this decision model will be described in detail below: For ease of understanding and clear expression, specific symbols are introduced to represent relevant elements in different states. Among them, the symbol "×" represents all brightness-optimized images where the platform stability is less than the preset stability threshold. These images are filled into the action sequence as placeholders throughout the decision-making process to indicate that the platform is in an unstable state during the corresponding time period. The symbols "→" and "←" represent all brightness-optimized images where the platform stability is not less than the preset stability threshold and their corresponding movement directions, respectively. They carry different directional information when the front lens group makes axial displacement adjustments in a relatively stable platform state, which is of great significance for subsequent decision analysis based on the action sequence.
[0104] From a fundamental perspective, the situation indicated by "×" occurs, which leads to the "comparison" step, originally intended to determine the next action, being unable to proceed normally, ultimately causing a break in the entire decision-making chain.
[0105] Priority 1: Inverted signal; Sequence characteristics: It presents a specific sequence pattern of "...→→→←×".
[0106] Physical meaning interpretation: The continuous sequence of movement direction indicators "→→→" represents that in each previous displacement operation process, the clarity of the image has shown a stable and continuous improvement trend, specifically manifested as the clarity evaluation value satisfying the relationship "C_n - 2 > C_n - 3, C_n - 3 > C_n - 4...". From a macroscopic perspective of image optimization, the system is steadily "climbing the mountain" along an effective adjustment path, meaning that each displacement operation promotes the image to gradually evolve towards a better clarity state, which reflects that the previous movement direction and adjustment strategy are effective in improving the image clarity.
[0107] The direction indicator "←" has a crucial turning significance in the whole sequence. It means that in the specific displacement stage from "P_n - 2" to "P_n - 1", the clarity of the image has decreased, that is, "C_n - 1 < C_n - 2". This clarity change trend strongly implies that the system was very close to, or even extremely likely to have crossed, the "peak point" of the image clarity at the moment of "P_n - 2" (here it can be analogized to the key node in the image adjustment process when reaching the best focus state and the clarity reaches the optimal level). Based on this clear and crucial clarity change feedback information, the system made a logical corrective action - "turn around", that is, change the movement direction, aiming to regain the effective path to improve the image clarity through reverse adjustment and make the image return to a better clear state.
[0108] "×" represents a special situation here, that is, after performing the "turn around" action of "←", although the system has moved to a new position, the situation of step S205 occurs. Given that there is a clear and reliable evidence chain behind the "turn around" decision, based on the image optimization logic and past practical experience, when facing the special and unknown situation represented by "×", this reasonable decision based on actual data should be fully trusted and followed. Therefore, from its internal logic and optimization intention, and considering the improvement of the overall image clarity, the reasonable direction choice for the movement corresponding to "×" should be to continue the previous turn around action to maintain consistency with the corrective logic made by the system based on the clarity change, ensuring that the subsequent adjustment actions can continue to advance along the direction conducive to improving the image clarity.
[0109] Based on the above analysis and strict logical deduction, it can be clearly determined that "× = ←", that is, the system should continue the displacement operation in the turn around direction in this case, so as to more likely make the image return to the optimization path of continuously improving clarity and achieve effective improvement of the image quality.
[0110] Priority 2: Trend inertia; Sequence feature: Presenting as a sequence form of "...←→→×".
[0111] Physical meaning interpretation: The continuous movement sequence “→→” clearly shows that in the two most recent effective displacement operations, the image sharpness has maintained a good upward trend, specifically reflected in the sharpness evaluation values satisfying the relationship “C_n-1>C_n-2, C_n-2>C_n-3”. This phenomenon fully demonstrates that the movement direction selected by the system at this stage is effective in improving image sharpness. Overall, the system is in a stable and positive “climbing” process, meaning that the current adjustment strategy and displacement operations are continuously pushing the image towards greater sharpness, which is highly consistent with the goal of image optimization.
[0112] The "×" here represents a situation where, when the system was at position "P_n-1", based on the previously observed positive and stable trend of "clarity still increasing", it continued to perform a displacement operation in the "→" direction, thus moving to position "P_n". However, after reaching this new position, due to specific factors such as external electromagnetic interference and temporary instability of the image acquisition equipment, the system failed to successfully acquire the corresponding clarity evaluation value "C_n", which undoubtedly brings some uncertainty to the subsequent decision-making process.
[0113] Core inference: In the entire dynamic process of image sharpness adjustment, as long as the system has not received a clear and critical negative feedback signal of "decrease in sharpness", from the reasonable logical perspective based on probability statistics and image optimization, the most appropriate and logical assumption is that the system is still in the stage of "not yet reaching the peak sharpness". This means that the currently selected direction of movement still has the potential to further improve image sharpness, and there is still a possibility to continue to advance the displacement operation along this effective direction to achieve continuous optimization of image sharpness.
[0114] Decision Basis: After comprehensively weighing various potential factors and past effective adjustment experience in similar situations, in this specific scenario, maintaining the original, proven, and effective movement direction for improving image sharpness is undoubtedly the lowest-risk strategy with the highest potential return (i.e., maximizing image sharpness improvement). This strategy fully utilizes existing effective adjustment trends, minimizing the risk of image sharpness degradation caused by blindly changing the movement direction, and ensuring that the image optimization process continues along a stable and efficient path.
[0115] Conclusion: Based on the above comprehensive and rigorous analysis and reasoning process, we arrive at the conclusion that "×=→", that is, in this case, the system should continue to perform displacement operations along the current effective movement direction in order to maintain and continue the good trend of continuous improvement in image clarity, which is in line with the overall goal and actual needs of image optimization.
[0116] Priority 3: Oscillation mode; Sequence characteristics: It presents a sequence form of "...→←→←×".
[0117] Physical meaning interpretation: The specific sequence of movement directions, "→←→←", represents that the system has reached a relatively special region near the image focus. This region can be figuratively described as a "mountain-top plain," meaning that within this region, the image sharpness is relatively less sensitive to displacement operations, exhibiting a subtle and complex state. Specifically, because the displacement amount produced by each stepper motor movement is relatively fixed, the system is prone to moving back and forth within a certain range within this "mountain-top plain" region. This leads to slight fluctuations in the image sharpness evaluation value, or even remaining almost unchanged in some cases. For example, the system might first determine that the image sharpness has slightly decreased after performing a "→" direction displacement operation, and then perform a "←" direction displacement operation to adjust it; subsequently, it might determine that the sharpness has also decreased after performing a "←" direction displacement operation, and then perform a "→" direction displacement operation again. This alternating process presents a high-frequency "fine-tuning" or "jittering" state within a local area, reflecting that the system is meticulously exploring and fine-tuning around the optimal focus position within this region.
[0118] Decision Basis: Considering that the system was already within this specific "fine-tuning" logical framework, and given the absence of significant external interference with its original adjustment pattern, based on the principles of maintaining adjustment continuity and adhering to past local optimization patterns, it is reasonable to assume that the system remains within this established "fine-tuning" logic, continuing its dynamic process of fine-tuning around the optimal focal position. Therefore, for the step corresponding to "×", the reasonable behavioral decision should be to move in the opposite direction to the previous step, thereby maintaining and continuing this oscillation pattern. This ensures that the system can continuously perform effective fine-tuning within the "mountain peak and plain" area near the focal point, maximizing the discovery of the optimal focal position, and further optimizing and improving image clarity.
[0119] Conclusion: Given that the previous movement direction was "←", based on the above decision criteria, in this case, "×=→", that is, the system should perform displacement operations in the opposite direction to the previous step, in order to match its inherent logic of making fine adjustments near the focus, and help the image clarity continue to approach the optimal state.
[0120] Priority 4: Initial / Default Policy; Sequence characteristics: Presented in a concise form of "×...", which represents the first displacement operation phase after the system starts.
[0121] In this initial stage, the system only has an initial position "P_0" and a corresponding initial sharpness "C_0," and has not yet accumulated any actual feedback data on the impact of different movement directions on image sharpness, remaining in a completely "exploratory" initial state. To initiate the crucial step of "comparing the change in sharpness evaluation value before and after displacement," which is vital for subsequent image optimization, the system must first perform a displacement operation to obtain basic information about changes in image sharpness, providing data support for subsequent decisions and adjustments. However, the core challenge the system faces at this point is the complete lack of historical data to guide which specific direction to move in; the direction of movement is entirely unknown, necessitating reliance on pre-defined program logic to determine the initial exploration direction.
[0122] Decision Basis: Given that the system currently lacks any historical data for decision-making reference, its decision-making behavior can only strictly follow the pre-set program logic. According to the established rules, upon system startup, it "first explores in a preset initial direction (such as the '→' direction). This preset logic aims to provide the system with an initial, reasonably reasonable direction of exploration, guiding the system to take the first step in acquiring information about changes in sharpness, and then initiating the subsequent complete image optimization and sharpness adjustment process. Although this initial direction selection may be somewhat tentative, it is a necessary measure for the system in the absence of prior data.
[0123] Conclusion: Therefore, under this specific initial condition, "×=→" (of course, the direction here can also be any other direction preset by the system that conforms to the initial exploration logic, depending on the initial overall settings of the system), that is, the system should continue to perform displacement operations according to the preset initial direction in order to accumulate basic data on changes in image clarity, and lay the necessary foundation for more accurate decision-making and adjustments in the future.
[0124] In some specific embodiments, step S304 specifically includes: S3041. Based on the direction of movement, determine whether there is a reversal signal at the end of the action sequence; the reversal signal is that there are at least two consecutive same-direction movement directions at the end of the action sequence, followed by a reverse movement direction opposite to the same-direction movement direction. First, the input action sequence is obtained, which consists of symbols representing different meanings ("×", "→", "←") arranged in chronological order. Starting from the end of the action sequence, the elements (movement direction symbols) are read sequentially, and the conditions for a reversal signal are checked. Specifically, it is checked whether there are at least two consecutive same-direction movement directions (either consecutive "→" or consecutive "←") at the end of the action sequence, and whether a reverse movement direction (if "→" precedes "←" and vice versa) is immediately followed by a movement direction in the opposite direction (if "→" precedes "←" and vice versa).
[0125] Suppose the current action sequence is "...→→→←×→←→", the system scans from right to left (i.e., starting from the end). First, it sees the "→" at the end, then continues scanning to the left and finds another "←", which does not meet the condition of at least two consecutive same-direction movement directions, so it continues scanning to the left. When scanning the "×→←→" part, it finds three consecutive "→", which satisfies the condition of at least two consecutive same-direction movement directions. Then, a "←" appears, which is the opposite of the previous same-direction movement "→", so a reversal signal is determined to exist at the end of this action sequence. For example, if the action sequence is "...←←×→←", scanning from the end, first there is a "←", then only one "→" to the left, which does not satisfy the requirement of at least two consecutive same-direction movement directions, therefore, there is no reversal signal at the end of this action sequence.
[0126] S3042. If a reversal signal exists, the reverse movement direction is determined as the movement direction with the highest return.
[0127] After step S3041 determines that a reversal signal exists at the end of the action sequence, the reverse movement direction, which is opposite to the continuous same-direction movement direction, is directly extracted according to the logical characteristics of the reversal signal and identified as the movement direction with the highest yield. This is based on the fact that the appearance of a reversal signal means that the previous movement trend of the system has approached or exceeded the peak point of clarity, and it is necessary to find an effective path to improve clarity again through reverse movement, just as the principle explained in the previous interpretation of the physical meaning of the reversal signal was explained.
[0128] For the action sequence "...→→→←×→←→" that was previously identified as having a reversal signal, since its end features a continuous "→→→" followed by "←", according to the rules, the reverse movement direction "←" is directly determined as the movement direction with the highest yield. At this time, the system will take "←" as the suggested direction for the next axial displacement of the front lens group, believing that moving in this direction is more likely to improve image sharpness, thus bringing it back to the path of continuous optimization.
[0129] As can be seen, the characteristic signals of the action sequence are used to accurately guide the focusing direction. By judging whether there is a reversal signal at the end of the action sequence, the hidden regularity information in the action sequence is extracted to identify key turning points in the focusing process. When a reversal signal is present, determining the reverse movement direction is optimal. This reflects adjusting in accordance with the changes in image sharpness, avoiding the blind reverse operation that may occur in conventional methods, and making the focusing action more proactive.
[0130] S3043. If there is no reversal signal, trace back from the end of the action sequence to locate the last movement direction and define the direction as an end trend direction; the end trend direction is the movement trend that is verified to improve the clarity evaluation value before the placeholder appears. When it is determined in step S3041 that there is no reversal signal at the end of the action sequence, the system begins to trace back from the end of the action sequence. During the search, the placeholder "×" representing the platform's unstable state is ignored, and the focus is on the movement direction symbols ("→" and "←") representing the platform's stability is not less than a preset stability threshold, until the last such movement direction symbol is found, which is then determined as the end trend direction. This end trend direction represents the movement trend that, before the placeholder appeared, was verified to improve the image sharpness evaluation value through past displacement operations and corresponding sharpness assessments (where sharpness evaluation values can be obtained). That is, the system was in an effective sharpness improvement process at that time, so in the absence of a reversal signal indicating a need to change direction, the continuation of this effective trend direction is given priority.
[0131] Assuming the action sequence is "...←→×←←→", tracing back from the end, we first encounter "→", then "×", and continuing forward, we encounter "←←". Since we are looking for the last movement direction before the placeholder "×" appears, we determine "←" as the final trend direction. Another example is the action sequence "...→→×→←". Looking back from the end, we first encounter "←", then "×", and continuing forward, we find "→→". Therefore, the final trend direction is "→", meaning that during the previous operations, the image sharpness was increasing along the "→" direction. Without a reversal signal indicating a change in direction, this effective trend of increasing sharpness tends to continue.
[0132] S3044. Determine the direction of the terminal trend as the direction of movement with the highest return.
[0133] After determining the terminal trend direction in step S3043, and considering that the system is in a continuous process of optimizing image sharpness, in the absence of a clear signal indicating a need to reverse the direction, continuing the previously effective trend is more likely to further improve sharpness. Therefore, this terminal trend direction is determined as the movement direction with the highest yield. The system will then perform corresponding axial displacement operations on the front lens assembly based on this determined direction. After each new displacement operation, the entire decision-making process (starting from S3041) will be repeated, continuously adjusting the movement direction based on the new action sequence to continuously optimize image sharpness.
[0134] For the action sequence "...←→×←←→" where the terminal trend direction is determined to be "←", the system identifies "←" as the movement direction with the highest return, and then drives the front lens assembly to perform axial displacement in the "←" direction. After the displacement is completed, a new action sequence (including the new movement direction and the symbols corresponding to possible platform stability conditions, etc.) is collected again, and the system re-enters step S3041 for a new round of judgment. This process is repeated continuously, dynamically adapting to changes in image and platform status, and always adjusting operations towards the goal of improving image clarity.
[0135] It is evident that utilizing the overall trend of the action sequence to rationally determine the focusing direction is crucial, especially in the absence of a reversal signal. Tracing back from the end of the action sequence to find the optimal trend direction and respecting previously validated focusing trends allows for decision-making on the next action based on historical data, even in the absence of clear reversal signals. This ensures the continuity and rationality of the focusing action and avoids falling into disordered focusing.
[0136] S305. Perform axial displacement in the direction of highest yield.
[0137] As can be seen, acquiring images within a time window and relating them to platform stability and the time window length signifies a comprehensive consideration of system stability and time factors, flexibly filtering images to extract information based on different levels of stability. This information is then organized into an action sequence and input into a decision model to obtain the optimal movement direction, overcoming the focusing challenges in special scenarios. This avoids both stagnation caused by prolonged inactivity and blind focusing, thus resolving the issue of stagnation in the focusing action.
[0138] In some embodiments, step S105 is replaced with S401. Obtain the current real-time focal length value of the camera; S402. Based on the real-time focal length value, query and determine the dynamic gain upper limit from a preset focal length-gain mapping table; The "preset focal length-gain mapping table" is a data table that is constructed in advance based on factors such as the optical characteristics of the camera, the performance of the image sensor, and the desired image quality, through a large number of experimental tests and data analysis. The table records the appropriate upper limit value of electronic gain corresponding to different focal lengths. Its purpose is to reasonably limit the adjustment range of electronic gain values under different focal length conditions, so as to avoid problems such as excessive noise and deterioration of image quality due to excessive electronic gain, or excessive darkness of image due to excessive electronic gain, thereby ensuring that the image has good quality performance under different focal lengths.
[0139] S403. Compensation adjustment is performed by adjusting the electronic gain value, wherein the adjusted electronic gain value is not greater than the upper limit of the dynamic gain. Step S106 is replaced with: S404, determine the focal length type based on the real-time focal length value, select the adaptive sharpness evaluation function from the preset function library based on the focal length type, optimize the central field of view of the image frame based on the brightness, and calculate the sharpness evaluation value using the adaptive sharpness evaluation function.
[0140] The "focal length type" is a category categorized based on real-time focal length values. It can be classified according to the range of focal lengths (e.g., short focal length, medium focal length, long focal length) or the focal length range corresponding to the application scenario (e.g., macro focal length, general shooting focal length, telephoto focal length). Categorizing focal lengths into different types helps in selecting more appropriate sharpness evaluation methods for different focusing situations. The "pre-built function library" is a pre-built collection of various sharpness evaluation functions. These functions are based on different principles and algorithms; some are more suitable for evaluating image sharpness in short focal length situations, while others can more accurately reflect sharpness at long focal lengths. By selecting the appropriate function, the sharpness of the image can be measured more precisely.
[0141] Specifically, the first step is to categorize the real-time focal length values to determine the focal length type. This can be done by setting different focal length ranges. For example, focal lengths less than a certain value (e.g., 10mm) can be classified as short focal length, those within a certain range (e.g., 10mm-50mm) as medium focal length, and those greater than 50mm as telephoto (the specific values are determined based on the camera's actual specifications and application scenario). The acquired real-time focal length values are compared with these preset ranges to determine which focal length type they belong to. After determining the focal length type, the corresponding adaptive sharpness evaluation function is searched from a pre-built function library. Functions in the function library can be associated with different focal length types using tags or indexes. For example, a structure array can be used to store the function library information. Each structure element contains a focal length type field and a pointer to the corresponding sharpness evaluation function. By traversing this array, the structure element matching the current focal length type is found, and the corresponding function pointer is extracted, thus identifying the adaptive sharpness evaluation function. Finally, using the found adaptive sharpness evaluation function, the image data of the central field of view region is passed into the function according to its required input parameter format (usually the image data of the central field of view region of the brightness-optimized image frame extracted in the previous steps). The function will calculate according to its own algorithm (which may be based on image gradient, frequency domain analysis or other algorithms specifically optimized for this focal length type) and finally output a sharpness evaluation value to accurately reflect the sharpness of the current image in the central field of view region.
[0142] It is evident that electronic gain adjustment and sharpness evaluation can be implemented more realistically and precisely. Obtaining real-time focal length values and determining the dynamic gain upper limit accordingly, as well as selecting an adaptive sharpness evaluation function, implicitly considers the impact of focal length changes on the image. Electronic gain is adjusted adaptively according to different focal length states, while a matching evaluation function is used to accurately measure sharpness. This results in better synergy among all components, effectively addressing imaging needs at different focal lengths, improving overall image quality, and ensuring clear and usable images are acquired even in diverse and complex reconnaissance environments.
[0143] In some embodiments, step S107 specifically includes: S601. Based on the target focal length value, query and obtain the corresponding theoretical focal position from the calibrated focal length-focal point position relationship data; The target focal length value refers to the desired focal length, which is usually a pre-set value based on shooting needs, the desired image effect (e.g., using a telephoto lens to shoot distant objects, or a short focal length for close-ups), or a specific image adjustment strategy. It represents the final focused state the lens should achieve. The calibrated focal length-focus position relationship data is a set of data obtained during the camera manufacturing and debugging phases. This data is compiled after extensive testing and recording of the actual focus position of the lens at different focal length settings using professional optical measurement equipment and methods. This data set reflects the accurate correspondence between focal length and focus position, and is generally presented in the form of tables, curves, or mathematical functions. It provides a basis for subsequently determining the accurate focus position based on the target focal length value. The theoretical focus position is the ideal focus position that the lens should be in, obtained by matching the target focal length value to the aforementioned focal length-focus position relationship data. Knowing this position guides the lens to perform accurate focusing operations, achieving the desired image sharpness.
[0144] S602, Move to the obtained theoretical focus position; Step S108 specifically includes: S604. By comparing the changes in sharpness evaluation values before and after displacement, the next direction of movement is determined, starting from the theoretical focal position, and axial displacement is performed according to the next direction of movement.
[0145] As can be seen, by querying and obtaining the corresponding theoretical focus position from the calibrated focal length-focus position relationship data based on the target focal length value, it can clearly define the initial target based on the accurate measurement data in the early stage, avoiding blind focusing; then, it moves precisely to the theoretical focus position, and the driving mechanism ensures the accuracy of the displacement, laying a good foundation for the subsequent steps; then, starting from the theoretical focus position, it determines the next movement direction by comparing the change in sharpness evaluation value before and after the displacement and performs axial displacement for dynamic optimization, which effectively improves the efficiency and accuracy of finding the focus at the beginning.
[0146] The exemplary optoelectronic pod 700 provided in the embodiments of this application is described below. Figure 7 This is an exemplary hardware structure diagram of the optoelectronic pod 700 provided in the embodiments of this application.
[0147] In some embodiments, the optoelectronic pod 700 is a computer device or includes a computer device within the optoelectronic pod 700. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores data. The network interface of the computer device is used to communicate with other external terminals or servers via a network connection. In some embodiments, the network interface can be a wired network interface; in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, it implements the methods described in the embodiments of this application.
[0148] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0149] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0150] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0151] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0152] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An automatic dimming and focusing method for a camera used in an optoelectronic pod, characterized in that, include: Capture real-time image frames using CMOS; A brightness evaluation value is calculated for a preset central field of view region in the real-time image frame; Compare the brightness evaluation value with the preset target brightness range; If the comparison result shows that the brightness evaluation value is outside the target brightness range, under the constraint of a fixed aperture, the exposure time is adjusted by sending a command to the CMOS to make the brightness evaluation value approach the target brightness range. When the brightness evaluation values corresponding to the exposure time adjustment actions within the adjustment range are not within the target brightness range, the electronic gain value is adjusted to compensate for the exposure optimization image whose brightness evaluation value is closest to the target brightness range. The sharpness evaluation value is calculated based on the central field of view of the brightness-optimized image frame; Drive the front mirror assembly to perform axial displacement; By comparing the change in sharpness evaluation value before and after displacement, the direction of the next movement is determined. Axial displacement is then performed according to the next movement direction until the sharpness evaluation value reaches the optimal focal position of the peak, and the output image is obtained.
2. The method according to claim 1, characterized in that, Before the step of determining the next movement direction by comparing the change in sharpness evaluation value before and after displacement, and performing axial displacement according to the next movement direction, the method further includes: The angular velocity data of the carrier's three axes are obtained by using a gyroscope coupled to CMOS. The platform stability is determined based on the angular velocity data. Determine whether the stability of the platform is less than a preset stability threshold; If it is not less than, then perform the step of determining the next movement direction by comparing the change in sharpness evaluation value before and after displacement, and performing axial displacement according to the next movement direction. If it is less than, then the current position of the front lens group remains unchanged.
3. The method according to claim 2, characterized in that, After the step of maintaining the current position of the anterior lens group unchanged if the value is less than the specified value, the method further includes: All brightness-optimized images within the acquisition time window are captured; wherein the greater the difference between the platform stability and the preset stability threshold, the longer the time window. Filter out all brightness-optimized images within the time window whose platform stability is not less than a preset stability threshold; and extract the corresponding movement direction; The movement direction is filled into the action sequence in chronological order, and all the brightness-optimized images whose platform stability is less than a preset stability threshold within the time window are filled into the action sequence as placeholders; By inputting the action sequence into the decision model, the direction of movement with the highest return is obtained; Axial displacement is performed in the direction of highest yield.
4. The method according to claim 3, characterized in that, The step of inputting the action sequence into the decision model to obtain the movement direction with the highest return specifically includes: Based on the movement direction, determine whether there is a reversal signal at the end of the action sequence; the reversal signal is that there are at least two consecutive same-direction movement directions at the end of the action sequence, followed by a reverse movement direction opposite to the same-direction movement direction. If the reversal signal exists, the reverse movement direction is determined as the movement direction with the highest return.
5. The method according to claim 4, characterized in that, After determining whether a reversal signal exists at the end of the action sequence based on the movement direction, the method further includes: If the reversal signal does not exist, trace back from the end of the action sequence to locate the last movement direction and define the direction as an end trend direction; the end trend direction is the movement trend that is verified to improve the sharpness rating before the placeholder appears. The direction of the terminal trend is determined as the direction of movement with the highest rate of return.
6. The method according to claim 1, characterized in that, The step of compensating and adjusting by adjusting the electronic gain value specifically includes: Obtain the current real-time focal length value of the camera; Based on the real-time focal length value, the dynamic gain upper limit is determined by querying a preset focal length-gain mapping table; Compensation is achieved by adjusting the electronic gain value, wherein the adjusted electronic gain value is not greater than the upper limit of the dynamic gain. The step of calculating the sharpness evaluation value based on the central field of view of the brightness-optimized image frame specifically includes: The focal length type is determined based on the real-time focal length value, and an adaptive sharpness evaluation function is selected from a preset function library based on the focal length type. The sharpness evaluation value is calculated using the adaptive sharpness evaluation function based on the central field of view of the image frame optimized by the brightness.
7. The method according to claim 1, characterized in that, The step of driving the front mirror assembly to perform axial displacement specifically includes: Based on the target focal length value, the corresponding theoretical focal position is retrieved from the calibrated focal length-focal point position relationship data; Move to the obtained theoretical focus position; The step of determining the next movement direction by comparing the change in sharpness evaluation value before and after displacement, and then performing axial displacement according to the next movement direction, specifically includes: By comparing the change in sharpness evaluation value before and after displacement, the next direction of movement is determined, starting from the theoretical focal position, and axial displacement is performed according to the next direction of movement.
8. A photoelectric pod, characterized in that, The optoelectronic pod includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the optoelectronic pod to perform the method as described in any one of claims 1-7.
9. A computer program product containing instructions, characterized in that, When the computer program product is run on the optoelectronic pod, it causes the optoelectronic pod to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium comprising instructions, characterized in that, When the command is executed on the optoelectronic pod, the optoelectronic pod performs the method as described in any one of claims 1-7.