CN114302052B - Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium - Google Patents

Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium Download PDF

Info

Publication number
CN114302052B
CN114302052B CN202111403291.5A CN202111403291A CN114302052B CN 114302052 B CN114302052 B CN 114302052B CN 202111403291 A CN202111403291 A CN 202111403291A CN 114302052 B CN114302052 B CN 114302052B
Authority
CN
China
Prior art keywords
lens
focusing
current position
step length
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111403291.5A
Other languages
Chinese (zh)
Other versions
CN114302052A (en
Inventor
李海勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Insta360 Innovation Technology Co Ltd
Original Assignee
Insta360 Innovation Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Insta360 Innovation Technology Co Ltd filed Critical Insta360 Innovation Technology Co Ltd
Priority to CN202111403291.5A priority Critical patent/CN114302052B/en
Publication of CN114302052A publication Critical patent/CN114302052A/en
Application granted granted Critical
Publication of CN114302052B publication Critical patent/CN114302052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention is applicable to the technical field of automatic control, and provides a lens focusing method, a device, image pickup equipment and a storage medium, wherein the method comprises the following steps: receiving a focusing request of a lens of image pickup equipment, judging whether a movable area where a current position of the lens is located is an optimal focusing area, determining the moving direction of the lens at the current position according to a judging result, calculating the to-be-moved step length of the lens at the current position according to current position information, a preset step length of the movable area and a step length fitting function, moving the lens according to the to-be-moved step length and the moving direction, calculating a focusing evaluation function value of the current position after the lens is moved, jumping to a step of acquiring the movable area where the current position of the lens is located if the focusing evaluation function value of the current position is larger than the focusing evaluation function value of the previous position, so as to continue moving the lens, and setting the previous position as the focusing position of the lens if the focusing evaluation function value is smaller than the previous position, and moving the lens to the focusing position so as to complete focusing of the lens.

Description

Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium
Technical Field
The present invention relates to an automatic control technology field, and in particular, to a lens focusing method and apparatus for an image capturing device, and a storage medium.
Background
Along with the development of electronic technology, intelligent devices with photographing functions are more and more popular, in order to obtain good photographing quality, the intelligent devices with photographing functions need to focus an object to be photographed, manual focusing efficiency is low, and the requirement of users on intellectualization is difficult to meet, so how to realize automatic focusing in the photographing process is very important for the intelligent devices with photographing functions.
In the prior art, some automatic focusing searching methods exist, wherein a classical climbing algorithm is simple and easy to implement, has good focusing effect, is widely applied to the engineering field, and as shown in fig. 1, the principle of the climbing algorithm is that a climbing is started to change a focal length along a certain direction from a starting point by a certain larger step length, the focal length is compared by calculating focusing evaluation function values each time, when the falling edge of the gradient is detected, the step length is reduced to reversely climb, the climbing is repeatedly turned back until the step length is reduced to a preset termination step length, the climbing is stopped, and the peak value position in the last climbing process is the maximum value searched by the climbing algorithm. In the repeated turning-back process of the hill climbing algorithm, the step size reduction needs to be carried out for a plurality of times to obtain a good result, and the calculation amount and the real-time performance have room for improvement.
Disclosure of Invention
The invention aims to provide a lens focusing method and device of an image pickup device, the image pickup device and a storage medium, and aims to solve the problem that the prior art cannot provide an effective lens focusing method, so that the lens focusing efficiency of the image pickup device is low.
In one aspect, the present invention provides a lens focusing method of an image pickup apparatus, the method including the steps of:
s11, receiving a request for focusing a lens of the image pickup device;
s12, acquiring a movable area where the current position of the lens is located, judging whether the movable area is an optimal focusing area, and determining the moving direction of the lens at the current position according to a judging result;
s13, calculating a step length to be moved of the lens at the current position according to the current position information, a preset step length of the movable area and a step length fitting function, and moving the lens according to the calculated step length to be moved and the determined moving direction;
s14, calculating a focusing evaluation function value of the current position of the lens after moving;
s15, if the focusing evaluation function value of the current position is larger than the focusing evaluation function value of the previous position, jumping to the step S12 to continuously move the lens;
s16, if the focusing evaluation function value of the current position is smaller than that of the previous position, setting the previous position as the focusing position of the lens, and moving the lens to the focusing position so as to complete focusing of the lens.
In another aspect, the present invention provides a lens focusing apparatus of an image pickup apparatus, the apparatus comprising:
a request receiving unit configured to receive a request for focusing a lens of an image pickup apparatus;
the direction determining unit is used for obtaining a movable area where the current position of the lens is located, judging whether the movable area is an optimal focusing area or not, and determining the moving direction of the lens at the current position according to a judging result;
the lens moving unit is used for calculating the step length to be moved of the lens at the current position according to the current position information, the preset step length of the movable area and the step length fitting function, and moving the lens according to the calculated step length to be moved and the determined moving direction;
a value calculation unit for calculating a focusing evaluation function value of the current position where the lens is moved;
a continuing moving unit configured to trigger the direction determining unit to continue moving the lens if the focus evaluation function value of the current position is greater than the focus evaluation function value of the previous position; and
and the focusing unit is used for setting the previous position as the focusing position of the lens if the focusing evaluation function value of the current position is smaller than the focusing evaluation function value of the previous position, and moving the lens to the focusing position so as to finish focusing of the lens.
In another aspect, the present invention also provides an image capturing apparatus including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the computer program.
In another aspect, the invention also provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as described above.
When a request for focusing a lens of image pickup equipment is received, judging whether a movable area where the current position of the lens is located is an optimal focusing area, determining the moving direction of the lens at the current position according to a judging result, calculating the step length to be moved of the lens at the current position according to current position information, a preset step length of the movable area and a step length fitting function, moving the lens according to the step length to be moved and the moving direction, calculating a focusing evaluation function value of the current position after the lens is moved, jumping to a step of acquiring the movable area where the current position of the lens is located if the focusing evaluation function value of the current position is larger than the focusing evaluation function value of the previous position so as to continue to move the lens, setting the previous position as the focusing position of the lens if the focusing evaluation function value of the current position is smaller than the previous position, and moving the lens to the focusing position so as to complete focusing of the lens, thereby realizing high-efficiency focusing of the lens.
Drawings
FIG. 1 is a schematic diagram of a conventional classical hill climbing algorithm for implementing a lens focusing process;
fig. 2 is a flowchart of an implementation of a lens focusing method of an image capturing apparatus according to the first embodiment of the present invention;
FIG. 3 is a diagram showing an exemplary division of a movable area according to an embodiment of the present invention;
fig. 4 is a comparison chart of focusing effects of three lens focusing methods according to the first embodiment of the present invention;
fig. 5 is a flowchart of an implementation of a lens focusing method of an image capturing apparatus according to the second embodiment of the present invention;
fig. 6 is a schematic structural diagram of a lens focusing apparatus of an image pickup apparatus according to a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of an image pickup apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The following describes in detail the implementation of the present invention in connection with specific embodiments:
embodiment one:
fig. 2 shows a flow of implementation of a lens focusing method of an image capturing apparatus according to the first embodiment of the present invention, and for convenience of explanation, only a portion related to the embodiment of the present invention is shown, and the detailed description is as follows:
in step S201, a request for focusing a lens of an image pickup apparatus is received;
the method is suitable for the image pickup device comprising the lens and the focusing motor, when the lens is focused, the focusing motor is driven to move the lens of the image pickup device, the received request for focusing the lens of the image pickup device can be generated by triggering when a user presses a shooting button of the image pickup device, or can be generated by triggering when the movement or the change of an image pickup object is detected when the image pickup device is used for shooting, so that the focusing of the lens is automatically triggered when the user needs or the image pickup object is changed, and the intelligent level of the image pickup device is improved.
In step S202, a movable area where the current position of the lens is located is obtained, whether the movable area is an optimal focusing area is determined, and a moving direction of the lens at the current position is determined according to a determination result;
in the embodiment of the invention, the movable distance of the Lens is the distance between the maximum position to which the Lens can move from the original position (zero position) and the original position, the movable distance is divided into a preset number of movable areas, the length of each divided movable area can be the same or different, and the number of the movable areas can be determined according to parameters and parameter relations (such as a movement amount (Lens Shift) and a focusing distance (also called object distance)) in various lenses. Therefore, the movable distance of the lens is divided into a preset number of movable areas in advance before the movable area where the current position of the lens is located is acquired. Preferably, the number of movable areas is 3, thereby improving focusing efficiency while simplifying the lens focusing process. As an example, as shown in fig. 3, the movable distance of the lens is equally divided into three movable areas, which are respectively referred to as first, second, and third movable areas from left to right in the drawing according to the lens position for convenience of description.
The optimal focusing area is an area where the focal point of the lens is most likely to be located, which is set according to the optical characteristics of various lenses, and as a preferred mode of the embodiment of the present invention, the movable distance of the lens is divided into three movable areas, and the middle area is set as the optimal focusing area, so that the focusing efficiency of the lens is improved, and as shown in fig. 3, the second movable area is the optimal focusing area. When judging whether the movable area is the optimal focusing area or not and determining the moving direction of the lens in the current position according to the judging result, if the lens is in the optimal focusing area, randomly selecting one direction, determining the selected direction as the moving direction of the lens in the current position, otherwise, determining the moving direction of the lens in the current position in the direction towards the optimal focusing area, and therefore moving towards the optimal focusing area or moving in the optimal focusing area all the time when the lens moves, so that the focusing efficiency of the lens is improved. Alternatively, when the lens is in the best focus area, the direction of movement away from or toward the origin position of the lens may also be determined as the direction of movement of the lens at the current position.
In step S203, calculating a step length to be moved of the lens at the current position according to the current position information, a preset step length of the movable area and a step length fitting function, and moving the lens according to the calculated step length to be moved and the determined moving direction;
in the embodiment of the present invention, the preset step size and the step size fitting function of each movable area may be set when the movable distance of the lens is divided into a preset number of movable areas, or may be set at other times. Specifically, the preset step length and the step length fitting function of each movable area can be set according to the optical characteristics of the lens, and the preset step length and the step length fitting function are used for calculating the moving step length of the lens each time, and the preset step length and the step length fitting function of each movable area are different. Therefore, the step length of the lens in the movable area and each movement of different movable areas is different, so that the step length in each movable area and each movement of different movable areas is changed differently, and the position interval where the best focusing point is located can be positioned quickly. Preferably, the preset step length for each movable region from the origin position of the lens movable distance to the maximum movable distance is sequentially reduced so as to rapidly locate the region where the best focusing point is located.
After receiving a request for focusing a lens of the image pickup device, acquiring a preset step length and a step length fitting function of a movable area where the current position of the lens is located, calculating a step length to be moved of the lens at the current position according to the current position information, the preset step length and the step length fitting function of the movable area, and moving the lens according to the calculated step length to be moved and the moving direction determined in the step S202. In a preferred embodiment, the step size to be moved of the lens at the current position is calculated by using the formula s=g (x) ×s, where S represents the step size to be moved of the lens at the current position, x represents the distance between the current position and the origin position (zero position), g (x) represents the step size fitting function of the movable area where the current position is located, and S represents the preset step size of the movable area where the current position is located. As an example, as shown in fig. 3, when the movable distance of the lens is divided into three movable regions, the step fitting functions of the three regions may be expressed as s1_out=g1 (x) S1, s2_out=g2 (x) S2, and s3_out=g3 (x) S3, g1 (x), g2 (x), g3 (x) represent the step fitting functions of the first, second, and third movable regions, respectively, S1, S2, and S3 represent preset step sizes of the first, second, and third movable regions, respectively, and S1> S2> S3.
In step S204, a focus evaluation function value of the current position where the lens is moved is calculated;
in the embodiment of the invention, the focusing evaluation function value can be used for evaluating the shooting effect of the lens of the image pickup device at a position, for example, an image definition value of the position of the lens can be used as the focusing evaluation function value, and the corresponding focusing evaluation function can be specifically selected according to the type of the lens so as to accurately reflect the focusing effect of the position of the lens through the focusing evaluation function value.
In step S205, it is determined whether the focus evaluation function value of the current position is greater than or less than the focus evaluation function value of the previous position;
in the embodiment of the invention, the focusing evaluation function value of the previous position is the same as the focusing evaluation function value of the current position in the calculation mode, the calculated focusing evaluation function value is stored in the previous position, and the focusing evaluation function value of the current position can be compared with the focusing evaluation function value of the previous position after the focusing evaluation function value of the current position is obtained, so that whether the focusing evaluation function value of the current position is larger or smaller than the focusing evaluation function value of the previous position is judged. If the focus evaluation function value of the current position is greater than the focus evaluation function value of the previous position, it indicates that the current position of the lens has not reached the optimal focus, and the process jumps to step S202 to determine the moving direction of the lens so as to continue moving the lens, if the focus evaluation function value of the current position is less than the focus evaluation function value of the previous position, it indicates that the previous position is the optimal focus (in-focus position) of the lens, and at this time, step S206 is executed.
In step S206, if the focus evaluation function value of the current position is smaller than the focus evaluation function value of the previous position, the previous position is set as the in-focus position of the lens, and the lens is moved to the in-focus position to complete the in-focus of the lens.
When a request for focusing the lens of the image pickup device is received, the moving direction of the lens at the current position is determined through the optimal focusing area, the moving efficiency of the lens is improved, after the moving direction is determined, the step length to be moved of the lens at the current position is calculated according to the current position information, the preset step length of the movable area and the step length fitting function, the lens is moved according to the step length to be moved and the moving direction, the focusing evaluation function value of the current position after the lens is moved is calculated, if the focusing evaluation function value of the current position is larger than the focusing evaluation function value of the previous position, the step of obtaining the movable area where the current position of the lens is located is skipped to continue to move the lens, if the focusing evaluation function value of the current position is smaller than the previous position, the previous position is set as the focusing position of the lens, the lens is moved to the focusing position of the lens, and the focusing of the lens is completed, and the focusing efficiency of the lens is improved.
As shown in fig. 4, fig. 4 shows focusing effects of three different focusing methods on the same image capturing apparatus, where MTF1 is an effect of a hill-climbing search algorithm using a larger fixed step, MTF2 is an effect of an embodiment of the present invention, and MTF3 is an effect of a hill-climbing search algorithm using a smaller fixed step. It can be seen that the oscillation amplitude is small and the stabilizing time is short in the process of searching the optimal focusing point in the embodiment of the invention.
Embodiment two:
fig. 5 shows a flow of implementation of a lens focusing method of an image capturing apparatus according to the second embodiment of the present invention, and for convenience of explanation, only a portion related to the embodiment of the present invention is shown, and the details are as follows:
in step S501, a request for focusing a lens of an image pickup apparatus is received;
in step S502, a movable area where the current position of the lens is located is obtained, whether the movable area is an optimal focusing area is determined, and a moving direction of the lens at the current position is determined according to a determination result;
in step S503, calculating a step length to be moved of the lens at the current position according to the current position information, the preset step length of the movable area and the step length fitting function, and moving the lens according to the calculated step length to be moved and the determined moving direction;
in step S504, a focus evaluation function value of the current position where the lens is moved is calculated;
in the embodiment of the present invention, the steps S501 to S504 are the same as the steps S201 to S204 in the first embodiment, and the corresponding description of implementing one is referred to and will not be repeated here.
In step S505, it is determined whether the focus evaluation function value of the current position is greater than or less than the focus evaluation function value of the previous position;
in the embodiment of the present invention, if the focus evaluation function value of the current position is greater than the focus evaluation function value of the previous position, it indicates that the current position of the lens has not reached the optimal focusing point, step S505 is executed to continue moving the lens, and if the focus evaluation function value of the current position is less than the focus evaluation function value of the previous position, it indicates that the previous position is the optimal focusing point of the lens, at this time, step S507 is executed.
In step S506, calculating a step length to be moved of the lens at the current position according to the current position information, a preset step length of the movable area and a step length fitting function, moving the lens according to the calculated step length to be moved and the determined moving direction, and jumping to step S502;
in the embodiment of the invention, when the focus evaluation function value of the current position of the lens is greater than the focus evaluation function value of the previous position after the lens is moved through step S503, it is indicated that the current position of the lens still does not reach the optimal focusing point, at this time, the preset step length and the step fitting function of the movable area where the current position of the lens is located are obtained, the step length to be moved of the lens at the current position is calculated according to the current position information, the preset step length and the step fitting function of the movable area where the current position is located, the lens is continuously moved according to the calculated step length to be moved and the moving direction of the previous position (the moving direction determined in step S502), and then the step S502 is skipped, so that the lens is moved once after the moving direction is determined according to the optimal focusing area, if the current position of the lens still does not reach the optimal focusing point (i.e. the focus evaluation function value of the current position is greater than the focus evaluation function value of the previous position), and then the moving direction is determined again according to the optimal focusing area, so that the moving direction of the lens is always oriented to the optimal focusing area is ensured, the number of times of moving direction of the lens is reduced as much as possible, and the moving efficiency of the lens is improved. After the step S502 is skipped, the movable area where the current position of the lens is located after the movement in the step S506 is required to be obtained, so as to determine whether the movable area is the best focusing area, and the moving direction of the lens in the current position is determined according to the determination result, and the specific determination method can refer to the description in the step S202 in the first embodiment, which is not repeated herein.
In step S506, if the focus evaluation function value of the current position is smaller than the focus evaluation function value of the previous position, the previous position is set as the in-focus position of the lens, and the lens is moved to the in-focus position to complete the in-focus of the lens.
When a request for focusing the lens of the image pickup device is received, the moving direction of the lens at the current position is determined through the optimal focusing area, the moving efficiency of the lens is improved, after the moving direction of the lens is determined, the step length to be moved of the lens at the current position is calculated according to the current position information, the preset step length of the movable area and the step length fitting function, the lens is moved according to the step length to be moved and the moving direction, the focusing evaluation function value of the current position after the lens is moved is calculated, if the focusing evaluation function value of the current position is larger than the focusing evaluation function value of the previous position, the lens is moved again along the moving direction of the previous position and is jumped to the movable area where the current position of the lens is located, the moving direction is determined again to continue moving the lens, so that the number of times of direction determination is reduced as much as possible while the moving direction of the lens is always oriented to the optimal focusing area is ensured, the moving efficiency of the lens is improved, if the focusing evaluation function value of the current position is smaller than the focusing position of the previous position, the lens is set to be the focusing position of the lens, and the focusing of the lens is moved to the focusing position, so that the focusing of the lens is finished.
Embodiment III:
fig. 6 shows the structure of a lens focusing apparatus of an image pickup apparatus provided in the third embodiment of the present invention, and for convenience of explanation, only parts related to the embodiment of the present invention are shown, including:
a request receiving unit 61 for receiving a request for focusing a lens of the image pickup apparatus;
a direction determining unit 62, configured to obtain a movable area where the current position of the lens is located, determine whether the movable area is an optimal focusing area, and determine a moving direction of the lens at the current position according to a determination result;
a lens moving unit 63, configured to calculate a to-be-moved step length of the lens at the current position according to the current position information, a preset step length of the movable area, and a step length fitting function, and move the lens according to the calculated to-be-moved step length and the determined movement direction;
a value calculation unit 64 for calculating a focus evaluation function value of the current position where the lens is moved;
a continuing moving unit 65 for triggering the direction determining unit 62 to determine the moving direction of the lens to continue moving the lens if the focus evaluation function value of the current position is greater than the focus evaluation function value of the previous position; and
and an focusing unit 66 for setting the previous position as the focusing position of the lens if the focusing evaluation function value of the current position is smaller than the focusing evaluation function value of the previous position, and moving the lens to the focusing position to complete focusing of the lens.
Preferably, the direction determining unit 62 includes a direction setting unit for randomly selecting one direction if the lens is in the best focus area, determining the selected direction as the moving direction of the lens at the current position, and otherwise determining the moving direction of the lens at the current position toward the direction of the best focus area.
In the embodiment of the present invention, each unit of the lens focusing device may be implemented by a corresponding hardware or software unit, and each unit may be an independent software or hardware unit, or may be integrated into one software or hardware unit, which is not used to limit the present invention. The specific embodiments of each unit can refer to the implementation of the first and second descriptions, and are not repeated here.
Embodiment four:
fig. 7 shows the structure of an image pickup apparatus provided in the fourth embodiment of the present invention, and for convenience of explanation, only the portions relevant to the embodiments of the present invention are shown.
The image pickup apparatus 7 of the embodiment of the present invention includes a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. The processor 70, when executing the computer program 72, implements the steps of the lens focusing method embodiment described above, such as steps S201 to S206 shown in fig. 2. Alternatively, the processor 70, when executing the computer program 72, performs the functions of the units in the above-described device embodiments, such as the functions of the units 61 to 66 shown in fig. 6.
The image pickup device of the embodiment of the invention can be electronic devices with specific image pickup functions such as cameras, mobile phones and the like. The steps of the image capturing apparatus 7, which are implemented when the processor 70 executes the computer program 72 to implement the lens focusing method, are referred to the description of the foregoing method embodiments, and will not be repeated here.
Fifth embodiment:
in an embodiment of the present invention, there is provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps in the above-described lens focusing method embodiment, for example, steps S201 to S206 shown in fig. 2. Alternatively, the computer program, when executed by a processor, implements the functions of the units in the above-described respective apparatus embodiments, such as the functions of the units 61 to 66 shown in fig. 6.
The computer readable storage medium of embodiments of the present invention may include any entity or device capable of carrying computer program code, recording medium, such as ROM/RAM, magnetic disk, optical disk, flash memory, and so on.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (10)

1. A lens focusing method of an image pickup apparatus, the method comprising the steps of:
s11, receiving a request for focusing a lens of the image pickup device;
s12, acquiring a movable area where the current position of the lens is located, judging whether the movable area is an optimal focusing area, and determining the moving direction of the lens at the current position according to a judging result, wherein the optimal focusing area is an area where the focal point of the lens is most likely to be located, and the area is set according to the optical characteristics of various lenses;
s13, calculating a step length to be moved of the lens at the current position according to the current position information, a preset step length of the movable area and a step length fitting function, and moving the lens according to the calculated step length to be moved and the determined moving direction;
s14, calculating a focusing evaluation function value of the current position of the lens after moving;
s15, if the focusing evaluation function value of the current position is larger than that of the previous position of the current position, jumping to the step S12 to continuously move the lens;
s16, if the focusing evaluation function value of the current position is smaller than that of the previous position, setting the previous position as the focusing position of the lens, and moving the lens to the focusing position so as to complete focusing of the lens;
the number of the movable areas and the optimal focusing area are determined according to the moving amount of the lens and the focusing distance.
2. The lens focusing method according to claim 1, wherein the step of determining the moving direction of the lens at the current position according to the determination result comprises:
and if the lens is in the optimal focusing area, randomly selecting a direction, determining the selected direction as the moving direction of the lens at the current position, otherwise, determining the moving direction of the lens at the current position towards the direction of the optimal focusing area.
3. The lens focusing method according to claim 1, wherein if the focus evaluation function value of the current position is greater than the focus evaluation function value of the previous position, before proceeding to step S12, further comprising:
calculating the step length to be moved of the lens at the current position according to the current position information, the preset step length of the movable area and a step length fitting function, and moving the lens according to the calculated step length to be moved and the determined moving direction.
4. The lens focusing method of claim 1, further comprising, prior to the step of acquiring the movable region in which the current position of the lens is located:
dividing the movable distance of the lens into a preset number of movable areas, and setting a corresponding preset step length and a step length fitting function for each movable area.
5. The lens focusing method of claim 4, wherein the preset step length for each movable region sequentially decreases from the origin position of the lens movable distance to the maximum movable distance, the number of the movable regions being 3.
6. The lens focusing method of claim 1, wherein the step of calculating a step size to be moved of the lens at the current position according to the current position information, a preset step size of the movable region, and a step size fitting function comprises:
calculating the step length to be moved of the lens at the current position by using a formula s=g (x) ×s, wherein S represents the calculated step length to be moved, x represents the distance between the current position and the origin position of the lens, g (x) represents a step length fitting function of a movable area where the current position is located, and S represents a preset step length of the movable area where the current position is located.
7. A lens focusing apparatus of an image pickup device, characterized by comprising:
a request receiving unit configured to receive a request for focusing a lens of an image pickup apparatus;
the direction determining unit is used for obtaining a movable area where the current position of the lens is located, judging whether the movable area is an optimal focusing area, and determining the moving direction of the lens at the current position according to a judging result, wherein the optimal focusing area is an area where a lens focusing point set according to optical characteristics of various lenses is most likely to be located;
the lens moving unit is used for calculating the step length to be moved of the lens at the current position according to the current position information, the preset step length of the movable area and the step length fitting function, and moving the lens according to the calculated step length to be moved and the determined moving direction;
a value calculation unit for calculating a focusing evaluation function value of the current position where the lens is moved;
a continuing moving unit configured to trigger the direction determining unit to continue moving the lens if the focus evaluation function value of the current position is greater than the focus evaluation function value of a position previous to the current position; and
a focusing unit configured to set the previous position as a focusing position of the lens if a focusing evaluation function value of the current position is smaller than a focusing evaluation function value of the previous position, and move the lens to the focusing position to complete focusing of the lens;
the number of the movable areas and the optimal focusing area are determined according to the moving amount of the lens and the focusing distance.
8. The lens focusing apparatus according to claim 7, wherein the direction determining unit includes:
and the direction setting unit is used for randomly selecting one direction if the lens is in the optimal focusing area, determining the selected direction as the moving direction of the lens at the current position, and otherwise, determining the moving direction of the lens at the current position towards the direction of the optimal focusing area.
9. An image capturing apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 6.
CN202111403291.5A 2021-11-24 2021-11-24 Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium Active CN114302052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111403291.5A CN114302052B (en) 2021-11-24 2021-11-24 Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111403291.5A CN114302052B (en) 2021-11-24 2021-11-24 Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN114302052A CN114302052A (en) 2022-04-08
CN114302052B true CN114302052B (en) 2024-02-02

Family

ID=80964985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111403291.5A Active CN114302052B (en) 2021-11-24 2021-11-24 Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium

Country Status (1)

Country Link
CN (1) CN114302052B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017107839A1 (en) * 2015-12-23 2017-06-29 北京奇虎科技有限公司 Method and device for camera rapid automatic focusing
CN111432125A (en) * 2020-03-31 2020-07-17 合肥英睿系统技术有限公司 Focusing method and device, electronic equipment and storage medium
CN111432129A (en) * 2020-04-14 2020-07-17 广东欧谱曼迪科技有限公司 Automatic focusing hill climbing search algorithm based on threshold value method and local maximum value

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101137615B1 (en) * 2010-01-12 2012-04-19 삼성전자주식회사 Auto focus method and apparatus of digital camera

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017107839A1 (en) * 2015-12-23 2017-06-29 北京奇虎科技有限公司 Method and device for camera rapid automatic focusing
CN111432125A (en) * 2020-03-31 2020-07-17 合肥英睿系统技术有限公司 Focusing method and device, electronic equipment and storage medium
CN111432129A (en) * 2020-04-14 2020-07-17 广东欧谱曼迪科技有限公司 Automatic focusing hill climbing search algorithm based on threshold value method and local maximum value

Also Published As

Publication number Publication date
CN114302052A (en) 2022-04-08

Similar Documents

Publication Publication Date Title
US10061182B2 (en) Systems and methods for autofocus trigger
CN108496350B (en) Focusing processing method and device
JP4664379B2 (en) Electronic device and image data processing method for image data processing
US9749563B2 (en) Focal point detection device and focal point detection method
US8027581B2 (en) Imaging apparatus, imaging apparatus control method, and computer program
JP2008009341A (en) Autofocus device and method, and imaging apparatus
CN107948510B (en) Focal length adjusting method and device and storage medium
JP2006017960A (en) Imaging method and imaging apparatus
CN107800951B (en) Electronic device and lens switching method thereof
JP2020046637A (en) Control device, image capturing device, control method, and program
CN108254995B (en) Automatic focusing method and system for large zoom lens
CN110336948B (en) Method and device for focusing in preset area, storage medium and electronic device
CN114302052B (en) Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium
CN113923347A (en) Automatic focusing method and device, shooting terminal and computer readable storage medium
CN114302053B (en) Lens focusing method and device of image pickup apparatus, image pickup apparatus and storage medium
CN106707462A (en) Automatic focusing method and device
CN116980757A (en) Quick focusing method, focusing map updating method, device and storage medium
CN111491105A (en) Focusing method of mobile terminal, mobile terminal and computer storage medium
JP5257969B2 (en) Focus position control device, focus position control method, focus position control program
CN115576092A (en) Intelligent automatic focusing method and device for optical microscope and storage equipment
JP6429724B2 (en) Imaging apparatus and control method thereof
CN113438406B (en) Focusing method, focusing device and camera device
JP2013210572A (en) Imaging device and control program of the same
CN112492210A (en) Photographing method and device, electronic equipment and storage medium
JP2019083580A (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant