Intelligent imaging control method and system based on magnetic zoom lens

By implementing an intelligent imaging control method on the magnetic zoom lens, using pre-trained models and image feature prediction control parameters, the problem of poor adaptability of the magnetic zoom lens in complex environments is solved, and high-quality intelligent imaging is achieved.

CN119233091BActive Publication Date: 2025-05-13DONGGUANKPUDA OPTICALTECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411293593.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-05-13
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

Existing magnetic zoom lenses have poor adaptability in complex shooting environments, making it difficult to achieve high-quality intelligent imaging.

Method used

An intelligent imaging control method based on magnetic zoom lens is adopted to achieve dynamic optimization by initializing system parameters, loading pre-trained models, acquiring initial images and evaluating their quality, based on image features and object distance prediction control parameters, and adjusting the zoom and focus mechanism.

Benefits of technology

It significantly improves the adaptability, accuracy and response speed of imaging control, and enables high-quality images to be captured in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233091B_ABST
    Figure CN119233091B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of intelligent imaging, and in particular to an intelligent imaging control method and system based on a magnetic zoom lens. The present application first initializes the system parameters and loads the pre-trained model, then obtains the initial image and evaluates its quality, then predicts the control parameters based on the image features and object distance, and then adjusts the zoom and focus mechanisms according to the prediction results, and finally achieves dynamic optimization through continuous image acquisition and quality evaluation; it not only makes full use of the hardware characteristics of the magnetic zoom lens, but also introduces intelligent learning and comprehensive evaluation mechanisms, thereby significantly improving the adaptability, accuracy and response speed of imaging control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intelligent imaging, and in particular to an intelligent imaging control method and system based on a magnetic zoom lens. Background Art

[0002] With the rapid development of smart phones and digital camera technology, users' requirements for image quality are constantly increasing. As key factors affecting image quality, the intelligent control of zoom and focus functions has become a research hotspot. Magnetic zoom lenses are widely used in the field of intelligent imaging due to their compact structure and fast response.

[0003] In the prior art, the control method of the magnetic zoom lens mainly adopts preset control parameters or simple feedback control. For example, the lens movement is controlled by a pre-set zoom and focus parameter table, or a single indicator such as image contrast is used for real-time adjustment. These methods achieve automatic zoom and focus to a certain extent, but it is difficult to adapt to complex and changeable shooting environments, and this situation needs to be further improved. Summary of the invention

[0004] In order to solve the problem of poor adaptability of existing zoom lenses, the present application provides an intelligent imaging control method and system based on a magnetic zoom lens, which adopts the following technical solutions:

[0005] In a first aspect, the present application provides an intelligent imaging control method based on a magnetic zoom lens, which is applied to a magnetic zoom lens, wherein the magnetic zoom lens includes a zoom drive mechanism and a focus drive mechanism, the zoom drive mechanism includes a zoom stator assembly and a zoom mover assembly, and position feedback is achieved through a Hall magnetic ring and a Hall sensing device, and the focus drive mechanism includes a focus stator assembly and a focus mover assembly, and a magnetic field is generated by controlling the current of a drive coil of the focus mover assembly, and focusing is achieved by interacting with a permanent magnetic material of the focus stator assembly. The method includes the following steps:

[0006] Initialize system parameters, including reading Hall sensor device signals, obtaining drive coil current values, and loading pre-trained mapping relationship models;

[0007] Acquire an initial frame image, and use a predefined image quality evaluation function to calculate an image quality score of the initial frame image; acquire a current image feature of the initial frame image, activate a laser ranging module to measure the distance of the photographed object, and predict a target control parameter using the mapping relationship model according to the distance of the photographed object and the current image feature;

[0008] Based on the target control parameter, adjusting the zoom drive mechanism and the focus drive mechanism;

[0009] During the adjustment process, images are continuously collected and image quality scores are calculated, and the zoom drive mechanism and focus drive mechanism are adjusted simultaneously until the image quality score is higher than a preset score or reaches a preset upper limit of iteration times, and focusing is completed.

