WO2018023961A1 - Distance information processing method and device - Google Patents

Distance information processing method and device Download PDF

Info

Publication number
WO2018023961A1
WO2018023961A1 PCT/CN2017/073525 CN2017073525W WO2018023961A1 WO 2018023961 A1 WO2018023961 A1 WO 2018023961A1 CN 2017073525 W CN2017073525 W CN 2017073525W WO 2018023961 A1 WO2018023961 A1 WO 2018023961A1
Authority
WO
WIPO (PCT)
Prior art keywords
distance
camera
measured
image
determining
Prior art date
Application number
PCT/CN2017/073525
Other languages
French (fr)
Chinese (zh)
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 WO2018023961A1 publication Critical patent/WO2018023961A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders

Definitions

  • the camera can determine the image distance of the measured object by acquiring the motion information of the lens in the camera, thereby determining the distance between the camera and the measured object according to the image distance, and achieving The purpose of ranging can be achieved with a camera.
  • the multi-measured object can be freely focused, and the distance of the measured object can be obtained based on the image distance of the measured object, thereby achieving the purpose of using the camera for ranging.
  • the distance measurement can be performed by using the camera of the mobile device, which facilitates the user of the mobile device to know the distance between itself and other objects.
  • the camera determines an image distance of the measured object, and the image distance may be a distance between the camera image sensor and the lens. And the camera determines the distance between the camera and the measured object according to the obtained image distance.
  • FIG. 2 is an example in which the camera performs focusing.
  • the first determining unit includes: an collecting module configured to acquire motion information of the lens in the camera during the process of focusing the object to be measured; the first determining module is configured to utilize the motion of the lens The information determines the image distance.

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Studio Devices (AREA)
  • Measurement Of Optical Distance (AREA)

Abstract

A distance information processing method and device. The method comprises: using a camera to focus a measured object (S102); the camera determining an image distance of the measured object after focusing is completed (S104); and the camera determining a distance between the camera and the measured object according to the image distance (S106). The present invention solves the technical problem existing in current technology wherein accuracy of mobile phone distance measurement is low.

Description

