WO2017166076A1 - 一种确定对焦窗的方法、装置及设备 - Google Patents

一种确定对焦窗的方法、装置及设备 Download PDF

Info

Publication number
WO2017166076A1
WO2017166076A1 PCT/CN2016/077734 CN2016077734W WO2017166076A1 WO 2017166076 A1 WO2017166076 A1 WO 2017166076A1 CN 2016077734 W CN2016077734 W CN 2016077734W WO 2017166076 A1 WO2017166076 A1 WO 2017166076A1
Authority
WO
WIPO (PCT)
Prior art keywords
focus window
window
image
focus
contrast
Prior art date
Application number
PCT/CN2016/077734
Other languages
English (en)
French (fr)
Inventor
杜成
罗巍
郭鑫
戎怀阳
吴锦
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2016/077734 priority Critical patent/WO2017166076A1/zh
Priority to EP16895857.7A priority patent/EP3429185B1/en
Priority to CN201680013196.5A priority patent/CN107439005B/zh
Priority to US16/090,444 priority patent/US10491804B2/en
Publication of WO2017166076A1 publication Critical patent/WO2017166076A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/673Focus control based on electronic image sensor signals based on contrast or high frequency components of image signals, e.g. hill climbing method
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/675Focus control based on electronic image sensor signals comprising setting of focusing regions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body