[0010] By adopting the above technical solution, in order to solve the problem of poor adaptability of existing magnetic zoom lenses in complex shooting environments, the present application proposes an intelligent imaging control method based on a magnetic zoom lens. First, the system parameters are initialized and the pre-trained model is loaded. Then, the initial image is acquired and its quality is evaluated. Next, the control parameters are predicted based on the image features and the object distance. The zoom and focus mechanisms are adjusted according to the prediction results. Finally, dynamic optimization is achieved through continuous image acquisition and quality evaluation. This method not only fully utilizes the hardware characteristics of the magnetic zoom lens, but also introduces intelligent learning and comprehensive evaluation mechanisms, thereby significantly improving the adaptability, accuracy and response speed of imaging control.

[0011] Optionally, the pre-trained mapping relationship model is a neural network model, the input of the neural network model is image features and the distance of the photographed object, and the output of the neural network model is the target signal value of the Hall sensor device and the target current value of the driving coil.

[0012] By adopting the above technical solution, in order to further improve the intelligent control accuracy and adaptability of the magnetic zoom lens, the present application uses image features and the distance of the photographed object as input, and directly outputs the target signal value of the Hall sensor device and the target current value of the driving coil; in specific implementation, firstly, a large amount of image features, object distances and corresponding optimal control parameter data in different scenes are collected for training the neural network model; in actual use, the system obtains the current image features and object distances, and inputs the trained neural network model to obtain the optimized control parameters; it can not only capture complex nonlinear relationships, but also has strong generalization capabilities, and can adapt to various shooting environments. At the same time, by directly outputting control parameters, the intermediate calculation steps are reduced and the response speed is improved, thereby significantly enhancing the intelligent control performance of the magnetic zoom lens.

[0013] Optionally, adjusting the zoom drive mechanism and the focus drive mechanism specifically includes the following steps:

[0014] Calculating a first PID control amount according to a difference between a target signal value and a current signal value of a Hall sensor device, and adjusting the movement of the zoom mover assembly based on the first PID control amount;

[0015] According to the difference between the target current value and the current value of the driving coil, a second PID control amount is calculated, and the current of the driving coil is adjusted based on the second PID control amount.

[0016] By adopting the above technical solution, in order to achieve precise control of the magnetic zoom lens, the present application performs closed-loop control on the zoom drive mechanism and the focus drive mechanism respectively, and dynamically adjusts the control parameters by comparing the difference between the target value and the current value in real time; first, the first PID control amount is calculated according to the difference between the target signal value and the current signal value of the Hall sensor device, which is used to accurately adjust the movement of the zoom actuator assembly; secondly, the second PID control amount is calculated based on the difference between the target current value and the current current value of the drive coil, which is used to accurately control the current of the drive coil; it can not only effectively suppress the nonlinear characteristics and external interference of the system, but also achieve rapid response and stable control, thereby significantly improving the control accuracy and system stability of the magnetic zoom lens.

[0017] Optionally, the image features include edge clarity features, high-frequency information features, contrast features, local variance features and gradient amplitude features.

[0018] By adopting the above technical scheme, the present application analyzes images from different angles and extracts a variety of features that can reflect the image quality, including extracting edge clarity features to evaluate the clarity of the image, calculating high-frequency information features to measure the detail richness of the image, analyzing contrast features to evaluate the brightness difference of the image, calculating local variance features to reflect the texture information of the image, and extracting gradient amplitude features to characterize the edge strength of the image. It can comprehensively reflect various quality aspects of the image and provide effective input information for the pre-training model, thereby significantly improving the accuracy of image quality assessment and the precision of intelligent control.

[0019] Optionally, the image quality assessment function is Q(I)=w1*S(I)+w2*C(I)+w3*SSIM(I);

[0020] Among them, S(I) is the clarity score, C(I) is the contrast score, SSIM(I) is the structural similarity score, and w1, w2, and w3 are weight coefficients. The final image quality score is obtained by comprehensively considering the clarity, contrast, and structural similarity of the image.

