Camera device and focus setting method

The camera device enhances auto-focusing performance by using multiple focus windows to gather more data for focus determination, addressing the limitations of small focus windows in wide zoom or low-light conditions, and optimizing focus settings based on image characteristics.

WO2024225653A1PCT designated stage expired Publication Date: 2024-10-31HANWHA VISION CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/004589
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-03
Filing Date
2024-04-08
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

Existing camera auto-focusing technologies face performance deterioration when using small focus windows, leading to inadequate data for accurate focusing, especially in conditions where zoom is wide or low-light environments.

Method used

A camera device with a processor and memory that sets multiple non-overlapping focus windows based on distance information within an image, using a distance measuring unit to identify positions with the same distance, and a focus position estimation unit to analyze pixels from these windows to determine the optimal focus position, with the ability to switch between single and multiple focus windows based on imaging conditions.

Benefits of technology

Improves auto-focusing performance by increasing the amount of data used for focusing, allowing for more accurate focus setting even in conditions where small focus windows are not sufficient, and optimizes focus determination based on image type and lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024004589_31102024_PF_FP_ABST
    Figure KR2024004589_31102024_PF_FP_ABST
Patent Text Reader

Abstract

This camera device comprises: a lens which projects light incident from a subject; an image sensor which captures an image of the subject by the projected light; a distance measurement unit which identifies multiple positions having the same distance information in the image; a window setting unit which sets multiple focus windows in the image with respect to the multiple positions; a focus position estimation unit which analyzes pixels in the multiple focus windows to determine a single focus position for capturing the image; and a lens controller which controls the position of the lens according to the determined focus position.
Need to check novelty before this filing date? Find Prior Art

Description

How to set up your camera device and focus

[0001] The present invention relates to a technology for setting the focus of a camera, and more particularly, to a method and device for setting the focus of a camera more accurately by using distance information within an image currently being captured.

[0002] Typically, camera devices provide a feature that allows the user to manually set the focus value (focus position) for a specific scene, or to automatically set the focus based on scene analysis. The latter feature is called auto-focusing (AF).

[0003] Since the distance (the distance between the lens and the subject) may be different at various locations within the image being captured, an area within the image that serves as a reference for such autofocusing, i.e., a focus window (AF window), must be set.

[0004] The above focus window may have its size determined in advance according to the zoom step of the camera, or it may select only appropriate data in blocks by referring to the image data to which auto-focusing is applied, and execute continuous auto-focusing (CAF).

[0005] However, when the camera's focus is near the zoom wide, the focus window is typically set small because the distance variation within the image is large. This is to ensure that the focus is set at a location that minimizes blurring in the captured image, as the focus change per unit zoom step is large at that magnification.

[0006] However, since the size of the focus window is small, the amount of data used for auto-focusing is also small, so there is a problem that the performance of auto-focusing is greatly affected by data in a narrow area.

[0007] Therefore, there is a need for the development of an auto-focusing technology that can prevent quality degradation of captured images even under image capturing conditions where a small focus window cannot be used.

[0008] The technical problem to be achieved by the present invention is to provide a focus setting method and a camera device that improve auto-focusing performance by increasing the amount of data utilized for auto-focusing by using a plurality of focus windows under image capturing conditions where a small focus window cannot be used.

[0009] The technical problems of the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the description below.

[0010] According to one embodiment of the present invention for achieving the above technical task, a camera device including a processor and a memory for storing program instructions executed by the processor, the camera device including: a lens for projecting light incident from a subject; an image sensor for capturing an image of the subject using the projected light; a distance measuring unit for identifying a plurality of positions having the same distance information within the image; a window setting unit for setting a plurality of focus windows within the image based on the plurality of positions; a focus position estimation unit for analyzing pixels within the plurality of focus windows to determine a single focus position for capturing the image; and a lens controller for controlling the position of the lens based on the determined focus position.

[0011] The above plurality of focus windows are spaced apart from each other and do not overlap.

[0012] The above camera device further includes an image determination unit that determines the type of the image, wherein the focus position estimation unit determines the single focus position using the plurality of focus windows only when the type of the determined image satisfies a specific shooting condition, and determines the single focus position using a single focus window when the type of the determined image does not satisfy the specific shooting condition.

[0013] In the third paragraph, the specific shooting condition is satisfied when the image is an image captured under low-light conditions or an image captured at a zoom-wide magnification.

[0014] The above low light condition is satisfied when the light sensor value exceeds the first reference value or the sensor gain value does not exceed the second reference value.

[0015] The above distance information is at least one of an absolute distance obtained through ToF (time of flight) of electromagnetic waves and an area-specific distance stored through pre-calibration.

[0016] The above distance information is distance information obtained through learning of the image itself, and the image used as input for the learning is an image downsampled from the captured image or cropped from the captured image.