Definitions

  • the present invention relates to the field of digital image technology, and in particular, to a method, device and device for determining a focus window.
  • Autofocus refers to controlling the distance between the voice coil motor (VCM) and the image sensor through the autofocus algorithm, so that the subject of the subject is in the clearest state.
  • VCM voice coil motor
  • autofocus algorithms can be divided into two categories: active focus algorithm, ie, ranging method, and passive focus algorithm, that is, mountain climbing method.
  • the ranging method measures the distance from the subject to the lens by infrared ranging, ultrasonic ranging, binocular stereo vision, etc., that is, the object distance, calculates the position of the VCM corresponding to the object distance, and adjusts the position of the VCM to obtain the quasi-focus image.
  • the ranging method is characterized by a fast focusing speed, but requires an additional ranging module, so the cost is high, and the accuracy of the ranging module is also high. Referring to FIG. 1, the position of the corresponding VCM is calculated according to the measured object distance, and the quasi-focal position when the contrast is optimal is directly determined to obtain a quasi-focus image.
  • the hill climbing method obtains the images corresponding to different VCM positions by transforming the position of the VCM, analyzes the contrast and contrast trends, finds the VCM position with the best contrast, and obtains the quasi-focus image.
  • the mountain climbing method is characterized by slower focusing speed, but lower cost and higher focusing accuracy. Referring to FIG. 2, the analysis determines that the corresponding VCM position at the best contrast is completed, and a quasi-focus image is obtained.
  • the range of travel of all VCMs is generally not searched, but the first peak of the contrast curve is determined as the quasi-focal position, but for some Scenes, such as macro scenes, some objects in the focus window are close to the lens, and some objects are far away from the lens, which makes the contrast curve a bimodal curve, which may cause the focus to be the background in the image content. Partly, the ideal quasi-focus image is not obtained.
  • the mountain climbing method generally selects the center of the preview screen as the focusing window, sometimes the center area is not the area where the user wants to focus, so focusing using the center focusing window may result in out of focus, and an ideal quasi-focus image may not be obtained.
  • An object of the embodiments of the present invention is to provide a method, device, and device for determining a focus window, so as to solve the problem that it is difficult to find a quasi-focal position when using the hill climbing method for autofocusing, or even defocus, and an ideal quasi-focal image cannot be obtained.
  • a method for determining a focus window includes: determining a face region as a current focus window when detecting a face in an image to be captured; detecting a preset position in the face region, and rooting Adjusting a width of the current focus window according to a preset position in the face region; stretching a length of the current focus window according to at least a first preset ratio and a second preset ratio, wherein according to the first pre- The focus window after the length of the current focus window is stretched is a first focus window, and the focus window after the length of the current focus window is stretched according to the second preset ratio is a second focus window; a contrast value of the image in the first focus window and a contrast value of the image in the second focus window; determining a final focus window based on the at least two contrast values.
  • the focus window by reducing the width of the focus window, the background content of the focus window is prevented, and the focus window is stretched to the body part of the person, thereby enhancing the richness of the texture in the focus window, thereby effectively improving the focus of the face. Focusing effect in the process.
  • the preset position in the face area is detected, and the current focus window is adjusted according to the preset position in the face area
  • the width includes: detecting a position of two eyes in the face region or a position of the two eyebrows, and adjusting a width of the current focus window to a distance between two eyes in the face region or a distance between the two eyebrows.
  • determining a final focus window according to the at least two contrast values including: corresponding to the maximum contrast value according to the at least two contrast values
  • the focus window acts as the final focus window.
  • a method for determining a focus window includes: determining that an image in a current focus window is a flat region, wherein the flat region refers to a contrast value of an image in the current focus window being less than a first threshold; The first preset ratio and the second preset ratio enlarge the current focus window, wherein the focus window after the current focus window is enlarged according to the first preset ratio is a first focus window, according to the second pre- Setting a zoom window after the current focus window is a second focus window; calculating at least a contrast value of an image in the first focus window and a contrast value of an image in the second focus window; The contrast value determines the final focus window.
  • the focus window is enlarged until there is enough texture area included in the focus window, thereby effectively improving the focus. effect.
  • determining, according to the at least two contrast values, a final focus window comprising: using a focus window corresponding to the maximum contrast value as the at least two contrast values a final focus window; or a focus window having a contrast value greater than a second threshold and a preset ratio being the smallest focus window according to at least two contrast values, wherein the second threshold is greater than the first threshold.
  • a method for determining a focus window includes: determining that a shooting mode adopted by a camera when shooting an image to be captured is a macro mode, and starting a dual focus window, wherein the dual focus window includes a first focusing window and a second a focusing window, the size of the second focusing window is smaller than a size of the first focusing window, and the second focusing window is within the first focusing window; during the motor movement of the camera, determining the When the contrast value of the image in the first focusing window decreases from the first peak and the contrast value of the image in the second focusing window decreases from the second peak, the first focusing window is used as the final focusing window, wherein The first peak is a peak in a contrast curve corresponding to an image in the first focus window, and the second peak is a peak in a contrast curve corresponding to an image in the second focus window.
  • An embodiment of the present invention further provides a method for determining a focus window, comprising: analyzing a captured image according to a saliency detection technique, and automatically detecting a saliency region. When it is determined that there is a significant area in the image to be captured, the focus window is placed in the significant area.
  • the above method of determining the focus window can solve the problem that the focus area is not the focus area desired by the user, resulting in out of focus.
  • an apparatus for determining a focus window comprising: a determining unit, configured to determine a face region as a current focus window when a human face is detected in an image to be captured; and a detecting unit configured to detect the face region a preset position, and adjusting a width of the current focus window according to a preset position in the face area; and an adjusting unit, configured to stretch the current at least according to the first preset ratio and the second preset ratio a length of the focus window, wherein the focus window after the length of the current focus window is stretched according to the first preset ratio is a first focus window, and the current focus window is stretched according to the second preset ratio a focusing window after the length is a second focusing window; a calculating unit configured to calculate at least a contrast value of an image in the first focusing window and a contrast value of an image in the second focusing window; an analyzing unit, configured to: The final focus window is determined based on at least two contrast values.
  • the preset position in the face area is detected, and the current focus window is adjusted according to the preset position in the face area
  • the detecting unit is specifically configured to: detect a position of two eyes in the face region or a position of two eyebrows, and adjust a width of the current focusing window to a distance between two eyes in the face region or The distance between the two eyebrows.
  • the analyzing unit when determining a final focus window according to the at least two contrast values, is specifically configured to: At least two contrast values, the focus window corresponding to the maximum contrast value is used as the final focus window.
  • an apparatus for determining a focus window comprising: a determining unit, configured to determine that an image in a current focus window is a flat area, wherein the flat area refers to a contrast value of an image in the current focus window is smaller than a first a threshold unit, configured to expand the current focus window according to at least the first preset ratio and the second preset ratio, wherein the focus window after the current focus window is enlarged according to the first preset ratio is a focus window, the focus window after the current focus window is enlarged according to the second preset ratio is a second focus window; and the calculating unit is configured to calculate at least a contrast value of the image in the first focus window and the a contrast value of an image in the second focus window; an analyzing unit configured to determine a final focus window based on the at least two contrast values.
  • the analyzing unit when the final focus window is determined according to the at least two contrast values, is specifically configured to: according to the at least two contrast values, a focus window corresponding to the maximum contrast value as a final focus window; or a focus window having a contrast value greater than a second threshold and having a preset ratio as a final focus window according to at least two contrast values, wherein the second threshold Greater than the first threshold.
  • an apparatus for determining a focus window comprising: a determining unit, configured to determine a shooting mode adopted by a camera when the image to be captured is taken is a macro mode, and activate a dual focus window, wherein The dual focus window includes a first focus window and a second focus window, the second focus window has a size smaller than a size of the first focus window, and the second focus window is in the first focus window; an analysis unit And determining, during a movement of the motor of the camera, that a contrast value of an image in the first focus window decreases from a first peak, and a contrast value of an image in the second focus window decreases from a second peak
  • the first focus window is used as a final focus window, wherein the first peak is a peak in a contrast curve corresponding to an image in the first focus window, and the second peak is the second The peak in the contrast curve corresponding to the image in the focus window.
  • an apparatus for determining a focus window comprising: a camera, a processor, and a memory, wherein the camera, the processor, and the memory are connected by a bus, wherein: the memory is configured to store the processing a program code executed by the processor, configured to: through the program code in the memory, perform the following operations: when determining a human face in the image to be captured, using a face region as a current focus window; detecting the person a preset position in the face region, and adjusting a width of the current focus window according to the preset position in the face region; stretching the current focus window at least according to the first preset ratio and the second preset ratio a length, wherein the focus window after the length of the current focus window is stretched according to the first preset ratio is a first focus window, and the focus of the current focus window is stretched according to the second preset ratio
  • the window is a second focusing window; at least calculating a contrast value of the image in the first focusing window and a contrast value of the image in the second
  • the processor is configured to detect a preset position in the face area, and adjust according to a preset position in the face area
  • An aspect of the width of the current focus window for performing, by using a program code in the memory, an operation of detecting a position of two eyes in the face region or a position of two eyebrows, and width of the current focus window Adjusted to the distance between the two eyes in the face area or the distance between the two eyebrows.
  • the processor is configured to pass the determining of a final focus window according to the at least two contrast values.
  • the program code in the memory performs an operation of using a focus window corresponding to the maximum contrast value as a final focus window according to at least two contrast values.
  • an apparatus for determining a focus window includes a camera, a processor, and a memory, wherein the camera, the processor, and the memory are connected by a bus, wherein: the memory is configured to store the processing a program code executed by the processor, configured to: through the program code in the memory, perform an operation of: determining that an image in a current focus window is a flat region, wherein the flat region refers to the current focus window The contrast value of the image is smaller than the first threshold; the current focus window is enlarged according to at least the first preset ratio and the second preset ratio, wherein the focus window after the current focus window is enlarged according to the first preset ratio a first focus window, the focus window after the current focus window is enlarged according to the second preset ratio is a second focus window; at least calculating a contrast value of the image in the first focus window and the second focus The contrast value of the image within the window; the final focus window is determined based on at least two contrast values.
  • the processor is configured to pass the program code in the memory in determining a final focus window according to the at least two contrast values Performing the following operations: according to at least two contrast values, the focus window corresponding to the maximum contrast value is used as the final focus window; or the focus window having the contrast value greater than the second threshold and having the smallest preset ratio according to at least two contrast values As a final focus window, wherein the second threshold is greater than the first threshold.
  • an apparatus for determining a focus window comprising: a camera, a processor, and a memory, wherein the camera, the processor, and the memory are connected by a bus, wherein: the memory is configured to store the processing
  • the program code is executed by the processor, and is configured to: through the program code in the memory, perform the following operations: determining that a shooting mode adopted by the camera is a macro mode when the image to be captured is taken, and starting the dual focus window, wherein
  • the dual focus window includes a first focus window and a second focus window, the size of the second focus window is smaller than a size of the first focus window, and the second focus window is within the first focus window;
  • the first focus window is a final focus window, wherein the first peak is a peak in a contrast curve corresponding to an image in the first focus
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions for the device for determining a focus window, which includes a program designed to perform the above aspects.
  • the face region is used as the current focus window, the preset position in the face region is detected, and the current focus window is adjusted according to the preset position in the face region. Width, here by reducing the width of the focus window to avoid background content in the focus window. Stretching the length of the current focus window at least according to the first preset ratio and the second preset ratio, where the focus window is stretched to the body part of the person, which can enhance the richness of the texture in the focus window, thereby effectively improving the face focusing process. Focusing effect. Finally, at least a contrast value of the image within the first focus window and a contrast value of the image within the second focus window are calculated, and a final focus window is determined based on the at least two contrast values.
  • the image in the current focus window is determined to be a flat area; at least the current focus window is enlarged according to the first preset ratio and the second preset ratio; and at least the contrast value of the image in the first focus window and the second focus are calculated.
  • the final focus window is determined based on at least two contrast values.
  • the shooting mode adopted by the camera is a macro mode, and the dual focus window is activated; during the movement of the camera, the contrast value of the image in the first focusing window is determined to decrease from the first peak.
  • the contrast value of the image in the second focus window is decreased from the second peak value, the first focus window is used as the final focus window, and the problem that the objects including different depths of field in the focus window are out of focus can be effectively avoided.
  • FIG. 1 is a schematic diagram of autofocusing using a ranging method in the background art of the present invention
  • FIG. 2 is a schematic diagram of autofocusing by using a hill climbing method in the background art of the present invention
  • FIG. 3 is a schematic diagram of autofocusing for a macro scene in the background art of the present invention.
  • FIG. 4 is a schematic diagram of autofocusing for a flat zone scene in the background art of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal camera according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of determining a focus window for a face region according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of an overview of determining a focus window according to an embodiment of the present invention.
  • FIG. 8 is a second flowchart of an overview of determining a focus window according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of determining a focus window for a flat area scene according to an embodiment of the present invention.
  • FIG. 10 is a third flowchart of an overview of determining a focus window according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of determining a focus window for a macro scene according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of the principle of saliency detection according to an embodiment of the present invention.
  • FIG. 13 is a second schematic diagram of the principle of saliency detection according to an embodiment of the present invention.
  • FIG. 14A is a schematic diagram of determining a saliency detection result according to an embodiment of the present invention.
  • FIG. 14B is a second schematic diagram of determining a saliency detection result according to an embodiment of the present invention.
  • FIG. 15 is a schematic diagram of determining a confidence level of a saliency detection result according to an embodiment of the present invention.
  • 16 is a schematic structural diagram of an apparatus for determining a focus window according to an embodiment of the present invention.
  • FIG. 17 is a second schematic structural diagram of an apparatus for determining a focus window according to an embodiment of the present invention.
  • FIG. 18 is a third schematic structural diagram of an apparatus for determining a focus window according to an embodiment of the present invention.
  • FIG. 19 is a schematic structural diagram of an apparatus for determining a focus window according to an embodiment of the present invention.
  • FIG. 20 is a second schematic structural diagram of an apparatus for determining a focus window according to an embodiment of the present invention.
  • FIG. 21 is a third schematic structural diagram of an apparatus for determining a focus window according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal camera according to an embodiment of the present invention.
  • 5 includes a lens 51, an image sensor (Image Sensor) 52, an image processor (Image Signal Processor, ISP) 53, a central processing unit (CPU) 54, and a random access memory. (random access memory, RAM) 55, battery 56, touch screen 57, liquid crystal display (LCD) 58, image memory 59.
  • image sensor Image Sensor
  • ISP Image Signal Processor
  • CPU central processing unit
  • RAM random access memory
  • RAM random access memory
  • battery 56 touch screen 57
  • LCD liquid crystal display
  • image memory 59 image memory
  • the embodiment of the present invention is a software for improving the autofocus effect, and may be a function module on the ISP or the CPU.
  • the auto-focus device automatically selects the largest face area as the focus window according to the face detection result, as shown in FIG. 6, but in this case, the face detection result often includes a part of the background area, as shown in the figure.
  • the focus window shown in the solid line box because the face area is generally an area with insufficient texture, it is easy to cause the contrast curve to be flat.
  • the phenomenon of defocusing is more likely to occur.
  • the ideal quasi-focus image is not obtained. Therefore, if the background region contains a strong texture region at this time, the contrast curve will appear in the VCM position of the corresponding background region, resulting in out of focus.
  • an embodiment of the present invention provides a method for determining a focus window, which can optimize the focus of a human face by using the method provided by the embodiment of the present invention.
  • the method includes:
  • Step 700 When it is determined that a human face is detected in the image to be captured, the face region is used as the current focus window.
  • the face detection module previews the image to be captured, and analyzes whether there is a face region in the image. If it is determined that the face region exists, the face region that automatically selects the largest is used as the current focus window.
  • Step 710 Detect a preset position in the face area, and adjust a width of the current focus window according to the preset position in the face area.
  • detecting the position of the two eyes or the position of the two eyebrows in the face area adjusting the width of the current focus window to the distance between the two eyes in the face area or the distance between the two eyebrows.
  • the width of the current focus window is adjusted, mainly to reduce the width of the focus window so that the image content of different depth of field is not included in the focus window as much as possible, that is, the background content is preferably not included in the current focus window.
  • Step 720 Stretch the length of the current focus window according to at least the first preset ratio and the second preset ratio, wherein the focus window after the length of the current focus window is stretched according to the first preset ratio is the first focus window, according to the first
  • the second focusing window is the second focusing window after the length of the current focusing window is stretched by two preset ratios.
  • Step 730 Calculate at least the contrast value of the image in the first focus window and the contrast value of the image in the second focus window.
  • the contrast value of the image in the first focus window refers to the peak value in the contrast curve corresponding to the image in the first focus window
  • the contrast value of the image in the second focus window refers to the image in the second focus window.
  • the peak in the corresponding contrast curve refers to the peak in the corresponding contrast curve
  • Step 740 Determine a final focus window based on the at least two contrast values.
  • the final focus window when determining the final focus window according to the at least two contrast values, first determine a focus window corresponding to the maximum contrast value as the final focus window.
  • the autofocus device initiates face detection for the image to be taken.
  • the autofocus device first performs face detection according to any of the above methods or combinations.
  • the auto-focus device determines that the face area is the current focus window.
  • the autofocus device automatically selects the largest face as the focus window after detecting the face.
  • the autofocus device continues to detect the preset position in the face region, and adjusts the width of the current focus window according to the preset position in the detected face region.
  • the autofocus device further determines the position of the human eye or eyebrows and reduces the width of the focus frame to the width between the two eyes or the two eyebrows.
  • the auto-focus device stretches the length of the current focus window according to different preset ratios, calculates the contrast value of the image in the focus window corresponding to different preset ratios, and determines the final focus window according to the obtained contrast value.
  • the auto-focus device pulls down the focus window to the neck area, as shown by the dashed focus window in Figure 7, to increase the sharpness of the contrast curve.
  • the auto-focus device can pull down the focusing window to 1.2 times, 1.4 times, 1.6 times, 1.8 times, 2 times the length of the original focusing window, and respectively calculate the images in the focusing window of each pull-down ratio respectively.
  • the contrast value, from which the focus window with the largest contrast value is selected, is determined as the final focus window.
  • contrast value refers to the peak value in the contrast curve corresponding to each focus window.
  • the focus window by reducing the width of the focus window, the background content of the focus window is prevented, and the focus window is stretched to the body part of the person, thereby enhancing the richness of the texture in the focus window, thereby effectively improving the focus of the face. Focusing effect in the process.
  • a flat area scene such as a sky or a white wall is susceptible to noise or camera shake due to insufficient texture of the image content, which makes it difficult to find a quasi-focal position, thereby causing out-of-focus.
  • an embodiment of the present invention provides a method for determining a focus window.
  • the method for determining a focus window is provided by using an embodiment of the present invention, which can effectively avoid the problem of finding a quasi-focus position in a flat area, or even a problem of defocusing.
  • the method includes:
  • Step 800 Determine that the image in the current focus window is a flat area, wherein the flat area refers to the contrast value of the image in the current focus window is less than the first threshold.
  • Step 810 Expand the current focus window according to at least the first preset ratio and the second preset ratio, wherein the focus window after the current focus window is expanded according to the first preset ratio is the first focus window, and is expanded according to the second preset ratio.
  • the focus window behind the current focus window is the second focus window.
  • Step 820 Calculate at least a contrast value of the image in the first focus window and a contrast value of the image in the second focus window.
  • Step 830 Determine a final focus window based on the at least two contrast values.
  • the following two methods may be used:
  • the first method the focus window corresponding to the maximum contrast value is used as the final focus window according to at least two contrast values.
  • the second method according to the at least two contrast values, the focus window having the contrast value greater than the second threshold and the preset ratio being the smallest is used as the final focus window, wherein the second threshold is greater than the first threshold.
  • the autofocus device determines that the image content within the current focus window is a flat area.
  • the flat area means that the contrast value of the image in the current focus window is smaller than the first threshold.
  • the autofocus device determines that the image content to be captured has no human face, it is assumed that the focus window is initially placed in a central region of the image content at a preset size, and it is determined whether the contrast value of the image in the focus window is less than the first threshold. If it is determined that the contrast value of the image in the current focus window is less than the first threshold, it is determined that the image in the current focus window is a flat area.
  • the autofocus device enlarges the current focus window according to at least the first preset ratio and the second preset ratio, and at least calculates a contrast value of the image in the first focus window and a contrast value of the image in the second focus window, where
  • the focus window after the current focus window is expanded according to the first preset ratio is the first focus window
  • the focus window after the current focus window is enlarged according to the second preset ratio is the second focus window.
  • the autofocus device expands the current focus window to 1.2 times, 1.4 times, 1.6 times, 1.8 times, and 2 times, and calculates the contrast value corresponding to each focus window.
  • the method of expanding the focus window here is to increase the texture strength in the focus window.
  • the autofocus device determines the final focus window based on at least two contrast values.
  • the autofocus device expands the focus window to 1.2 times, 1.4 times, 1.6 times, 1.8 times, and 2 times, and calculates the contrast value of the image in the five focus windows, and selects the minimum focus whose contrast value is greater than the given threshold T1.
  • the window acts as the final focus window.
  • the autofocus device expands the focus window to 1.2 times, 1.4 times, 1.6 times, 1.8 times, and 2 times, and calculates the contrast value of the image in the five focus windows, and selects the focus window with the largest contrast value as the final focus. window.
  • the initial focusing window determines that the image in the focusing window is a flat area, and expands the focusing window, as shown by the black dotted-focus window in the figure, which enhances the image content in the focusing window. Texture strength, the value of contrast increases.
  • the focus window is enlarged until a sufficient texture area is included in the focus window, thereby effectively improving Focusing effect.
  • the embodiment of the invention provides a method for determining the focus window to avoid different in the focus window. Objects with depth of field can easily cause focus on the background.
  • the method includes:
  • Step 1000 Determine that the shooting mode adopted by the camera when shooting the image to be captured is a macro mode, and activate the dual focus window, wherein the dual focus window includes a first focusing window and a second focusing window, and the size of the second focusing window is smaller than the first focusing window. The size of the window, and the second focus window is within the first focus window.
  • Step 1010 During the motor movement of the camera, determining that the contrast value of the image in the first focus window decreases from the first peak value, and the contrast value of the image in the second focus window decreases from the second peak value, the first focus is performed.
  • the window serves as a final focus window, wherein the first peak is a peak in the contrast curve corresponding to the image in the first focus window, and the second peak is a peak in the contrast curve corresponding to the image in the second focus window.
  • the first peak and the second peak respectively fall within a preset motor range corresponding to the motor position.
  • the first peak and the second peak are substantially peaks corresponding to the same motor position, ie the first peak and the second peak have the same abscissa.
  • Embodiments of the present invention provide a method for determining a focus window.
  • the autofocus device determines that the shooting mode adopted by the camera when shooting an image to be captured is the macro mode.
  • the object distance of 50 cm is usually the boundary between the macro mode and the normal mode, so that it is usually calculated as macro within 50 cm.
  • the concept of magnification can also be used to define the macro more accurately. If the height of the object is X and the imaging height on the film (or CCD, CMOS) is Y, then the magnification is equal to Y:X. Usually the smaller of the numerator or denominator is reduced to 1, for example 1:5, 2:1, and so on. Normally, digital cameras have a magnification between 1:1 and 1:10, which is a range of near macro photography.
  • the auto-focus device activates the dual focus window, wherein the dual focus window includes the first focus window And a second focusing window, the size of the second focusing window is smaller than the size of the first focusing window, and the second focusing window is within the first focusing window.
  • the autofocus device moves during the VCM, it is determined that the contrast value of the image appearing in the first focus window starts to decrease from the first peak, and the contrast value of the image in the second focus window decreases from the second peak synchronization.
  • the first focus window is used as the final focus window.
  • the contrast value of the image in the first focus window decreases from the first peak value, and the contrast value of the image in the second focus window is still in an upward trend, it indicates that the focus result of the current first focus window is to be photographed. On the background in the image.
  • the contrast value of the two focus windows is simultaneously calculated by the method provided by the embodiment of the present invention, and it is confirmed that the correct focus position is found only when the contrast curves corresponding to the two focus windows respectively start to decrease.
  • the embodiment of the present invention further provides a method for determining a focus window to avoid the problem that the focus area is not the focus area desired by the user, resulting in out of focus.
  • the autofocus device analyzes the image to be taken according to the saliency detection technique, and automatically detects the saliency region.
  • Significance detection is a well-known technique. Significant detection is the search for areas of the image that may cause visual attention to the human eye. The most influential is the Saliency model proposed by Ittihe Koch et al., which extracts three characteristic maps of bright points, directions and colors from the original image, thereby comprehensively judging the characteristics of each pixel in the whole image. Information, and then the difference between the pixel and the pixels in the surrounding area is taken as the saliency of the pixel, and the extracted saliency map is applied to the method of winning the winner in the neural network as the basis for the transfer of the visual attention, so as to extract the significantness of the image. region.
  • Saliency model proposed by Ittihe Koch et al.
  • the focus window is placed in the salient region.
  • the autofocus device runs a significant region detection algorithm to detect whether the image content has a significant region.
  • the saliency region is determined after the eigenfunction detection algorithm is run by the autofocus device. Further, referring to Fig. 12, the focus window is placed in the detected saliency region.
  • the saliency detection result in the image to be captured may be determined.
  • the saliency detection result is not concentrated enough, and both sides of the figure are There is a pattern of flowers, and the results of the saliency test in Fig. 14B are more concentrated, and only one flower in the figure is in a prominent position.
  • the confidence threshold is also required to be greater than a pre-set confidence threshold, wherein the threshold is a threshold used to describe the degree of saliency, for example, as shown in FIG. In Fig.
  • the flower on the left side is close to the background color, so the degree of significance is low, and the flower on the right side has a higher degree of significance than the background color. At this time, the right image with higher degree of significance can be selected as the right image. Significant area.
  • the focus window is initially placed in a central area in the image to be captured with a preset size
  • it is changed to the saliency area, as in the black focus window in FIG. If the distribution of the significance detection results in the image content is scattered or the confidence is low, the size and position of the focus window are kept unchanged.
  • the method provided by the embodiment of the present invention detects the region of the image to be captured that is more interesting by the sensibility detection algorithm as a saliency region, and changes the focus window to the saliency region.
  • an embodiment of the present invention provides a device 1600 for determining a focus window, including:
  • a determining unit 1601 configured to determine a face region as a current focus window when a human face is detected in the image to be captured;
  • the detecting unit 1602 is configured to detect a preset position in the face area, and adjust a width of the current focus window according to the preset position in the face area;
  • the adjusting unit 1603 is configured to stretch the length of the current focusing window according to at least the first preset ratio and the second preset ratio, wherein the focusing window after the length of the current focusing window is stretched according to the first preset ratio is the first focusing window , the focus window after the length of the current focus window is stretched according to the second preset ratio is a second focus window;
  • the calculating unit 1604 is configured to calculate at least a contrast value of an image in the first focus window and a contrast value of an image in the second focus window;
  • the analyzing unit 1605 is configured to determine a final focusing window according to the at least two contrast values.
  • the detecting unit 1602 when detecting the preset position in the face area and adjusting the width of the current focus window according to the preset position in the face area, the detecting unit 1602 is specifically configured to:
  • the analyzing unit 1605 when determining the final focus window according to the at least two contrast values, is specifically configured to:
  • the focus window corresponding to the maximum contrast value is used as the final focus window based on at least two contrast values.
  • a method and apparatus 1700 for determining a focus window includes:
  • a determining unit 1701 configured to determine that an image in the current focus window is a flat area, where the flat area refers to a contrast value of an image in the current focus window is less than a first threshold;
  • the adjusting unit 1702 is configured to expand the current focusing window according to the first preset ratio and the second preset ratio, wherein the focusing window after the current focusing window is expanded according to the first preset ratio is the first focusing window, according to the second pre- The proportional focus is enlarged to the second focus window after the current focus window;
  • the calculating unit 1703 is configured to calculate at least a contrast value of an image in the first focus window and a contrast value of an image in the second focus window;
  • the analyzing unit 1704 is configured to determine a final focusing window according to the at least two contrast values.
  • the analyzing unit 1704 is specifically configured to:
  • the focus window corresponding to the maximum contrast value is used as the final focus window according to at least two contrast values;
  • the focus window having the contrast value greater than the second threshold and the preset ratio being the smallest is used as the final focus window, wherein the second threshold is greater than the first threshold.
  • an apparatus 1800 for determining a focus window includes:
  • the determining unit 1801 is configured to determine that the shooting mode adopted by the camera is a macro mode when the image to be captured is taken, and activate the dual focus window, wherein the dual focus window includes a first focusing window and a second focusing window, and the size of the second focusing window is smaller than a size of the first focus window, and the second focus window is within the first focus window;
  • the analyzing unit 1802 is configured to: when the motor of the camera moves, determine that the contrast value of the image in the first focus window decreases from the first peak, and the contrast value of the image in the second focus window decreases from the second peak,
  • the first focus window serves as a final focus window, wherein the first peak is a peak in the contrast curve corresponding to the image in the first focus window, and the second peak is a peak in the contrast curve corresponding to the image in the second focus window.
  • each functional module in each embodiment of the present application may be used. It can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
  • an embodiment of the present invention provides an apparatus for determining a focus window, including a camera 1901, a processor 1902, and a memory 1903.
  • the camera 1901, the processor 1902, and the memory 1903 are connected by a bus, where:
  • a memory 1903 configured to store program code executed by the processor
  • the processor 1902 is configured to: through the program code in the memory, perform the following operations: determining to be photographed When a face is detected in the image, the face region is used as the current focus window; the preset position in the face region is detected, and the width of the current focus window is adjusted according to the preset position in the face region; at least according to the first preset The ratio and the second preset ratio stretch the length of the current focus window, wherein the focus window after the length of the current focus window is stretched according to the first preset ratio is the first focus window, and the current focus window is stretched according to the second preset ratio
  • the focus window after the length is the second focus window; at least the contrast value of the image in the first focus window and the contrast value of the image in the second focus window are calculated; and the final focus window is determined according to the at least two contrast values.
  • the processor 1902 is configured to detect a preset position in the face region, and adjust an aspect of a current focus window according to the preset position in the face region, for performing the following operations by using a program code in the memory. :
  • the processor 1902 is configured to: through the program code in the memory, perform the following operations in terms of determining a final focus window according to the at least two contrast values:
  • the focus window corresponding to the maximum contrast value is used as the final focus window based on at least two contrast values.
  • an embodiment of the present invention provides a device for determining a focus window, including a camera 2001, a processor 2002, and a memory 2003.
  • the camera 2001, the processor 2002, and the memory 2003 are connected by a bus, where:
  • a memory 2003 configured to store program code executed by the processor
  • the processor 2002 is configured to: through the program code in the memory, perform the following operations: determining that the image in the current focus window is a flat area, wherein the flat area refers to a contrast value of the image in the current focus window is less than the first threshold; A preset ratio and a second preset ratio enlarge the current focus window, wherein the focus window after the current focus window is expanded according to the first preset ratio is the first focus window, and the focus after the current focus window is expanded according to the second preset ratio
  • the window is a second focus window; at least a contrast value of the image in the first focus window and a contrast value of the image in the second focus window are calculated; and a final focus window is determined according to the at least two contrast values.
  • the processor 2002 is configured to: through the program code in the memory, perform the following operations in terms of determining a final focus window according to the at least two contrast values:
  • the focus window corresponding to the maximum contrast value is used as the final focus window according to at least two contrast values;
  • the focus window having the contrast value greater than the second threshold and the preset ratio being the smallest is used as the final focus window, wherein the second threshold is greater than the first threshold.
  • an embodiment of the present invention provides an apparatus for determining a focus window, including a camera 2101, a processor 2102, and a memory 2103.
  • the camera 2101, the processor 2102, and the memory 2103 are connected by a bus, where:
  • a memory 2103 configured to store program code executed by the processor
  • the processor 2102 is configured to: through the program code in the memory, perform the following operations: determine that the shooting mode adopted by the camera when shooting the image to be captured is a macro mode, and activate the dual focus window, wherein the dual focus window includes the first focus window and the first a second focus window, the size of the second focus window is smaller than the size of the first focus window, and the second focus window is in the first focus window; during the motor movement of the camera, determining the contrast value of the image in the first focus window from When the first peak falls and the contrast value of the image in the second focus window decreases from the second peak, the first focus window is used as the final focus window, wherein the first peak is the contrast corresponding to the image in the first focus window The peak in the curve, the second peak is the peak in the contrast curve corresponding to the image in the second focus window.
  • the bus is shown by a thick line in FIG. 19, FIG. 20, and FIG. 21, and the connection manner between other components is merely illustrative and not limited.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like.
  • only one thick line is shown in FIGS. 19, 20, and 21, but it does not mean that there is only one bus or one type of bus.
  • the memory is used to store program code executed by the processor, and may be a volatile memory (English: volatile memory), such as random access memory (English: random-access memory, abbreviation: RAM); It can be a non-volatile memory (English: non-volatile memory), such as read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard disk drive, Abbreviation: HDD) Or solid state drive (English: solid-state drive, SSD), or memory is any other medium that can be used to carry or store desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited to this.
  • the memory can be a combination of the above memories.
  • the processor in the embodiment of the present invention may be a central processing unit (English: central processing unit, referred to as CPU).
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions for the device for determining a focus window, which includes a program designed to perform the above aspects.
  • the face region is used as the current focus window, the preset position in the face region is detected, and the current focus window is adjusted according to the preset position in the face region. Width, here by reducing the width of the focus window to avoid background content in the focus window. Stretching the length of the current focus window at least according to the first preset ratio and the second preset ratio, where the focus window is stretched to the body part of the person, which can enhance the richness of the texture in the focus window, thereby effectively improving the face focusing process. Focusing effect. Finally, at least a contrast value of the image within the first focus window and a contrast value of the image within the second focus window are calculated, and a final focus window is determined based on the at least two contrast values.
  • the image in the current focus window is determined to be a flat area; at least the current focus window is enlarged according to the first preset ratio and the second preset ratio; and at least the contrast value of the image in the first focus window and the second focus are calculated.
  • the final focus window is determined based on at least two contrast values.
  • the shooting mode adopted by the camera is a macro mode, and the dual focus window is activated; during the movement of the camera, the contrast value of the image in the first focusing window is determined to decrease from the first peak.
  • the contrast value of the image in the second focus window is decreased from the second peak value, the first focus window is used as the final focus window, and the problem that the objects including different depths of field in the focus window are out of focus can be effectively avoided.
  • embodiments of the present invention may be provided as a method, system, or Computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Abstract