[0021] By adopting the above technical solution, the present application comprehensively considers the three key dimensions of image clarity, contrast and structural similarity, and obtains the final image quality score by weighted summation. It can not only comprehensively reflect various quality aspects of the image, but also adapt to different application scenarios and user needs by adjusting the weight coefficient, thereby significantly improving the accuracy and flexibility of image quality assessment and providing a more reliable decision-making basis for intelligent imaging control.

[0022] Optionally, the weight coefficients w1, w2, and w3 are adaptive weights, and before using a predefined image quality assessment function to calculate the image quality score of the initial frame image, the method further includes the following steps:

[0023] Acquire a currently captured scene image, and classify the scene image according to a pre-trained scene classification model to obtain a scene category;

[0024] Based on the scene category, selecting an initial weight value from a preset weight library;

[0025] A weight adjustment factor is calculated according to the brightness, motion detection result and texture complexity of the image, and the initial weight value is adjusted based on the weight adjustment factor to obtain an adjusted weight coefficient.

[0026] By adopting the above technical solution, the present application first obtains the current shooting scene image and classifies it using a pre-trained scene classification model; then selects an initial weight value from a preset weight library based on the classification result; then considers factors such as image brightness, motion detection results, and texture complexity to calculate the weight adjustment factor; finally, adjusts the initial weight value based on the adjustment factor to obtain the final adaptive weight coefficient; the evaluation criteria can be flexibly adjusted according to different shooting scenes, which significantly improves the accuracy and adaptability of image quality evaluation, and provides support for achieving high-quality intelligent imaging control in various complex shooting environments.

[0027] In a second aspect, the present application provides an intelligent imaging control system based on a magnetic zoom lens, which is applied to a magnetic zoom lens, wherein the magnetic zoom lens includes a zoom drive mechanism and a focus drive mechanism, the zoom drive mechanism includes a zoom stator assembly and a zoom mover assembly, and position feedback is achieved through a Hall magnetic ring and a Hall sensing device, and the focus drive mechanism includes a focus stator assembly and a focus mover assembly, and a magnetic field is generated by controlling the current of the drive coil of the focus mover assembly, and focusing is achieved by interacting with the permanent magnetic material of the focus stator assembly. The system includes:

[0028] The initialization module is used to initialize system parameters, including reading the Hall sensor device signal, obtaining the drive coil current value, and loading the pre-trained mapping relationship model;

[0029] A quality score calculation module, used to obtain an initial frame image and calculate an image quality score of the initial frame image using a predefined image quality evaluation function;

[0030] A control parameter prediction module, used to obtain the current image features of the initial frame image, activate the laser distance measurement module to measure the distance of the photographed object, and predict the target control parameter using the mapping relationship model according to the distance of the photographed object and the current image features;

[0031] A focus adjustment module, used for adjusting the zoom drive mechanism and the focus drive mechanism based on the target control parameter;

[0032] The iterative optimization module is used to continuously capture images and calculate image quality scores during the adjustment process, and simultaneously adjust the zoom drive mechanism and the focus drive mechanism until the image quality score is higher than a preset score or reaches a preset upper limit of the number of iterations, and the focusing is completed.

[0033] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned intelligent imaging control method based on a magnetic zoom lens when executing the computer program.

[0034] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned intelligent imaging control method based on a magnetic zoom lens are implemented.

[0035] In summary, the present application includes at least one of the following beneficial technical effects:

[0036] 1. This application proposes an intelligent imaging control method based on a magnetic zoom lens. First, the system parameters are initialized and the pre-trained model is loaded. Then, the initial image is acquired and its quality is evaluated. Then, the control parameters are predicted based on the image features and the object distance. Then, the zoom and focus mechanisms are adjusted according to the prediction results. Finally, dynamic optimization is achieved through continuous image acquisition and quality evaluation. This method not only makes full use of the hardware characteristics of the magnetic zoom lens, but also introduces an intelligent learning and comprehensive evaluation mechanism, thereby significantly improving the adaptability, accuracy and response speed of imaging control.