[0017] The above distance measuring unit obtains distance information in units of areas or pixels within the captured image by matching the distance information obtained through the above learning to the captured image again.

[0018] The above window setting unit variably sets the number of the plurality of focus windows by increasing the number of the plurality of focus windows until the amount of image information obtained from the plurality of focus windows exceeds a threshold.

[0019] The above window setting section sets the plurality of focus windows within a distance range obtained by adding or subtracting a margin from the distance information.

[0020] The above window setting unit sets only focus windows among the plurality of focus windows in which the high frequency component is greater than or equal to a reference value, and excludes focus windows in which the high frequency component is less than the reference value.

[0021] The above window setting unit sets only focus windows among the plurality of focus windows in which the average brightness of an area within the focus window is greater than or equal to a reference value, and excludes focus windows in which the average brightness is less than or equal to the reference value.

[0022] The distance measurement unit calculates a distribution value of a plurality of distance information within the image, and the focus position estimation unit determines the single focus position using the plurality of focus windows only when the calculated distribution value exceeds a reference value, and determines the single focus position using a single focus window when the calculated distribution value does not exceed the reference value.

[0023] According to another embodiment of the present invention for achieving the above technical task, there is provided a focus setting method executed in a camera device including a processor and a memory storing program instructions executed by the processor, the method comprising: capturing an image of a subject by an image sensor; identifying a plurality of positions having the same distance information within the image; setting a plurality of focus windows within the image based on the plurality of positions; analyzing pixels within the plurality of focus windows to determine a single focus position for capturing the image; and controlling a position of the lens based on the determined focus position.

[0024] The above focus setting method further includes a step of determining the type of the image, and the step of determining the single focus position includes a step of determining the single focus position using the plurality of focus windows only when the type of the determined image satisfies a specific capturing condition, and determining the single focus position using a single focus window when the type of the determined image does not satisfy the specific capturing condition.

[0025] The above distance information is distance information obtained through analysis of the image itself, and the image used as input for the analysis is an image downsampled from the captured image or cropped from the captured image.

[0026] The step of setting the plurality of focus windows includes the step of variably setting the number of the plurality of focus windows by increasing the number of the plurality of focus windows until the amount of image information obtained from the plurality of focus windows exceeds a threshold.

[0027] The step of setting the plurality of focus windows further includes the step of setting the plurality of focus windows within a distance range obtained by adding or subtracting a margin from the distance information.

[0028] The step of setting the plurality of focus windows includes the step of setting only focus windows in which a high frequency component is greater than or equal to a reference value among the plurality of focus windows and excluding focus windows in which the high frequency component is less than or equal to the reference value.

[0029] The step of setting the plurality of focus windows includes the step of setting only focus windows among the plurality of focus windows in which the average brightness of an area within the focus window is greater than or equal to a reference value, and excluding focus windows in which the average brightness is less than or equal to the reference value.

[0030] According to the present invention, there is an advantage in that auto-focusing performance can be improved by increasing the number of focus windows to be captured and the amount of data used for auto-focusing.

[0031] In addition, according to the present invention, there is an advantage in that auto-focusing can be performed in an optimal mode among a mode for determining a focus position based on a single existing focus window and a mode for determining a focus position based on a plurality of focus windows, depending on the classification of the image to be captured.

[0032] FIG. 1 is a block diagram illustrating the configuration of a camera device according to one embodiment of the present invention.

[0033] Figure 2 is a diagram illustrating a process of generating a depth estimation image through monocular depth estimation.

[0034] Figure 3 is a drawing illustrating a case where focus windows are set at multiple locations with the same distance within a captured image.

[0035] Figure 4 is a diagram showing the process of finding the optimal focus position.

[0036] Figure 5 is a graph showing locus data showing changes in focus position at a specific magnification.

[0037] Figure 6 is a drawing illustrating an example in which focus windows are set at multiple locations that are the same distance from an object of interest when a user sets an object of interest within a captured image.

[0038] Figure 7 is a diagram showing a process for calculating distribution values ​​of multiple distance information within a captured image.

[0039] Figure 8 is a drawing showing an increase in the number of focus windows shown in Figure 6.

[0040] Fig. 9 is a diagram illustrating the hardware configuration of a computing device that realizes the camera device of Fig. 1.

[0041] Figure 10 is a flowchart schematically illustrating a distance information generation method according to one embodiment of the present invention.

[0042] The advantages and features of the present invention, and the methods for achieving them, will become clearer with reference to the embodiments described in detail below together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various different forms. These embodiments are provided only to ensure that the disclosure of the present invention is complete and to fully inform those skilled in the art of the scope of the invention, and the present invention is defined only by the scope of the claims. Like reference numerals designate like elements throughout the specification.