一种确定对焦窗的方法、装置及设备,用以解决采用爬山法容易导致失焦的问题,该方面包括:确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗;检测人脸区域中的预设位置,并根据人脸区域中的预设位置调整当前对焦窗的宽度;至少按照第一预设比例和第二预设比例拉伸当前对焦窗的长度;至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值;根据至少两个对比度值确定最终的对焦窗。因此,通过缩小对焦窗宽度,避免对焦窗出现背景内容,将对焦窗拉伸到人的身体部分,能够提升对焦窗内纹理丰富程度,进而有效提升人脸对焦过程中的对焦效果。

Description

一种确定对焦窗的方法、装置及设备 技术领域
本发明涉及数字图像技术领域,尤其涉及一种确定对焦窗的方法、装置及设备。
背景技术
自动对焦是指通过自动对焦算法控制音圈马达(Voice Coil Motor,VCM)到图像传感器的距离,使得要拍摄物体主体达到最清晰的状态。
常用的自动对焦算法可以分为两类:主动式对焦算法,即测距法,和被动式对焦算法,即爬山法。
测距法通过红外测距,超声波测距,双目立体视觉等方法测量被摄主体到镜头的距离,即物距,计算对应物距的VCM的位置,并调整VCM的位置获取准焦图像。测距法的特点是对焦速度较快,但是需要额外的测距模块,因此成本高,对测距模块的精度要求也较高。参阅图1所示,根据测得的物距计算其对应的VCM的位置,直接确定对比度(contrast)最佳时的准焦位置,获得准焦图像。
爬山法通过变换VCM的位置获得不同VCM位置分别对应的图像,分析其对比度及对比度变化趋势,找出对比度最佳时的VCM位置,得到准焦图像。爬山法的特点是对焦速度较慢,但是成本较低,对焦精度较高。参阅图2所示,分析确定对比度最佳时对应的VCM位置完成对焦,获得准焦图像。
但是,为了快速地获得准焦图像,在采用爬山法对焦时,一般并不搜索全部VCM的行程范围,而是在找到contrast曲线的第一个峰值时就确定为准焦位置,然而对于某些场景,比如微距场景,对焦窗内的一部分物体距离镜头很近,还有一部分物体距离镜头很远,这样会使得contrast曲线成为一条双峰的曲线,有可能导致对焦结果为图像内容中的背景部分,而得不到理想的准焦图像。
例如,参阅图3所示,对于微距场景,出现了如图所示contrast曲线双峰的情形,不同的VCM位置使contrast曲线在近处的花的位置有一个峰值,对应黑色对焦窗,在远处的山的位置有第二个峰值,对应白色对焦窗。
又例如,由于爬山法对焦一般选择预览画面中心区域作为对焦窗,但是有时候中心区域并不是用户希望对焦的区域,因此使用中心对焦窗对焦会导致失焦,得不到理想的准焦图像。
此外,对于平坦区对焦,比如天空等平坦区场景,对焦窗内没有明显的纹理丰富的物体,马达行程范围内没有明显的contrast曲线的峰值,有可能会出现寻找准焦位置困难,甚至失焦,得不到理想的准焦图像。同理,对于人脸对焦的场景,人脸区域相对来说也不是一个纹理非常丰富的区域,单纯使用人脸区域进行对焦,同样容易出现由于contrast曲线山峰不够尖锐,导致最终确定的准焦位置不够准确的问题,且图像噪声或者对焦过程中被拍摄人或者相机的移动对于contrast曲线的峰值确定也有较大影响。例如,参阅图4所示,图像内容为天空场景,该图像对应的contrast曲线很平,不容易确定准确的峰值,可能导致最终确定的准焦位置有误,得不到理想的准焦图像。
综上,采用爬山法进行自动对焦的过程中,针对不同的拍摄场景,由于对焦窗的搜索范围限制或对焦窗内的图像内容纹理不够丰富,可能导致寻找准焦位置困难,甚至失焦,得不到理想的准焦图像。
发明内容
本发明实施例的目的是提供一种确定对焦窗的方法、装置及设备,以解决采用爬山法进行自动对焦时寻找准焦位置困难,甚至失焦,得不到理想的准焦图像的问题。
本发明实施例的目的是通过以下技术方案实现的:
第一方面,一种确定对焦窗的方法,包括:确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗;检测所述人脸区域中的预设位置,并根 据所述人脸区域中的预设位置调整所述当前对焦窗的宽度;至少按照第一预设比例和第二预设比例拉伸所述当前对焦窗的长度,其中按照所述第一预设比例拉伸所述当前对焦窗的长度后的对焦窗为第一对焦窗,按照所述第二预设比例拉伸所述当前对焦窗的长度后的对焦窗为第二对焦窗;至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;根据至少两个对比度值确定最终的对焦窗。
因此,采用上述的确定对焦窗的方法,通过缩小对焦窗宽度,避免对焦窗出现背景内容,将对焦窗拉伸到人的身体部分,能够提升对焦窗内纹理丰富程度,进而有效提升人脸对焦过程中的对焦效果。
结合第一方面,在第一方面的第一种可能的实现方式中,检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度,包括:检测所述人脸区域中两眼的位置或两眉的位置,将所述当前对焦窗的宽度调整为所述人脸区域中两眼的距离或两眉的距离。
结合第一方面或第一种可能的实现方式,在第二种可能的实现方式中,根据至少两个对比度值确定最终的对焦窗,包括:根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
第二方面,一种确定对焦窗的方法,包括:确定当前对焦窗内的图像为平坦区,其中,所述平坦区指所述当前对焦窗内的图像的对比度值小于第一门限;至少按照第一预设比例和第二预设比例扩大所述当前对焦窗,其中,按照所述第一预设比例扩大所述当前对焦窗后的对焦窗为第一对焦窗,按照所述第二预设比例扩大所述当前对焦窗后的对焦窗为第二对焦窗;至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;根据至少两个对比度值,确定最终的对焦窗。
因此,采用上述确定对焦窗的方法,在根据对焦窗内图像的对比度值判断当前对焦窗内的图像为平坦区后,扩大对焦窗直到有足够的纹理区域包含在对焦窗内,进而有效提升对焦效果。
结合第二方面,在第二方面的第一种可能的实现方式中,根据至少两个对比度值,确定最终的对焦窗,包括:根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗;或者根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,所述第二门限大于所述第一门限。
第三方面,一种确定对焦窗的方法,包括:确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,所述双对焦窗包括第一对焦窗和第二对焦窗,所述第二对焦窗的尺寸小于所述第一对焦窗的尺寸,且所述第二对焦窗在所述第一对焦窗内;在所述摄像头的马达移动过程中,确定所述第一对焦窗内的图像的对比度值从第一峰值下降、且所述第二对焦窗内的图像的对比度值从第二峰值下降时,将所述第一对焦窗作为最终的对焦窗,其中,所述第一峰值是所述第一对焦窗内的图像对应的对比度曲线中的峰值,所述第二峰值是所述第二对焦窗内的图像对应的对比度曲线中的峰值。
因此,采用上述确定对焦窗的方法,能够有效避免对焦窗内包含不同景深的物体容易出现失焦的问题。
本发明实施例还提供一种确定对焦窗的方法包括:根据显著性检测技术对待拍摄图像进行分析,自动检测显著性区域。确定待拍摄图像中存在显著性区域时,将对焦窗置于该显著性区域。
因此,采用上述确定对焦窗的方法能够解决对焦区域不是用户希望的对焦区域而导致失焦的问题。
第四方面,一种确定对焦窗的装置,包括:确定单元,用于确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗;检测单元,用于检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度;调整单元,用于至少按照第一预设比例和第二预设比例拉伸所述当前对焦窗的长度,其中按照所述第一预设比例拉伸所述当前对焦窗的长度后的对焦窗为第一对焦窗,按照所述第二预设比例拉伸所述当前对焦窗 的长度后的对焦窗为第二对焦窗;计算单元,用于至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;分析单元,用于根据至少两个对比度值确定最终的对焦窗。
结合第四方面,在第四方面的第一种可能的实现方式中,检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度时,所述检测单元,具体用于:检测所述人脸区域中两眼的位置或两眉的位置,将所述当前对焦窗的宽度调整为所述人脸区域中两眼的距离或两眉的距离。
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,根据至少两个对比度值确定最终的对焦窗时,所述分析单元,具体用于:根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
第五方面,一种确定对焦窗的装置,包括:确定单元,用于确定当前对焦窗内的图像为平坦区,其中,所述平坦区指所述当前对焦窗内的图像的对比度值小于第一门限;调整单元,用于至少按照第一预设比例和第二预设比例扩大所述当前对焦窗,其中,按照所述第一预设比例扩大所述当前对焦窗后的对焦窗为第一对焦窗,按照所述第二预设比例扩大所述当前对焦窗后的对焦窗为第二对焦窗;计算单元,用于至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;分析单元,用于根据至少两个对比度值,确定最终的对焦窗。
结合第五方面,在第五方面的第一种可能的实现方式中,根据至少两个对比度值,确定最终的对焦窗时,所述分析单元,具体用于:根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗;或者根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,所述第二门限大于所述第一门限。
第六方面,一种确定对焦窗的装置,包括:确定单元,用于确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,所述 双对焦窗包括第一对焦窗和第二对焦窗,所述第二对焦窗的尺寸小于所述第一对焦窗的尺寸,且所述第二对焦窗在所述第一对焦窗内;分析单元,用于在所述摄像头的马达移动过程中,确定所述第一对焦窗内的图像的对比度值从第一峰值下降、且所述第二对焦窗内的图像的对比度值从第二峰值下降时,将所述第一对焦窗作为最终的对焦窗,其中,所述第一峰值是所述第一对焦窗内的图像对应的对比度曲线中的峰值,所述第二峰值是所述第二对焦窗内的图像对应的对比度曲线中的峰值。
第七方面,一种确定对焦窗的设备,包括摄像头、处理器和存储器,所述摄像头、所述处理器以及所述存储器之间通过总线连接,其中:所述存储器,用于存储所述处理器执行的程序代码;所述处理器,用于通过所述存储器中的程序代码,执行以下操作:确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗;检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度;至少按照第一预设比例和第二预设比例拉伸所述当前对焦窗的长度,其中按照所述第一预设比例拉伸所述当前对焦窗的长度后的对焦窗为第一对焦窗,按照所述第二预设比例拉伸所述当前对焦窗的长度后的对焦窗为第二对焦窗;至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;根据至少两个对比度值确定最终的对焦窗。
结合第七方面,在第七方面的第一种可能的实现方式中,所述处理器,在检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度的方面,用于通过所述存储器中的程序代码,执行以下操作:检测所述人脸区域中两眼的位置或两眉的位置,将所述当前对焦窗的宽度调整为所述人脸区域中两眼的距离或两眉的距离。
结合第七方面或第七方面的第一种可能的实现方式,在第二种可能的实现方式中,所述处理器,在根据至少两个对比度值确定最终的对焦窗的方面,用于通过所述存储器中的程序代码,执行以下操作:根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
第八方面,一种确定对焦窗的设备,包括摄像头、处理器和存储器,所述摄像头、所述处理器以及所述存储器之间通过总线连接,其中:所述存储器,用于存储所述处理器执行的程序代码;所述处理器,用于通过所述存储器中的程序代码,执行以下操作:确定当前对焦窗内的图像为平坦区,其中,所述平坦区指所述当前对焦窗内的图像的对比度值小于第一门限;至少按照第一预设比例和第二预设比例扩大所述当前对焦窗,其中,按照所述第一预设比例扩大所述当前对焦窗后的对焦窗为第一对焦窗,按照所述第二预设比例扩大所述当前对焦窗后的对焦窗为第二对焦窗;至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;根据至少两个对比度值,确定最终的对焦窗。
结合第八方面,在第八方面的第一种可能的实现方式中,所述处理器,在根据至少两个对比度值,确定最终的对焦窗的方面,用于通过所述存储器中的程序代码,执行以下操作:根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗;或者根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,所述第二门限大于所述第一门限。
第九方面,一种确定对焦窗的设备,包括摄像头、处理器和存储器,所述摄像头、所述处理器以及所述存储器之间通过总线连接,其中:所述存储器,用于存储所述处理器执行的程序代码;所述处理器,用于通过所述存储器中的程序代码,执行以下操作:确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,所述双对焦窗包括第一对焦窗和第二对焦窗,所述第二对焦窗的尺寸小于所述第一对焦窗的尺寸,且所述第二对焦窗在所述第一对焦窗内;在所述摄像头的马达移动过程中,确定所述第一对焦窗内的图像的对比度值从第一峰值下降、且所述第二对焦窗内的图像的对比度值从第二峰值下降时,将所述第一对焦窗作为最终的对焦窗,其中,所述第一峰值是所述第一对焦窗内的图像对应的对比度曲线中的峰值,所述第二峰值是所述第二对焦窗内的图像对应的对比度曲线中的峰值。
第十方面,本发明实施例提供了一种计算机存储介质,用于储存为上述确定对焦窗的设备所用的计算机软件指令,其包含用于执行上述方面所设计的程序。
本发明实施例中确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗,检测人脸区域中的预设位置,并根据人脸区域中的预设位置调整当前对焦窗的宽度,这里通过缩小对焦窗宽度,避免对焦窗出现背景内容。至少按照第一预设比例和第二预设比例拉伸当前对焦窗的长度,这里将对焦窗拉伸到人的身体部分,能够提升对焦窗内纹理丰富程度,进而有效提升人脸对焦过程中的对焦效果。最后,至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值,根据至少两个对比度值确定最终的对焦窗。
本发明实施例中确定当前对焦窗内的图像为平坦区;至少按照第一预设比例和第二预设比例扩大当前对焦窗;至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值,这里扩大对焦窗直到有足够的纹理区域包含在对焦窗内,能够有效提升对焦效果,最后,根据至少两个对比度值,确定最终的对焦窗。
本发明实施例中确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗;在摄像头的马达移动过程中,确定第一对焦窗内的图像的对比度值从第一峰值下降、且第二对焦窗内的图像的对比度值从第二峰值下降时,将第一对焦窗作为最终的对焦窗,进而能够有效避免对焦窗内包含不同景深的物体导致失焦的问题。
附图说明
图1为本发明背景技术中采用测距法进行自动对焦的原理图;
图2为本发明背景技术中采用爬山法进行自动对焦的原理图;
图3为本发明背景技术中针对微距场景进行自动对焦的示意图;
图4为本发明背景技术中针对平坦区场景进行自动对焦的示意图;
图5为本发明实施例中终端相机结构示意图;
图6为本发明实施例中针对人脸区域确定对焦窗的示意图;
图7为本发明实施例中确定对焦窗的概述流程图之一;
图8为本发明实施例中确定对焦窗的概述流程图之二;
图9为本发明实施例中针对平坦区场景确定对焦窗的示意图;
图10为本发明实施例中确定对焦窗的概述流程图之三;
图11为本发明实施例中针对微距场景确定对焦窗的示意图;
图12为本发明实施例中显著性检测的原理示意图之一;
图13为本发明实施例中显著性检测的原理示意图之二;
图14A为本发明实施例中针对显著性检测结果进行判断的示意图之一;
图14B为本发明实施例中针对显著性检测结果进行判断的示意图之二;
图15为本发明实施例中针对显著性检测结果的置信度进行判断的示意图;
图16为本发明实施例中确定对焦窗的装置结构示意图之一;
图17为本发明实施例中确定对焦窗的装置结构示意图之二;
图18为本发明实施例中确定对焦窗的装置结构示意图之三;
图19为本发明实施例中确定对焦窗的设备结构示意图之一;
图20为本发明实施例中确定对焦窗的设备结构示意图之二;
图21为本发明实施例中确定对焦窗的设备结构示意图之三。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,并不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参阅图5所示,图5为本发明实施例中终端相机结构示意图。图5中包括镜头51、图像传感器(Image Sensor)52、图像处理器(Image Signal Processor,ISP)53、中央处理器(Central Processing Unit,CPU)54、随机存取存储器 (random access memory,RAM)55、电池56、触摸屏57、液晶显示器(Liquid Crystal Display,LCD)58、图像存储器59。
其中,本发明实施例为一种用于提高自动对焦效果的软件,可以为ISP或CPU上的一功能模块。
现有技术下,自动对焦装置根据人脸检测结果一般自动选择最大的人脸区域作为对焦窗,如图6所示,但是这种情况下,人脸检测结果往往会包含部分背景区域,如图中实线方框所示的对焦窗,由于人脸区域一般是纹理不够丰富的区域,容易导致contrast曲线平坦,此外,在相机抖动或噪声较大的情况下,更加容易发生失焦的现象,得不到理想的准焦图像。因此,如果此时背景区域中包含强纹理区域,就会导致contrast曲线在对应背景区域的VCM位置出现contrast尖峰,造成失焦。
参阅图7所示,本发明实施例提供一种确定对焦窗的方法,采用本发明实施例提供的方法,能够实现对人脸对焦的优化。
该方法包括:
步骤700:确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗。
可选的,人脸检测模块预览待拍摄图像,分析图像中是否存在人脸区域,若确定存在人脸区域,则可将自动选择最大的人脸区域作为当前对焦窗。
步骤710:检测人脸区域中的预设位置,并根据人脸区域中的预设位置调整当前对焦窗的宽度。
可选的,检测人脸区域中两眼的位置或两眉的位置,将当前对焦窗的宽度调整为人脸区域中两眼的距离或两眉的距离。
这里将当前对焦窗的宽度进行调整,主要是为将对焦窗的宽度缩小以使对焦窗内尽量不包含不同景深的图像内容,即,使当前对焦窗中最好不再包括背景内容。
步骤720:至少按照第一预设比例和第二预设比例拉伸当前对焦窗的长度,其中按照第一预设比例拉伸当前对焦窗的长度后的对焦窗为第一对焦窗,按照第二预设比例拉伸当前对焦窗的长度后的对焦窗为第二对焦窗。
步骤730:至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值。
须知,这里的第一对焦窗内的图像的对比度值是指第一对焦窗内的图像对应的对比度曲线中的峰值,第二对焦窗内的图像的对比度值是指第二对焦窗内的图像对应的对比度曲线中的峰值。
步骤740:根据至少两个对比度值确定最终的对焦窗。
可选的,根据至少两个对比度值确定最终的对焦窗时,首先确定其中最大对比度值对应的对焦窗作为最终的对焦窗。
采用上述步骤700~步骤740所述的方法,能够有效避免人脸对焦时容易出现失焦的问题。下面以一个具体实施例进行说明
首先,自动对焦装置对待拍摄图像启动人脸检测。
目前用于人脸检测的主流方法包括基于几何特征的方法、基于肤色模型的方法和基于统计理论的方法等。
例如,自动对焦装置根据上述任一种方法或组合,首先进行人脸检测。
接着,自动对焦装置在检测到人脸后,确定人脸区域为当前对焦窗
例如,自动对焦装置在检测到人脸后,自动选择最大的人脸作为对焦窗。
然后,自动对焦装置继续检测人脸区域中的预设位置,并根据检测到的人脸区域中的预设位置调整当前对焦窗的宽度。
例如,自动对焦装置进一步确定人眼或眉毛的位置,并将对焦框的宽度缩小到两眼或两个眉毛之间的宽度。
接下来,自动对焦装置按照不同的预设比例拉伸当前对焦窗的长度,计算不同的预设比例对应的对焦窗内的图像的对比度值,并根据得到的对比度值确定最终对焦窗。
例如,考虑到人的衣服往往是高纹理区域,因此,自动对焦装置下拉对焦窗至脖颈区域,如图7中虚线对焦窗,以提升contrast曲线的尖锐程度。
可选的,自动对焦装置可下拉对焦窗至原对焦窗长度的1.2倍,1.4倍,1.6倍,1.8倍,2倍,并分别计算各个下拉倍率的对焦窗内的图像分别对应的 contrast值,从中选择contrast值最大的对焦窗确定为最终的对焦窗。
须知,这里的对比度值是指每个对焦窗对应的对比度曲线中的峰值。
因此,采用上述的确定对焦窗的方法,通过缩小对焦窗宽度,避免对焦窗出现背景内容,将对焦窗拉伸到人的身体部分,能够提升对焦窗内纹理丰富程度,进而有效提升人脸对焦过程中的对焦效果。
现有技术中,天空或者白墙等平坦区场景,由于图像内容纹理不丰富,容易受到噪声或者相机抖动等因素影响,导致寻找准焦位置困难,进而造成失焦。
参阅图8所示,本发明实施例提供一种确定对焦窗的方法,采用本发明实施例提供确定对焦窗的方法,能够有效避免在平坦区寻找准焦位置困难,甚至失焦的问题。
该方法包括:
步骤800:确定当前对焦窗内的图像为平坦区,其中,平坦区指当前对焦窗内的图像的对比度值小于第一门限。
步骤810:至少按照第一预设比例和第二预设比例扩大当前对焦窗,其中,按照第一预设比例扩大当前对焦窗后的对焦窗为第一对焦窗,按照第二预设比例扩大当前对焦窗后的对焦窗为第二对焦窗。
步骤820:至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值。
步骤830:根据至少两个对比度值,确定最终的对焦窗。
可选的,根据至少两个对比度值,确定最终的对焦窗时,可以采用但不限于以下两种方法:
第一种方法:根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
第二种方法:根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,第二门限大于第一门限。
采用上述步骤800~步骤830所述的方法,能够有效避免平坦区场景对焦 时容易出现失焦的问题。下面以一个具体实施例进行说明。
首先,自动对焦装置确定当前对焦窗内的图像内容为平坦区。
其中,平坦区是指当前对焦窗内的图像的对比度值小于第一门限。
例如,若自动对焦装置确定待拍摄图像内容没有人脸,假设一开始将对焦窗以预设大小置于图像内容的中心区域,判断对焦窗内图像的对比度值是否小于第一门限。若判断当前对焦窗内图像的对比度值小于第一门限,则确定当前对焦窗内的图像为平坦区。
接着,自动对焦装置至少按照第一预设比例和第二预设比例扩大当前对焦窗,并至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值,其中,按照第一预设比例扩大当前对焦窗后的对焦窗为第一对焦窗,按照第二预设比例扩大当前对焦窗后的对焦窗为第二对焦窗。
例如,自动对焦装置将当前对焦窗扩大到原来的1.2倍,1.4倍,1.6倍,1.8倍,2倍,并分别计算每个对焦窗对应的contrast值。这里采用扩大对焦窗的做法是为了提升对焦窗内的纹理强度。
最后,自动对焦装置根据至少两个对比度值,确定最终的对焦窗。
例如,自动对焦装置扩大对焦窗到原来的1.2倍,1.4倍,1.6倍,1.8倍,2倍,计算获得5个对焦窗内图像的contrast值,选择contrast值大于给定门限T1的最小的对焦窗作为最终的对焦窗。
又例如,自动对焦装置扩大对焦窗到原来的1.2倍,1.4倍,1.6倍,1.8倍,2倍,计算获得5个对焦窗内图像的contrast值,选择contrast值最大的对焦窗作为最终的对焦窗。
参阅图9所示,初始对焦窗,如图中白色实线对焦窗,判断该对焦窗内的图像为平坦区,扩大对焦窗,如图中黑色虚线对焦窗,提升了对焦窗内图像内容的纹理强度,contrast数值增大。
因此,采用本发明实施例提供的方法,在根据对焦窗内图像的contrast值判断当前对焦窗内的图像为平坦区后,扩大对焦窗直到有足够的纹理区域包含在对焦窗内,进而有效提升对焦效果。
参阅图10所示,在爬山法对焦过程中,为了避免对焦窗内包含多个景深导致contrast曲线多峰的情况,本发明实施例提供一种确定对焦窗的方法,以避免对焦窗内包含不同景深的物体,容易导致对焦到背景上的情况发生。
该方法包括:
步骤1000:确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,双对焦窗包括第一对焦窗和第二对焦窗,第二对焦窗的尺寸小于第一对焦窗的尺寸,且第二对焦窗在第一对焦窗内。
步骤1010:在摄像头的马达移动过程中,确定第一对焦窗内的图像的对比度值从第一峰值下降、且第二对焦窗内的图像的对比度值从第二峰值下降时,将第一对焦窗作为最终的对焦窗,其中,第一峰值是第一对焦窗内的图像对应的对比度曲线中的峰值,第二峰值是第二对焦窗内的图像对应的对比度曲线中的峰值。
具体的,第一峰值和第二峰值分别对应马达位置均落在预设马达范围内。
第一峰值和第二峰值基本上为在相同马达位置对应的峰值,即第一峰值和第二峰值具有相同的横坐标。
本发明实施例提供一种确定对焦窗的方法,
采用上述步骤1000~步骤1010所述的方法,能够有效避免对焦窗内包含不同景深的物体容易出现失焦的问题。下面以一个具体实施例进行说明。
首先,自动对焦装置确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式。
现有技术中,对于大多数数码相机来说,物距50cm通常是微距模式与普通模式的分界线,于是通常50cm以内算算作微距。此外,也可通过放大率的概念来更为准确的定义微距,如果被拍摄物体高度为X,在底片上(或CCD、CMOS)的成像高度为Y,那么放大率就等于Y:X,通常又把分子或者分母中较小的那个约简为1,例如1:5、2:1等等。通常情况下,数码相机的放大率在1:1到1:10之间,属于近微距摄影范围。
接着,自动对焦装置启动双对焦窗,其中,该双对焦窗包括第一对焦窗 和第二对焦窗,第二对焦窗的尺寸小于第一对焦窗的尺寸,第二对焦窗在第一对焦窗内。
然后,当自动对焦装置在VCM的移动过程中,确定出现第一对焦窗内的图像的对比度值从第一峰值开始下降,且第二对焦窗内的图像的对比度值从第二峰值同步开始下降时,将第一对焦窗作为最终的对焦窗。
另,若第一对焦窗内的图像的对比度值从第一峰值开始下降,而第二对焦窗内的图像的对比度值仍然处于上升趋势时,则表明当前第一对焦窗的对焦结果在待拍摄图像中的背景上。
如图11所示,如果主对焦窗(黑色矩形)在移动马达的过程中发现contrast曲线下降,同步判断辅对焦窗(白色矩形)的contrast曲线的趋势,如果两个曲线都发生下降,如图所示,两个曲线均在一个马达位置出现峰值,确定主对焦窗为最终的对焦窗。
因此,采用本发明实施例提供的方法同时计算两个对焦窗的contrast值,只有当两个对焦窗分别对应的contrast曲线都开始下降时才确认找到正确的准焦位置
此外,本发明实施例还提供一种确定对焦窗的方法,以避免对焦区域不是用户希望的对焦区域而导致失焦的问题。
首先,自动对焦装置根据显著性检测技术对待拍摄图像进行分析,自动检测显著性区域。
显著性检测是公知技术。显著性检测就是寻找图像中可能引起人眼视觉关注的区域。最具影响力的当属Ittihe Koch等人提出的Saliency模型,该模型从原始图像中提取出亮点、方向和颜色三个特征图,借此来综合判断整幅图像中的每个像素点的特征信息,然后将该像素与周边区域像素的差异作为该像素的显著性,将提取出的显著图应用神经网络中胜者全胜的方法作为视觉注意的转移的依据,以用来提取图像的显著区域。
接着,自动对焦装置确定待拍摄图像中存在显著性区域时,将对焦窗置于该显著性区域。
例如,自动对焦装置在当前图像内容中人脸检测失败时,运行显著性区域检测算法,检测图像内容是否存在显著性区域。参阅图12和图13所示,为自动对焦装置运行显著性区域检测算法后确定显著性区域,进一步地,参阅图12所示,将对焦窗置于检测到的显著性区域。
可选的,在自动对焦装置运行显著性区域检测算法时,可以对待拍摄图像中的显著性检测结果进行判断,例如,参阅图14A所示,显著性检测结果就不够集中,图中两侧均有花的图案,而图14B的显著性检测结果就比较集中,图中只有一朵花位于显著位置。此外,当图像内容中检测到显著性检测结果比较集中时,还需满足置信度门限大于预设置信度门限,其中,该门限是用来描述显著性程度的门限,例如,参阅图15所示,图15中左边的花相对背景颜色接近,那么显著性程度偏低,而右边的花相对背景颜色来说,显著性程度较高,此时可以选择将显著性程度较高的右侧图像作为显著性区域。
假设一开始对焦窗以预设大小置于待拍摄图像中的中心区域,在确定检测到显著性区域时,将其更改到显著性区域,如图12中黑色对焦窗。若图像内容中显著性检测结果分布较为分散或者置信度较低,则保持对焦窗大小和位置不变。
因此,采用本发明实施例提供的方法通过显著性检测算法检测待拍摄图像中人更感兴趣的区域,作为显著性区域,并将对焦窗更改到该显著性区域。
参阅图16所示,本发明实施例提供一种确定对焦窗的装置1600,包括:
确定单元1601,用于确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗;
检测单元1602,用于检测人脸区域中的预设位置,并根据人脸区域中的预设位置调整当前对焦窗的宽度;
调整单元1603,用于至少按照第一预设比例和第二预设比例拉伸当前对焦窗的长度,其中按照第一预设比例拉伸当前对焦窗的长度后的对焦窗为第一对焦窗,按照第二预设比例拉伸当前对焦窗的长度后的对焦窗为第二对焦窗;
计算单元1604,用于至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值;
分析单元1605,用于根据至少两个对比度值确定最终的对焦窗。
可选的,检测人脸区域中的预设位置,并根据人脸区域中的预设位置调整当前对焦窗的宽度时,检测单元1602,具体用于:
检测人脸区域中两眼的位置或两眉的位置,将当前对焦窗的宽度调整为人脸区域中两眼的距离或两眉的距离。
可选的,根据至少两个对比度值确定最终的对焦窗时,分析单元1605,具体用于:
根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
参阅图17所示,本发明实施例一种确定对焦窗的方法装置1700,包括:
确定单元1701,用于确定当前对焦窗内的图像为平坦区,其中,平坦区指当前对焦窗内的图像的对比度值小于第一门限;
调整单元1702,用于至少按照第一预设比例和第二预设比例扩大当前对焦窗,其中,按照第一预设比例扩大当前对焦窗后的对焦窗为第一对焦窗,按照第二预设比例扩大当前对焦窗后的对焦窗为第二对焦窗;
计算单元1703,用于至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值;
分析单元1704,用于根据至少两个对比度值,确定最终的对焦窗。
可选的,根据至少两个对比度值,确定最终的对焦窗时,分析单元1704,具体用于:
根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗;或者
根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,第二门限大于第一门限。
参阅图18所示,本发明实施例一种确定对焦窗的装置1800,包括:
确定单元1801,用于确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,双对焦窗包括第一对焦窗和第二对焦窗,第二对焦窗的尺寸小于第一对焦窗的尺寸,且第二对焦窗在第一对焦窗内;
分析单元1802,用于在摄像头的马达移动过程中,确定第一对焦窗内的图像的对比度值从第一峰值下降、且第二对焦窗内的图像的对比度值从第二峰值下降时,将第一对焦窗作为最终的对焦窗,其中,第一峰值是第一对焦窗内的图像对应的对比度曲线中的峰值,第二峰值是第二对焦窗内的图像对应的对比度曲线中的峰值。
需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
参阅图19所示,本发明实施例提供一种确定对焦窗的设备,包括摄像头1901、处理器1902和存储器1903,摄像头1901、处理器1902以及存储器1903之间通过总线连接,其中:
存储器1903,用于存储处理器执行的程序代码;
处理器1902,用于通过存储器中的程序代码,执行以下操作:确定待拍摄 图像中检测到人脸时,将人脸区域作为当前对焦窗;检测人脸区域中的预设位置,并根据人脸区域中的预设位置调整当前对焦窗的宽度;至少按照第一预设比例和第二预设比例拉伸当前对焦窗的长度,其中按照第一预设比例拉伸当前对焦窗的长度后的对焦窗为第一对焦窗,按照第二预设比例拉伸当前对焦窗的长度后的对焦窗为第二对焦窗;至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值;根据至少两个对比度值确定最终的对焦窗。
可选的,处理器1902,在检测人脸区域中的预设位置,并根据人脸区域中的预设位置调整当前对焦窗的宽度的方面,用于通过存储器中的程序代码,执行以下操作:
检测人脸区域中两眼的位置或两眉的位置,将当前对焦窗的宽度调整为人脸区域中两眼的距离或两眉的距离。
可选的,处理器1902,在根据至少两个对比度值确定最终的对焦窗的方面,用于通过存储器中的程序代码,执行以下操作:
根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
参阅图20所示,本发明实施例提供一种确定对焦窗的设备,包括摄像头2001、处理器2002和存储器2003,摄像头2001、处理器2002以及存储器2003之间通过总线连接,其中:
存储器2003,用于存储处理器执行的程序代码;
处理器2002,用于通过存储器中的程序代码,执行以下操作:确定当前对焦窗内的图像为平坦区,其中,平坦区指当前对焦窗内的图像的对比度值小于第一门限;至少按照第一预设比例和第二预设比例扩大当前对焦窗,其中,按照第一预设比例扩大当前对焦窗后的对焦窗为第一对焦窗,按照第二预设比例扩大当前对焦窗后的对焦窗为第二对焦窗;至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值;根据至少两个对比度值,确定最终的对焦窗。
可选的,处理器2002,在根据至少两个对比度值,确定最终的对焦窗的方面,用于通过存储器中的程序代码,执行以下操作:
根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗;或者
根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,第二门限大于第一门限。
参阅图21所示,本发明实施例提供一种确定对焦窗的设备,包括摄像头2101、处理器2102和存储器2103,摄像头2101、处理器2102以及存储器2103之间通过总线连接,其中:
存储器2103,用于存储处理器执行的程序代码;
处理器2102,用于通过存储器中的程序代码,执行以下操作:确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,双对焦窗包括第一对焦窗和第二对焦窗,第二对焦窗的尺寸小于第一对焦窗的尺寸,且第二对焦窗在第一对焦窗内;在摄像头的马达移动过程中,确定第一对焦窗内的图像的对比度值从第一峰值下降、且第二对焦窗内的图像的对比度值从第二峰值下降时,将第一对焦窗作为最终的对焦窗,其中,第一峰值是第一对焦窗内的图像对应的对比度曲线中的峰值,第二峰值是第二对焦窗内的图像对应的对比度曲线中的峰值。
本发明实施例中总线在图19、图20、图21中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图19、图20、图21中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本发明实施例中存储器,用于存储处理器执行的程序代码,可以是易失性存储器(英文:volatile memory),例如随机存取存储器(英文:random-access memory,缩写:RAM);存储器也可以是非易失性存储器(英文:non-volatile memory),例如只读存储器(英文:read-only memory,缩写:ROM),快闪存储器(英文:flash memory),硬盘(英文:hard disk drive,缩写:HDD) 或固态硬盘(英文:solid-state drive,缩写:SSD)、或者存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是上述存储器的组合。
本发明实施例中处理器,可以是一个中央处理单元(英文:central processing unit,简称CPU)。
此外,本发明实施例提供了一种计算机存储介质,用于储存为上述确定对焦窗的设备所用的计算机软件指令,其包含用于执行上述方面所设计的程序。
本发明实施例中确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗,检测人脸区域中的预设位置,并根据人脸区域中的预设位置调整当前对焦窗的宽度,这里通过缩小对焦窗宽度,避免对焦窗出现背景内容。至少按照第一预设比例和第二预设比例拉伸当前对焦窗的长度,这里将对焦窗拉伸到人的身体部分,能够提升对焦窗内纹理丰富程度,进而有效提升人脸对焦过程中的对焦效果。最后,至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值,根据至少两个对比度值确定最终的对焦窗。
本发明实施例中确定当前对焦窗内的图像为平坦区;至少按照第一预设比例和第二预设比例扩大当前对焦窗;至少计算第一对焦窗内的图像的对比度值和第二对焦窗内的图像的对比度值,这里扩大对焦窗直到有足够的纹理区域包含在对焦窗内,能够有效提升对焦效果,最后,根据至少两个对比度值,确定最终的对焦窗。
本发明实施例中确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗;在摄像头的马达移动过程中,确定第一对焦窗内的图像的对比度值从第一峰值下降、且第二对焦窗内的图像的对比度值从第二峰值下降时,将第一对焦窗作为最终的对焦窗,进而能够有效避免对焦窗内包含不同景深的物体导致失焦的问题。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或 计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (18)

  1. 一种确定对焦窗的方法,其特征在于,包括:
    确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗;
    检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度;
    至少按照第一预设比例和第二预设比例拉伸所述当前对焦窗的长度,其中按照所述第一预设比例拉伸所述当前对焦窗的长度后的对焦窗为第一对焦窗,按照所述第二预设比例拉伸所述当前对焦窗的长度后的对焦窗为第二对焦窗;
    至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;
    根据至少两个对比度值确定最终的对焦窗。
  2. 如权利要求1所述的方法,其特征在于,检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度,包括:
    检测所述人脸区域中两眼的位置或两眉的位置,将所述当前对焦窗的宽度调整为所述人脸区域中两眼的距离或两眉的距离。
  3. 如权利要求1或2所述的方法,其特征在于,根据至少两个对比度值确定最终的对焦窗,包括:
    根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
  4. 一种确定对焦窗的方法,其特征在于,包括:
    确定当前对焦窗内的图像为平坦区,其中,所述平坦区指所述当前对焦窗内的图像的对比度值小于第一门限;
    至少按照第一预设比例和第二预设比例扩大所述当前对焦窗,其中,按照所述第一预设比例扩大所述当前对焦窗后的对焦窗为第一对焦窗,按照所述第二预设比例扩大所述当前对焦窗后的对焦窗为第二对焦窗;
    至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;
    根据至少两个对比度值,确定最终的对焦窗。
  5. 如权利要求4所述的方法,其特征在于,根据至少两个对比度值,确定最终的对焦窗,包括:
    根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗;或者
    根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,所述第二门限大于所述第一门限。
  6. 一种确定对焦窗的方法,其特征在于,包括:
    确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,所述双对焦窗包括第一对焦窗和第二对焦窗,所述第二对焦窗的尺寸小于所述第一对焦窗的尺寸,且所述第二对焦窗在所述第一对焦窗内;
    在所述摄像头的马达移动过程中,确定所述第一对焦窗内的图像的对比度值从第一峰值下降、且所述第二对焦窗内的图像的对比度值从第二峰值下降时,将所述第一对焦窗作为最终的对焦窗,其中,所述第一峰值是所述第一对焦窗内的图像对应的对比度曲线中的峰值,所述第二峰值是所述第二对焦窗内的图像对应的对比度曲线中的峰值。
  7. 一种确定对焦窗的装置,其特征在于,包括:
    确定单元,用于确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗;
    检测单元,用于检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度;
    调整单元,用于至少按照第一预设比例和第二预设比例拉伸所述当前对焦窗的长度,其中按照所述第一预设比例拉伸所述当前对焦窗的长度后的对焦窗为第一对焦窗,按照所述第二预设比例拉伸所述当前对焦窗的长度后的对焦窗为第二对焦窗;
    计算单元,用于至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;
    分析单元,用于根据至少两个对比度值确定最终的对焦窗。
  8. 如权利要求7所述的装置,其特征在于,检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度时,所述检测单元,具体用于:
    检测所述人脸区域中两眼的位置或两眉的位置,将所述当前对焦窗的宽度调整为所述人脸区域中两眼的距离或两眉的距离。
  9. 如权利要求7或8所述的装置,其特征在于,根据至少两个对比度值确定最终的对焦窗时,所述分析单元,具体用于:
    根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
  10. 一种确定对焦窗的装置,其特征在于,包括:
    确定单元,用于确定当前对焦窗内的图像为平坦区,其中,所述平坦区指所述当前对焦窗内的图像的对比度值小于第一门限;
    调整单元,用于至少按照第一预设比例和第二预设比例扩大所述当前对焦窗,其中,按照所述第一预设比例扩大所述当前对焦窗后的对焦窗为第一对焦窗,按照所述第二预设比例扩大所述当前对焦窗后的对焦窗为第二对焦窗;
    计算单元,用于至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;
    分析单元,用于根据至少两个对比度值,确定最终的对焦窗。
  11. 如权利要求10所述的装置,其特征在于,根据至少两个对比度值,确定最终的对焦窗时,所述分析单元,具体用于:
    根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗;或者
    根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,所述第二门限大于所述第一门限。
  12. 一种确定对焦窗的装置,其特征在于,包括:
    确定单元,用于确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,所述双对焦窗包括第一对焦窗和第二对焦窗,所述第二对焦窗的尺寸小于所述第一对焦窗的尺寸,且所述第二对焦窗在所述第一对焦窗内;
    分析单元,用于在所述摄像头的马达移动过程中,确定所述第一对焦窗内的图像的对比度值从第一峰值下降、且所述第二对焦窗内的图像的对比度值从第二峰值下降时,将所述第一对焦窗作为最终的对焦窗,其中,所述第一峰值是所述第一对焦窗内的图像对应的对比度曲线中的峰值,所述第二峰值是所述第二对焦窗内的图像对应的对比度曲线中的峰值。
  13. 一种确定对焦窗的设备,其特征在于,包括摄像头、处理器和存储器,所述摄像头、所述处理器以及所述存储器之间通过总线连接,其中:
    所述存储器,用于存储所述处理器执行的程序代码;
    所述处理器,用于通过所述存储器中的程序代码,执行以下操作:确定待拍摄图像中检测到人脸时,将人脸区域作为当前对焦窗;检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度;至少按照第一预设比例和第二预设比例拉伸所述当前对焦窗的长度,其中按照所述第一预设比例拉伸所述当前对焦窗的长度后的对焦窗为第一对焦窗,按照所述第二预设比例拉伸所述当前对焦窗的长度后的对焦窗为第二对焦窗;至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;根据至少两个对比度值确定最终的对焦窗。
  14. 如权利要求13所述的设备,其特征在于,所述处理器,在检测所述人脸区域中的预设位置,并根据所述人脸区域中的预设位置调整所述当前对焦窗的宽度的方面,用于通过所述存储器中的程序代码,执行以下操作:
    检测所述人脸区域中两眼的位置或两眉的位置,将所述当前对焦窗的宽度调整为所述人脸区域中两眼的距离或两眉的距离。
  15. 如权利要求13或14所述的设备,其特征在于,所述处理器,在根据至少两个对比度值确定最终的对焦窗的方面,用于通过所述存储器中的程序代码,执行以下操作:
    根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗。
  16. 一种确定对焦窗的设备,其特征在于,包括摄像头、处理器和存储器,所述摄像头、所述处理器以及所述存储器之间通过总线连接,其中:
    所述存储器,用于存储所述处理器执行的程序代码;
    所述处理器,用于通过所述存储器中的程序代码,执行以下操作:确定当前对焦窗内的图像为平坦区,其中,所述平坦区指所述当前对焦窗内的图像的对比度值小于第一门限;至少按照第一预设比例和第二预设比例扩大所述当前对焦窗,其中,按照所述第一预设比例扩大所述当前对焦窗后的对焦窗为第一对焦窗,按照所述第二预设比例扩大所述当前对焦窗后的对焦窗为第二对焦窗;至少计算所述第一对焦窗内的图像的对比度值和所述第二对焦窗内的图像的对比度值;根据至少两个对比度值,确定最终的对焦窗。
  17. 如权利要求16所述的设备,其特征在于,所述处理器,在根据至少两个对比度值,确定最终的对焦窗的方面,用于通过所述存储器中的程序代码,执行以下操作:
    根据至少两个对比度值,将最大对比度值对应的对焦窗作为最终的对焦窗;或者
    根据至少两个对比度值,将对比度值大于第二门限、且预设比例最小的对焦窗作为最终的对焦窗,其中,所述第二门限大于所述第一门限。
  18. 一种确定对焦窗的设备,其特征在于,包括摄像头、处理器和存储器,所述摄像头、所述处理器以及所述存储器之间通过总线连接,其中:
    所述存储器,用于存储所述处理器执行的程序代码;
    所述处理器,用于通过所述存储器中的程序代码,执行以下操作:确定拍摄待拍摄图像时摄像头采用的拍摄模式为微距模式,启动双对焦窗,其中,所述双对焦窗包括第一对焦窗和第二对焦窗,所述第二对焦窗的尺寸小于所述第一对焦窗的尺寸,且所述第二对焦窗在所述第一对焦窗内;在所述摄像头的马达移动过程中,确定所述第一对焦窗内的图像的对比度值从第一峰值下降、且所述第二对焦窗内的图像的对比度值从第二峰值下降时,将所述第一对焦窗作为最终的对焦窗,其中,所述第一峰值是所述第一对焦窗内的图像对应的对比度曲线中的峰值,所述第二峰值是所述第二对焦窗内的图像对应的对比度曲线中的峰值。
