WO2016188186A1 - 一种推焦位置确定方法及装置 - Google Patents

一种推焦位置确定方法及装置 Download PDF

Info

Publication number
WO2016188186A1
WO2016188186A1 PCT/CN2016/076005 CN2016076005W WO2016188186A1 WO 2016188186 A1 WO2016188186 A1 WO 2016188186A1 CN 2016076005 W CN2016076005 W CN 2016076005W WO 2016188186 A1 WO2016188186 A1 WO 2016188186A1
Authority
WO
WIPO (PCT)
Prior art keywords
foreground
distance
depth
focus
distance information
Prior art date
Application number
PCT/CN2016/076005
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 中兴通讯股份有限公司
Publication of WO2016188186A1 publication Critical patent/WO2016188186A1/zh

Links

Images

Classifications

    • 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/67Focus control based on electronic image sensor signals

Definitions

  • the present invention relates to the field of imaging, and in particular to a method and apparatus for determining a zoom position.
  • the depth of field position of the current region of interest is generally calculated first, then pushed to the position in one step, and finally through a preset algorithm. Make the appropriate adjustments.
  • the invention provides a method and a device for determining a zoom position, which are used to solve the technical problem that the shooting effect is blurred due to the non-stop movement of the motor during focusing in the prior art.
  • the present invention provides a method for determining a zoom position, comprising: acquiring a set of foreground distance information within a given focus time; and fitting according to the foreground distance information The maximum probability foreground position; the maximum probability foreground position is taken as the push focus position.
  • acquiring a set of foreground distance information within a given focus time includes: calculating a foreground distance every predetermined time interval within the given focus time; calculating the calculated foreground distance data A set of foreground distance information that constitutes the given focus time.
  • calculating the foreground distance includes: determining a foreground area according to a distribution of depth points; and calculating a foreground distance according to a position of the plurality of depth points in the foreground area.
  • calculating a foreground distance according to a position of the plurality of depth points of the foreground area comprising: obtaining an average value of depth of field of the plurality of depth points of the foreground area; The average value obtained is taken as the foreground distance calculated this time.
  • the maximum probable foreground position is obtained according to the foreground distance information fitting, including: obtaining the maximum probability foreground position by a Monte Carlo method fitting.
  • the present invention provides a push focus position determining apparatus, including: an acquisition module, configured to acquire at a given a set of foreground distance information during the focusing time; a fitting module configured to fit the maximum probability foreground position according to the foreground distance information; and a push focus position determining module configured to use the maximum probability foreground position as a zoom position.
  • the acquiring module includes: a calculating unit configured to calculate a foreground distance every predetermined time interval within the given focusing time; and an acquiring unit configured to calculate the calculated foreground distance data A set of foreground distance information that constitutes the given focus time.
  • the calculating unit includes: determining a subunit, configured to determine a foreground area according to a distribution of depth points; and calculating a subunit, configured to be according to a plurality of depth points in the foreground area At the location, calculate a foreground distance.
  • the calculating subunit is specifically configured to obtain an average value of depth of field of the plurality of depth points of the foreground area, and use the average value obtained as the foreground distance calculated in the current calculation. .
  • the fitting module is specifically configured to obtain the maximum probability foreground position by a Monte Carlo method fitting.
  • the present invention utilizes a set of foreground distance information during the focus time to determine the most probable foreground position, i.e., determines the maximum probable foreground position, and then uses that position as the push focus position.
  • the technical problem of blurring the shooting effect caused by the non-stop movement of the motor during focusing is solved in the prior art, and the technical effect of avoiding blurring of the shooting effect is achieved.
  • FIG. 1 is a flow chart of a method for determining a push focus position in an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a depth of field view in an embodiment of the present invention.
  • FIG. 3 is a structural block diagram of a push focus position determining apparatus in an embodiment of the present invention.
  • FIG. 4 is a block diagram showing another structure of a push-focus position determining device in an embodiment of the present invention.
  • Figure 5 is a block diagram showing another structure of the push-focus position determining device in the embodiment of the present invention.
  • Fig. 6 is a schematic view showing the position distribution of a quasi-focus in the embodiment of the present invention.
  • the present invention provides a method for determining the position of the push focus.
  • the present invention will be further described in detail below with reference to the accompanying drawings and the two embodiments. . It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • focusing When shooting, adjusting the camera lens so that the scene from a certain distance from the camera is clearly imaged is called focusing.
  • the point where the scene is located is called the focus point.
  • the depth of field is mainly related to the distance between the aperture, the lens, and the subject.
  • the larger the aperture the smaller the aperture value f
  • the shallower the depth of field the smaller the aperture (the larger the aperture value f)
  • the deeper the depth of field The longer the focal length of the lens, the shallower the depth of field, the shorter the focal length of the lens, the deeper the depth of field; the closer the subject is, the shallower the depth of field, the farther the subject is, the deeper the depth of field.
  • the foreground is deeper than the depth of the back. That is to say, after precise focusing, the scene in the distance from the front of the focus can be clearly imaged, and the scene within a long distance behind the focus is clear.
  • the foreground is relative to the background.
  • the foreground refers to a moving object in front of the screen of interest to the user
  • the foreground distance is the distance between the lens and the screen of interest to the user.
  • the user is interested in the foreground moving object.
  • the photo needs to determine the distance between the object and the lens that the user is interested in.
  • the background distance is used to confirm whether the scene of interest is entered. Among them, the background distance is fixed, and the foreground distance vibrates within a certain range.
  • An embodiment of the present invention provides a method for determining a zoom position.
  • the flow of the method is as shown in FIG. 1 and includes steps S102 to S106:
  • S106 The maximum probability foreground position is used as a push focus position.
  • the present invention utilizes a set of foreground distance information during the focus time to determine the most probable foreground position, i.e., determines the maximum probable foreground position, and then uses that position as the push focus position.
  • the technical problem of blurring the shooting effect caused by the non-stop movement of the motor during focusing is solved in the prior art, and the technical effect of avoiding blurring of the shooting effect is achieved.
  • probability statistics are performed to determine at which position point, the foreground distance has the highest probability of occurrence, and the position point with the highest probability is used as the push focus position.
  • step S102 it may be foreground distance information acquired by a binocular camera or an infrared laser focusing device. Because the focus has a certain focus time, it can be a set of foreground distance information during the focus time.
  • the so-called set of foreground distance information can be within a given focus time, every predetermined time interval. A foreground distance is calculated, and then the calculated foreground distance data is composed of a set of foreground distance information within the given focus time.
  • the longer the given focusing time the more accurately the subsequent determined position will be.
  • the shorter the predetermined time interval the more the subsequently determined position will be more accurate.
  • the shorter the interval the higher the data processing capability of the device, so the size of the specific time interval can be selected according to the actual situation and needs.
  • the foreground area may be determined according to the distribution of the depth of field point. As shown in FIG. 2, the front spot distribution area is the foreground area, and the background point distribution area is the back view area. Then, A foreground distance is calculated based on the position of multiple depth points in the foreground area.
  • an average value of the depth of field of the plurality of depth points of the foreground area may be obtained, and then the average value obtained is used as the foreground distance calculated this time.
  • the foreground distance d may be calculated according to the following formula:
  • d represents the calculated foreground distance
  • d i represents the foreground distance of the i-th depth point of the foreground area
  • n represents the number of depth points of the foreground area.
  • the average depth of field of multiple depth of field points is used as the determined foreground distance, which is mainly based on the consideration of big data, that is, the more data, the more accurate the results obtained after averaging.
  • the maximum probability foreground position can be obtained by Monte Carlo method fitting.
  • the Monte Carlo method is based on the idea that when the problem is the probability of a random event or the expected value of a random variable, it is estimated by the frequency of the event by some kind of "experimental" method. The probability of a random event, or some digital signature of the random variable, and as a solution to the problem.
  • the maximum probability foreground position obtained by Monte Carlo method fitting is not the only probability fitting method, and other probability statistics can be used to determine the foreground position of the maximum probability.
  • the method is not limited in this application.
  • FIG. 3 is a block diagram of a preferred structure of the push focus position determining apparatus according to an embodiment of the present invention. As shown in FIG. 3, FIG. 3 may include:
  • the obtaining module 301 is configured to acquire a set of foreground distance information within a given focus time
  • the fitting module 302 is configured to obtain a maximum probability foreground position according to the foreground distance information fitting;
  • the push focus position determining module 303 is configured to use the maximum probability foreground position as a push focus position.
  • the obtaining module 301 may include: a calculating unit 3011 configured to calculate a foreground distance every predetermined time interval within the given focusing time; the acquiring unit 3012 is configured to The calculated foreground distance data constitutes a set of foreground distance information for the given focus time.
  • the calculating unit 3011 may include: determining a subunit, configured to determine a foreground area according to a distribution of depth points; and calculating a subunit, configured to be located according to a plurality of depth points in the foreground area Position, calculate a foreground distance.
  • the calculation subunit may be specifically configured to obtain an average value of the depth of field of the plurality of depth points of the foreground area, and use the average value obtained as the foreground distance calculated this time.
  • the fitting module 302 can be specifically configured to obtain the maximum probability foreground position by Monte Carlo method fitting.
  • the entire camera device may include: a terminal camera module, an image depth of field calculation module, and a maximum probability focus control module, wherein the terminal camera module provides a normal camera function, and the image depth of field calculation module may be the current mainstream binocular ranging module or laser ranging.
  • the function of the module, the most approximate focus control module is to fit the position of the focal depth of the maximum probability according to the depth information of the depth field required to be input in a period of time, and push the motor to the position.
  • FIG. 5 it is a specific structural diagram of the zoom position determining device, including: a foreground distance calculating module 501 (corresponding to the above obtaining module 301 ) and a quasi-focal probability maximum position calculating module 502 (corresponding to the above fitting module 302). And a push motor module 503 (corresponding to the above-described push focus position determining module 303).
  • the foreground distance calculation module 501 and the quasi-focal probability maximum position calculation module 502 can calculate the probability maximum focus position according to the following steps:
  • the foreground distance calculation module 501 calculates a depth map, and then distinguishes the foreground area according to the difference between the front point and the background point distribution.
  • the depth of field of the depth of field in the foreground area is averaged according to the following formula:
  • d represents the calculated foreground distance
  • d i represents the foreground distance of the i-th depth point of the foreground area
  • n represents the number of depth points of the foreground area.
  • this focusing time T can be a given time setting. Considering that the time to obtain the unit distance point is determined, the longer the theoretical given time is, the more points are obtained. The higher the accuracy, but the more points you get, the higher the processing and computational cost and computation time required. Therefore, you need to make a trade-off between accuracy and computational cost.
  • S3 The maximum probability foreground position is fitted at the most densely distributed position as the push focus position output.
  • the focus time is controllable, and the reference focus position of the region of interest in the time period is recorded within a given focus time. In a scene where the subject distance does not change drastically, the longer the recording time, the more accurate the focus is.
  • the depth of field information of the scene needs to have an approximately constant point as a reference point for identifying the scene.
  • the present invention utilizes a set of foreground distance information during the focus time to determine the most probable foreground position, ie, determines the maximum probability foreground position, and then uses the position as the push focus position.
  • the technical problem of blurring the shooting effect caused by the non-stop movement of the motor during focusing is solved in the prior art, and the technical effect of avoiding blurring of the shooting effect is achieved.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the maximum probable foreground position is determined, and then the position is used as the push focus position.
  • the technical problem of blurring the shooting effect caused by the non-stop movement of the motor during focusing is solved in the prior art, and the technical effect of avoiding blurring of the shooting effect is achieved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)
  • Lens Barrels (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种推焦位置确定方法及装置,该推焦位置确定方法包括:获取在给定对焦时间内的一组前景距信息;根据所述前景距信息拟合得到最大概率前景位置;将所述最大概率前景位置作为推焦位置。本发明有效地解决了现有技术中由于对焦时马达不停移动而导致的拍摄效果模糊的技术问题,达到了避免拍摄效果模糊的技术效果。

Description

一种推焦位置确定方法及装置 技术领域
本发明涉及摄像领域,特别是涉及一种推焦位置确定方法及装置。
背景技术
在项目调试对焦参数过程中,如果外拍景物场景,发现经常由于风的影响,拍摄物体在不停运动,从而导致拍摄出的景物模糊,给用户带来极大的不便。
目前,在终端拍照系统中,如果使用景深对焦的方式进行对焦,那么一般都是先计算出当前的感兴趣区域(ROI)的景深位置,然后一步推到该位置,最后再通过预设的算法进行适当的调整。
然而,上述这种方式无法解决在之前提到的场景的模糊问题,由于景物移动过快,导致马达的移动过程中景物位置就已经发生变化,这表现用户体验上就是马达不停地在不同位置拉伸。
发明内容
本发明提出一种推焦位置确定方法及装置,用以解决现有技术中由于对焦时马达不停移动而导致的拍摄效果模糊的技术问题。
为解决上述技术问题,在本发明的实施例中,本发明提供一种推焦位置确定方法,包括:获取在给定对焦时间内的一组前景距信息;根据所述前景距信息拟合得到最大概率前景位置;将所述最大概率前景位置作为推焦位置。
在本发明的实施例中,获取在给定对焦时间内的一组前景距信息,包括:在所述给定对焦时间内,每隔预定时间间隔计算一次前景距;将计算得到的前景距数据组成所述给定对焦时间内的一组前景距信息。
在本发明的实施例中,计算前景距,包括:根据景深点的分布情况,确定出前景区域;根据所述前景区域内的多个景深点所处的位置,计算出一个前景距。
在本发明的实施例中,根据所述前景区域的多个景深点所处的位置,计算出一个前景距,包括:求取所述前景区域的多个景深点的景深距的平均值;将求取的平均值作为本次计算得到的前景距。
在本发明的实施例中,根据所述前景距信息拟合得到最大概率前景位置,包括:通过蒙特卡洛方法拟合得到所述最大概率前景位置。
另一实施例,本发明提供一种推焦位置确定装置,包括:获取模块,设置为获取在给定 对焦时间内的一组前景距信息;拟合模块,设置为根据所述前景距信息拟合得到最大概率前景位置;推焦位置确定模块,设置为将所述最大概率前景位置作为推焦位置。
在本发明的实施例中,所述获取模块包括:计算单元,设置为在所述给定对焦时间内,每隔预定时间间隔计算一次前景距;获取单元,设置为将计算得到的前景距数据组成所述给定对焦时间内的一组前景距信息。
在本发明的实施例中,所述计算单元包括:确定子单元,设置为根据景深点的分布情况,确定出前景区域;计算子单元,设置为根据所述前景区域内的多个景深点所处的位置,计算出一个前景距。
在本发明的实施例中,所述计算子单元,具体设置为求取所述前景区域的多个景深点的景深距的平均值,并将求取的平均值作为本次计算得到的前景距。
在本发明的实施例中,所述拟合模块,具体设置为通过蒙特卡洛方法拟合得到所述最大概率前景位置。
本发明利用对焦时间内的一组前景距信息来确定出最有可能的前景位置,即确定出最大概率前景位置,然后将该位置作为推焦位置。通过上述方式解决了现有技术中由于对焦时马达不停移动而导致的拍摄效果模糊的技术问题,达到了避免拍摄效果模糊的技术效果。
附图说明
图1是本发明实施例中推焦位置确定方法的方法流程图;
图2是本发明实施例中景深图示意图;
图3是本发明实施例中推焦位置确定装置的结构框图;
图4是本发明实施例中推焦位置确定装置的另一结构框图;
图5是本发明实施例中推焦位置确定装置的又一结构框图;
图6是本发明实施例中准焦位置分布示意图。
具体实施方式
为了解决现有技术由于对焦时马达不停移动而导致的拍摄效果模糊的技术问题,本发明提供了一种推焦位置确定方法,以下结合附图以及两个实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。
为了更清楚地理解本发明,先对几个名词进行一下解释:
1)对焦和对焦点:
在进行拍摄时,调节相机镜头,使距离相机一定距离的景物清晰成像的过程叫做对焦, 那个景物所在的点,称为对焦点。
2)景深:
因为“清晰”并不是一种绝对的概念,因此,对焦点前(靠近相机的方向)和对焦点后(远离相机的方向)的一定距离内的景物的成像都可以是清晰的,这个前后范围的总和,就叫做景深,也就是说,只要在上述前后范围内的景物,都能清楚地拍摄到。
其中,景深的大小主要与光圈、镜头、及拍摄物的距离有关,一般情况下,光圈越大(光圈值f越小)景深越浅,光圈越小(光圈值f越大)景深越深;镜头焦距越长景深越浅,镜头焦距越短景深越深;被拍摄主体越近,景深越浅,被拍摄主体越远,景深越深。其次,前景深小于后景深,也就是说,精确对焦之后,对焦点前面只有很短一点距离内的景物能清晰成像,而对焦点后面很长一段距离内的景物,都是清晰的。
3)前景距:
前景是相对于背景来说的,在本发明实施例中,前景指的是用户感兴趣的画面前的运动物体,前景距即镜头与用户感兴趣的画面之间的距离。一般情况下,用户感兴趣的是前景运动物体,拍照需要确定的是用户感兴趣的物体与镜头之间的距离,背景距用来确认是否进入了关注的场景。其中,背景距是固定不动的,而前景距在一定范围内振动。
本发明实施例提供了一种推焦位置确定方法,该方法的流程如图1所示,包括步骤S102至S106:
S102,获取在给定对焦时间内的一组前景距信息;
S104:根据所述前景距信息拟合得到最大概率前景位置;
S106:将所述最大概率前景位置作为推焦位置。
本发明利用对焦时间内的一组前景距信息来确定出最有可能的前景位置,即确定出最大概率前景位置,然后将该位置作为推焦位置。通过上述方式解决了现有技术中由于对焦时马达不停移动而导致的拍摄效果模糊的技术问题,达到了避免拍摄效果模糊的技术效果。
相当于,根据一组前景距信息,进行概率统计,以确定出在哪个位置点,前景距出现概率最大,将该概率最大的位置点作为推焦位置。
在上述步骤S102中,可以是通过双目摄像头,或者是红外激光对焦器件获取的前景距信息。因为考虑到对焦是有一定的对焦时间的,因此,可以是获取这段对焦时间内的一组前景距信息,所谓的一组前景距信息可以是在给定对焦时间内,每隔预定时间间隔计算一次前景距,然后将计算得到的前景距数据组成所述给定对焦时间内的一组前景距信息。
进一步的,给定的对焦时间越长,相对的后续确定的位置就会更准确,在同样的对焦时间内,预定时间间隔越短,相对的后续确定的位置也会更准确。当然,间隔越短,对器件的数据处理能力也就越高,因此具体采用的时间间隔的大小可以按照实际情况和需要选取。
为了使得确定的前景距更为合理,可以是先根据景深点的分布情况,确定出前景区域,如图2所示,前景点分布区域即前景区域,背景点分布区域即后景区域,然后,根据前景区域内的多个景深点所处的位置,计算出一个前景距。
具体地,可以求取前景区域的多个景深点的景深距的平均值,然后将求取的平均值作为本次计算得到的前景距,例如,可以按照以下公式计算前景距d:
Figure PCTCN2016076005-appb-000001
其中,d表示计算得到的前景距,di表示前景区域第i个景深点的前景距,n表示前景区域景深点的个数。
在上例中之所以采用多个景深点的平均景深距作为确定的前景距,主要是基于大数据的考虑,即数据越多,取平均后相对得到的结果就越准确。
在上述步骤104中,可以通过蒙特卡洛方法拟合得到所述最大概率前景位置。其中,蒙特卡洛方法的处理思想是当所求解问题是某种随机事件出现的概率,或者是某个随机变量的期望值时,通过某种“实验”的方法,以这种事件出现的频率估计这一随机事件的概率,或者得到这个随机变量的某些数字特征,并将其作为问题的解。
然而,值得注意的是,通过蒙特卡洛方法拟合得到所述最大概率前景位置并非是唯一的概率拟合方式,还可以采用其它概率统计的方式确定出最大概率的前景位置,具体选用哪种方式,本申请不作限定。
在本实施例中还提供了一种推焦位置确定装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“单元”或者“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。图3是根据本发明实施例的推焦位置确定装置的一种优选结构框图,如图3所示,可以包括:
获取模块301,设置为获取在给定对焦时间内的一组前景距信息;
拟合模块302,设置为根据所述前景距信息拟合得到最大概率前景位置;
推焦位置确定模块303,设置为将所述最大概率前景位置作为推焦位置。
在一个实施方式中,如图4所示,获取模块301可以包括:计算单元3011,设置为在所述给定对焦时间内,每隔预定时间间隔计算一次前景距;获取单元3012,设置为将计算得到的前景距数据组成所述给定对焦时间内的一组前景距信息。
在一个实施方式中,计算单元3011可以包括:确定子单元,设置为根据景深点的分布情况,确定出前景区域;计算子单元,设置为根据所述前景区域内的多个景深点所处的位置,计算出一个前景距。
在一个实施方式中,计算子单元,具体可以设置为求取所述前景区域的多个景深点的景深距的平均值,并将求取的平均值作为本次计算得到的前景距。
在一个实施方式中,拟合模块302具体可以设置为通过蒙特卡洛方法拟合得到所述最大概率前景位置。
优选实施例
为了更好地说明本发明,在本例中还提供了一个具体实施例进行说明,然而这仅是作为一个具体实例,并不构成对本发明的不当限定。
整个拍照装置可以包括:终端拍照模块、图像景深计算模块和最大概率对焦控制模块,其中,终端拍照模块提供正常的拍照功能,图像景深计算模块可以是目前主流的双目测距模块或激光测距模块,最概然对焦控制模块的作用就是根据一段时间内输入的需要对焦区域的景深表深度信息,拟合出最大概率的准焦位置,并将马达推到该位置。
如图5所示,是推焦位置确定装置的一个具体结构示意图,包括:前景距计算模块501(相当于上述获取模块301)、准焦概率最大位置计算模块502(相当于上述拟合模块302)和推马达模块503(相当于上述推焦位置确定模块303)。
其中,上述前景距计算模块501和准焦概率最大位置计算模块502可以按照以下步骤计算概率最大准焦位置:
S1:计算单次前景距:
前景距计算模块501计算景深图,然后根据前景点与背景点分布的不同,区分出前景区域。
然后,对前景区域中的景深点的景深距按照以下公式求平均:
Figure PCTCN2016076005-appb-000002
其中,d表示计算得到的前景距,di表示前景区域第i个景深点的前景距,n表示前景区域景深点的个数。
S2:在给定对焦时间T内,每隔σt做单次前景距计算并记录,得到图6所示的准焦位置分布图,在图6中,纵坐标代表距离(即景深距离),横坐标代表归一化时间。
在实际执行的过程中,这个对焦时间T可以是给定的时间定值,考虑到因为获得单位距离点的时间是确定的,因此理论上给定时间越长获得的点数就越多,拟合的精度就会越高,但是,获得的点数越多所需要的处理和计算成本和计算时间就越高,因此,需要在精度和运算成本之间做一个权衡。
S3:在分布最密集处拟合出最大概率前景位置作为推焦位置输出。
具体地,在实现的过程中,可以遵循以下原则:
1)对焦时间可控,在给定对焦时间内,记录该时间段内的感兴趣区域的准焦位置。在景物距离变化不剧烈的场景,记录时间越长对焦越准确。
2)景物的景深信息中需要有近似不变的点作为参照点,用于识别该场景。
3)根据景深点的分布识别前后景区域,在前景景深点中拟合出一个前景距,在相同时间间隔重复此操作,记录多个周期连续间隔时间的前景距,利用蒙特卡洛方法原理拟合最大概率前景位置。
4)当马达固定在最大概率位置时,在此位置对焦清晰的概率是最大的,从而使得取得的焦点距离更准确。
综上所述,本发明利用对焦时间内的一组前景距信息来确定出最有可能的前景位置,即确定出最大概率前景位置,然后将该位置作为推焦位置。通过上述方式解决了现有技术中由于对焦时马达不停移动而导致的拍摄效果模糊的技术问题,达到了避免拍摄效果模糊的技术效果。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。
工业实用性
基于本发明实施例提供的上述技术方案,确定出最大概率前景位置,然后将该位置作为推焦位置。通过上述方式解决了现有技术中由于对焦时马达不停移动而导致的拍摄效果模糊的技术问题,达到了避免拍摄效果模糊的技术效果。