距离信息的处理方法和装置Distance information processing method and device 技术领域Technical field
本发明涉及信息处理领域,具体而言,涉及一种距离信息的处理方法和装置。The present invention relates to the field of information processing, and in particular to a method and apparatus for processing distance information.
背景技术Background technique
现有技术中的手机测距方式,一般包括两种:一是利用GPS进行手机测距;二是在手机摄像头附近设置红外线感应器,利用红外线感应器进行手机测距。The prior art mobile phone ranging method generally includes two types: one is to use the GPS to perform mobile phone ranging; the other is to set an infrared sensor near the mobile phone camera, and use the infrared sensor to perform mobile phone ranging.
对于方式一来讲,利用GPS进行手机测距,由于其自身局限性,只能用于水平面上的距离测量,并且距离太小的话,误差比较大,一般要求物体与手机的距离不小于100米。对于方式二来讲,利用红外线感应器进行手机测距,其原理是手机发出红外光,被测量的物体接收到红外光后对红外光进行反射,这时候,手机的传感器侦测被测物体的反射信号,处理器计算从发出信号到侦测到反射信号的时间,从而推断物体与手机的距离,由于手机发出的光源容易被干扰或发生折射,导致传感器无法侦测到红外信号,并且,由于光线的传播时间太短,很容易出现误差。For the first method, the use of GPS for mobile phone ranging is limited to the distance measurement on the horizontal plane due to its own limitations. If the distance is too small, the error is relatively large. Generally, the distance between the object and the mobile phone is not less than 100 meters. . For the second method, the infrared sensor is used for the distance measurement of the mobile phone. The principle is that the mobile phone emits infrared light, and the measured object receives the infrared light and reflects the infrared light. At this time, the sensor of the mobile phone detects the detected object. Reflecting the signal, the processor calculates the time from the signal is sent to the detection of the reflected signal, thereby inferring the distance between the object and the mobile phone. Since the light source emitted by the mobile phone is easily interfered or refracted, the sensor cannot detect the infrared signal, and The propagation time of the light is too short and it is prone to errors.
针对现有技术中手机测距准确率低的问题,目前尚未提出有效的解决方案。In view of the problem of low accuracy of mobile phone ranging in the prior art, an effective solution has not been proposed yet.
发明内容Summary of the invention
本发明实施例提供了一种距离信息的处理方法和装置,以至少解决现有技术中手机测距准确率低的技术问题。The embodiment of the invention provides a method and a device for processing distance information, so as to at least solve the technical problem that the accuracy of the mobile phone ranging is low in the prior art.
根据本发明实施例的一个方面,提供了一种距离信息的处理方法,包括:利用摄像头对被测物体进行对焦;在对焦完成之后,确定所述被测物体的像距;根据所述像距,确定所述摄像头与所述被测物体的距离。According to an aspect of the embodiments of the present invention, a method for processing distance information includes: using a camera to focus an object to be measured; and after focusing is completed, determining an image distance of the measured object; Determining a distance between the camera and the object to be measured.
可选地,所述方法还包括:在对所述被测物体进行对焦之后,若在所述摄像头的图像传感器上呈现图像的清晰度高于预定阈值,则确定对焦完成。Optionally, the method further comprises: after focusing the object to be measured, if the resolution of the image presented on the image sensor of the camera is higher than a predetermined threshold, determining that the focus is completed.
可选地,确定所述被测物体的像距包括:在所述摄像头在对所述被测物体进行对焦的过程中,采集所述摄像头中镜头的运动信息;利用所述镜头的运动信息确定所述像距。 Optionally, determining an image distance of the measured object includes: acquiring motion information of a lens in the camera in a process in which the camera focuses on the measured object; determining, by using motion information of the lens The image distance.
可选地,利用所述镜头的运动信息确定所述像距包括:利用所述摄像头电磁线圈的电流计算所述被测物体的像距v=A×I+v0,其中,A为第一常数,I表示所述电磁线圈的通电电流,v0为第二常数,所述镜头的运动信息用所述电磁线圈的电流来表示。Optionally, determining the image distance by using the motion information of the lens comprises: calculating an image distance v=A×I+v 0 of the measured object by using a current of the camera electromagnetic coil, where A is the first A constant, I denotes an energization current of the electromagnetic coil, v 0 is a second constant, and motion information of the lens is represented by a current of the electromagnetic coil.
可选地,在摄像头对被测物体进行对焦之前,所述方法还包括:测量所述摄像头与预定物体的距离,其中,所述摄像头与所述预定物体之间的距离是预先设置的;比较所述摄像头测量的第一距离与预先设置的第二距离;在所述第一距离与所述第二距离的差值超过预定阈值的情况下,基于所述差值确定修正参数;利用所述修正参数修正所述第一常数和/或第二常数。Optionally, before the camera focuses on the measured object, the method further includes: measuring a distance between the camera and the predetermined object, wherein a distance between the camera and the predetermined object is preset; a first distance measured by the camera and a second distance set in advance; if the difference between the first distance and the second distance exceeds a predetermined threshold, determining a correction parameter based on the difference; The correction parameter corrects the first constant and/or the second constant.
可选地,根据所述像距,确定所述摄像头与所述被测物体的距离包括:计算所述摄像头与所述被测物体的距离
Figure PCTCN2017073525-appb-000001
其中,v表示所述像距;f表示所述摄像头对所述被测物体进行对焦的焦距。
Optionally, determining, according to the image distance, the distance between the camera and the measured object comprises: calculating a distance between the camera and the measured object
Figure PCTCN2017073525-appb-000001
Wherein, v represents the image distance; f represents a focal length at which the camera focuses on the object to be measured.
可选地,所述摄像头为移动设备的摄像头。Optionally, the camera is a camera of a mobile device.
根据本发明实施例的另一方面,还提供了一种距离信息的处理装置,包括:对焦单元,设置为利用摄像头对被测物体进行对焦;第一确定单元,设置为在对焦完成之后,确定所述被测物体的像距;第二确定单元,设置为根据所述像距,确定所述摄像头与所述被测物体的距离。According to another aspect of the embodiments of the present invention, a processing device for distance information is provided, including: a focusing unit configured to focus an object to be measured by using a camera; and a first determining unit configured to determine after the focusing is completed The image distance of the measured object; the second determining unit is configured to determine a distance between the camera and the measured object according to the image distance.
可选地,所述装置还包括:检测单元,设置为在对所述被测物体进行对焦之后,若在所述摄像头的图像传感器上呈现图像的清晰度高于预定阈值,则确定对焦完成。Optionally, the apparatus further includes: a detecting unit configured to determine that the focusing is completed if the sharpness of the image presented on the image sensor of the camera is higher than a predetermined threshold after focusing the object to be measured.
可选地,所述第一确定单元包括:采集模块,设置为在所述摄像头在对所述被测物体进行对焦的过程中,采集所述摄像头中镜头的运动信息;第一确定模块,设置为利用所述镜头的运动信息确定所述像距。Optionally, the first determining unit includes: an acquiring module, configured to collect motion information of a lens in the camera during a process in which the camera focuses on the measured object; and a first determining module, setting The image distance is determined for using the motion information of the lens.
可选地,所述第一确定模块包括:第一确定子模块,设置为利用所述摄像头电磁线圈的电流计算所述被测物体的像距v=A×I+v0,其中,A为第一常数,I表示所述电磁线圈的通电电流,v0为第二常数,所述镜头的运动信息用所述电磁线圈的电流来表示。Optionally, the first determining module includes: a first determining submodule configured to calculate an image distance v=A×I+v 0 of the measured object by using a current of the camera electromagnetic coil, where A is a first constant, I represents the current of the electromagnetic coil is energized, v 0 is a second constant, said camera motion information represented by the current of the electromagnetic coil.
可选地,在摄像头对被测物体进行对焦之前,所述装置还包括:测量单元,设置为测量所述摄像头与预定物体的距离,其中,所述摄像头与所述预定物体之间的距离 是预先设置的;比较单元,设置为比较所述摄像头测量的第一距离与预先设置的第二距离;获取单元,设置为在所述第一距离与所述第二距离的差值超过预定阈值的情况下,基于所述差值确定修正参数;修正单元,设置为利用所述修正参数修正所述第一常数和/或第二常数。Optionally, before the camera focuses on the measured object, the device further includes: a measuring unit configured to measure a distance between the camera and a predetermined object, wherein a distance between the camera and the predetermined object Is preset; the comparing unit is configured to compare the first distance measured by the camera with a second distance set in advance; and the acquiring unit is configured to set a difference between the first distance and the second distance to exceed a predetermined threshold In the case of the determination, the correction parameter is determined based on the difference; the correction unit is arranged to correct the first constant and/or the second constant with the correction parameter.
可选地,所述第二确定单元包括:第二计算子模块,设置为计算所述摄像头与所述被测物体的距离
Figure PCTCN2017073525-appb-000002
其中,v表示所述像距;f表示所述摄像头对所述被测物体进行对焦的焦距。
Optionally, the second determining unit includes: a second calculating submodule configured to calculate a distance between the camera and the measured object
Figure PCTCN2017073525-appb-000002
Wherein, v represents the image distance; f represents a focal length at which the camera focuses on the object to be measured.
可选地,所述摄像头为移动设备的摄像头。Optionally, the camera is a camera of a mobile device.
通过本发明上述实施例,可以利用摄像头对被测物体进行对焦,以获得被测物体对焦后在图像传感器上投影产生的像,并在对焦完成之后,通过摄像头确定被测物体的像距,以通过被测物体的像距,确定摄像头与被测物体的距离。采用本发明上述实施例,可以利用被测物体的像距来确定被测物体与摄像头的距离,利用摄像头测量与被测物体之间的距离,可以测量空间内的距离,并且摄像头对被测物体进行对焦过程中并不会被干扰,提高了距离测量的准确性,解决了现有技术中手机测距准确率低的问题。With the above embodiment of the present invention, the camera can be used to focus on the measured object to obtain an image projected on the image sensor after the object is in focus, and after the focus is completed, the image distance of the measured object is determined by the camera. The distance between the camera and the measured object is determined by the image distance of the measured object. According to the above embodiment of the present invention, the distance between the measured object and the camera can be determined by using the image distance of the measured object, and the distance between the measured object and the measured object can be measured by using the camera, and the distance in the space can be measured, and the camera measures the measured object. The focus process is not disturbed, the accuracy of the distance measurement is improved, and the problem of low accuracy of the distance measurement of the mobile phone in the prior art is solved.
可选地,通过上述实施例,实现了利用手机摄像头即可检测物体与摄像头之间的距离的目的,进而方便了使用者知道自身与其他物体的距离,还可以解决手机测距准确率低的问题。Optionally, the foregoing embodiment achieves the purpose of detecting the distance between the object and the camera by using the mobile phone camera, thereby facilitating the user to know the distance between the object and other objects, and also solving the low accuracy of the mobile phone ranging. problem.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的一种距离信息的处理方法的流程图;1 is a flow chart of a method for processing distance information according to an embodiment of the present invention;
图2是根据本发明实施例的一种可选的对焦示意图;2 is an alternative focus view of an embodiment of the present invention;
图3是根据本发明实施例的一种距离信息的处理装置的示意图。FIG. 3 is a schematic diagram of a processing apparatus for distance information according to an embodiment of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例 仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the invention. It is merely an embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order. It is to be understood that the data so used may be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units may include other steps or units not explicitly listed or inherent to such processes, methods, products or devices.
根据本发明实施例,提供了一种距离信息的处理方法的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, a method embodiment of a method for processing distance information is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer executable instructions. Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
图1是根据本发明实施例的距离信息的处理方法的流程图,如图1所示,该方法包括如下步骤:FIG. 1 is a flowchart of a method for processing distance information according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
步骤S102,利用摄像头对被测物体进行对焦;Step S102, using a camera to focus on the measured object;
步骤S104,在对焦完成之后,确定被测物体的像距;Step S104, after the focus is completed, determining an image distance of the measured object;
步骤S106,根据像距,确定摄像头与被测物体的距离。Step S106, determining the distance between the camera and the measured object according to the image distance.
通过本发明上述实施例,可以利用摄像头对被测物体进行对焦,以获得被测物体对焦后在图像传感器上投影产生的像,并在对焦完成之后,通过摄像头确定被测物体的像距,以通过被测物体的像距,确定摄像头与被测物体的距离。采用本发明上述实施例,可以利用被测物体的像距来确定被测物体与摄像头的距离,利用摄像头测量与被测物体之间的距离,可以测量空间内的距离,并且摄像头对被测物体进行对焦过程中并不会被干扰,提高了距离测量的准确性,解决了现有技术中手机测距准确率低的问题。With the above embodiment of the present invention, the camera can be used to focus on the measured object to obtain an image projected on the image sensor after the object is in focus, and after the focus is completed, the image distance of the measured object is determined by the camera. The distance between the camera and the measured object is determined by the image distance of the measured object. According to the above embodiment of the present invention, the distance between the measured object and the camera can be determined by using the image distance of the measured object, and the distance between the measured object and the measured object can be measured by using the camera, and the distance in the space can be measured, and the camera measures the measured object. The focus process is not disturbed, the accuracy of the distance measurement is improved, and the problem of low accuracy of the distance measurement of the mobile phone in the prior art is solved.
可选地,通过上述实施例,实现了利用手机摄像头即可检测物体与摄像头之间的距离的目的,进而方便了使用者知道自身与其他物体的距离,还可以解决手机测距准确率低的问题。Optionally, the foregoing embodiment achieves the purpose of detecting the distance between the object and the camera by using the mobile phone camera, thereby facilitating the user to know the distance between the object and other objects, and also solving the low accuracy of the mobile phone ranging. problem.
上述摄像头可以为CCD(Charge Coupled Device,即电耦合器件)摄像头,也可 以为CMOS(Complementary Metal-Oxide Semiconductor,即金属氧化物半导体元件)摄像头。上述被测物体可以为活体(包括人和动物),也可以为不是活体(如照片、桌子等)。The camera may be a CCD (Charge Coupled Device) camera, or It is a CMOS (Complementary Metal-Oxide Semiconductor) camera. The object to be measured may be a living body (including humans and animals), or may be a living body (such as a photo, a table, etc.).
上述用摄像头对被测物体进行对焦具体可以通过如下方式实现:The above focusing on the object to be measured by the camera can be achieved as follows:
在一个可选的实施例中,当摄像头的镜头捕捉到最原始的图像后,这些图像数据会被当作原始资料传送至ISP(Image Signal Processing,即图像信号处理器)中,此时ISP便对原始图像数据进行分析,检查图像毗邻像素之间的密度差异,ISP根据毗邻像素之间的密度差异调整镜头与图像传感器的距离,通过推拉镜头,使得被测物体在图像传感器上形成清晰的投影,进而实现摄像头对被测物体的对焦。In an optional embodiment, when the lens of the camera captures the original image, the image data is transmitted to the ISP (Image Signal Processing) as the original data, and the ISP is The original image data is analyzed to check the density difference between adjacent pixels of the image. The ISP adjusts the distance between the lens and the image sensor according to the density difference between adjacent pixels, and pushes the lens to form a clear projection on the image sensor. In turn, the camera focuses on the object to be measured.
在另一个可选的实施例中,ISP根据毗邻像素之间的密度差异调整镜头与图像传感器的距离,通过推拉图像传感器,使得被测物体在图像传感器上形成清晰的投影,进而实现摄像头对被测物体的对焦。In another optional embodiment, the ISP adjusts the distance between the lens and the image sensor according to the density difference between adjacent pixels, and pushes and pulls the image sensor to form a clear projection on the image sensor, thereby implementing the camera pair. Measure the focus of the object.
上述图像传感器包括但不局限于:CCD传感器、CMOS传感器和CIS传感器。The above image sensors include, but are not limited to, CCD sensors, CMOS sensors, and CIS sensors.
可选地,在对焦完成之后,摄像头确定被测物体的像距,上述像距可以为摄像头图像传感器与镜头之间的距离。并且摄像头根据得到的像距,确定摄像头与被测物体的距离。图2是摄像头进行对焦的示例。Optionally, after the focus is completed, the camera determines an image distance of the measured object, and the image distance may be a distance between the camera image sensor and the lens. And the camera determines the distance between the camera and the measured object according to the obtained image distance. FIG. 2 is an example in which the camera performs focusing.
在图2中,摄像头的镜头J1在捕捉到被测物体W1后,对被测物体W1进行自动对焦,通过推拉摄像机的镜头使得图像传感器T1上形成一个清晰的图像。In FIG. 2, after the lens J1 of the camera captures the object W1, the object W1 is automatically focused, and a clear image is formed on the image sensor T1 by pushing and pulling the lens of the camera.
采用本发明上述实施例,可以利用摄像头实现对物体进行测距,测距方法较为便捷。According to the above embodiment of the present invention, the camera can be used for ranging, and the ranging method is convenient.
根据本发明上述实施例,方法还包括:在对被测物体进行对焦之后,若在摄像头的图像传感器上呈现图像的清晰度高于预定阈值,则确定对焦完成。According to the above embodiment of the present invention, the method further comprises: after focusing on the object to be measured, if the sharpness of the image presented on the image sensor of the camera is higher than a predetermined threshold, determining that the focus is completed.
上述阈值可以预先设置。The above threshold can be set in advance.
可选的,在对被测物体进行对焦之后,ISP对图像传感器的投影进行分析,判断上述投影图像的清晰度是否高于预定阈值,在判断出投影图像的清晰度高于预定阈值的情况下,确定被测物体的对焦完成。Optionally, after focusing on the measured object, the ISP analyzes the projection of the image sensor, determines whether the resolution of the projected image is higher than a predetermined threshold, and determines that the resolution of the projected image is higher than a predetermined threshold. , to determine the focus of the measured object is completed.
采用本发明上述实施例,通过判断图像传感器上呈现图像的清晰度高于预定阈值,来确定是否对焦完成,较好的达到了准确对焦的目的。According to the above embodiment of the present invention, it is determined that the focus is completed by determining that the resolution of the image presented on the image sensor is higher than a predetermined threshold, and the purpose of accurate focusing is better achieved.
根据本发明上述实施例,确定被测物体的像距包括:在摄像头在对被测物体进行 对焦的过程中,采集摄像头中镜头的运动信息;利用镜头的运动信息确定像距。According to the above embodiment of the present invention, determining the image distance of the measured object includes: performing the object to be measured on the camera During the focusing process, the motion information of the lens in the camera is acquired; the image distance is determined by using the motion information of the lens.
具体的,在摄像头在对被测物体进行对焦的过程中,可以通过采集摄像头中镜头的运动信息来确定被测物体的像距,从而根据像距来确定摄像头与被测物体的距离,达到了用摄像头即可实现测距的目的。Specifically, in the process of focusing the object to be measured, the camera can determine the image distance of the measured object by acquiring the motion information of the lens in the camera, thereby determining the distance between the camera and the measured object according to the image distance, and achieving The purpose of ranging can be achieved with a camera.
具体的,利用镜头的运动信息确定像距包括:利用摄像头电磁线圈的电流计算被测物体的像距v=A×I+v0,其中,A为第一常数,I表示电磁线圈的通电电流,v0为第二常数,镜头的运动信息用电磁线圈的电流来表示。Specifically, the motion information is determined by using the image distance of the lens comprising: a solenoid with a current camera image distance calculating the measured object v = A × I + v 0, where, A is a first constant, I represents the energization of the solenoid current , v 0 is the second constant, and the motion information of the lens is represented by the current of the electromagnetic coil.
例如,摄像头的对焦是通过电磁线圈依靠弹簧推动镜头,令被测物体在图像传感器中形成清晰的图像。摄像头在不工作的情况下,弹簧的初始位置为v0,v0为第二常数,在摄像头开始工作时,根据弹簧形变公式:F=kx,其中,F为使弹簧形变的力,k为弹簧形变常数,x为弹簧形变长度,可得镜头与图像传感器的距离v=F+v0=kx+v0For example, the focus of the camera is to push the lens through the electromagnetic coil by means of a spring, so that the object to be measured forms a clear image in the image sensor. When the camera is not working, the initial position of the spring is v 0 , and v 0 is the second constant. When the camera starts to work, according to the spring deformation formula: F=kx, where F is the force that deforms the spring, k is The spring deformation constant, x is the spring deformation length, and the distance between the lens and the image sensor is v=F+v 0 =kx+v 0 .
又由安培力公式:F=B×I×L×sinθ,其中,F为使弹簧形变的力(即安培力),B为磁通量,I为电磁线圈的通电电流,L为电磁线圈导线长度,θ为电磁线圈的角度。由于在摄像头中B、L、θ均为定值,可以假设A=B×L×sinθ,其中,A为第一常数,由此可得F=A×I。Also by Ampere's formula: F = B × I × L × sin θ, where F is the force that deforms the spring (ie, Ampere force), B is the magnetic flux, I is the energizing current of the electromagnetic coil, and L is the length of the electromagnetic coil wire. θ is the angle of the electromagnetic coil. Since B, L, and θ are constant values in the camera, it can be assumed that A=B×L×sin θ, where A is the first constant, and thus F=A×I.
综上可得,F=kx=A×I,则镜头与图像传感器的距离(即像距)v=F+v0=A×I+v0 In summary, F = kx = A × I, the distance between the lens and the image sensor (ie image distance) v = F + v 0 = A × I + v 0
采用本发明上述实施例,可以通过摄像头电磁线圈的电流来计算被测物体的像距,简化了运算,实施较为方便。According to the above embodiment of the present invention, the image distance of the measured object can be calculated by the current of the electromagnetic coil of the camera, which simplifies the calculation and is convenient to implement.
可选的,在摄像头对被测物体进行对焦之前,方法还包括:测量摄像头与预定物体的距离,其中,摄像头与预定物体之间的距离是预先设置的;比较摄像头测量的第一距离与预先设置的第二距离;在第一距离与第二距离的差值超过预定阈值的情况下,基于差值确定修正参数;利用修正参数修正第一常数和/或第二常数。Optionally, before the camera focuses on the measured object, the method further includes: measuring a distance between the camera and the predetermined object, wherein a distance between the camera and the predetermined object is preset; comparing the first distance measured by the camera with the advance a second distance is set; in a case where the difference between the first distance and the second distance exceeds a predetermined threshold, the correction parameter is determined based on the difference; and the first constant and/or the second constant are corrected by the correction parameter.
由于不同型号的摄像头存在一定的差异性,其第一常数和第二常数也会存在一定差异,所以可以利用固定值对手机摄像头进行校准。例如在测量界面中预设校准选项,进入校准界面后,可以选择多个固定距离进行校准,例如设定1m、5m、20m三个校准值,进行校准后即可利用摄像头进行距离测量。Since there are certain differences in the cameras of different models, there will be some differences between the first constant and the second constant, so the mobile phone camera can be calibrated with a fixed value. For example, preset calibration options in the measurement interface. After entering the calibration interface, you can select multiple fixed distances for calibration. For example, set three calibration values of 1m, 5m, and 20m. After calibration, you can use the camera to measure distance.
采用本发明上述实施例,可以通过预先校正第一常数和第二常数,来保证第一常数和第二常数的准确度,并通过校正后的第一常数和第二常数来对被测物体的距离进 行计算,一定程度上提高了摄像头测距的准确性。With the above embodiment of the present invention, the accuracy of the first constant and the second constant can be ensured by correcting the first constant and the second constant in advance, and the corrected first constant and the second constant are used to measure the object to be measured. Distance into The calculation of the line improves the accuracy of the camera ranging to some extent.
具体的,根据像距,确定摄像头与被测物体的距离包括:计算被测物体的距离
Figure PCTCN2017073525-appb-000003
其中,v表示像距;f表示摄像头对被测物体进行对焦的焦距。
Specifically, determining the distance between the camera and the measured object according to the image distance includes: calculating the distance of the measured object
Figure PCTCN2017073525-appb-000003
Where v is the image distance; f is the focal length at which the camera focuses on the object being measured.
根据高斯成像公式
Figure PCTCN2017073525-appb-000004
其中,u为被测物体的距离,v为镜头与图像传感器的距离(即像距),f为焦距(即镜头至焦点的距离),对于定焦镜头的摄像头,其焦距f为固定值。由此上述高斯公式可以演化为
Figure PCTCN2017073525-appb-000005
因此,可以根据像距,进行计算的到被测物体的距离。
Gaussian imaging formula
Figure PCTCN2017073525-appb-000004
Where u is the distance of the object to be measured, v is the distance between the lens and the image sensor (ie, the image distance), f is the focal length (ie, the distance from the lens to the focus), and for the camera of the fixed-focus lens, the focal length f is a fixed value. Thus the above Gaussian formula can evolve into
Figure PCTCN2017073525-appb-000005
Therefore, the calculated distance to the measured object can be calculated according to the image distance.
具体的,可以将像距v=A×I+v0带入被测物体的距离
Figure PCTCN2017073525-appb-000006
可得:
Specifically, the distance of the image distance v=A×I+v 0 into the measured object can be brought
Figure PCTCN2017073525-appb-000006
Available:
Figure PCTCN2017073525-appb-000007
Figure PCTCN2017073525-appb-000007
因此,可以利用电磁线圈的通电电流与被测物体的距离之间的关系式,计算得到被测物体的距离(即被测物体与镜头之间的距离),达到了利用摄像头进行测距的目的,并且通过电磁线圈的通电电流来计算得到被测物体的距离,方法较为简便。Therefore, the relationship between the current of the electromagnetic coil and the distance of the measured object can be used to calculate the distance of the measured object (ie, the distance between the measured object and the lens), thereby achieving the purpose of using the camera for ranging. And the distance of the measured object is calculated by the energizing current of the electromagnetic coil, and the method is relatively simple.
可选的,在图2中,为产生足够的磁力让镜头克服弹簧的弹力,设定推动镜头,使得被测物体在图像传感器上形成清晰图像时,当镜头与图像传感器相距167.66mm时,此时测得的被测物体的距离为2297mm;当镜头与图像传感器相距259.91mm时,此时测得的被测物体的距离为3297mm。Optionally, in FIG. 2, in order to generate sufficient magnetic force to make the lens overcome the spring force of the spring, set the push lens so that the measured object forms a clear image on the image sensor, when the lens is 167.66 mm away from the image sensor, The measured distance of the measured object is 2297 mm; when the lens is separated from the image sensor by 259.91 mm, the measured object is at a distance of 3297 mm.
需要说明的是,上述镜头与图像传感器的距离(即像距)为了图像效果,一般会小于10mm。It should be noted that the distance between the lens and the image sensor (ie, the image distance) is generally less than 10 mm for the image effect.
采用本发明上述实施例,可以通过多被测物体进行自由对焦,并基于被测物体的像距来得到被测物体的距离,达到了利用摄像头进行测距的目的。According to the above embodiment of the present invention, the multi-measured object can be freely focused, and the distance of the measured object can be obtained based on the image distance of the measured object, thereby achieving the purpose of using the camera for ranging.
可选的,摄像头为移动设备的摄像头。Optionally, the camera is a camera for mobile devices.
上述移动设备包括但不局限于:手机和平板。上述摄像头可以为移动设备的内置摄像头,也可以为移动设备的外置摄像头。 The above mobile devices include, but are not limited to, mobile phones and tablets. The above camera can be a built-in camera of a mobile device or an external camera of a mobile device.
采用本发明上述实施例,当没有专业测量距离的情况下,可以利用移动设备的摄像头进行距离测量,方便了移动设备使用者知道自身与其他物体的距离。According to the above embodiment of the present invention, when there is no professional measurement distance, the distance measurement can be performed by using the camera of the mobile device, which facilitates the user of the mobile device to know the distance between itself and other objects.
根据本发明的另一方面,本发明还提供了一种距离信息的处理装置,图3是根据本发明实施例的一种距离信息的处理装置的示意图,该装置可以包括:According to another aspect of the present invention, the present invention further provides a processing device for distance information, and FIG. 3 is a schematic diagram of a processing device for distance information according to an embodiment of the present invention. The device may include:
对焦单元301,设置为利用摄像头对被测物体进行对焦;The focusing unit 301 is configured to focus on the object to be measured by using the camera;
第一确定单元303,设置为在对焦完成之后,确定被测物体的像距;The first determining unit 303 is configured to determine an image distance of the measured object after the focusing is completed;
第二确定单元305,设置为根据像距,确定摄像头与被测物体的距离。The second determining unit 305 is configured to determine the distance between the camera and the measured object according to the image distance.
通过本发明上述实施例,可以利用摄像头对被测物体进行对焦,以获得被测物体对焦后在图像传感器上投影产生的像,并在对焦完成之后,通过摄像头确定被测物体的像距,以通过被测物体的像距,确定摄像头与被测物体的距离。采用本发明上述实施例,可以利用被测物体的像距来确定被测物体与摄像头的距离,利用摄像头测量与被测物体之间的距离,可以测量空间内的距离,并且摄像头对被测物体进行对焦过程中并不会被干扰,提高了距离测量的准确性,解决了现有技术中手机测距准确率低的问题。With the above embodiment of the present invention, the camera can be used to focus on the measured object to obtain an image projected on the image sensor after the object is in focus, and after the focus is completed, the image distance of the measured object is determined by the camera. The distance between the camera and the measured object is determined by the image distance of the measured object. According to the above embodiment of the present invention, the distance between the measured object and the camera can be determined by using the image distance of the measured object, and the distance between the measured object and the measured object can be measured by using the camera, and the distance in the space can be measured, and the camera measures the measured object. The focus process is not disturbed, the accuracy of the distance measurement is improved, and the problem of low accuracy of the distance measurement of the mobile phone in the prior art is solved.
可选地,通过上述实施例,实现了利用手机摄像头即可检测物体与摄像头之间的距离的目的,进而方便了使用者知道自身与其他物体的距离,还可以解决手机测距准确率低的问题。Optionally, the foregoing embodiment achieves the purpose of detecting the distance between the object and the camera by using the mobile phone camera, thereby facilitating the user to know the distance between the object and other objects, and also solving the low accuracy of the mobile phone ranging. problem.
上述摄像头可以为CCD(Charge Coupled Device,即电耦合器件)摄像头,也可以为CMOS(Complementary Metal-Oxide Semiconductor,即金属氧化物半导体元件)摄像头。上述被测物体可以为生物,也可以为非生物,可选地,可以为规则形状,也可以为不规则形状。The camera may be a CCD (Charge Coupled Device) camera or a CMOS (Complementary Metal-Oxide Semiconductor) camera. The object to be measured may be a living thing or an abiotic, and may alternatively be a regular shape or an irregular shape.
上述用摄像头对被测物体进行对焦具体可以通过如下方式实现:The above focusing on the object to be measured by the camera can be achieved as follows:
在一个可选的实施例中,当摄像头的镜头捕捉到最原始的图像后,这些图像数据会被当作原始资料传送至ISP(Image Signal Processing,即图像信号处理器)中,此时ISP便对原始图像数据进行分析,检查图像毗邻像素之间的密度差异,ISP根据毗邻像素之间的密度差异调整镜头与图像传感器的距离,通过推拉镜头,使得被测物体在图像传感器上形成清晰的投影,进而实现摄像头对被测物体的对焦。In an optional embodiment, when the lens of the camera captures the original image, the image data is transmitted to the ISP (Image Signal Processing) as the original data, and the ISP is The original image data is analyzed to check the density difference between adjacent pixels of the image. The ISP adjusts the distance between the lens and the image sensor according to the density difference between adjacent pixels, and pushes the lens to form a clear projection on the image sensor. In turn, the camera focuses on the object to be measured.
在另一个可选的实施例中,ISP根据毗邻像素之间的密度差异调整镜头与图像传感器的距离,通过推拉图像传感器,使得被测物体在图像传感器上形成清晰的投影,进而实现摄像头对被测物体的对焦。 In another optional embodiment, the ISP adjusts the distance between the lens and the image sensor according to the density difference between adjacent pixels, and pushes and pulls the image sensor to form a clear projection on the image sensor, thereby implementing the camera pair. Measure the focus of the object.
上述图像传感器包括但不局限于:CCD传感器、CMOS传感器和CIS传感器。The above image sensors include, but are not limited to, CCD sensors, CMOS sensors, and CIS sensors.
可选地,在对焦完成之后,摄像头确定被测物体的像距,上述像距可以为摄像头图像传感器与镜头之间的距离。并且摄像头根据得到的像距,确定摄像头与被测物体的距离。图2是摄像头进行对焦的示例。Optionally, after the focus is completed, the camera determines an image distance of the measured object, and the image distance may be a distance between the camera image sensor and the lens. And the camera determines the distance between the camera and the measured object according to the obtained image distance. FIG. 2 is an example in which the camera performs focusing.
在图2中,摄像头的镜头J1在捕捉到被测物体W1后,对被测物体W1进行自动对焦,通过推拉摄像机的镜头使得图像传感器T1上形成一个清晰的图像。In FIG. 2, after the lens J1 of the camera captures the object W1, the object W1 is automatically focused, and a clear image is formed on the image sensor T1 by pushing and pulling the lens of the camera.
采用本发明上述实施例,可以利用摄像头实现对物体进行测距,测距方法较为便捷。According to the above embodiment of the present invention, the camera can be used for ranging, and the ranging method is convenient.
根据本发明上述实施例,装置还包括:检测单元,设置为在对被测物体进行对焦之后,若在摄像头的图像传感器上呈现图像的清晰度高于预定阈值,则确定对焦完成。According to the above embodiment of the present invention, the apparatus further includes: a detecting unit configured to determine that the focusing is completed if the sharpness of the image presented on the image sensor of the camera is higher than a predetermined threshold after focusing the object to be measured.
采用本发明上述实施例,通过判断图像传感器上呈现图像的清晰度高于预定阈值,来确定是否对焦完成,较好的达到了准确对焦的目的。According to the above embodiment of the present invention, it is determined that the focus is completed by determining that the resolution of the image presented on the image sensor is higher than a predetermined threshold, and the purpose of accurate focusing is better achieved.
根据本发明上述实施例,第一确定单元包括:采集模块,设置为在摄像头在对被测物体进行对焦的过程中,采集摄像头中镜头的运动信息;第一确定模块,设置为利用镜头的运动信息确定像距。According to the above embodiment of the present invention, the first determining unit includes: an collecting module configured to acquire motion information of the lens in the camera during the process of focusing the object to be measured; the first determining module is configured to utilize the motion of the lens The information determines the image distance.
具体的,在摄像头在对被测物体进行对焦的过程中,可以通过采集摄像头中镜头的运动信息来确定被测物体的像距,从而根据像距来确定摄像头与被测物体的距离,达到了用摄像头即可实现测距的目的。Specifically, in the process of focusing the object to be measured, the camera can determine the image distance of the measured object by acquiring the motion information of the lens in the camera, thereby determining the distance between the camera and the measured object according to the image distance, and achieving The purpose of ranging can be achieved with a camera.
具体的,第一确定模块包括:第一确定子模块,设置为利用摄像头电磁线圈的电流计算被测物体的像距v=A×I+v0,其中,A为第一常数,I表示电磁线圈的通电电流,v0为第二常数,镜头的运动信息用电磁线圈的电流来表示。Specifically, the first determining module includes: a first determining submodule configured to calculate an image distance v=A×I+v 0 of the measured object by using a current of the electromagnetic coil of the camera, wherein A is a first constant, and I represents electromagnetic The energization current of the coil, v 0 is the second constant, and the motion information of the lens is represented by the current of the electromagnetic coil.
采用本发明上述实施例,可以通过摄像头电磁线圈的电流来计算被测物体的像距,简化了运算,实施较为方便。According to the above embodiment of the present invention, the image distance of the measured object can be calculated by the current of the electromagnetic coil of the camera, which simplifies the calculation and is convenient to implement.
可选的,在摄像头对被测物体进行对焦之前,装置还包括:测量单元,设置为测量摄像头与预定物体的距离,其中,摄像头与预定物体之间的距离是预先设置的;比较单元,设置为比较摄像头测量的第一距离与预先设置的第二距离;获取单元,设置为在第一距离与第二距离的差值超过预定阈值的情况下,基于差值确定修正参数;修正单元,设置为利用修正参数修正第一常数和/或第二常数。 Optionally, before the camera focuses on the measured object, the device further includes: a measuring unit configured to measure a distance between the camera and the predetermined object, wherein a distance between the camera and the predetermined object is preset; a comparison unit, setting In order to compare the first distance measured by the camera with the preset second distance; the acquiring unit is configured to determine the correction parameter based on the difference if the difference between the first distance and the second distance exceeds a predetermined threshold; the correction unit, setting The first constant and/or the second constant are corrected for use with the correction parameters.
采用本发明上述实施例,可以通过预先校正第一常数和第二常数,来保证第一常数和第二常数的准确度,并通过校正后的第一常数和第二常数来对被测物体的距离进行计算,一定程度上提高了摄像头测距的准确性。With the above embodiment of the present invention, the accuracy of the first constant and the second constant can be ensured by correcting the first constant and the second constant in advance, and the corrected first constant and the second constant are used to measure the object to be measured. The calculation of the distance improves the accuracy of the camera ranging to some extent.
具体的,第二确定单元包括:第二计算子模块,设置为计算被测物体的距离
Figure PCTCN2017073525-appb-000008
其中,v表示像距;f表示摄像头对被测物体进行对焦的焦距。
Specifically, the second determining unit includes: a second calculating submodule configured to calculate a distance of the measured object
Figure PCTCN2017073525-appb-000008
Where v is the image distance; f is the focal length at which the camera focuses on the object being measured.
因此,可以利用电磁线圈的通电电流与被测物体的距离之间的关系式,计算得到被测物体的距离(即被测物体与镜头之间的距离),达到了利用摄像头进行测距的目的,并且通过电磁线圈的通电电流来计算得到被测物体的距离,方法较为简便。Therefore, the relationship between the current of the electromagnetic coil and the distance of the measured object can be used to calculate the distance of the measured object (ie, the distance between the measured object and the lens), thereby achieving the purpose of using the camera for ranging. And the distance of the measured object is calculated by the energizing current of the electromagnetic coil, and the method is relatively simple.
可选的,摄像头为移动设备的摄像头。Optionally, the camera is a camera for mobile devices.
采用本发明上述实施例,当没有专业测量距离的情况下,可以利用移动设备的摄像头进行距离测量,方便了移动设备使用者知道自身与其他物体的距离。According to the above embodiment of the present invention, when there is no professional measurement distance, the distance measurement can be performed by using the camera of the mobile device, which facilitates the user of the mobile device to know the distance between itself and other objects.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, the descriptions of the various embodiments are different, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed technical contents may be implemented in other manners. The device embodiments described above are only schematic. For example, the division of the unit may be a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质 上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the essence of the technical solution of the present invention The portion contributing to or contributing to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device All or part of the steps of the method of the various embodiments of the present invention may be performed (for a personal computer, server or network device, etc.). The foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。 The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.

Claims (13)

  1. 一种距离信息的处理方法,包括:A method for processing distance information, including:
    利用摄像头对被测物体进行对焦;Use the camera to focus on the measured object;
    在对焦完成之后,确定所述被测物体的像距;After the focus is completed, determining an image distance of the measured object;
    根据所述像距,确定所述摄像头与所述被测物体的距离。And determining a distance between the camera and the measured object according to the image distance.
  2. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1 wherein the method further comprises:
    在对所述被测物体进行对焦之后,若在所述摄像头的图像传感器上呈现图像的清晰度高于预定阈值,则确定对焦完成。After focusing the object to be measured, if the sharpness of the image presented on the image sensor of the camera is above a predetermined threshold, then the focus is determined to be complete.
  3. 根据权利要求1所述的方法,其中,确定所述被测物体的像距包括:The method of claim 1, wherein determining an image distance of the measured object comprises:
    在所述摄像头在对所述被测物体进行对焦的过程中,采集所述摄像头中镜头的运动信息;Collecting motion information of the lens in the camera during the focusing of the object to be measured by the camera;
    利用所述镜头的运动信息确定所述像距。The image distance is determined using motion information of the lens.
  4. 根据权利要求3所述的方法,其中,利用所述镜头的运动信息确定所述像距包括:The method of claim 3, wherein determining the image distance using motion information of the lens comprises:
    利用所述摄像头电磁线圈的电流计算所述被测物体的像距v=A×I+v0,其中,A为第一常数,I表示所述电磁线圈的通电电流,v0为第二常数,所述镜头的运动信息用所述电磁线圈的电流来表示。Calculating an image distance v=A×I+v 0 of the measured object by using a current of the electromagnetic coil of the camera, wherein A is a first constant, I represents an energization current of the electromagnetic coil, and v 0 is a second constant The motion information of the lens is represented by the current of the electromagnetic coil.
  5. 根据权利要求4所述的方法,其中,在摄像头对被测物体进行对焦之前,所述方法还包括:The method of claim 4, wherein the method further comprises: before the camera focuses on the object to be measured;
    测量所述摄像头与预定物体的距离,其中,所述摄像头与所述预定物体之间的距离是预先设置的;Measuring a distance between the camera and a predetermined object, wherein a distance between the camera and the predetermined object is preset;
    比较所述摄像头测量的第一距离与预先设置的第二距离;Comparing the first distance measured by the camera with a second distance set in advance;
    在所述第一距离与所述第二距离的差值超过预定阈值的情况下,基于所述差值确定修正参数;In a case where the difference between the first distance and the second distance exceeds a predetermined threshold, determining a correction parameter based on the difference;
    利用所述修正参数修正所述第一常数和/或第二常数。The first constant and/or the second constant are corrected using the correction parameter.
  6. 根据权利要求1所述的方法,其中,根据所述像距,确定所述摄像头与所述被测 物体的距离包括:The method of claim 1, wherein the camera is determined to be measured according to the image distance The distance of the object includes:
    计算所述摄像头与所述被测物体的距离
    Figure PCTCN2017073525-appb-100001
    其中,v表示所述像距;f表示所述摄像头对所述被测物体进行对焦的焦距。
    Calculating a distance between the camera and the measured object
    Figure PCTCN2017073525-appb-100001
    Wherein, v represents the image distance; f represents a focal length at which the camera focuses on the object to be measured.
  7. 根据权利要求1所述的方法,其中,所述摄像头为移动设备的摄像头。The method of claim 1 wherein the camera is a camera of a mobile device.
  8. 一种距离信息的处理装置,包括:A processing device for distance information, comprising:
    对焦单元,设置为利用摄像头对被测物体进行对焦;The focusing unit is configured to focus on the object to be measured by using the camera;
    第一确定单元,设置为在对焦完成之后,确定所述被测物体的像距;a first determining unit, configured to determine an image distance of the measured object after the focus is completed;
    第二确定单元,设置为根据所述像距,确定所述摄像头与所述被测物体的距离。And a second determining unit configured to determine a distance between the camera and the measured object according to the image distance.
  9. 根据权利要求8所述的装置,其中,所述装置还包括:The apparatus of claim 8 wherein said apparatus further comprises:
    检测单元,设置为在对所述被测物体进行对焦之后,若在所述摄像头的图像传感器上呈现图像的清晰度高于预定阈值,则确定对焦完成。The detecting unit is configured to determine that the focusing is completed if the sharpness of the image presented on the image sensor of the camera is higher than a predetermined threshold after focusing the object to be measured.
  10. 根据权利要求8所述的装置,其中,所述第一确定单元包括:The apparatus of claim 8, wherein the first determining unit comprises:
    采集模块,设置为在所述摄像头在对所述被测物体进行对焦的过程中,采集所述摄像头中镜头的运动信息;An acquisition module is configured to collect motion information of a lens in the camera during a process in which the camera focuses on the measured object;
    第一确定模块,设置为利用所述镜头的运动信息确定所述像距。The first determining module is configured to determine the image distance by using motion information of the lens.
  11. 根据权利要求10所述的装置,其中,所述第一确定模块包括:The apparatus of claim 10, wherein the first determining module comprises:
    第一确定子模块,设置为利用所述摄像头电磁线圈的电流计算所述被测物体的像距v=A×I+v0,其中,A为第一常数,I表示所述电磁线圈的通电电流,v0为第二常数,所述镜头的运动信息用所述电磁线圈的电流来表示。a first determining submodule configured to calculate an image distance v=A×I+v 0 of the measured object by using a current of the electromagnetic coil of the camera, where A is a first constant, and I represents a power of the electromagnetic coil The current, v 0 is a second constant, and the motion information of the lens is represented by the current of the electromagnetic coil.
  12. 根据权利要求11所述的装置,其中,在摄像头对被测物体进行对焦之前,所述装置还包括:The apparatus according to claim 11, wherein before the camera focuses on the object to be measured, the apparatus further comprises:
    测量单元,设置为测量所述摄像头与预定物体的距离,其中,所述摄像头与所述预定物体之间的距离是预先设置的;a measuring unit configured to measure a distance between the camera and a predetermined object, wherein a distance between the camera and the predetermined object is preset;
    比较单元,设置为比较所述摄像头测量的第一距离与预先设置的第二距离; a comparing unit configured to compare the first distance measured by the camera with a second distance set in advance;
    获取单元,设置为在所述第一距离与所述第二距离的差值超过预定阈值的情况下,基于所述差值确定修正参数;And an acquiring unit, configured to determine a correction parameter based on the difference when the difference between the first distance and the second distance exceeds a predetermined threshold;
    修正单元,设置为利用所述修正参数修正所述第一常数和/或第二常数。A correction unit configured to modify the first constant and/or the second constant with the correction parameter.
  13. 根据权利要求8所述的装置,其中,所述第二确定单元包括:The apparatus of claim 8, wherein the second determining unit comprises:
    第二计算子模块,设置为计算所述摄像头与所述被测物体的距离
    Figure PCTCN2017073525-appb-100002
    其中,v表示所述像距;f表示所述摄像头对所述被测物体进行对焦的焦距。
    a second calculation submodule configured to calculate a distance between the camera and the measured object
    Figure PCTCN2017073525-appb-100002
    Wherein, v represents the image distance; f represents a focal length at which the camera focuses on the object to be measured.
PCT/CN2017/073525 2016-08-01 2017-02-14 Distance information processing method and device WO2018023961A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610630453.1 2016-08-01
CN201610630453.1A CN106197366A (en) 2016-08-01 2016-08-01 The treating method and apparatus of range information

Publications (1)

Publication Number Publication Date
WO2018023961A1 true WO2018023961A1 (en) 2018-02-08

Family

ID=57498374

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/073525 WO2018023961A1 (en) 2016-08-01 2017-02-14 Distance information processing method and device

Country Status (2)

Country Link
CN (1) CN106197366A (en)
WO (1) WO2018023961A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239698A (en) * 2018-08-02 2019-01-18 华勤通讯技术有限公司 Camera distance measuring method and electronic equipment
CN113029089A (en) * 2021-03-17 2021-06-25 国网安徽省电力有限公司铜陵供电公司 Video image inner target distance estimation method based on electric power field auxiliary information
CN115442525A (en) * 2022-08-31 2022-12-06 丁非 Pupil distance measuring method, system, terminal and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106197366A (en) * 2016-08-01 2016-12-07 珠海格力电器股份有限公司 The treating method and apparatus of range information
CN108007426B (en) * 2017-11-29 2020-10-16 珠海亿智电子科技有限公司 Camera ranging method
CN116546316B (en) * 2022-01-25 2023-12-08 荣耀终端有限公司 Method for switching cameras and electronic equipment
CN117177062B (en) * 2022-05-30 2024-06-25 荣耀终端有限公司 Camera switching method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110028851A (en) * 2009-09-14 2011-03-22 삼성전기주식회사 Apparatus for measuring distance and system for measuring distance using the same
CN102857633A (en) * 2012-08-15 2013-01-02 苏州启智机电技术有限公司 Mobile phone ranging system
CN103837129A (en) * 2014-02-27 2014-06-04 华为终端有限公司 Distance measuring method and device in terminals and terminal
CN104215216A (en) * 2014-08-21 2014-12-17 深圳市金立通信设备有限公司 Ranging device and terminal
CN104931957A (en) * 2015-06-01 2015-09-23 广东欧珀移动通信有限公司 Distance measurement method and device based on mobile terminal
CN106197366A (en) * 2016-08-01 2016-12-07 珠海格力电器股份有限公司 The treating method and apparatus of range information

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458159A (en) * 2012-05-31 2013-12-18 鸿富锦精密工业(深圳)有限公司 Electronic device with distance measurement function and distance measurement method
CN102853810A (en) * 2012-09-04 2013-01-02 广东欧珀移动通信有限公司 Method for measuring object distance through mobile terminal, and system thereof
CN104215215B (en) * 2014-08-21 2017-07-25 深圳市金立通信设备有限公司 A kind of distance-finding method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110028851A (en) * 2009-09-14 2011-03-22 삼성전기주식회사 Apparatus for measuring distance and system for measuring distance using the same
CN102857633A (en) * 2012-08-15 2013-01-02 苏州启智机电技术有限公司 Mobile phone ranging system
CN103837129A (en) * 2014-02-27 2014-06-04 华为终端有限公司 Distance measuring method and device in terminals and terminal
CN104215216A (en) * 2014-08-21 2014-12-17 深圳市金立通信设备有限公司 Ranging device and terminal
CN104931957A (en) * 2015-06-01 2015-09-23 广东欧珀移动通信有限公司 Distance measurement method and device based on mobile terminal
CN106197366A (en) * 2016-08-01 2016-12-07 珠海格力电器股份有限公司 The treating method and apparatus of range information

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239698A (en) * 2018-08-02 2019-01-18 华勤通讯技术有限公司 Camera distance measuring method and electronic equipment
CN109239698B (en) * 2018-08-02 2022-12-20 华勤技术股份有限公司 Camera ranging method and electronic equipment
CN113029089A (en) * 2021-03-17 2021-06-25 国网安徽省电力有限公司铜陵供电公司 Video image inner target distance estimation method based on electric power field auxiliary information
CN115442525A (en) * 2022-08-31 2022-12-06 丁非 Pupil distance measuring method, system, terminal and storage medium