PCT/CN2016/077734 2016-03-29 2016-03-29 一种确定对焦窗的方法、装置及设备 WO2017166076A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2016/077734 WO2017166076A1 (zh) 2016-03-29 2016-03-29 一种确定对焦窗的方法、装置及设备
EP16895857.7A EP3429185B1 (en) 2016-03-29 2016-03-29 Method, device and apparatus for determining focus window
CN201680013196.5A CN107439005B (zh) 2016-03-29 2016-03-29 一种确定对焦窗的方法、装置及设备
US16/090,444 US10491804B2 (en) 2016-03-29 2016-03-29 Focus window determining method, apparatus, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/077734 WO2017166076A1 (zh) 2016-03-29 2016-03-29 一种确定对焦窗的方法、装置及设备

Publications (1)

Publication Number Publication Date
WO2017166076A1 true WO2017166076A1 (zh) 2017-10-05

Family

ID=59963354

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/077734 WO2017166076A1 (zh) 2016-03-29 2016-03-29 一种确定对焦窗的方法、装置及设备

Country Status (4)

Country Link
US (1) US10491804B2 (zh)
EP (1) EP3429185B1 (zh)
CN (1) CN107439005B (zh)
WO (1) WO2017166076A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110062166A (zh) * 2019-04-25 2019-07-26 努比亚技术有限公司 提高人脸自动对焦的方法、装置、移动终端及存储介质
CN117857920A (zh) * 2021-06-29 2024-04-09 荣耀终端有限公司 一种对焦方法和电子设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147749A (zh) * 2019-12-31 2020-05-12 宇龙计算机通信科技(深圳)有限公司 拍摄方法、拍摄装置、终端及存储介质
CN112132162B (zh) * 2020-09-08 2024-04-02 Oppo广东移动通信有限公司 图像处理方法、图像处理器、电子设备及可读存储介质
CN116074624B (zh) * 2022-07-22 2023-11-10 荣耀终端有限公司 一种对焦方法和装置
WO2024076617A1 (en) * 2022-10-06 2024-04-11 Google Llc Methods for determining regions of interest for camera auto-focus

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080074529A1 (en) * 2006-09-22 2008-03-27 Sony Corporation Imaging apparatus, control method of imaging apparatus, and computer program
CN101806949A (zh) * 2009-02-17 2010-08-18 佳能株式会社 焦点调节设备和焦点调节方法
CN101808197A (zh) * 2009-02-17 2010-08-18 佳能株式会社 焦点调节设备和焦点调节方法
CN103858043A (zh) * 2011-10-12 2014-06-11 佳能株式会社 摄像设备及其控制方法和程序
US20140362278A1 (en) * 2013-06-10 2014-12-11 Canon Kabushiki Kaisha Image capturing apparatus and image capturing method
CN104243825A (zh) * 2014-09-22 2014-12-24 广东欧珀移动通信有限公司 一种移动终端自动对焦方法及系统
CN104270562A (zh) * 2014-08-15 2015-01-07 广东欧珀移动通信有限公司 一种拍照对焦方法和拍照对焦装置
CN105210018A (zh) * 2013-05-16 2015-12-30 索尼公司 用于在图像重新对焦期间选择参数的用户界面
CN105357444A (zh) * 2015-11-27 2016-02-24 努比亚技术有限公司 对焦方法和装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7471846B2 (en) * 2003-06-26 2008-12-30 Fotonation Vision Limited Perfecting the effect of flash within an image acquisition devices using face detection
JP4747003B2 (ja) * 2005-06-22 2011-08-10 富士フイルム株式会社 自動合焦制御装置およびその制御方法
JP5188071B2 (ja) * 2007-02-08 2013-04-24 キヤノン株式会社 焦点調節装置、撮像装置及び、焦点調節方法
JP5335302B2 (ja) * 2008-06-30 2013-11-06 キヤノン株式会社 焦点検出装置及びその制御方法
JP2010015024A (ja) * 2008-07-04 2010-01-21 Canon Inc 撮像装置、その制御方法、プログラム及び記憶媒体
US8233078B2 (en) 2009-02-19 2012-07-31 Apple Inc. Auto focus speed enhancement using object recognition and resolution
CN101950063B (zh) * 2009-07-10 2012-08-29 佛山普立华科技有限公司 自动对焦系统及自动对焦方法
US8760567B2 (en) 2010-12-21 2014-06-24 Samsung Electronics Co., Ltd. Photographing apparatus and method to reduce auto-focus time
KR101784526B1 (ko) 2011-11-29 2017-10-11 엘지이노텍 주식회사 오토 포커스 캘리브레이션의 오류 검출 방법 및 시스템
KR101888956B1 (ko) 2012-05-31 2018-08-17 엘지이노텍 주식회사 카메라 모듈 및 그의 오토 포커싱 방법
CN105872363A (zh) 2016-03-28 2016-08-17 广东欧珀移动通信有限公司 人脸对焦清晰度的调整方法及调整装置

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080074529A1 (en) * 2006-09-22 2008-03-27 Sony Corporation Imaging apparatus, control method of imaging apparatus, and computer program
CN101806949A (zh) * 2009-02-17 2010-08-18 佳能株式会社 焦点调节设备和焦点调节方法
CN101808197A (zh) * 2009-02-17 2010-08-18 佳能株式会社 焦点调节设备和焦点调节方法
CN103858043A (zh) * 2011-10-12 2014-06-11 佳能株式会社 摄像设备及其控制方法和程序
CN105210018A (zh) * 2013-05-16 2015-12-30 索尼公司 用于在图像重新对焦期间选择参数的用户界面
US20140362278A1 (en) * 2013-06-10 2014-12-11 Canon Kabushiki Kaisha Image capturing apparatus and image capturing method
CN104270562A (zh) * 2014-08-15 2015-01-07 广东欧珀移动通信有限公司 一种拍照对焦方法和拍照对焦装置
CN104243825A (zh) * 2014-09-22 2014-12-24 广东欧珀移动通信有限公司 一种移动终端自动对焦方法及系统
CN105357444A (zh) * 2015-11-27 2016-02-24 努比亚技术有限公司 对焦方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3429185A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110062166A (zh) * 2019-04-25 2019-07-26 努比亚技术有限公司 提高人脸自动对焦的方法、装置、移动终端及存储介质
CN117857920A (zh) * 2021-06-29 2024-04-09 荣耀终端有限公司 一种对焦方法和电子设备

