A visual perception method, device, equipment and computer storage medium
By measuring and calculating the DCC characteristic curve and combining the oscillation assist algorithm, the problem that the telephoto camera cannot continuously focus in dynamic multi-field wide step-by-step scenarios is solved, and efficient focus and rapid recovery in dynamic environments are achieved.
Patent Information
- Application Number
- CN202210005280.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-05
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-01-05
AI Technical Summary
The existing telephoto cameras cannot maintain clear images continuously in dynamic multi-field wide step-through scenarios, and the refocusing time after being out of focus is too long, especially in dynamically moving objects.
By measuring the DCC characteristic curve of the field of view of each multiple of the scene lens, we can judge whether the current field of view multiple reaches the low field of view, and calculate the step number and direction of the target position difference clearly sensed by the DCC characteristic curve coefficient and phase difference value, and drive the motor to travel to the target position. If the confidence level is insufficient, turn on the oscillation assisted perception clear algorithm to assist focus.
Using a multi-field multiple wide step-by-step telephoto camera in dynamic environments can continuously focus, avoid out of focus, and quickly restore focus when moving greatly or the long view to close-up, improving image clarity and focus speed.
Smart Images

Figure CN114359807B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of camera technology, and in particular to a visual perception method, device, equipment and computer storage medium for dynamic multi-viewing field wide step. Background Art
[0002] In the existing technology, telephoto cameras have been widely used in the fields of drones, security border inspection, industrial inspection, military reconnaissance, etc. However, due to the large magnification and small field of view of telephoto cameras, the focus stepping interval width is extremely large, and there are problems such as being unable to maintain a clear image when in motion or facing a dynamically moving object, and taking too long to refocus after losing focus.
[0003] In order to solve this problem, focus is usually performed by obtaining real-time clarity-assisted hill climbing algorithms, Fibonacci algorithms, etc., but these methods are not very suitable for dynamic scenes, and it takes a long time to recover after the perceived clarity drops. In the case of multi-field-of-view wide-stepping scenarios, traditional mechanical phase focus may not be able to obtain a confidence level that satisfies the phase calculation beyond the current focus area, and cannot move to the correct focus interval. There are also cases where mechanical phase focus cannot obtain a confidence level that meets the requirements in low-light or over-exposed environments. Therefore, it is necessary to develop a visual perception method suitable for dynamic multi-field-of-view wide-stepping scenarios to overcome the above problems. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device, equipment and computer storage medium for dynamic multi-field wide-step visual perception to solve the problems existing in the prior art.
[0005] To achieve the above purpose, the specific technical solutions of the present invention are as follows:
[0006] The present invention provides a visual perception method, comprising the following steps:
[0007] Step S1, measuring the DCC characteristic curves of the parameters corresponding to each magnification of the field of view of the scene lens, and determining from which width of the field of view multiple that the phase focusing cannot be reached at one time, measuring the maximum phase recognition distance WL corresponding to each wide step field of view multiple, and then entering step S2;
[0008] Step S2, preprocessing the real-time image, and then entering step S3;
[0009] Step S3, obtaining the current field of view magnification, and then proceeding to step S31;
[0010] Step S31, determining whether the current field of view magnification reaches the low field of view at one time, if yes, proceeding to step S4, if no, proceeding to step S32;
[0011] Step S4, calculating and processing the number of steps and direction of the target position difference that can be clearly sensed through the DCC characteristic curve coefficient and the phase difference value, driving the motor to move to the target position, and then entering step S2;
[0012] Step S32, determine whether the confidence level is high enough, if yes, proceed to step S321, if no, proceed to step S322;
[0013] Step S321, clearing the parameters and counts of the previously executed oscillation-assisted perception clarity algorithm, and then proceeding to step S4;
[0014] Step S322, start the vibration auxiliary perception clear algorithm, determine whether it is the first execution, if so, go to step S51, if not, go to step S52;
[0015] Step S51, travel WL distance in a guessed direction, and after the travel is completed, go to step S2;
[0016] Step S52, travel 2 to 5 WL distances in the opposite direction of the last oscillation, and when reaching the boundary, the counting reset direction is reversed, and then enter step S2.
[0017] Preferably, step S2 includes: subjecting the image data collected by the sensor to wide dynamic range, noise reduction, exposure, white balance, edge enhancement and external infrared fill light processing, and when the phase difference calculation conditions are met, performing phase difference calculation with the image data processed in the previous frame to obtain the phase difference value and confidence level.
[0018] Preferably, in step S52, the process moves 3 WL distances in the opposite direction of the last oscillation.
[0019] Preferably, in step S1, it includes: the parameters corresponding to the magnified field of view include a focus interval step range, a phase difference and a step difference.
[0020] The present invention also provides a visual perception device, comprising:
[0021] The measurement module is used to measure the DCC characteristic curves of the parameters corresponding to each magnification of the scene lens field of view, determine the width of the field of view from which the phase focus cannot be reached in one time, and measure the maximum phase recognition distance WL corresponding to each wide step field of view magnification;
[0022] Preprocessing module, used for real-time image acquisition and preprocessing;
[0023] An acquisition module, used for acquiring the current field of view magnification from the preprocessing module;
[0024] The first judgment module is used to judge whether the current field of view magnification reaches the low field of view at one time;
[0025] A processing module, configured to, if the judgment result of the first judgment module is yes, calculate and process the number of steps and direction of the clearly perceived target position difference through the DCC characteristic curve coefficient and the phase difference value, and drive the motor to move to the target position;
[0026] A second judgment module, configured to judge whether the confidence level is high enough if the judgment result of the first judgment module is no;
[0027] A reset module, configured to clear the parameters and counts of the previously executed oscillation-assisted perception clarity algorithm if the judgment result of the second judgment module is yes;
[0028] A third judgment module is used to start the vibration-assisted perception clarity algorithm if the judgment result of the second judgment module is no, and determine whether it is executed for the first time;
[0029] A first moving module, configured to move WL distance in a guessed direction if the judgment result of the third judgment module is yes;
[0030] The second moving module is used for moving 2 to 5 WL distances in the opposite direction of the last oscillation if the judgment result of the third judgment module is no, and when reaching the boundary, the counting reset direction is reversed.
[0031] Preferably, the preprocessing module comprises:
[0032] Sensors for real-time image acquisition;
[0033] The comparison module is used to compare the phase value with the image data processed in the previous frame when the phase difference calculation condition is met, and obtain the phase difference value and confidence level.
[0034] Preferably, in the second moving module, the moving direction is 2 to 5 WL distances in the opposite direction of the last oscillation.
[0035] The present invention also provides a visual perception device, comprising:
[0036] Memory for storing computer programs;
[0037] A processor is used to implement the steps of the above-mentioned visual perception method when executing the computer program.
[0038] The present invention also provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned visual perception method are implemented.
[0039] The above DCC characteristic curve coefficient refers to the defocus conversion coefficient.
[0040] The visual perception method provided by the present invention obtains the current field of view magnification. If the current field of view magnification reaches the low field of view once, the step number and direction of the target position difference perceived clearly are calculated and processed through the DCC characteristic curve coefficient and the phase difference value, and the motor is driven to the target position; if the current field of view magnification does not reach the low field of view once, it is determined whether the confidence level is high enough. If so, the parameters and counts of the previously executed oscillation-assisted perception clarity algorithm are cleared, otherwise the oscillation-assisted perception clarity algorithm is turned on, and if the algorithm is executed for the first time, the WL distance is advanced in a guessed direction, otherwise 2 to 5 WL distances are advanced in the opposite direction of the previous oscillation. Through the visual perception method, the time for moving the lens is much longer than the interval between each frame detection and moving the motor, and the PD trend change is a trend change from the current position to one direction, so the oscillation-assisted algorithm has better time complexity than the full-course hill climbing algorithm or the dichotomy method, and the phase calculation method based on image preprocessing avoids the problem that the mechanical phase calculation depends on the external lighting environment, and there is no problem of multiple peak misjudgment when using the clarity algorithm.
[0041] When using a multi-field-of-view wide-step telephoto camera in a dynamic environment, the camera will continue to focus when moving slightly in each field of view, so that the human eye cannot perceive defocusing. The focus can also be quickly restored under large movements or from a distant view to a close view. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of the visual perception method provided by the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0044] A visual perception method for dynamic multi-viewing wide-stepping application scenarios comprises the following steps:
[0045] As a prerequisite, step S1 measures the focus interval step range, phase difference and step difference associated DCC characteristic curve corresponding to each magnification field of view of the scene lens, and determines from which width magnification field of view cannot be reached in one time, measures the maximum phase recognition distance WL corresponding to each wide step field of view magnification, and then enters step S2.
[0046] Among them, a phase difference detection method is included, which converts the position difference between the baseline light and the reference light into a phase difference according to the different position differences caused by the different distances from the subject, compares it with the state without phase difference, and then obtains the movement amount and direction of the lens based on the focusing operation. The control system then controls the stepping motor to adjust the lens so that its phase difference is zero, and the system focusing is completed.
[0047] Step S2, real-time image acquisition and preprocessing: the image data collected by the sensor is processed by wide dynamic, noise reduction, exposure compensation, white balance and edge enhancement as well as external infrared fill light to meet the phase difference calculation conditions, and the phase difference is calculated with the image data processed in the previous frame to obtain the phase difference value (PD) and confidence level (CL), and then enter step S3.
[0048] Among them, wide dynamic technology is a technology used by telephoto cameras to see the characteristics of images under very strong contrast. When high-brightness areas under strong light sources and relatively low-brightness areas such as shadows and backlights exist in the image at the same time, the image output by the telephoto camera will have bright areas that become white due to overexposure, and dark areas that become black due to underexposure, which seriously affects the image quality.
[0049] The wide dynamic processing algorithm includes two algorithms: one is to compress the original data of the wide dynamic image to a low dynamic range through an algorithm, while keeping the details and contrast of the image as clear as possible; the other is to enhance the details and contrast of the original low dynamic range image through an algorithm to output the signal, that is, the earliest original data, and the data processed by the latter comes from the low dynamic range image data. For specific backlit scenes, the wide dynamic processing algorithm uses short exposure in strong light areas and long exposure in low light areas, and uses related algorithms to synthesize short exposure and long exposure data. The resulting image can retain the details in the dark without overexposing the bright areas.
[0050] The noise reduction algorithm in the present invention is preferably a 3D digital noise reduction algorithm. In the time domain, based on motion estimation, matching blocks are simultaneously searched in the previous frame and the next frame of the current frame, and motion intensity detection is performed on the searched matching blocks. If the motion intensity is small, time domain filtering is performed. If the motion intensity is too large, spatial domain filtering is performed on the current block. By combining the time domain and the spatial domain, noise points in the video image are effectively eliminated, thereby obtaining a smooth picture with rich texture details.
[0051] Step S3, obtaining the current field of view magnification, and then proceeding to step S31;
[0052] Step S31, determining whether the current field of view magnification reaches the low field of view at one time, if yes, proceeding to step S4, if no, proceeding to step S32;
[0053] Step S4, calculating and processing the number of steps and direction of the target position difference that can be clearly sensed through the DCC characteristic curve coefficient and the phase difference value (PD), driving the motor to move to the target position, and then entering step S2;
[0054] Step S32, determine whether the confidence level is high enough, if yes, proceed to step S321, if no, proceed to step S322;
[0055] Step S321, clearing the parameters and counts of the previously executed oscillation-assisted perception clarity algorithm, and then proceeding to step S4;
[0056] Step S322, start the vibration auxiliary perception clear algorithm, determine whether it is the first execution, if so, go to step S51, if not, go to step S52;
[0057] Step S51, travel WL distance in a guessed direction; because the direction is unknown, a direction is randomly selected, i.e., the guessed direction. If the guessed direction is wrong, it will oscillate back.
[0058] Step S52, travel 2 to 5 WL distances in the opposite direction of the last oscillation, and when reaching the boundary, the counting reset direction is reversed, and then enter step S2.
[0059] The reaching of the boundary also needs to be counted. When the left and right boundaries are reached twice, the oscillation will stop. This means that the focus serial port is too small or there is a large area of solid color object in the lens. Feedback information will be given to notify the user to switch the focus window size and position or change to manual focus mode.
[0060] When using a multi-field-of-view wide-step telephoto camera in a dynamic environment, the camera will continue to focus when moving slightly in each field of view, so that the human eye cannot perceive the defocus. It can also quickly restore focus in the case of large movements or from a distant view to a close view. Since the time to move the lens is much longer than the interval between each frame detection and the moving motor, and the PD trend change is definitely from the current position to a certain direction, the oscillation-assisted algorithm has better time complexity than the full-process hill climbing algorithm or the binary method, and the phase calculation method based on image preprocessing avoids the problem of mechanical phase calculation relying on the external lighting environment, and there is no problem of multiple peak misjudgment when using the clarity algorithm.
[0061] The present invention also provides a visual perception device, comprising:
[0062] The measurement module is used to measure the DCC characteristic curves of the parameters corresponding to each magnification of the scene lens field of view, determine the width of the field of view from which the phase focus cannot be reached in one time, and measure the maximum phase recognition distance WL corresponding to each wide step field of view magnification;
[0063] Lens, used for collecting images;
[0064] A motor, used for adjusting the focal length of the lens, preferably a stepper motor;
[0065] Preprocessing module, used for real-time image acquisition and preprocessing;
[0066] An acquisition module, used for acquiring the current field of view magnification from the preprocessing module;
[0067] The first judgment module is used to judge whether the current field of view magnification reaches the low field of view at one time;
[0068] a processing module, configured to, if the judgment result of the first judgment module is yes, calculate and process the number of steps and direction of the clearly perceived target position difference through the DCC characteristic curve coefficient and the phase difference value (PD), and drive the motor to move to the target position;
[0069] A second judgment module, configured to judge whether the confidence level is high enough if the judgment result of the first judgment module is no;
[0070] A reset module, configured to clear the parameters and counts of the previously executed oscillation-assisted perception clarity algorithm if the judgment result of the second judgment module is yes;
[0071] A third judgment module is used to start the vibration-assisted perception clarity algorithm if the judgment result of the second judgment module is no, and determine whether it is executed for the first time;
[0072] A first moving module, for moving WL distance in a guessed direction if the judgment result of the third judgment module is yes, and entering step S2 after the moving is completed;
[0073] The second moving module is used for moving 2 to 5 WL distances in the opposite direction of the last oscillation if the judgment result of the third judgment module is no, and when reaching the boundary, the counting reset direction is reversed.
[0074] Preferably, the preprocessing module comprises:
[0075] Sensors for real-time image acquisition;
[0076] The comparison module is used to compare the phase value with the image data processed in the previous frame when the phase difference calculation condition is met, and obtain the phase difference value (PD) and the confidence level (CL).
[0077] Preferably, in the second moving module, the movement is performed in the opposite direction of the last oscillation by a distance of 3 WL.
[0078] The present invention also provides a visual perception device, comprising:
[0079] Memory for storing computer programs;
[0080] A processor is used to implement the steps of the above-mentioned visual perception method when executing the computer program.
[0081] The present invention also provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned visual perception method are implemented.
[0082] A person skilled in the art will appreciate that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, and an optical disk.
[0083] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0084] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A visual perception method, It is characterized in that The steps include: Step S1, measuring the DCC characteristic curves of the parameters corresponding to each magnification of the scene lens field of view, and determining from which width of the field of view multiple that the phase focusing cannot be reached at one time, measuring the maximum phase recognition distance WL corresponding to each wide step field of view multiple, and entering step S2; Step S2, pre-processing the real-time image, and then proceeding to step S3; Step S3, obtaining the current field of view magnification, and proceeding to step S31; Step S31, determining whether the current field of view magnification reaches the low field of view at one time, if yes, proceeding to step S4, if no, proceeding to step S32; Step S4, calculating and processing the number and direction of the step difference of the clearly perceived target position through the DCC characteristic curve coefficient and the phase difference value, driving the motor to move to the target position, and entering step S2; Step S32, determine whether the confidence level is high enough, if yes, proceed to step S321, if no, proceed to step S322; Step S321, clearing the parameters and counts of the previously executed oscillation-assisted perception clarity algorithm, and proceeding to step S4; Step S322, start the vibration-assisted perception clarity algorithm; Determine whether it is the first execution, if yes, go to step S51, if no, go to step S52; Step S51, travel WL distance in a guessed direction, and after the travel is completed, go to step S2; Step S52, moving 2 to 5 WL distances in the opposite direction of the last oscillation, when reaching the boundary, the counting reset direction is reversed, and entering step S2; The DCC characteristic curve coefficient refers to the defocus conversion coefficient.
2. The visual perception method according to claim 1, It is characterized in that The step S2 includes: subjecting the image data collected by the sensor to wide dynamic range, noise reduction, exposure, white balance, edge enhancement and external infrared fill light processing, and when the phase difference calculation conditions are met, performing phase difference calculation with the image data processed in the previous frame to obtain the phase difference value and confidence level.
3. The visual perception method according to claim 2, It is characterized in that In step S52, the process moves 3 WL distances in the opposite direction of the last oscillation.
4. The visual perception method according to claim 3, It is characterized in that In step S1, it includes: the parameters corresponding to the magnified field of view include the focus interval step range, phase difference and step difference.
5. A visual perception device, It is characterized in that include: The measurement module is used to measure the DCC characteristic curves of the parameters corresponding to each magnification of the scene lens field of view, determine the width of the field of view from which the phase focus cannot be reached in one time, and measure the maximum phase recognition distance WL corresponding to each wide step field of view magnification; Preprocessing module, used for real-time image acquisition and preprocessing; An acquisition module, used for acquiring the current field of view magnification from the preprocessing module; The first judgment module is used to judge whether the current field of view magnification reaches the low field of view at one time; A processing module, configured to, if the judgment result of the first judgment module is yes, calculate and process the number of steps and direction of the clearly perceived target position difference through the DCC characteristic curve coefficient and the phase difference value, and drive the motor to move to the target position; A second judgment module, configured to judge whether the confidence level is high enough if the judgment result of the first judgment module is no; A reset module, configured to clear the parameters and counts of the previously executed oscillation-assisted perception clarity algorithm if the judgment result of the second judgment module is yes; A third judgment module is used to start the vibration-assisted perception clarity algorithm if the judgment result of the second judgment module is no, and determine whether it is executed for the first time; A first moving module, configured to move WL distance in a guessed direction if the judgment result of the third judgment module is yes; The second moving module is used for moving 2 to 5 WL distances in the opposite direction of the last oscillation if the judgment result of the third judgment module is no, and when reaching the boundary, the counting reset direction is reversed; The DCC characteristic curve coefficient refers to the defocus conversion coefficient.
6. The visual perception device according to claim 5, It is characterized in that The preprocessing module comprises: Sensors for real-time image acquisition; The comparison module is used to compare the phase value with the image data processed in the previous frame when the phase difference calculation condition is met, and obtain the phase difference value and confidence level.
7. The visual perception device according to claim 6, It is characterized in that In the second travel module, travel 3 WL distances in the opposite direction of the last oscillation.
8. A visual perception device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the visual perception method according to any one of claims 1 to 4 when executing the computer program.
9. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the visual perception method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Integrated camera device and self-adapting automatic focus method
CN101494737A
DFF-based auto-focusing method
CN102707545A