[0043] Unless otherwise defined, all terms (including technical and scientific terms) used herein may be used in their common sense to those of ordinary skill in the art to which the present invention pertains. Furthermore, terms defined in commonly used dictionaries are not to be interpreted ideally or excessively unless explicitly and specifically defined otherwise.

[0044] The terminology used herein is for the purpose of describing embodiments and is not intended to limit the present invention. In this specification, singular forms also include plural forms, unless specifically stated otherwise. As used herein, the terms "comprises" and / or "comprising" do not exclude the presence or addition of one or more other components in addition to the components mentioned.

[0045] An embodiment of the present invention will be described in detail with reference to the attached drawings below.

[0046] FIG. 1 is a block diagram illustrating the configuration of a camera device (100) according to one embodiment of the present invention. The camera device (100) may be configured to include a control unit (101), a storage unit (105), an imaging device (110), an image determination unit (120), a window setting unit (130), a distance measurement unit (140), a focus position estimation unit (150), and a user interface (160).

[0047] The control unit (processor, 101) acts as a controller that controls the operation of other components of the camera device (100), and can generally be implemented as a central processing unit (CPU), a microprocessor, etc. In addition, the storage unit (105) is a storage medium that stores the results performed by the control unit (101) or stores data necessary for the operation of the control unit (101), for example, program instructions executed by the control unit (101). The storage unit (105) can be implemented as a volatile memory or a non-volatile memory.

[0048] The imaging device (110) may be configured with an optical system or lens (113) that can be opened or closed by a shutter and that takes in light reflected from a subject while the shutter is open, an image sensor (115) that captures an image by capturing the taken-in light and outputting it as an electrical signal, and a lens controller (117) that can adjust the position (zoom direction position) of the lens (113) according to the control of the control unit (101). The captured image may be displayed as an analog signal or a digital signal, but recently, it is common to display it as a digital signal. The digital signal may be provided to the control unit (101) after being preprocessed by an image processing unit or an image signal processor (ISP) (not shown) and temporarily or permanently stored in the storage unit (105).

[0049] The user interface (160) has a function for interaction with the user, i.e., receiving specific commands from the user or displaying relevant information to the user. To this end, the user interface (160) may include both an input means and an output means. The input means may be implemented as a mouse, a keyboard, a voice recognition device, a motion recognition device, etc., and the output means may be implemented as a display device such as an LED or LCD, a speaker, a haptic device, etc. Alternatively, the user interface (160) may be a device equipped with both an input / output means, such as a touch screen.

[0050] A user can input a command to designate a specific location as a region of interest among the images being captured via the user interface (160). The user can also check the image currently being captured and multiple focus windows displayed on the image via the user interface (160), and check the image being zoomed in or out accordingly in real time. Alternatively, the user can check the distance information of multiple focus windows displayed on the image, and select a focus window to be used for focus position estimation by removing some of the multiple focus windows.

[0051] Meanwhile, the image determination unit (120) determines the type of the image being captured. The operation of the window setting unit (130) may vary depending on the type of image determined by the image determination unit (120). For example, depending on the type of the determined image, a first mode for estimating a focus position based on a single focus window and a second mode for estimating a focus position based on a plurality of focus windows may be determined (hereinafter, referred to as the second embodiment). However, when the camera device (100) does not have the image determination unit (120), the window setting unit (130) may operate only in the second mode for estimating a focus position based on a plurality of focus windows (hereinafter, referred to as the first embodiment).

[0052] Below, the first embodiment will first be described.

[0053] The distance measuring unit (130) identifies multiple locations (see P1, P2, and P3 in FIG. 3) having the same distance information within the captured image. In the present invention, the distance information refers to the distance from the lens (113) of the camera device (100) to the subject, and the distance information may vary depending on the location within the image. The distance information is a concept that includes a relative distance obtained through monocular depth estimation (MDE), an absolute distance obtained through time of flight (ToF) of electromagnetic waves, and a distance by area stored through pre-calibration.

[0054] First, a method of obtaining an absolute distance through the ToF of electromagnetic waves is, for example, a method of attaching a light-emitting unit and a light-receiving unit of a Lidar or laser type in a direction parallel to the lens (113) of an imaging device (110), and measuring the distance using the time difference when light emitted from the light-emitting unit is reflected from a subject and enters the light-receiving unit.

[0055] In addition, the pre-calibration method is a method of dividing the captured image into multiple regions, acquiring and storing distance information for each region, and utilizing the stored distance information. In order to acquire distance information for each region, various methods can be used, such as using a separate distance measuring device or estimating the focus position for each region. This method allows, when focusing on a specific location (region) within the image later, to immediately identify another location with the same distance information as the specific location without separate measurement or calculation by using the stored distance information for each region.