Claims (10)

  1. 一种推焦位置确定方法,包括:
    获取在给定对焦时间内的一组前景距信息;
    根据所述前景距信息拟合得到最大概率前景位置;
    将所述最大概率前景位置作为推焦位置。
  2. 如权利要求1所述的方法,其中,获取在给定对焦时间内的一组前景距信息,包括:
    在所述给定对焦时间内,每隔预定时间间隔计算一次前景距;
    将计算得到的前景距数据组成所述给定对焦时间内的一组前景距信息。
  3. 如权利要求2所述的方法,其中,计算前景距,包括:
    根据景深点的分布情况,确定出前景区域;
    根据所述前景区域内的多个景深点所处的位置,计算出一个前景距。
  4. 如权利要求3所述的方法,其中,根据所述前景区域的多个景深点所处的位置,计算出一个前景距,包括:
    求取所述前景区域的多个景深点的景深距的平均值;
    将求取的平均值作为本次计算得到的前景距。
  5. 如权利要求1至4中任一项所述的方法,其中,根据所述前景距信息拟合得到最大概率前景位置,包括:
    通过蒙特卡洛方法拟合得到所述最大概率前景位置。
  6. 一种推焦位置确定装置,包括:
    获取模块,设置为获取在给定对焦时间内的一组前景距信息;
    拟合模块,设置为根据所述前景距信息拟合得到最大概率前景位置;
    推焦位置确定模块,设置为将所述最大概率前景位置作为推焦位置。
  7. 如权利要求6所述的装置,其中,所述获取模块包括:
    计算单元,设置为在所述给定对焦时间内,每隔预定时间间隔计算一次前景距;
    获取单元,设置为将计算得到的前景距数据组成所述给定对焦时间内的一组前景距信息。
  8. 如权利要求7所述的装置,其中,所述计算单元包括:
    确定子单元,设置为根据景深点的分布情况,确定出前景区域;
    计算子单元,设置为根据所述前景区域内的多个景深点所处的位置,计算出一个前景距。
  9. 如权利要求8所述的装置,其中,所述计算子单元,具体设置为求取所述前景区域的多个景深点的景深距的平均值,并将求取的平均值作为本次计算得到的前景距。
  10. 如权利要求6至9中任一项所述的装置,其中,所述拟合模块,具体设置为通过蒙特卡洛方法拟合得到所述最大概率前景位置。