Also Published As

Publication number Publication date
EP3429185A4 (en) 2019-06-19
US10491804B2 (en) 2019-11-26
EP3429185A1 (en) 2019-01-16
US20190208131A1 (en) 2019-07-04
CN107439005A (zh) 2017-12-05
CN107439005B (zh) 2020-04-21
EP3429185B1 (en) 2023-05-10

Similar Documents

Publication Publication Date Title
WO2017166076A1 (zh) 一种确定对焦窗的方法、装置及设备
CN108496350B (zh) 一种对焦处理方法及设备
WO2018201809A1 (zh) 基于双摄像头的图像处理装置及方法
WO2015180609A1 (zh) 一种实现自动拍摄的方法、装置及计算机存储介质
WO2019105214A1 (zh) 图像虚化方法、装置、移动终端和存储介质
JP6101397B2 (ja) 写真出力方法および装置
US8068164B2 (en) Face recognition auto focus apparatus for a moving image
US8306360B2 (en) Device and method for obtaining clear image
JP6184189B2 (ja) 被写体検出装置およびその制御方法、撮像装置、被写体検出装置の制御プログラムおよび記憶媒体
US20150124155A1 (en) Quick Automatic Focusing Method and Image Acquisition Apparatus
JP5911846B2 (ja) 肌色領域及び顔領域に基づく視点検出器
TWI471677B (zh) 自動對焦方法及自動對焦裝置
JP5720275B2 (ja) 撮像装置および撮像方法
CN103929596A (zh) 引导拍摄构图的方法及装置
JP6447840B2 (ja) 画像装置、及び画像装置における自動的な焦点合わせのための方法、並びに対応するコンピュータプログラム
CN106292162A (zh) 立体照相装置和相关控制方法
JP2014527756A (ja) 立体画像ペアを獲得するためのシステムおよび方法
CN107800951B (zh) 电子装置及其镜头切换方法
US9838594B2 (en) Irregular-region based automatic image correction
WO2016101524A1 (zh) 纠正被摄物体拍摄倾斜方法、装置及移动终端、存储介质
CN112261292B (zh) 图像获取方法、终端、芯片及存储介质
CN114071010B (zh) 一种拍摄方法及设备
WO2018014517A1 (zh) 一种信息处理方法、装置及存储介质
JP5594157B2 (ja) 撮像装置および撮像方法
EP3218756B1 (en) Direction aware autofocus

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2016895857

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2016895857

Country of ref document: EP

Effective date: 20181011

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16895857

Country of ref document: EP

Kind code of ref document: A1