[0037] 2. In order to further improve the intelligent control accuracy and adaptability of the magnetic zoom lens, the present application uses image features and the distance of the photographed object as input, and directly outputs the target signal value of the Hall sensor device and the target current value of the driving coil; in specific implementation, firstly, a large amount of image features, object distances and corresponding optimal control parameter data in different scenes are collected for training the neural network model; in actual use, the system obtains the current image features and object distances, and inputs the trained neural network model to obtain the optimized control parameters; it can not only capture complex nonlinear relationships, but also has strong generalization capabilities, and can adapt to various shooting environments. At the same time, by directly outputting control parameters, the intermediate calculation steps are reduced, and the response speed is improved, thereby significantly enhancing the intelligent control performance of the magnetic zoom lens;

[0038] 3. This application comprehensively considers the three key dimensions of image clarity, contrast and structural similarity, and obtains the final image quality score by weighted summation. It can not only comprehensively reflect all aspects of image quality, but also adapt to different application scenarios and user needs by adjusting the weight coefficient, thereby significantly improving the accuracy and flexibility of image quality assessment and providing a more reliable decision-making basis for intelligent imaging control. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a flow chart of an intelligent imaging control method based on a magnetic zoom lens according to an embodiment of the present application;

[0040] Figure 2 It is a flowchart of step S20 in an intelligent imaging control method based on a magnetic zoom lens according to an embodiment of the present application;

[0041] Figure 3 It is a flowchart of step S40 in an intelligent imaging control method based on a magnetic zoom lens according to an embodiment of the present application;

[0042] Figure 4 It is a module schematic diagram of an intelligent imaging control system based on a magnetic zoom lens according to an embodiment of the present application;

[0043] Figure 5 It is a diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.

[0045] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0046] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.

[0047] In the first aspect, the present application provides an intelligent imaging control method based on a magnetic zoom lens, which is applied to the magnetic zoom lens. The magnetic zoom lens includes a zoom drive mechanism and a focus drive mechanism. The zoom drive mechanism includes a zoom stator assembly and a zoom mover assembly. Position feedback is achieved through a Hall magnetic ring and a Hall sensing device. The focus drive mechanism includes a focus stator assembly and a focus mover assembly. A magnetic field is generated by controlling the current of a drive coil of the focus mover assembly, and focusing is achieved by interacting with the permanent magnet material of the focus stator assembly.

[0048] Reference Figure 1 , an intelligent imaging control method based on a magnetic zoom lens, comprising the following steps:

[0049] S10, initializing system parameters, including reading the Hall sensor device signal, obtaining the drive coil current value, and loading the pre-trained mapping relationship model.

[0050] Initializing system parameters is the first step of the intelligent imaging control method, which aims to obtain the initial state of the system and prepare the necessary control model. The Hall sensor device signal is used to feedback the position of the zoom actuator assembly, the drive coil current value is used to control the movement of the focus actuator assembly, and the pre-trained mapping relationship model is the core component for realizing intelligent control.

[0051] Specifically, the system first reads the analog signal of the Hall sensor through an analog-to-digital converter and converts it into a digital signal; then obtains the real-time current value of the drive coil through a current sampling circuit; and finally loads a pre-trained neural network model from the memory. This neural network model can be a multi-layer perceptron or a convolutional neural network, whose input layer receives image features and object distance information, and whose output layer gives the target signal value of the Hall sensor and the target current value of the drive coil.

[0052] S20, obtaining an initial frame image, and using a predefined image quality assessment function to calculate an image quality score of the initial frame image.

[0053] Among them, obtaining the initial frame image can evaluate the current imaging quality and provide a benchmark for subsequent intelligent control. The image quality evaluation function comprehensively considers the clarity, contrast and structural similarity of the image, and obtains a comprehensive score through weighted summation.

[0054] In this embodiment, the image quality assessment function is Q(I)=w1*S(I)+w2*C(I)+w3*SSIM(I); wherein S(I) is the clarity score, C(I) is the contrast score, SSIM(I) is the structural similarity score, and w1, w2, and w3 are weight coefficients, which comprehensively consider the clarity, contrast, and structural similarity of the image to obtain the final image quality score.

