WO2018077218A1 - 一种深度测量方法及系统 - Google Patents

一种深度测量方法及系统 Download PDF

Info

Publication number
WO2018077218A1
WO2018077218A1 PCT/CN2017/107850 CN2017107850W WO2018077218A1 WO 2018077218 A1 WO2018077218 A1 WO 2018077218A1 CN 2017107850 W CN2017107850 W CN 2017107850W WO 2018077218 A1 WO2018077218 A1 WO 2018077218A1
Authority
WO
WIPO (PCT)
Prior art keywords
focal length
current
depth
binocular camera
target object
Prior art date
Application number
PCT/CN2017/107850
Other languages
English (en)
French (fr)
Inventor
王靖雄
毛慧
浦世亮
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Priority to US16/345,418 priority Critical patent/US11209268B2/en
Priority to EP17865985.0A priority patent/EP3534109B1/en
Publication of WO2018077218A1 publication Critical patent/WO2018077218A1/zh

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
    • G01C3/10Measuring distances in line of sight; Optical rangefinders using a parallactic triangle with variable angles and a base of fixed length in the observation station, e.g. in the instrument
    • G01C3/14Measuring distances in line of sight; Optical rangefinders using a parallactic triangle with variable angles and a base of fixed length in the observation station, e.g. in the instrument with binocular observation at a single point, e.g. stereoscopic type
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/04Adaptation of rangefinders for combination with telescopes or binoculars
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/26Measuring arrangements characterised by the use of optical techniques for measuring angles or tapers; for testing the alignment of axes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/06Interpretation of pictures by comparison of two or more pictures of the same area
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/06Interpretation of pictures by comparison of two or more pictures of the same area
    • G01C11/12Interpretation of pictures by comparison of two or more pictures of the same area the pictures being supported in the same relative position as when they were taken
    • G01C11/14Interpretation of pictures by comparison of two or more pictures of the same area the pictures being supported in the same relative position as when they were taken with optical projection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/06Use of electric means to obtain final indication
    • G01C3/08Use of electric radiation detectors
    • G01C3/085Use of electric radiation detectors with electronic parallax measurement
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/32Measuring distances in line of sight; Optical rangefinders by focusing the object, e.g. on a ground glass screen
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/521Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/571Depth or shape recovery from multiple images from focus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • 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/698Control of cameras or camera modules for achieving an enlarged field of view, e.g. panoramic image capture
    • 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
    • H04N23/958Computational photography systems, e.g. light-field imaging systems for extended depth of field imaging
    • H04N23/959Computational photography systems, e.g. light-field imaging systems for extended depth of field imaging by adjusting depth of field during image capture, e.g. maximising or setting range based on scene characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds

Definitions

  • the present application relates to the field of video surveillance technologies, and in particular, to a depth measurement method and system.
  • image processing technology has been widely used in people's daily life.
  • people can achieve the purpose of measuring the depth of a target object by performing related processing on the acquired image.
  • the so-called depth of the target object refers to the vertical distance of the target object to the plane of the lens of the image acquisition device.
  • the same object is displaced between the images formed on the left and right eyes of the person. This displacement is called parallax.
  • the two imaging devices in the binocular camera are equivalent to the left and right eyes of the person. Therefore, the image formed by the same object on the two imaging devices also has parallax; meanwhile, according to the imaging principle, when When the depth between the object and the binocular camera is different, the resulting parallax will be different. Therefore, based on the relationship between parallax and depth, a depth measurement scheme is provided in the related art, which implements depth measurement based on the parallax principle of a binocular camera.
  • the measurement accuracy of the depth of the target object is inversely proportional to the square of the depth of the target object, that is, when the depth of the target object is larger, the measurement accuracy is lower; conversely, when the target object is The smaller the depth, the higher the measurement accuracy.
  • the purpose of the embodiments of the present application is to provide a depth measurement method and system to ensure the accuracy of depth measurement in various depth scenarios.
  • the embodiment of the present application discloses a depth measurement method applied to a first binocular camera having a zoom lens, the method comprising:
  • Determining whether the current focal length is the same as the current reference focal length if the current focal length is the same as the current reference focal length, determining that the current depth is the target depth of the target object, and if the current focal length is different from the current reference focal length, determining the current reference focal length as the current focal length And measuring a current depth of the target object according to the determined current focal length, and returning to perform the step of determining a current reference focal length corresponding to the current reference depth range according to the corresponding relationship between the preset depth range and the focal length.
  • the step of obtaining a current depth of the target object to be measured includes:
  • the current depth of the target object is measured in accordance with the preset focal length of the first binocular camera.
  • the first binocular camera is installed on the pan/tilt;
  • the step of obtaining a current depth of the target object to be measured includes:
  • the step of measuring a current depth of the target object according to the determined current focal length includes:
  • the current depth of the target object is measured in accordance with the determined current focal length, the actual distance between the left and right lenses of the first binocular camera, and the parallax of the first binocular camera.
  • the parallax of the first binocular camera is calculated based on a binocular matching principle.
  • the step of measuring the current depth of the target object includes:
  • L is the actual distance between the left and right lenses of the first binocular camera
  • f is the determined current focal length of the left and right lenses of the first binocular camera
  • ⁇ s is the parallax of the first binocular camera
  • the method before the step of determining the current reference focal length corresponding to the current reference depth range according to the preset relationship between the preset depth range and the focal length, the method further includes:
  • the horizontal movement angle and the vertical movement angle are: utilizing a geometric relationship between the first central pixel point and the second central pixel point And a horizontal direction offset angle and a vertical direction offset angle calculated by a positional relationship between the image capturing device and the first binocular camera;
  • the first central pixel point being a large field of view image of the target object a central point of the image area
  • the second central pixel is a center point of the large field of view image
  • the image acquisition device is a device having a large field of view, and the large field of view image is utilized by the image acquisition device The acquired image;
  • the shooting angle of the first binocular camera is adjusted according to the horizontal movement angle and the vertical movement angle such that the first binocular camera can position the target object within its field of view.
  • an embodiment of the present application further discloses a depth measurement system, where the system includes:
  • a first binocular camera for obtaining a current depth of the target object to be measured; determining a focal length when the current depth is measured as a current focal length; determining a current reference depth range according to a correspondence between the preset depth range and the focal length a current reference focal length; wherein the current reference depth range is a depth range in which the current depth is; determining whether the current focal length is the same as the current reference focal length; if the current focal length is the same as the current reference focal length, determining the current depth as the target object Target depth, if the current focal length is different from the current reference focal length, determining the current reference focal length as the current focal length, measuring the current depth of the target object according to the determined current focal length, and returning to perform the according to the preset depth range
  • the first binocular camera is configured to:
  • the current depth of the target object is measured in accordance with the preset focal length of the first binocular camera.
  • the first binocular camera is mounted on the pan/tilt head, and the depth measuring system further includes a second binocular camera having a fixed focus lens mounted on the pan/tilt base;
  • the first binocular camera is configured to obtain a current depth of the target object measured by the second binocular camera according to a fixed focal length.
  • the first binocular camera is configured to:
  • the current depth of the target object is measured in accordance with the determined current focal length, the actual distance between the left and right lenses of the first binocular camera, and the parallax of the first binocular camera.
  • the parallax of the first binocular camera is calculated based on a binocular matching principle.
  • the first binocular camera is specifically configured to:
  • L is the actual distance between the left and right lenses of the first binocular camera
  • f is the determined current focal length of the left and right lenses of the first binocular camera
  • ⁇ s is the parallax of the first binocular camera
  • the system further includes: an image capturing device mounted on the base of the pan/tilt, wherein the image capturing device is a device having a large field of view;
  • the image capturing device is configured to measure a horizontal moving angle and a vertical moving angle to be adjusted by the first binocular camera; wherein the horizontal moving angle and the vertical moving angle are: using a first central pixel point a geometric relationship between the second central pixel and a positional relationship between the image capturing device and the first binocular camera, and a horizontal offset angle and a vertical offset angle; a central pixel is a center point of the image area of the target object in the large field of view image, the second central pixel point is a center point of the large field of view image; and the large field of view image is utilized by the image capturing device The acquired image;
  • the first binocular camera is configured to obtain the horizontal movement angle and the vertical movement angle, and adjust a shooting angle of the first binocular camera according to the horizontal movement angle and the vertical movement angle,
  • the first binocular camera is enabled to be positioned to the target object within its field of view.
  • the image collection device is specifically configured to:
  • the horizontal movement angle and the vertical movement angle are calculated according to the target interest area center point and the large-view image center point.
  • the image acquisition device calculates the horizontal movement angle and the vertical movement angle according to the following expression:
  • ⁇ x is a projection distance of a line between the target interest area center point and the large-view image center point in the horizontal direction
  • ⁇ y is between the target interest area center point and the large-view image center point The projection distance of the line in the vertical direction.
  • the system further includes: a speckle projection device configured to form a randomly distributed speckle on the surface of the target object.
  • a depth measurement method and system provided by an embodiment of the present application is applied to a first binocular camera having a zoom lens.
  • the first binocular camera first obtains the current depth of the target object to be measured; then determines the focal length when the current depth is measured as the current focal length; and then determines according to the correspondence between the preset depth range and the focal length.
  • the current reference focal length corresponding to the current reference depth range whether the current focal length is the same as the current reference focal length; if the current focal length is the same as the current reference focal length, determining that the current depth is the target depth of the target object, if the current focal length and the current reference
  • the focal length is not the same, the current reference focal length is determined as the current focal length, the current depth of the target object is measured according to the determined current focal length, and the corresponding relationship between the preset depth range and the focal length is performed, and the current reference depth is determined.
  • the step of the current reference focal length corresponding to the range is not the same.
  • the measurement accuracy of the depth of the target object is related to the focal length of the first binocular camera of the target object, in addition to the depth of the target object, and the application of the embodiment of the present application is provided.
  • the solution When the solution is used for depth measurement, it can be targeted at different depths.
  • the range of target objects is measured with different focal lengths. It is not a binocular camera with a fixed-focus lens for depth measurement, which reduces the influence of the depth of the target object on the measurement accuracy and improves the accuracy of the depth measurement of the target object.
  • FIG. 1 is a schematic flowchart diagram of a depth measurement method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a geometric relationship between a target object and a first binocular camera according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart diagram of another depth measurement method according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram of a geometric relationship when calculating a horizontal movement angle and a vertical movement angle according to an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of a depth measurement system according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of installation of a diffractive optical device according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a binocular camera according to an embodiment of the present application.
  • the embodiment of the present application provides a depth measurement method and system.
  • a depth measuring method provided by an embodiment of the present application is applied to a first camera having a zoom lens Binocular camera.
  • the first binocular camera involved in the embodiment of the present application may be a single binocular camera.
  • the single binocular camera may have two lenses, two image sensors, and one
  • the overall device of the image processor may also be a binocular camera constructed by two monocular cameras.
  • the embodiment of the present application does not need to define the specific form of the first binocular camera.
  • the camera can be imaged through a lens, and the lens has a focal length. If the focal length of the lens is variable, such a lens can be called a zoom lens.
  • the lens of a SLR camera is a common zoom lens that can adjust the focal length of the lens by rotating the mechanical structure on the lens housing to achieve optical zoom shooting, so that the camera has different imaging features, such as being photographed. Zoom in, zoom out, etc.
  • the depth measurement method shown in FIG. 1 may include the following steps:
  • the current depth obtained here is only an initial measurement depth of the target object, and the accuracy of the current depth obtained at this time is often not high, so the current depth obtained at this time is not the final target object to be measured.
  • the target depth also needs to be followed by steps to obtain a target depth of the target object with high precision.
  • the current depth of the target object may be measured according to a preset focal length of the first binocular camera.
  • the first binocular camera is a binocular camera with a zoom lens, it is necessary to preset a focal length when performing depth measurement by using the first binocular camera, which is not required in the embodiment of the present application.
  • the value of the preset focal length is limited, and those skilled in the art need to set according to the specific conditions in the actual application.
  • the focal length of the first binocular camera can be set according to actual measurement experience, and the like.
  • the first binocular camera is mounted on the pan/tilt; correspondingly, the first binocular camera can obtain the current target object measured by the second binocular camera according to a fixed focal length. Depth; wherein the second binocular camera is mounted on a base of the pan/tilt head, and the second binocular camera is a binocular camera having a fixed focus lens.
  • the second binocular camera involved in the embodiment of the present application may be a single binocular camera.
  • the single binocular camera may have two lenses, two image sensors, and one
  • the overall device of the image processor may also be a binocular camera constructed by two monocular cameras.
  • the embodiment of the present application does not need to limit the specific form of the second binocular camera.
  • the second binocular camera with a fixed focus lens can be used to measure the current depth of the target object (ie, the initial measured depth), and then the first binocular camera can be measured by the second binocular camera. The current depth obtained.
  • the former does not need to add additional hardware devices, and the latter needs to add a second binocular camera, but it should be noted that the field of view of the binocular camera tends to become smaller as the focal length becomes larger. Therefore, when encountering a problem that the target object cannot be positioned within the field of view of the first binocular camera, the problem can be solved by adjusting the shooting angle of the first binocular camera, and the second binocular camera has a field of view.
  • the range is usually large, and therefore, the determination of the area where the target object is located by means of the second binocular camera having the fixed focus lens makes it difficult to encounter the problem that the target object cannot be positioned within the field of view. Therefore, it is necessary to select an appropriate implementation method according to the specific situation in the actual application to measure the initial measurement depth of the target object.
  • S102 Determine a focal length when measuring the current depth as a current focal length.
  • the focal length when the initial measurement depth is measured may be obtained correspondingly. It should be noted that the target object may be measured in this step.
  • the focal length at the current depth ie, the initial measured depth
  • the corresponding current focal length is the preset focal length when the initial measured depth is measured
  • the corresponding current focal length is a fixed focal length corresponding to the fixed focus lens of the second binocular camera.
  • the preset focal length when measuring the initial measurement depth is a preset focal length value, for example, it may be based on actual measurement experience by those skilled in the art.
  • the value of the focal length value is set. It should be noted that the specific value of the preset focal length is not required to be limited in the embodiment of the present application.
  • S103 Determine a current reference focal length corresponding to the current reference depth range according to a preset correspondence between the depth range and the focal length; wherein the current reference depth range is a depth range in which the current depth is located.
  • this step pre-divides different reference depth ranges for different depth scenes, and sets a reference focal length for each reference depth range corresponding to the reference depth range.
  • the embodiment of the present application does not need to define the manner in which the reference depth range is divided.
  • the number of reference depth ranges and the size of the depth range are not required to be defined, and the reference focal length corresponding to each reference depth range is not required.
  • the specific values are limited, and those skilled in the art can make reasonable settings according to the specific conditions in the actual application, for example, the specific value of the reference focal length corresponding to each reference depth range can be set according to the actual measurement experience.
  • the current reference focal length corresponding to the current depth may be determined according to the relationship between the preset depth range and the focal length. For subsequent processing according to the determined current reference focal length.
  • the current reference depth range herein refers to the depth range in which the current depth is located. It should be noted that the current depth herein may be the current depth determined by the initial measurement depth obtained by the first binocular camera, and It may be the current depth (non-initial measured depth) measured again after adjusting the focal length of the zoom lens of the first binocular camera.
  • step S104 Determine whether the current focal length is the same as the current reference focal length: if the current focal length is the same as the current reference focal length, step S105 is performed, and if the current focal length is different from the current reference focal length, step S106 is performed.
  • the current reference focal length needs to be compared with the current focal length when measuring the current depth. So that the subsequent steps obtain the target depth for the target object based on the comparison result.
  • S105 Determine that the current depth is the target depth of the target object.
  • the current depth corresponding to the current focal length may be directly determined as the target depth of the target object.
  • Step S106 Determine the current reference focal length as the current focal length, and measure according to the determined current focal length. Determining the current depth of the target object, and returning to step S103 to continue performing the step of determining the current reference focal length corresponding to the current reference depth range according to the corresponding relationship between the preset depth range and the focal length.
  • the current focal length is different from the current reference focal length
  • the current depth cannot be directly determined as the target depth of the target object
  • the current reference focal length needs to be determined as the current focal length
  • the first binocular camera is further It is necessary to measure the current depth of the target object again according to the determined current focal length, and then the first binocular camera needs to determine the current reference focal length corresponding thereto according to the current depth obtained by the re-measurement, and perform the determination of the current reference at this time again.
  • the step of whether the focal length is the same as the current focal length until the determination result is the same, the target depth of the target object is obtained in the manner of step S105.
  • step S103 to step S106 this is a cyclic process in which the current depth of the target object is adjusted by comparing the current focal length with the current reference focal length.
  • Corresponding current focal length until the current focal length is the same as the current reference focal length, and since the reference focal length corresponding to each reference depth range is generally preset according to a higher measurement precision, therefore, the current focal length and the current reference focal length In the same case, the measurement accuracy of the current depth measured according to the current focal length is correspondingly higher, and the measurement needs can be satisfied. Therefore, the current depth at this time can be determined as the target depth corresponding to the target object.
  • the first binocular camera mentioned here can be installed on the pan/tilt which can adjust the shooting angle of the camera, so that when the focal length of the first binocular camera is adjusted and the field of view becomes small, The adjustment of the shooting angle of the camera is achieved by rotating the pan/tilt, thereby enabling positioning of the target object within the field of view of the first binocular camera.
  • the gimbals listed herein are merely illustrative and should not be construed as limiting the application.
  • the target object may be measured according to the determined current focal length, the actual distance between the left and right lenses of the first binocular camera, and the parallax of the first binocular camera.
  • the current depth In one implementation, the parallax of the first binocular camera is calculated based on the binocular matching principle. It should be noted that the manner of calculating the parallax of the first binocular camera based on the binocular matching principle mentioned herein is merely an example, and should not constitute a limitation on the specific manner of calculating the parallax.
  • the following expression can be obtained, and the current depth H of the target object can be measured according to the following expression:
  • L is the actual distance between the left and right lenses of the first binocular camera
  • f is the determined current focal length of the left and right lenses of the first binocular camera
  • ⁇ s is the parallax of the first binocular camera
  • sl is the distance between the imaging point of the target object on the left camera of the first binocular camera and the image center point of the image captured by the left camera
  • sl is the target object in the first binocular camera. The distance between the image point on the right camera and the center point of the image of the image captured by the right camera.
  • the absolute error of the current depth of the first binocular camera can be obtained according to the first derivative of the above expression, and the first derivative expression is as follows:
  • the absolute error when measuring the target object is proportional to the depth of the target object, and inversely proportional to the focal length of the first binocular camera when measuring the depth.
  • the absolute error value is also large, and accordingly, the measurement accuracy of the depth of the target object is lower;
  • the measurement accuracy of the depth of the target object is higher.
  • the measurement accuracy of the depth of the target object is related to the focal length of the first binocular camera of the target object, and the solution provided by the embodiment of the present application is applied.
  • depth measurement it is possible to select different focal lengths for target objects in different depth ranges for measurement, instead of using a binocular camera with a fixed focus lens for depth measurement, thereby reducing the influence of the depth of the target object on the measurement accuracy, and improving The accuracy of the target object depth measurement.
  • the step of determining the correspondence between the depth range and the focal length may further include the following steps:
  • the horizontal moving angle and the vertical moving angle are: utilizing a geometric relationship between the first central pixel point and the second central pixel point, and the image capturing device and the first double a horizontal direction offset angle and a vertical direction offset angle calculated by a positional relationship between the eye cameras;
  • the first central pixel point being a center point of the image area of the target object in the large field of view image
  • the two central pixel points are the center point of the large field of view image;
  • the image capturing device is a device having a large field of view image, and the large field of view image is an image captured by the image capturing device.
  • the image capturing device mentioned here may be a second binocular camera with a fixed focal length mounted on the base of the pan/tilt, or a monocular camera mounted on the base of the pan/tilt. It should be noted that the present application The embodiment does not require a limitation on the specific form of the image capture device. In one embodiment of the present application, the second binocular camera or the monocular camera needs to have a large field of view in order to be able to locate an image region corresponding to the target object in the captured large-view image.
  • the image capture device on the pan/tilt base can be a monocular camera with a wide-angle lens.
  • S108 Adjust a shooting angle of the first binocular camera according to the horizontal moving angle and a vertical moving angle, so that the first binocular camera can position the target object within a field of view thereof.
  • the larger the focal length of the zoom lens the smaller the field of view that the camera can capture, without changing the size of the target surface of the image sensor. Therefore, while increasing the measurement accuracy of the depth of the target object by increasing the focal length of the variable zoom lens, it is also necessary to consider the problem that the target range cannot be positioned within the field of view due to the reduced field of view.
  • steps S107-S108 may be performed before steps S101-S102, or steps S101-S102 may be performed. Steps S107-S108 are then performed.
  • steps S107 and S108 that when the current depth of the target object is measured by the first binocular camera, the horizontal deviation angle of the first binocular camera from the center point of the target object can be obtained first (ie, ⁇ x in FIG. 4 ). Offset the angle from the vertical direction (ie, ⁇ y in Fig. 4), and then adjust the first binocular camera according to the obtained horizontal movement angle and vertical movement angle, thereby enabling the first binocular camera to be in the field of view
  • the target object is located within the range. It can be seen that when the depth measurement is performed by using the solution provided by the method embodiment shown in FIG. 3 , in addition to all the advantages of the method embodiment shown in FIG. 1 , it can be solved due to the smaller field of view of the first binocular camera. The problem of not being able to locate the target object within its field of view.
  • the embodiment of the present application further provides a depth measurement system.
  • the depth measurement system provided by the embodiment of the present application is further described below.
  • a depth measurement system may include: a first binocular camera for obtaining a current depth of a target object to be measured; determining a focal length when measuring the current depth as a current focal length; according to a preset depth Corresponding relationship between the range and the focal length, determining a current reference focal length corresponding to the current reference depth range; wherein the current reference depth range is a depth range in which the current depth is located; determining whether the current focal length is the same as the current reference focal length; if the current focal length is If the current reference focal length is the same, determining that the current depth is the target depth of the target object.
  • the current focal length is different from the current reference focal length, determining the current reference focal length as the current focal length, and measuring the target object according to the determined current focal length. The current depth, and returning to perform the step of determining the current reference focal length corresponding to the current reference depth range according to the correspondence between the preset depth range and the focal length.
  • the measurement accuracy of the depth of the target object is related to the focal length of the first binocular camera of the target object, in addition to the depth of the target object, and the application of the embodiment of the present application is provided.
  • different focal lengths can be selected for the target objects in different depth ranges.
  • the binocular camera with fixed focus lens is not used for depth measurement, which reduces the influence of the depth of the target object on the measurement accuracy. The accuracy of the depth measurement of the target object.
  • the first binocular camera is used to:
  • the current depth of the target object is measured in accordance with the preset focal length of the first binocular camera.
  • the first binocular camera is mounted on a pan/tilt, and the depth measuring system further includes a second pair of fixed focus lenses mounted on the pan/tilt base.
  • Eye camera The first binocular camera is configured to obtain a current depth of the target object measured by the second binocular camera according to a fixed focal length.
  • first binocular camera and the second binocular camera involved in the embodiments of the present application may be a single binocular camera or a binocular built by two monocular cameras.
  • the camera does not need to define the specific form of the first binocular camera and the second binocular camera in the embodiment of the present application.
  • the first binocular camera is used to:
  • the current depth of the target object is measured in accordance with the determined current focal length, the actual distance between the left and right lenses of the first binocular camera, and the parallax of the first binocular camera.
  • the parallax of the first binocular camera is calculated based on the binocular matching principle.
  • the first binocular camera is specifically configured to:
  • L is the actual distance between the left and right lenses of the first binocular camera
  • f is the determined current focal length of the left and right lenses of the first binocular camera
  • ⁇ s is the parallax of the first binocular camera
  • the system may further include an image collection device mounted on the base of the pan/tilt, and the image collection device is a device having a large field of view.
  • the above-mentioned image acquisition device mounted on the base of the pan-tilt can be a single monocular camera or a second binocular camera.
  • the image acquisition device is not required in the embodiment of the present application.
  • the specific form is limited, and those skilled in the art need to make reasonable settings according to the specific conditions in the actual application.
  • the image capture device can be a monocular camera with a wide-angle lens.
  • the image capturing device is configured to measure a horizontal moving angle and a vertical moving angle to be adjusted by the first binocular camera.
  • the horizontal movement angle and the vertical movement angle are: a geometric relationship between the first central pixel point and the second central pixel point, and between the image capturing device and the first binocular camera The horizontal direction offset angle and the vertical direction offset angle calculated by the positional relationship;
  • the first central pixel is a center point of the image area of the target object in the large-view image
  • the second central pixel is a center point of the large-view image
  • the large-view image is the image Capture the image captured by the device.
  • the first binocular camera is configured to obtain the horizontal movement angle and the vertical movement angle, and adjust a shooting angle of the first binocular camera according to the horizontal movement angle and the vertical movement angle,
  • the first binocular camera is enabled to be positioned to the target object within its field of view.
  • the image collection device is specifically configured to:
  • a large-view image including the target object can be obtained by the image capturing device, and according to the image size of the large-view image, the center point of the large-view image can be determined. It should be noted that the calculation of the center point is only It is related to the image size of the large-view image and is not affected by the image content of the large-view image.
  • the target object region corresponding to the target object in the large-view image may be located based on the image feature of the target object.
  • the face image region in the large-view image may be located based on the face feature, and may also be based on Vehicle features to locate vehicle image regions in large field of view images, and the like. It should be noted that the specific manner of locating the target interest area is only used as an example, and should not be construed as limiting the embodiments of the present application.
  • a center point of the minimum circumscribed rectangle corresponding to the target interest area may be determined as a center point of the target interest area, and a pixel may be randomly selected by a random algorithm and determined as a target interest area. Center point. It should be noted that the manner of determining the center point of the target interest area is listed as an example only, and should not be construed as limiting the embodiment of the present application.
  • the image capturing device may calculate the horizontal moving angle and the vertical moving angle according to the following expression:
  • ⁇ x is a projection distance of a line between the target interest area center point and the large-view image center point in the horizontal direction
  • ⁇ y is between the target interest area center point and the large-view image center point The projection distance of the line in the vertical direction.
  • the system may further include: a speckle projection device configured to form a randomly distributed speckle on the surface of the target object.
  • the speckle projection apparatus described above may include: an infrared laser emitter, a diffractive optical element, and a zoom lens.
  • the infrared light emitted by the infrared laser emitter passes through the diffractive optical element to form a randomly distributed speckle on the surface of the target object.
  • the speckle projection device can be located adjacent to the first binocular camera.
  • the first binocular camera needs to have the function of receiving infrared light in addition to receiving visible light.
  • the diffractive optical element of the speckle projection device can be mounted in front of the infrared laser emitter, and the zoom lens of the speckle projection device can be mounted in front of the diffractive optical element.
  • the infrared laser emitter emits infrared light or infrared laser light outward
  • the emitted infrared light or infrared laser light can be struck on the diffractive optical element and diffracted, thereby forming a speckle redirection with a certain emission angle.
  • adjustment of the exit angle of the formed speckle can be achieved by a zoom lens mounted in front of the diffractive optical element, thereby making the exit angle of the speckle match the field of view of the first binocular camera, adjusting The coverage of the speckles, thereby achieving the addition of texture to the target object within the speckle coverage.
  • the method for measuring the depth of the target object is performed based on the geometric relationship between the parallax and the depth of the target object, and the parallax of the target object can be matched by binocular
  • the algorithm calculates, specifically, the calculation of the target object in the left and right images captured by the left and right cameras of the first binocular camera.
  • the binocular matching algorithm can be divided into two categories: global matching algorithm and local matching algorithm. Compared with the global matching algorithm, the local matching algorithm has low computational complexity and simple implementation, but has less texture for the captured image. In terms of the image area, it is often encountered that the target object in the left and right images is not successfully matched.
  • a randomly distributed speckle can be formed on the surface of the target object, thereby increasing the texture of the image region corresponding to the target object in the captured image, which is beneficial to improve the The success rate and accuracy of matching the target object in the left and right images captured by a binocular camera.
  • the embodiment of the present application further provides a binocular camera, as shown in FIG. 7, comprising: a housing 701, a processor 702, a memory 703, a circuit board 704, a power supply circuit 705, and a zoom lens 706, wherein the circuit board 704 Placed inside the space enclosed by the housing 701, the processor 702 and the memory 703 are disposed on the circuit board 704; the power supply circuit 705 is used to supply power to the respective circuits or devices of the binocular camera; and the memory 703 is used to store the executable program code.
  • the zoom lens 706 is used to acquire an image and adjust the focal length; the processor 702 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 703 for executing the depth measuring method, the method include:
  • the current focal length is the same as the current reference focal length, determining that the current depth is the target depth of the target object; if the current focal length is different from the current reference focal length, determining the current reference focal length as the current focal length, according to the determined current focal length, the measurement center Determining the current depth of the target object, and returning to perform the step of determining the current reference focal length corresponding to the current reference depth range according to the correspondence between the preset depth range and the focal length.
  • the binocular camera can be a separate binocular camera, for example, the separate binocular camera can Therefore, the overall device has two lenses, two image sensors and one image processor, and can also be a binocular camera constructed by two monocular cameras.
  • the embodiment of the present application does not need to be specific to the binocular camera. The form is limited.
  • the measurement accuracy of the depth of the target object is related to the focal length of the first binocular camera that measures the target object, in addition to the depth of the target object; therefore, the embodiment shown in FIG. 8 of the present application is applied.
  • the depth measurement it is possible to select different focal lengths for the target objects in different depth ranges, and the depth measurement is not performed by the binocular camera with the fixed focus lens, thereby reducing the influence of the depth of the target object on the measurement accuracy. Improve the accuracy of the depth measurement of the target object.
  • the embodiment of the present application further provides an executable program code, where the executable program code is used to execute the depth measurement method, and the method includes:
  • the current focal length is the same as the current reference focal length, determining that the current depth is the target depth of the target object; if the current focal length is different from the current reference focal length, determining the current reference focal length as the current focal length, according to the determined current focal length, the measurement center Determining the current depth of the target object, and returning to perform the step of determining the current reference focal length corresponding to the current reference depth range according to the correspondence between the preset depth range and the focal length.
  • the measurement accuracy of the depth of the target object is related to the focal length of the first binocular camera that measures the target object, in addition to the depth of the target object; therefore, the solution provided by the embodiment shown in the present application is applied.
  • depth measurement it is possible to select different focal lengths for target objects in different depth ranges for measurement, instead of using a binocular camera with a fixed focus lens for depth measurement, thereby reducing the influence of the depth of the target object on the measurement accuracy, and improving aims The accuracy of object depth measurement.
  • the embodiment of the present application further provides a storage medium for storing executable program code, the executable program code is configured to be executed to execute the depth measurement method, and the method includes:
  • the current focal length is the same as the current reference focal length, determining that the current depth is the target depth of the target object; if the current focal length is different from the current reference focal length, determining the current reference focal length as the current focal length, according to the determined current focal length, the measurement center Determining the current depth of the target object, and returning to perform the step of determining the current reference focal length corresponding to the current reference depth range according to the correspondence between the preset depth range and the focal length.
  • the measurement accuracy of the depth of the target object is related to the focal length of the first binocular camera that measures the target object, in addition to the depth of the target object; therefore, the solution provided by the embodiment shown in the present application is applied.
  • depth measurement it is possible to select different focal lengths for target objects in different depth ranges for measurement, instead of using a binocular camera with a fixed focus lens for depth measurement, thereby reducing the influence of the depth of the target object on the measurement accuracy, and improving The accuracy of the target object depth measurement.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Electromagnetism (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Optics & Photonics (AREA)
  • Computing Systems (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

一种深度测量方法及系统,应用于具有可变焦镜头的第一双目相机。方法包括:获得目标物体的当前深度(S101);确定测量当前深度时的焦距为当前焦距(S102);根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距(S103);判断当前焦距与当前参考焦距是否相同(S104);若相同则确定当前深度为目标物体的目标深度(S105),否则将当前参考焦距确定为当前焦距,按照所确定的当前焦距测量目标物体的当前深度(S106),并返回执行根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤(S103)。这种方法及系统针对处于不同深度范围的目标物体选用不同的焦距进行测量,提高了目标物体深度测量的精准度。

Description

一种深度测量方法及系统
本申请要求于2016年10月31日提交中国专利局、申请号为201610928328.9、发明名称为“一种深度测量方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及视频监控技术领域,特别是涉及一种深度测量方法及系统。
背景技术
目前,图像处理技术在人们的日常生活中得到了广泛的应用,例如,人们可以通过对所采集图像进行相关的处理,进而达到测量目标物体的深度的目的。所谓的目标物体的深度,是指目标物体到图像采集设备的镜头所在平面的垂直距离。
由于人的眼睛具有一定的间隙,因此同一物体在人的左眼和右眼上所成的像之间是有位移的,这个位移被称作视差。某种程度上,双目相机中的两个成像器件等同于人的左眼和右眼,因此,同一物体在这两个成像器件上所成的像也有视差;同时,根据成像原理可知,当物体与双目相机之间的深度不同时,所产生的视差也会不同。因此,基于视差与深度之间的关系,相关技术中提供了一种深度测量方案,该方案是基于双目相机的视差原理来实现深度测量的。但是,根据数学推导关系可知,目标物体的深度的测量精度与目标物体的深度的平方成反比关系,也就是说,当目标物体的深度越大时,测量精度越低;反之,当目标物体的深度越小时,测量精度越高。
由以上可见,如何保证各种深度场景下的深度测量的精准度是一个亟待解决的问题。
发明内容
本申请实施例的目的在于提供一种深度测量方法及系统,以保证各种深度场景下的深度测量的精准度。
为达到上述目的,本申请实施例公开了一种深度测量方法,应用于具有可变焦镜头的第一双目相机,所述方法包括:
获得待测量的目标物体的当前深度;
确定测量所述当前深度时的焦距为当前焦距;
根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围;
判断当前焦距与当前参考焦距是否相同:若当前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度,若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
可选的,所述获得待测量的目标物体的当前深度的步骤,包括:
按照所述第一双目相机的预设焦距,测量目标物体的当前深度。
可选的,所述第一双目相机安装在云台上;
所述获得待测量的目标物体的当前深度的步骤,包括:
获得第二双目相机按照固定焦距测量出的目标物体的当前深度;其中,所述第二双目相机安装在所述云台的基座上,且所述第二双目相机为具有定焦镜头的双目相机。
可选的,所述按照所确定的当前焦距,测量所述目标物体的当前深度的步骤,包括:
按照所确定的当前焦距、所述第一双目相机的左右镜头间的实际距离以及所述第一双目相机的视差,测量所述目标物体的当前深度。
可选的,所述第一双目相机的视差是基于双目匹配原理计算得到的。
可选的,在所述左右镜头的焦距相同的情况下,所述按照所确定的当前焦距、所述第一双目相机的左右镜头间的实际距离以及所述第一双目相机的视差,测量所述目标物体的当前深度的步骤,包括:
按照以下表达式,获取所述目标物体的当前深度H:
Figure PCTCN2017107850-appb-000001
其中,L为所述第一双目相机的左右镜头间的实际距离,f为所确定出的所述第一双目相机的左右镜头的当前焦距,Δs为第一双目相机的视差。
可选的,所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤之前,还包括:
获得所述第一双目相机水平移动角度和竖直移动角度;其中,所述水平移动角度和所述竖直移动角度为:利用第一中心像素点与第二中心像素点之间的几何关系,以及图像采集设备与所述第一双目相机之间的位置关系计算得到的水平方向偏移角度和竖直方向偏移角度;所述第一中心像素点为所述目标物体在大视野图像中的图像区域的中心点,所述第二中心像素点为所述大视野图像的中心点;所述图像采集设备为具有大视野范围的设备,所述大视野图像为利用所述图像采集设备所采集到的图像;
按照所述水平移动角度和竖直移动角度,调节所述第一双目相机的拍摄角度,以使得所述第一双目相机在其视野范围内能够定位到所述目标物体。
为达到上述目的,本申请实施例还公开了一种深度测量系统,所述系统包括:
第一双目相机,用于获得待测量的目标物体的当前深度;确定测量所述当前深度时的焦距为当前焦距;根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围;判断当前焦距与当前参考焦距是否相同;若当前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度,若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
可选的,所述第一双目相机,用于:
按照所述第一双目相机的预设焦距,测量目标物体的当前深度。
可选的,所述第一双目相机安装在云台上,所述深度测量系统还包括安装在所述云台基座上、具有定焦镜头的第二双目相机;其中,
所述第一双目相机,用于获得所述第二双目相机按照固定焦距测量出的目标物体的当前深度。
可选的,所述第一双目相机,用于:
按照所确定的当前焦距、所述第一双目相机的左右镜头间的实际距离以及所述第一双目相机的视差,测量所述目标物体的当前深度。
可选的,所述第一双目相机的视差是基于双目匹配原理计算得到的。
可选的,所述第一双目相机,具体用于:
按照以下表达式,获取所述目标物体的当前深度H:
Figure PCTCN2017107850-appb-000002
其中,L为所述第一双目相机的左右镜头间的实际距离,f为所确定出的所述第一双目相机的左右镜头的当前焦距,Δs为第一双目相机的视差。
可选的,所述系统还包括:安装于云台基座上的图像采集设备,所述图像采集设备为具有大视野范围的设备;其中,
所述图像采集设备,用于测量所述第一双目相机待调节的水平移动角度和竖直移动角度;其中,所述水平移动角度和所述竖直移动角度为:利用第一中心像素点与第二中心像素点之间的几何关系,以及所述图像采集设备与所述第一双目相机之间的位置关系计算得到的水平方向偏移角度和竖直方向偏移角度;所述第一中心像素点为所述目标物体在大视野图像中的图像区域的中心点,所述第二中心像素点为所述大视野图像的中心点;所述大视野图像为利用所述图像采集设备所采集到的图像;
所述第一双目相机,用于获得所述水平移动角度和所述竖直移动角度,并按照所述水平移动角度和竖直移动角度,调节所述第一双目相机的拍摄角度,以使得所述第一双目相机在其视野范围内能够定位到所述目标物体。
可选的,所述图像采集设备,具体用于:
获得包含所述目标物体的大视野图像,并确定所述大视野图像中心点;
按照预设的兴趣区域定位规则,从所述大视野图像中定位到目标兴趣区域;
基于预设的兴趣区域中心点确定规则,确定所述目标兴趣区域中心点;
根据所述目标兴趣区域中心点和所述大视野图像中心点,计算所述水平移动角度和所述竖直移动角度。
可选的,所述图像采集设备按照以下表达式,计算所述水平移动角度和所述竖直移动角度:
Figure PCTCN2017107850-appb-000003
Figure PCTCN2017107850-appb-000004
其中,Δx为所述目标兴趣区域中心点与所述大视野图像中心点之间的连线在水平方向的投影距离,Δy为所述目标兴趣区域中心点与所述大视野图像中心点之间的连线在竖直方向的投影距离。
可选的,所述系统还包括:散斑投射设备,用于在所述目标物体表面形成随机分布的散斑。
本申请实施例提供的一种深度测量方法及系统,应用于具有可变焦镜头的第一双目相机。在进行深度测量时,第一双目相机首先获得待测量的目标物体的当前深度;然后确定测量所述当前深度时的焦距为当前焦距;接着根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;再判断当前焦距与当前参考焦距是否相同;若当前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度,若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
需要说明的是,根据数学推导关系可知,目标物体的深度的测量精度除了与目标物体的深度有关外,还与测量该目标物体的第一双目相机的焦距有关,应用本申请实施例提供的方案进行深度测量时,能够针对处于不同深度 范围的目标物体选用不同的焦距进行测量,并非采用具有定焦镜头的双目相机进行深度测量,从而降低了目标物体的深度对于测量精度的影响,提高了目标物体深度测量的精准度。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种深度测量方法的流程示意图;
图2为本申请实施例提供的一种目标物体与第一双目相机之间的几何关系示意图;
图3为本申请实施例提供的另一种深度测量方法的流程示意图;
图4为本申请实施例提供的一种计算水平移动角度和竖直移动角度时的几何关系示意图;
图5为本申请实施例提供的一种深度测量系统的结构示意图;
图6为本申请实施例提供的一种衍射光学器件的安装示意图;
图7为本申请实施例提供的一种双目相机的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为保证各种深度场景下的深度测量的准确度,本申请实施例提供了一种深度测量方法及系统。
下面先对本申请实施例提供的一种深度测量方法进行下介绍。
本申请实施例提供的一种深度测量方法,应用于具有可变焦镜头的第一 双目相机。
需要说明的是,本申请实施例中所涉及到的第一双目相机既可以是一个单独的双目相机,例如,该单独的双目相机可以是具有两个镜头、两个图像传感器和一个图像处理器的整体器件,还可以是由两个单目相机搭建而成的双目相机,本申请实施例并不需要对第一双目相机的具体形式进行限定。
需要说明的是,相机通过透镜可以成像,而透镜是具有焦距的,如果镜头的焦距是可变的,那么这样的镜头就可以称之为变焦镜头。举例而言,单反相机的镜头就是一种常见的可变焦镜头,可以通过旋转镜头外壳上的机械结构来调节镜头的焦距,实现光学变倍拍摄,从而使得相机具有不同的成像特征,例如被拍摄对象的放大、缩小等等。
具体的,图1所示的深度测量方法可以包括以下步骤:
S101:获得待测量的目标物体的当前深度。
需要强调的是,这里所获得的当前深度,仅仅是目标物体的一个初始测量深度,此时获得的当前深度的精度往往不高,所以此时获得的当前深度并不是所要测量的目标物体最终的目标深度,还需要通过后续步骤来获得高精度的目标物体的目标深度。
另外,获得待测量的目标物体的当前深度的方式可以有多种。例如,一种实现方式中,可以按照所述第一双目相机的预设焦距,测量目标物体的当前深度。
需要说明的是,由于第一双目相机为具有可变焦镜头的双目相机,因此,在利用该第一双目相机进行深度测量时需要预先设定一个焦距,本申请实施例并不需要对该预设焦距的数值进行限定,本领域内的技术人员需要根据实际应用中的具体情况进行设置,例如,可以根据实际测量经验设置该第一双目相机的焦距,等等。
又如,另一种实现方式中,所述第一双目相机安装在云台上;相应的,所述第一双目相机可以获得第二双目相机按照固定焦距测量出的目标物体的当前深度;其中,所述第二双目相机安装在所述云台的基座上,且所述第二双目相机为具有定焦镜头的双目相机。
需要说明的是,本申请实施例中所涉及到的第二双目相机既可以是一个单独的双目相机,例如,该单独的双目相机可以是具有两个镜头、两个图像传感器和一个图像处理器的整体器件,还可以是由两个单目相机搭建而成的双目相机,本申请实施例也不需要对第二双目相机的具体形式进行限定。
需要说明的是,该实现方式中可以利用具有定焦镜头的第二双目相机来测量目标物体的当前深度(即初始测量深度),然后第一双目相机可以获得由第二双目相机测量得到的当前深度。
由上述两种实现方式可见,前者不需要额外增加硬件设备,而后者需要增加第二双目相机,但是需要说明的是,双目相机的视野范围往往会随着焦距的变大而变小,因此,在遇到无法在第一双目相机的视野范围内定位到目标物体的问题时,可以通过对第一双目相机的拍摄角度进行调节来解决该问题,而由于第二双目相机视野范围通常较大,因此,借助于具有定焦镜头的第二双目相机进行目标物体所在区域的确定,不容易遇到无法在视野范围内定位到目标物体的问题。因此,需要根据实际应用中的具体情况选择合适的实现方式进行目标物体的初始测量深度的测量。
需要强调的是,上述获得待测量的目标物体的当前深度的具体方式仅仅作为示例,并不应该构成对本申请实施例的限定。
S102:确定测量所述当前深度时的焦距为当前焦距。
具体的,在第一双目相机获得目标物体的当前深度(即初始测量深度)时,可以相应的获得测量该初始测量深度时的焦距,需要说明的是,本步骤中可以将测量该目标物体的当前深度(即初始测量深度)时的焦距确定为当前焦距,具体的,当利用第一双目相机测量获得初始测量深度时,对应的当前焦距为测量该初始测量深度时的预设焦距,当利用第二双目相机测量该初始测量深度时,对应的当前焦距为第二双目相机的定焦镜头对应的固定焦距。
另外,对于利用第一双目相机获得初始测量深度的情况而言,测量该初始测量深度时的预设焦距是预先设置的一个焦距数值,例如,可以是本领域内的技术人员根据实际测量经验值而设置的焦距数值,还需要说明的是,本申请实施例并不需要对该预设焦距的具体数值进行限定。
S103:根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围。
需要说明的是,本步骤预先针对不同的深度场景划分出不同的参考深度范围,并且针对每一参考深度范围设置一个参考焦距与该参考深度范围相对应。当然,本申请实施例并不需要对参考深度范围的划分方式进行限定,如不需要对参考深度范围的数量以及深度范围的大小进行限定,也不需要对每一参考深度范围对应的参考焦距的具体数值进行限定,本领域内的技术人员可以根据实际应用中的具体情况进行合理的设置,如可以根据实际测量经验设置每一参考深度范围所对应的参考焦距的具体数值。
具体的,在第一双目相机获得针对目标物体的当前深度以及与该深度对应的当前焦距后,可以根据预设的深度范围与焦距的关系,来确定该当前深度所对应的当前参考焦距,以便后续根据所确定出的当前参考焦距进行处理。
具体的,这里的当前参考深度范围指的是当前深度所处的深度范围,需要说明的是,这里的当前深度可以是将第一双目相机获得的初始测量深度所确定为的当前深度,还可以是对第一双目相机的可变焦镜头的焦距进行调节后再次测量得到的当前深度(非初始测量深度)。
S104:判断当前焦距与当前参考焦距是否相同:若当前焦距与当前参考焦距相同,则执行步骤S105,若当前焦距与当前参考焦距不相同,则执行步骤S106。
具体的,根据预设的深度范围与焦距的对应关系,确定出当前深度对应的当前参考深度范围所对应的当前参考焦距之后,需要将当前参考焦距与测量该当前深度时的当前焦距进行比较,以便后续步骤根据比较结果来得到针对目标物体的目标深度。
S105:确定当前深度为所述目标物体的目标深度。
具体的,在判断当前焦距与当前参考焦距相同的情况下,可以直接将该当前焦距对应的当前深度确定为目标物体的目标深度。
S106:将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量 所述目标物体的当前深度,并返回步骤S103继续执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
具体的,在判断当前焦距与当前参考焦距不相同的情况下,不能直接将当前深度确定为目标物体的目标深度,还需要将当前参考焦距确定为当前焦距,并且,该第一双目相机还需要按照所确定出的当前焦距,再次测量该目标物体的当前深度,然后第一双目相机需要根据该再次测量得到的当前深度确定与其对应的当前参考焦距,并再次执行判断此时的当前参考焦距与当前焦距是否相同的步骤,直至判断结果为相同时,按照步骤S105的方式来获得该目标物体的目标深度。
需要说明的是,从步骤S103至步骤S106可以看出,这是一个循环的过程,在此过程中,通过当前焦距与当前参考焦距之间的比较,来调节测量该目标物体的当前深度时所对应的当前焦距,直至该当前焦距与该当前参考焦距相同,又由于每一参考深度范围所对应的参考焦距通常是按照较高的测量精度来预先设置的,因此,在当前焦距与当前参考焦距相同的情况下,按照当前焦距所测量出的当前深度的测量精度相应的较高,能够满足测量需要,因此,可以将此时的当前深度确定为目标物体对应的目标深度。
还需要说明的是,这里提及的第一双目相机可以安装于可调节相机的拍摄角度的云台之上,这样,当调节第一双目相机的焦距而带来视野范围变小时,可以通过转动云台实现相机的拍摄角度的调整,从而使得能够在第一双目相机的视野范围内定位到该目标物体。当然,这里所列举的云台仅仅是举例说明,并不应该构成对本申请的限定。
作为本申请实施例的一种具体实现方式,可以按照所确定的当前焦距、所述第一双目相机的左右镜头间的实际距离以及所述第一双目相机的视差,测量所述目标物体的当前深度。一种实现方式中,所述第一双目相机的视差是基于双目匹配原理计算得到的。需要说明的是,这里提及的基于双目匹配原理计算得到第一双目相机的视差的方式仅仅作为示例,并不应该构成对计算视差的具体方式的限定。
更为具体的,根据图2所示的几何关系,可以得到如下表达式,并且可以按照如下表达式来测量所述目标物体的当前深度H:
Figure PCTCN2017107850-appb-000005
其中,L为所述第一双目相机的左右镜头间的实际距离,f为所确定出的所述第一双目相机的左右镜头的当前焦距,Δs为第一双目相机的视差,Δs为sl与sr之和,sl为目标物体在第一双目相机的左相机上的成像点与左相机所采集图像的图像中心点之间的距离,sl为目标物体在第一双目相机的右相机上的成像点与右相机所采集图像的图像中心点之间的距离。
需要说明的是,上述列举的表达式为根据几何关系推导得到的,本申请实施例并不需要对测量该目标物体的当前深度的具体方式进行限定,本领域内的技术人员需要根据实际应用中的具体情况进行合理的设置。
相应的,可以根据对上述表达式求一阶导数的方式来获得第一双目相机测量当前深度的绝对误差,其一阶导数表达式如下:
Figure PCTCN2017107850-appb-000006
从上述绝对误差表达式可以看出,测量目标物体时的绝对误差正比于该目标物体的深度,反比于测量该深度时第一双目相机对应的焦距。具体的,一方面,当测量深度越大时,绝对误差的数值也就也大,相应的,目标物体的深度的测量精度也就越低;另一方面,当测量目标物体的深度时第一双目相机所对应的焦距数值越大时,绝对误差的数值也就越小,相应的,目标物体的深度的测量精度也就越高。
需要强调的是,图2所示几何关系推导出的目标物体的当前深度的测量表达式、以及对该当前深度的测量表达式求一阶导数的表达式仅仅作为示例,并不应该构成对本申请实施例的限定。
由以上可见,根据数学推导关系可知,目标物体的深度的测量精度除了与目标物体的深度有关外,还与测量该目标物体的第一双目相机的焦距有关,应用本申请实施例提供的方案进行深度测量时,能够针对处于不同深度范围的目标物体选用不同的焦距进行测量,并非采用具有定焦镜头的双目相机进行深度测量,从而降低了目标物体的深度对于测量精度的影响,提高了目标物体深度测量的精准度。
如图3所示,在图1所示方法实施例的基础之上,在步骤S103根据预设的 深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤之前,还可以包括以下步骤:
S107:获得所述第一双目相机水平移动角度和竖直移动角度。
其中,如图4所示,所述水平移动角度和所述竖直移动角度为:利用第一中心像素点与第二中心像素点之间的几何关系,以及图像采集设备与所述第一双目相机之间的位置关系计算得到的水平方向偏移角度和竖直方向偏移角度;所述第一中心像素点为所述目标物体在大视野图像中的图像区域的中心点,所述第二中心像素点为所述大视野图像的中心点;所述图像采集设备为具有大视野范围的设备,所述大视野图像为利用所述图像采集设备所采集到的图像。
这里提及的图像采集设备可以是安装于云台基座上的、具有固定焦距的第二双目相机,还可以是安装于云台基座上的单目相机,需要说明的是,本申请实施例并不需要对图像采集设备的具体形式进行限定。在本申请的一个实施例中,第二双目相机或单目相机需要具备较大的视野,以便能够在所拍摄的大视野图像中定位到该目标物体对应的图像区域。例如,该云台基座上的图像采集设备可以是一个具有广角镜头的单目相机。
S108:按照所述水平移动角度和竖直移动角度,调节所述第一双目相机的拍摄角度,以使得所述第一双目相机在其视野范围内能够定位到所述目标物体。
根据相机成像原理可知,在图像传感器的靶面大小不变的情况下,可变焦镜头的焦距越大,相机所能拍摄的视野范围越小。因此,当通过增大可变焦镜头的焦距来提高目标物体的深度的测量精度的同时,还需要考虑视野范围变小所带来的无法在视野范围内定位到目标物体的问题。
还需要说明的是,本申请实施例并不限定步骤S101-S102与步骤S107-S108的先后执行顺序,具体的,可以在步骤S101-S102之前执行步骤S107-S108,也可以在步骤S101-S102之后执行步骤S107-S108。
由步骤S107和S108可见,在利用第一双目相机测量目标物体的当前深度时,可以先获得第一双目相机偏离目标物体的中心点的水平方向偏移角度(即 图4中的θx)和竖直方向偏移角度(即图4中的θy),然后按照所获得的水平移动角度和竖直移动角度来调节第一双目相机,从而使得该第一双目相机能够在视野范围内定位到该目标物体。可见,应用图3所示方法实施例提供的方案进行深度测量时,除了具备图1所示方法实施例的全部优点之外,还能够解决由于第一双目相机的视野范围变小所带来的无法在其视野范围内定位到目标物体的问题。
相应于上述方法实施例,本申请实施例还提供了一种深度测量系统。
下面再对本申请实施例提供的深度测量系统进行下介绍。
本申请实施例提供的一种深度测量系统可以包括:第一双目相机,用于获得待测量的目标物体的当前深度;确定测量所述当前深度时的焦距为当前焦距;根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围;判断当前焦距与当前参考焦距是否相同;若当前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度,若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
需要说明的是,根据数学推导关系可知,目标物体的深度的测量精度除了与目标物体的深度有关外,还与测量该目标物体的第一双目相机的焦距有关,应用本申请实施例提供的方案进行深度测量时,能够针对处于不同深度范围的目标物体选用不同的焦距进行测量,并非采用具有定焦镜头的双目相机进行深度测量,从而降低了目标物体的深度对于测量精度的影响,提高了目标物体深度测量的精准度。
具体的,所述第一双目相机,用于:
按照所述第一双目相机的预设焦距,测量目标物体的当前深度。
一种实现方式中,如图5所示,所述第一双目相机安装在云台上,所述深度测量系统还包括安装在所述云台基座上、具有定焦镜头的第二双目相机; 其中,所述第一双目相机,用于获得所述第二双目相机按照固定焦距测量出的目标物体的当前深度。
需要说明的是,本申请实施例中所涉及到的第一双目相机、第二双目相机既可以是一个单独的双目相机,还可以是由两个单目相机搭建而成的双目相机,本申请实施例并不需要对第一双目相机、第二双目相机的具体形式进行限定。
具体的,所述第一双目相机,用于:
按照所确定的当前焦距、所述第一双目相机的左右镜头间的实际距离以及所述第一双目相机的视差,测量所述目标物体的当前深度。其中,所述第一双目相机的视差是基于双目匹配原理计算得到的。
一种实现方式中,所述第一双目相机,具体用于:
按照以下表达式,获取所述目标物体的当前深度H:
Figure PCTCN2017107850-appb-000007
其中,L为所述第一双目相机的左右镜头间的实际距离,f为所确定出的所述第一双目相机的左右镜头的当前焦距,Δs为第一双目相机的视差。
具体的,所述系统还可以包括安装于云台基座上的图像采集设备,所述图像采集设备为具有大视野范围的设备。
需要说明的是,上述提及的安装于云台基座上的图像采集设备,可以为一个单独的单目相机,还可以是第二双目相机,本申请实施例并不需要对图像采集设备的具体形式进行限定,本领域内的技术人员需要根据实际应用中的具体情况进行合理的设置。例如,该图像采集设备可以是一个具有广角镜头的单目相机。
其中,所述图像采集设备,用于测量所述第一双目相机待调节的水平移动角度和竖直移动角度。
其中,所述水平移动角度和所述竖直移动角度为:利用第一中心像素点与第二中心像素点之间的几何关系,以及所述图像采集设备与所述第一双目相机之间的位置关系计算得到的水平方向偏移角度和竖直方向偏移角度;所 述第一中心像素点为所述目标物体在大视野图像中的图像区域的中心点,所述第二中心像素点为所述大视野图像的中心点;所述大视野图像为利用所述图像采集设备所采集到的图像。
所述第一双目相机,用于获得所述水平移动角度和所述竖直移动角度,并按照所述水平移动角度和竖直移动角度,调节所述第一双目相机的拍摄角度,以使得所述第一双目相机在其视野范围内能够定位到所述目标物体。
作为本申请实施例的一种具体实现方式,所述图像采集设备,具体用于:
(1)获得包含所述目标物体的大视野图像,并确定所述大视野图像中心点。
具体的,通过图像采集设备,可以获得一幅包含目标物体的大视野图像,根据该大视野图像的图像大小,可以确定出大视野图像的中心点,需要说明的是,该中心点的计算仅与大视野图像的图像大小有关,并不受大视野图像的图像内容的影响。
(2)按照预设的兴趣区域定位规则,从所述大视野图像中定位到目标兴趣区域。
一种实现方式中,可以基于目标物体的图像特征来定位该目标物体在大视野图像中对应的目标兴趣区域,例如,可以基于人脸特征定位大视野图像中的人脸图像区域,还可以基于车辆特征来定位大视野图像中的车辆图像区域,等等。需要说明的是,上述列举的定位目标兴趣区域的具体方式仅仅作为示例,并不应该构成对本申请实施例的限定。
(3)基于预设的兴趣区域中心点确定规则,确定所述目标兴趣区域中心点。
一种实现方式中,可以将该目标兴趣区域对应的最小外接矩形的中心点确定为该目标兴趣区域的中心点,还可以通过随机算法来随机选取一个像素点并将其确定为目标兴趣区域的中心点。需要说明的是,上述列举的确定目标兴趣区域中心点的方式仅仅作为示例,并不应该构成对本申请实施例的限定。
(4)根据所述目标兴趣区域中心点和所述大视野图像中心点,计算所述水平移动角度和所述竖直移动角度。
具体的,所述图像采集设备可以按照以下表达式,计算所述水平移动角度和所述竖直移动角度:
Figure PCTCN2017107850-appb-000008
Figure PCTCN2017107850-appb-000009
其中,Δx为所述目标兴趣区域中心点与所述大视野图像中心点之间的连线在水平方向的投影距离,Δy为所述目标兴趣区域中心点与所述大视野图像中心点之间的连线在竖直方向的投影距离。
如图5所示,作为本申请的另一种具体实现方式,所述系统还可以包括:散斑投射设备,用于在所述目标物体表面形成随机分布的散斑。
一种实现方式中,如图6所示,上述的散斑投射设备可以包括:红外激光发射器、衍射光学元件和变焦镜头。红外激光发射器发射的红外光线经过衍射光学元件,在目标物体的表面形成随机分布的散斑。该散斑投射设备可以位于第一双目相机的附近。
相应的,第一双目相机除了可以接收可见光之外,还需要具有接收红外光的功能。
该散斑投射设备的衍射光学元件可以安装于红外激光发射器的前方,该散斑投射设备的变焦镜头可以安装于该衍射光学元件的前方。这样,当红外激光发射器向外发射红外光或红外激光时,能够使所发射出的红外光或红外激光打在该衍射光学元件上并发生衍射,从而形成具有一定发射角度的散斑再向外发射;通过安装于该衍射光学元件前方的变焦镜头,可以实现对所形成的散斑的出射角的调节,进而使得散斑的出射角与第一双目相机的视场角相匹配,调节散斑的覆盖范围,从而实现对散斑覆盖范围内的目标物体的纹理的附加。
本申请实施例中所提供的目标物体的深度的测量方法是基于目标物体的视差与深度之间的几何关系来进行的,而目标物体的视差可以通过双目匹配 算法计算得到的,具体的,可以通过第一双目相机的左右相机所拍摄出的左右图像中的目标物体的匹配进行运算。目前,双目匹配算法可以分为全局匹配算法和局部匹配算法两大类,相对于全局匹配算法而言,局部匹配算法的运算复杂度低、实现简单,但是,对于所拍摄图像中纹理较少的图像区域而言,常常会遇到左右图像中的目标物体匹配不成功的问题。由此可见,当上述深度测量系统中安装有散斑投射设备之后,可以在目标物体表面形成随机分布的散斑,进而增加了所拍摄图像中目标物体对应的图像区域的纹理,有利于提高第一双目相机所拍摄的左右图像中目标物体匹配的成功率和准确率。
对于系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。
本申请实施例还提供了一种双目相机,如图7所示,包括:壳体701、处理器702、存储器703、电路板704、电源电路705和可变焦镜头706,其中,电路板704安置在壳体701围成的空间内部,处理器702和存储器703设置在电路板704上;电源电路705,用于为双目相机的各个电路或器件供电;存储器703用于存储可执行程序代码;可变焦镜头706用于采集图像及调节焦距;处理器702通过读取存储器703中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行所述深度测量方法,方法包括:
获得待测量的目标物体的当前深度;
确定测量所述当前深度时的焦距为当前焦距;
根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围;
判断当前焦距与当前参考焦距是否相同:
若当前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度;若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
该双目相机既可以是一个单独的双目相机,例如,该单独的双目相机可 以是具有两个镜头、两个图像传感器和一个图像处理器的整体器件,还可以是由两个单目相机搭建而成的双目相机,本申请实施例并不需要对双目相机的具体形式进行限定。
根据数学推导关系可知,目标物体的深度的测量精度除了与目标物体的深度有关外,还与测量该目标物体的第一双目相机的焦距有关;因此,应用本申请图8所示实施例提供的方案进行深度测量时,能够针对处于不同深度范围的目标物体选用不同的焦距进行测量,并非采用具有定焦镜头的双目相机进行深度测量,从而降低了目标物体的深度对于测量精度的影响,提高了目标物体深度测量的精准度。
本申请实施例还提供了一种可执行程序代码,所述可执行程序代码用于被运行以执行所述深度测量方法,方法包括:
获得待测量的目标物体的当前深度;
确定测量所述当前深度时的焦距为当前焦距;
根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围;
判断当前焦距与当前参考焦距是否相同:
若当前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度;若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
根据数学推导关系可知,目标物体的深度的测量精度除了与目标物体的深度有关外,还与测量该目标物体的第一双目相机的焦距有关;因此,应用本申请所示实施例提供的方案进行深度测量时,能够针对处于不同深度范围的目标物体选用不同的焦距进行测量,并非采用具有定焦镜头的双目相机进行深度测量,从而降低了目标物体的深度对于测量精度的影响,提高了目标 物体深度测量的精准度。
本申请实施例还提供了一种存储介质,所述存储介质用于存储可执行程序代码,所述可执行程序代码用于被运行以执行所述深度测量方法,方法包括:
获得待测量的目标物体的当前深度;
确定测量所述当前深度时的焦距为当前焦距;
根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围;
判断当前焦距与当前参考焦距是否相同:
若当前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度;若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
根据数学推导关系可知,目标物体的深度的测量精度除了与目标物体的深度有关外,还与测量该目标物体的第一双目相机的焦距有关;因此,应用本申请所示实施例提供的方案进行深度测量时,能够针对处于不同深度范围的目标物体选用不同的焦距进行测量,并非采用具有定焦镜头的双目相机进行深度测量,从而降低了目标物体的深度对于测量精度的影响,提高了目标物体深度测量的精准度。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列 出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称的存储介质,如:ROM/RAM、磁碟、光盘等。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (17)

  1. 一种深度测量方法,其特征在于,应用于具有可变焦镜头的第一双目相机,所述方法包括:
    获得待测量的目标物体的当前深度;
    确定测量所述当前深度时的焦距为当前焦距;
    根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围;
    判断当前焦距与当前参考焦距是否相同:
    若当前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度;若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
  2. 根据权利要求1所述的方法,其特征在于,所述获得待测量的目标物体的当前深度的步骤,包括:
    按照所述第一双目相机的预设焦距,测量目标物体的当前深度。
  3. 根据权利要求1所述的方法,其特征在于,所述第一双目相机安装在云台上;
    所述获得待测量的目标物体的当前深度的步骤,包括:
    获得第二双目相机按照固定焦距测量出的目标物体的当前深度;其中,所述第二双目相机安装在所述云台的基座上,且所述第二双目相机为具有定焦镜头的双目相机。
  4. 根据权利要求1所述的方法,其特征在于,所述按照所确定的当前焦距,测量所述目标物体的当前深度的步骤,包括:
    按照所确定的当前焦距、所述第一双目相机的左右镜头间的实际距离以及所述第一双目相机的视差,测量所述目标物体的当前深度。
  5. 根据权利要求4所述的方法,其特征在于,所述第一双目相机的视差是基于双目匹配原理计算得到的。
  6. 根据权利要求4所述的方法,其特征在于,在所述左右镜头的焦距相同的情况下,所述按照所确定的当前焦距、所述第一双目相机的左右镜头间的实际距离以及所述第一双目相机的视差,测量所述目标物体的当前深度的步骤,包括:
    按照以下表达式,获取所述目标物体的当前深度H:
    Figure PCTCN2017107850-appb-100001
    其中,L为所述第一双目相机的左右镜头间的实际距离,f为所确定出的所述第一双目相机的左右镜头的当前焦距,Δs为第一双目相机的视差。
  7. 根据权利要求1所述的方法,其特征在于,所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤之前,还包括:
    获得所述第一双目相机水平移动角度和竖直移动角度;其中,所述水平移动角度和所述竖直移动角度为:利用第一中心像素点与第二中心像素点之间的几何关系,以及图像采集设备与所述第一双目相机之间的位置关系计算得到的水平方向偏移角度和竖直方向偏移角度;所述第一中心像素点为所述目标物体在大视野图像中的图像区域的中心点,所述第二中心像素点为所述大视野图像的中心点;所述图像采集设备为具有大视野范围的设备,所述大视野图像为利用所述图像采集设备所采集到的图像;
    按照所述水平移动角度和竖直移动角度,调节所述第一双目相机的拍摄角度,以使得所述第一双目相机在其视野范围内能够定位到所述目标物体。
  8. 一种深度测量系统,其特征在于,所述系统包括:
    第一双目相机,用于获得待测量的目标物体的当前深度;确定测量所述当前深度时的焦距为当前焦距;根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距;其中,所述当前参考深度范围为当前深度所处的深度范围;判断当前焦距与当前参考焦距是否相同;若当 前焦距与当前参考焦距相同,则确定当前深度为所述目标物体的目标深度,若当前焦距与当前参考焦距不相同,将当前参考焦距确定为当前焦距,按照所确定的当前焦距,测量所述目标物体的当前深度,并返回执行所述根据预设的深度范围与焦距的对应关系,确定当前参考深度范围所对应的当前参考焦距的步骤。
  9. 根据权利要求8所述的系统,其特征在于,所述第一双目相机,用于:
    按照所述第一双目相机的预设焦距,测量目标物体的当前深度。
  10. 根据权利要求8所述的系统,其特征在于,所述第一双目相机安装在云台上,所述深度测量系统还包括安装在所述云台基座上、具有定焦镜头的第二双目相机;其中,
    所述第一双目相机,用于获得所述第二双目相机按照固定焦距测量出的目标物体的当前深度。
  11. 根据权利要求8所述的系统,其特征在于,所述第一双目相机,用于:
    按照所确定的当前焦距、所述第一双目相机的左右镜头间的实际距离以及所述第一双目相机的视差,测量所述目标物体的当前深度。
  12. 根据权利要求11所述的系统,其特征在于,所述第一双目相机的视差是基于双目匹配原理计算得到的。
  13. 根据权利要求11所述的系统,其特征在于,所述第一双目相机,具体用于:
    按照以下表达式,获取所述目标物体的当前深度H:
    Figure PCTCN2017107850-appb-100002
    其中,L为所述第一双目相机的左右镜头间的实际距离,f为所确定出的所述第一双目相机的左右镜头的当前焦距,Δs为第一双目相机的视差。
  14. 根据权利要求8所述的系统,其特征在于,所述系统还包括:安装于云台基座上的图像采集设备,所述图像采集设备为具有大视野范围的设备;其中,
    所述图像采集设备,用于测量所述第一双目相机待调节的水平移动角度和竖直移动角度;其中,所述水平移动角度和所述竖直移动角度为:利用第一中心像素点与第二中心像素点之间的几何关系,以及所述图像采集设备与所述第一双目相机之间的位置关系计算得到的水平方向偏移角度和竖直方向偏移角度;所述第一中心像素点为所述目标物体在大视野图像中的图像区域的中心点,所述第二中心像素点为所述大视野图像的中心点;所述大视野图像为利用所述图像采集设备所采集到的图像;
    所述第一双目相机,用于获得所述水平移动角度和所述竖直移动角度,并按照所述水平移动角度和竖直移动角度,调节所述第一双目相机的拍摄角度,以使得所述第一双目相机在其视野范围内能够定位到所述目标物体。
  15. 根据权利要求14所述的系统,其特征在于,所述图像采集设备,具体用于:
    获得包含所述目标物体的大视野图像,并确定所述大视野图像中心点;
    按照预设的兴趣区域定位规则,从所述大视野图像中定位到目标兴趣区域;
    基于预设的兴趣区域中心点确定规则,确定所述目标兴趣区域中心点;
    根据所述目标兴趣区域中心点和所述大视野图像中心点,计算所述水平移动角度和所述竖直移动角度。
  16. 根据权利要求15所述的系统,其特征在于,所述图像采集设备按照以下表达式,计算所述水平移动角度和所述竖直移动角度:
    Figure PCTCN2017107850-appb-100003
    Figure PCTCN2017107850-appb-100004
    其中,Δx为所述目标兴趣区域中心点与所述大视野图像中心点之间的连线在水平方向的投影距离,Δy为所述目标兴趣区域中心点与所述大视野图像中心点之间的连线在竖直方向的投影距离。
  17. 根据权利要求8-16中任一项所述的系统,其特征在于,所述系统还包括:
    散斑投射设备,用于在所述目标物体表面形成随机分布的散斑。
PCT/CN2017/107850 2016-10-31 2017-10-26 一种深度测量方法及系统 WO2018077218A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/345,418 US11209268B2 (en) 2016-10-31 2017-10-26 Depth measuring method and system
EP17865985.0A EP3534109B1 (en) 2016-10-31 2017-10-26 Depth measuring method and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610928328.9 2016-10-31
CN201610928328.9A CN108020200B (zh) 2016-10-31 2016-10-31 一种深度测量方法及系统

Publications (1)

Publication Number Publication Date
WO2018077218A1 true WO2018077218A1 (zh) 2018-05-03

Family

ID=62023095

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/107850 WO2018077218A1 (zh) 2016-10-31 2017-10-26 一种深度测量方法及系统

Country Status (4)

Country Link
US (1) US11209268B2 (zh)
EP (1) EP3534109B1 (zh)
CN (1) CN108020200B (zh)
WO (1) WO2018077218A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108645375A (zh) * 2018-06-05 2018-10-12 浙江零跑科技有限公司 一种用于车载双目系统快速车辆测距优化方法
CN111444763A (zh) * 2020-02-24 2020-07-24 珠海格力电器股份有限公司 一种安防控制方法、装置、存储介质及空调
CN114266815A (zh) * 2021-12-22 2022-04-01 合肥瑞识智能科技有限公司 一种深度测量方法、装置、设备及介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109084688B (zh) * 2018-09-20 2020-09-29 杭州电子科技大学 一种基于可变焦相机的双目视觉测距方法
CN111611964A (zh) * 2020-05-29 2020-09-01 东软睿驰汽车技术(沈阳)有限公司 一种距离检测方法及装置
CN112184811B (zh) * 2020-09-22 2022-11-04 合肥的卢深视科技有限公司 单目空间结构光系统结构校准方法及装置
CN113676719B (zh) * 2021-07-21 2023-11-14 北京中科慧眼科技有限公司 双目立体相机的对焦参数计算方法、系统和智能终端
CN113965701B (zh) * 2021-09-10 2023-11-14 苏州雷格特智能设备股份有限公司 一种基于两个深度相机的多目标空间坐标对应绑定方法
CN114565570B (zh) * 2022-02-18 2024-03-15 成都飞机工业(集团)有限责任公司 一种弱刚性蒙皮锪窝孔深度测量方法、装置、设备及介质
CN115866399B (zh) * 2023-02-28 2023-05-16 广东欧谱曼迪科技有限公司 一种3d内窥镜自动调焦方法、装置、电子设备及储存介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404757A (zh) * 2007-10-04 2009-04-08 三星Techwin株式会社 监视摄像机系统
US20100265490A1 (en) * 2009-04-16 2010-10-21 Kamakura Koki Co., Ltd Range binoculars
CN103776419A (zh) * 2014-01-24 2014-05-07 华南理工大学 一种提高测量范围的双目视觉测距方法
CN104880154A (zh) * 2015-06-03 2015-09-02 西安交通大学 一种物联网双目视觉变焦动态目标跟踪试验系统平台与测距方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101969548B (zh) * 2010-10-15 2012-05-23 中国人民解放军国防科学技术大学 基于双目摄像的主动视频获取方法及装置
JP2012133232A (ja) * 2010-12-22 2012-07-12 Fujitsu Ltd 撮影装置及び撮影制御方法
CN103292779B (zh) * 2012-02-28 2015-06-24 联想(北京)有限公司 一种测量距离的方法及图像获取设备
CN104883560B (zh) * 2015-06-10 2017-07-04 京东方科技集团股份有限公司 双目立体视觉装置及其调节方法、装置和显示装置
CN105423954B (zh) * 2015-12-29 2018-06-26 北京航天益森风洞工程技术有限公司 一种基于视觉测量的柔壁喷管的测量方法
CN108700414A (zh) * 2016-02-25 2018-10-23 京瓷株式会社 立体摄像装置、车辆以及视差计算方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404757A (zh) * 2007-10-04 2009-04-08 三星Techwin株式会社 监视摄像机系统
US20100265490A1 (en) * 2009-04-16 2010-10-21 Kamakura Koki Co., Ltd Range binoculars
CN103776419A (zh) * 2014-01-24 2014-05-07 华南理工大学 一种提高测量范围的双目视觉测距方法
CN104880154A (zh) * 2015-06-03 2015-09-02 西安交通大学 一种物联网双目视觉变焦动态目标跟踪试验系统平台与测距方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
See also references of EP3534109A4
XU JIE: "Distance measurement using binocular-camera with adaptive focussing", JOURNAL OF SHANGHAI UNIVERSITY, vol. 15, no. 2, 30 April 2009 (2009-04-30), pages 169 - 174, XP9513886 *
ZHANG Z.: "Adaptivezoom distance measuring system of camera based on the ranging of binocular vision", MODERN APPLIED SCIENCE, vol. 6, no. 5, 31 May 2012 (2012-05-31), pages 44 - 45, XP055594135 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108645375A (zh) * 2018-06-05 2018-10-12 浙江零跑科技有限公司 一种用于车载双目系统快速车辆测距优化方法
CN108645375B (zh) * 2018-06-05 2020-11-17 浙江零跑科技有限公司 一种用于车载双目系统快速车辆测距优化方法
CN111444763A (zh) * 2020-02-24 2020-07-24 珠海格力电器股份有限公司 一种安防控制方法、装置、存储介质及空调
CN114266815A (zh) * 2021-12-22 2022-04-01 合肥瑞识智能科技有限公司 一种深度测量方法、装置、设备及介质

Also Published As

Publication number Publication date
EP3534109A4 (en) 2019-11-13
US11209268B2 (en) 2021-12-28
US20190265029A1 (en) 2019-08-29
EP3534109A1 (en) 2019-09-04
CN108020200B (zh) 2020-02-28
CN108020200A (zh) 2018-05-11
EP3534109B1 (en) 2022-08-10

Similar Documents

Publication Publication Date Title
WO2018077218A1 (zh) 一种深度测量方法及系统
TWI758368B (zh) 包含可調整焦距成像感測器的距離感測器
JP6887960B2 (ja) 自動焦点トリガのためのシステムおよび方法
WO2019114617A1 (zh) 快速抓拍的方法、装置及系统
KR102143456B1 (ko) 심도 정보 취득 방법 및 장치, 그리고 이미지 수집 디바이스
EP3089449B1 (en) Method for obtaining light-field data using a non-light-field imaging device, corresponding device, computer program product and non-transitory computer-readable carrier medium
JP5961945B2 (ja) 画像処理装置、その画像処理装置を有するプロジェクタ及びプロジェクタシステム、並びに、画像処理方法、そのプログラム、及び、そのプログラムを記録した記録媒体
US9619886B2 (en) Image processing apparatus, imaging apparatus, image processing method and program
JP2013033206A (ja) 投影型表示装置、情報処理装置、投影型表示システム、およびプログラム
TWI529661B (zh) 快速建立景深圖的方法及影像處理裝置
JP2017208606A5 (zh)
JP7378219B2 (ja) 撮像装置、画像処理装置、制御方法、及びプログラム
JP2012514886A (ja) 映像データ獲得方法及び装置
JP5968379B2 (ja) 画像処理装置およびその制御方法
US9247125B2 (en) Auxiliary light projection apparatus, flash apparatus, and photographing apparatus
WO2018076529A1 (zh) 场景深度计算方法、装置及终端
CN112598719B (zh) 深度成像系统及其标定方法、深度成像方法、存储介质
CN110225247B (zh) 一种图像处理方法及电子设备
JP5179784B2 (ja) 三次元座標測定装置及び三次元座標測定装置において実行されるプログラム
JP2008233205A (ja) 測距装置および撮像装置
JP2020067511A (ja) カメラシステム、その制御方法およびプログラム
US11790600B2 (en) Image processing device, imaging apparatus, image processing method, and recording medium
US20240037784A1 (en) Method and apparatus for structured light calibaration
TW202217747A (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: 17865985

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

Country of ref document: EP

Effective date: 20190531