Also Published As

Publication number Publication date
CN106197366A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
WO2018023961A1 (en) Distance information processing method and device
TWI393980B (en) The method of calculating the depth of field and its method and the method of calculating the blurred state of the image
US8805021B2 (en) Method and apparatus for estimating face position in 3 dimensions
EP3190781B1 (en) Autofocus method, device and electronic apparatus
JP5961945B2 (en) Image processing apparatus, projector and projector system having the image processing apparatus, image processing method, program thereof, and recording medium recording the program
EP3019117B1 (en) Video-based auto-capture for dental surface imaging apparatus
KR20180100180A (en) How to create a customized / personalized head transfer function
WO2018077218A1 (en) Depth measuring method and system
EP3513552B1 (en) Systems and methods for improved depth sensing
CN106156696B (en) Information processing method and electronic equipment
JP2020502559A5 (en)
CN107084680A (en) Target depth measuring method based on machine monocular vision
US10877238B2 (en) Bokeh control utilizing time-of-flight sensor to estimate distances to an object
JPWO2011125937A1 (en) Calibration data selection device, selection method, selection program, and three-dimensional position measurement device
JP2012015642A (en) Imaging device
JP6361313B2 (en) Vehicle detection method and apparatus
CN112740065B (en) Imaging device, method for imaging and method for depth mapping
TW201541057A (en) Method of capturing images
EP3663801A1 (en) Time of flight sensor module, method, apparatus and computer program for determining distance information based on time of flight sensor data
JP2008089811A (en) Imaging apparatus and control method therefor
US20170069109A1 (en) Method and apparatus for measuring an object
JP5533739B2 (en) Optical information reader
KR20180053718A (en) Apparatus and method for generating data representing a pixel beam
US9232132B1 (en) Light field image processing
JP5616743B2 (en) Imaging apparatus and image processing method

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: 17836148

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: 17836148

Country of ref document: EP

Kind code of ref document: A1