WO2018228184A1 - 对焦方法、装置、计算机可读存储介质和移动终端 - Google Patents

对焦方法、装置、计算机可读存储介质和移动终端 Download PDF

Info

Publication number
WO2018228184A1
WO2018228184A1 PCT/CN2018/088929 CN2018088929W WO2018228184A1 WO 2018228184 A1 WO2018228184 A1 WO 2018228184A1 CN 2018088929 W CN2018088929 W CN 2018088929W WO 2018228184 A1 WO2018228184 A1 WO 2018228184A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame picture
value corresponding
value
current frame
focus
Prior art date
Application number
PCT/CN2018/088929
Other languages
English (en)
French (fr)
Inventor
李小朋
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to EP18818807.2A priority Critical patent/EP3640728A4/en
Priority to US16/621,603 priority patent/US11184518B2/en
Publication of WO2018228184A1 publication Critical patent/WO2018228184A1/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
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B13/00Viewfinders; Focusing aids for cameras; Means for focusing for cameras; Autofocus systems for cameras
    • G03B13/32Means for focusing
    • G03B13/34Power focusing
    • G03B13/36Autofocus systems
    • 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
    • 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/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • 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
    • 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/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6812Motion detection based on additional sensors, e.g. acceleration sensors
    • 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/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • H04N23/685Vibration or motion blur correction performed by mechanical compensation
    • H04N23/687Vibration or motion blur correction performed by mechanical compensation by shifting the lens or sensor position
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a focusing method, apparatus, computer readable storage medium, and mobile terminal.
  • the embodiment of the present application provides a focusing method, a device, a computer readable storage medium, and a mobile terminal, which can avoid the problem of out of focus caused by hand shake under dark light conditions.
  • a focusing method comprising:
  • the first scan acquires the focus area, it is detected that the rotation angular velocity value corresponding to the current frame picture is greater than the first threshold, and the focus value fv value corresponding to the current frame picture is obtained;
  • Focus is performed based on the compensated fv value.
  • a focusing device comprising:
  • the acquiring module is configured to: when the first scan acquires the focus area, detect that the rotational angular velocity value corresponding to the current frame picture is greater than the first threshold, and obtain a focus value fv value corresponding to the current frame picture;
  • the compensation module is configured to detect that the difference between the fv value corresponding to the current frame picture and the fv value corresponding to the previous frame picture is greater than a second threshold, and compensate the fv value corresponding to the current frame picture;
  • Focus module for focusing based on the compensated fv value.
  • a mobile terminal includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
  • the first scan acquires the focus area, it is detected that the rotation angular velocity value corresponding to the current frame picture is greater than the first threshold, and the focus value fv value corresponding to the current frame picture is obtained;
  • Focus is performed based on the compensated fv value.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the following steps:
  • the first scan acquires the focus area, it is detected that the rotation angular velocity value corresponding to the current frame picture is greater than the first threshold, and the focus value fv value corresponding to the current frame picture is obtained;
  • Focus is performed based on the compensated fv value.
  • Figure 1 is a flow chart of a focusing method in one embodiment
  • FIG. 2 is a line diagram and a fitted straight line diagram showing the relationship between the lens position and the fv value in one embodiment
  • Figure 3 is a line diagram showing the relationship between the lens position and the fv value in one embodiment
  • FIG. 4 is a line graph and a fitting curve diagram of a relationship between a lens position and an fv value in one embodiment
  • Figure 5 is a block diagram showing the structure of a focusing device in an embodiment
  • Figure 6 is a block diagram showing the structure of a focusing device in another embodiment
  • Figure 7 is a schematic illustration of an image processing circuit in one embodiment.
  • a focusing method includes steps 102 to 106:
  • Step 102 When the first scan acquires the focus area, it is detected that the rotation angular velocity value corresponding to the current frame picture is greater than the first threshold, and the focus value fv value corresponding to the current frame picture is obtained.
  • the first scan refers to an accurate scan.
  • Camera focusing in a mobile terminal can include two steps of pre-scanning and precise scanning.
  • the pre-scan is pre scan.
  • the pre-scan can obtain the interval of the focus position of the camera lens;
  • the precise scan is the fine scan, and the camera lens can be obtained by precise scanning.
  • the mobile terminal can acquire the rotational angular velocity value corresponding to the current frame picture.
  • the rotational angular velocity value may be obtained by the gyroscope in the mobile terminal.
  • the mobile terminal determines the current frame jitter, and obtains the fv (Focus Value, corresponding focus) corresponding to the current frame image. Value) value.
  • the fv value is a value that is positively correlated with the image sharpness, and the clearer the image, the larger the fv value corresponding to the image.
  • Step 104 It is detected that the difference between the fv value corresponding to the current frame picture and the fv value corresponding to the previous frame picture is greater than the second threshold, and the fv value corresponding to the current frame picture is compensated.
  • the mobile terminal detects that the rotational angular velocity value corresponding to the current frame picture is greater than the first threshold, and the difference between the fv value corresponding to the current frame picture and the fv value corresponding to the previous frame picture is greater than the second threshold, and determines that the current frame picture corresponds to The fv value is abnormal.
  • the exposure time of the mobile terminal increases when the picture is taken, and the jitter of the mobile terminal causes the current frame picture to be blurred and the picture clarity to be lowered, thereby making the current acquisition.
  • the fv value corresponding to the frame picture is too small, and thus a deviation occurs.
  • the mobile terminal compensates for the fv value corresponding to the current frame picture, thereby reducing the influence of the jitter of the mobile terminal on the focus.
  • step 106 focusing is performed according to the compensated fv value.
  • the mobile terminal continues to perform an accurate scan, and detects the rotational angular velocity value and the fv value corresponding to the acquired image in real time, and detects that the rotational angular velocity value is greater than the first
  • the fv value corresponding to the acquired picture is compensated, and real-time focusing is performed according to the compensated fv value.
  • the jitter of the mobile terminal may cause the picture sharpness to be lowered and the picture to be out of focus.
  • the focusing method in the embodiment of the present invention acquires the fv value of the current picture when detecting the jitter of the mobile terminal, and compensates the fv value when the fv value of the current picture is abnormal, effectively solving the picture caused by the jitter of the mobile terminal under the dark light condition.
  • the problem of out-of-focus improves the focus of the mobile terminal under dark light conditions.
  • the fv value corresponding to the current frame picture is compensated in step 104, the method includes: obtaining a fitting line according to an fv value corresponding to the first two frames of the current frame picture; and acquiring an fv value corresponding to the current frame picture according to the fitting line. .
  • the method for compensating includes: acquiring an fv value corresponding to the first two frames of the current frame picture, obtaining a fitting line according to the fv value corresponding to the first two frames, and obtaining an fv value of the current frame picture according to the fitted straight line.
  • the horizontal axis coordinate in the line graph of FIG. 2 is the first frame and the second frame in the case of accurate scanning, and the left frame is the fv value corresponding to the screen.
  • the mobile terminal When the mobile terminal detects that the rotational angular velocity value corresponding to the sixth frame is greater than the first threshold, and the difference between the fv value corresponding to the sixth frame and the fv value corresponding to the fifth frame is greater than the second threshold, the mobile terminal obtains The fv value corresponding to the fourth frame screen is 10, and the fv value corresponding to the fifth frame screen is 12. As shown in FIG. 2, a straight line is fitted according to the fv value of the fourth frame picture and the fv value of the fifth frame picture, and the fv value of the sixth frame picture is obtained according to the fitted straight line, and the sixth frame picture is corresponding. The fv value is adjusted to 14, that is, the fv value corresponding to the sixth frame picture is compensated.
  • the fv value corresponding to the current frame picture is abnormal, the fv value is fitted according to the fv value of the first two frames, and the fv value of the current frame picture is obtained, thereby ensuring the accuracy of the compensated fv value.
  • the fv value corresponding to the current frame picture is compensated in step 104, and the average value of the fv value corresponding to the previous frame picture of the current frame picture and the fv value corresponding to the subsequent frame picture is obtained; As the fv value corresponding to the current frame picture.
  • the method for compensating includes: accurately scanning to obtain a picture of the next frame, and if the value of the rotational angular velocity corresponding to the picture of the next frame is within the first threshold, acquiring the fv value corresponding to the picture of the next frame, and the previous frame of the current frame picture. The fv value corresponding to the picture and the average value of the fv value corresponding to the subsequent frame picture; the average value is used as the fv value corresponding to the current frame picture.
  • the mobile terminal detects that the rotational angular velocity value corresponding to the sixth frame picture is greater than the first threshold, and the difference between the fv value corresponding to the sixth frame and the fv value corresponding to the fifth frame is greater than the second.
  • the threshold value is further scanned to obtain the 7th frame picture, and the rotation angular velocity value of the 7th frame picture is detected. If the rotation angular velocity value of the 7th frame picture is within the first threshold, the fv value of the 7th frame picture is obtained, and the 5th frame is obtained.
  • the average value of the fv value of the picture and the fv value of the picture of the seventh frame is taken as the fv value of the picture of the sixth frame.
  • the average value is obtained according to the fv value of the two frames before and after, and the average value is used as the fv value of the current frame picture to ensure the compensated fv.
  • the accuracy of the value is obtained according to the fv value of the two frames before and after.
  • the focusing method before the first scan acquires the focus area in step S102, includes: acquiring a focus range by the second scan; and acquiring the focus range by the second scan includes: acquiring an fv value corresponding to the current frame picture If the fv value corresponding to the current frame picture is greater than the fv value corresponding to the previous frame picture, the scanning continues until the fv value corresponding to the current frame picture is smaller than the fv value corresponding to the previous frame picture.
  • the second scan refers to a pre-scan.
  • the mobile terminal obtains an approximate interval of the focus position of the camera lens by pre-scanning. As shown in FIG. 3, in the line graph of FIG. 3, the abscissa is the lens position, and the ordinate is the fv value corresponding to the lens position.
  • the mobile terminal drives the lens to perform a search with a larger step size. For example, if the total stroke that the motor can drive is 1000, the step size of the motor-driven lens is set to 80 during the pre-scanning process.
  • the motor drives the distance of one advance by 80.
  • the motor drives the lens once, and acquires the fv value of the screen corresponding to the lens position.
  • the motor-driven lens consists of point A ⁇ point B, point B ⁇ point C, point C ⁇ point D, point D ⁇ point E, point E ⁇ point F, point F ⁇ point G, at point A.
  • the fv value corresponding to the lens position gradually increases.
  • the algorithm determines that the motor-driven lens has passed the lens corresponding to the maximum fv value. Position, end the pre-scan step and enter the precise scan step.
  • performing focusing according to the compensated fv value includes: acquiring an fv value of consecutive three frames, if the fv value of the intermediate frame picture is greater than the fv value of the previous frame, and the fv value of the intermediate frame picture The fv value is larger than the fv value of the next frame, and the fitting curve is obtained according to the fv value of the three consecutive frames, and the camera lens is driven to reach the lens position corresponding to the apex of the fitting curve and the focus is completed.
  • the mobile terminal compensates the fv value corresponding to the picture in the accurate scan in real time, and performs focusing according to the compensated fv value.
  • the precise scanning step is entered.
  • the step size of the motor-driven camera lens is small, such as a distance of 30 per drive.
  • the motor-driven lens moves back from G point to 5 steps, that is, from G point ⁇ H point, H point ⁇ I point, I point ⁇ J point, J point ⁇ K point, K point ⁇ L point.
  • the fv value corresponding to the lens position gradually increases; in the process from J point to point L, the fv value corresponding to the lens position gradually decreases, that is, the fv corresponding to the J point lens position.
  • the value is higher than the fv value corresponding to the I point and the K point lens position.
  • the parabola is fitted according to the fv value corresponding to the I point, the J point, and the K point lens position, and the vertex of the parabola is obtained as the M point.
  • the motor drive lens reaches the lens position corresponding to the M point, that is, when the drive lens reaches the corresponding lens position when the fv value is the highest, the lens focus is completed.
  • a focusing method includes:
  • the lens driving the second camera reaches the lens position when the second camera is in focus and focuses.
  • steps in the method flowchart of the embodiment of the present application are sequentially displayed in accordance with the indication of the arrow, but the steps are not necessarily performed in the order indicated by the arrow. Except as explicitly stated herein, the execution of these steps is not strictly limited, and may be performed in other sequences. Moreover, at least some of the steps in the method flowchart of the embodiment of the present application may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be executed at different times. The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
  • FIG. 5 is a block diagram showing the structure of a focusing device in one embodiment.
  • a focusing device includes an acquisition module 502, a compensation module 504, and a focusing module 506. among them:
  • the obtaining module 502 is configured to: when the first scan acquires the focus area, detect that the rotational angular velocity value corresponding to the current frame picture is greater than the first threshold, and obtain the focus value fv value corresponding to the current frame picture.
  • the compensation module 504 is configured to detect that the difference between the fv value corresponding to the current frame picture and the fv value corresponding to the previous frame picture is greater than the second threshold, and compensate the fv value corresponding to the current frame picture.
  • the focusing module 506 is configured to perform focusing according to the compensated fv value.
  • the compensation module 504 is further configured to obtain a fitting straight line according to an fv value corresponding to the first two frames of the current frame picture; and obtain an fv value corresponding to the current frame picture according to the fitting straight line.
  • the compensation module 504 is further configured to obtain an average value of the fv value corresponding to the previous frame picture of the current frame picture and an fv value corresponding to the subsequent frame picture; and use the average value as the fv value corresponding to the current frame picture.
  • the focusing module 506 is further configured to obtain an fv value of consecutive three frames, if the fv value of the intermediate frame is greater than the fv value of the previous frame, and the fv value of the intermediate frame is greater than the subsequent frame.
  • the fv value of the picture is obtained by acquiring the fitting curve according to the fv value of the three consecutive frames, driving the camera lens to reach the lens position corresponding to the apex of the fitting curve and completing the focusing.
  • Fig. 6 is a block diagram showing the structure of a focusing method in another embodiment.
  • a focusing device includes an acquisition module 602, a compensation module 604, and a focusing module 606 and a scanning module 608.
  • the obtaining module 602, the compensation module 604, and the focusing module 606 have the corresponding module functions in FIG.
  • the scanning module 608 is configured to obtain a focus range by using the second scan before the first scan acquires the focus area, and obtain the fv value corresponding to the current frame picture by the second scan, if the current frame picture corresponds to The fv value is greater than the fv value corresponding to the previous frame picture, and the scanning continues until the fv value corresponding to the current frame picture is smaller than the fv value corresponding to the previous frame picture.
  • each module in the above focusing device is for illustrative purposes only. In other embodiments, the focusing device may be divided into different modules as needed to complete all or part of the functions of the focusing device.
  • a focusing device includes:
  • An acquiring module configured to acquire a focal length corresponding to a lens position when the first camera is in focus, and obtain a lens position when the second camera is in focus according to the focus distance;
  • the driving module is configured to drive the lens of the second camera to reach the lens position when the second camera is in focus and focus.
  • Each of the above-described focusing devices may be implemented in whole or in part by software, hardware, and combinations thereof.
  • the above modules may be embedded in the hardware in the processor or in the memory in the server, or may be stored in the memory in the server, so that the processor calls the corresponding operations of the above modules.
  • the terms "component”, “module” and “system” and the like are intended to mean a computer-related entity, which may be hardware, a combination of hardware and software, software, or software in execution.
  • a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer.
  • an application running on a server and a server can be a component.
  • One or more components can reside within a process and/or executed thread, and the components can be located within one computer and/or distributed between two or more computers.
  • the embodiment of the present application also provides a computer readable storage medium.
  • a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the following steps:
  • the first scan refers to an accurate scan.
  • Camera focusing in a mobile terminal can include two steps of pre-scanning and precise scanning.
  • pre-scanning the approximate range of the focus position of the camera lens can be obtained; by precise scanning, the precise position of the focus of the camera lens can be obtained.
  • the mobile terminal can acquire the rotational angular velocity value corresponding to the current frame picture.
  • the rotational angular velocity value may be obtained by the gyro detection in the mobile terminal. If the rotational angular velocity value corresponding to the current frame picture is greater than the preset first threshold, the mobile terminal determines the current frame jitter and acquires the fv value corresponding to the current frame picture.
  • the fv value is a value that is positively correlated with the image sharpness, and the clearer the image, the larger the fv value corresponding to the image.
  • the mobile terminal detects that the rotational angular velocity value corresponding to the current frame picture is greater than the first threshold, and the difference between the fv value corresponding to the current frame picture and the fv value corresponding to the previous frame picture is greater than the second threshold, and determines that the current frame picture corresponds to The fv value is abnormal.
  • the mobile terminal detects that the rotational angular velocity value corresponding to the current frame picture is greater than the first threshold, and the difference between the fv value corresponding to the current frame picture and the fv value corresponding to the previous frame picture is greater than the second threshold, and determines that the current frame picture corresponds to The fv value is abnormal.
  • the mobile terminal compensates for the fv value corresponding to the current frame picture, thereby reducing the influence of the jitter of the mobile terminal on the focus.
  • the mobile terminal continues to perform an accurate scan, and detects the rotational angular velocity value and the fv value corresponding to the acquired image in real time, and detects that the rotational angular velocity value is greater than the first
  • the fv value corresponding to the acquired picture is compensated, and real-time focusing is performed according to the compensated fv value.
  • the compensing the fv value corresponding to the current frame picture in the step (2) comprises: acquiring a fitting line according to the fv value corresponding to the first two frames of the current frame picture; and acquiring the current frame picture according to the fitting line. Fv value.
  • the method for compensating includes: acquiring an fv value corresponding to the first two frames of the current frame picture, obtaining a fitting line according to the fv value corresponding to the first two frames, and obtaining an fv value of the current frame picture according to the fitted straight line.
  • the horizontal axis coordinate in the line graph of FIG. 2 is the first frame and the second frame in the case of accurate scanning, and the left frame is the fv value corresponding to the screen.
  • the mobile terminal When the mobile terminal detects that the rotational angular velocity value corresponding to the sixth frame is greater than the first threshold, and the difference between the fv value corresponding to the sixth frame and the fv value corresponding to the fifth frame is greater than the second threshold, the mobile terminal obtains The fv value corresponding to the fourth frame screen is 10, and the fv value corresponding to the fifth frame screen is 12. As shown in FIG. 2, a straight line is fitted according to the fv value of the fourth frame picture and the fv value of the fifth frame picture, and the fv value of the sixth frame picture is obtained according to the fitted straight line, and the sixth frame picture is corresponding. The fv value is adjusted to 14, that is, the fv value corresponding to the sixth frame picture is compensated.
  • the compensing the fv value corresponding to the current frame picture in the step (2) includes: acquiring an fv value corresponding to the previous frame picture of the current frame picture and an average value of the fv value corresponding to the subsequent frame picture; The average value is taken as the fv value corresponding to the current frame picture.
  • the method for compensating includes: accurately scanning to obtain a picture of the next frame, and if the value of the rotational angular velocity corresponding to the picture of the next frame is within the first threshold, acquiring the fv value corresponding to the picture of the next frame, and the previous frame of the current frame picture. The fv value corresponding to the picture and the average value of the fv value corresponding to the subsequent frame picture; the average value is used as the fv value corresponding to the current frame picture.
  • the mobile terminal detects that the rotational angular velocity value corresponding to the sixth frame picture is greater than the first threshold, and the difference between the fv value corresponding to the sixth frame and the fv value corresponding to the fifth frame is greater than the second.
  • the threshold value is further scanned to obtain the 7th frame picture, and the rotation angular velocity value of the 7th frame picture is detected. If the rotation angular velocity value of the 7th frame picture is within the first threshold, the fv value of the 7th frame picture is obtained, and the 5th frame is obtained.
  • the average value of the fv value of the picture and the fv value of the picture of the seventh frame is taken as the fv value of the picture of the sixth frame.
  • the focusing method before the first scan acquires the focus area in step (1), includes: acquiring a focus range by the second scan; and acquiring the focus range by the second scan includes: acquiring the current frame picture corresponding to If the fv value of the current frame picture is greater than the fv value corresponding to the previous frame picture, the scanning continues until the fv value corresponding to the current frame picture is smaller than the fv value corresponding to the previous frame picture.
  • the second scan refers to a pre-scan.
  • the mobile terminal obtains an approximate interval of the focus position of the camera lens by pre-scanning. As shown in FIG. 3, in the line graph of FIG. 3, the abscissa is the lens position, and the ordinate is the fv value corresponding to the lens position.
  • the mobile terminal drives the lens to perform a search with a larger step size. For example, if the total stroke that the motor can drive is 1000, the step size of the motor-driven lens is set to 80 during the pre-scanning process.
  • the motor drives the distance of one advance by 80.
  • the motor drives the lens once, and acquires the fv value of the screen corresponding to the lens position.
  • the motor-driven lens consists of point A ⁇ point B, point B ⁇ point C, point C ⁇ point D, point D ⁇ point E, point E ⁇ point F, point F ⁇ point G, at point A.
  • the fv value corresponding to the lens position gradually increases.
  • the algorithm determines that the motor-driven lens has passed the lens corresponding to the maximum fv value. Position, end the pre-scan step and enter the precise scan step.
  • performing focusing according to the compensated fv value includes: acquiring an fv value of consecutive three frames, if the fv value of the intermediate frame picture is greater than the fv value of the previous frame, and the fv value of the intermediate frame picture The fv value is larger than the fv value of the next frame, and the fitting curve is obtained according to the fv value of the three consecutive frames, and the camera lens is driven to reach the lens position corresponding to the apex of the fitting curve and the focus is completed.
  • the mobile terminal compensates the fv value corresponding to the picture in the accurate scan in real time, and performs focusing according to the compensated fv value.
  • the precise scanning step is entered.
  • the step size of the motor-driven camera lens is small, such as a distance of 30 per drive.
  • the motor-driven lens moves back from G point to 5 steps, that is, from G point ⁇ H point, H point ⁇ I point, I point ⁇ J point, J point ⁇ K point, K point ⁇ L point.
  • the fv value corresponding to the lens position gradually increases; in the process from J point to point L, the fv value corresponding to the lens position gradually decreases, that is, the fv corresponding to the J point lens position.
  • the value is higher than the fv value corresponding to the I point and the K point lens position.
  • the parabola is fitted according to the fv value corresponding to the I point, the J point, and the K point lens position, and the vertex of the parabola is obtained as the M point.
  • the motor drive lens reaches the lens position corresponding to the M point, that is, when the drive lens reaches the corresponding lens position when the fv value is the highest, the lens focus is completed.
  • the embodiment of the present application further provides a mobile terminal.
  • the above mobile terminal includes an image processing circuit, and the image processing circuit can be implemented by using hardware and/or software components, and can include various processing units defining an ISP (Image Signal Processing) pipeline.
  • Figure 7 is a schematic illustration of an image processing circuit in one embodiment. As shown in FIG. 7, for convenience of explanation, only various aspects of the image processing technique related to the embodiment of the present application are shown.
  • image processing circuit 740 includes ISP front end processing logic 742, ISP pipeline processing logic 744, and control logic 746.
  • the image data captured by imaging device 710 is first processed by ISP front-end processing logic 742, which analyzes the image data to capture one or more that can be used to determine ISP pipeline processing logic 744 and/or imaging device 710.
  • Imaging device 710 can include a camera having one or more lenses 712 and image sensors 714.
  • Image sensor 714 can include a color filter array (such as a Bayer filter) that can capture light intensity and wavelength information captured by each imaging pixel of image sensor 714 and provide a processing that can be processed by ISP front end processing logic 742 Group raw image data.
  • the sensor 720 interface receives the output of the imaging device 710 and provides raw image data to the ISP front end processing logic 742 based on the sensor 720 interface type.
  • the sensor 720 interface may utilize a SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above.
  • SMIA Standard Mobile Imaging Architecture
  • the ISP front end processing logic 742 processes the raw image data pixel by pixel in a variety of formats.
  • each image pixel can have a bit depth of 8, 10, 12, or 14 bits, and ISP front end processing logic 742 can perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Among them, image processing operations can be performed with the same or different bit depth precision.
  • the ISP front end processing logic 742 can also receive pixel data from the image memory 730. For example, raw pixel data is sent from the sensor 720 interface to image memory 730, which is then provided to ISP front end processing logic 742 for processing.
  • Image memory 730 can be part of a memory device, a storage device, or a separate dedicated memory within an electronic device, and can include DMA (Direct Memory Access) features.
  • DMA Direct Memory Access
  • ISP front end processing logic 742 can perform one or more image processing operations, such as time domain filtering.
  • the processed image data can be sent to ISP pipeline processing logic 744 or image memory 730 for additional processing prior to being displayed.
  • the ISP pipeline processing logic 744 can also receive "front end” processing data directly from the ISP front end processing logic 742, or receive "front end” processing data from the image memory 730, and perform "front end” processing data in the original domain as well as RGB and YCbCr. Image data processing in color space.
  • the image data processed by ISP pipeline processing logic 744 can be output to display 750 for viewing by a user and/or further processed by a graphics engine or GPU (Graphics Processing Unit).
  • graphics engine or GPU Graphics Processing Unit
  • the output of ISP pipeline processing logic 744 can also be sent to image memory 730, and display 750 can read image data from image memory 730.
  • image memory 730 can be configured to implement one or more frame buffers.
  • the output of ISP pipeline processing logic 744 can be sent to encoder/decoder 760 to encode/decode image data. The encoded image data can be saved and decompressed before being displayed on the display 750 device.
  • the statistics determined by the ISP front end processing logic 742 can be sent to the control logic 746 unit.
  • the statistics may include image sensor 714 statistics such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, lens 712 shading correction, and the like.
  • Control logic 746 can include a processor and/or a microcontroller that executes one or more routines, such as firmware, and one or more routines can determine control parameters of imaging device 710 and ISP pipelines based on received statistical data.
  • the control parameters of the logic 744 are processed.
  • the control parameters may include sensor 720 control parameters (eg, gain, integration time for exposure control), camera flash control parameters, lens 712 control parameters (eg, focus or zoom focal length), or a combination of these parameters.
  • the ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (eg, during RGB processing), and lens 712 shading correction parameters.
  • the first scan refers to an accurate scan.
  • Camera focusing in a mobile terminal can include two steps of pre-scanning and precise scanning.
  • pre-scanning the approximate range of the focus position of the camera lens can be obtained; by precise scanning, the precise position of the focus of the camera lens can be obtained.
  • the mobile terminal can acquire the rotational angular velocity value corresponding to the current frame picture.
  • the rotational angular velocity value may be obtained by the gyro detection in the mobile terminal. If the rotational angular velocity value corresponding to the current frame picture is greater than the preset first threshold, the mobile terminal determines the current frame jitter and acquires the fv value corresponding to the current frame picture.
  • the fv value is a value that is positively correlated with the image sharpness, and the clearer the image, the larger the fv value corresponding to the image.
  • the mobile terminal detects that the rotational angular velocity value corresponding to the current frame picture is greater than the first threshold, and the difference between the fv value corresponding to the current frame picture and the fv value corresponding to the previous frame picture is greater than the second threshold, and determines that the current frame picture corresponds to The fv value is abnormal.
  • the mobile terminal detects that the rotational angular velocity value corresponding to the current frame picture is greater than the first threshold, and the difference between the fv value corresponding to the current frame picture and the fv value corresponding to the previous frame picture is greater than the second threshold, and determines that the current frame picture corresponds to The fv value is abnormal.
  • the mobile terminal compensates for the fv value corresponding to the current frame picture, thereby reducing the influence of the jitter of the mobile terminal on the focus.
  • the mobile terminal continues to perform an accurate scan, and detects the rotational angular velocity value and the fv value corresponding to the acquired image in real time, and detects that the rotational angular velocity value is greater than the first
  • the fv value corresponding to the acquired picture is compensated, and real-time focusing is performed according to the compensated fv value.
  • the compensing the fv value corresponding to the current frame picture in the step (2) comprises: acquiring a fitting line according to the fv value corresponding to the first two frames of the current frame picture; and acquiring the current frame picture according to the fitting line. Fv value.
  • the method for compensating includes: acquiring an fv value corresponding to the first two frames of the current frame picture, obtaining a fitting line according to the fv value corresponding to the first two frames, and obtaining an fv value of the current frame picture according to the fitted straight line.
  • the horizontal axis coordinates in the line graph of Fig. 2 are the first frame and the second frame in the case of accurate scanning, and the left frame is the fv value corresponding to the screen.
  • the mobile terminal When the mobile terminal detects that the rotational angular velocity value corresponding to the sixth frame is greater than the first threshold, and the difference between the fv value corresponding to the sixth frame and the fv value corresponding to the fifth frame is greater than the second threshold, the mobile terminal obtains The fv value corresponding to the fourth frame screen is 10, and the fv value corresponding to the fifth frame screen is 12. As shown in FIG. 2, a straight line is fitted according to the fv value of the fourth frame picture and the fv value of the fifth frame picture, and the fv value of the sixth frame picture is obtained according to the fitted straight line, and the sixth frame picture is corresponding. The fv value is adjusted to 14, that is, the fv value corresponding to the sixth frame picture is compensated.
  • the compensing the fv value corresponding to the current frame picture in the step (2) includes: acquiring an fv value corresponding to the previous frame picture of the current frame picture and an average value of the fv value corresponding to the subsequent frame picture; The average value is taken as the fv value corresponding to the current frame picture.
  • the method for compensating includes: accurately scanning to obtain a picture of the next frame, and if the value of the rotational angular velocity corresponding to the picture of the next frame is within the first threshold, acquiring the fv value corresponding to the picture of the next frame, and the previous frame of the current frame picture. The fv value corresponding to the picture and the average value of the fv value corresponding to the subsequent frame picture; the average value is used as the fv value corresponding to the current frame picture.
  • the mobile terminal detects that the rotational angular velocity value corresponding to the sixth frame picture is greater than the first threshold, and the difference between the fv value corresponding to the sixth frame and the fv value corresponding to the fifth frame is greater than the second.
  • the threshold value is further scanned to obtain the 7th frame picture, and the rotation angular velocity value of the 7th frame picture is detected. If the rotation angular velocity value of the 7th frame picture is within the first threshold, the fv value of the 7th frame picture is obtained, and the 5th frame is obtained.
  • the average value of the fv value of the picture and the fv value of the picture of the seventh frame is taken as the fv value of the picture of the sixth frame.
  • the focusing method before the first scan acquires the focus area in step (1), includes: acquiring a focus range by the second scan; and acquiring the focus range by the second scan includes: acquiring the current frame picture corresponding to If the fv value of the current frame picture is greater than the fv value corresponding to the previous frame picture, the scanning continues until the fv value corresponding to the current frame picture is smaller than the fv value corresponding to the previous frame picture.
  • the second scan refers to a pre-scan.
  • the mobile terminal obtains an approximate interval of the focus position of the camera lens by pre-scanning. As shown in FIG. 3, in the line graph of FIG. 3, the abscissa is the lens position, and the ordinate is the fv value corresponding to the lens position.
  • the mobile terminal drives the lens to perform a search with a larger step size. For example, if the total stroke that the motor can drive is 1000, the step size of the motor-driven lens is set to 80 during the pre-scanning process.
  • the motor drives the distance of one advance by 80.
  • the motor drives the lens once, and acquires the fv value of the screen corresponding to the lens position.
  • the motor-driven lens consists of point A ⁇ point B, point B ⁇ point C, point C ⁇ point D, point D ⁇ point E, point E ⁇ point F, point F ⁇ point G, at point A.
  • the fv value corresponding to the lens position gradually increases.
  • the algorithm determines that the motor-driven lens has passed the lens corresponding to the maximum fv value. Position, end the pre-scan step and enter the precise scan step.
  • performing focusing according to the compensated fv value includes: acquiring an fv value of consecutive three frames, if the fv value of the intermediate frame picture is greater than the fv value of the previous frame, and the fv value of the intermediate frame picture The fv value is larger than the fv value of the next frame, and the fitting curve is obtained according to the fv value of the three consecutive frames, and the camera lens is driven to reach the lens position corresponding to the apex of the fitting curve and the focus is completed.
  • the mobile terminal compensates the fv value corresponding to the picture in the accurate scan in real time, and performs focusing according to the compensated fv value.
  • the precise scanning step is entered.
  • the step size of the motor-driven camera lens is small, such as a distance of 30 per drive.
  • the motor-driven lens moves back from G point to 5 steps, that is, from G point ⁇ H point, H point ⁇ I point, I point ⁇ J point, J point ⁇ K point, K point ⁇ L point.
  • the fv value corresponding to the lens position gradually increases; in the process from J point to point L, the fv value corresponding to the lens position gradually decreases, that is, the fv corresponding to the J point lens position.
  • the value is higher than the fv value corresponding to the I point and the K point lens position.
  • the parabola is fitted according to the fv value corresponding to the I point, the J point, and the K point lens position, and the vertex of the parabola is obtained as the M point.
  • the motor drive lens reaches the lens position corresponding to the M point, that is, when the drive lens reaches the corresponding lens position when the fv value is the highest, the lens focus is completed.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