[0055] Specifically, the system first captures a frame of image through the image sensor, which can be an RGB image or a grayscale image. Then, the quality score of the image is calculated using a predefined image quality assessment function. The clarity score is obtained by calculating the mean of the gradient amplitude of the image, the contrast score is represented by the grayscale variance of the image, and the structural similarity score is calculated by comparing the structural similarity of the image with its Gaussian blurred version. The weight coefficients w1, w2, and w3 can be pre-set according to the specific application scenario. For example, in a scene where clarity needs to be highlighted, w1 can be set relatively large.

[0056] S30, obtaining the current image features of the initial frame image, activating the laser distance measurement module to measure the distance of the photographed object, and predicting the target control parameters using a mapping relationship model according to the distance of the photographed object and the current image features.

[0057] Among them, the current image features and the distance of the photographed object can be provided to the pre-trained mapping relationship model to predict the optimal control parameters. Image features reflect various quality aspects of the image, while the object distance is the key factor in determining the focus and zoom parameters.

[0058] In this embodiment, the pre-trained mapping relationship model is a neural network model, the input of the neural network model is the image features and the distance of the photographed object, and the output of the neural network model is the target signal value of the Hall sensor device and the target current value of the driving coil.

[0059] Specifically, the image features include edge clarity, high-frequency information, contrast, local variance, and gradient amplitude. The system first extracts features such as edge clarity, high-frequency information, contrast, local variance, and gradient amplitude from the initial frame image. At the same time, the laser ranging module is activated to measure the distance of the photographed object. Then, these features and distance information are input into the pre-trained neural network model to obtain the target signal value of the Hall sensor and the target current value of the drive coil as the target control parameters.

[0060] S40: Adjust the zoom drive mechanism and the focus drive mechanism based on the target control parameter.

[0061] In this embodiment, adjusting the zoom drive mechanism and the focus drive mechanism is a key step to achieve precise control according to the predicted target control parameters. The zoom drive mechanism changes the focal length by adjusting the position of the zoom moving subassembly, while the focus drive mechanism achieves focus by adjusting the position of the focus moving subassembly.

[0062] Specifically, the system first compares the predicted target signal value of the Hall sensor device with the current actual signal value, calculates the difference, and then generates a control signal through a control algorithm (such as PID control) to drive the zoom actuator assembly to the target position. At the same time, the predicted target current value of the drive coil is compared with the current actual current value, and the difference is calculated. The control algorithm is also used to generate a control signal to adjust the current of the drive coil, thereby driving the focus actuator assembly to move to the target position. This process may require multiple fine-tuning to achieve the best effect.

[0063] S50. During the adjustment process, continuously collect images and calculate image quality scores, and adjust the zoom drive mechanism and the focus drive mechanism at the same time until the image quality score is higher than a preset score or reaches a preset upper limit of iteration times, and the focusing is completed.

[0064] In this embodiment, the purpose of continuously collecting images and calculating quality scores is to monitor the adjustment effect in real time and ensure that the best imaging quality is finally achieved. By setting a preset score and an upper limit on the number of iterations, infinite loop adjustment can be avoided while ensuring imaging quality.

[0065] Specifically, after each adjustment of the zoom and focus mechanism, the system immediately captures a new image through the image sensor and calculates its quality score using the image quality evaluation function in step S20. If the quality score is higher than the preset score, it is considered that the ideal imaging effect has been achieved and the focusing is completed. If the quality score does not reach the preset score, the loop process of steps S30 to S50 continues. At the same time, the system will record the number of iterations. If the preset upper limit of the number of iterations is reached, for example 10 times, the adjustment process will be terminated even if the preset score is not reached to avoid excessively long focusing time. In each iteration, the system may need to fine-tune the control parameters to gradually improve the image quality.

[0066] In one embodiment, referring to Figure 2 In step S20, the weight coefficients w1, w2, and w3 are adaptive weights. Before using a predefined image quality assessment function to calculate the image quality score of the initial frame image, the method also includes the following steps: S21, obtaining the current captured scene image, and classifying the scene image according to a pre-trained scene classification model to obtain a scene category.