PCT/CN2016/076005 2015-12-16 2016-03-09 一种推焦位置确定方法及装置 WO2016188186A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510947084.4A CN106888352B (zh) 2015-12-16 2015-12-16 一种推焦位置确定方法及装置
CN201510947084.4 2015-12-16

Publications (1)

Publication Number Publication Date
WO2016188186A1 true WO2016188186A1 (zh) 2016-12-01

Family

ID=57392493

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076005 WO2016188186A1 (zh) 2015-12-16 2016-03-09 一种推焦位置确定方法及装置

Country Status (2)

Country Link
CN (1) CN106888352B (zh)
WO (1) WO2016188186A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115866399A (zh) * 2023-02-28 2023-03-28 广东欧谱曼迪科技有限公司 一种3d内窥镜自动调焦方法、装置、电子设备及储存介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7006950B1 (en) * 2000-06-12 2006-02-28 Siemens Corporate Research, Inc. Statistical modeling and performance characterization of a real-time dual camera surveillance system
CN101359151A (zh) * 2007-05-18 2009-02-04 卡西欧计算机株式会社 摄像装置和聚焦控制方法
CN102073853A (zh) * 2011-01-14 2011-05-25 华南理工大学 基于马尔可夫蒙特卡洛算法的多目标车辆跟踪方法
CN102780847A (zh) * 2012-08-14 2012-11-14 北京汉邦高科数字技术股份有限公司 一种针对运动目标的摄像机自动对焦控制方法
CN103780842A (zh) * 2014-02-14 2014-05-07 宇龙计算机通信科技(深圳)有限公司 一种拍照方法及装置
CN103871051A (zh) * 2014-02-19 2014-06-18 小米科技有限责任公司 图像处理方法、装置和电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5089843A (en) * 1989-01-09 1992-02-18 Canon Kabushiki Kaisha Auto focus device with predictive focussing
US7627240B2 (en) * 2006-03-27 2009-12-01 Nokia Corporation Optical device with improved autofocus performance and method related thereto
JP5870264B2 (ja) * 2010-11-08 2016-02-24 パナソニックIpマネジメント株式会社 撮像装置、撮像方法、プログラム、および集積回路
JP6214236B2 (ja) * 2013-03-05 2017-10-18 キヤノン株式会社 画像処理装置、撮像装置、画像処理方法、及びプログラム
JP5895270B2 (ja) * 2014-03-28 2016-03-30 パナソニックIpマネジメント株式会社 撮像装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7006950B1 (en) * 2000-06-12 2006-02-28 Siemens Corporate Research, Inc. Statistical modeling and performance characterization of a real-time dual camera surveillance system
CN101359151A (zh) * 2007-05-18 2009-02-04 卡西欧计算机株式会社 摄像装置和聚焦控制方法
CN102073853A (zh) * 2011-01-14 2011-05-25 华南理工大学 基于马尔可夫蒙特卡洛算法的多目标车辆跟踪方法
CN102780847A (zh) * 2012-08-14 2012-11-14 北京汉邦高科数字技术股份有限公司 一种针对运动目标的摄像机自动对焦控制方法
CN103780842A (zh) * 2014-02-14 2014-05-07 宇龙计算机通信科技(深圳)有限公司 一种拍照方法及装置
CN103871051A (zh) * 2014-02-19 2014-06-18 小米科技有限责任公司 图像处理方法、装置和电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115866399A (zh) * 2023-02-28 2023-03-28 广东欧谱曼迪科技有限公司 一种3d内窥镜自动调焦方法、装置、电子设备及储存介质