[0056] Monocular depth estimation (MDE) is known as a technology for estimating distance using only a combination of a single optical system and image sensor. For example, referring to Fig. 2, the original image (10a) is a two-dimensional image captured by a camera, and is an image captured by a monocular camera. The estimation model (12) based on a deep learning algorithm is a model that receives a monocular image as input and outputs depth information corresponding to each pixel in the image.

[0057] The depth of an image is a value based on the distance between the camera that captured the image and the object in the image, and the depth of the image can be expressed in units of pixels of the image. For example, the depth of an image can be expressed as a depth map that includes values ​​related to the depth of each pixel included in the image. A depth map refers to an image or a channel of an image that contains information related to the distance from the observation point to the surface of an object. For example, a depth map corresponds to a data structure with a size corresponding to the number of pixels in the image, which stores a value related to the depth corresponding to each pixel in the image, and through this, an image that visualizes the value related to the depth corresponding to each pixel in grayscale, i.e., a depth estimation image (13) can be obtained. In this way, the depth estimation image (13) is a first statistical value representing information related to the estimated depth value of each pixel, and the second statistical value, which is another output corresponding thereto, can be provided in a one-to-one correspondence with the depth estimation image (13) as estimated reliability information (14) related to the depth of each pixel.

[0058] In this way, the distance information obtained through monocular depth estimation (MDE) is a relative distance. That is, the depth map obtained through monocular depth estimation (see 13 in Fig. 7) is displayed in grayscale, and since the brightness of the pixels represents the distance, the distance can be relatively compared for each area. In the present invention, monocular depth estimation (MDE) is only one example of obtaining the distance information through analysis of the image itself. As another example, the relative distance or absolute distance can be obtained through AI learning (deep learning) of the image itself.

[0059] Therefore, in the present invention, the distance information obtained through analysis of the image itself may be a relative or absolute distance obtained through AI learning, or it may be a relative distance obtained through monocular depth estimation. In either case, inputting and learning (machine learning or estimation) of a large number of sample images is required to obtain distance information for an arbitrary image, but using sample images with the same resolution as the original image may cause excessive computational load. Therefore, in the present invention, the image (sample image) used as the input for the learning uses an image downsampled from the captured image or an image cropped from the captured image.

[0060] The distance measuring unit (140) can obtain distance information in units of areas or pixels within the captured image by matching the distance information obtained through the above learning (i.e., the output of the MDE estimation model or the AI ​​model) with the captured image again. In general, the distance measuring unit (140) preprocesses (down-samples, down-scales, crops, etc.) the captured original image and inputs it into a learning model (MDE estimation model or AI model), and maps the distance information obtained therefrom to the original image, thereby obtaining distance information at all locations of the original image. Of course, since the resolutions of the sample image and the original image are different, the distance cannot be obtained from all pixels of the original image. However, since the area where the focus window is set in the present invention does not need to be on a pixel basis, this level of distance information can be considered sufficient.

[0061] Through various methods of measuring the relative distance or absolute distance, the distance measuring unit (130) can acquire distance information at various locations within the captured image, thereby also identifying multiple locations (P1, P2, P3) having the same distance information.

[0062] The window setting unit (140) sets a plurality of focus windows (FW1, FW2, FW3) within the image based on a plurality of positions (P1, P2, P3) having the same distance information within the captured image. Referring to FIG. 3, a first focus window (FW1) may be set within the captured image by a user command via a user interface (160) or by an existing auto-focusing algorithm. At this time, the window setting unit (140) may identify another position (P2, P3) within the image (10a) having the same distance information as the position (P1) (e.g., the center position) of the first focus window (FW1) through the distance measuring unit (130). At this time, the window setting unit (140) similarly sets focus windows (FW2, FW3) for the other positions (P2, P3). The size of the focus windows (FW2, FW3) may be the same as or different from the size of the first focus window (FW1). In particular, the plurality of focus windows (FW1, FW2, FW3) may be spaced apart from each other without overlapping.

[0063] Next, the focus position estimation unit (150) analyzes pixels within the plurality of focus windows (FW1, FW2, FW3) to determine a single focus position (FP) for capturing the image. However, since the same distance information is acquired for the focus windows (FW1, FW2, FW3), faster focus position estimation is possible. In addition, since pixel information can be acquired from the plurality of focus windows (FW1, FW2, FW3) rather than a single focus window (FW1), i.e., since a relatively large amount of data is used for auto-focusing, more accurate focus position estimation is also possible.

[0064] For example, referring to FIG. 4, the focus position estimation unit (150) sets a predetermined range (Rd) including a focus position corresponding to the distance information, and searches for an optimal focus position with the largest evaluation value while moving the lens (113) of the imaging device (110) within the predetermined range (Rd) by the lens controller (117).