本申请涉及一种对焦方法、装置、计算机可读存储介质和移动终端。上述方法包括:在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;根据补偿后的fv值进行对焦。本发明实施例中对焦方法,在检测到移动终端抖动时,获取当前画面的fv值,在当前画面的fv值异常时对fv值进行补偿,有效的解决了暗光条件下移动终端抖动导致画面失焦的问题,提高了暗光条件下移动终端对焦的效果。

Description

对焦方法、装置、计算机可读存储介质和移动终端
相关申请的交叉引用
本申请要求于2017年06月16日提交中国专利局、申请号为201710459601.2、发明名称为“对焦方法、装置、计算机可读存储介质和移动终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种对焦方法、装置、计算机可读存储介质和移动终端。
背景技术
随着智能移动终端的发展,使用智能移动终端拍照越来越频繁,用户对于智能移动终端拍摄效果的要求也越来越高。在采用摄像头对物体进行拍摄时,摄像头需要确定能够清晰成像的焦距,再以上述焦距对物体进行拍摄,从而使拍摄的图片成像清晰。
发明内容
本申请实施例提供一种对焦方法、装置、计算机可读存储介质和移动终端,可以避免暗光条件下手抖导致的失焦问题。
一种对焦方法,包括:
在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;
检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;及
根据补偿后的fv值进行对焦。
一种对焦装置,包括:
获取模块,用于在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;
补偿模块,用于检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;及
对焦模块,用于根据补偿后的fv值进行对焦。
一种移动终端,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下步骤:
在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;
检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;及
根据补偿后的fv值进行对焦。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:
在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;
检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;及
根据补偿后的fv值进行对焦。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中对焦方法的流程图;
图2为一个实施例中镜头位置与fv值关系的折线图和拟合直线图;
图3为一个实施例中镜头位置与fv值关系的折线图;
图4为一个实施例中镜头位置与fv值关系的折线图和拟合曲线图;
图5为一个实施例中对焦装置的结构框图;
图6为另一个实施例中对焦装置的结构框图;
图7为一个实施例中图像处理电路的示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中对焦方法的流程图。如图1所示,一种对焦方法,包括步骤102至步骤106:
步骤102,在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值。
具体地,第一扫描是指精确扫描。移动终端中摄像头对焦可包括预先扫描和精确扫描两个步骤。其中,预先扫描即为pre scan,通过预先扫描,可获取摄像头镜头合焦点位置的区间;精确扫描即为fine scan,通过精确扫描,可获取摄像头镜头合位置。在移动终端中摄像头精确扫描时,移动终端可获取当前帧画面对应的转动角速度值。其中,转动角速度值可由移动终端中陀螺仪检测获取,若当前帧画面对应的转动角速度值大于预设的第一阈值,移动终端判定当前画面抖动,获取当前帧画面对应的fv(Focus Value,聚焦值)值。其中,fv值是与图像清晰度正相关的值,图像越清晰、图像对应的fv值越大。
步骤104,检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对当前帧画面对应的fv值进行补偿。
具体地,移动终端检测到当前帧画面对应的转动角速度值大于第一阈值, 且当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,判定当前帧画面对应的fv值异常。通常情况下,在暗光环境中,即在光照条件不足的环境下,移动终端拍摄图片时曝光时间增长,移动终端的抖动会使得当前帧画面模糊、画面的清晰度降低,从而使获取的当前帧画面对应的fv值偏小,从而出现偏差。移动终端检测到当前帧画面对应的fv值偏小后,即对当前帧画面对应的fv值进行补偿,减少移动终端抖动对对焦的影响。
步骤106,根据补偿后的fv值进行对焦。
在精确扫描过程中,对当前帧画面对应的fv值进行补偿后,移动终端继续进行精确扫描,并实时检测获取的画面对应的转动角速度值和fv值,并在检测到转动角速度值大于第一阈值,fv值与前一帧画面对应的fv值的差值大于第二阈值时,对获取的画面对应的fv值进行补偿,并根据补偿后的fv值进行实时对焦。
传统技术中,在暗光条件下进行画面对焦时,移动终端的抖动会使得画面清晰度降低,画面失焦。本申请实施例中对焦方法,在检测到移动终端抖动时,获取当前画面的fv值,在当前画面的fv值异常时对fv值进行补偿,有效的解决了暗光条件下移动终端抖动导致画面失焦的问题,提高了暗光条件下移动终端对焦的效果。
在一个实施例中,步骤104中对当前帧画面对应的fv值进行补偿包括:根据当前帧画面前两帧画面对应的fv值获取拟合直线;根据拟合直线获取当前帧画面对应的fv值。
当移动终端检测到当前帧画面对应的fv值偏小,即当前帧画面对应的fv值出现偏差时,对当前帧画面对应的fv值进行补偿。其中,补偿的方法包括:获取当前帧画面前两帧画面对应的fv值,根据前两帧画面对应的fv值获取拟合直线,根据拟合直线获取当前帧画面的fv值。如图2所示,图2折线图中横轴坐标为精确扫描时第1帧、第2帧···第6帧画面,纵轴左边为画面对应的fv值。移动终端在精确扫描时检测到第6帧画面对应的转动角速度值大于第一阈值,且第6帧画面对应的fv值与第5帧画面对应的fv值的差值大于第 二阈值,则获取第4帧画面对应的fv值10、第5帧画面对应的fv值12。如图2所示,根据第4帧画面的fv值和第5帧画面的fv值拟合直线,并根据拟合直线获取第6帧画面的fv值为14,则将第6帧画面对应的fv值调整为14,即对第6帧画面对应的fv值进行了补偿。
本申请实施例中对焦方案,在检测到当前帧画面对应的fv值异常时,根据前两帧画面的fv值拟合直线,获取当前帧画面的fv值,保证了补偿的fv值的准确性。
在一个实施例中,步骤104中对当前帧画面对应的fv值进行补偿包括:获取当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;将平均值作为当前帧画面对应的fv值。
当移动终端检测到当前帧画面对应的fv值偏小,即当前帧画面对应的fv值出现偏差时,对当前帧画面对应的fv值进行补偿。其中,补偿的方法包括:精确扫描获取后一帧图片,若后一帧图片对应的转动角速度值在第一阈值内,则获取后一帧图片对应的fv值,将当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;将上述平均值作为当前帧画面对应的fv值。例如,在精确扫描过程中,移动终端检测到第6帧画面对应的转动角速度值大于第一阈值,且第6帧画面对应的fv值与第5帧画面对应的fv值的差值大于第二阈值,则继续扫描获取第7帧图片,检测第7帧图片的转动角速度值,若第7帧图片的转动角速度值在第一阈值内,则获取第7帧图片的fv值,将第5帧图片的fv值与第7帧图片的fv值的平均值作为第6帧图片的fv值。
本申请实施例中对焦方案,在检测到当前帧画面对应的fv值异常时,根据前后两帧画面的fv值求取平均值,将平均值作为当前帧画面的fv值,保证了补偿的fv值的准确性。
在一个实施例中,在步骤S102第一扫描获取合焦区域之前,上述对焦方法包括:通过第二扫描获取合焦范围;通过第二扫描获取合焦范围包括:获取当前帧画面对应的fv值,若当前帧画面对应的fv值大于前一帧画面对应的fv值,继续扫描直到当前帧画面对应的fv值小于前一帧画面对应的fv值。
第二扫描是指预先扫描。移动终端通过预先扫描获取摄像头镜头合焦点位置的大致区间。如图3所示,图3折线图中横坐标为镜头位置,纵坐标为镜头位置对应的fv值。在预先扫描过程中,移动终端会驱动镜头进行步长较大的搜索,例如,马达可驱动的总行程为1000,则在预先扫描的过程中,设定马达驱动镜头的步长为80,即马达驱动一次前进的距离为80,马达每驱动镜头一次,获取一次镜头位置对应的画面的fv值。如图3所示,马达驱动镜头由A点→B点、B点→C点、C点→D点、D点→E点、E点→F点、F点→G点,在由A点到F点的过程中,镜头位置对应的fv值逐渐增大,在F点到G点时,镜头位置对应的fv值减小,则算法判定马达驱动镜头走过了fv值最大时对应的镜头位置,结束预先扫描步骤并进入精确扫描步骤。
在一个实施例中,根据补偿后的fv值进行对焦包括:获取连续三帧画面的fv值,若检测到中间帧画面的fv值大于前一帧画面的fv值,且中间帧画面的fv值大于后一帧画面的fv值,根据连续三帧画面的fv值获取拟合曲线,驱动摄像机镜头到达拟合曲线顶点对应的镜头位置并完成对焦。
移动终端在获取精确扫描过程中,对精确扫描中画面对应的fv值进行实时补偿,并根据补偿后的fv值进行对焦。如图3所示,当马达驱动摄像头镜头到达G点完成预先扫描时,进入精确扫描步骤。在精确扫描过程中,马达驱动摄像头镜头的步长较小,如每次驱动的距离为30。马达驱动镜头由G点往回走5步,即由G点→H点、H点→I点、I点→J点、J点→K点、K点→L点。在由G点到J点的过程中,镜头位置对应的fv值逐渐增大;在由J点到L点的过程中,镜头位置对应的fv值逐渐减小,即J点镜头位置对应的fv值高于I点和K点镜头位置对应的fv值,如图4所示,根据I点、J点和K点镜头位置对应的fv值拟合抛物线,并获取抛物线的顶点为M点,则马达驱动镜头到达M点对应的镜头位置,即驱动镜头到达fv值最高时对应的镜头位置,则镜头对焦完成。
在一个实施例中,一种对焦方法,包括:
获取第一摄像头合焦时镜头位置对应的合焦距离;
获取所述合焦距离对应的第二摄像头合焦时镜头位置;
驱动第二摄像头的镜头到达所述第二摄像头合焦时镜头位置并进行对焦。
本申请实施例的方法流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,本申请实施例的方法流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
图5为一个实施例中对焦装置的结构框图。如图5所示,一种对焦装置包括获取模块502、补偿模块504和对焦模块506。其中:
获取模块502,用于在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值。
补偿模块504,用于检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对当前帧画面对应的fv值进行补偿。
对焦模块506,用于根据补偿后的fv值进行对焦。
在一个实施例中,补偿模块504还用于根据当前帧画面前两帧画面对应的fv值获取拟合直线;根据拟合直线获取当前帧画面对应的fv值。
在一个实施例中,补偿模块504还用于获取当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;将平均值作为当前帧画面对应的fv值。
在一个实施例中,对焦模块506还用于获取连续三帧画面的fv值,若检测到中间帧画面的fv值大于前一帧画面的fv值,且中间帧画面的fv值大于后一帧画面的fv值,根据连续三帧画面的fv值获取拟合曲线,驱动摄像机镜头到达拟合曲线顶点对应的镜头位置并完成对焦。
图6为另一个实施例中对焦方法的结构框图。如图6所示,一种对焦装 置,包括获取模块602、补偿模块604和对焦模块606和扫描模块608。其中,获取模块602、补偿模块604和对焦模块606与图5中对应的模块功能。
扫描模块608,用于在第一扫描获取合焦区域之前,通过第二扫描获取合焦范围;通过第二扫描获取合焦范围包括:获取当前帧画面对应的fv值,若当前帧画面对应的fv值大于前一帧画面对应的fv值,继续扫描直到当前帧画面对应的fv值小于前一帧画面对应的fv值。
上述对焦装置中各个模块的划分仅用于举例说明,在其他实施例中,可将对焦装置按照需要划分为不同的模块,以完成上述对焦装置的全部或部分功能。
在一个实施例中,一种对焦装置,包括:
获取模块,用于获取第一摄像头合焦时镜头位置对应的合焦距离、获取所述合焦距离对应的第二摄像头合焦时镜头位置;
驱动模块,用于驱动第二摄像头的镜头到达所述第二摄像头合焦时镜头位置并进行对焦。
上述对焦装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于服务器中的处理器中,也可以以软件形式存储于服务器中的存储器中,以便于处理器调用执行以上各个模块对应的操作。如在本申请中所使用的,术语“组件”、“模块”和“系统”等旨在表示计算机相关的实体,它可以是硬件、硬件和软件的组合、软件、或者执行中的软件。例如,组件可以是但不限于是,在处理器上运行的进程、处理器、对象、可执行码、执行的线程、程序和/或计算机。作为说明,运行在服务器上的应用程序和服务器都可以是组件。一个或多个组件可以驻留在进程和/或执行的线程中,并且组件可以位于一个计算机内和/或分布在两个或更多的计算机之间。
本申请实施例还提供了一种计算机可读存储介质。一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:
(1)在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度 值大于第一阈值,获取当前帧画面对应的聚焦值fv值。
具体地,第一扫描是指精确扫描。移动终端中摄像头对焦可包括预先扫描和精确扫描两个步骤。通过预先扫描,可获取摄像头镜头合焦点位置的大致区间;通过精确扫描,可获取摄像头镜头合焦点的精确位置。在移动终端中摄像头精确扫描时,移动终端可获取当前帧画面对应的转动角速度值。其中,转动角速度值可由移动终端中陀螺仪检测获取,若当前帧画面对应的转动角速度值大于预设的第一阈值,移动终端判定当前画面抖动,获取当前帧画面对应的fv值。其中,fv值是与图像清晰度正相关的值,图像越清晰、图像对应的fv值越大。
(2)检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对当前帧画面对应的fv值进行补偿。
具体地,移动终端检测到当前帧画面对应的转动角速度值大于第一阈值,且当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,判定当前帧画面对应的fv值异常。通常情况下,在暗光环境中,移动终端拍摄图片时曝光时间增长,移动终端的抖动会使得当前帧画面模糊、画面的清晰度降低,从而使获取的当前帧画面对应的fv值偏小,从而出现偏差。移动终端检测到当前帧画面对应的fv值偏小后,即对当前帧画面对应的fv值进行补偿,减少移动终端抖动对对焦的影响。
(3)根据补偿后的fv值进行对焦。
在精确扫描过程中,对当前帧画面对应的fv值进行补偿后,移动终端继续进行精确扫描,并实时检测获取的画面对应的转动角速度值和fv值,并在检测到转动角速度值大于第一阈值,fv值与前一帧画面对应的fv值的差值大于第二阈值时,对获取的画面对应的fv值进行补偿,并根据补偿后的fv值进行实时对焦。
在一个实施例中,步骤(2)中对当前帧画面对应的fv值进行补偿包括:根据当前帧画面前两帧画面对应的fv值获取拟合直线;根据拟合直线获取当前帧画面对应的fv值。
当移动终端检测到当前帧画面对应的fv值偏小,即当前帧画面对应的fv值出现偏差时,对当前帧画面对应的fv值进行补偿。其中,补偿的方法包括:获取当前帧画面前两帧画面对应的fv值,根据前两帧画面对应的fv值获取拟合直线,根据拟合直线获取当前帧画面的fv值。如图2所示,图2折线图中横轴坐标为精确扫描时第1帧、第2帧···第6帧画面,纵轴左边为画面对应的fv值。移动终端在精确扫描时检测到第6帧画面对应的转动角速度值大于第一阈值,且第6帧画面对应的fv值与第5帧画面对应的fv值的差值大于第二阈值,则获取第4帧画面对应的fv值10、第5帧画面对应的fv值12。如图2所示,根据第4帧画面的fv值和第5帧画面的fv值拟合直线,并根据拟合直线获取第6帧画面的fv值为14,则将第6帧画面对应的fv值调整为14,即对第6帧画面对应的fv值进行了补偿。
在一个实施例中,步骤(2)中对当前帧画面对应的fv值进行补偿包括:获取当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;将平均值作为当前帧画面对应的fv值。
当移动终端检测到当前帧画面对应的fv值偏小,即当前帧画面对应的fv值出现偏差时,对当前帧画面对应的fv值进行补偿。其中,补偿的方法包括:精确扫描获取后一帧图片,若后一帧图片对应的转动角速度值在第一阈值内,则获取后一帧图片对应的fv值,将当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;将上述平均值作为当前帧画面对应的fv值。例如,在精确扫描过程中,移动终端检测到第6帧画面对应的转动角速度值大于第一阈值,且第6帧画面对应的fv值与第5帧画面对应的fv值的差值大于第二阈值,则继续扫描获取第7帧图片,检测第7帧图片的转动角速度值,若第7帧图片的转动角速度值在第一阈值内,则获取第7帧图片的fv值,将第5帧图片的fv值与第7帧图片的fv值的平均值作为第6帧图片的fv值。
在一个实施例中,在步骤(1)第一扫描获取合焦区域之前,上述对焦方法包括:通过第二扫描获取合焦范围;通过第二扫描获取合焦范围包括:获取当前帧画面对应的fv值,若当前帧画面对应的fv值大于前一帧画面对应的 fv值,继续扫描直到当前帧画面对应的fv值小于前一帧画面对应的fv值。
第二扫描是指预先扫描。移动终端通过预先扫描获取摄像头镜头合焦点位置的大致区间。如图3所示,图3折线图中横坐标为镜头位置,纵坐标为镜头位置对应的fv值。在预先扫描过程中,移动终端会驱动镜头进行步长较大的搜索,例如,马达可驱动的总行程为1000,则在预先扫描的过程中,设定马达驱动镜头的步长为80,即马达驱动一次前进的距离为80,马达每驱动镜头一次,获取一次镜头位置对应的画面的fv值。如图3所示,马达驱动镜头由A点→B点、B点→C点、C点→D点、D点→E点、E点→F点、F点→G点,在由A点到F点的过程中,镜头位置对应的fv值逐渐增大,在F点到G点时,镜头位置对应的fv值减小,则算法判定马达驱动镜头走过了fv值最大时对应的镜头位置,结束预先扫描步骤并进入精确扫描步骤。
在一个实施例中,根据补偿后的fv值进行对焦包括:获取连续三帧画面的fv值,若检测到中间帧画面的fv值大于前一帧画面的fv值,且中间帧画面的fv值大于后一帧画面的fv值,根据连续三帧画面的fv值获取拟合曲线,驱动摄像机镜头到达拟合曲线顶点对应的镜头位置并完成对焦。
移动终端在获取精确扫描过程中,对精确扫描中画面对应的fv值进行实时补偿,并根据补偿后的fv值进行对焦。如图3所示,当马达驱动摄像头镜头到达G点完成预先扫描时,进入精确扫描步骤。在精确扫描过程中,马达驱动摄像头镜头的步长较小,如每次驱动的距离为30。马达驱动镜头由G点往回走5步,即由G点→H点、H点→I点、I点→J点、J点→K点、K点→L点。在由G点到J点的过程中,镜头位置对应的fv值逐渐增大;在由J点到L点的过程中,镜头位置对应的fv值逐渐减小,即J点镜头位置对应的fv值高于I点和K点镜头位置对应的fv值,如图4所示,根据I点、J点和K点镜头位置对应的fv值拟合抛物线,并获取抛物线的顶点为M点,则马达驱动镜头到达M点对应的镜头位置,即驱动镜头到达fv值最高时对应的镜头位置,则镜头对焦完成。
本申请实施例还提供一种移动终端。上述移动终端中包括图像处理电路, 图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图7为一个实施例中图像处理电路的示意图。如图7所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。
如图7所示,图像处理电路740包括ISP前端处理逻辑器742、ISP管道处理逻辑器744和控制逻辑器746。成像设备710捕捉的图像数据首先由ISP前端处理逻辑器742处理,ISP前端处理逻辑器742对图像数据进行分析以捕捉可用于确定ISP管道处理逻辑器744和/或成像设备710的一个或多个控制参数的图像统计信息。成像设备710可包括具有一个或多个透镜712和图像传感器714的照相机。图像传感器714可包括色彩滤镜阵列(如Bayer滤镜),图像传感器714可获取用图像传感器714的每个成像像素捕捉的光强度和波长信息,并提供可由ISP前端处理逻辑器742处理的一组原始图像数据。例如,传感器720接口接收成像设备710的输出,并基于传感器720接口类型把原始图像数据提供给ISP前端处理逻辑器742。传感器720接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口、或上述接口的组合。
ISP前端处理逻辑器742按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP前端处理逻辑器742可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。
ISP前端处理逻辑器742还可从图像存储器730接收像素数据。例如,从传感器720接口将原始像素数据发送给图像存储器730,图像存储器730中的原始像素数据再提供给ISP前端处理逻辑器742以供处理。图像存储器730可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。
当接收到来自传感器720接口或来自图像存储器730的原始图像数据时,ISP前端处理逻辑器742可进行一个或多个图像处理操作,如时域滤波。处理 后的图像数据可发送给ISP管道处理逻辑器744或图像存储器730,以便在被显示之前进行另外的处理。ISP管道处理逻辑器744还可直接从ISP前端处理逻辑器742接收“前端”处理数据,或从图像存储器730接收“前端”处理数据,并对“前端”处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。ISP管道处理逻辑器744处理后的图像数据可输出给显示器750,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP管道处理逻辑器744的输出还可发送给图像存储器730,且显示器750可从图像存储器730读取图像数据。在一个实施例中,图像存储器730可被配置为实现一个或多个帧缓冲器。此外,ISP管道处理逻辑器744的输出可发送给编码器/解码器760,以便编码/解码图像数据。编码的图像数据可被保存,并在显示与显示器750设备上之前解压缩。
ISP前端处理逻辑器742确定的统计数据可发送给控制逻辑器746单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜712阴影校正等图像传感器714统计信息。控制逻辑器746可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备710的控制参数以及ISP管道处理逻辑器744的控制参数。例如,控制参数可包括传感器720控制参数(例如增益、曝光控制的积分时间)、照相机闪光控制参数、透镜712控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜712阴影校正参数。
以下为运用图7中图像处理技术实现对焦方法的步骤:
(1)在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值。
具体地,第一扫描是指精确扫描。移动终端中摄像头对焦可包括预先扫描和精确扫描两个步骤。通过预先扫描,可获取摄像头镜头合焦点位置的大致区间;通过精确扫描,可获取摄像头镜头合焦点的精确位置。在移动终端 中摄像头精确扫描时,移动终端可获取当前帧画面对应的转动角速度值。其中,转动角速度值可由移动终端中陀螺仪检测获取,若当前帧画面对应的转动角速度值大于预设的第一阈值,移动终端判定当前画面抖动,获取当前帧画面对应的fv值。其中,fv值是与图像清晰度正相关的值,图像越清晰、图像对应的fv值越大。
(2)检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对当前帧画面对应的fv值进行补偿。
具体地,移动终端检测到当前帧画面对应的转动角速度值大于第一阈值,且当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,判定当前帧画面对应的fv值异常。通常情况下,在暗光环境中,移动终端拍摄图片时曝光时间增长,移动终端的抖动会使得当前帧画面模糊、画面的清晰度降低,从而使获取的当前帧画面对应的fv值偏小,从而出现偏差。移动终端检测到当前帧画面对应的fv值偏小后,即对当前帧画面对应的fv值进行补偿,减少移动终端抖动对对焦的影响。
(3)根据补偿后的fv值进行对焦。
在精确扫描过程中,对当前帧画面对应的fv值进行补偿后,移动终端继续进行精确扫描,并实时检测获取的画面对应的转动角速度值和fv值,并在检测到转动角速度值大于第一阈值,fv值与前一帧画面对应的fv值的差值大于第二阈值时,对获取的画面对应的fv值进行补偿,并根据补偿后的fv值进行实时对焦。
在一个实施例中,步骤(2)中对当前帧画面对应的fv值进行补偿包括:根据当前帧画面前两帧画面对应的fv值获取拟合直线;根据拟合直线获取当前帧画面对应的fv值。
当移动终端检测到当前帧画面对应的fv值偏小,即当前帧画面对应的fv值出现偏差时,对当前帧画面对应的fv值进行补偿。其中,补偿的方法包括:获取当前帧画面前两帧画面对应的fv值,根据前两帧画面对应的fv值获取拟合直线,根据拟合直线获取当前帧画面的fv值。如图2所示,图2折线图中 横轴坐标为精确扫描时第1帧、第2帧···第6帧画面,纵轴左边为画面对应的fv值。移动终端在精确扫描时检测到第6帧画面对应的转动角速度值大于第一阈值,且第6帧画面对应的fv值与第5帧画面对应的fv值的差值大于第二阈值,则获取第4帧画面对应的fv值10、第5帧画面对应的fv值12。如图2所示,根据第4帧画面的fv值和第5帧画面的fv值拟合直线,并根据拟合直线获取第6帧画面的fv值为14,则将第6帧画面对应的fv值调整为14,即对第6帧画面对应的fv值进行了补偿。
在一个实施例中,步骤(2)中对当前帧画面对应的fv值进行补偿包括:获取当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;将平均值作为当前帧画面对应的fv值。
当移动终端检测到当前帧画面对应的fv值偏小,即当前帧画面对应的fv值出现偏差时,对当前帧画面对应的fv值进行补偿。其中,补偿的方法包括:精确扫描获取后一帧图片,若后一帧图片对应的转动角速度值在第一阈值内,则获取后一帧图片对应的fv值,将当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;将上述平均值作为当前帧画面对应的fv值。例如,在精确扫描过程中,移动终端检测到第6帧画面对应的转动角速度值大于第一阈值,且第6帧画面对应的fv值与第5帧画面对应的fv值的差值大于第二阈值,则继续扫描获取第7帧图片,检测第7帧图片的转动角速度值,若第7帧图片的转动角速度值在第一阈值内,则获取第7帧图片的fv值,将第5帧图片的fv值与第7帧图片的fv值的平均值作为第6帧图片的fv值。
在一个实施例中,在步骤(1)第一扫描获取合焦区域之前,上述对焦方法包括:通过第二扫描获取合焦范围;通过第二扫描获取合焦范围包括:获取当前帧画面对应的fv值,若当前帧画面对应的fv值大于前一帧画面对应的fv值,继续扫描直到当前帧画面对应的fv值小于前一帧画面对应的fv值。
第二扫描是指预先扫描。移动终端通过预先扫描获取摄像头镜头合焦点位置的大致区间。如图3所示,图3折线图中横坐标为镜头位置,纵坐标为镜头位置对应的fv值。在预先扫描过程中,移动终端会驱动镜头进行步长较 大的搜索,例如,马达可驱动的总行程为1000,则在预先扫描的过程中,设定马达驱动镜头的步长为80,即马达驱动一次前进的距离为80,马达每驱动镜头一次,获取一次镜头位置对应的画面的fv值。如图3所示,马达驱动镜头由A点→B点、B点→C点、C点→D点、D点→E点、E点→F点、F点→G点,在由A点到F点的过程中,镜头位置对应的fv值逐渐增大,在F点到G点时,镜头位置对应的fv值减小,则算法判定马达驱动镜头走过了fv值最大时对应的镜头位置,结束预先扫描步骤并进入精确扫描步骤。
在一个实施例中,根据补偿后的fv值进行对焦包括:获取连续三帧画面的fv值,若检测到中间帧画面的fv值大于前一帧画面的fv值,且中间帧画面的fv值大于后一帧画面的fv值,根据连续三帧画面的fv值获取拟合曲线,驱动摄像机镜头到达拟合曲线顶点对应的镜头位置并完成对焦。
移动终端在获取精确扫描过程中,对精确扫描中画面对应的fv值进行实时补偿,并根据补偿后的fv值进行对焦。如图3所示,当马达驱动摄像头镜头到达G点完成预先扫描时,进入精确扫描步骤。在精确扫描过程中,马达驱动摄像头镜头的步长较小,如每次驱动的距离为30。马达驱动镜头由G点往回走5步,即由G点→H点、H点→I点、I点→J点、J点→K点、K点→L点。在由G点到J点的过程中,镜头位置对应的fv值逐渐增大;在由J点到L点的过程中,镜头位置对应的fv值逐渐减小,即J点镜头位置对应的fv值高于I点和K点镜头位置对应的fv值,如图4所示,根据I点、J点和K点镜头位置对应的fv值拟合抛物线,并获取抛物线的顶点为M点,则马达驱动镜头到达M点对应的镜头位置,即驱动镜头到达fv值最高时对应的镜头位置,则镜头对焦完成。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (16)

  1. 一种对焦方法,包括:
    在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;
    检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;及
    根据补偿后的fv值进行对焦。
  2. 根据权利要求1所述的对焦方法,其特征在于,所述对所述当前帧画面对应的fv值进行补偿包括:
    根据当前帧画面前两帧画面对应的fv值获取拟合直线;及
    根据所述拟合直线获取当前帧画面对应的fv值。
  3. 根据权利要求1所述的对焦方法,其特征在于,所述对所述当前帧画面对应的fv值进行补偿包括:
    获取当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;及
    将所述平均值作为当前帧画面对应的fv值。
  4. 根据权利要求1所述的对焦方法,其特征在于,在第一扫描获取合焦区域之前,还包括:
    通过第二扫描获取合焦范围;
    所述通过第二扫描获取合焦范围包括:
    获取所述当前帧画面对应的fv值,若所述当前帧画面对应的fv值大于前一帧画面对应的fv值,继续扫描直到当前帧画面对应的fv值小于前一帧画面对应的fv值。
  5. 根据权利要求1所述的对焦方法,其特征在于,所述根据补偿后的fv值进行对焦包括:
    获取连续三帧画面的fv值,若检测到中间帧画面的fv值大于前一帧画面的fv值,且中间帧画面的fv值大于后一帧画面的fv值,根据所述连续三帧 画面的fv值获取拟合曲线,驱动摄像机镜头到达所述拟合曲线顶点对应的镜头位置并完成对焦。
  6. 一种对焦装置,包括:
    获取模块,用于在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;
    补偿模块,用于检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;及
    对焦模块,用于根据补偿后的fv值进行对焦。
  7. 一种移动终端,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下步骤:
    在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;
    检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;及
    根据补偿后的fv值进行对焦。
  8. 根据权利要求7所述的移动终端,其特征在于,所述处理器执行的所述对所述当前帧画面对应的fv值进行补偿包括:
    根据当前帧画面前两帧画面对应的fv值获取拟合直线;及
    根据所述拟合直线获取当前帧画面对应的fv值。
  9. 根据权利要求7所述的移动终端,其特征在于,所述处理器执行的所述对所述当前帧画面对应的fv值进行补偿包括:
    获取当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;及
    将所述平均值作为当前帧画面对应的fv值。
  10. 根据权利要求7所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,在第一扫描获取合焦区域之前,还使得所述处理器执行如下步骤:
    通过第二扫描获取合焦范围;
    所述通过第二扫描获取合焦范围包括:
    获取所述当前帧画面对应的fv值,若所述当前帧画面对应的fv值大于前一帧画面对应的fv值,继续扫描直到当前帧画面对应的fv值小于前一帧画面对应的fv值。
  11. 根据权利要求7所述的移动终端,其特征在于,所述处理器执行的所述根据补偿后的fv值进行对焦包括:
    获取连续三帧画面的fv值,若检测到中间帧画面的fv值大于前一帧画面的fv值,且中间帧画面的fv值大于后一帧画面的fv值,根据所述连续三帧画面的fv值获取拟合曲线,驱动摄像机镜头到达所述拟合曲线顶点对应的镜头位置并完成对焦。
  12. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:
    在第一扫描获取合焦区域时,检测到当前帧画面对应的转动角速度值大于第一阈值,获取当前帧画面对应的聚焦值fv值;
    检测到当前帧画面对应的fv值与前一帧画面对应的fv值的差值大于第二阈值,对所述当前帧画面对应的fv值进行补偿;及
    根据补偿后的fv值进行对焦。
  13. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述处理器执行的所述对所述当前帧画面对应的fv值进行补偿包括:
    根据当前帧画面前两帧画面对应的fv值获取拟合直线;及
    根据所述拟合直线获取当前帧画面对应的fv值。
  14. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述处理器执行的所述对所述当前帧画面对应的fv值进行补偿包括:
    获取当前帧画面的前一帧画面对应的fv值和后一帧画面对应的fv值的平均值;及
    将所述平均值作为当前帧画面对应的fv值。
  15. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,在第一扫描获取合焦区域之前,还使得所述处理器执行如下步骤:
    通过第二扫描获取合焦范围;
    所述通过第二扫描获取合焦范围包括:
    获取所述当前帧画面对应的fv值,若所述当前帧画面对应的fv值大于前一帧画面对应的fv值,继续扫描直到当前帧画面对应的fv值小于前一帧画面对应的fv值。
  16. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述处理器执行的所述根据补偿后的fv值进行对焦包括:
    获取连续三帧画面的fv值,若检测到中间帧画面的fv值大于前一帧画面的fv值,且中间帧画面的fv值大于后一帧画面的fv值,根据所述连续三帧画面的fv值获取拟合曲线,驱动摄像机镜头到达所述拟合曲线顶点对应的镜头位置并完成对焦。