[0067] In this embodiment, different shooting scenes have different requirements on image quality, so a scene classification model is needed to identify the current scene.

[0068] Specifically, the system first obtains an image of the current shooting scene through the image sensor. Then, the image is classified using a pre-trained scene classification model. This scene classification model can be a deep learning model based on a convolutional neural network. The input of the model is the scene image, and the output is the probability distribution of the scene category.

[0069] In this embodiment, the models include "indoor", "outdoor nature", "outdoor city", and "night scene". The system selects the category with the highest probability as the current scene category.

[0070] S22: Based on the scene category, select an initial weight value from a preset weight library.

[0071] Specifically, the system maintains a weight library that contains the initial weight values ​​corresponding to each scene category. For example, for the "indoor" scene, more attention is paid to the clarity and structural similarity of the image, so the initial values ​​of w1 and w3 are larger; for the "night scene" scene, more attention may be paid to the contrast, so the initial value of w2 is larger.

[0072] In this embodiment, the structure of the weight library is: {"Indoor": [0.4, 0.2, 0.4], "Outdoor Nature": [0.3, 0.3, 0.4], "Outdoor City": [0.35, 0.3, 0.35], "Night Scene": [0.2, 0.5, 0.3]}. The system searches and extracts the corresponding initial weight value in the weight library according to the scene category obtained in step S21. If a new scene category that is not in the weight library appears, the system can use a default weight combination, or estimate a set of appropriate initial weight values ​​through interpolation method.

[0073] S23, calculating a weight adjustment factor according to the brightness, motion detection result and texture complexity of the image, and adjusting the initial weight value based on the weight adjustment factor to obtain an adjusted weight coefficient.

[0074] Specifically, the system first uses the average brightness or brightness histogram of the image to calculate the brightness features of the image; then performs motion detection to detect the moving area in the image; finally, uses the grayscale co-occurrence matrix features or local binary pattern features of the image to calculate the texture complexity. Based on these features, the system calculates the weight adjustment factor. If the image brightness is low, increase the weight of the contrast; if a lot of motion is detected, increase the weight of the clarity; if the texture complexity is high, increase the weight of the structural similarity. The adjustment factor is represented as a vector: [f1, f2, f3], where the value of each element is set to a range such as [0.8, 1.2]. Finally, multiply the initial weight value by the adjustment factor to obtain the adjusted weight coefficient.

[0075] In one embodiment, referring to Figure 3 In step S40, the zoom drive mechanism and the focus drive mechanism are adjusted, which specifically includes the following steps:

[0076] S41. Calculate a first PID control amount according to a difference between a target signal value and a current signal value of a Hall sensor device, and adjust the movement of the zoom actuator assembly based on the first PID control amount.

[0077] In this embodiment, a PID control algorithm is used to accurately adjust the movement of the zoom actuator assembly. PID control is a commonly used feedback control algorithm that can effectively reduce system errors and improve control accuracy and response speed through a combination of three links: proportional, integral and differential.

[0078] Specifically, the system first calculates the error e(t) between the target signal value and the current signal value of the Hall sensor. Then, the first PID control variable u(t) is calculated according to the PID control algorithm, and its expression is: u(t) = K p *e(t)+K i *∫e(t)dt+K d *de(t) / dt, where K p , K i and K d are proportional, integral and differential coefficients respectively. Adjustments are made through experiments to obtain the best control effect. The calculated control quantity u(t) is converted into a corresponding voltage or current signal to drive the zoom actuator assembly to move. For example, if a stepper motor is used to drive the zoom actuator assembly, the control quantity can be converted into the pulse number and direction signal of the stepper motor.

[0079] S42: Calculate a second PID control amount according to a difference between a target current value and a current current value of the driving coil, and adjust the current of the driving coil based on the second PID control amount.