[0065] At this time, in order to know the focus position corresponding to the distance information, locus data provided as characteristic information or specification information of the imaging device (110) is required. The locus data may be stored in the storage unit (105) and then provided to the focus position estimation unit (150).

[0066] Fig. 5 is an example of locus data showing the relationship between zoom magnification, focus position, and distance information, and only shows the locus data at infinity (Inf) distance (solid line) and at 1.5 m distance (dotted line). Here, the horizontal axis is the zoom magnification, and the vertical axis is the focus position. For example, at a position where the zoom-in magnification is 1597, the focus position at a distance of 1.5 m is approximately 300, and the focus position at infinity is approximately 500. In this way, it can be seen that at a zoom-wide position with a small zoom magnification, the change in focus position relative to the change in distance is small, whereas at a zoom-tele position with a large zoom magnification, the change in focus position relative to the change in distance is considerably large.

[0067] When the predetermined range (Rd) is set in this way, the focus position estimation unit (150) continuously checks the change in the evaluation value while the focus position of the lens (113) moves. Here, pixel information for obtaining the evaluation value is obtained from a plurality of focus windows (FW1, FW2, FW3). The focus position estimation unit (150) can find the final peak point (k) while minutely moving the focus position within the predetermined range (Rd), and the focus position (FP) at this peak point (k) can be set as the optimal focus position. Contrast data or edge data can generally be used as the evaluation value. The contrast data can be defined as the sum of the difference values ​​(SAD: Sum of Absolute Difference) between the pixels within the region of interest and the surrounding pixels, and the larger this value is, the more edge data or detail there is in the image. In general, the edge data has a higher value as the focus is more accurate.

[0068] Through the above process, when the focus position estimation unit (150) determines a single focus position (FP), the lens controller (117) of the imaging device (110) controls the position of the lens (105) according to the determined focus position (FP). Then, the image sensor (115) can acquire an image in an optimal focus state by recapturing an image of the subject after the lens (105) is positioned at the controlled position.

[0069] Separately from the first embodiment described above, a second embodiment can be considered that has both a first mode for estimating a focus position based on a single focus window and a second mode for estimating a focus position based on a plurality of focus windows, depending on the type of the determined image. According to the second embodiment of the present invention, the camera device (100) can further include an image determination unit (120) for determining the type of image captured by the image sensor (115).

[0070] Accordingly, the focus position estimation unit (150) determines the single focus position using the plurality of focus windows (FW1, FW2, FW3) only when the type of the determined image satisfies a specific shooting condition (predetermined condition), and determines the single focus position using the single focus window (FW1) when the type of the determined image does not satisfy the specific shooting condition.

[0071] The above-mentioned specific shooting conditions refer to cases where the size of the focus window cannot but be set small depending on the type of the image, i.e., cases where the necessity or efficiency of using multiple focus windows is increased. For example, the above-mentioned specific shooting conditions may be conditions where the image is captured in a low-light environment. Since images captured in such a low-light environment contain a lot of noise and lack necessary image information, it is difficult to achieve accurate focusing with only a single focus window, and therefore the necessity of using multiple focus windows increases.

[0072] The above low-light conditions can be determined using a separate light sensor (e.g., CdS) or using the sensor gain value, which is a parameter stored with the captured image. Alternatively, signal-to-noise ratio (SNR), clip count, luminance distribution, etc. may also be used to determine the above low-light conditions.

[0073] Specifically, when using a light sensor under the above-described specific shooting conditions, if the light sensor value when the image is captured exceeds a predetermined reference value, sufficient image information (e.g., edge information, high-frequency components) can be obtained using only a single focus window. Therefore, in this case, by determining the focus position using a single focus window, the amount of computation required to use multiple focus windows can be reduced.

[0074] On the other hand, if the light sensor value when capturing the image does not exceed a predetermined threshold, sufficient image information can be obtained with just a single focus window. Therefore, in this case, despite the increased computational complexity, determining the focus position using multiple focus windows can prevent inaccurate lens focusing due to insufficient image information.

[0075] Similarly, when using a sensor gain value (one of the parameters stored in the camera) under the above-described specific shooting conditions, if the sensor gain value does not exceed a predetermined reference value, the focus position is determined using only a single focus window. Generally, the sensor gain value is inversely proportional to the illuminance sensor value, so a low sensor gain value means that the illuminance was sufficient when the image was captured.

[0076] On the other hand, if the light sensor value when the image is captured exceeds a predetermined standard, the focus position is determined using multiple focus windows because the light was not sufficient when the image was captured.

[0077] In this way, for an image captured under low-light conditions, focus position estimation can be performed using all of the multiple focus windows (FW1, FW2, FW3). However, due to the nature of low-light conditions, pixel information below a certain luminance is almost meaningless, so the focus position estimation can be performed using only a single focus window with the largest luminance value among the multiple selected focus windows (FW1, FW2, FW3), thereby determining the focus position (FP).