PCT/CN2018/088929 2017-06-16 2018-05-30 对焦方法、装置、计算机可读存储介质和移动终端 WO2018228184A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18818807.2A EP3640728A4 (en) 2017-06-16 2018-05-30 FOCUSING PROCESS AND DEVICE, INFORMATION SUPPORT READABLE BY COMPUTER AND MOBILE TERMINAL
US16/621,603 US11184518B2 (en) 2017-06-16 2018-05-30 Focusing method using compensated FV value, storage medium and mobile phone for performing the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710459601.2A CN107197152B (zh) 2017-06-16 2017-06-16 对焦方法、装置、计算机可读存储介质和移动终端
CN201710459601.2 2017-06-16

Publications (1)

Publication Number Publication Date
WO2018228184A1 true WO2018228184A1 (zh) 2018-12-20

Family

ID=59879106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/088929 WO2018228184A1 (zh) 2017-06-16 2018-05-30 对焦方法、装置、计算机可读存储介质和移动终端

Country Status (4)

Country Link
US (1) US11184518B2 (zh)
EP (1) EP3640728A4 (zh)
CN (1) CN107197152B (zh)
WO (1) WO2018228184A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107197152B (zh) * 2017-06-16 2020-01-14 Oppo广东移动通信有限公司 对焦方法、装置、计算机可读存储介质和移动终端
CN107566741B (zh) * 2017-10-26 2020-04-14 Oppo广东移动通信有限公司 对焦方法、装置、计算机可读存储介质和计算机设备
CN107613216B (zh) * 2017-10-31 2019-10-18 Oppo广东移动通信有限公司 对焦方法、装置、计算机可读存储介质和电子设备
CN109946911B (zh) * 2019-03-20 2020-12-04 深圳市橙子数字科技有限公司 调焦方法、装置、计算机设备及存储介质
CN109981983B (zh) * 2019-03-26 2021-04-23 Oppo广东移动通信有限公司 增强现实图像处理方法、装置、电子设备和存储介质
EP3998769A4 (en) * 2019-07-10 2022-09-14 Sony Semiconductor Solutions Corporation FAULT DETECTION DEVICE, FAULT DETECTION METHOD, PROGRAM, AND INFORMATION PROCESSING SYSTEM
US11792510B2 (en) * 2020-11-18 2023-10-17 Micron Technology, Inc. Image sensor data management using a multi-port memory device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101207718A (zh) * 2006-12-20 2008-06-25 奥林巴斯映像株式会社 可进行动态图像显示的照相机及其控制方法
CN101339347A (zh) * 2007-07-06 2009-01-07 鸿富锦精密工业(深圳)有限公司 自动对焦系统及自动对焦方法
JP2010096790A (ja) * 2008-10-14 2010-04-30 Canon Inc 撮像装置
US20110176015A1 (en) * 2010-01-19 2011-07-21 Samsung Electronics Co., Ltd. Method and apparatus for processing digital image
CN102169276A (zh) * 2010-02-25 2011-08-31 奥林巴斯映像株式会社 摄像装置和自动焦点调节方法
CN103562769A (zh) * 2011-11-25 2014-02-05 奥林巴斯株式会社 摄像装置和摄像方法
CN103685918A (zh) * 2012-09-11 2014-03-26 索尼公司 处理装置、处理方法和程序
CN107197152A (zh) * 2017-06-16 2017-09-22 广东欧珀移动通信有限公司 对焦方法、装置、计算机可读存储介质和移动终端

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6081668A (en) * 1997-10-31 2000-06-27 Canon Kabushiki Kaisha Camera
KR20100013171A (ko) * 2008-07-30 2010-02-09 삼성디지털이미징 주식회사 오토 포커스 영역의 움직임 보상 방법 및 장치, 이를이용한 오토 포커스 방법 및 장치
JP5527955B2 (ja) * 2008-09-09 2014-06-25 キヤノン株式会社 撮像装置及びその制御方法、並びにプログラム及び記憶媒体
US8525916B2 (en) * 2008-10-30 2013-09-03 Panasonic Corporation Imaging apparatus using different driving methods according to estimation results
KR20140007529A (ko) 2012-07-09 2014-01-20 삼성전자주식회사 카메라의 이미지 촬영장치 및 방법
EP2701380B1 (de) 2012-08-24 2015-07-01 Sick Ag Kamera und Verfahren zur Aufnahme scharfer Bilder
CN103108128B (zh) * 2013-02-18 2016-08-03 广东欧珀移动通信有限公司 一种自动对焦的方法、系统及移动终端
CN103354599B (zh) * 2013-07-24 2016-08-10 浙江宇视科技有限公司 一种应用于动光源场景的自动聚焦方法和装置
CN105357429A (zh) * 2014-08-18 2016-02-24 中兴通讯股份有限公司 对焦控制方法及装置
US9729776B2 (en) 2014-08-27 2017-08-08 Mediatek Inc. Camera auto-focus apparatus for performing lens position compensation to determine focused lens position and related camera auto-focus method
CN104618654B (zh) * 2015-02-13 2017-10-13 成都品果科技有限公司 一种基于晃动检测的移动电子设备连续聚焦方法及系统
CN104796616A (zh) 2015-04-27 2015-07-22 惠州Tcl移动通信有限公司 一种基于移动终端距离传感器的对焦方法及对焦系统
JP6769434B2 (ja) * 2015-06-18 2020-10-14 ソニー株式会社 表示制御装置、表示制御方法および表示制御プログラム
CN105072328B (zh) * 2015-07-16 2020-03-24 Oppo广东移动通信有限公司 一种视频拍摄方法、装置以及终端
CN105516668B (zh) * 2015-12-14 2018-11-13 浙江宇视科技有限公司 一种应用于动态场景的聚焦方法和装置
CN105430279B (zh) * 2015-12-23 2019-02-12 北京奇虎科技有限公司 摄像头快速自动聚焦方法及装置
CN105391945B (zh) * 2015-12-23 2019-02-12 北京奇虎科技有限公司 摄像头自动聚焦控制方法及装置
CN106341596B (zh) * 2016-08-31 2019-06-11 浙江宇视科技有限公司 一种聚焦方法和装置
CN106506973B (zh) 2016-12-06 2020-02-04 Oppo广东移动通信有限公司 对焦控制方法、装置、电子设备及终端设备
CN106713750B (zh) * 2016-12-19 2019-07-19 Oppo广东移动通信有限公司 对焦控制方法、装置、电子装置及终端设备
CN106791434B (zh) * 2017-01-18 2019-12-13 捷开通讯(深圳)有限公司 一种利用af对焦辅助图片清晰的装置及方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101207718A (zh) * 2006-12-20 2008-06-25 奥林巴斯映像株式会社 可进行动态图像显示的照相机及其控制方法
CN101339347A (zh) * 2007-07-06 2009-01-07 鸿富锦精密工业(深圳)有限公司 自动对焦系统及自动对焦方法
JP2010096790A (ja) * 2008-10-14 2010-04-30 Canon Inc 撮像装置
US20110176015A1 (en) * 2010-01-19 2011-07-21 Samsung Electronics Co., Ltd. Method and apparatus for processing digital image
CN102169276A (zh) * 2010-02-25 2011-08-31 奥林巴斯映像株式会社 摄像装置和自动焦点调节方法
CN103562769A (zh) * 2011-11-25 2014-02-05 奥林巴斯株式会社 摄像装置和摄像方法
CN103685918A (zh) * 2012-09-11 2014-03-26 索尼公司 处理装置、处理方法和程序
CN107197152A (zh) * 2017-06-16 2017-09-22 广东欧珀移动通信有限公司 对焦方法、装置、计算机可读存储介质和移动终端

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
CN107197152B (zh) 2020-01-14
CN107197152A (zh) 2017-09-22
US20200106948A1 (en) 2020-04-02
EP3640728A4 (en) 2020-09-09
US11184518B2 (en) 2021-11-23
EP3640728A1 (en) 2020-04-22

Similar Documents

Publication Publication Date Title
WO2018228184A1 (zh) 对焦方法、装置、计算机可读存储介质和移动终端
US10757312B2 (en) Method for image-processing and mobile terminal using dual cameras
JP7145208B2 (ja) デュアルカメラベースの撮像のための方法および装置ならびに記憶媒体
US10878539B2 (en) Image-processing method, apparatus and device
US10825146B2 (en) Method and device for image processing
CN107566741B (zh) 对焦方法、装置、计算机可读存储介质和计算机设备
US10805508B2 (en) Image processing method, and device
JP2020535764A (ja) デュアルカメラベースの撮像のための方法、移動端末、および記憶媒体
US10951808B2 (en) Method for focusing control, mobile terminal and non-transitory storage medium
WO2018228186A1 (zh) 对焦方法、装置、计算机可读存储介质和移动终端
WO2019019890A1 (zh) 图像处理方法、计算机设备和计算机可读存储介质

Legal Events

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

Ref document number: 18818807

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018818807

Country of ref document: EP

Effective date: 20200116