WO2018059158A1 - 一种自动聚焦方法及装置 - Google Patents
一种自动聚焦方法及装置 Download PDFInfo
- Publication number
- WO2018059158A1 WO2018059158A1 PCT/CN2017/098301 CN2017098301W WO2018059158A1 WO 2018059158 A1 WO2018059158 A1 WO 2018059158A1 CN 2017098301 W CN2017098301 W CN 2017098301W WO 2018059158 A1 WO2018059158 A1 WO 2018059158A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- focus
- focus position
- sub
- interval
- slope
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
Definitions
- the invention belongs to the technical field of computers, and in particular relates to an automatic focusing method and device.
- Autofocus technology refers to the lens automatically focusing on the captured object to obtain the clearest image, which is widely used in video cameras, digital cameras, and mobile terminals with camera functions.
- Autofocus technology includes active focus and passive focus.
- passive focus mode is adopted.
- Passive focus captures images through lens and image sensor, and computer analysis is performed on each frame image to determine the distance of the object. The camera actually moves the lens back and forth against the shooting scene to search for the best focus position.
- the passive autofocus algorithm mainly finds the focus position by analyzing the focus curve corresponding to the image.
- the focus curve mainly reflects the relationship between the focus position and the sharpness evaluation value.
- the resolution evaluation value is image texture statistical information, including horizontal direction texture statistical information h and vertical direction texture statistical information v, and the resolution evaluation value is the sum of the horizontal direction texture statistical information h and the vertical direction texture statistical information v; The higher the value of the sharpness evaluation value, the clearer the image.
- the abscissa of the focus curve represents the position of the focus motor
- the ordinate represents the sharpness evaluation value of the entire image
- the curve A is the focus curve of the low-frequency sharpness evaluation value
- the curve B is the high-frequency definition evaluation value. Focus curve.
- the focus curve is analyzed, and the position of the focus motor corresponding to the peak of the sharpness evaluation value is found as the focus position.
- FIG. 2 is a focus curve diagram of the entire screen of the point source scene
- curve A is a high frequency definition evaluation value
- curve B is the focus curve of the low frequency resolution evaluation value.
- the resolution evaluation value includes a high frequency definition evaluation value and a low frequency definition evaluation value, wherein the high frequency definition evaluation value is a high frequency portion in the image texture statistical information; the low frequency definition evaluation value is a low frequency in the image texture statistical information section.
- the sharpness evaluation value When the point source is sharply focused, the brightness of the point source is high, so the corresponding sharpness evaluation value will appear peak when the focus is clear; however, when the point source is not focused clearly, the point source in the image The brightness is reduced but the area becomes larger. At this time, the sharpness evaluation value also peaks, but the peak at this time is a pseudo peak. For such a scene with multiple peaks, when the focus motor is at the position of the pseudo peak, the image is blurred and the focus is not accurate.
- the present application provides an autofocus method and apparatus to solve the technical problem of inaccurate focus in a scene in which a focus curve has a pseudo peak.
- an autofocus method to divide an image to be captured into M*N sub-regions, wherein M and N are integers greater than 1, the method comprising: acquiring a focus search range, and focusing the image
- the search range is divided into at least two focus intervals, wherein the focus interval I is a range of the range from the focus position i-1 to the focus position i, and the focus position i is the focus position i-1 is increased by one according to the first preset adjustment direction.
- a focus position corresponding to the first preset step size and i is a positive integer; then, respectively obtaining a low-frequency definition evaluation value of the M*N sub-regions at the current focus position i; and for the focus interval I, acquiring the image to be captured
- Each sub-region corresponds to a slope of the focus curve, and counts a first number X of sub-regions in which the focus curve rising slope of the M*N sub-regions is greater than the first preset value, and the focus curve falling slope is greater than the first preset value a second number Y of sub-regions; then, determining a magnitude relationship between X and Y corresponding to the focus interval I; if the X corresponding to the focus interval I is greater than Y, the current focus position i is according to the first The adjustment direction is increased by one of the first preset step sizes to reach the focus position i+1, and the magnitude relationship between X and Y corresponding to the focus interval I+1 is continued, and the focus interval I+1 is from the focus position
- the autofocus method provided by the first aspect divides the image to be captured into M*N sub-regions, and then obtains low-frequency resolution evaluation values of the respective sub-regions at respective focus positions, and then finds the low-frequency resolution evaluation values of the respective sub-regions.
- the sub-region in which the focus curve of the adjacent two focus sections satisfies the steep rise first is the effective sub-region, and the focus position of the effective sub-region is taken as the focus position of the entire image. Avoid the interference of the pseudo-peaks on the focus when using the focus curve of the entire image, thereby improving the accuracy of image focusing in the application scene where there are multiple peaks in the focus curve.
- the method further includes: if the X and Y corresponding to the focus interval I+1 are greater than 0, and X is greater than Y, continuing to determine the focus interval I+2 Corresponding magnitude relationships of X and Y until a focus interval that satisfies Y greater than X or a boundary position adjusted to the focus search range in accordance with the first preset adjustment direction is found.
- the method further includes: if there is no sub-area in which the focus curve rising slope is greater than the first preset value in the focus search range, the statistics are in focus The interval I has a third number x of sub-regions whose focus curve rising slope is greater than a second preset value, and a fourth number y of sub-regions whose focus curve falling slope is greater than the second preset value, wherein the first The second preset value is smaller than the first preset value; then, the size relationship between x and y corresponding to the focus interval I is determined; if the x corresponding to the focus interval I is greater than y, the comparison focus interval I+1 is continued. Corresponding magnitude relationship between x and y; if y corresponding to the focus interval I+1 is greater than x, it is determined that the focus position i+1 is the low frequency clear focus position.
- the second possible implementation of the first aspect provides an autofocus method that, after traversing the entire coarse focus search range, does not satisfy sub-regions of sharp rise and sharp fall conditions, according to a focus interval that satisfies a slow rise and a slow fall , to determine the coarse focus position.
- the method further includes: acquiring the high-frequency definition evaluation value of the entire image to be captured captured at the low-frequency clear focus position i+1; and clearing the focus position from the low-frequency clear focus position Adding the second preset step size according to the second preset adjustment direction to obtain the focus position i+x1, and acquiring the high frequency definition evaluation value of the entire image to be captured taken at the focus position i+x1 Calculating the entire image to be captured in the interval from the focus position i+1 to the focus position i+x1 a first slope; if the first slope is a rising slope and greater than the first preset value, continuing to increase the focus position i+x1 by one of the second preset adjustment directions by the second Predetermining the step size, obtaining a focus position i+x2, acquiring
- the third embodiment of the first aspect provides an autofocus method, after determining the low-frequency clear focus position by the coarse focus process, and then using the high-frequency focus curve of the entire image to be captured to find a condition that satisfies both the sharp rise and the sharp drop simultaneously.
- the low frequency focus position and the low frequency focus position is determined as the final focus position.
- the slope of the high-frequency focusing curve is larger, the span of the high-frequency focusing curve is smaller in the direction of the focus position, and the high-frequency focusing position found by the high-frequency focusing curve is more accurate, which improves the accuracy of the auto-focusing.
- the acquiring a slope of a focus curve corresponding to each of the sub-regions for the focus interval I includes: for any one of the sub-regions in the image to be captured, Calculating a first difference between the low-frequency definition evaluation value of the sub-area at the focus position i and the low-frequency definition evaluation value at the focus position i-1; if the first difference is greater than 0, calculating the a ratio of a first difference value to a sharpness evaluation value of the sub-region at a focus position i-1, to obtain a rising slope of the sub-region within the focus interval I; if the first difference value is less than 0, Calculating a ratio of an absolute value of the first difference value to a sharpness evaluation value of the sub-region at a focus position i-1, and obtaining a falling slope of the sub-region within the focus interval I.
- an autofocus device to divide an image to be captured into M*N sub-regions, wherein M and N are integers greater than 1, the device comprising: a focus search range acquisition module for acquiring focus Searching the range and dividing the focus search range into at least two focus intervals, wherein the focus interval I is a range of the range from the focus position i-1 to the focus position i, the focus position i being the focus position i-1
- the first preset adjustment direction is increased by a focus position corresponding to the first preset step size, and i is a positive integer
- the first definition evaluation value acquisition module is configured to respectively acquire low frequencies of the M*N sub-regions at the current focus position i
- a slope evaluation module configured to acquire, for the focus interval I, a slope of a corresponding focus curve of each sub-region of the image to be captured
- a first statistic module configured to calculate M*N for the focus interval I a first number X of sub-regions in which the focus curve rise slope is greater than the first preset
- the autofocus device provided by the second aspect divides the image to be captured into M*N sub-regions, and then obtains low-frequency definition evaluation values of the respective sub-regions at respective focus positions, and then finds the low-frequency resolution evaluation values according to the respective sub-regions. It is satisfied that the sub-region in which the focus curve of the adjacent two focus sections satisfies the sharp rise and then falls sharply is the effective sub-region, and the focus position of the effective sub-region is taken as the focus position of the entire image. Avoid the interference caused by the false peaks on the curve when using the focus curve of the entire image, thereby improving the accuracy of image focusing in the application scene where there are multiple peaks in the focus curve.
- the first determining module is further configured to: when the focus interval When X and Y corresponding to I+1 are greater than 0, and X is greater than Y, the relationship between X and Y corresponding to the focus interval I+2 is continuously determined until a focus interval satisfying Y is greater than X is found or according to the first pre- It is assumed that the adjustment direction is adjusted to the boundary position of the focus search range.
- the device further includes: a second statistic module, configured to: when there is no sub-focus curve in the focus search range, the slope is greater than the first preset value In the region, the third number x of sub-regions in which the focus curve rising slope is greater than the second preset value is present in the focus interval I, and the fourth number y of the sub-regions in which the focus curve falling slope is greater than the second preset value
- the second preset value is smaller than the first preset value
- the second determining module is configured to determine a size relationship between x and y corresponding to the focus interval I; if the focus interval I corresponds to x If it is greater than y, the size relationship between x and y corresponding to the focus interval I+1 is continuously compared; and the second determining module is configured to determine the focus position i+1 when the y corresponding to the focus interval I+1 is greater than x. Clear focus position for the low frequency.
- a second possible implementation of the second aspect provides an autofocus device that utilizes a focus interval that satisfies a slow rise and a slow fall when traversing the entire coarse focus search range without subregions satisfying the steep rise and steep fall conditions , to determine the coarse focus position.
- a focus interval that satisfies a slow rise and a slow fall when traversing the entire coarse focus search range without subregions satisfying the steep rise and steep fall conditions .
- the device further includes: a second definition evaluation value acquisition module, configured to acquire the entire to-be-photographed at the low-frequency clear focus position i+1 a high-frequency resolution evaluation value of the image; a focus position adjustment module, configured to increase a focus position from the low-frequency clear focus position by a second preset adjustment direction by the second preset adjustment direction to obtain a focus position i+x1
- the second definition evaluation value acquisition module is further configured to acquire a high frequency definition evaluation value of the entire image to be captured captured at the focus position i+x1; a slope calculation module, configured to calculate the entire Determining a first slope of the captured image in a range from a focus position i+1 to a focus position i+x1; the focus position adjustment module, configured to: when the first slope is a rising slope, and greater than the first pre- When the value is set, the focus position i+x1 is further increased by one second preset step according to the second preset adjustment direction to obtain a focus position
- the third embodiment of the second aspect provides an autofocus device that determines a low-frequency clear focus position by a coarse focus process, and then uses the high-frequency focus curve of the entire image to be captured to find a condition that satisfies both sharp rise and sharp fall conditions.
- the low frequency focus position and the low frequency focus position is determined as the final focus position.
- the slope of the high-frequency focusing curve is larger, the span of the high-frequency focusing curve is smaller in the direction of the focus position, and the high-frequency focusing position found by the high-frequency focusing curve is more accurate, which improves the accuracy of the auto-focusing.
- the slope obtaining module includes: a first calculating submodule, configured to calculate, for any one of the sub-regions, a definition of the sub-region at a focus position i a first difference between the value and the sharpness evaluation value at the focus position i-1; a second calculation submodule configured to calculate the first difference value and the sub-area when the first difference value is greater than zero a ratio of the sharpness evaluation values at the focus position i-1, to obtain a rising slope of the sub-region within the focus interval I; and a third calculation sub-module for calculating when the first difference is less than 0 a ratio of an absolute value of the first difference value to a sharpness evaluation value of the sub-region at a focus position i-1, to obtain the sub-region The falling slope of the domain within the focus interval I.
- a third aspect provides a terminal device, including a processor, a memory, and an image acquiring device.
- the image acquiring device is configured to acquire an image to be captured of a current picture, and divide the image to be captured into M*N sub-regions, where M and N are integers greater than 1;
- the memory is for storing program instructions;
- the processor is configured to execute program instructions in the memory to achieve obtaining a focused search range, and to perform the focused search
- the range is divided into at least one focus interval, wherein the focus interval I is a range of the range from the focus position i-1 to the focus position i, and the focus position i is the focus position i-1 is increased by a first according to the first preset adjustment direction.
- a focus position corresponding to the preset step size and i is a positive integer; respectively obtaining a low-frequency definition evaluation value of the M*N sub-regions at the current focus position i; and for the focus interval I, acquiring each sub-region of the image to be captured Corresponding to the slope of the focus curve, the first number X of sub-regions in which the slope of the focus curve is greater than the first preset value in the M*N sub-regions is counted, and the slope of the focus curve is greater than a second number Y of sub-regions of the first preset value; determining a magnitude relationship between X and Y corresponding to the focus interval I; if the X corresponding to the focus interval I is greater than Y, the current focus position i Adding the first preset step size according to the first preset adjustment direction to reach the focus position i+1, and continuing to compare the magnitude relationship of X and Y corresponding to the focus interval I+1, the focus interval I+ 1 is a range of the range from the focus
- the terminal device provided by the third aspect acquires an image to be captured, divides the image to be captured into M*N sub-regions, and then obtains a low-frequency definition evaluation value of each sub-region at each focus position, and then, according to the low frequency of each sub-region
- the sharpness evaluation value finds that the sub-area where the focus curve of the adjacent two focus sections satisfies the sharp rise first is the effective sub-area, and the focus position of the effective sub-area is taken as the focus position of the entire image. Avoid the interference caused by the false peaks on the curve when using the focus curve of the entire image, thereby improving the accuracy of image focusing in the application scene where there are multiple peaks in the focus curve.
- the processor is further configured to: acquire the high frequency definition evaluation value of the entire image to be captured captured at the low frequency clear focus position i+1; Adding the focus position from the low-frequency clear focus position to the second preset adjustment direction by one of the second preset step sizes to obtain a focus position i+x1, and acquiring the entire photographed at the focus position i+x1 a high frequency definition evaluation value of the image to be captured; calculating a first slope of the entire image to be captured in a range from a focus position i+1 to a focus position i+x1; if the first slope is a rising slope and larger than The first preset value continues to increase the focus position i+x1 by one second preset step according to the second preset adjustment direction to obtain a focus position i+x2, and obtain the focus position.
- a high-frequency resolution evaluation value of the entire image to be captured taken at i+x2 calculating a second slope of the entire image to be captured from a focus position i+x1 to a focus position i+x2;
- the second slope is a falling slope and is greater than the A predetermined value, determining that the focus position i + x1 of the high-frequency portion of the captured image to be clear high-focus position.
- the terminal device provided by the first implementation of the third aspect determines the low-frequency clear focus position by the coarse focus process, and then uses the high-frequency focus curve of the entire image to be captured to find the low frequency that simultaneously satisfies the sharp rise and the sharp drop condition.
- the position is focused and the low frequency focus position is determined as the final focus position.
- the slope of the high-frequency focusing curve is larger, the span of the high-frequency focusing curve is smaller in the direction of the focus position, and the high-frequency focusing position found by the high-frequency focusing curve is more accurate, which improves the accuracy of the auto-focusing.
- the autofocus method provided by the present application divides an image to be captured into M*N sub-regions during the process of autofocusing, and obtains low-frequency sharpness evaluation values corresponding to the current focus position of the M*N sub-regions, according to each sub-region.
- the slope of the low-frequency focus curve on the focus interval corresponding to two adjacent two focus positions, counting the low in each focus interval The frequency focusing curve conforms to the number X of sub-regions that rise sharply (the rising slope is greater than the first preset value), and the number Y of sub-regions that meet the sharp drop (the falling slope is greater than the first preset value); if a certain focus If X is greater than Y in the interval I, then the magnitude relationship between X and Y in the focus interval I+1 is determined; if Y in the focus interval I+1 is greater than X, it is determined that the focus position i+1 is the low-frequency clear focus position.
- the method determines the effective sub-region according to the low-frequency definition evaluation value of each sub-region of the image to be captured (the sub-region where the focusing curve of the adjacent two focus intervals satisfies the sharp rise first and then drops sharply is the effective sub-region), and is effective
- the focus position of the sub-area serves as the focus position of the entire image. It is possible to avoid the interference of the pseudo-peaks in the focus curve of the entire image on the focus, thereby improving the accuracy of image focusing in an application scene where there are multiple peaks in the focus curve.
- FIG. 1 is a schematic diagram of an image focusing curve obtained by a conventional focusing method
- FIG. 2 is a schematic diagram of an image focusing curve obtained by another conventional focusing method
- 3 is a schematic diagram showing division of a sub-area of an image to be captured
- FIG. 4 is a schematic diagram of the principle of an autofocus mechanism according to an embodiment of the present invention.
- FIG. 5 is a schematic diagram of a focus curve of a point light source scene according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a focusing curve of a multi-object distance scene according to an embodiment of the present invention.
- Figure 7 is a block diagram of an autofocus device according to an embodiment of the present invention.
- Figure 8 is a block diagram of another autofocus device according to an embodiment of the present invention.
- Figure 9 is a block diagram of still another automatic focusing device in accordance with an embodiment of the present invention.
- the autofocus method provided by the embodiment of the present invention mainly divides the image to be captured into M*N sub-regions (as shown in FIG. 3), and forms a focus position and definition for each sub-region during the adjustment process of the focus motor.
- the focus curve of each sub-area is analyzed to determine that the slope of the curve conforms to the effective sub-area of sharp rise and sharp drop, and the focus position of the effective sub-area is taken as the focus position of the entire image, thereby avoiding the focus curve pseudo-peak focus of the entire image.
- FIG. 4 it is a schematic diagram of the principle of an autofocus mechanism according to an embodiment of the present invention.
- the autofocus mechanism includes a lens 110, an image sensor 120, an image signal processing unit 130, a central processing unit 140, and a focus motor 150.
- the lens 110 is mainly used for imaging; the image sensor 120 is used to convert an optical signal into an image analog electrical signal; an image signal processing unit (Image Signal Processing, abbreviated as ISP) is mainly used for an image sensor at the front end.
- the signal processing unit of the output 120 outputs the image signal through a series of digital image processing algorithms to obtain the resolution evaluation value; the Central Processing Unit (CPU) performs the focus algorithm to control the lens according to the resolution evaluation value.
- the focus motor 150 is moved to make the lens image clear, and the autofocus method provided by the present invention is applied to the CPU.
- the autofocus method provided by the present invention is applied to the central processing unit 140.
- the focused statistical information includes high frequency statistical information and low frequency statistical information, wherein the high frequency statistical information is a high frequency part of the image texture statistical information; the low frequency statistical information is a low frequency part of the image texture statistical information.
- each sub-region may be set with a weight value wi, and the low-frequency resolution evaluation value is wi*(h1+v1), and the high-frequency resolution evaluation value wi*(h2+v2).
- the autofocus process will be described in detail below for the point source scene and the multi-object distance scene in conjunction with FIG. 5 and FIG. 6, respectively.
- the point source scene and the multi-object distance scene are not distinguished because the auto focus methods of the two scenes are the same.
- the focus light cluster scene and the multi-object distance scene have different focus curve clusters. Therefore, the present invention will be separately described for two different scenes.
- FIG. 5 a schematic diagram of a focus curve of a point source scene according to an embodiment of the present invention is shown.
- the scene in which the light and the reflective object are present in the image of the object is called a point source scene.
- the curve A is the focus curve corresponding to the entire image
- the curve B is the focus curve of the point source region
- the focus of the point source region is corresponding.
- Curves C and D represent the focus curve of the non-point source region.
- the coarse focus position is first determined by using the low frequency definition evaluation values of the respective sub-areas, and then the target sharpness evaluation value is determined by using the high frequency definition evaluation values of the respective sub-areas.
- the clear focus position may be determined using only the low frequency definition evaluation values of the sub-regions.
- such an embodiment only includes the following coarse tuning process, and does not include a fine tuning process.
- the coarse adjustment initialization process is mainly used to determine the parameters used in the coarse adjustment process, including coarse initial position, coarse initial direction, coarse focus search range, and coarse adjustment step size;
- the coarse adjustment of the initial position can be obtained directly from the motor drive module of the focus motor.
- the initial direction of the coarse adjustment can be determined according to the initial position.
- the initial position of the focus motor is the far object distance position, and the adjustment direction is the near object distance direction.
- the left end of the abscissa is the Far direction of the focus motor (distance of the object direction)
- the right end of the abscissa is the Near direction of the focus motor (near object direction)
- the direction of adjustment is the Near direction;
- the coarse focus search range (ie, the focus search range) is a range of positions between the focus motor position corresponding to the infinity object distance of the current zoom position of the lens and the focus motor position corresponding to the minimum object distance;
- the coarse step size (ie, the first preset step size) can be determined based on the coarse focus search range.
- the coarse adjustment initial position of the focus motor is P0
- the coarse adjustment direction is the Near direction
- the coarse adjustment focus search range It is P0-P5
- the coarse step is step1.
- the image to be captured is divided into M*N sub-regions.
- the focus motor is adjusted from the P0 position to the P1 position to obtain the low-frequency resolution evaluation value of each sub-area at the P1 position.
- the slope of the low-frequency focus curve includes a rising slope and a falling slope.
- the low-frequency definition evaluation value corresponding to the P1 position is greater than the low-frequency definition evaluation value corresponding to the P0 position, the low-frequency focusing curve
- the slope of the P0-P1 interval is the rising slope; if the low-frequency resolution evaluation value corresponding to the P1 position is smaller than the low-frequency resolution evaluation value corresponding to the P0 position, the slope of the low-frequency focusing curve in the P0-P1 interval is the falling slope.
- FV P0 is the low-frequency resolution evaluation value corresponding to the sub-region to be processed when the focus motor is in the P0 position
- FV P1 is the low-frequency resolution evaluation value corresponding to the sub-region to be processed when the focus motor is in the P1 position
- K is to be processed The rising or falling slope of the sub-region within the interval P0-P1.
- the first preset value is determined according to the empirical value of the large amount of scene data obtained in the adopted statistical manner.
- this step judges whether the low-frequency focusing curve of the M*N sub-regions satisfies a sharp rise or a sharp fall in the P0-P1 interval, and counts the number X that coincides with the sharp rise, and the number Y that satisfies the sharp drop.
- the maximum low-frequency definition evaluation value of the sub-area is updated to the low-frequency definition evaluation value of the P3 position.
- the focus curve is usually a symmetrical curve. Therefore, in general, the Y value of the P3-P4 interval is equal to the X value of the P2-P3 interval.
- the coarse focus position is the P4 position (ie, the low-frequency clear focus position).
- the focus interval in which the low frequency focus curve satisfies the slow rise and the slow fall is found, and then the focus position corresponding to the maximum low frequency sharpness evaluation value of the focus interval is determined as the coarse focus position.
- the second preset value is smaller than the first preset value, and the second preset value is set in the same manner as the first preset value.
- the difference between the fine adjustment process and the coarse adjustment process is that the fine adjustment process uses the high frequency definition evaluation value, and the coarse adjustment process uses the low frequency definition evaluation value.
- the fine-tuning initialization process requires fine-tuning the initial position, fine-tuning the initial direction, fine-tuning range, and fine-tuning the step size.
- the initial direction is finely adjusted, and the reverse direction of the initial direction is coarsely adjusted.
- the initial direction of the fine adjustment is the Far direction;
- the fine step size (step2) is determined according to the fine focus search range, and the fine step size is smaller than the coarse step size.
- the difference is that the fine adjustment process refers to the high frequency definition evaluation value.
- step 2 Adjust a fine step (step 2) according to the fine adjustment direction, that is, the focus motor is adjusted to P4-step2, and the high-frequency resolution evaluation value of the entire image when the position P4-step2 is obtained;
- the image to be captured is divided into M*N sub-regions, and the low-frequency focusing curves of M*N sub-regions are acquired.
- the statistics meet a sharp rise
- a multi-object distance scene refers to a plurality of objects in a captured image, and the distances of the plurality of objects from the lens are different, that is, multiple The focus position of the object is different.
- the entire picture is divided into M*N sub-areas, and the resolution evaluation value corresponding to each sub-area is obtained.
- the final target focus position may be determined using only the low frequency definition evaluation values for each sub-region; or, in other embodiments, including coarse and fine Two processes are adjusted, and the coarse adjustment process can determine the coarse focus position using the low frequency definition evaluation value; then, the fine adjustment process is performed, and the final target is found based on the determined coarse focus position based on the high frequency definition evaluation value. Focus position.
- the coarse adjustment is performed, and the coarse adjustment is the same as the embodiment of the point source scene, and details are not described herein again. Then, coarse adjustment is performed based on the low-frequency definition evaluation value, and finally fine adjustment is performed based on the high-frequency definition evaluation value.
- curve A is the focus curve corresponding to the entire image
- curve B is the focus curve of the object closer to the lens (near object)
- curve C is the focus curve of the object farther from the lens (far object).
- the near-object focus curve (curve B) satisfies the sharp rise condition, that is, X>0; the far-object focus curve conforms to the sharp drop condition, that is, Y>0. That is, the interval has a sharply rising focus curve and a sharply falling focus curve, and the magnitude relationship between X and Y is determined.
- X is greater than Y, it indicates that the number of sub-areas occupied by the far object is larger than the number of sub-areas occupied by the near object, that is, the area of the far object in the entire picture is larger than the area of the near object, and therefore, determining the far object as the main object of the picture, That is, the coarse focus position is determined according to the far object, and in this embodiment, the P2 position is the coarse focus position;
- the near object is determined as the main object of the picture, that is, the coarse focus position is determined based on the near object.
- the coarse focus position is determined based on the near object.
- the coarse adjustment process finds that the focus curve satisfies the slowly rising and slow falling regions, and then determines that the focus position corresponding to the maximum low-frequency sharpness evaluation value of the region is the coarse focus position.
- the second preset value is smaller than the first preset value.
- the fine adjustment process of the multi-object distance scene is the same as the fine adjustment process of the point source scene.
- the coarse adjustment focus position is the fine adjustment initial position
- the initial adjustment direction is the reverse direction of the coarse adjustment initial direction, that is, the Near direction. Adjust the focus motor according to the fine adjustment initial direction until the focus position that satisfies the sharp rise and sharp drop regions is found on the high-frequency focus curve of the entire image. Set as the final focus position.
- the autofocus method provided in this embodiment further compares the sharply rising curve and the sharply decreasing curve when the low-frequency focusing curve of the plurality of sub-regions of the same focus interval has a curve satisfying the sharp rising condition and the sharp falling. Size relationship, and find the focus position according to the large number of focus curves. Avoid the interference caused by the pseudo-peaks on the curves in the focus curve of the entire image, so as to improve the accuracy of image focusing in the application scene where there are multiple peaks in the focus curve.
- the present invention also provides an autofocus device embodiment.
- FIG. 7 there is shown a block diagram of an autofocus apparatus according to an embodiment of the present invention.
- the apparatus is applied to the central processing unit 140 shown in FIG. 4, and is to be taken when an image is captured by using the autofocus mechanism shown in FIG.
- the captured image is divided into M*N sub-regions, where M and N are integers greater than one.
- the apparatus includes: a focus search range acquisition module 110, a first definition evaluation value acquisition module 120, a slope acquisition module 130, a first statistics module 140, a first determination module 150, and a first determination module 160.
- a focus search range obtaining module 110 configured to acquire a focus search range
- the focus search range is the position range between the focus motor position corresponding to the infinity object distance of the current zoom position of the lens and the focus motor position corresponding to the minimum object distance.
- the focus search range is divided into at least two focus intervals according to the first preset step size, and any one focus interval I is a range of the range from the focus position i-1 to the focus position i, and the focus position i is the focus position i-1.
- the first preset adjustment direction is increased by a focus position corresponding to the first preset step, and i is a positive integer.
- the first definition evaluation value acquisition module 120 is configured to respectively obtain low-frequency definition evaluation values of the M*N sub-areas at the current focus position i.
- the current focus position i can be obtained directly from the motor drive module of the focus motor.
- the slope acquisition module 130 is configured to acquire, for the focus interval I, a slope of a corresponding focus curve of each sub-region of the image to be captured.
- the slope obtaining module includes: a first calculating submodule, a second calculating submodule, and a third calculating submodule;
- the first calculation submodule is configured to calculate, for any one of the sub-regions of the image to be captured, a resolution evaluation value of the sub-region at the focus position i and a resolution evaluation value at the focus position i-1 a difference
- the second calculating submodule is configured to calculate a ratio of the first difference value to the sharpness evaluation value of the sub-area at the focus position i-1 when the first difference value is greater than 0, to obtain the sub-area in the focus interval I Rise slope within
- the third calculating submodule is configured to calculate a ratio of an absolute value of the first difference value to a sharpness evaluation value of the sub-area at the focus position i-1 when the first difference value is less than 0, to obtain the sub-area in focus The slope of the fall in interval I.
- the first statistic module 140 is configured to calculate, for the focus interval I, a first number X of sub-regions in which the focus curve rising slope of the M*N sub-regions is greater than the first preset value, and the focus curve falling slope is greater than the first preset value
- the first determining module 150 is configured to determine the magnitude relationship between X and Y corresponding to the focus interval I; if the X corresponding to the focus interval I is greater than Y, the current focus position i is increased by a first preset according to the first preset adjustment direction. The step size reaches the focus position i+1, and continues to compare the magnitude relationship of X and Y corresponding to the focus interval I+1.
- the first determining module 150 is further configured to: when the X and Y corresponding to the focus interval I+1 are greater than 0, and X is greater than Y, continue to determine that the focus interval I+2 corresponds to The relationship between the magnitudes of X and Y until a focus interval that satisfies Y greater than X or a boundary position adjusted to the focus search range in accordance with the first preset adjustment direction is found.
- the first determining module 160 is configured to determine that the focus position i+1 is a low-frequency clear focus position that makes the low-frequency portion of the image to be captured clear when Y corresponding to the focus interval I+1 is greater than X.
- the autofocus device provided in this embodiment divides the image to be captured into M*N sub-regions during the process of autofocusing, and acquires the low-frequency resolution evaluation value corresponding to the current focus position of the M*N sub-regions. Determining the effective sub-region according to the low-frequency definition evaluation value of each sub-region of the image to be captured (the sub-region where the focus curve of the adjacent two focus intervals satisfies the sharp rise first is the effective sub-region), and the effective sub-region is The focus position serves as the focus position of the entire image, avoiding the interference caused by the false peaks on the curve in the focus curve of the entire image, thereby improving the accuracy of image focusing in the application scene where there are multiple peaks in the focus curve.
- FIG. 8 a block diagram of another autofocus device according to an embodiment of the present invention is shown.
- the device further includes: a second statistic module 210, a second judging module 220, and a second determining module 230.
- the second statistic module 210 is configured to: when there is no sub-area in which the focus curve rising slope is greater than the first preset value in the focus search range, the statistic that the focus curve rise slope is greater than the second preset in the focus interval I a third number x of sub-regions of values, and a fourth number y of sub-regions whose focus curve falling slope is greater than the second preset value, wherein the second preset value is less than the first preset value.
- the second judging module 220 is configured to determine the magnitude relationship between x and y corresponding to the focus interval I; if the x corresponding to the focus interval I is greater than y, continue to compare the magnitude relationship of x and y corresponding to the focus interval I+1;
- the second determining module 230 is configured to determine that the focus position i+1 is the low frequency clear focus position when the y corresponding to the focus interval I+1 is greater than x.
- the autofocus apparatus determines that there is a sub-area that slowly rises and falls slowly after traversing the entire coarse focus search range, and if there is a sub-area that satisfies the steep rise and the steep drop condition, if there is a slow rise and The slowly decreasing focus interval, when traversing the entire coarse focus search range, does not satisfy the sub-regions of the sharp rise and the sharp fall condition, the coarse focus position is determined according to the focus interval satisfying the slow rise and the slow fall.
- a clear focus position cannot be obtained, thereby improving the accuracy of auto focus.
- the low-frequency sharpness evaluation value is used to obtain the low-frequency clear focus position, and then the high-frequency sharpness evaluation value is used for fine-tuning focusing, and finally obtained by the fine focusing process.
- the high-frequency clear focus position is used as the final focus position.
- FIG. 9 a block diagram of still another autofocus device according to an embodiment of the present invention is shown.
- the device further includes: a second sharpness evaluation value acquisition module 310, a focus position adjustment module 320, and a slope calculation.
- Module 330 and third determination module 340 are included in the device.
- the second definition evaluation value acquisition module 310 is configured to acquire a high frequency definition evaluation value of the entire image to be captured captured at the low frequency clear focus position i+1.
- the focus position adjustment module 320 is configured to increase the focus position from the low frequency clear focus position by a second preset adjustment step according to the second preset adjustment direction to obtain the focus position i+x1.
- the second definition evaluation value acquisition module 310 is further configured to acquire a high frequency definition evaluation value of the entire image to be captured taken at the focus position i+x1.
- the slope calculation module 330 is configured to calculate a first slope of the entire image to be captured in a range from the focus position i+1 to the focus position i+x1.
- the focus position adjustment module 320 is configured to: when the first slope is a rising slope and greater than the first preset value, continue to increase the focus position i+x1 by a second preset step according to the second preset adjustment direction to obtain a focus. Location i+x2.
- the second definition evaluation value acquisition module 310 is further configured to acquire a high frequency definition evaluation value of the entire image to be captured captured at the focus position i+x2.
- the slope calculation module 330 is further configured to calculate a second slope of the entire image to be captured in a range from a focus position i+x1 to a focus position i+x2.
- the third determining module 340 is configured to determine, when the second slope is a falling slope, and greater than the first preset value, that the focus position i+x1 is a high-frequency clear focus position that makes the high-frequency portion of the image to be captured clear.
- the autofocus device determines the low frequency clear focus position by the coarse focus process in the focus search range, and then uses the high frequency focus curve of the entire image to be captured to find the low frequency satisfying both the sharp rise and the sharp drop condition.
- the position is focused and the low frequency focus position is determined as the final focus position.
- the slope of the high-frequency focus curve is larger, and the span of the high-frequency focus curve in the direction of the focus position is relatively small. Therefore, the high-frequency focus position found by the high-frequency focus curve is more accurate, and the accuracy of the auto focus is improved.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
- Focusing (AREA)
Abstract
一种自动聚焦方法,将待拍摄图像划分成M*N个子区域,获取M*N个子区域在当前聚焦位置对应的低频清晰度评价值;统计各个聚焦区间内低频聚焦曲线符合急剧上升的子区域的数量X,以及符合急剧下降的子区域的数量Y;如果某个聚焦区间I内X大于Y,则继续判断聚焦区间I+1内的X和Y的大小关系;如果聚焦区间I+1内的Y大于X,则确定聚焦位置i+1为低频清晰聚焦位置。该方法根据待拍摄图像的各个子区域的低频清晰度评价值确定出有效子区域,将有效子区域的聚焦位置作为整个图像的聚焦位置。避免利用整个图像的聚焦曲线中曲线上的伪波峰对聚焦造成的干扰,从而提高在聚焦曲线存在多个峰值的应用场景下图像聚焦的准确度。
Description
本申请要求于2016年9月29日提交中国专利局、申请号为201610864820.4、发明名称为“一种自动聚焦方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明属于计算机技术领域,尤其涉及一种自动聚焦方法及装置。
自动聚焦技术是指镜头自动对所拍摄的物体进行调焦,从而获得最清晰的图像,广泛应用于视频摄像机、数码相机、具有摄像功能的移动终端中。
自动聚焦技术包括主动式聚焦和被动式聚焦两种,其中本文涉及的是被动聚焦方式,被动式聚焦通过镜头和图像传感器采集图像,对每一帧图像进行计算机分析来确定被摄物体的距离。相机实际上是对着拍摄场景前后移动镜头来搜索最佳聚焦位置。
被动式自动聚焦算法主要通过分析图像对应的聚焦曲线找到聚焦位置,聚焦曲线主要反映聚焦位置和清晰度评价值之间的关系。其中,清晰度评价值是图像纹理统计信息,包括水平方向纹理统计信息h和垂直方向纹理统计信息v,清晰度评价值为水平方向纹理统计信息h和垂直方向纹理统计信息v之和;通常情况下,清晰度评价值的数值越高表明图像越清晰。如图1所示,聚焦曲线的横坐标表示聚焦电机的位置,纵坐标表示图像整体的清晰度评价值,曲线A为低频清晰度评价值的聚焦曲线,曲线B为高频清晰度评价值的聚焦曲线。分析聚焦曲线,找到清晰度评价值波峰对应的聚焦电机的位置确定为聚焦位置。
但是,在点光源场景和/或多物距场景中,聚焦曲线会出现多个峰值,如图2所示,为点光源场景的整个画面的聚焦曲线示意图,曲线A为高频清晰度评价值的聚焦曲线,曲线B为低频清晰度评价值的聚焦曲线。清晰度评价值包括高频清晰度评价值和低频清晰度评价值,其中,高频清晰度评价值是图像纹理统计信息中的高频部分;低频清晰度评价值是图像纹理统计信息中的低频部分。
当点光源被摄物聚焦清晰时,点光源的亮度很高,因此,聚焦清晰时对应的清晰度评价值会出现峰值;但是,当点光源被摄物聚焦不清晰时,图像中的点光源亮度有所降低但面积会变大,此时,清晰度评价值也会出现峰值,但此时的峰值是伪峰值。对于这种存在多个峰值的场景,当聚焦电机处于伪波峰的位置时,图像画面模糊,聚焦不准确。
发明内容
有鉴于此,本申请提供了一种自动聚焦方法及装置,以解决在聚焦曲线存在伪波峰的场景下聚焦不准确的技术问题。
第一方面,提供一种自动聚焦方法,将待拍摄图像划分成M*N个子区域,其中,M和N均为大于1的整数,所述方法包括:获取聚焦搜索范围,并将所述聚焦搜索范围划分成至少两个聚焦区间,其中,聚焦区间I为从聚焦位置i-1到聚焦位置i的区间范围,所述聚焦位置i为聚焦位置i-1按照第一预设调整方向增加一个第一预设步长对应的聚焦位置,且i为正整数;然后,分别获取M*N个子区域在当前聚焦位置i处的低频清晰度评价值;对于聚焦区间I,获取所述待拍摄图像的每个子区域对应聚焦曲线的斜率,统计M*N个子区域中聚焦曲线上升斜率大于第一预设值的子区域的第一数量X,以及聚焦曲线下降斜率大于所述第一预设值的子区域的第二数量Y;然后,判断所述聚焦区间I对应的X与Y的大小关系;如果所述聚焦区间I对应的X大于Y,则将所述当前聚焦位置i按照所述第一预设调整方向增加一个所述第一预设步长,达到聚焦位置i+1,并继续比较聚焦区间I+1对应的X和Y的大小关系,所述聚焦区间I+1为从聚焦位置i到聚焦位置i+1的区间范围;如果所述聚焦区间I+1对应的Y大于X,则确定所述聚焦位置i+1为使所述待拍摄图像的低频部分清晰的低频清晰聚焦位置。
第一方面提供的自动聚焦方法,将待拍摄图像划分成M*N个子区域,然后获取各个子区域在各个聚焦位置的低频清晰度评价值,然后,根据各个子区域的低频清晰度评价值找到在相邻两个聚焦区间的聚焦曲线满足先急剧上升后急剧下降的子区域为有效子区域,将有效子区域的聚焦位置作为整个图像的聚焦位置。避免利用整个图像的聚焦曲线时伪波峰对聚焦造成的干扰,从而提高在聚焦曲线存在多个峰值的应用场景下图像聚焦的准确度。
在第一方面的第一种可能的实现方式中,所述方法还包括:如果所述聚焦区间I+1对应的X和Y均大于0、且X大于Y,则继续判断聚焦区间I+2对应的X和Y的大小关系,直到找到满足Y大于X的聚焦区间或按照所述第一预设调整方向调整到所述聚焦搜索范围的边界位置。
在第一方面的第二种可能的实现方式中,所述方法还包括:如果在所述聚焦搜索范围内不存在聚焦曲线上升斜率大于所述第一预设值的子区域,则统计在聚焦区间I内存在聚焦曲线上升斜率大于第二预设值的子区域的第三数量x,以及聚焦曲线下降斜率大于所述第二预设值的子区域的第四数量y,其中,所述第二预设值小于所述第一预设值;然后,判断所述聚焦区间I对应的x与y的大小关系;如果所述聚焦区间I对应的x大于y,则继续比较聚焦区间I+1对应的x和y的大小关系;如果所述聚焦区间I+1对应的y大于x,则确定所述聚焦位置i+1为所述低频清晰聚焦位置。
第一方面的第二种可能的实现方式提供的自动聚焦方法,当遍历整个粗调聚焦搜索范围后,没有满足急剧上升和急剧下降条件的子区域,则根据满足缓慢上升和缓慢下降的聚焦区间,确定出粗调聚焦位置。避免找不到符合急剧上升和急剧下降条件的子区域时,无法获得清晰的聚焦位置,提高自动聚焦的准确度。
在第一方面的第三种可能的实现方式中,在如果所述聚焦区间I+1对应的Y大于X,则确定所述聚焦位置i+1为使所述待拍摄图像的低频部分清晰的低频清晰聚焦位置之后,所述方法还包括:获取所述在低频清晰聚焦位置i+1处拍摄的整个所述待拍摄图像的高频清晰度评价值;将聚焦位置从所述低频清晰聚焦位置按照第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x1,获取在所述聚焦位置i+x1处拍摄的整个所述待拍摄图像的高频清晰度评价值;计算整个所述待拍摄图像在从聚焦位置i+1到聚焦位置i+x1区间内
的第一斜率;如果所述第一斜率为上升斜率,且大于所述第一预设值,则继续将所述聚焦位置i+x1按照所述第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x2,获取所述聚焦位置i+x2处拍摄的整个所述待拍摄图像的高频清晰度评价值;计算整个所述待拍摄图像在从聚焦位置i+x1到聚焦位置i+x2区间内的第二斜率;如果所述第二斜率为下降斜率,且大于所述第一预设值,则确定所述聚焦位置i+x1为使所述待拍摄图像的高频部分清晰的高频清晰聚焦位置。
第一方面的第三种实现方式提供的自动聚焦方法,通过粗调聚焦过程确定出低频清晰聚焦位置后,再利用整个待拍摄图像的高频聚焦曲线确找到同时满足急剧上升和急剧下降条件的低频聚焦位置,并将该低频聚焦位置确定为最终的聚焦位置。高频聚焦曲线的斜率更大,高频聚焦曲线的在焦点位置方向的跨度比较小,利用高频聚焦曲线找到的高频聚焦位置更精确,提高了自动聚焦的精确度。
在第一方面的第四种可能的实现方式中,所述对于聚焦区间I,获取每个所述子区域对应的聚焦曲线的斜率,包括:对于所述待拍摄图像中的任意一个子区域,计算所述子区域在聚焦位置i的低频清晰度评价值与在聚焦位置i-1的低频清晰度评价值之间的第一差值;如果所述第一差值大于0,则计算所述第一差值与所述子区域在聚焦位置i-1的清晰度评价值的比值,得到所述子区域在所述聚焦区间I内的上升斜率;如果所述第一差值小于0,则计算所述第一差值的绝对值与所述子区域在聚焦位置i-1的清晰度评价值的比值,得到所述子区域在所述聚焦区间I内的下降斜率。
第二方面,提供一种自动聚焦装置,将待拍摄图像划分成M*N个子区域,其中,M和N均为大于1的整数,所述装置包括:聚焦搜索范围获取模块,用于获取聚焦搜索范围,并将所述聚焦搜索范围划分成至少两个聚焦区间,其中,聚焦区间I为从聚焦位置i-1到聚焦位置i的区间范围,所述聚焦位置i为聚焦位置i-1按照第一预设调整方向增加一个第一预设步长对应的聚焦位置,且i为正整数;第一清晰度评价值获取模块,用于分别获取M*N个子区域在当前聚焦位置i的低频清晰度评价值;斜率获取模块,用于对于聚焦区间I,获取所述待拍摄图像的每个子区域对应聚焦曲线的斜率;第一统计模块,用于对于所述聚焦区间I,统计M*N个子区域中聚焦曲线上升斜率大于第一预设值的子区域的第一数量X,以及聚焦曲线下降斜率大于所述第一预设值的子区域的第二数量Y;第一判断模块,用于判断所述聚焦区间I对应的X与Y的大小关系;如果所述聚焦区间I对应的X大于Y,则将所述当前聚焦位置i按照所述第一预设调整方向增加一个所述第一预设步长,达到聚焦位置i+1,并继续比较聚焦区间I+1对应的X和Y的大小关系,所述聚焦区间I+1为从聚焦位置i到聚焦位置i+1的区间范围;第一确定模块,用于当所述聚焦区间I+1对应的Y大于X时,确定所述聚焦位置i+1为使所述待拍摄图像的低频部分清晰的低频清晰聚焦位置。
第二方面提供的自动聚焦装置,将待拍摄图像划分成M*N个子区域,然后获取各个子区域在各个聚焦位置的低频清晰度评价值,然后,根据各个子区域的低频清晰度评价值找到满足在相邻两个聚焦区间的聚焦曲线满足先急剧上升后急剧下降的子区域为有效子区域,将有效子区域的聚焦位置作为整个图像的聚焦位置。避免利用整个图像的聚焦曲线时曲线上的伪波峰对聚焦造成的干扰,从而提高在聚焦曲线存在多个峰值的应用场景下图像聚焦的准确度。
在第二方面的第一种可能的实现方式中,所述第一判断模块还用于:当所述聚焦区间
I+1对应的X和Y均大于0、且X大于Y时,继续判断聚焦区间I+2对应的X和Y的大小关系,直到找到满足Y大于X的聚焦区间或按照所述第一预设调整方向调整到所述聚焦搜索范围的边界位置。
在第二方面的第二种可能的实现方式中,所述装置还包括:第二统计模块,用于当所述聚焦搜索范围内不存在聚焦曲线上升斜率大于所述第一预设值的子区域时,统计在聚焦区间I内存在聚焦曲线上升斜率大于第二预设值的子区域的第三数量x,以及聚焦曲线下降斜率大于所述第二预设值的子区域的第四数量y,其中,所述第二预设值小于所述第一预设值;第二判断模块,用于判断所述聚焦区间I对应的x与y的大小关系;如果所述聚焦区间I对应的x大于y,则继续比较聚焦区间I+1对应的x和y的大小关系;第二确定模块,用于当所述聚焦区间I+1对应的y大于x,则确定所述聚焦位置i+1为所述低频清晰聚焦位置。
第二方面的第二种可能的实现方式提供的自动聚焦装置,当遍历整个粗调聚焦搜索范围后,没有满足急剧上升和急剧下降条件的子区域,则利用满足缓慢上升和缓慢下降的聚焦区间,确定出粗调聚焦位置。避免找不到符合急剧上升和急剧下降条件的子区域时,无法获得清晰的聚焦位置,提高自动聚焦的准确度。
在第二方面的第三种可能的实现方式中,所述装置还包括:第二清晰度评价值获取模块,用于获取在所述低频清晰聚焦位置i+1处拍摄的整个所述待拍摄图像的高频清晰度评价值;聚焦位置调节模块,用于将聚焦位置从所述低频清晰聚焦位置按照第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x1;所述第二清晰度评价值获取模块,还用于获取在所述聚焦位置i+x1处拍摄的整个所述待拍摄图像的高频清晰度评价值;斜率计算模块,用于计算整个所述待拍摄图像在从聚焦位置i+1到聚焦位置i+x1区间内的第一斜率;所述聚焦位置调整模块,用于当所述第一斜率为上升斜率,且大于所述第一预设值时,继续将所述聚焦位置i+x1按照所述第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x2;所述第二清晰度评价值获取模块,还用于获取所述聚焦位置i+x2处拍摄的整个所述待拍摄图像的高频清晰度评价值;所述斜率计算模块,还用于计算整个所述待拍摄图像在从聚焦位置i+x1到聚焦位置i+x2区间内的第二斜率;第三确定模块,用于当所述第二斜率为下降斜率,且大于所述第一预设值时,确定所述聚焦位置i+x1为使所述待拍摄图像的高频部分清晰的高频清晰聚焦位置。
第二方面的第三种实现方式提供的自动聚焦装置,通过粗调聚焦过程确定出低频清晰聚焦位置后,再利用整个待拍摄图像的高频聚焦曲线确找到同时满足急剧上升和急剧下降条件的低频聚焦位置,并将该低频聚焦位置确定为最终的聚焦位置。高频聚焦曲线的斜率更大,高频聚焦曲线的在焦点位置方向的跨度比较小,利用高频聚焦曲线找到的高频聚焦位置更精确,提高了自动聚焦的精确度。
在第二方面的第四种可能的实现方式中,所述斜率获取模块包括:第一计算子模块,用于对于任意一个所述子区域,计算所述子区域在聚焦位置i的清晰度评价值与在聚焦位置i-1的清晰度评价值的第一差值;第二计算子模块,用于当所述第一差值大于0时,计算所述第一差值与所述子区域在聚焦位置i-1的清晰度评价值的比值,得到所述子区域在所述聚焦区间I内的上升斜率;第三计算子模块,用于当所述第一差值小于0时,计算所述第一差值的绝对值与所述子区域在聚焦位置i-1的清晰度评价值的比值,得到所述子区
域在所述聚焦区间I内的下降斜率。
第三方面,提供一种终端设备,包括处理器、存储器和图像获取装置;所述图像获取装置,用于获取当前画面的待拍摄图像,将待拍摄图像划分成M*N个子区域,其中,M和N均为大于1的整数;;所述存储器,用于存储程序指令;所述处理器,用于执行所述存储器中的程序指令,以实现获取聚焦搜索范围,并将所述聚焦搜索范围划分成至少一个聚焦区间,其中,聚焦区间I为从聚焦位置i-1到聚焦位置i的区间范围,所述聚焦位置i为聚焦位置i-1按照第一预设调整方向增加一个第一预设步长对应的聚焦位置,且i为正整数;分别获取M*N个子区域在当前聚焦位置i处的低频清晰度评价值;对于聚焦区间I,获取所述待拍摄图像的每个子区域对应聚焦曲线的斜率,统计M*N个子区域中聚焦曲线上升斜率大于第一预设值的子区域的第一数量X,以及聚焦曲线下降斜率大于所述第一预设值的子区域的第二数量Y;判断所述聚焦区间I对应的X与Y的大小关系;如果所述聚焦区间I对应的X大于Y,则将所述当前聚焦位置i按照所述第一预设调整方向增加一个所述第一预设步长,达到聚焦位置i+1,并继续比较聚焦区间I+1对应的X和Y的大小关系,所述聚焦区间I+1为从聚焦位置i到聚焦位置i+1的区间范围;如果所述聚焦区间I+1对应的Y大于X,则确定所述聚焦位置i+1为使所述待拍摄图像的低频部分清晰的低频清晰聚焦位置。
第三方面提供的终端设备,获取待拍摄图像,并将待拍摄图像划分成M*N个子区域,然后获取各个子区域在各个聚焦位置的低频清晰度评价值,然后,根据各个子区域的低频清晰度评价值找到在相邻两个聚焦区间的聚焦曲线满足先急剧上升后急剧下降的子区域为有效子区域,将有效子区域的聚焦位置作为整个图像的聚焦位置。避免利用整个图像的聚焦曲线时曲线上的伪波峰对聚焦造成的干扰,从而提高在聚焦曲线存在多个峰值的应用场景下图像聚焦的准确度。
在第三方面的第一种可能的实现方式中,所述处理器还用于:获取所述在低频清晰聚焦位置i+1处拍摄的整个所述待拍摄图像的高频清晰度评价值;将聚焦位置从所述低频清晰聚焦位置按照第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x1,获取在所述聚焦位置i+x1处拍摄的整个所述待拍摄图像的高频清晰度评价值;计算整个所述待拍摄图像在从聚焦位置i+1到聚焦位置i+x1区间内的第一斜率;如果所述第一斜率为上升斜率,且大于所述第一预设值,则继续将所述聚焦位置i+x1按照所述第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x2,获取所述聚焦位置i+x2处拍摄的整个所述待拍摄图像的高频清晰度评价值;计算整个所述待拍摄图像在从聚焦位置i+x1到聚焦位置i+x2区间内的第二斜率;如果所述第二斜率为下降斜率,且大于所述第一预设值,则确定所述聚焦位置i+x1为使所述待拍摄图像的高频部分清晰的高频清晰聚焦位置。
第三方面的第一种实现方式提供的终端设备,通过粗调聚焦过程确定出低频清晰聚焦位置后,再利用整个待拍摄图像的高频聚焦曲线确找到同时满足急剧上升和急剧下降条件的低频聚焦位置,并将该低频聚焦位置确定为最终的聚焦位置。高频聚焦曲线的斜率更大,高频聚焦曲线的在焦点位置方向的跨度比较小,利用高频聚焦曲线找到的高频聚焦位置更精确,提高了自动聚焦的精确度。
本申请提供的自动聚焦方法,在进行自动聚焦的过程中,将待拍摄图像划分成M*N个子区域,获取M*N个子区域在当前聚焦位置对应的低频清晰度评价值,根据各个子区域的低频聚焦曲线在两个相邻两个聚焦位置对应的聚焦区间上的斜率,统计各个聚焦区间内低
频聚焦曲线符合急剧上升(上升斜率大于第一预设值)的子区域的数量X,以及符合急剧下降(下降斜率大于所述第一预设值)的子区域的数量Y;如果某个聚焦区间I内X大于Y,则接着判断聚焦区间I+1内的X和Y的大小关系;如果聚焦区间I+1内的Y大于X,则确定聚焦位置i+1为低频清晰聚焦位置。该方法根据待拍摄图像的各个子区域的低频清晰度评价值确定出有效子区域(在相邻两个聚焦区间的聚焦曲线满足先急剧上升后急剧下降的子区域为有效子区域),将有效子区域的聚焦位置作为整个图像的聚焦位置。能够避免整个图像的聚焦曲线中伪波峰对聚焦造成的干扰,从而提高在聚焦曲线存在多个峰值的应用场景下图像聚焦的准确度。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是一种现有的聚焦方法得到的图像聚焦曲线示意图;
图2是另一种现有的聚焦方法得到的图像聚焦曲线示意图;
图3是待拍摄图像子区域的划分示意图;
图4是本发明实施例一种自动聚焦机构的原理示意图;
图5是本发明实施例一种点光源场景的聚焦曲线示意图;
图6是本发明实施例一种多物距场景的聚焦曲线示意图;
图7是本发明实施例一种自动聚焦装置的框图;
图8是本发明实施例另一种自动聚焦装置的框图;
图9是本发明实施例又一种自动聚焦装置的框图。
本发明实施例提供的自动聚焦方法,主要通过把待拍摄图像划分成M*N个子区域(如图3所示),在聚焦电机调节过程中,针对每个子区域形成一条聚焦位置和清晰度评价值的聚焦曲线,共有M*N个子区域的聚焦曲线和一个整体画面的聚焦曲线。然后,分析各个子区域的聚焦曲线,确定出曲线斜率符合急剧上升和急剧下降的有效子区域,将有效子区域的聚焦位置作为整个图像的聚焦位置,从而避免整个图像的聚焦曲线伪波峰对聚焦造成的干扰。
下面将结合本发明实施例中的附图,详细介绍本发明技术方案。显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参见图4,是本发明实施例一种自动聚焦机构的原理示意图。
如图4所示,该自动聚焦机构包括:镜头110、图像传感器120、图像信号处理单元130、中央处理器140和聚焦电机150。
镜头110主要用于成像;图像传感器120用于把光学信号转换为图像模拟电信号;图像信号处理单元(Image Signal Processing,缩写为ISP)主要用来对前端的图像传感器
输120输出的信号处理的单元,通过一系列数字图像处理算法对图像信号进行处理,获得清晰度评价值;中央处理器(Central Processing Unit,缩写为CPU)根据清晰度评价值运行聚焦算法控制镜头的聚焦电机150运动,以使镜头成像清晰,本发明提供的自动聚焦方法应用于CPU中。
本发明提供的自动聚焦方法应用于中央处理器140中。
图像传感器120输出的图像经过ISP处理后,输出每个子区域的聚焦统计信息,聚焦统计信息是对图像纹理信息进行统计的结果。聚焦统计信息包括高频统计信息和低频统计信息,其中,高频统计信息是图像纹理统计信息的高频部分;低频统计信息是图像纹理统计信息的低频部分。
例如,水平方向低频统计信息h1,水平方向高频统计信息h2,垂直方向低频统计信息v1,垂直方向高频统计信息v2;,每个子区域的低频清晰度评价值为h1+v1,相应的高频清晰度评价值为h2+v2。可选地,每个子区域可以设定一个权重值wi,则低频清晰度评价值为wi*(h1+v1),高频清晰度评价值wi*(h2+v2)。
下面将结合图5和图6分别针对点光源场景和多物距场景详细介绍自动聚焦过程,实际自动聚焦过程中,不区分点光源场景和多物距场景,因为两个场景的自动聚焦方法相同。但是,点光源场景和多物距场景的聚焦曲线簇不相同,因此,本发明将针对两个不同场景分别进行说明。
请参见图5,示出了本发明实施例一种点光源场景的聚焦曲线示意图。
通常把被摄物体画面中存在灯光、反光物体的场景称为点光源场景,图5中,曲线A为整个图像对应的聚焦曲线;曲线B为点光源区域的聚焦曲线,点光源区域对应的聚焦曲线存在多个峰值。曲线C和D表示非点光源区域的聚焦曲线。
本实施例提供的自动聚焦方法,首先利用各个子区域的低频清晰度评价值确定出粗调聚焦位置,然后,再利用各个子区域的高频清晰度评价值确定出目标清晰度评价值。
当然,在本发明的其它实施例中,可以仅利用子区域的低频清晰度评价值来确定清晰聚焦位置。换言之,此种实施例中只包含下面的粗调过程,不包含细调过程。
一、粗调过程
(一)粗调初始化
粗调初始化过程主要用于确定粗调过程所用到的参数,包括粗调初始位置、粗调初始方向、粗调聚焦搜索范围和粗调步长等;
粗调初始位置,可以直接根据聚焦电机的电机驱动模块获得。
粗调初始方向,可以根据初始位置确定,聚焦电机的初始位置是远物距位置,则调整方向则为近物距方向。例如,图1所示的聚焦曲线图中,横坐标左端为聚焦电机的Far方向(远物距方向)横坐标的右端为聚焦电机的Near方向(近物距方向),假设聚焦电机的初始位置靠近横坐标的左端点,则调整方向为Near方向;
粗调聚焦搜索范围(即,聚焦搜索范围),是镜头当前变倍位置的无穷远物距对应的聚焦电机位置和最小物距对应的聚焦电机位置之间的位置范围;
粗调步长(即,第一预设步长),可以根据粗调聚焦搜索范围确定。
假设,聚焦电机的粗调初始位置是P0,粗调调整方向是Near方向,粗调聚焦搜索范围
是P0-P5,粗调步长是step1。将待拍摄图像划分成M*N个子区域。
(二)粗调具体步骤
(1)P0-P1区间:
①获取聚焦电机位于P0位置时,待拍摄图像的每个子区域的低频清晰度评价值;将每个子区域在P0位置的低频清晰度评价值记为该子区域对应的最大低频清晰度评价值。
②聚焦电机从P0位置调整到P1位置,获取P1位置时每个子区域的低频清晰度评价值。
③对于任意一个子区域,计算该子区域对应的低频聚焦曲线在P0-P1区间内的斜率,如果P1位置的低频清晰度评价值大于P0位置的低频清晰度评价值,则将该子区域的最大低频清晰度评价值更新为P1位置的低频清晰度评价值。
本发明实施例中,低频聚焦曲线的斜率包括上升斜率和下降斜率,对于任意一个子区域,如果P1位置对应的低频清晰度评价值大于P0位置对应的低频清晰度评价值,则该低频聚焦曲线在P0-P1区间的斜率为上升斜率;如果P1位置对应的低频清晰度评价值小于P0位置对应的低频清晰度评价值,则为该低频聚焦曲线在P0-P1区间的斜率为下降斜率。
进一步根据公式1计算得到上升斜率或下降斜率:
公式1中,FVP0为聚焦电机处于P0位置时待处理子区域对应的低频清晰度评价值;FVP1为聚焦电机处于P1位置时待处理子区域对应的低频清晰度评价值;K为待处理子区域在P0-P1区间内的上升或下降斜率。
④统计P0-P1区间内,M*N个子区域中低频聚焦曲线上升斜率大于第一预设值的子区域数量X,以及下降斜率大于第一预设值的子区域数量Y。
需要说明的是,对于同一图像,如果图像的统计方式不同,则计算得到的斜率可能不相同,因此,根据所采用的统计方式下得到的大量场景数据的经验值确定第一预设值。
⑤判断P0-P1区间对应的X和Y的大小。
换言之,该步骤判断M*N个子区域的低频聚焦曲线在P0-P1区间内是否符合急剧上升或急剧下降,并统计符合急剧上升的数量X,以及符合急剧下降的数量Y。
如图5所示,P0-P1区间,各个子区域的低频聚焦曲线逐渐上升,但均不符合急剧上升条件,即,P0-P1区间,X=0;Y=0;
(2)P1-P2区间:重复上述步骤①-⑤,统计P1-P2区间对应的X和Y的数量;如图5所示,各个子区域的低频聚焦曲线仍不符合急剧上升或急剧下降的条件,即P1-P2区间,X=0,Y=0。对于任意一个子区域,如果P2位置的低频清晰度评价值大于P1位置的低频清晰度评价值,则将该子区域的最大低频清晰度评价值更新为P2位置的低频清晰度评价值。
P2-P3区间:重复上述步骤①-⑤,统计P2-P3区间对应的X和Y的数量;如图5所示,部分子区域(非点光源子区域)的低频聚焦曲线符合急剧上升条件,并统计符合条件的数量X>0,点光源区域不符合急剧上升条件,非点光源区域符合急剧上升条件,因此,X的数量即非点光源子区域的数量;此区间没有符合急剧下降的子区域,Y=0。
对于任意一个子区域,如果P3位置的低频清晰度评价值大于P2位置的低频清晰度评价值,则将该子区域的最大低频清晰度评价值更新为P3位置的低频清晰度评价值。
(3)P3-P4区间:重复上述步骤①-⑤,统计P3-P4区间对应的X和Y的数量;如图5所示,非点光源区域的低频聚焦曲线符合急剧下降的条件的数量Y>0,点光源区域不符合急剧下降条件,非点光源符合急剧下降条件,因此,Y的数量即整个图像中非点光源子区域的数量;此区间没有符合急剧上升的子区域,X=0。
聚焦曲线通常都是对称曲线,因此,通常情况下,P3-P4区间的Y值等于P2-P3区间的X值。
至此,确定低频聚焦曲线在P2-P3区间符合急剧上升,同时,在P3-P4区间符合急剧下降的子区域为有效子区域。并确定有效子区域的低频聚焦曲线中最大低频清晰度评价值对应的聚焦位置为粗调聚焦位置,本实施例中,粗调聚焦位置即P4位置(即,低频清晰聚焦位置)。
在本发明的另一种应用场景中,如果遍历整个粗调聚焦搜索范围后,没有满足急剧上升和急剧下降条件的子区域,则根据第二预设值(满足缓慢上升和缓慢下降的斜率值),按照上述粗调过程找到低频聚焦曲线满足缓慢上升和缓慢下降的聚焦区间,然后,确定该聚焦区间的最大低频清晰度评价值对应的聚焦位置为粗调聚焦位置。其中,第二预设值小于第一预设值,而且,第二预设值的设置方式与第一预设值的设置方式相同。
二、细调过程
(一)细调初始化过程
细调过程与粗调过程的不同之处是:细调过程使用高频清晰度评价值,粗调过程使用低频清晰度评价值。
与粗调初始化过程相同,细调初始化过程需要确定细调初始位置、细调初始方向、细调范围和细调步长。
细调初始位置,粗调过程确定的粗调聚焦位置(即,低频清晰聚焦位置)作为细调初始位置;
细调初始方向,为粗调初始方向的反方向,本实施例中,细调初始方向为Far方向;
细调聚焦搜索范围,为细调初始位置+/-粗调步长;
细调步长(step2),根据细调聚焦搜索范围确定,且细调步长小于粗调步长。
(二)细调具体步骤
与粗调过程类似,不同的是细调过程参考高频清晰度评价值。
①获取聚焦电机位于细调初始位置P4时,待拍摄图像整个图像的高频清晰度评价值;
②按照细调方向调整一个细调步长(step2),即,聚焦电机调整至P4-step2,获取P4-step2位置时整个图像的高频清晰度评价值;
③计算整个图像对应的高频聚焦曲线在P4-(P3-step2)区间内的斜率。
④判断P4-(P4-step2)区间内整个图像的斜率是否符合急剧上升条件或急剧下降条件。
⑤如果P4-(P4-step2)区间的高频聚焦曲线符合急剧上升,则继续判断(P4-step2)-(P4-2*step2)区间内整个图像的高频聚焦曲线的斜率是否符合急剧下降条件;
⑥如果(P4-step2)-(P4-2*step2)区间内整个图像的高频聚焦曲线的斜率符合急剧下降条件,则确定(P4-step)为最终的目标聚焦位置。
本实施例提供的自动聚焦方法,在进行自动聚焦的过程中,将待拍摄图像划分成M*N个子区域,并获取M*N个子区域的低频聚焦曲线。对于每个聚焦区间,统计满足急剧上升
的低频聚焦曲线条数X和满足急剧下降的低频聚焦曲线条数Y,然后,比较X和Y的大小,并按照数量大的聚焦曲线寻找聚焦位置。避免利用整个图像的聚焦曲线中曲线上的伪波峰对聚焦造成的干扰,从而提高在聚焦曲线存在多个峰值的应用场景下图像聚焦的准确度。
请参见图6,示出了本发明一种多物距场景的自动聚焦曲线示意图,多物距场景是指被摄画面中存在多个物体,而且多个物体离镜头的距离不同,即多个物体的聚焦位置不同。将整个画面划分成M*N个子区域,获取每个子区域对应的清晰度评价值。
与点光源场景的自动聚焦过程相同,在本发明一些实施例中,可以只采用每个子区域的低频清晰度评价值确定出最终的目标聚焦位置;或者,在其它实施例中,包括粗调和细调两个过程,粗调过程可以采用低频清晰度评价值确定出粗调聚焦位置;然后,进行细调过程,根据高频清晰度评价值在确定的粗调聚焦位置的基础上找到最终的目标聚焦位置。下面将针对既包含粗调过程又包含细调过程的实施例进行说明:
首先进行粗调初始化,粗调初始化与点光源场景的实施例相同,此处不再赘述。然后,根据低频清晰度评价值进行粗调,最后根据高频清晰度评价值进行细调。
如图6所示,曲线A是整个图像对应的聚焦曲线;曲线B是距离镜头较近的物体(近物体)的聚焦曲线;曲线C是距离镜头较远的物体(远物体)的聚焦曲线。
(一)粗调过程
P0-P1区间,统计每个子区域低频聚焦曲线斜率是否满足急剧上升条件数量X和满足急剧下降条件的数量Y;如图6所示,远物距聚焦曲线(曲线C)满足急剧上升条件,并记录X的数值;不存在急剧下降的聚焦曲线,即Y=0;
P1-P2区间,如图6所示,近物距聚焦曲线(曲线B)满足急剧上升条件,即X>0;远物距聚焦曲线符合急剧下降条件,即Y>0。即该区间既存在急剧上升的聚焦曲线又存在急剧下降的聚焦曲线,则判断X和Y的大小关系,
如果X大于Y,则表明远物体所占子区域数量大于近物体所占子区域的数量,即远物体在整个画面的面积大于近物体的面积,因此,确定远物体作为该画面的主要物体,即,根据远物体确定粗调聚焦位置,本实施例中确为P2位置为粗调聚焦位置;
如果X小于Y,则表明近物体所占子区域数量大于远物体所占子区域数量,即近物体在整个画面的面积大于远物体的面积。因此,确定近物体作为该画面的主要物体,即,根据近物体确定粗调聚焦位置。本实施例中,需要继续移动聚焦电机的位置来寻找近物体的聚焦位置,直到找到既满足急剧上升又满足急剧下降的临界位置,作为粗调聚焦位置(即,本实施例中的P4位置)。
在本发明的其它实施例中,如果遍历整个粗调范围后,没有满足急剧上升和急剧下降条件的子区域,则根据第二预设值(满足缓慢上升和缓慢下降的斜率值),按照上述粗调过程找到聚焦曲线满足缓慢上升和缓慢下降的区域,然后,确定该区域的最大低频清晰度评价值对应的聚焦位置为粗调聚焦位置。其中,第二预设值小于第一预设值。
(二)细调过程:
多物距场景的细调过程与点光源场景的细调过程相同,以粗调聚焦位置为细调初始位置,细调初始方向为粗调初始方向的反方向,即,Near方向。按照细调初始方向调整聚焦电机,直到在整个图像的高频聚焦曲线上找到同时满足急剧上升和急剧下降区域的聚焦位
置,作为最终的聚焦位置。
本实施例提供的自动聚焦方法,当同一个聚焦区间的多个子区域的低频聚焦曲线中同时存在满足急剧上升条件和急剧下降的曲线,则进一步比较急剧上升的曲线和急剧下降的曲线条数的大小关系,并按照数量大的聚焦曲线寻找聚焦位置。避免利用整个图像的聚焦曲线中曲线上的伪波峰对聚焦造成的干扰,从而提高在聚焦曲线存在多个峰值的应用场景下图像聚焦的准确度。
对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
相应于上述的自动聚焦方法实施例,本发明还提供了自动聚焦装置实施例。
请参见图7,示出了本发明实施例一种自动聚焦装置的框图,该装置应用于图4所示的中央处理器140中,利用图4所示的自动聚焦机构拍摄图像时,将待拍摄图像划分成M*N个子区域,其中,M和N均为大于1的整数。
如图7所示,该装置包括:聚焦搜索范围获取模块110、第一清晰度评价值获取模块120、斜率获取模块130、第一统计模块140、第一判断模块150和第一确定模块160。
聚焦搜索范围获取模块110,用于获取聚焦搜索范围;
聚焦搜索范围是镜头当前变倍位置的无穷远物距对应的聚焦电机位置和最小物距对应的聚焦电机位置之间的位置范围。聚焦搜索范围按照第一预设步长划分成至少两个聚焦区间,任意一个聚焦区间I为从聚焦位置i-1到聚焦位置i的区间范围,所述聚焦位置i为聚焦位置i-1按照第一预设调整方向增加一个第一预设步长对应的聚焦位置,且i为正整数。
第一清晰度评价值获取模块120,用于分别获取M*N个子区域在当前聚焦位置i的低频清晰度评价值。
当前聚焦位置i可以直接根据聚焦电机的电机驱动模块获得。
斜率获取模块130,用于对于聚焦区间I,获取所述待拍摄图像的每个子区域对应聚焦曲线的斜率。
在本发明一种可能的实现方式中,斜率获取模块包括:第一计算子模块、第二计算子模块和第三计算子模块;
所述第一计算子模块,用于对于所述待拍摄图像的任意一个子区域,计算所述子区域在聚焦位置i的清晰度评价值与在聚焦位置i-1的清晰度评价值的第一差值;
所述第二计算子模块,用于当第一差值大于0时,计算第一差值与子区域在聚焦位置i-1的清晰度评价值的比值,得到子区域在所述聚焦区间I内的上升斜率;
所述第三计算子模块,用于当第一差值小于0时,计算第一差值的绝对值与子区域在聚焦位置i-1的清晰度评价值的比值,得到该子区域在聚焦区间I内的下降斜率。
第一统计模块140,用于对于聚焦区间I,统计M*N个子区域中聚焦曲线上升斜率大于第一预设值的子区域的第一数量X,以及聚焦曲线下降斜率大于第一预设值的子区域的第二数量Y;
第一判断模块150,用于判断聚焦区间I对应的X与Y的大小关系;如果聚焦区间I对应的X大于Y,则将当前聚焦位置i按照第一预设调整方向增加一个第一预设步长,达到聚焦位置i+1,并继续比较聚焦区间I+1对应的X和Y的大小关系。
在本发明另一种可能的实现方式中,第一判断模块150还用于:当聚焦区间I+1对应的X和Y均大于0、且X大于Y时,继续判断聚焦区间I+2对应的X和Y的大小关系,直到找到满足Y大于X的聚焦区间或按照第一预设调整方向调整到所述聚焦搜索范围的边界位置。
第一确定模块160,用于当聚焦区间I+1对应的Y大于X时,确定聚焦位置i+1为使待拍摄图像的低频部分清晰的低频清晰聚焦位置。
本实施例提供的自动聚焦装置,在进行自动聚焦的过程中,将待拍摄图像划分成M*N个子区域,获取M*N个子区域在当前聚焦位置对应的低频清晰度评价值。根据待拍摄图像的各个子区域的低频清晰度评价值确定出有效子区域(在相邻两个聚焦区间的聚焦曲线满足先急剧上升后急剧下降的子区域为有效子区域),将有效子区域的聚焦位置作为整个图像的聚焦位置,避免利用整个图像的聚焦曲线中曲线上的伪波峰对聚焦造成的干扰,从而提高在聚焦曲线存在多个峰值的应用场景下图像聚焦的准确度。
在本发明另一种应用场景中,如果遍历整个粗调聚焦搜索范围后,没有满足急剧上升和急剧下降条件的子区域。则判断是否存在缓慢上升和缓慢下降条件的子区域。
请参见图8,示出了本发明实施例另一种自动聚焦装置的框图,该装置在图7基础上还包括:第二统计模块210、第二判断模块220和第二确定模块230。
第二统计模块210,用于当所述聚焦搜索范围内不存在聚焦曲线上升斜率大于所述第一预设值的子区域时,统计在聚焦区间I内存在聚焦曲线上升斜率大于第二预设值的子区域的第三数量x,以及聚焦曲线下降斜率大于所述第二预设值的子区域的第四数量y,其中,第二预设值小于第一预设值。
第二判断模块220,用于判断聚焦区间I对应的x与y的大小关系;如果聚焦区间I对应的x大于y,则继续比较聚焦区间I+1对应的x和y的大小关系;
第二确定模块230,用于当聚焦区间I+1对应的y大于x,则确定聚焦位置i+1为所述低频清晰聚焦位置。
本实施例提供的自动聚焦装置,当遍历整个粗调聚焦搜索范围后,没有满足急剧上升和急剧下降条件的子区域,则判断是否存在缓慢上升和缓慢下降的子区域,如果存在满足缓慢上升和缓慢下降的聚焦区间,当遍历整个粗调聚焦搜索范围后,没有满足急剧上升和急剧下降条件的子区域,则根据满足缓慢上升和缓慢下降的聚焦区间,确定出粗调聚焦位置。避免找不到符合急剧上升和急剧下降条件的子区域时,无法获得清晰的聚焦位置的现象发生,从而提高自动聚焦的准确度。
在本发明另一种可能的实现方式中,利用低频清晰度评价值进行粗调聚焦获得低频清晰聚焦位置后,继续利用高频清晰度评价值进行细调聚焦,最终以细调聚焦过程获得的高频清晰聚焦位置作为最终的聚焦位置。
请参见图9,示出了本发明实施例又一种自动聚焦装置的框图,该装置在图7的基础上还包括:第二清晰度评价值获取模块310、聚焦位置调节模块320、斜率计算模块330和第三确定模块340。
第二清晰度评价值获取模块310,用于获取在所述低频清晰聚焦位置i+1处拍摄的整个所述待拍摄图像的高频清晰度评价值。
聚焦位置调节模块320,用于将聚焦位置从低频清晰聚焦位置按照第二预设调整方向增加一个第二预设步长,得到聚焦位置i+x1。
第二清晰度评价值获取模块310,还用于获取在聚焦位置i+x1处拍摄的整个待拍摄图像的高频清晰度评价值。
斜率计算模块330,用于计算整个待拍摄图像在从聚焦位置i+1到聚焦位置i+x1区间内的第一斜率。
聚焦位置调整模块320,用于当第一斜率为上升斜率,且大于第一预设值时,继续将聚焦位置i+x1按照第二预设调整方向增加一个第二预设步长,得到聚焦位置i+x2。
第二清晰度评价值获取模块310,还用于获取聚焦位置i+x2处拍摄的整个待拍摄图像的高频清晰度评价值。
所述斜率计算模块330,还用于计算整个待拍摄图像在从聚焦位置i+x1到聚焦位置i+x2区间内的第二斜率。
第三确定模块340,用于当第二斜率为下降斜率,且大于第一预设值时,确定聚焦位置i+x1为使待拍摄图像的高频部分清晰的高频清晰聚焦位置。
本实施例提供的自动聚焦装置,在聚焦搜索范围内通过粗调聚焦过程确定出低频清晰聚焦位置后,再利用整个待拍摄图像的高频聚焦曲线确找到同时满足急剧上升和急剧下降条件的低频聚焦位置,并将该低频聚焦位置确定为最终的聚焦位置。高频聚焦曲线的斜率更大,高频聚焦曲线的在焦点位置方向的跨度比较小,因此,利用高频聚焦曲线找到的高频聚焦位置更精确,提高了自动聚焦的精确度。
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。
Claims (10)
- 一种自动聚焦方法,其特征在于,将待拍摄图像划分成M*N个子区域,其中,M和N均为大于1的整数,所述方法包括:获取聚焦搜索范围,并将所述聚焦搜索范围划分成至少两个聚焦区间,其中,聚焦区间I为从聚焦位置i-1到聚焦位置i的区间范围,所述聚焦位置i为聚焦位置i-1按照第一预设调整方向增加一个第一预设步长对应的聚焦位置,且i为正整数;分别获取M*N个子区域在当前聚焦位置i处的低频清晰度评价值;对于聚焦区间I,获取所述待拍摄图像的每个子区域对应聚焦曲线的斜率,统计M*N个子区域中聚焦曲线上升斜率大于第一预设值的子区域的第一数量X,以及聚焦曲线下降斜率大于所述第一预设值的子区域的第二数量Y;判断所述聚焦区间I对应的X与Y的大小关系;如果所述聚焦区间I对应的X大于Y,则将所述当前聚焦位置i按照所述第一预设调整方向增加一个所述第一预设步长,达到聚焦位置i+1,并继续比较聚焦区间I+1对应的X和Y的大小关系,所述聚焦区间I+1为从聚焦位置i到聚焦位置i+1的区间范围;如果所述聚焦区间I+1对应的Y大于X,则确定所述聚焦位置i+1为使所述待拍摄图像的低频部分清晰的低频清晰聚焦位置。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:如果所述聚焦区间I+1对应的X和Y均大于0、且X大于Y,则继续判断聚焦区间I+2对应的X和Y的大小关系,直到找到满足Y大于X的聚焦区间或按照所述第一预设调整方向调整到所述聚焦搜索范围的边界位置。
- 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:如果在所述聚焦搜索范围内不存在聚焦曲线上升斜率大于所述第一预设值的子区域,则统计在聚焦区间I内存在聚焦曲线上升斜率大于第二预设值的子区域的第三数量x,以及聚焦曲线下降斜率大于所述第二预设值的子区域的第四数量y,其中,所述第二预设值小于所述第一预设值;判断所述聚焦区间I对应的x与y的大小关系;如果所述聚焦区间I对应的x大于y,则继续比较聚焦区间I+1对应的x和y的大小关系;如果所述聚焦区间I+1对应的y大于x,则确定所述聚焦位置i+1为所述低频清晰聚焦位置。
- 根据权利要求1或2所述的方法,其特征在于,在如果所述聚焦区间I+1对应的Y大于X,则确定所述聚焦位置i+1为使所述待拍摄图像的低频部分清晰的低频清晰聚焦位置之后,所述方法还包括:获取所述在低频清晰聚焦位置i+1处拍摄的整个所述待拍摄图像的高频清晰度评价值;将聚焦位置从所述低频清晰聚焦位置按照第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x1,获取在所述聚焦位置i+x1处拍摄的整个所述待拍摄图像的高频清晰度评价值;计算整个所述待拍摄图像在从聚焦位置i+1到聚焦位置i+x1区间内的第一斜率;如果所述第一斜率为上升斜率,且大于所述第一预设值,则继续将所述聚焦位置i+x1按照所述第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x2,获取所述聚焦位置i+x2处拍摄的整个所述待拍摄图像的高频清晰度评价值;计算整个所述待拍摄图像在从聚焦位置i+x1到聚焦位置i+x2区间内的第二斜率;如果所述第二斜率为下降斜率,且大于所述第一预设值,则确定所述聚焦位置i+x1为使所述待拍摄图像的高频部分清晰的高频清晰聚焦位置。
- 根据权利要求1所述的方法,其特征在于,所述对于聚焦区间I,获取每个所述子区域对应的聚焦曲线的斜率,包括:对于所述待拍摄图像中的任意一个子区域,计算所述子区域在聚焦位置i的低频清晰度评价值与在聚焦位置i-1的低频清晰度评价值之间的第一差值;如果所述第一差值大于0,则计算所述第一差值与所述子区域在聚焦位置i-1的清晰度评价值的比值,得到所述子区域在所述聚焦区间I内的上升斜率;如果所述第一差值小于0,则计算所述第一差值的绝对值与所述子区域在聚焦位置i-1的清晰度评价值的比值,得到所述子区域在所述聚焦区间I内的下降斜率。
- 一种自动聚焦装置,其特征在于,将待拍摄图像划分成M*N个子区域,其中,M和N均为大于1的整数,所述装置包括:聚焦搜索范围获取模块,用于获取聚焦搜索范围,并将所述聚焦搜索范围划分成至少两个聚焦区间,其中,聚焦区间I为从聚焦位置i-1到聚焦位置i的区间范围,所述聚焦位置i为聚焦位置i-1按照第一预设调整方向增加一个第一预设步长对应的聚焦位置,且i为正整数;第一清晰度评价值获取模块,用于分别获取M*N个子区域在当前聚焦位置i的低频清晰度评价值;斜率获取模块,用于对于聚焦区间I,获取所述待拍摄图像的每个子区域对应聚焦曲线的斜率;第一统计模块,用于对于所述聚焦区间I,统计M*N个子区域中聚焦曲线上升斜率大于第一预设值的子区域的第一数量X,以及聚焦曲线下降斜率大于所述第一预设值的子区域的第二数量Y;第一判断模块,用于判断所述聚焦区间I对应的X与Y的大小关系;如果所述聚焦区间I对应的X大于Y,则将所述当前聚焦位置i按照所述第一预设调整方向增加一个所述第一预设步长,达到聚焦位置i+1,并继续比较聚焦区间I+1对应的X和Y的大小关系,所述聚焦区间I+1为从聚焦位置i到聚焦位置i+1的区间范围;第一确定模块,用于当所述聚焦区间I+1对应的Y大于X时,确定所述聚焦位置i+1为使所述待拍摄图像的低频部分清晰的低频清晰聚焦位置。
- 根据权利要求6所述的装置,其特征在于,所述第一判断模块还用于:当所述聚焦区间I+1对应的X和Y均大于0、且X大于Y时,继续判断聚焦区间I+2对应的X和Y的大小关系,直到找到满足Y大于X的聚焦区间或按照所述第一预设调整方向调整到所述聚焦搜索范围的边界位置。
- 根据权利要求6或7所述的装置,其特征在于,所述装置还包括:第二统计模块,用于当所述聚焦搜索范围内不存在聚焦曲线上升斜率大于所述第一预设值的子区域时,统计在聚焦区间I内存在聚焦曲线上升斜率大于第二预设值的子区域的第三 数量x,以及聚焦曲线下降斜率大于所述第二预设值的子区域的第四数量y,其中,所述第二预设值小于所述第一预设值;第二判断模块,用于判断所述聚焦区间I对应的x与y的大小关系;如果所述聚焦区间I对应的x大于y,则继续比较聚焦区间I+1对应的x和y的大小关系;第二确定模块,用于当所述聚焦区间I+1对应的y大于x,则确定所述聚焦位置i+1为所述低频清晰聚焦位置。
- 根据权利要求6或7所述的装置,其特征在于,所述装置还包括:第二清晰度评价值获取模块,用于获取在所述低频清晰聚焦位置i+1处拍摄的整个所述待拍摄图像的高频清晰度评价值;聚焦位置调节模块,用于将聚焦位置从所述低频清晰聚焦位置按照第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x1;所述第二清晰度评价值获取模块,还用于获取在所述聚焦位置i+x1处拍摄的整个所述待拍摄图像的高频清晰度评价值;斜率计算模块,用于计算整个所述待拍摄图像在从聚焦位置i+1到聚焦位置i+x1区间内的第一斜率;所述聚焦位置调整模块,用于当所述第一斜率为上升斜率,且大于所述第一预设值时,继续将所述聚焦位置i+x1按照所述第二预设调整方向增加一个所述第二预设步长,得到聚焦位置i+x2;所述第二清晰度评价值获取模块,还用于获取所述聚焦位置i+x2处拍摄的整个所述待拍摄图像的高频清晰度评价值;所述斜率计算模块,还用于计算整个所述待拍摄图像在从聚焦位置i+x1到聚焦位置i+x2区间内的第二斜率;第三确定模块,用于当所述第二斜率为下降斜率,且大于所述第一预设值时,确定所述聚焦位置i+x1为使所述待拍摄图像的高频部分清晰的高频清晰聚焦位置。
- 根据权利要求6所述的装置,其特征在于,所述斜率获取模块包括:第一计算子模块,用于对于任意一个所述子区域,计算所述子区域在聚焦位置i的清晰度评价值与在聚焦位置i-1的清晰度评价值的第一差值;第二计算子模块,用于当所述第一差值大于0时,计算所述第一差值与所述子区域在聚焦位置i-1的清晰度评价值的比值,得到所述子区域在所述聚焦区间I内的上升斜率;第三计算子模块,用于当所述第一差值小于0时,计算所述第一差值的绝对值与所述子区域在聚焦位置i-1的清晰度评价值的比值,得到所述子区域在所述聚焦区间I内的下降斜率。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610864820.4A CN107888819B (zh) | 2016-09-29 | 2016-09-29 | 一种自动聚焦方法及装置 |
CN201610864820.4 | 2016-09-29 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018059158A1 true WO2018059158A1 (zh) | 2018-04-05 |
Family
ID=61763109
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/098301 WO2018059158A1 (zh) | 2016-09-29 | 2017-08-21 | 一种自动聚焦方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107888819B (zh) |
WO (1) | WO2018059158A1 (zh) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112525909A (zh) * | 2020-12-03 | 2021-03-19 | 湖南伊鸿健康科技有限公司 | 一种电子显微镜的自动对焦方法 |
CN113382155A (zh) * | 2020-03-10 | 2021-09-10 | 浙江宇视科技有限公司 | 自动聚焦方法、装置、设备和存储介质 |
CN114119555A (zh) * | 2021-11-29 | 2022-03-01 | 哈尔滨工业大学 | 一种基于物距对焦法的大口径元件边缘检测方法 |
CN114245023A (zh) * | 2022-02-24 | 2022-03-25 | 浙江华创视讯科技有限公司 | 一种聚焦处理方法及装置、摄像装置和存储介质 |
CN114401363A (zh) * | 2021-12-31 | 2022-04-26 | 山东信通电子股份有限公司 | 一种输电线路监拍设备的控制方法及设备 |
CN115242968A (zh) * | 2022-06-10 | 2022-10-25 | 浙江大华技术股份有限公司 | 一种摄像设备的聚焦方法、装置和计算机可读存储介质 |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109218718B (zh) * | 2018-10-31 | 2020-09-08 | 广州立景创新科技有限公司 | 自动对焦调试方法、装置、设备和存储介质 |
CN113747041B (zh) * | 2020-05-29 | 2023-06-06 | 杭州海康威视数字技术股份有限公司 | 一种摄像机对焦方法及基于循环神经网络的对焦方法 |
CN112672039B (zh) * | 2020-12-07 | 2022-06-28 | 北京集光通达科技股份有限公司 | 一种基于多区域主动变换聚焦方法及设备 |
CN114697531A (zh) * | 2020-12-30 | 2022-07-01 | 深圳中科飞测科技股份有限公司 | 聚焦方法及***、设备和存储介质 |
CN114697524B (zh) * | 2020-12-30 | 2023-05-02 | 浙江宇视科技有限公司 | 自动聚焦方法、装置、电子设备及介质 |
CN113776788A (zh) * | 2021-11-05 | 2021-12-10 | 武汉普赛斯电子技术有限公司 | 激光器的参数测试方法及装置 |
CN113905181B (zh) * | 2021-11-16 | 2023-05-26 | 福州鑫图光电有限公司 | 一种自动对焦方法及终端 |
CN114022484B (zh) * | 2022-01-10 | 2022-04-29 | 深圳金三立视频科技股份有限公司 | 一种点光源场景的图像清晰度值计算方法及终端 |
CN115242965B (zh) * | 2022-05-06 | 2024-05-31 | 福建星网智慧软件有限公司 | 一种摄像机可变步长的自动聚焦方法、装置、设备和介质 |
CN116866715B (zh) * | 2023-07-24 | 2024-04-26 | 微创优通医疗科技(上海)有限公司 | 内窥镜的自动对焦方法、电子设备和可读存储介质 |
CN117097984B (zh) * | 2023-09-26 | 2023-12-26 | 武汉华工激光工程有限责任公司 | 一种基于标定和复合搜索的相机自动对焦方法及*** |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080151097A1 (en) * | 2006-12-22 | 2008-06-26 | Industrial Technology Research Institute | Autofocus searching method |
CN101713903A (zh) * | 2005-11-28 | 2010-05-26 | 佳能株式会社 | 光学设备 |
CN101950116A (zh) * | 2010-09-14 | 2011-01-19 | 浙江工业大学 | 一种应用于多主体场景的视频自动聚焦方法 |
CN102200674A (zh) * | 2010-03-23 | 2011-09-28 | 三星电子株式会社 | 利用多个带通滤波器执行自动对焦功能的成像装置及方法 |
CN105472250A (zh) * | 2015-12-23 | 2016-04-06 | 浙江宇视科技有限公司 | 自动聚焦方法及装置 |
CN105785561A (zh) * | 2014-12-22 | 2016-07-20 | 杭州唐光科技有限公司 | 一种数字显微镜及其聚焦方法 |
-
2016
- 2016-09-29 CN CN201610864820.4A patent/CN107888819B/zh active Active
-
2017
- 2017-08-21 WO PCT/CN2017/098301 patent/WO2018059158A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101713903A (zh) * | 2005-11-28 | 2010-05-26 | 佳能株式会社 | 光学设备 |
US20080151097A1 (en) * | 2006-12-22 | 2008-06-26 | Industrial Technology Research Institute | Autofocus searching method |
CN102200674A (zh) * | 2010-03-23 | 2011-09-28 | 三星电子株式会社 | 利用多个带通滤波器执行自动对焦功能的成像装置及方法 |
CN101950116A (zh) * | 2010-09-14 | 2011-01-19 | 浙江工业大学 | 一种应用于多主体场景的视频自动聚焦方法 |
CN105785561A (zh) * | 2014-12-22 | 2016-07-20 | 杭州唐光科技有限公司 | 一种数字显微镜及其聚焦方法 |
CN105472250A (zh) * | 2015-12-23 | 2016-04-06 | 浙江宇视科技有限公司 | 自动聚焦方法及装置 |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113382155A (zh) * | 2020-03-10 | 2021-09-10 | 浙江宇视科技有限公司 | 自动聚焦方法、装置、设备和存储介质 |
CN113382155B (zh) * | 2020-03-10 | 2023-02-28 | 浙江宇视科技有限公司 | 自动聚焦方法、装置、设备和存储介质 |
CN112525909A (zh) * | 2020-12-03 | 2021-03-19 | 湖南伊鸿健康科技有限公司 | 一种电子显微镜的自动对焦方法 |
CN114119555A (zh) * | 2021-11-29 | 2022-03-01 | 哈尔滨工业大学 | 一种基于物距对焦法的大口径元件边缘检测方法 |
CN114119555B (zh) * | 2021-11-29 | 2024-05-17 | 哈尔滨工业大学 | 一种基于物距对焦法的大口径元件边缘检测方法 |
CN114401363A (zh) * | 2021-12-31 | 2022-04-26 | 山东信通电子股份有限公司 | 一种输电线路监拍设备的控制方法及设备 |
CN114401363B (zh) * | 2021-12-31 | 2024-02-27 | 山东信通电子股份有限公司 | 一种输电线路监拍设备的控制方法及设备 |
CN114245023A (zh) * | 2022-02-24 | 2022-03-25 | 浙江华创视讯科技有限公司 | 一种聚焦处理方法及装置、摄像装置和存储介质 |
CN115242968A (zh) * | 2022-06-10 | 2022-10-25 | 浙江大华技术股份有限公司 | 一种摄像设备的聚焦方法、装置和计算机可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN107888819A (zh) | 2018-04-06 |
CN107888819B (zh) | 2020-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018059158A1 (zh) | 一种自动聚焦方法及装置 | |
CN107258077B (zh) | 用于连续自动聚焦(caf)的***和方法 | |
CN106534676B (zh) | 面向变焦摄像***的自动聚焦调节方法 | |
US9307134B2 (en) | Automatic setting of zoom, aperture and shutter speed based on scene depth map | |
TWI432870B (zh) | 影像處理系統及自動對焦方法 | |
JP3175175B2 (ja) | 合焦検出装置 | |
US8553137B2 (en) | Image data processing method and apparatus | |
WO2016146021A1 (zh) | 点光源场景的聚焦 | |
US8855479B2 (en) | Imaging apparatus and method for controlling same | |
US10313577B2 (en) | Focus detection apparatus, focus detection method, and image capturing apparatus | |
CN113099135B (zh) | 一种红外图像聚焦、终端设备以及计算机可读存储介质 | |
JP2004325517A (ja) | 撮像装置 | |
CN113923347A (zh) | 自动对焦方法、装置、拍摄终端及计算机可读存储介质 | |
US20200228719A1 (en) | Focus control apparatus, imaging apparatus, focus control method, and storage medium | |
JP2016197202A (ja) | 焦点調節装置、その制御方法、および制御プログラム、並びに撮像装置 | |
JP5968379B2 (ja) | 画像処理装置およびその制御方法 | |
JP2017173480A (ja) | フォーカス制御装置、撮像装置及びフォーカス制御方法 | |
JP2957800B2 (ja) | 自動焦点調節装置 | |
US8270755B2 (en) | Method to evaluate contrast value for an image and applications thereof | |
CN111491105B (zh) | 移动终端的对焦方法、移动终端及计算机存储介质 | |
US8036522B2 (en) | Method and system for auto-focusing | |
JP2002277725A (ja) | 合焦制御方法及び撮像装置 | |
US10747089B2 (en) | Imaging apparatus and control method of the same | |
WO2014189047A1 (ja) | 撮像装置およびオートフォーカス制御方法 | |
US11557050B2 (en) | Image processing apparatus, image capturing apparatus, image processing method and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17854610 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17854610 Country of ref document: EP Kind code of ref document: A1 |