[0078] The above-mentioned specific shooting conditions may refer to zoom-wide conditions (conditions in which images are captured at low magnification) together with or separately from the low-light conditions (conditions in which images are captured in a low-light environment). Whether or not it is a zoom-wide magnification can be determined through lens data such as AF window data or zoom magnification.

[0079] Meanwhile, according to another embodiment, the specific capturing condition for image determination may be satisfied when a user inputs a command to focus on a specific region of interest within the image through the user interface (160). Alternatively, the condition may be satisfied when a command to focus only on an object that has moved is input by a motion detection algorithm.

[0080] In this way, the region of interest desired by the user is often an area of ​​a very small object or an area of ​​a partially obscured object within the image (see 10b of FIG. 6), so that it is often difficult to secure a sufficiently large focus window size. Therefore, in this case, the distance measuring unit (140) obtains distance information of the object of interest (20) designated by the user and identifies other regions at the same distance. Then, the window setting unit (130) not only sets a focus window (FW4) at the position of the object of interest, but also sets focus windows (FW5, FW6, FW7) for the other regions (see FIG. 6).

[0081] In the second embodiment described above, the number of focus windows is set differently depending on the image discrimination criteria. However, it may be necessary to set the number of windows differently based not only on the type of image determined by the image discrimination unit (120), but also on the distance information acquired by the distance measurement unit (140) itself.

[0082] That is, even if the image is determined to satisfy specific shooting conditions in the image determination unit (120), if the distribution value of the distance information calculated in the distance measurement unit (140) is not suitable for using multiple focus windows (e.g., if the distribution value of the distance information is small and the deviation of the distance within the image is small), focus position estimation can be performed as in the past using only a single focus window.

[0083] To this end, the distance measurement unit (130) calculates the distribution values ​​of multiple distance information within the image. This distribution value is an indicator of how diverse the range of distance information is within the image, and can be expressed as variance or standard deviation.

[0084] First, when a depth estimation image (13) is obtained according to monocular depth estimation (MDE) as in Fig. 2, the depth estimation image (13) can be divided into a plurality of blocks (15), as illustrated in Fig. 7. Here, the size of the block (15) can be set to the size of the minimum field of view (FoV).

[0085] At this time, the distribution value can be determined by representing the luminance value or R / G / B component representing each block (15) as a histogram (17) or calculating the variance or standard deviation. Here, the distance information is exemplified as being obtained through monocular depth estimation, but the distribution value can also be obtained in the same manner for the absolute distance obtained through ToF of electromagnetic waves such as lidar and laser. In addition, the representative luminance value can be calculated as the average luminance value, the median luminance value, the luminance values ​​of pixels having continuity of brightness, etc. within the block (15).

[0086] In this way, the distribution value calculated by the distance measuring unit (130) is provided to the focus position estimation unit (150). The focus position estimation unit (150) can determine a single focus position (FP) using a plurality of focus windows when the calculated distribution value exceeds a reference value. Conversely, when the calculated distribution value does not exceed the reference value, the focus position estimation unit (150) can determine a single focus position (FP) using only a single focus window.

[0087] As described above, the present invention can enable more accurate focus setting in a camera device by setting multiple focus windows having the same distance and extracting more image information therefrom. However, since the amount of image information varies depending on the captured image, the number of multiple focus windows to set is also an important issue. For example, assuming that multiple focus windows (FW4, FW5, FW6, FW7) having the same distance are found in FIG. 6, the key issues may be how many focus windows to use and what the criteria are for selecting the focus window to use first. If too few focus windows are set, the accuracy of focus setting will deteriorate, which may directly affect the performance of the camera device.

[0088] Therefore, according to one embodiment of the present invention, it is preferable to variably set the number of multiple focus windows depending on the characteristics of the captured image. To this end, the window setting unit (130) can variably set the number of multiple focus windows by additionally selecting the multiple focus windows until the amount of image information acquired from the multiple focus windows exceeds a threshold.

[0089] As a criterion for selecting a focus window, (1) the amount of high-frequency components included in the focus window, (2) the average brightness of the focus window, etc. can be used.

[0090] For example, the window setting unit (130) can include only focus windows (focus windows with high-frequency characteristics) among the plurality of focus windows (FW4, FW5, FW6, and FW7) in which the high-frequency component is higher than a reference value, and can exclude focus windows (focus windows with low-frequency characteristics) in which the high-frequency component is lower than the reference value. The amount of such high-frequency components is generally the same concept as the amount of edge components, and can be numerically determined through gradient analysis or discrete cosine transform of the corresponding area. In Fig. 6, there are four focus windows (FW4, FW5, FW6, and FW7) with the same distance, but FW6 and FW7 can be excluded because they are windows with relatively low-frequency characteristics. This is because even if the image information corresponds to a similar distance, if the frequency characteristics are not good, it may have a negative effect on the auto-focusing performance.