[0080] In this embodiment, the PID control algorithm is also used to accurately adjust the current of the drive coil. The focusing process usually requires higher precision and faster response speed, so the use of PID control can effectively suppress overshoot and oscillation and achieve fast and stable focusing.

[0081] The difference is that the control object here is the current of the driving coil, so the proportional coefficient Kp is increased to increase the response speed, and the integral coefficient Ki is increased to eliminate the steady-state error.

[0082] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0083] In the second aspect, the present application provides an intelligent imaging control system based on a magnetic zoom lens. The intelligent imaging control system based on a magnetic zoom lens of the present application is described below in combination with the above-mentioned intelligent imaging control method based on a magnetic zoom lens.

[0084] Reference Figure 4, an intelligent imaging control system based on a magnetic zoom lens, applied to the magnetic zoom lens, the magnetic zoom lens includes a zoom drive mechanism and a focus drive mechanism, the zoom drive mechanism includes a zoom stator assembly and a zoom mover assembly, position feedback is achieved through a Hall magnetic ring and a Hall sensing device, the focus drive mechanism includes a focus stator assembly and a focus mover assembly, a magnetic field is generated by controlling the current of the drive coil of the focus mover assembly, and the magnetic field is interacted with the permanent magnetic material of the focus stator assembly to achieve focusing, the system includes:

[0085] The initialization module is used to initialize system parameters, including reading the Hall sensor device signal, obtaining the drive coil current value, and loading the pre-trained mapping relationship model;

[0086] A quality score calculation module, used for obtaining an initial frame image and calculating an image quality score of the initial frame image using a predefined image quality evaluation function;

[0087] A control parameter prediction module is used to obtain the current image features of the initial frame image, activate the laser distance measurement module to measure the distance of the photographed object, and predict the target control parameters using a mapping relationship model based on the distance of the photographed object and the current image features; a focus adjustment module is used to adjust the zoom drive mechanism and the focus drive mechanism based on the target control parameters;

[0088] The iterative optimization module is used to continuously capture images and calculate image quality scores during the adjustment process, and simultaneously adjust the zoom drive mechanism and the focus drive mechanism until the image quality score is higher than a preset score or reaches a preset upper limit of the number of iterations, and the focusing is completed.

[0089] In one embodiment, the present application provides an electronic device, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The electronic device includes a processor, a memory and a network interface connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an intelligent imaging control method based on a magnetic zoom lens is implemented.

[0090] Those skilled in the art will understand that Figure 5The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0091] In one embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0092] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0093] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. An intelligent imaging control method based on a magnetic zoom lens, characterized in that: The invention is applied to a magnetic zoom lens, wherein the magnetic zoom lens comprises a zoom drive mechanism and a focus drive mechanism, wherein the zoom drive mechanism comprises a zoom stator assembly and a zoom mover assembly, wherein position feedback is realized by a Hall magnetic ring and a Hall sensing device, and the focus drive mechanism comprises a focus stator assembly and a focus mover assembly, wherein a magnetic field is generated by controlling the current of a drive coil of the focus mover assembly, and the magnetic field interacts with a permanent magnetic material of the focus stator assembly to realize focusing, and the method comprises the following steps: Initializing system parameters, including reading Hall sensor device signals, obtaining driving coil current values, and loading pre-trained mapping relationship models; the pre-trained mapping relationship model is a neural network model, the input of the neural network model is image features and the distance of the photographed object, and the output of the neural network model is the target signal value of the Hall sensor device and the target current value of the driving coil; the image features include edge clarity features, high-frequency information features, contrast features, local variance features, and gradient amplitude features; Acquire an initial frame image, and calculate an image quality score of the initial frame image using a predefined image quality assessment function; Acquire the current image features of the initial frame image, activate the laser distance measurement module to measure the distance of the photographed object, and predict the target control parameters using the mapping relationship model according to the distance of the photographed object and the current image features; Based on the target control parameter, adjusting the zoom drive mechanism and the focus drive mechanism; During the adjustment process, continuously collect images and calculate image quality scores, and adjust the zoom drive mechanism and the focus drive mechanism at the same time, until the image quality score is higher than a preset score or reaches a preset upper limit of the number of iterations, and the focusing is completed; Wherein, adjusting the zoom drive mechanism and the focus drive mechanism specifically includes the following steps: Calculating a first PID control amount according to a difference between a target signal value and a current signal value of a Hall sensor device, and adjusting the movement of the zoom mover assembly based on the first PID control amount; According to the difference between the target current value and the current value of the driving coil, a second PID control amount is calculated, and the current of the driving coil is adjusted based on the second PID control amount.

