Imaging apparatus, autofocus control device thereof, and method
The autofocus control method in imaging devices addresses inaccuracies by calculating focus lens movement based on contrast values and employing acceleration/deceleration processes, enhancing focusing accuracy and speed.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2026-03-25
AI Technical Summary
Conventional autofocus systems in imaging devices suffer from inaccuracies and dependence on operator skill due to improper setting of focus lens movement, leading to decreased accuracy and speed.
An autofocus control method that calculates the movement amount of the focus lens based on contrast values, determines peak values, and employs acceleration/deceleration determination processes to achieve precise focusing, independent of operator skill.
Improves autofocus accuracy and speed by quantitatively adjusting focus lens movement, ensuring consistent and efficient focusing performance.
Smart Images

Figure 2026053113000001_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of imaging focusing, and particularly to an imaging device, its autofocus control device and method.
Background Art
[0002] Imaging devices such as cameras and mobile phones integrated with an imaging function can usually perform autofocus. In autofocus, the principle of light reflection of the subject is used. The light reflected from the subject is received by an imaging element (for example, a CCD / CMOS sensor) of an imaging device such as a camera, processed by a computer, and made to focus by an electric focus control device. In autofocus based on contrast, since the movement amount of the focus lens is not appropriately set, the accuracy and speed of autofocus may decrease. In addition, since the conventional conditions for calculating the movement amount of the focus lens were complicated, the superiority or inferiority of focusing depended on the experience and skill of the adjuster, and autofocus could not be realized.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Patent Document 2
Patent Document 3
Summary of the Invention
[0004] In view of the above points, this application provides an imaging device, its autofocus control device and method in order to solve the above technical problems. By appropriately setting the movement amount of the focus lens, the accuracy and speed of autofocus are improved, and a quantitative adjustment that does not depend on the experience and skill of the adjuster is realized.
[0005] Embodiments of the present application provide an autofocus control method in a first aspect, the autofocus control method being applied to an imaging device including an optical lens, the optical lens including a focusing lens and an imaging lens, and the autofocus control method is The process involves moving the focus lens along the optical axis of the optical lens based on the current amount of movement, and generating image data for each lens position during the movement of the focus lens. To obtain the contrast value within the autofocus evaluation area of the image data for each lens position, The autofocus evaluation value is calculated based on the contrast value within the autofocus evaluation area of the image data for each lens position, This involves determining whether a peak value appears in the autofocus evaluation value within the autofocus evaluation region of each frame of image data from among multiple frames of image data, and If a peak value is present, the focus position of the focus lens is determined, and the focus lens is controlled to move to the focus position to complete the focusing process. If the peak value is not present, The calculation involves determining the extreme values of the amount of movement, and this calculation includes determining the maximum and minimum amounts of movement. The process involves performing an acceleration / deceleration determination process, which determines the next movement amount of the focus lens, and the next movement amount is between the maximum and minimum movement amounts. The process involves determining the focus position of the focus lens, controlling its movement to that position, and moving the focus lens based on the determined next movement amount until focusing is complete. During the movement of the focus lens, image data is generated for each lens position, and the contrast value is acquired, the autofocus evaluation value is calculated, and the peak value is determined again. Includes.
[0006] In the autofocus control method of the first embodiment of this application, if it is determined that the peak value has not been reached, the extreme value of the amount of movement is calculated and an acceleration / deceleration determination process is performed. Calculating the extreme value of the amount of movement includes calculating the maximum and minimum amounts of movement. The acceleration / deceleration determination process determines the next amount of movement of the focus lens, and the next amount of movement is between the maximum and minimum amounts of movement. In contrast-based autofocus, the accuracy and speed of autofocus are improved by appropriately setting the amount of movement of the focus lens. In the process of calculating the amount of movement of the focus lens in the acceleration / deceleration process, the determination conditions for the acceleration / deceleration process are organized to achieve quantitative adjustment that does not depend on the experience and skill of the adjuster.
[0007] An embodiment of the present invention provides an imaging device in a second aspect. The imaging device comprises a memory and a computer program stored in the memory and executable by the processor. The processor executes the computer program to perform the process of the autofocus control method described in the first aspect.
[0008] An embodiment of the present invention provides a computer-readable storage medium in a third aspect. A computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the process of the autofocus control method described in the first aspect is realized.
[0009] The beneficial effects of the imaging device of the second embodiment and the computer-readable storage medium of the third embodiment of this application can be found in the description of the beneficial effects of the autofocus control method of the first embodiment described above, and will not be repeated here.
[0010] An embodiment of the present application provides an imaging device in a fourth aspect. The imaging device comprises an optical lens, an image sensor, a memory, and a processor. The optical lens includes a focusing lens, an imaging lens, and a focusing mechanism, wherein the focusing lens is positioned in correspondence with the imaging lens and connected to the focusing mechanism, and the focusing mechanism is configured to move the focusing lens along the optical axis of the optical lens based on the current amount of movement. The image sensor is configured to convert light from the subject image into an image signal while the optical lens is moving, and to generate image data corresponding to each lens position of the focus lens. Memory stores computer programs. A processor is configured to execute computer programs and run the following processes, namely: The contrast value calculation process is executed, and this process is used to obtain the contrast value within the autofocus evaluation area of the image data for each lens position. The autofocus evaluation value calculation process is executed, and this process is used to calculate the autofocus evaluation value based on the contrast value within the autofocus evaluation region of the image data for each lens position. The autofocus processing process is executed to determine whether a peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data. If a peak value appears, the focus position of the focus lens is determined, and the focus lens is controlled to move to the focus position to complete focusing. If a peak value does not appear, the next process is executed, i.e., Calculating the extreme values of the amount of movement, and calculating the extreme values of the amount of movement includes calculating the maximum and minimum amounts of movement. An acceleration / deceleration determination process is performed, and the next movement amount of the focus lens is determined by this process, and the next movement amount is between the maximum movement amount and the minimum movement amount. The system determines the focus position of the focus lens and controls its movement to that position until focusing is complete. Based on the determined next movement amount, the system moves the focus lens, generating image data for each lens position during the movement of the focus lens. The contrast value is then acquired, the autofocus evaluation value is calculated, and the peak value is determined again.
[0011] The beneficial effects of the imaging apparatus according to the fourth aspect of this application can be found in the explanation of the beneficial effects of the autofocus control method according to the first aspect, and will not be repeated here.
[0012] An embodiment of the present application provides an autofocus control device in a fifth aspect. The autofocus control device comprises a scan control module, a contrast value calculation module, an autofocus evaluation value determination module, a peak value determination module, a focus control module, a movement amount determination module, and an acceleration / deceleration determination module. The scan control module is configured to move the focus lens along the optical axis of the optical lens based on the current amount of movement, and to generate image data for each lens position during the movement of the focus lens. The contrast value calculation module is configured to determine the contrast value within the autofocus evaluation area of the image data for each lens position. The autofocus evaluation value determination module is configured to calculate the autofocus evaluation value based on the contrast value within the autofocus evaluation area of the image data for each lens position. The peak value determination module is configured to determine whether or not a peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data. The focus control module is configured to determine the focus position of the focus lens when a peak value is present, and to control the movement of the focus lens to the focus position to complete focusing. The displacement determination module is configured to calculate the extreme values of the displacement when no peak value is present, and calculating the extreme values of the displacement includes calculating the maximum and minimum displacements. The acceleration / deceleration determination module is configured to perform an acceleration / deceleration determination process if no peak value is present. This process determines the next movement amount of the focus lens, and the next movement amount is between the maximum and minimum movement amounts. The scan control module is configured to move the focus lens based on the determined next movement amount and generate image data for each lens position during the movement of the focus lens. During this period, the contrast value calculation module is configured to recalculate the contrast value, the autofocus evaluation value determination module is configured to recalculate the autofocus evaluation value, the peak value determination module is configured to re-determine the peak value. After determining the in-focus position of the focus lens, the in-focus control module is further configured to control the focus lens to move to the in-focus position to complete the in-focus.
[0013] The beneficial effects of the imaging device according to the fifth aspect of the present application can be referred to the description of the beneficial effects of the autofocus control method in the first aspect, so it will not be repeated here.
Brief Description of Drawings
[0014] Hereinafter, in order to more clearly explain the technical solutions according to the embodiments of the present application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings without creative efforts. [Figure 1] It is a schematic diagram of the modules of the imaging device according to an embodiment of the present application. [Figure 2] It is a schematic diagram showing that an imaging device according to an embodiment of the present application performs image processing, autofocus, and face detection. [Figure 3] It is a flowchart of the autofocus control method according to an embodiment of the present application. [Figure 4] It is a schematic diagram showing the specific flow of S37 according to an embodiment of the present application. [Figure 5] It is a schematic diagram showing the specific flow of S372 according to an embodiment of the present application. [Figure 6] It is a schematic diagram of the parameters related to autofocus according to an embodiment of the present application. [Figure 7] This example shows scan data of autofocus evaluation values for low-luminance and low-contrast subjects. [Figure 8] This example demonstrates obtaining autofocus evaluation values for low-contrast subjects when the position of the focusing lens is fixed. [Figure 9] This diagram illustrates how to calculate the minimum amount of movement when the focusing lens is away from the focus position. [Figure 10] This diagram illustrates how to calculate the minimum amount of movement when the focusing lens is quite far from the focus position. [Figure 11] This diagram illustrates how to calculate the minimum amount of movement when the focus lens is near its peak position. [Figure 12] This is a schematic diagram showing a first deceleration determination condition according to one embodiment of the present application. [Figure 13] This is a schematic diagram showing a second deceleration determination condition according to one embodiment of the present application. [Figure 14] This is a schematic diagram showing a third deceleration determination condition according to one embodiment of the present application. [Figure 15] This is a schematic diagram showing a first acceleration determination condition according to one embodiment of the present application. [Figure 16] This is a schematic diagram showing a second acceleration determination condition according to one embodiment of the present application. [Figure 17] This is a schematic diagram showing a third acceleration determination condition according to one embodiment of the present application. [Figure 18] This is a flowchart of an autofocus control method according to one embodiment of the present invention. [Figure 19] Figure 18 illustrates how contrast-based autofocus operation can be performed according to the flow chart. [Figure 20] This is a schematic diagram of a module of an autofocus control device according to another embodiment of the present application. [Modes for carrying out the invention]
[0015] To further clarify the purpose, technical solutions, and advantages of the embodiments of this application, the technical solutions of the embodiments of this application will be described clearly and comprehensively below with reference to the drawings of the embodiments. Clearly, the embodiments described are only some, and not all, embodiments of this application. All other embodiments that a person skilled in the art could obtain without creative effort based on the embodiments of this application are all within the scope of protection of this application.
[0016] Unless otherwise defined, technical or scientific terms used herein have the ordinary meanings understood by those skilled in the art to which this application pertains. Terms such as “first,” “second,” etc., used herein are used to distinguish different objects and not to describe any particular order, number, or importance. Similarly, similar terms such as “one,” “one,” or “the aforementioned” are not used to indicate a limit on number but only to indicate the presence of at least one. Similar terms such as “equipment” or “includes” mean that a preceding part or item covers a subsequent part or item, or their equivalents, and does not exclude that part or item. Similar terms such as “connection” or “linking” may include electrical connections, whether direct or indirect, and are not limited to physical or mechanical connections.
[0017] The “embodiments” as used herein means that any particular features, structures, or characteristics described in conjunction with an embodiment may be included in at least one embodiment of this application. The term “embodiments” as used elsewhere in the specification does not necessarily refer to the same embodiment, nor do they represent mutually exclusive, independent, or optional embodiments. Those skilled in the art will understand, either expressly or implicitly, that the embodiments described herein can be combined with other embodiments.
[0018] Referring to Figure 1, Figure 1 is a schematic diagram of a module of an imaging device 1 according to one embodiment of the present application. The imaging device 1 may be a camera module of an electronic device or a camera. The imaging device 1 comprises an optical lens 11, an image sensor 12, a processor 13, a memory 14, and a focusing mechanism 15. The image sensor 12 is provided in correspondence with the optical lens 11, the image sensor 12 is connected to the processor 13, and the processor 13 is connected to the memory 14. The optical lens 11 includes at least a focusing lens 112 and an imaging lens 114. The focusing mechanism 15 is connected between the focusing lens 112 and the processor 13.
[0019] In some embodiments, the processor 13 may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor 13 can implement or execute various methods, steps, and logic block diagrams disclosed in embodiments of this application. The processor 13 may be an image processor, a microprocessor, or the processor may be any ordinary processor, etc. The steps of the methods disclosed in embodiments of this application may be executed and completed directly by a hardware decoding processor, or by a combination of hardware and software modules in a decoding processor. The memory 14 may be a random-access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, etc. The image sensor 12 may be a charge-coupled device (CCD) and a complementary metal-oxide-semiconductor (CMOS), etc. The memory 14 and the image sensor 12 are electrically connected separately to the processor 13. The focus adjustment mechanism 15 may be an electrical and transmission assembly, etc., but is not limited thereto.
[0020] In some embodiments, referring to Figure 2, the focusing mechanism 15 is configured to move the focus lens 112 along the optical axis of the optical lens 11 based on a predetermined amount of movement. This amount of movement is a control value output by the processor 13 to the focusing mechanism 15 to move the focus lens 112. The imaging lens 114 focuses the subject image onto the image sensor 12. While the optical lens 11 is moving, the image sensor 12 is configured to convert the light from the subject image into an image signal to generate multiple frames of RAW image data and output the multiple frames of image data to the processor 13. A computer program is stored in the memory 14. The processor 13 executes the computer program to perform the image processing process and the autofocus process. In the image processing process, image processing is performed on the multiple frames of image data, and the processed image data is obtained. The image processing may be, but is not limited to, shading correction processing, exposure processing, white balance processing, etc. The autofocus process is executed on the multiple frames of image data that have been image processed. In the focusing process, the focusing mechanism 15 drives the focusing lens 112 based on a predetermined amount of movement, and as the focusing lens 112 moves, the optical lens 11 scans the subject and generates image data for each lens position during the movement of the focusing lens. Since image data for multiple frames is generated when the focusing lens 112 is at different lens positions, the contrast values of each frame among the multiple image data may differ. Focusing is the process of determining the position of the focusing lens 112 when generating the image data for the single frame with the sharpest contrast, and this position is defined as the focus position. Furthermore, in the process of moving the focusing lens 112 to find the focus position, the focusing lens 112 may be moved multiple times until the focus position is found. Specifically, the autofocus process is This involves executing a contrast value calculation process, which is used to obtain the contrast value within the autofocus evaluation area of the image data for each lens position. The process involves executing an autofocus evaluation value calculation process, which is used to calculate an autofocus evaluation value based on the contrast value within the autofocus evaluation region of the image data for each lens position. The process involves executing an autofocus processing process, which is used to determine whether a peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data. If a peak value appears, the process determines the focus position of the focus lens 112 and controls the focus lens 112 to move to the focus position to complete the focusing process. If no peak value appears, proceed to the next process, i.e., The calculation involves determining the extreme values of the amount of movement, and this calculation includes determining the maximum and minimum amounts of movement. The process involves performing an acceleration / deceleration determination process, which determines the next movement amount of the focus lens 112, and that the next movement amount is between the maximum and minimum movement amounts. The process involves determining the focus position of the focus lens 112, controlling the focus lens 112 to move to the focus position, moving the focus lens 112 based on the determined next movement amount until focusing is complete, generating image data for each lens position during the movement of the focus lens, and repeating the contrast value calculation process, the autofocus evaluation value calculation process, and the autofocus processing process. Includes.
[0021] As can be seen, the autofocus process determines the focus position of the focus lens 112 and controls the focusing mechanism 15 to move the focus lens 112 along the optical axis of the optical lens 11 to the focus position, thereby completing the focusing. To understand this, the optical axis X of the optical lens is shown in Figure 2, and the optical axis X is the direction of the central axis of light propagation in the optical system, and is usually defined as the center line of the light beam (light column) or the axis of symmetry of the optical system.
[0022] In some embodiments, the processor 13 executes a computer program and also performs an image generation process. In the image generation process, some processing is performed based on the image data processed in the image processing process to generate output image data and output it.
[0023] In some embodiments, the processor 13 executes a computer program and further performs a face detection process. In the face detection process, if a face is included in a frame of image data, various facial feature data is detected from the image data output by the image generation process.
[0024] In some embodiments, referring to Figure 3, the processor 13 executes a computer program to perform the autofocus process shown in Figure 3. This autofocus process is the process of the autofocus control method. To make it clear, the process of the autofocus control method can be added to, subtracted from, or sequentially adjusted according to the actual needs, and is not limited herein. Specifically, the autofocus control method includes S31 to S38.
[0025] S31: The focus lens 112 is moved along the optical axis direction of the optical lens 11 based on the current amount of movement, and image data is generated for each lens position during the movement of the focus lens.
[0026] S32: Obtain the contrast value within the autofocus evaluation area of the image data for each lens position.
[0027] S33: The autofocus evaluation value is calculated based on the contrast value within the autofocus evaluation area of the image data for each lens position.
[0028] S34: Determine whether a peak value appears in the autofocus evaluation value within the autofocus evaluation area of the image data of each frame among the multiple frames of image data. If a peak value appears, proceed to step S35; if no peak value appears, proceed to step S36.
[0029] S35: The focus position of the focus lens 112 is determined, the focus lens 112 is controlled to move to the focus position to complete focusing, and then the process ends.
[0030] S36: Calculate the extreme values of the displacement. Calculating the extreme values of the displacement includes calculating the maximum and minimum displacement.
[0031] S37: The acceleration / deceleration determination process is performed. The acceleration / deceleration determination process determines the next movement amount of the focus lens 112, and the next movement amount is between the maximum movement amount and the minimum movement amount.
[0032] S38: Based on the determined next movement amount, the focus lens 112 is moved to generate image data for each lens position during the movement of the focus lens, and the process returns to step S32.
[0033] In this invention, if a peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data, the focus position of the focus lens 112 is determined, and the focus lens 112 is controlled to move to the focus position to complete focusing. If no peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data, the following is performed: The extreme value of the amount of movement is calculated, and calculating the extreme value of the amount of movement includes calculating the maximum and minimum amount of movement; an acceleration / deceleration determination process is performed, and the next amount of movement of the focus lens 112 is determined by the acceleration / deceleration determination process, and the next amount of movement is between the maximum and minimum amount of movement; the focus position of the focus lens 112 is determined, and the focus lens 112 is moved based on the determined next amount of movement until focusing is completed by controlling the focus lens 112 to move to the focus position, generating image data for each lens position during the movement of the focus lens, and the contrast value is acquired, the autofocus evaluation value is calculated, and the peak value is determined again. In this way, contrast-based autofocus improves the accuracy and speed of autofocus by appropriately setting the amount of movement of the focus lens 112. In the process of calculating the amount of movement of the focus lens 112 in the acceleration / deceleration process, the judgment conditions for the acceleration / deceleration process are organized to achieve quantitative adjustment that does not depend on the experience and skill of the adjuster.
[0034] Referring to Figure 4, which is a schematic diagram showing a specific flow of S37 according to one embodiment of the present application. As can be understood, the specific flow of S37 can be added to, removed from, or the sequence adjusted according to actual needs, and is not limited herein. Specifically, S37 includes S372 to S374.
[0035] S372: The acceleration / deceleration determination process is executed. The acceleration / deceleration determination process includes an acceleration determination process that determines whether acceleration is currently required and a deceleration determination process that determines whether deceleration is currently required. If it is determined that deceleration is required, S373 is executed; if it is determined that acceleration is required, S374 is executed.
[0036] S373: Based on the minimum and / or current movement, the next movement of the focus lens 112 is determined, and the process proceeds to S38.
[0037] S374: Based on the maximum and / or current movement, the next movement of the focus lens 112 is determined, and the process proceeds to S38.
[0038] In this configuration, the present invention executes an acceleration / deceleration determination process when it is determined that no peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data. If it is determined that deceleration is necessary, the next movement amount of the focus lens 112 is determined based on the maximum movement amount and / or the current movement amount, and the determined next movement amount of the focus lens 112 is set to decrease relative to the current movement amount. Alternatively, if it is determined that acceleration is necessary, the next movement amount of the focus lens 112 is determined based on the minimum movement amount and / or the current movement amount, and the determined next movement amount of the focus lens 112 is set to increase relative to the current movement amount. As a result, the focus lens 112 can be quickly moved to the focus position using the fastest and most stable movement method, thereby improving focusing accuracy and focusing speed.
[0039] In some embodiments, performing an acceleration / deceleration determination process includes first executing a deceleration determination process, and then executing an acceleration determination process. Referring to Figure 5, Figure 5 is a schematic diagram showing a specific flow of S372 according to one embodiment of the present application. To be understood, the specific flow of S372 can be added to, subtracted from, or the sequence adjusted according to actual needs, and is not limited herein. Specifically, S372 includes S3721 to S3723.
[0040] S3721: Execute the deceleration determination process. Deceleration determination is the process of determining whether the autofocus evaluation value in the autofocus evaluation region of each frame of image data among multiple frames is currently near the peak value. If the autofocus evaluation value is near the peak value, deceleration is necessary; if it is not near the peak value, deceleration is not necessary. Being near the peak value means that the autofocus evaluation value is not currently exceeded but is near the peak value, or that the autofocus evaluation value has been exceeded but is near the peak value. If it is determined that deceleration is necessary, execute S373; if it is determined that deceleration is not necessary, execute S3722.
[0041] S3722: Execute the acceleration determination process. Acceleration determination is the process of determining whether the autofocus evaluation value in the autofocus evaluation region of each frame of image data among multiple frames has moved away from the peak value. If it has moved away from the peak value, it is determined that acceleration is necessary and S374 is executed; otherwise, it is determined that acceleration is not necessary and S3723 is executed.
[0042] S3723: The system determines that the next movement of the focus lens 112 is equal to the current movement, and returns to S38. Here, being far from the peak value means that the distance to the peak value is greater than a preset value.
[0043] In this configuration, the present invention first executes a deceleration determination process, and then executes an acceleration determination process when it is determined that deceleration of the focus lens 112 is not necessary. When the value is near the peak, it is possible to quickly determine that deceleration is necessary and that there is no need to execute the acceleration determination process again, thereby reducing the amount of data calculation and enabling faster autofocus.
[0044] In some embodiments, referring to Figure 3, S36 specifically includes calculating the maximum amount of movement for the next movement of the focus lens 112.
[0045] In some embodiments, the maximum movement of the next movement of the focus lens 112 is determined based on the depth of field of the optical lens 11 and the relationship between the depth of field and the maximum movement. As shown in Table 1 and Figure 6, the maximum movement is determined based on the depth of field of the optical lens 11. Generally speaking, the in-focus position is the position of the optical lens 11 when the incident light from the subject converges to a single point on the focal plane. The forward depth of field indicates a position where the subject is located closer to the subject, and the incident light from the subject does not converge to a single point on the focal plane, but converges to an acceptable diameter of the circle of confusion. The backward depth of field indicates a position where the subject is located further away from the subject, and the incident light from the subject does not converge to a single point on the focal plane, but converges to an acceptable diameter of the circle of confusion. That is, as long as the subject is within the depth of field, an acceptable level of focus accuracy can be obtained even if the focal plane is shifted. In some embodiments, the maximum movement may be equal to the depth of field, but is not limited to this.
[0046] Referring to Table 1 below, Table 1 shows the relationship between subject distance, focus position, rear depth of field, front depth of field, and maximum movement in several embodiments. The far right column of Table 1 shows the maximum movement amount, calculated based on the rear and front depth of field, that keeps the subject almost within the depth of field even when the lens moves.
[0047] [Table 1]
[0048] When determining the amount of lens movement, the accuracy of autofocus can be ensured as long as the subject is within the depth of field based on the amount of lens movement. Therefore, the maximum amount of movement is calculated from the current lens position based on the maximum amount of movement in Table 1. For example, when the subject distance is 1.0m, the forward depth of field is 0.886m. This subject distance is not in Table 1, but the focus position at 0.886m is approximately 184 (focus position when the subject distance is 1m in Table 1) + 12 = 196.
[0049] In this way, when calculating the maximum amount of movement, the rear depth of field and the front depth of field of the optical lens 11 are sufficiently taken into consideration, and the accuracy of autofocus can be ensured.
[0050] S36 specifically includes calculating the minimum amount of movement for the next movement of the focus lens 112.
[0051] In some embodiments, in contrast-based autofocus, an autofocus evaluation value was calculated as the focus lens 112 scanned, and the position of the maximum autofocus evaluation value was set as the focus position. However, for low-luminance or low-contrast subjects, noise is superimposed on the autofocus evaluation value, and this noise may affect the accuracy of autofocus. Figure 7 illustrates scan data of autofocus evaluation values for low-luminance and low-contrast subjects. As shown in this data, noise is superimposed on the autofocus evaluation value, making it impossible to determine a clear peak position for the autofocus evaluation value. Clearly, if the noise is not negligible with respect to the autofocus evaluation value, it is preferable to operate the autofocus while taking the amount of noise into consideration. Therefore, the minimum movement amount is calculated based on the amount of noise superimposed on the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data. The amount of noise is determined based on the difference between the maximum and minimum values of the autofocus evaluation values within a certain period obtained when the position of the focus lens 112, which has been measured in advance, is fixed. This makes it possible to improve the accuracy and speed of autofocus at low contrast.
[0052] Specifically, Figure 8 illustrates how to obtain autofocus evaluation values for low-contrast subjects when the position of the focus lens 112 is fixed. Multiple coordinate points are generated in a two-dimensional coordinate system, using the autofocus evaluation values within the autofocus evaluation region of each frame of image data from multiple frames, and the position of the focus lens 112 corresponding to each autofocus evaluation value, as the vertical and horizontal coordinates, respectively. An approximation curve is obtained based on these multiple coordinate points. Here, the noise level is determined based on the difference between the maximum and minimum autofocus evaluation values. Alternatively, the standard deviation can be calculated and multiplied by a coefficient to obtain the noise level. Since the noise level depends on the gain applied to the output signal of the optical sensor, it can be measured with various gains, or it can be simply calculated from the gain during noise measurement and the gain during autofocus operation.
[0053] This approach ensures that the noise level of multiple frames of image data is adequately considered when calculating the minimum movement amount, improving the accuracy and speed of autofocus in low-contrast situations. Relatively low-contrast scenes may include, but are not limited to, exposure scenes or scenes with little ambient light. In some embodiments, when the noise level is high, movement near the focus position based on depth of field is meaningless, so the maximum movement amount is set to be greater than or equal to the minimum movement amount calculated based on the noise level, thereby determining the maximum and minimum movement amounts.
[0054] In some embodiments, the calculation of the minimum movement can be divided into two cases. The first case is when the focusing lens 112 is still away from the focus position, and the second case is when the focusing lens 112 is already near the focus position. Next, the method for calculating the minimum movement in these two cases will be described in detail.
[0055] First, we will explain how to calculate the minimum amount of movement in the first case (where the focus lens 112 is still away from the focus position).
[0056] Referring to Figure 9, which illustrates the method for calculating the minimum movement when the focus lens 112 is away from the focus position. In the figure, 401 shows the change in the autofocus evaluation value when noise is not superimposed, and 402 shows the change in the autofocus evaluation value when noise is superimposed. The noise originates from the external environment and circuit noise. Examples of external environment issues include, but are not limited to, light shot noise, which is a problem in low light conditions.
[0057] As can be seen from Figure 9, due to the superposition of noise, the autofocus evaluation value fluctuates up and down relative to the true autofocus evaluation value corresponding to the position of the focus lens 112. Autofocus is the process of moving the focus lens 112 in the direction that increases the autofocus evaluation value to find the peak position of the autofocus evaluation value. Therefore, it is necessary to check whether the autofocus evaluation value increases by moving the focus lens 112 from its current position. However, if the amount of noise is not negligible compared to the change in the autofocus evaluation value, and the amount of movement of the focus lens 112 is small, it may be impossible to determine whether the increase in the autofocus evaluation value is due to noise or a true increase in the autofocus evaluation value due to the movement of the focus lens 112. Therefore, the true increase in the autofocus evaluation value due to the movement of the focus lens 112 must be greater than the amount of noise. Accordingly, the formula for calculating the minimum amount of movement is given below. Minimum movement = Noise amount / Slope. The amount of noise is defined as described above. The slope is the ratio of the change in the autofocus evaluation value (F1) within one frame of image data to the amount of movement of the focus lens 112 (M1) within the same frame of image data.
[0058] In this way, in this invention, the minimum movement is equal to the ratio of the noise amount to the slope that indicates the change in the autofocus evaluation value. In calculating the minimum movement, the noise amount is taken into full consideration, and the true change in the autofocus evaluation value within the minimum movement of the focus lens 112 is made greater than the noise amount, thereby reducing the influence of noise on the change in the autofocus evaluation value. Since situations with a relatively large noise amount generally correspond to situations with relatively low contrast, the minimum movement amount set considering the noise amount is particularly suitable for low-contrast scenes, improving the accuracy and speed of autofocus in low-contrast or low-light conditions. Low-contrast or low-light scenes include, but are not limited to, long-exposure scenes and scenes with weak ambient light.
[0059] Referring to Figure 10, Figure 10 is a diagram illustrating the method for calculating the maximum movement limit value relative to the minimum movement amount when the focus lens 112 is considerably far from the focus position. When the focus lens 112 is considerably far from the focus position, the change in the autofocus evaluation value of the multiple frames of image data obtained by scanning the optical lens 11 is small, and the slope of the change in the autofocus evaluation value is small, so the minimum movement amount calculated as a result may be considerably large. In that case, a maximum movement limit value is set in advance, and if the minimum movement amount becomes larger than the maximum movement limit value, the minimum movement amount is set to the maximum movement limit value. The maximum movement limit value should be approximately 1 to 5 times the maximum movement amount obtained from the depth of field. Therefore, calculating the minimum movement amount based on the amount of noise superimposed on the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data further includes setting the minimum movement amount to the maximum movement amount limit if the calculated minimum movement amount is greater than the maximum movement amount limit, and the maximum movement amount limit is 1 to 5 times the maximum movement amount obtainable from within the depth of field of the optical lens.
[0060] Next, we will explain how to calculate the minimum amount of movement in the second case (when the focus lens 112 is near the focus position).
[0061] Referring to Figure 11, Figure 11 is a diagram illustrating the method for calculating the minimum movement when the focus lens 112 is near the peak position. Figure 11 shows autofocus evaluation values obtained by scanning a low-contrast subject near the peak value using the focus lens 112 in a low-luminance environment. The solid line shows the autofocus evaluation values obtained by scanning a low-contrast subject near the peak position using the focus lens in a low-luminance environment. The dotted line is a quadratic function approximation of the data shown by the solid line. As shown in Figure 11, in order to determine the focus position, the minimum movement is defined as the difference between the position of the focus lens 112 corresponding to the peak position P of the approximation curve and the position of the focus lens 112 corresponding to the position F where the noise level decreases from the peak position. Therefore, when the position of the focus lens 112 is far from the in-focus position, calculating the minimum displacement based on the amount of noise superimposed on the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data includes the minimum displacement being the difference between the position of the focus lens 112 corresponding to the peak position of the approximation curve and the position of the focus lens 112 corresponding to the position where the amount of noise has decreased from the peak position.
[0062] In this way, when the focus lens 112 is near the focus position, the minimum amount of movement is determined to be the difference between the position of the focus lens 112 corresponding to the peak position of the approximation curve and the position of the focus lens 112 corresponding to the position where the noise amount has decreased from the peak position. This allows for sufficient consideration of the influence of the noise amount on the autofocus evaluation value, thereby improving the accuracy of autofocus. Note that the measurement in Figure 11 is performed by changing the brightness, with brightness and minimum amount of movement set as adjustment data, and a low-contrast face is suitable as the measurement target.
[0063] In some embodiments, if the maximum amount of movement calculated based on depth of field is smaller than the minimum amount of movement calculated based on noise, the maximum amount of movement is replaced with an amount of movement equal to or greater than the minimum amount of movement.
[0064] If, depending on the shooting conditions, the maximum amount of movement calculated based on depth of field is smaller than the minimum amount of movement calculated based on noise level, it is presumed that the noise is high and moving the focus lens 112 based on depth of field near the focus position is meaningless. In this case, it is desirable to set the maximum amount of movement to the minimum amount of movement calculated based on noise level or greater, thereby determining the maximum and minimum amounts of movement. However, it is necessary to actually photograph low-light subjects to check the autofocus operation and make adjustments if there are any problems.
[0065] Next, the specific determination conditions for S3721 will be described in detail. In some embodiments, the deceleration determination conditions for S3721 include at least one of a first deceleration determination condition, a second deceleration determination condition, and a third deceleration determination condition. The first deceleration determination condition is that the rate of decrease from the maximum value of the autofocus evaluation value in the autofocus evaluation area of each frame of image data among multiple frames of image data exceeds a first specified value. The second deceleration determination condition is that the rate of decrease in the rate of increase of the autofocus evaluation value in the autofocus evaluation area of each frame of image data among multiple frames of image data exceeds a second specified value. The third deceleration determination condition is that the rate of increase of the autofocus evaluation value in the autofocus evaluation area of each image data among all image data from the start of the focus operation is equal to or greater than a third specified value.
[0066] The first deceleration determination condition is that if the rate of decrease from the maximum value of the autofocus evaluation value in the autofocus evaluation area of each frame of image data among multiple frames of image data exceeds a first specified value, it indicates that the focus lens 112 has already moved beyond the focus position, and deceleration movement is necessary to prevent it from moving away from the focus position again. The second deceleration determination condition is that if the rate of decrease in the rate of increase of the autofocus evaluation value in the autofocus evaluation area of each frame of image data among multiple frames of image data exceeds a second specified value, it indicates that the focus lens 112 has not yet moved beyond the focus position but is already near the focus position. The third deceleration determination condition is that the rate of increase of the autofocus evaluation value in the autofocus evaluation area of each image data among all image data from the start of the focus operation is greater than or equal to a third specified value. Based on any one of the above first, second, and third deceleration determination conditions, it is possible to determine whether the focus lens 112 is near the focus position (i.e., whether the autofocus evaluation value in the autofocus evaluation area of each frame of image data among multiple frames of image data is near the peak value). If the focus lens 112 is near the focus position, it is determined that deceleration is necessary, and when the focus lens 112 is near the focus position, it is prevented from continuing to accelerate and overshooting the focus position before moving away from it again. This shortens the focusing time and improves the focusing speed.
[0067] Referring to Figure 12, which is a schematic diagram showing a first deceleration determination condition according to one embodiment of the present invention. In Figure 12, when the focus lens 112 exceeds the focus position, the autofocus evaluation value decreases from the maximum value. FV_max is the maximum autofocus evaluation value, and FV_drop is the autofocus evaluation value after the decrease. The first deceleration determination condition (the first deceleration determination condition is when the rate of decrease from the maximum value of the autofocus evaluation value in the autofocus evaluation area of the image data of each frame among the multiple frames of image data exceeds a first specified value) may, but is not limited to, a decrease rate (d%) > decrease threshold. The decrease rate (d%) = (FV_max - FV_drop) / FV_max. The first specified value may, but is not limited to, a decrease threshold. The decrease threshold in the first deceleration determination condition can be the larger of the noise amount ratio or 5%. The noise amount ratio = noise amount / autofocus evaluation value, and the noise amount is calculated by referring to the above explanation, so it will not be repeated here. 5% is a typical value usually used for brightness. To make it easier to understand, the deceleration threshold can be adjusted according to actual needs.
[0068] Referring to Figure 13, Figure 13 is a schematic diagram showing a second deceleration determination condition according to one embodiment of the present application. In Figure 13, the second deceleration determination condition (the second deceleration determination condition is that the decrease in the rate of increase of the autofocus evaluation value within the autofocus evaluation area of the image data of each frame among the multiple frames of image data exceeds a second specified value) may, but is not limited to, the decrease in the rate of increase between the rate of increase of the previous frame and the rate of increase of the current frame being greater than or equal to the deceleration threshold. Specifically, the second deceleration determination condition is that the rate of increase of the previous frame (+a%) - the rate of increase of the current frame (+b%) ≥ the deceleration threshold. The autofocus evaluation value at point A is FV_A, the autofocus evaluation value at point B is FV_B, the autofocus evaluation value at point C is FV_C, the rate of increase of the previous frame (+a%) = (FV_B - FV_A) / FV_A, and the rate of increase of the current frame (+b%) = (FV_C - FV_B) / FV_B. The deceleration threshold for the second deceleration determination criterion can be the greater of the noise ratio or 5%. Here, the noise ratio is calculated by referring to the above formula, and 5% is a typical value usually used for luminance. As can be understood, the deceleration threshold can be adjusted according to the actual needs.
[0069] Referring to Figure 14, Figure 14 is a schematic diagram showing a third deceleration determination condition according to one embodiment of the present application. In Figure 14, the third deceleration determination condition (the third deceleration determination condition is that the rate of increase of the autofocus evaluation value in the autofocus evaluation area of each image data out of all image data from the start of the focus operation is greater than or equal to a third specified value) may, but is not limited to, the ratio of the difference between the maximum and minimum values of the autofocus evaluation value from the start of the focus operation to the maximum value is greater than the increase threshold. The maximum value of the autofocus evaluation value is FV_max, the minimum value of the autofocus evaluation value is FV_min, and the rate of increase = (FV_max - FV_min) / FV_max ≥ increase threshold. Here, the maximum value of the rate of increase is the rate of increase when FV_max is equal to the peak value of the autofocus evaluation value. The increase threshold may, but is not limited to, 2 / 3 of the maximum value of the rate of increase. The rate of increase is calculated based on the maximum and minimum values of the autofocus evaluation value of the scan data, and the increase threshold is set to 2 / 3 of the maximum value of the rate of increase, but is not limited to this. The scan data is obtained by calculating the minimum movement of a low-contrast and low-luminance subject. Two-thirds of the data considers cases where autofocus operation starts from a position less than one-third of the maximum autofocus evaluation value where acceleration is considered necessary. For clarity, the rising threshold can be adjusted according to actual needs.
[0070] In some embodiments, if the deceleration determination process determines that deceleration movement is necessary, determining the next movement amount of the focus lens 112 is at least one of the following (1), (2), or (3). (1) Determine that the next movement of the focus lens 112 is the minimum movement. (2) Determine that the next movement of the focus lens 112 is half of the current movement. (3) Determine that the next amount of movement of the focus lens 112 is the current amount of movement minus n, which is an integer greater than or equal to 1. Half of the current amount of movement is less than the current amount of movement minus n.
[0071] For example, if the first deceleration condition is met, it is determined that the next movement of the focus lens 112 will be the minimum movement. If the second deceleration condition is met, it is determined that the next movement of the focus lens 112 will be half of the current movement. If the third deceleration condition is met, it is determined that the next movement of the focus lens 112 will be the current movement minus n, an integer greater than or equal to 1. To make it clear, the first, second, and third deceleration conditions can be arbitrarily combined with the above three methods for determining the next movement of the focus lens 112 when it is determined that deceleration is necessary. For example, if the first deceleration condition is met, it is determined that the next movement of the focus lens 112 will be half of the current movement. If the second deceleration condition is met, it is determined that the next movement of the focus lens 112 will be the current movement minus n, an integer greater than or equal to 1. If the third deceleration determination condition is met, it is determined that the next movement amount of the focus lens 112 is the minimum movement amount. Note that this specification does not limit the specifics, and specific adjustments should be made according to actual needs.
[0072] In some embodiments, when the deceleration determination process is being executed, if it is determined that deceleration movement is necessary and the focus lens 112 is near the focus position, if the difference between the next movement amount determined in (1) or the next movement amount determined in (2) and the current movement amount is greater than a preset value, it is determined that the next movement amount is the next movement amount determined in (3).
[0073] Next, the acceleration determination conditions of S3722 will be described in detail in some embodiments. The acceleration determination conditions of S3722 include at least one of the first acceleration determination conditions, the second acceleration determination conditions, and the third acceleration determination conditions. The first acceleration determination condition is that the current amount of movement of the focus lens 112 is less than or equal to the currently determined minimum amount of movement of the focus lens 112. The second acceleration determination condition is that, within the image data of a preset frame, the rate of increase of the autofocus evaluation value in the autofocus evaluation area of the image data of each frame among the image data of adjacent frames is less than a fourth specified value. The third acceleration determination condition is that the number of consecutive frames among the image data of multiple frames for which acceleration processing is not performed exceeds a fifth specified value.
[0074] The first acceleration determination condition is that if the current amount of movement of the focus lens 112 is less than or equal to the currently determined minimum amount of movement of the focus lens 112, it indicates that the movement speed of the focus lens 112 is too slow. The second acceleration determination condition is that, within the image data of a preset frame, if the rate of increase of the autofocus evaluation value within the autofocus evaluation area of each frame of image data among the image data of adjacent frames is less than the fourth specified value, it indicates that the focus lens 112 is quite far from the focus position, and therefore the change in the autofocus evaluation value is small. The third acceleration determination condition is that if the number of consecutive frames of image data that are not subjected to acceleration processing among the image data of multiple frames exceeds the fifth specified value, it indicates that the focus lens 112 is quite far from the focus position, and therefore the change in the autofocus evaluation value is small. Based on any one of the first, second, or third acceleration determination conditions described above, it can be determined that the focus lens 112 is far from the focus position (i.e., no peak value appears in the autofocus evaluation value within the autofocus evaluation area of the image data of each frame among the multiple frames of image data), or that the movement speed is too slow and therefore acceleration is necessary. This allows for a further reduction in the focusing time.
[0075] Referring to Figure 15, which is a schematic diagram showing a first acceleration determination condition according to one embodiment of the present invention. The first acceleration determination condition (the current amount of movement of the focus lens 112 is less than or equal to the minimum amount of movement) may be: rate of increase (a%) < noise amount ratio. Rate of increase (a%) = increase in autofocus evaluation value / autofocus evaluation value, and noise amount ratio = noise amount / autofocus evaluation value. The noise amount is an actual value calculated with reference to Figure 8.
[0076] Referring to Figure 16, which is a schematic diagram showing a second acceleration determination condition according to one embodiment of the present invention. The second acceleration determination condition (within the image data of a preset frame, the rate of increase of the autofocus evaluation value in the autofocus evaluation region of each frame among the image data of adjacent frames is smaller than the fourth specified value) is that the rate of change of the autofocus evaluation value within a specific number of past frames is smaller than the rate of change threshold. In other words, the autofocus evaluation value is flat or the increase or decrease state is not clear. For example, in Figure 16, the rate of change in the image data of the second frame (a%) < rate of change threshold, the rate of change in the image data of the third frame (b%) < rate of change threshold, and the rate of change in the image data of the fourth frame (c%) < rate of change threshold. Here, the rate of change threshold is the larger of the noise ratio or 10%, and 10% is a typical value that is usually used for brightness.
[0077] Referring to Figure 17, which is a schematic diagram showing a third acceleration determination condition according to one embodiment of the present application. The third acceleration determination condition (the number of consecutive frames of image data that are not subjected to acceleration processing among multiple frames of image data exceeds a fifth specified value) is that the number of movements exceeds the threshold for the number of movements under the initial lens movement amount. In some embodiments, since the threshold for the number of movements n=3, it is necessary to adjust the acceleration and deceleration with the goal of completing the autofocus operation within a predetermined number of movements, for example, within 10 movements, and in this way the autofocus operation can be completed quickly and accurately. As can be understood, in other embodiments, the threshold for the number of movements can be adjusted according to the actual needs.
[0078] In some embodiments, if the acceleration determination process determines that acceleration movement is necessary, determining the next movement amount of the focus lens 112 is at least one of the following (1), (2), and (3). (1) Determine that the next movement of the focus lens 112 is the maximum movement. (2) The next amount of movement of the focus lens 112 is determined to be m times the current amount of movement, where m is a real number of 1 or more. (3) The next amount of movement of the focus lens 112 is determined to be the current amount of movement plus n, which is an integer of 1 or more. m times the current amount of movement is greater than the current amount of movement plus n, and m times the current amount of movement is less than or equal to the determined maximum amount of movement.
[0079] If the first acceleration condition is met, it is determined that the next movement of the focus lens 112 will be the maximum movement. If the second acceleration condition is met, it is determined that the next movement of the focus lens 112 will be m times the current movement, where m is a real number greater than or equal to 1. If the third acceleration condition is met, it is determined that the next movement of the focus lens 112 will be the current movement plus n, an integer greater than or equal to 1. As can be understood, the first, second, and third acceleration conditions can be arbitrarily combined with the above three methods for determining the next movement of the focus lens 112 when it is determined that accelerated movement is necessary. For example, if the first acceleration condition is met, it is determined that the next movement of the focus lens 112 will be m times the current movement, where m is a real number greater than or equal to 1. If the second acceleration condition is met, it is determined that the next movement of the focus lens 112 will be the current movement plus n, an integer greater than or equal to 1. If the third acceleration determination condition is met, it is confirmed that the next movement amount of the focus lens 112 is the maximum movement amount. There are no particular limitations here, and specific adjustments will be made according to the actual needs.
[0080] In some embodiments, S32 includes the following: The image sensor 12 generates a single frame of RAW image data for each pixel, corresponding to the optical image of the subject focused by the imaging lens. Image processing is performed on this single frame of RAW image data. The contrast value and brightness evaluation value within the autofocus evaluation region of the RAW image data for each frame are calculated. The autofocus evaluation value of this single frame of RAW image data is calculated using the contrast value and brightness evaluation value within the autofocus evaluation region of the RAW image data for each frame through correction processing and weighted calculation processing.
[0081] Referring to Figure 18, which is a flowchart of an autofocus control method according to one embodiment of the present invention. As can be understood, the processes of the autofocus control method can be added to, subtracted from, or sequentially adjusted according to actual needs, and are not limited herein. Specifically, the autofocus control method includes S1701 to S1714.
[0082] S1701: Initial settings are performed. Initial settings include, but are not limited to, setting the focus operation mode, setting the autofocus evaluation frame, setting the operating range of the focus lens 112, setting the initial position of the focus lens 112, and setting the initial movement direction of the focus lens 112. Among these, the focus operation mode includes single focus mode (AF-S), continuous focus mode (AF-C), autofocus mode (AF-A), etc. The autofocus evaluation frame is set to determine an appropriate autofocus evaluation area based on the user's selection or the result of the processor 13's automatic determination. The initial position of the focus lens 112 is the position of the focus lens 112 before the start of its focusing movement. The initial movement direction of the focus lens 112 is the direction in which the initial focus lens 112 is moved, and is generally moved in the direction that increases the autofocus evaluation value.
[0083] Regarding the setting of the operating range of the focus lens 112, specifically, the total movement range of the focus lens 112 is determined based on the depth of field of the optical lens 11 and / or subject information. The total movement range includes a far-side boundary value and a near-side boundary value. The far-side boundary value refers to the boundary value at which the focus lens 112 moves toward the side where the focus position of the focus lens 112 is farther away from the user, and the near-side boundary value refers to the boundary value at which the focus lens 112 moves toward the side where the focus position of the focus lens 112 is closer to the user. For example, in Table 1, if the subject distance is 10m and the rear depth of field is infinity, subjects farther than 10m are within the depth of field, so there is no need to move the focus lens 112 to a more distant position to scan for the focus position. Therefore, the far-side boundary value should be set within the range of 120. On the other hand, the setting of the near-side boundary value must include the camera performance specification distance. The lens module in Table 1 has a performance specification of 0.1m, but at the near point, the amount of lens movement relative to the subject distance becomes considerably large, making it meaningless to set the near-field boundary value based on depth of field. Therefore, the near-field boundary value is usually set to a value that adds a certain margin to the near position (850) in Table 1. For example, in order to detect the peak position of a subject located at 0.1m, the near-field boundary value needs to be set to several times the maximum amount of lens movement. When the subject is a face, it is possible to set the near-field boundary value to be larger than the near-field distance specified in the camera's performance specifications. For example, if the subject distance is 0.3m or more, that is, if shooting of faces less than 0.3m from the subject is unnecessary, the operating range can be limited to 351 or less, which allows for faster autofocus operation.
[0084] S1702: The focus adjustment mechanism 15 moves the focus lens 112 to its initial position.
[0085] S1703: Processes autofocus-related data necessary for autofocus operation and obtains an autofocus evaluation value for the image data at the current position. Specifically, the autofocus-related data may include, but is not limited to, the movement range of the focus lens 112, the start conditions for autofocus operation, the end conditions for autofocus operation, the size of the autofocus evaluation area, and the number of frame divisions of the autofocus evaluation area. The autofocus-related data also includes exposure information, which may include, but is not limited to, sensor gain and exposure time. The autofocus-related data also includes noise information originating from the external environment and circuit noise. The external environment includes, but is not limited to, light shot noise, which is a problem in low light conditions.
[0086] S1704: Peak value determination is performed. Specifically, the focus adjustment mechanism 15 moves the focus lens 112 based on the determined current amount of movement. During the process of moving the focus lens 112, the autofocus evaluation value of the autofocus evaluation area of the image data of each frame among several frames of image data is obtained, and it is determined whether or not a peak value appears in the autofocus evaluation value of the image data of each frame among several frames of image data. If a peak value appears, proceed to S1705. Otherwise, proceed to S1707.
[0087] S1705: Calculate the focus position. Specifically, the autofocus evaluation value within the autofocus evaluation area of each frame of image data from among multiple frames of image data, and the position of the focus lens 112 corresponding to each autofocus evaluation value, are used as the vertical and horizontal coordinates to generate multiple coordinate points in a two-dimensional coordinate system. An approximation curve is obtained based on the multiple coordinate points, and the horizontal coordinate corresponding to the peak position of the approximation curve is determined as the focus position.
[0088] S1706: Move the focus lens 112 to the focus position to complete the focusing process.
[0089] S1707: Calculate the minimum / maximum movement. Specifically, the maximum movement of the focus lens 112 for the next movement is determined according to the depth of field of the optical lens 11 and the relationship between the depth of field and the maximum movement. The minimum movement is calculated based on the amount of noise superimposed on the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data. When the focus lens 112 is away from the focus position, the formula for calculating the minimum movement is minimum movement = noise amount / slope. Here, the noise amount is determined based on the difference between the maximum and minimum values of the autofocus evaluation values obtained within a certain period of time when the position of the focus lens 112, which has been measured in advance, is fixed, and the slope is the ratio of the change in the autofocus evaluation value of one frame of image data (F1) to the amount of movement of the focus lens 112 within that one frame of image data (M1). If the calculated minimum movement is greater than the maximum movement limit, the minimum movement is set as the maximum movement limit, and the maximum movement limit is 1 to 5 times the maximum movement obtainable within the depth of field of the optical lens 11. When the focus lens 112 is near the peak position, the minimum movement is the difference between the position of the focus lens 112 corresponding to the peak position of the approximation curve and the position of the focus lens 112 corresponding to the position where the noise amount has decreased from the peak position.
[0090] S1708: Perform a deceleration determination process. Deceleration determination means determining whether the autofocus evaluation value in the autofocus evaluation area within the image data of multiple frames is currently near the peak value, based on the trend of change in the autofocus evaluation value within the autofocus evaluation area within the image data of multiple frames. If it is determined that the autofocus evaluation value is near the peak value, deceleration is necessary. If the autofocus evaluation value is not near the peak value, deceleration is not necessary. In some embodiments, the deceleration determination conditions include at least one of a first deceleration determination condition, a second deceleration determination condition, and a third deceleration determination condition. The first deceleration determination condition is that the rate of decrease from the maximum value of the autofocus evaluation value in the autofocus evaluation area of the image data of each frame among the multiple frames of image data exceeds a first specified value. The second deceleration determination condition is that the rate of increase of the autofocus evaluation value in the autofocus evaluation area of each image data of all image data from the start of the focus operation is greater than or equal to a third specified value.
[0091] If it is determined that deceleration is necessary, proceed to S1709. If it is determined that deceleration is not necessary, proceed to S1710.
[0092] S1709: Calculate the next amount of movement for deceleration, set a peak mark, record that the focus lens 112 is already near the peak value, and proceed to S1714.
[0093] In some embodiments, if the deceleration determination process determines that deceleration movement is necessary, determining the next movement amount of the focus lens 112 is at least one of the following (1), (2), or (3). (1) Determine that the next movement of the focus lens 112 is the minimum movement. (2) Determine that the next movement of the focus lens 112 is half of the current movement. (3) Determine that the next amount of movement of the focus lens 112 is the current amount of movement minus n, which is an integer greater than or equal to 1. Half of the current amount of movement is less than the current amount of movement minus n.
[0094] The next amount of movement of the focus lens 112, which is determined when deceleration is deemed necessary, is determined based on the minimum amount of movement or the current amount of movement. When the deceleration determination process is being executed, if it is determined that deceleration is necessary and the focus lens 112 is near the focus position, if the difference between the next amount of movement determined in (1) or (2) and the current amount of movement is greater than a preset value, it is determined that the next amount of movement is the next amount of movement determined in (3).
[0095] S1710: Determine whether the value is near the peak value. To make it easier to understand, if it is determined in S1708 that the deceleration condition is met, it is indicated that the autofocus evaluation value within the autofocus evaluation area of the image data acquired by the focus lens 112 is near the peak value. If this is the case, a peak mark is set in S1709. If it is determined in S1708 that the deceleration condition is not met, the process proceeds to S1710. In S1710, there are two cases where the deceleration condition is not met. The first is when the deceleration condition is not met and the value is not near the peak value. The second is when the deceleration condition is not met, but the value is near the peak value. Therefore, determining whether the value is near the peak value in S1710 is actually determining whether there is a peak mark. If there is a peak mark, proceed to S1711; otherwise, proceed to S1712.
[0096] S1711: The next movement amount of the focus lens 112 is determined to be the current movement amount, and the process proceeds to S1714.
[0097] S1712: Perform the acceleration determination process. In some embodiments, acceleration determination means determining whether the current value is moving away from the peak value based on the trend of change in the autofocus evaluation value in the autofocus evaluation area of the image data of multiple frames. In some embodiments, the acceleration determination conditions include at least one of a first acceleration determination condition, a second acceleration determination condition, and a third acceleration determination condition. The first acceleration determination condition is that the current amount of movement of the focus lens 112 is less than or equal to the currently determined minimum amount of movement of the focus lens 112. The second acceleration determination condition is that, within the image data of a preset frame, the rate of increase in the autofocus evaluation value in the autofocus evaluation area of each frame of image data among the image data of adjacent frames is less than a fourth specified value. The third acceleration determination condition is that the number of consecutive frames of image data that are not subjected to acceleration processing among the image data of multiple frames exceeds a fifth specified value.
[0098] If acceleration is deemed necessary, proceed to S1713. If acceleration is not deemed necessary, proceed to S1711.
[0099] S1713: Calculate the next distance traveled after acceleration.
[0100] In some embodiments, if the acceleration determination process determines that acceleration movement is necessary, determining the next movement amount of the focus lens 112 is at least one of the following (1), (2), and (3). (1) Determine that the next movement of the focus lens 112 is the maximum movement. (2) The next amount of movement of the focus lens 112 is determined to be m times the current amount of movement, where m is a real number of 1 or more. (3) The next amount of movement of the focus lens 112 is determined to be the current amount of movement plus n, which is an integer of 1 or more. m times the current amount of movement is greater than the current amount of movement plus n, and m times the current amount of movement is less than or equal to the determined maximum amount of movement.
[0101] If acceleration of the focus lens 112 is deemed necessary, the next determined amount of movement is determined based on the maximum amount of movement or the current amount of movement.
[0102] S1714: The focus adjustment mechanism 15 moves the focus lens 112 based on the next determined amount of movement, and the process returns to S1703.
[0103] In this invention, there are three cases when it is determined that the peak value has not been reached. The first case is when the deceleration condition is met and the next movement amount of the determined focus lens 112 is less than the current movement amount. The second case is when the acceleration condition is met and the next movement amount of the determined focus lens 112 is greater than the current movement amount. The third case is when neither the deceleration condition nor the acceleration condition is met and the next movement amount of the determined focus lens 112 is equal to the current movement amount. Furthermore, when it is determined that the peak value has not been reached, the maximum and minimum movement amounts of the next movement of the focus lens 112 are also calculated in advance, and the next movement amount that satisfies the deceleration condition is determined based on the current movement amount or minimum movement amount, and the next movement amount that satisfies the acceleration condition is determined based on the current movement amount or maximum movement amount. This eliminates the need to rely on the operator's experience and improves the accuracy and speed of autofocus.
[0104] Next, Figure 19 illustrates the contrast-based autofocus operation following the flow in Figure 18. In Figure 19, the leftmost position is the starting position of the autofocus operation. After two acceleration processes are performed to reach the peak position (focus position), two deceleration processes are performed.
[0105] Therefore, according to this invention, the accuracy and speed of autofocus can be appropriately controlled. This is particularly effective in low-light photography where noise becomes significant to the autofocus evaluation value when photographing low-contrast subjects such as faces.
[0106] Referring to Figure 20, which is a schematic diagram of a module of an autofocus control device 200 according to another embodiment of the present application, the autofocus control device 200 comprises a scan control module 210, a contrast value calculation module 220, an autofocus evaluation value determination module 230, a peak value determination module 240, a focus control module 250, a movement amount determination module 260, and an acceleration / deceleration determination module 270. The scan control module 210 is configured to move the focus lens 112 along the optical axis direction of the optical lens based on the current movement amount and to generate image data for each lens position during the movement of the focus lens. The contrast value calculation module 220 is configured to determine the contrast value within the autofocus evaluation region of the image data for each lens position. The autofocus evaluation value determination module 230 is configured to calculate an autofocus evaluation value based on the contrast value within the autofocus evaluation region of the image data for each lens position. The peak value determination module 240 is configured to determine whether or not a peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among multiple frames of image data. The focus control module 250 is configured to determine the focus position of the focus lens 112 when a peak value is present, and to control the focus lens 112 to move to the focus position to complete focusing. The movement amount determination module 260 is configured to calculate the extreme value of the movement amount when a peak value is not present, and calculating the extreme value of the movement amount includes calculating the maximum and minimum movement amounts. The acceleration / deceleration determination module 270 is configured to perform an acceleration / deceleration determination process when a peak value is not present, and the acceleration / deceleration determination process determines the next movement amount of the focus lens 112, which is between the maximum and minimum movement amounts.The scan control module 210 is configured to move the focus lens 112 based on the determined next movement amount and generate image data for each lens position during the movement of the focus lens. During this period, the contrast value calculation module 220 is configured to recalculate the contrast value, the autofocus evaluation value determination module 230 is configured to recalculate the autofocus evaluation value, and the peak value determination module 240 is configured to redetermine the peak value. After determining the focus position of the focus lens 112, the focus control module 250 is configured to further control the focus lens 112 to move to the focus position to complete the focusing.
[0107] In some embodiments, the software module of the autofocus control device 200 may reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. This storage medium is located in memory 14, and for example, the processor 13 can read application programs, computer instructions, or data in memory 14 and, in combination with the hardware, complete the process of the above method executed by the autofocus control device.
[0108] The present invention further provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor 13, the process of the autofocus control method is realized. The computer-readable storage medium may be a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, or other storage medium.
[0109] For the sake of simplicity, the embodiments of each of the above methods are expressed as a combination of a series of operations. However, it should be understood by those skilled in the art that this application is not limited to the order of operations described, and that several steps can be performed in other orders or simultaneously based on this application. Furthermore, it should be understood by those skilled in the art that all embodiments described in the specification are preferred embodiments, and such operations and modules are not necessarily required for this application.
[0110] In the embodiments described above, each embodiment has its own emphasis. For aspects not explained in detail in one embodiment, you can refer to the relevant descriptions in other embodiments.
[0111] The steps of the method in the embodiments of this application can be sequentially adjusted, combined, and deleted according to actual needs.
[0112] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing the relevant hardware. The computer program can be stored in a computer-readable storage medium. When executed, the computer program can implement the processes of each of the above embodiments. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0113] Each of the embodiments described above is used solely to illustrate the technical proposal of this application and is not intended to limit the technical proposal of this application. Although this application has been described in detail with reference to each of the embodiments described above, those skilled in the art should understand the following: Those skilled in the art may still modify the technical proposal described in each of the embodiments above, or make equivalent substitutions for some of these technical features, and such modifications or substitutions will not cause the essence of the corresponding technical proposal to deviate from the scope of the technical proposal of each embodiment of this application.
Claims
1. An autofocus control method, The autofocus control method is applied to an imaging device including an optical lens, the optical lens including a focusing lens and an imaging lens, and the autofocus control method is The focusing lens is moved along the optical axis direction of the optical lens based on the current amount of movement, and image data is generated for each lens position during the movement of the focusing lens. To obtain the contrast value within the autofocus evaluation area of the image data for each lens position, The autofocus evaluation value is calculated based on the contrast value within the autofocus evaluation area of the image data for each lens position. To determine whether or not a peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data, If a peak value is present, the focus position of the focus lens is determined, and the focus lens is controlled to move to the focus position to complete the focusing process. If the peak value is not present, The calculation of the extreme values of the amount of movement, and the calculation of the extreme values of the amount of movement as described above, includes calculating the maximum amount of movement and the minimum amount of movement. The process involves performing an acceleration / deceleration determination process, wherein the acceleration / deceleration determination process determines the next movement amount of the focus lens, and the next movement amount is between the maximum movement amount and the minimum movement amount. The process involves determining the focus position of the focus lens, controlling the focus lens to move to the focus position until focusing is complete, moving the focus lens based on the determined next movement amount, generating image data for each lens position during the movement of the focus lens, and again obtaining the contrast value, calculating the autofocus evaluation value, and determining the peak value. including, An autofocus control method characterized by the following.
2. The calculation of the maximum displacement described above includes determining the maximum displacement based on the depth of field of the optical lens and the relationship between the depth of field and the maximum displacement. The autofocus control method according to feature 1.
3. Calculating the minimum displacement as described above is The minimum movement amount is calculated based on the amount of noise superimposed on the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data, wherein the amount of noise is determined based on the difference between the maximum and minimum values of the autofocus evaluation values obtained within a certain period of time when the position of the focus lens is fixed, and / or If the maximum amount of movement is less than the minimum amount of movement, replace the maximum amount of movement with an amount of movement equal to or greater than the minimum amount of movement. including, The autofocus control method according to feature 1.
4. The autofocus control method is, The subject is scanned in advance to obtain autofocus evaluation values, The autofocus evaluation value within the autofocus evaluation region of each frame of the image data among the multiple frames of image data, and the position of the focus lens corresponding to each of the autofocus evaluation values, are used as vertical and horizontal coordinates to generate multiple coordinate points in a two-dimensional coordinate system, respectively. This includes obtaining an approximate curve based on the aforementioned plurality of coordinate points, Calculating the minimum movement amount based on the amount of noise superimposed on the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data described above is: When the focusing lens is near the focus position, the minimum amount of movement is determined based on the difference between the position of the focusing lens corresponding to the peak position of the approximation curve and the position of the focusing lens corresponding to the position where the noise amount has decreased from the peak position. The autofocus control method according to feature 3.
5. The autofocus control method is, This includes generating multiple coordinate points in a two-dimensional coordinate system, where the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data, and the position of the focus lens corresponding to each of the autofocus evaluation values, are used as the vertical and horizontal coordinates, respectively. Calculating the minimum movement amount based on the amount of noise superimposed on the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data described above is: If the focusing lens is away from the focus position, the minimum amount of movement is determined based on the ratio of the noise amount to the tilt, wherein the tilt is the ratio of the change in the autofocus evaluation value (F1) in the image data of one frame to the amount of movement of the focusing lens (M1) in the image data of one frame. The autofocus control method according to feature 3.
6. Calculating the minimum movement amount based on the amount of noise superimposed on the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data described above is: If the calculated minimum movement amount is greater than the maximum movement amount limit, the minimum movement amount is further set to the maximum movement amount limit. The aforementioned maximum travel limit is 1 to 5 times the maximum travel amount obtainable within the depth of field of the optical lens. The autofocus control method according to feature 5.
7. The acceleration / deceleration determination process determines the next movement amount of the focus lens, If the acceleration / deceleration determination process determines that acceleration is necessary, the next movement amount of the focus lens is determined based on the maximum movement amount and / or the current movement amount. If the acceleration / deceleration determination process determines that deceleration is necessary, the next amount of movement of the focus lens is determined based on the minimum amount of movement and / or the current amount of movement, The autofocus control method according to feature 1.
8. The acceleration / deceleration determination process includes an acceleration determination process that determines whether or not accelerated movement is currently necessary, and a deceleration determination process that determines whether or not decelerated movement is currently necessary. The autofocus control method according to feature 7.
9. Performing the aforementioned acceleration / deceleration determination process means This includes first executing the deceleration determination process, and then executing the acceleration determination process. The autofocus control method according to feature 8.
10. When executing the deceleration determination process, the determination conditions of the deceleration determination process include at least one of the first deceleration determination condition, the second deceleration determination condition, and the third deceleration determination condition. The first deceleration determination condition is that the rate of decrease from the maximum value of the autofocus evaluation value within the autofocus evaluation region of each frame of the image data among the multiple frames of image data exceeds a first specified value. The second deceleration determination condition is that the rate of increase of the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data exceeds a second specified value. The third deceleration determination condition is that the rate of increase of the autofocus evaluation value in the autofocus evaluation area of each image data among all image data from the start of the focus operation is equal to or greater than the third specified value. The autofocus control method according to feature 8.
11. If the deceleration determination process determines that deceleration is necessary, the next amount of movement of the focus lens is determined as follows: (1) It is determined that the next movement of the focus lens is the minimum movement, (2) It is determined that the next amount of movement of the focus lens is half of the current amount of movement, (3) The next amount of movement of the focus lens is determined to be the current amount of movement minus n, which is an integer of 1 or more. At least one of the following: Half of the current amount of movement is less than the value obtained by subtracting n from the current amount of movement. The autofocus control method according to feature 8.
12. The autofocus control method further includes, when executing the deceleration determination process, determining that deceleration movement is necessary and the focus lens is near the focus position, and if the difference between the next movement amount determined in (1) or the next movement amount determined in (2) and the current movement amount is greater than a preset value, determining that the next movement amount is the next movement amount determined in (3). The autofocus control method according to feature 11.
13. When executing the acceleration determination process, the determination conditions of the acceleration determination process include at least one of the first acceleration determination condition, the second acceleration determination condition, and the third acceleration determination condition. The first acceleration determination condition is that the current amount of movement of the focus lens is less than or equal to the currently determined minimum amount of movement of the focus lens. The second acceleration determination condition is that, within the image data of a pre-set frame, the rate of increase in the autofocus evaluation value within the autofocus evaluation region of each frame's image data among the image data of adjacent frames is less than a fourth predetermined value. The third acceleration determination condition is that the number of consecutive frames of image data that are not subjected to acceleration processing among the multiple frames of image data exceeds the fifth specified value. The autofocus control method according to feature 8.
14. If the acceleration determination process determines that acceleration movement is necessary, the next amount of movement of the focus lens is determined as follows: The next movement amount of the aforementioned focus lens is determined to be the maximum movement amount, The next movement amount of the focus lens is determined to be m times the current movement amount, and m is a real number of 1 or more. The next amount of movement of the focus lens is determined to be the current amount of movement plus an integer n of 1 or more, At least one of the following: m times the current amount of movement is greater than the value obtained by adding n to the current amount of movement. m times the current amount of movement is less than or equal to the determined maximum amount of movement. The autofocus control method according to feature 8.
15. The imaging device includes an image sensor, and the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data is determined as follows: The image sensor generates RAW image data for each pixel, corresponding to the optical image of the subject focused by the imaging lens. Performing image processing on the aforementioned RAW image data of one frame, To calculate the contrast value and brightness evaluation value within the autofocus evaluation area of the RAW image data for each frame, Using the contrast value and brightness evaluation value within the autofocus evaluation area of the RAW image data of each frame, the autofocus evaluation value of the RAW image data of one frame is calculated by correction processing and weighted calculation processing. including, The autofocus control method according to feature 1.
16. The autofocus control method further includes determining the total movement range of the focus lens based on the depth of field of the optical lens and / or information about the subject. The autofocus control method according to feature 1.
17. An imaging device, The system comprises memory and a computer program stored in the memory and executable by the processor, The processor executes the computer program to perform the process of the autofocus control method according to any one of claims 1 to 16. An imaging device characterized by the following features.
18. A computer-readable storage medium, A computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the process of the autofocus control method described in any one of claims 1 to 16 is realized. A computer-readable storage medium characterized by the following features.
19. An imaging device, It comprises an optical lens, an image sensor, memory, and a processor, The optical lens includes a focusing lens, an imaging lens, and a focusing mechanism, wherein the focusing lens is positioned in correspondence with the imaging lens and connected to the focusing mechanism, and the focusing mechanism is configured to move the focusing lens along the optical axis of the optical lens based on the current amount of movement. The image sensor is configured to convert light from the subject image into an image signal while the optical lens is moving and to generate image data for each lens position while the focus lens is moving. The aforementioned memory stores computer programs. The processor is configured to execute the computer program and perform the following processes, namely, A contrast value calculation process is performed, and the contrast value calculation process is used to obtain the contrast value within the autofocus evaluation area of the image data for each lens position. An autofocus evaluation value calculation process is performed, and the autofocus evaluation value calculation process is used to calculate the autofocus evaluation value based on the contrast value within the autofocus evaluation region of the image data for each lens position. An autofocus processing process is executed, and the autofocus processing process is used to determine whether or not a peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data. If a peak value appears, the focus position of the focus lens is determined, and the focus lens is controlled to move to the focus position to complete focusing. If a peak value does not appear, the next process is executed, i.e., The extreme values of the amount of movement are calculated, and the calculation of the extreme values of the amount of movement as described above includes calculating the maximum and minimum amounts of movement. An acceleration / deceleration determination process is performed, and the next movement amount of the focus lens is determined by the acceleration / deceleration determination process, and the next movement amount is between the maximum movement amount and the minimum movement amount. The focus position of the focus lens is determined, and the focus lens is controlled to move to the focus position until focusing is completed. Based on the determined next movement amount, the focus lens is moved, generating image data for each lens position during the movement of the focus lens, and the contrast value is acquired, the autofocus evaluation value is calculated, and the peak value is determined again. An imaging device characterized by the following features.
20. An autofocus control device, It comprises a scan control module, a contrast value calculation module, an autofocus evaluation value determination module, a peak value determination module, a focus control module, a movement amount determination module, and an acceleration / deceleration determination module. The scan control module is configured to move the focus lens along the optical axis of the optical lens based on the current amount of movement, and to generate image data for each lens position during the movement of the focus lens. The contrast value calculation module is configured to determine the contrast value within the autofocus evaluation area of the image data for each lens position. The autofocus evaluation value determination module is configured to calculate an autofocus evaluation value based on the contrast value within the autofocus evaluation area of the image data for each lens position. The peak value determination module is configured to determine whether or not a peak value appears in the autofocus evaluation value within the autofocus evaluation region of the image data of each frame among the multiple frames of image data. The focusing control module is configured to determine the focus position of the focusing lens when a peak value is present, and to control the focusing lens to move to the focus position to complete focusing. The aforementioned displacement determination module is configured to calculate the extreme value of the displacement when no peak value has appeared, and calculating the extreme value of the displacement includes calculating the maximum displacement and the minimum displacement. The acceleration / deceleration determination module is configured to perform an acceleration / deceleration determination process if a peak value does not appear, and the acceleration / deceleration determination process determines the next amount of movement of the focus lens, and the next amount of movement is between the maximum amount of movement and the minimum amount of movement. The scan control module is configured to move the focus lens based on the determined next movement amount and generate image data for each lens position during the movement of the focus lens. During this period, the contrast value calculation module is configured to recalculate the contrast value, the autofocus evaluation value determination module is configured to recalculate the autofocus evaluation value, and the peak value determination module is configured to redetermine the peak value. After determining the focus position of the focus lens, the focus control module is further configured to control the focus lens to move to the focus position to complete the focusing. An autofocus control device characterized by the following features.
Citation Information
Patent Citations
Autofocus controller, digital still camera and digital video camera equipped with the same, autofocus control method and recording medium having autofocus control program recorded thereon
JP2002122776A
Autofocusing device, camera provided with the same, and camera body
JP2005156971A
Imaging device
JP2012013944A