[0091] As another example, the window setting unit (130) may set only focus windows among the plurality of focus windows (FW4, FW5, FW6, FW7) in which the average brightness of the area within the focus window is greater than or equal to a reference value, and may exclude focus windows in which the average brightness is less than or equal to the reference value. This condition is because images captured in low-light environments such as at night may also include areas with a lot of noise, and therefore, even if the brightness of the focus window is less than the reference value, it cannot be useful image information as it is noise rather than an actual edge.

[0092] Meanwhile, there may also be cases where the number of focus windows with the same distance information within the captured image is too small to secure sufficient image information. In this case, the window setting unit (130) may increase the number of focus windows by additionally securing a plurality of focus windows within a distance range obtained by adding or subtracting a margin from the same distance information in order to obtain additional image information. The distance range may be defined as a similar distance range including an error margin such as an error in a distance value obtained from the distance information or the depth of a focus lens. In this way, even if focusing is performed by considering image information included in focus windows with a small distance difference (within the distance range), the overall auto-focusing performance may not be significantly affected.

[0093] In Fig. 6, four focus windows (FW4, FW5, FW6, FW7) have the same distance information, but if sufficient image information cannot be secured from them, the window setting unit (130) can set a distance range by adding or subtracting a margin to the distance information. Accordingly, as illustrated in Fig. 8, two focus windows (FW8, FW9) having the same distance information and within the margin range (belonging to the distance range) can be additionally secured. Accordingly, the focus position estimation unit (150) can utilize more image information to determine a single focus position for capturing an image.

[0094] FIG. 9 is a drawing illustrating the hardware configuration of a computing device (200) that realizes the camera device (100) of FIG. 1.

[0095] A computing device (200) has a bus (220), a processor (230), memory (240), storage (250), an input / output interface (210), and a network interface (260). The bus (220) is a data transmission path for the processor (230), the memory (240), the storage (250), the input / output interface (210), and the network interface (260) to transmit and receive data to each other. However, the method of connecting the processors (230) and the like to each other is not limited to a bus connection. The processor (230) is a computational processing unit such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit). The memory (240) is a memory such as a RAM (Random Access Memory) or a ROM (Read Only Memory). The storage (250) is a storage device such as a hard disk, an SSD (Solid State Drive), or a memory card. In addition, the storage (250) may be a memory such as a RAM or a ROM.

[0096] The input / output interface (210) is an interface for connecting a computing device (200) and an input / output device. For example, a keyboard or mouse is connected to the input / output interface (210).

[0097] The network interface (260) is an interface for connecting the computing device (200) to an external device so that transmission packets can be transmitted and received. The network interface (260) may be a network interface for connecting to a wired line or a wireless line. For example, the computing device (200) may be connected to another computing device (200-1) via a network (50).

[0098] The storage (250) stores program modules that implement each function of the computing device (200). The processor (230) executes each of these program modules, thereby implementing each function corresponding to the program module. Here, when executing each of the modules, the processor (230) can read these modules onto the memory (240) and then execute them.

[0099] FIG. 10 is a flowchart illustrating a focus setting method performed in a camera device including a processor and a memory storing program instructions executed by the processor, according to one embodiment of the present invention.

[0100] First, the image sensor (115) captures an image of the subject by light projected through the lens (S51).

[0101] Next, the distance measuring unit (130) identifies multiple locations (P1, P2) having the same distance information within the image (S52).

[0102] The window setting unit (140) sets a plurality of focus windows (FW1, FW2, FW3) within the image based on the plurality of locations (S53).

[0103] The focus position estimation unit (150) analyzes pixels within the plurality of focus windows (FW1, FW2, FW3) to determine a single focus position (FP) for capturing the image (S54).

[0104] Finally, the lens controller (110) controls the position of the lens (105) according to the determined focus position (FP) (S55), and after the lens (105) is positioned at the position, the image sensor (115) captures an image of the subject again (S56).

[0105] Although the embodiments of the present invention have been described with reference to the attached drawings, those skilled in the art will appreciate that the present invention can be implemented in other specific forms without altering the technical concept or essential features thereof. Therefore, the embodiments described above should be understood to be illustrative in all respects and not restrictive.

Claims

1. A camera device including a processor and a memory that stores program instructions executed by the processor, A lens that projects light incident from a subject; An image sensor that captures an image of the subject using the projected light; A distance measuring unit for identifying multiple locations having the same distance information within the image; A window setting unit for setting a plurality of focus windows within the image based on the plurality of positions; A focus position estimation unit that analyzes pixels within the plurality of focus windows to determine a single focus position for capturing the image; and A camera device comprising a lens controller that controls the position of the lens according to the determined focus position.