2. The intelligent imaging control method based on the magnetic zoom lens according to claim 1, characterized in that: The image quality assessment function is Q(I)=w1*S(I)+w2*C(I)+w3*SSIM(I); Among them, S(I) is the clarity score, C(I) is the contrast score, SSIM(I) is the structural similarity score, and w1, w2, and w3 are weight coefficients. The final image quality score is obtained by comprehensively considering the clarity, contrast, and structural similarity of the image.

3. The intelligent imaging control method based on the magnetic zoom lens according to claim 2, characterized in that: The weight coefficients w1, w2, and w3 are adaptive weights. Before using a predefined image quality assessment function to calculate the image quality score of the initial frame image, the method further includes the following steps: Acquire a currently captured scene image, and classify the scene image according to a pre-trained scene classification model to obtain a scene category; Based on the scene category, selecting an initial weight value from a preset weight library; A weight adjustment factor is calculated according to the brightness, motion detection result and texture complexity of the image, and the initial weight value is adjusted based on the weight adjustment factor to obtain an adjusted weight coefficient.

4. An intelligent imaging control system based on a magnetic zoom lens, characterized in that: Applied in a magnetic zoom lens, the magnetic zoom lens includes a zoom drive mechanism and a focus drive mechanism, the zoom drive mechanism includes a zoom stator assembly and a zoom mover assembly, position feedback is achieved through a Hall magnetic ring and a Hall sensor device, the focus drive mechanism includes a focus stator assembly and a focus mover assembly, a magnetic field is generated by controlling the current of the drive coil of the focus mover assembly, and focusing is achieved by interacting with the permanent magnetic material of the focus stator assembly, the system includes: An initialization module is used to initialize system parameters, including reading the Hall sensor device signal, obtaining the driving coil current value, and loading a pre-trained mapping relationship model; the pre-trained mapping relationship model is a neural network model, the input of the neural network model is the image feature and the distance of the photographed object, and the output of the neural network model is the target signal value of the Hall sensor device and the target current value of the driving coil; the image features include edge clarity features, high-frequency information features, contrast features, local variance features, and gradient amplitude features; A quality score calculation module, used to obtain an initial frame image and calculate an image quality score of the initial frame image using a predefined image quality evaluation function; A control parameter prediction module, used to obtain the current image features of the initial frame image, activate the laser distance measurement module to measure the distance of the photographed object, and predict the target control parameter using the mapping relationship model according to the distance of the photographed object and the current image features; A focus adjustment module, used for adjusting the zoom drive mechanism and the focus drive mechanism based on the target control parameter; An iterative optimization module, used to continuously collect images and calculate image quality scores during the adjustment process, and simultaneously adjust the zoom drive mechanism and the focus drive mechanism until the image quality score is higher than a preset score or reaches a preset upper limit of the number of iterations, and focusing is completed; Wherein, adjusting the zoom drive mechanism and the focus drive mechanism specifically includes the following steps: Calculating a first PID control amount according to a difference between a target signal value and a current signal value of a Hall sensor device, and adjusting the movement of the zoom mover assembly based on the first PID control amount; According to the difference between the target current value and the current value of the driving coil, a second PID control amount is calculated, and the current of the driving coil is adjusted based on the second PID control amount.

5. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the intelligent imaging control method based on a magnetic zoom lens described in any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the intelligent imaging control method based on a magnetic zoom lens described in any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Lens focusing method, system, equipment and medium

    CN114760415A

  • Method and imaging device for generating a motion-compensated image, computer program, and storage medium

    US20200242783A1

  • KR20220159759A