Also Published As

Publication number Publication date
CN106888352A (zh) 2017-06-23
CN106888352B (zh) 2020-12-18

Similar Documents

Publication Publication Date Title
US10061182B2 (en) Systems and methods for autofocus trigger
US7929042B2 (en) Imaging apparatus, control method of imaging apparatus, and computer program
CN107888819B (zh) 一种自动聚焦方法及装置
US10516877B2 (en) Light field collection control methods and apparatuses, light field collection devices
US9313419B2 (en) Image processing apparatus and image pickup apparatus where image processing is applied using an acquired depth map
US7657171B2 (en) Method and system for providing background blurring when capturing an image using an image capture device
CN102223477B (zh) 基于双图片匹配的深度估计的四维多项式模型
US11209268B2 (en) Depth measuring method and system
US9501834B2 (en) Image capture for later refocusing or focus-manipulation
US10701281B2 (en) Image processing apparatus, solid-state imaging device, and electronic apparatus
CN111726521B (zh) 终端的拍照方法、拍照装置和终端
JP6210333B2 (ja) 距離測定装置、及び、距離測定方法
JP5968379B2 (ja) 画像処理装置およびその制御方法
WO2016188186A1 (zh) 一种推焦位置确定方法及装置
JP6645711B2 (ja) 画像処理装置、画像処理方法、プログラム
JP2019152807A (ja) 焦点検出装置および焦点検出方法
CN106454066B (zh) 图像处理设备及其控制方法
JP6399869B2 (ja) 被写体追尾装置、撮像装置、被写体追尾方法及びプログラム
CN112637506A (zh) 一种手机加快对焦的方法
JP2017011351A (ja) 撮像装置、その制御方法、および制御プログラム
CN117835053B (zh) 宽动态模式的切换方法和装置
CN116456189A (zh) 拍摄方法、移动终端及存储介质
JP5826309B2 (ja) 画像処理装置及び画像処理装置の制御方法
CN115955604A (zh) 一种镜头跟焦方法、装置、电子设备及存储介质
CN115037871A (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: 16799075

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16799075

Country of ref document: EP

Kind code of ref document: A1