2. In paragraph 1, A camera device wherein the plurality of focus windows are spaced apart from each other and do not overlap.

3. In paragraph 1, Further comprising an image determination unit for determining the type of the above image, A camera device wherein the focus position estimation unit determines the single focus position using the plurality of focus windows only when the type of the determined image satisfies specific shooting conditions, and determines the single focus position using a single focus window when the type of the determined image does not satisfy the specific shooting conditions.

4. In the third paragraph, the specific shooting conditions are A camera device, wherein the above image is satisfied when the image is captured under low light conditions or captured at a zoom-wide magnification.

5. In paragraph 4, A camera device wherein the above low light condition is satisfied when the light sensor value exceeds the first reference value or the sensor gain value does not exceed the second reference value.

6. In paragraph 1, A camera device, wherein the above distance information is at least one of an absolute distance obtained through ToF (time of flight) of an electromagnetic wave and an area-specific distance stored through pre-calibration.

7. In paragraph 1, The above distance information is distance information obtained through learning of the image itself. A camera device, wherein the image used as input for the above learning is an image downsampled from the captured image or an image cropped from the captured image.

8. In paragraph 7, A camera device in which the distance measuring unit obtains distance information in units of areas or pixels within the captured image by matching the distance information obtained through the learning to the captured image again.

9. In paragraph 1, A camera device in which the window setting unit variably sets the number of the plurality of focus windows by increasing the number of the plurality of focus windows until the amount of image information obtained from the plurality of focus windows exceeds a threshold.

10. In paragraph 9, A camera device in which the above window setting unit sets the plurality of focus windows within a distance range obtained by adding or subtracting a margin from the distance information.

11. In paragraph 1, A camera device in which the above window setting unit sets only focus windows having a high frequency component greater than a reference value among the plurality of focus windows and excludes focus windows having a high frequency component less than the reference value.

12. In paragraph 1, A camera device in which the above window setting unit sets only focus windows among the plurality of focus windows in which the average brightness of an area within the focus window is greater than or equal to a reference value, and excludes focus windows in which the average brightness is less than or equal to the reference value.

13. In paragraph 1, The above distance measuring unit calculates the distribution values ​​of multiple distance information within the image, A camera device wherein the focus position estimation unit determines the single focus position using the plurality of focus windows only when the calculated distribution value exceeds the reference value, and determines the single focus position using a single focus window when the calculated distribution value does not exceed the reference value.

14. A focus setting method executed in a camera device including a processor and a memory storing program instructions executed by the processor, A step of capturing an image of a subject by an image sensor; A step of identifying multiple locations having the same distance information within the image; A step of setting a plurality of focus windows within the image based on the plurality of positions; A step of analyzing pixels within the plurality of focus windows to determine a single focus position for capturing the image; and A focus setting method, comprising a step of controlling the position of the lens according to the determined focus position.

15. In paragraph 14, Further comprising a step of determining the type of the above image, The step of determining the single focus position is: A focus setting method, comprising the step of determining the single focus position using the plurality of focus windows only when the type of the determined image satisfies a specific shooting condition, and determining the single focus position using a single focus window when the type of the determined image does not satisfy the specific shooting condition.

16. In paragraph 14, The above distance information is distance information obtained through analysis of the image itself. A focus setting method, wherein the image used as input for the above analysis is an image downsampled from the captured image or cropped from the captured image.

17. In paragraph 14, The step of setting the above multiple focus windows is: A focus setting method, comprising a step of variably setting the number of the plurality of focus windows by increasing the number of the plurality of focus windows until the amount of image information obtained from the plurality of focus windows exceeds a threshold.

18. In paragraph 17, The step of setting the above multiple focus windows is: A focus setting method further comprising a step of setting the plurality of focus windows within a distance range obtained by adding or subtracting a margin from the distance information.

19. In paragraph 14, The step of setting the above multiple focus windows is: A focus setting method comprising the step of setting only focus windows having a high frequency component greater than or equal to a reference value among the plurality of focus windows and excluding focus windows having a high frequency component less than or equal to the reference value.

20. In paragraph 14, The step of setting the above multiple focus windows is: A focus setting method comprising the step of setting only focus windows in which the average brightness of an area within the focus window is greater than or equal to a reference value among the plurality of focus windows and excluding focus windows in which the average brightness is less than or equal to the reference value.

Citation Information

Patent Citations

  • Method and system achieving integrated camera automatic focusing

    CN103546692A

  • Camera

    JP2002335436A

  • Image pick-up device

    JP2003090952A

  • Method of automatic focusing within digitalphotographing apparatus, and digital photographingapparatus adopting the method

    KR1020060013117A

  • Auto-focusing controller and the auto-focusing control method which uses this

    KR1020110007438A