WO2018232900A1 - 空间定位装置、定位处理方法及装置 - Google Patents
空间定位装置、定位处理方法及装置 Download PDFInfo
- Publication number
- WO2018232900A1 WO2018232900A1 PCT/CN2017/097098 CN2017097098W WO2018232900A1 WO 2018232900 A1 WO2018232900 A1 WO 2018232900A1 CN 2017097098 W CN2017097098 W CN 2017097098W WO 2018232900 A1 WO2018232900 A1 WO 2018232900A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- horizontal
- vertical
- camera
- image
- pixel
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/55—Depth or shape recovery from multiple images
- G06T7/593—Depth or shape recovery from multiple images from stereo images
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
- G06T7/74—Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/97—Determining parameters from multiple pictures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/55—Depth or shape recovery from multiple images
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/90—Arrangement of cameras or camera modules, e.g. multiple cameras in TV studios or sports stadiums
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
- G06T2207/10012—Stereo images
Definitions
- the present invention relates to the field of spatial positioning technology, and more particularly to a spatial positioning device, a positioning processing method for the spatial positioning device, and a positioning processing device for the spatial positioning device.
- the current spatial positioning device mainly uses a binocular camera to acquire spatial position data of a space object through an image acquired by a binocular camera, the spatial position data including a depth value, a spatial position coordinate along a horizontal direction, and a spatial position coordinate along a vertical direction. To achieve spatial positioning of the physical object. On this basis, by comparing the spatial position data of the space objects at different time points, the action of the space object can be determined, and the human-computer interaction function based on the action command is realized.
- the problem of spatial positioning through the binocular camera includes the blind zone problem, which is the non-coincidence zone of the images captured by the two cameras.
- the left camera C1 corresponds to the shooting area Va1
- the right camera C2 corresponds to the shooting area Va2.
- the two cameras C1 and C2 have a blind spot not only in the non-overlapping area of the shooting area Va1 and the shooting area Va2, but also in shooting. There may also be a dead zone in the overlapping area of the area Va1 and the photographing area Va2, which is caused by the unevenness of the physical object, which may occur under certain conditions. Taking FIG.
- the left camera C1 has a blind spot D1 in the overlapping area
- the right camera C2 has a blind spot D2 in the overlapping area. Therefore, the features of the space object that the left camera C1 can capture are F1, F2, and F3.
- F4, F6 the characteristics of the space object that can be captured by the right camera are F2, F4, F5, F6, F7, each of the above features corresponds to a pixel on the image, so that in the features F1 to F7, according to the features F1 to F7
- the image obtained by the left camera C1 and the right camera C2 obtains the depth value only including the features F2, F4, and F6, and the features F3 and F5 become blind spots of the binocular camera because they are located in the blind areas of the right camera and the left camera, respectively.
- the features F3 and F5 are in the overlapping area (central area) of the shooting areas of the two cameras, that is, the two are located in the desired spatial positioning area, if the depth value cannot be obtained, it will be a big technical loophole, therefore, overlapping
- the problem of blind spots in the area has become an urgent problem to be solved in spatial positioning technology.
- a spatial positioning apparatus comprising a horizontal camera set and a vertical camera set, the horizontal camera set and the vertical camera set each comprising at least two cameras having the same parameters, the parameters including image resolution a lens angle of view in a horizontal direction and a lens angle of view in a vertical direction; at least two cameras of the horizontal camera group are aligned in the horizontal direction, and at least two cameras of the vertical camera group are aligned in the vertical direction.
- a positioning processing method for a spatial positioning apparatus comprising:
- a depth value of the represented feature as a horizontal depth value according to a horizontal pixel difference corresponding to each pixel point in the image acquired by the horizontal camera group, and a vertical pixel corresponding to each pixel point in the image acquired according to the vertical camera group
- the depth value of the feature represented by the difference is calculated as a vertical depth value
- a positioning processing apparatus for a spatial positioning apparatus comprising:
- An image acquiring module configured to respectively acquire images acquired by the horizontal camera group and the vertical camera group at the same time;
- a pixel difference calculation module configured to calculate, according to the image acquired by the horizontal camera group, a horizontal pixel difference of pixel pairs representing the same feature in the same object, and calculate an image representing the same feature in the same object according to the image acquired by the vertical camera group The vertical pixel difference of the pixel pair;
- a full pixel matching module configured to calculate, according to a horizontal pixel difference of the pixel pair, a horizontal pixel difference corresponding to other pixel points in the image collected by the horizontal camera group, and according to a vertical pixel difference of the pixel point pair, Calculating a vertical pixel difference corresponding to other pixels in the image acquired by the vertical camera group;
- a depth value calculation module for each pixel in the image acquired according to the horizontal camera group Calculating a depth value of the represented feature as a horizontal depth value according to the horizontal pixel difference corresponding to the point, and calculating a depth value of the represented feature as a vertical depth value according to a vertical pixel difference corresponding to each pixel point in the image acquired by the vertical camera group; as well as,
- a coordinate calculation module configured to calculate, according to the horizontal depth value and the vertical depth value, a spatial position coordinate of the corresponding feature along the horizontal direction and the vertical direction.
- An advantageous effect of the present invention is that the horizontal camera group and the vertical camera group are set, and the image is collected and processed at the same time. Since the camera group is set in different directions, the number of blind spots appearing in the single direction image can be effectively reduced or even eliminated.
- the added vertical camera group can also improve the measurement accuracy of the physical position coordinates of the physical object in the vertical direction, thereby improving the positioning accuracy of the physical object.
- 1 is a schematic structural view of a conventional binocular camera
- FIG. 2 is a schematic flow chart of a positioning processing method according to an embodiment of the present invention.
- FIG. 3a is a schematic diagram showing the relationship between pixel and spatial position coordinate conversion in the horizontal direction of any camera
- FIG. 3b is a schematic diagram showing the relationship between the pixel and the spatial position coordinate of the vertical direction of any camera
- FIG. 4 is a schematic diagram of a hardware structure of a positioning processing apparatus according to an embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of a space positioning apparatus according to an embodiment of the present invention.
- FIG. 6 is a schematic flow chart of a positioning processing method for the spatial positioning device of FIG. 5;
- FIG. 7 is a schematic block diagram of a positioning processing apparatus according to an embodiment of the present invention.
- Figure 8 is a schematic block diagram of a positioning processing device for the spatial positioning device of Figure 5;
- FIG. 9 is a schematic block diagram of a virtual reality system in accordance with an embodiment of the present invention.
- a spatial positioning device includes a horizontal camera group and a vertical camera group
- the horizontal camera group includes at least two cameras having the same parameters, and at least two cameras of the horizontal camera group are aligned in a horizontal direction;
- the vertical camera group also includes at least two cameras having the same parameters, and at least two cameras of the vertical camera group are aligned in the vertical direction;
- the above parameters include image resolution Px ⁇ Py, horizontal field of view angle 2 ⁇ , and vertical field of view angle
- the image resolution Px ⁇ Py of the camera determines the number of pixels per line (horizontal direction) of the acquired image and the number of pixels per column (vertical direction), wherein the number of pixels per line is Px, and the number of pixels per column is Py.
- the field of view angle 2 ⁇ of the camera in the horizontal direction determines the maximum ingestion range of the camera in the horizontal direction.
- the horizontal direction in the present invention specifically refers to the horizontal direction in which the image sensor of the camera is calibrated.
- Vertical field of view of the camera Determines the maximum shooting range of the camera in the vertical direction.
- the vertical direction in the present invention specifically refers to the vertical direction of the image sensor calibration of the camera, which is perpendicular to the horizontal direction of the image sensor calibration.
- At least two cameras of the horizontal camera group are aligned in the horizontal direction.
- the alignment is such that the lines of any identical points (eg, center point, four corner points) of the image sensors of at least two cameras of the horizontal camera group are parallel to the horizontal direction.
- the camera can be aligned in the horizontal direction by setting the bottom surface of each camera to be coplanar and the front end faces of the cameras to be coplanar.
- At least two cameras of the vertical camera group are aligned in the vertical direction.
- the alignment is such that the lines of any identical points (eg, center point, four corner points) of the image sensors of at least two cameras of the vertical camera group are parallel to the vertical direction.
- the front end faces of the cameras can be coplanar and the left end and/or the right end of each camera can be coplanar to achieve vertical alignment of the cameras.
- the spatial positioning device of the embodiment of the present invention respectively sets the horizontal camera group and the vertical camera group in the horizontal direction and the vertical direction, by controlling the two camera groups to simultaneously collect images, the space object can be obtained through the comparison.
- the two sets of depth value data of the feature identified by the pixel point at the same time can effectively reduce or even eliminate the number of blind spots appearing in the single direction shooting image by complementing the two sets of depth value data.
- separately setting the horizontal camera group and the vertical camera group can also improve the measurement accuracy of the physical position coordinates of the physical object in the horizontal direction and the vertical direction, thereby improving the positioning accuracy of the physical object.
- the spatial positioning device according to an embodiment of the present invention may include one such horizontal camera group, or two or more (including two ) This kind of horizontal camera group.
- the spatial positioning device may include one such vertical camera group, or two or more (including two) such vertical camera groups.
- FIG. 2 is a schematic flow chart of a positioning processing method for the above spatial positioning device.
- the positioning processing method may include:
- Step S210 acquiring images acquired by the horizontal camera group and the vertical camera group at the same time respectively.
- the positioning processing apparatus embodying the positioning processing method of the present invention may receive an image acquired by each of the horizontal camera group and the vertical camera group, for example, by at least one processor.
- Step S220 Calculate a horizontal pixel difference of pixel pairs representing the same feature in the same object according to the image acquired by the horizontal camera group, and calculate a vertical pixel difference of the pixel pair indicating the same feature in the same object according to the image acquired by the vertical camera group.
- Each pixel pair represents the same feature in the same object: the image content of the pixel pair is the same feature of the same object, for example, the image content of the pixel pair is the same hand feature of the same person.
- the physical feature that can be extracted to the pixel pair by comparing the pixel point content is the edge feature, the corner feature, and the like of the object.
- the image acquired by the horizontal camera group two images have pixel points representing the hand features of the same person, and the pixel points representing the same edge feature of the hand are aligned in the same pixel row in the two images by comparison, But with different pixel positions, the difference in pixel coordinates between the two is the horizontal pixel difference.
- two images have pixel points representing the head features of the same person, and the pixel points representing the same edge feature of the head are aligned in the same pixel column in the two images by comparison. , but with different pixel positions, the difference between the pixel coordinates between the two is the vertical pixel difference.
- all pixels can be extracted for the image captured by the horizontal camera group and the image captured by the vertical camera group, and each pixel is marked by the source camera and pixel coordinates of the pixel, and then the pixel from the horizontal camera group. Aligning the same features between the points and the pixels from the vertical camera group respectively, obtaining pixel pairs representing the same features in the same object, and obtaining horizontal pixel differences or verticals according to the pixel positions of each pixel pair. Pixel difference.
- Step S230 calculating a horizontal pixel difference corresponding to other pixels in the image collected by the horizontal camera group according to the horizontal pixel difference of the pixel pair, and calculating other ones in the image collected by the vertical camera group according to the vertical pixel difference of the pixel pair The vertical pixel difference corresponding to the pixel.
- the horizontal pixel corresponding to the other pixels in the image acquired by the horizontal camera group can be calculated by using the horizontal pixel difference of the pixel pair as a reference. The difference is used, and the vertical pixel difference of the pixel pair is used as a reference to calculate the vertical pixel difference corresponding to other pixels in the image acquired by the vertical camera group.
- the comparison becomes a pixel point pair, other partial pixels other than the part of the pixel in the first image are other pixels of the first image.
- some pixels of the third image and other images captured by the vertical camera group are set (other images are obtained by a camera other than the camera that captures the third image in the vertical camera group) By aligning into a pixel point pair, other partial pixels in the third image except the part of the pixel point are other pixel points of the third image.
- step S230 the horizontal pixel difference corresponding to all the pixels of each image acquired by the horizontal camera group and the vertical pixel difference corresponding to all the pixels of each image acquired by the vertical camera group can be obtained.
- the pixel point A1 forms a pixel point A with the pixel point A2 in another image acquired by the horizontal camera group, and the horizontal pixel difference between the pixel point pair A is d xa
- the pixel point B1 forms a pixel point B with the pixel point B2 in the other image
- the horizontal pixel difference between the pixel points B is d xb
- the pixel point A1 and the pixel point B1 are in the same pixel row, and the two are horizontally
- the pixels are separated by n pixels, so that the horizontal pixel difference of each of the n pixel points can be obtained by linearly interpolating the horizontal pixel difference d xb and the horizontal pixel difference d xa at n pixel points.
- the pixel point C1 and the pixel point C2 in another image acquired by the vertical camera group form a pixel point pair C, and the vertical pixel difference between the pixel point pair C is d yc , and the pixel
- the point D1 forms a pixel point D with the pixel point D2 in the other image, and the vertical pixel difference between the pixel points D is d yd , wherein the pixel point C1 and the pixel point D1 are in the same pixel column with the vertical direction therebetween
- the upper m pixels are spaced apart, so that the vertical pixel difference of each of the m pixel points can be obtained by linearly interpolating the vertical pixel difference d yc and the vertical pixel difference d yd at m pixel points.
- Step S240 calculating a depth value of the represented feature as a horizontal depth value according to a horizontal pixel difference corresponding to each pixel point in the image collected by the horizontal camera group, and collecting according to the vertical camera group.
- the vertical pixel difference corresponding to each pixel in the image is used to calculate the depth value of the represented feature as the vertical depth value.
- the above horizontal depth value is the distance between the corresponding feature and the plane of the image sensor of the horizontal camera group, that is, the distance in the Z-axis direction in Figs. 3a and 3b.
- the above vertical depth value is the distance between the corresponding feature and the plane of the image sensor of the vertical camera group, that is, the distance in the Z-axis direction in Figs. 3a and 3b.
- the horizontal pixel difference of the corresponding feature F is dx
- the vertical pixel difference is dy
- the horizontal depth value is F Zx
- the vertical depth value is F Zy .
- the horizontal depth value F Zx is described below with reference to FIGS. 3 a and 3 b .
- the relationship between the horizontal pixel difference dx and the vertical depth value is the relationship between F Zy and the vertical pixel difference dy.
- the pixel coordinates of the pixel representing the feature F on the acquired image are (Fx, Fy), and the pixel coordinates and the feature F are in the horizontal direction.
- the relationship between the spatial position coordinates (U F , V F ) and the vertical direction is:
- V F ⁇ Fy ⁇ Fy + V 0 ,
- the U-axis, the V-axis, and the Z-axis represent a spatial coordinate system, wherein the U-axis is disposed in a horizontal direction, the V-axis is disposed in a vertical direction, and the Z-axis is perpendicular to a plane in which the image sensor is located.
- (U F , V F ) is the spatial position coordinate of feature F in the horizontal direction and the vertical direction; (U 0 , V 0 ) is the pixel with pixel coordinates of (0, 0) The spatial position coordinates of the feature represented by the point in the horizontal direction and the vertical direction; (Fx, Fy) is the pixel coordinate of the pixel of the feature F; F Zx is the horizontal depth value, and Px is the number of pixels of each line corresponding to the camera, Py is the number of pixels of each column corresponding to the camera; ⁇ is half of the angle of view corresponding to the horizontal direction of the camera; It is half of the field of view angle corresponding to the vertical direction of the camera.
- a is the distance of the two cameras in the horizontal direction, that is, the horizontal baseline length; dx is the horizontal pixel difference.
- the spatial position data of the feature F can be calculated according to the formula (1), the formula (2) and the (5), the spatial position data includes The horizontal depth value F Zx of the feature F, and the spatial position coordinates (U F , V F ) along the horizontal and vertical directions.
- the pixel coordinates of the pixel representing the feature F on the acquired image are (Fx, Fy), and the pixel coordinates and the feature F are in the horizontal direction.
- the relationship between the spatial position coordinates (U F , V F ) and the vertical direction is:
- V F ⁇ Fy ⁇ Fy + V 0 ,
- (U F , V F ) is the spatial position coordinate of feature F in the horizontal and vertical directions;
- (U 0 , V 0 ) is the pixel with pixel coordinates of (0, 0) The spatial position coordinates of the feature represented by the point in the horizontal direction and the vertical direction;
- (Fx, Fy) is the pixel coordinate of the pixel point of the feature F;
- F Zy is the vertical depth value, and
- Px is the number of pixels of each line corresponding to the camera, Py is the number of pixels of each column corresponding to the camera;
- ⁇ is half of the angle of view corresponding to the horizontal direction of the camera; It is half of the field of view angle corresponding to the vertical direction of the camera.
- V F ⁇ Fy ⁇ Fy + V 0 formula (8)
- V F ⁇ Fy ⁇ (Fy-dy)+(V 0 +b) Formula (9);
- b is the distance of the two cameras in the vertical direction, that is, the vertical baseline length; dy is the vertical pixel difference.
- the spatial position data of the feature F can be calculated according to the formula (6), the formula (7) and the formula (10), and the spatial position data is obtained.
- the vertical depth value F Zy of the feature F and the spatial position coordinates (U F , V F ) along the horizontal and vertical directions are included.
- Step S250 calculating a space corresponding to the feature according to the horizontal depth value and the vertical depth value Position coordinates.
- the space of the feature F in the horizontal direction and the vertical direction can be calculated according to the above formula (1), formula (2), and (5) or the above formula (6), formula (7), and formula (10). Position coordinates.
- the images acquired by the horizontal camera group and the vertical camera group at the same time can be processed by the above positioning processing method, and since the camera group is set in different directions,
- step S220 pixel point pairs representing the same feature in the same object can be extracted in different directions by comparing the pixel point contents, and the accurate pixel difference of each pixel point pair is obtained as the reference pixel difference to pass through different directions.
- the complement of the pixel pairs reduces or even eliminates the number of blind spots.
- step S230 there are more reference pixel differences for calculating pixel differences corresponding to other pixel points, thereby improving the accuracy of the pixel difference corresponding to each pixel point in all images calculated by interpolation or the like. Improve the reliability of spatial positioning.
- the imaging of the camera is slightly different from the actual object. This is reflected in the fact that the image in the middle of the image is consistent with the real object, and the image at the edge of the image is slightly smaller than the actual object, which leads to the physical image based on the image. There is a deviation in the measurement.
- the spatial positioning device of the embodiment of the present invention since the horizontal camera group and the vertical camera group are respectively disposed, the horizontal baseline length with reference function between the two cameras in the horizontal camera group can be utilized, and the effective reduction is adopted.
- the horizontal pixel difference is calculated by the spatial position coordinate of the feature F in the horizontal direction and the deviation of the horizontal measurement of the physical object, so as to be able to control the measurement deviation in the horizontal direction within an acceptable range, which is for the physical object in the horizontal direction. Measurement is advantageous.
- the deviation is also capable of controlling the measurement deviation in the vertical direction within an acceptable range, which is advantageous for performing measurement of the physical object in the vertical direction.
- the spatial positioning device of the embodiment of the invention can be fixedly installed in a selected positioning space.
- the spatial positioning device of the embodiment of the invention may also be fixedly mounted on a moving object, such as in a virtual reality application, mounted on a virtual reality helmet.
- Each camera of the spatial positioning device needs to send the respective acquired images to the positioning processing device implementing the above positioning processing method for performing pixel point extraction, matching, and the like to obtain images according to each camera. Calculate the spatial position data of the desired feature.
- FIG. 4 is a schematic diagram showing the hardware structure of a positioning processing apparatus according to an embodiment of the present invention.
- the positioning processing apparatus may include at least one processor 410 and at least A memory 420.
- the memory 420 is for storing instructions for controlling the processor 410 to operate to perform a positioning processing method in accordance with the present invention.
- the memory 420 can include high speed random access memory and can also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
- each camera of the first processor and the spatial positioning device is coupled, for example, via an MIPI bus, to obtain an image acquired by each camera.
- the first processor may directly perform the positioning processing method according to the present invention after acquiring the image acquired by each camera to obtain spatial position data of the space object.
- the first processor may also preprocess each image after acquiring the image acquired by each camera, and send the preprocessed image to at least one processor through the communication device 430 or the data bus in FIG.
- Other processors execute the positioning processing method according to the present invention.
- the communication device 430 can be a wired communication device, such as a USB communication device or the like.
- the communication device 430 can also be a wireless communication device, such as a Bluetooth communication device, a WIFI communication device, or the like.
- the first processor may further calculate the depth value data of the spatial object according to the positioning processing method of the present invention after acquiring the image acquired by each camera, and pass the depth value data to the communication device 430 or the data in FIG.
- the bus is sent to other processors in the at least one processor to perform the positioning processing method according to the present invention to further calculate other spatial position data of the spatial object, such as spatial position coordinates in the horizontal and vertical directions, and the like.
- FIG. 5 is a schematic diagram showing the configuration of a space locating device according to an embodiment of the present invention.
- the spatial positioning device comprises a first camera C1, a second camera C2 and a third camera C3.
- the three cameras C1, C2, C3 have the same parameters, and the parameters include image resolution. Px ⁇ Py, field of view angle 2 ⁇ in the horizontal direction, and field of view angle in the vertical direction
- the first camera C1 and the second camera C2 are aligned in the horizontal direction to form a pair of horizontal cameras constituting the horizontal camera group.
- the third camera C3 and the second camera C2 are aligned in the vertical direction to form a pair of vertical cameras constituting the vertical camera group.
- the horizontal baseline length and the vertical baseline length can be determined based on the second camera C2, and the second camera C2 is used as a reference.
- Full pixel matching is performed between the horizontal cameras and a pair of vertical cameras, thereby realizing complementarity of the spatial position data of the physical objects in the same space, so as to perform flexible positioning processing according to the positioning requirements.
- the spatial locating device of this embodiment taking the feature F5 in FIG. 1 as an example, the feature F5 is a blind spot of the first camera C1, and therefore, the accurate depth value of the feature F5 cannot be obtained according to the pair of horizontal cameras C1, C2.
- the accurate depth value of the feature F5 cannot be obtained according to the pair of horizontal cameras C1, C2.
- the spatial positioning device of the embodiment at least the blind spot can be reduced or even eliminated, and the reliability of the spatial positioning can be improved.
- the spatial positioning apparatus of the present embodiment since a pair of horizontal cameras are constituted by the camera C1 and the camera C2 with a horizontal baseline length a as a reference therebetween, the horizontal baseline length a can be effectively reduced by the level
- the pixel position difference calculated by the pixel difference is a spatial position coordinate in the horizontal direction and a deviation in the horizontal direction measurement of the object, so that the measurement deviation in the horizontal direction of the object can be controlled within an acceptable range. This is because the horizontal measurement of the physical object is based on the relative difference of the spatial position coordinates of the physical features along the horizontal direction. If the spatial position coordinates of each feature in the horizontal direction are based on the horizontal baseline length a. Then, the same error can be eliminated when calculating the relative difference, thereby improving the measurement accuracy in the horizontal direction.
- the spatial positioning device of the present embodiment also passes through a pair of vertical cameras consisting of a camera C2 and a camera C3 with a vertical baseline length b as a reference therebetween, the vertical baseline length b can be effectively reduced by vertical
- the pixel position difference calculated by the pixel difference is the spatial position coordinate in the vertical direction and the deviation of the vertical direction measurement of the object, so that the measurement deviation in the vertical direction can also be controlled within an acceptable range. This is because the vertical direction measurement of the physical object is based on the relative difference of the spatial position coordinates of the physical features in the vertical direction. If the spatial position coordinates of the features in the vertical direction are based on the vertical baseline length b, the data is obtained. Then, the same error can be eliminated when calculating the relative difference, thereby improving the measurement accuracy in the vertical direction.
- FIG. 6 is a schematic flow chart of a positioning processing method for the spatial positioning device shown in FIG. 5.
- the positioning processing method may include the following steps:
- Step S610 acquiring images acquired by the first camera C1, the second camera C2, and the third camera C3 at the same time, respectively corresponding to the first image, the second image, and the third image.
- Step S621 Comparing the first image and the second image, and matching in the horizontal direction to obtain pixel pairs representing the same feature in the same object as horizontal pixel pairs.
- the horizontal pixel pair is at a different pixel location of the same pixel row on the first image and the second image, and thus the horizontal pixel pair has a horizontal pixel difference on the first image and the second image.
- Step S631 determining a horizontal pixel difference of the horizontal pixel pair on the first image and the second image according to the pixel position of the horizontal pixel pair on the first image and the second image.
- Step S641 calculating a horizontal pixel difference corresponding to other pixels in the first image and the second image according to the horizontal pixel difference of the horizontal pixel pair.
- the horizontal pixel difference of the horizontal pixel pair is used as the known reference pixel difference, and the horizontal pixel difference corresponding to the other pixels in the first image and the second image is obtained by the interpolation means.
- Step S651 calculating a depth value of the represented feature as a horizontal depth value according to a horizontal pixel difference corresponding to each pixel point in the first image and the second image.
- the depth value of the feature F represented by each pixel point in the first image and the second image can be calculated as the horizontal depth value F Zx using the above formula (5).
- Step S622 comparing the second image and the third image, and matching the pixel points in the vertical direction to obtain the same feature in the same object as the vertical pixel pair.
- the pair of vertical pixels are located at different pixel locations of the same pixel column on the second image and the third image, and therefore, the pair of vertical pixels have vertical pixel differences on the second image and the third image.
- Step S632 determining a vertical pixel difference of the vertical pixel pair on the second image and the third image according to pixel positions of the vertical pixel pair on the second image and the third image.
- Step S642 calculating a vertical pixel difference corresponding to other pixels in the second image and the third image according to the vertical pixel difference of the vertical pixel pair.
- the vertical pixel difference of the vertical pixel pair is used as the known reference pixel difference, and the vertical pixel difference corresponding to the other pixels in the second image and the third image is obtained by the interpolation means.
- Step S652 calculating a depth value of the represented feature as a vertical depth value according to a vertical pixel difference corresponding to each pixel point in the second image and the third image.
- the depth value of the feature F represented by each pixel point in the second image and the third image can be calculated as the vertical depth value F Zy using the above formula (10).
- Step S660 calculating spatial position coordinates of the corresponding feature in the horizontal direction and in the vertical direction according to the horizontal depth value and the vertical depth value.
- the spatial position coordinates of the feature indicated by the horizontal depth value in the horizontal direction and in the vertical direction can be calculated according to the above formulas (1) and (2).
- the spatial position coordinates of the features indicated by the vertical depth values in the horizontal direction and in the vertical direction can be calculated according to the above formulas (6) and (7).
- the horizontal pixel difference of the horizontal pixel pair representing the human hand feature can be used as the reference pixel difference to calculate other characteristics of the human body.
- the pixel pixel corresponds to the horizontal pixel difference and utilizes the horizontal pixel pair
- the horizontal pixel difference is calculated to obtain accurate spatial position data of the human hand feature.
- the vertical pixel difference of the vertical pixel pair indicating the human head feature can be used as the reference pixel difference to calculate the other human body.
- the vertical pixel difference corresponding to the pixel of the feature, and the accurate spatial position data of the human head feature is calculated by using the vertical pixel difference of the vertical pixel pair.
- the human body can be measured in a horizontal direction based on the spatial position coordinates of each feature of the human body in the horizontal direction, for example, measuring the waist circumference of the human body, and the human body can be vertically oriented based on the spatial position coordinates of the human body features in the vertical direction.
- the measurement above for example measuring the height of the human body.
- the horizontal baseline length a between the pair of horizontal cameras C1 and C2 is not equal to the vertical baseline length b between the pair of vertical cameras C3 and C4, so that Effectively solves the problem of increasing the range of depth data that can be used and increasing the range of overlapping regions between two cameras. This contradiction is reflected in:
- the embodiment includes a pair of horizontal cameras and a pair of vertical cameras, and the two share the camera C2
- the vertical baseline length b is set to be greater than the horizontal baseline length a
- the overlapping area can be solved by a pair of horizontal cameras.
- the range of the above horizontal baseline length a and vertical baseline length b may all be selected within a range of less than or equal to 200 mm, for example, the shorter one is equal to 100 mm and the longer is equal to 200 mm.
- step S660 may further include:
- Step S661 screening horizontal depth values smaller than the set depth threshold from all horizontal depth values, The spatial position coordinates of the corresponding features in the horizontal direction and in the vertical direction are calculated.
- Step S662 screening vertical depth values greater than or equal to the depth threshold from all vertical depth values, and calculating spatial position coordinates of the corresponding features in the horizontal direction and in the vertical direction.
- a horizontal depth of less than 5 m is selected among all the horizontal depth values calculated according to the horizontal pixel difference corresponding to each pixel point in the first image and the second image.
- a value to calculate spatial position coordinates of the corresponding feature in the horizontal direction and in the vertical direction is calculated among all the vertical depth values calculated according to the vertical pixel difference corresponding to each pixel point in the second image and the third image.
- the vertical depth values whose values are greater than or equal to 5 m are filtered to calculate the spatial position coordinates of the corresponding features in the horizontal direction and in the vertical direction.
- the measurement in the horizontal direction for the feature whose depth value is less than the depth threshold will have higher measurement accuracy
- the measurement on the vertical side for the feature whose depth value is greater than or equal to the depth threshold will have higher measurement accuracy.
- the spatial positioning device may further add a fourth camera having the same parameter on the basis of the embodiment shown in FIG. 5, and the fourth camera and the first camera C1 are aligned in the horizontal direction to form another horizontal camera group.
- the embodiment includes a first pair of horizontal cameras composed of the first camera and the second camera, and a second pair of horizontal cameras including the second camera and the fourth camera, if the first pair of horizontal cameras are disposed
- the horizontal baseline length is greater than the horizontal baseline length between the second pair of horizontal cameras, so that the problem of increasing the overlapping area range can be solved by the second pair of horizontal cameras, and the depth data that can be used can be solved by the first pair of horizontal cameras.
- the scope of the problem If the horizontal baseline length between the first pair of horizontal cameras is set to be smaller than the horizontal baseline length between the second pair of horizontal cameras, the problem of increasing the overlapping area range can be solved by the first pair of horizontal cameras, and the second pair of levels is passed. The camera solves the problem of increasing the range of depth data that can be used.
- each of the two pairs of horizontal cameras can obtain spatial position data of the physical features in accordance with the positioning processing method shown in FIG. 2 or FIG. Therefore, the structure can form a combination of the second camera C2 through the first camera C1, the second camera C2, and the third camera C3, and can also be shared by the fourth camera, the second camera C2, and the third camera C3.
- Another combination of the two cameras C2, the two combinations can not only realize the data supplement of the physical feature F of the same space, but also combine to use the second camera C2 as a reference to achieve the same
- the data supplement of a spatial physical feature F is more conducive to achieving more precise and flexible spatial positioning.
- the fourth camera may be disposed on the side of the first camera C1 so that the fourth camera and the second camera C2 are disposed on both sides of the first camera C1, so as to be able to share the first camera C1.
- the horizontal camera group spatially positions the spatial physical feature F.
- the spatial positioning device may further add a fifth camera having the same parameter on the basis of the embodiment shown in FIG. 5, and the fifth camera and the third camera C3 are aligned in the vertical direction to form another vertical camera group.
- each of the two pairs of vertical cameras can obtain spatial position data of the physical features in accordance with the positioning processing method shown in FIG. 2 or FIG. Therefore, the structure can form a combination of the second camera C2 through the first camera C1, the second camera C2, and the third camera C3, and can also be shared by the fifth camera, the second camera C2, and the first camera C1. According to another combination of the two cameras C2, the two combinations can not only realize the data supplement of the spatial physical feature F, but also combine the data of the physical feature F with the second camera C2 as a reference, which is more conducive to achieving more. Accurate and flexible spatial positioning.
- the fifth camera may also be disposed on the side of the third camera C3 such that the fifth camera and the second camera C2 are disposed on both sides of the third camera C3, so as to be able to share the third camera C3.
- the vertical camera group spatially positions the spatial physical feature F.
- the spatial positioning device of the embodiment of the present invention may further add other cameras to be part of the horizontal camera group and/or the vertical camera group on the basis of the fourth camera and/or the fifth camera.
- FIG. 7 is a block schematic diagram of a positioning processing apparatus in accordance with an embodiment of the present invention.
- the positioning processing apparatus of this embodiment includes an image acquisition module 710, a pixel difference calculation module 720, a full pixel matching module 730, a depth value calculation module 740, and a coordinate calculation module 750.
- the image acquisition module 710 is configured to respectively acquire images acquired by the horizontal camera group and the vertical camera group at the same time.
- the pixel difference calculation module 720 is configured to calculate a horizontal pixel difference of pixel pairs representing the same feature in the same object according to the image acquired by the horizontal camera group, and calculate pixel pairs representing the same feature in the same object according to the image acquired by the vertical camera group. The vertical pixel difference.
- the full pixel matching module 730 is configured to calculate a horizontal pixel difference corresponding to other pixels in the image captured by the horizontal camera group according to the horizontal pixel difference of the pixel pair, and calculate a vertical camera group collection according to the vertical pixel difference of the pixel pair.
- the other pixel points in the image correspond to the vertical pixel difference.
- the depth value calculation module 740 is configured to calculate a depth value of the represented feature as a horizontal depth value according to a horizontal pixel difference corresponding to each pixel point in the image acquired by the horizontal camera group, and each pixel point in the image collected according to the vertical camera group The corresponding vertical pixel difference calculates a depth value corresponding to the represented feature as a vertical depth value.
- the coordinate calculation module 750 is configured to calculate spatial position coordinates of the corresponding feature in the horizontal direction and the vertical direction according to the horizontal depth value and the vertical depth value.
- FIG. 8 is a block schematic diagram of a positioning processing apparatus in accordance with another embodiment of the present invention.
- the embodiment shown in Fig. 8 corresponds to the spatial positioning device of the embodiment shown in Fig. 5.
- the image acquisition module 710 is configured to acquire images acquired by the first camera, the second camera, and the third camera at the same time, corresponding to the first image, the second image, and the third image, respectively.
- the pixel difference calculation module 720 further includes a horizontal pixel difference calculation unit 721 and a vertical pixel difference calculation unit 722.
- the horizontal pixel difference calculation unit 721 is configured to compare the first image and the second image, and obtain, in a horizontal direction, a pixel point pair indicating the same feature in the same object as a horizontal pixel pair; and according to the horizontal pixel pair in the first image and the second image The pixel position on the image determines the horizontal pixel difference of the horizontal pixel pair on the first image and the second image.
- the vertical pixel difference calculation unit 722 is configured to compare the second image and the third image, and obtain a pair of pixel points representing the same feature in the same object as a vertical pixel pair in a vertical direction; and a second image and a The pixel position on the three images determines the vertical pixel difference of the vertical pixel pair on the second image and the third image.
- the full pixel matching module 730 further includes a horizontal full pixel matching unit 731 and a vertical full pixel matching unit 732.
- the horizontal full pixel matching unit 731 is configured to calculate a horizontal pixel difference corresponding to other pixels in the first image and the second image according to the horizontal pixel difference of the horizontal pixel pair.
- the vertical full pixel matching unit 732 is configured to calculate a vertical pixel difference corresponding to other pixel points in the second image and the third image according to the vertical pixel difference of the vertical pixel pair.
- the depth value calculation module 740 further includes a horizontal depth value calculation unit 741 and a vertical depth value calculation unit 742.
- the horizontal depth value calculation unit 741 is configured to calculate a depth value of the represented feature as a horizontal depth value according to a horizontal pixel difference of each pixel point in the first image and the second image.
- the vertical depth value calculation unit 742 is configured to use each pixel in the second image and the third image The vertical pixel difference of the point, and the depth value of the represented feature is calculated as the vertical depth value.
- the coordinate calculation module 750 is configured to calculate spatial position coordinates of the corresponding feature in the horizontal direction and in the vertical direction according to the horizontal depth value and the vertical depth value.
- coordinate calculation module 750 can be further used to:
- a vertical depth value greater than or equal to the depth threshold is filtered from all vertical depth values, and spatial position coordinates of the corresponding feature in the horizontal direction and in the vertical direction are calculated.
- the coordinate calculation module 750 can address the problem of increasing the range of depth data that can be enabled and increasing the range of overlapping regions between the two cameras.
- FIG. 9 is a block schematic diagram of a virtual reality system in accordance with an embodiment of the present invention.
- the virtual reality system includes any of the above spatial positioning devices, labeled 910 in FIG.
- the spatial positioning device 910 is, for example, a spatial positioning device in the embodiment shown in FIG.
- the virtual reality system also includes any of the above positioning processing devices, such as the positioning processing device shown in FIG. 7 or FIG. 8, which is labeled 920 in FIG.
- the virtual reality system can also include a headset, a control handle, and the like.
- the positioning processing device 920 can be integrated with the spatial positioning device 910, and the positioning processing device 920 can transmit the spatial location data of the required feature to the host of the virtual reality system for human-computer interaction through the communication device 430.
- the positioning processing device 920 can also integrate at least the first processor with the spatial positioning device 910 and set a portion of the processor in the host of the virtual reality system.
- the host can be a fixed host or a mobile host.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Studio Devices (AREA)
Abstract
一种空间定位装置、定位处理方法及装置。空间定位装置包括水平摄像头组和垂直摄像头组,水平摄像头组和垂直摄像头组各自包括参数相同的至少两个摄像头,参数包括图像分辨率、水平方向的镜头视角和垂直方向的镜头视角;水平摄像头组的至少两个摄像头在水平方向上对齐设置,垂直摄像头组的至少两个摄像头在垂直方向上对齐设置;空间定位装置由于在不同的方向上设置了摄像头组,可以有效减少甚至消除单一方向拍摄图像过程中出现的盲点数;另外,增设的垂直摄像头组还可以改善实物在垂直方向的空间位置坐标的测量精度,进而提高实物的定位精度。
Description
本发明涉及空间定位技术领域,更具体地,本发明涉及一种空间定位装置、一种用于该种空间定位装置的定位处理方法、及一种用于该种空间定位装置的定位处理装置。
目前的空间定位装置主要采用双目摄像头,通过双目摄像头采集的图像获取空间实物的空间位置数据,该空间位置数据包括深度值、沿水平方向的空间位置坐标、及沿垂直方向的空间位置坐标,进而实现空间实物的空间定位。在此基础上,通过比较空间实物在不同时间点的空间位置数据便可确定空间实物的动作,实现基于动作指挥的人机交互功能。
通过双目摄像头进行空间定位存在的问题包括盲区问题,盲区即为两个摄像头所拍摄图像的非重合区。参照图1所示,左侧摄像头C1对应拍摄区域Va1,右侧摄像头C2对应拍摄区域Va2,两个摄像头C1、C2不仅在拍摄区域Va1与拍摄区域Va2的非交叠区存在盲区,而且在拍摄区域Va1与拍摄区域Va2的交叠区也可能存在盲区,这是由于空间实物的凹凸不平所导致的,在某些特定的条件下便会出现该种现象。以图1为例,左侧摄像头C1在交叠区存在盲区D1,右侧摄像头C2在交叠区存在盲区D2,因此,左侧摄像头C1能够拍摄到的空间实物的特征是F1、F2、F3、F4、F6,右侧摄像头能够拍摄到的空间实物的特征是F2、F4、F5、F6、F7,以上每一特征对应图像上的一个像素点,这样,在特征F1至F7中,能够根据左侧摄像头C1和右侧摄像头C2采集的图像获得深度值的仅包括特征F2、F4、F6,特征F3、F5因分别位于右侧摄像头和左侧摄像头的盲区内而成为双目摄像头的盲点。由于特征F3、F5处于两个摄像头的拍摄区域的交叠区(中央区域),即二者位于期望的空间定位区域内,若无法获取深度值将是一个很大的技术漏洞,因此,交叠区的盲点问题已成为空间定位技术需要亟待解决的问题。
发明内容
本发明实施例的一个目的是提供一种空间定位的新的技术方案,以至少减少交叠区内的盲点数量。
根据本发明的第一方面,提供了一种空间定位装置,其包括水平摄像头组和垂直摄像头组,该水平摄像头组和垂直摄像头组各自包括参数相同的至少两个摄像头,该参数包括图像分辨率、水平方向的镜头视角和垂直方向的镜头视角;该水平摄像头组的至少两个摄像头在该水平方向上对齐设置,该垂直摄像头组的至少两个摄像头在该垂直方向上对齐设置。
根据本发明的第二方面,还提供了一种用于根据本发明的第一方面的空间定位装置的定位处理方法,其包括:
分别获取所述水平摄像头组和垂直摄像头组在同一时间采集的图像;
根据所述水平摄像头组采集的图像计算表示同一实物中相同特征的像素点对的水平像素差,及根据所述垂直摄像头组采集的图像计算表示同一实物中相同特征的像素点对的垂直像素差;
根据所述像素点对的水平像素差,计算所述水平摄像头组采集的图像中的其他像素点对应的水平像素差,及根据所述像素点对的垂直像素差,计算所述垂直摄像头组采集的图像中的其他像素点对应的垂直像素差;
根据所述水平摄像头组采集的图像中每一像素点对应的水平像素差计算所表示特征的深度值作为水平深度值,及根据所述垂直摄像头组采集的图像中每一像素点对应的垂直像素差计算所表示特征的深度值作为垂直深度值;
根据所述水平深度值和垂直深度值,计算得到对应特征沿所述水平方向和所述垂直方向的空间位置坐标。
根据本发明的第三方面,还提供了一种用于根据本发明第一方面的空间定位装置的定位处理装置,其包括:
图像获取模块,用于分别获取所述水平摄像头组和垂直摄像头组在同一时间采集的图像;
像素差计算模块,用于根据所述水平摄像头组采集的图像计算表示同一实物中相同特征的像素点对的水平像素差,及根据所述垂直摄像头组采集的图像计算表示同一实物中相同特征的像素点对的垂直像素差;
全像素匹配模块,用于根据所述像素点对的水平像素差,计算所述水平摄像头组采集的图像中的其他像素点对应的水平像素差,及根据所述像素点对的垂直像素差,计算所述垂直摄像头组采集的图像中的其他像素点对应的垂直像素差;
深度值计算模块,用于根据所述水平摄像头组采集的图像中每一像素
点对应的水平像素差计算所表示特征的深度值作为水平深度值,及根据所述垂直摄像头组采集的图像中每一像素点对应的垂直像素差计算所表示特征的深度值作为垂直深度值;以及,
坐标计算模块,用于根据所述水平深度值和垂直深度值,计算得到对应特征沿所述水平方向和所述垂直方向的空间位置坐标。
本发明的一个有益效果在于,设置水平摄像头组和垂直摄像头组,同时对图像进行采集处理,由于在不同的方向上设置了摄像头组,可以有效减少甚至消除单一方向拍摄图像过程中出现的盲点数;另外,增设的垂直摄像头组还可以改善实物在垂直方向的空间位置坐标的测量精度,进而提高实物的定位精度。
通过以下参照附图对本发明的示例性实施例的详细描述,本发明的其它特征及其优点将会变得清楚。
被结合在说明书中并构成说明书的一部分的附图示出了本发明的实施例,并且连同其说明一起用于解释本发明的原理。
图1为现有双目摄像头的结构示意图;
图2为根据本发明实施例的定位处理方法的流程示意图;
图3a为任一摄像头的沿水平方向的像素与空间位置坐标换算关系的示意图;
图3b为任一摄像头的沿垂直方向的像素与空间位置坐标换算关系的示意图;
图4为根据本发明实施例的定位处理装置的一种硬件结构示意图;
图5为本发明实施例的空间定位装置的结构示意图;
图6为用于图5中空间定位装置的一种定位处理方法的流程示意图;
图7为根据本发明实施例的定位处理装置的原理框图;
图8为用于图5中空间定位装置的一种定位处理装置的原理框图;
图9为根据本发明实施例的虚拟现实系统的原理框图。
现在将参照附图来详细描述本发明的各种示例性实施例。应注意到:这些实施例仅仅是说明性的,决不作为对本发明及其应用或使用的任何限制。
<空间定位装置的摄像头配置结构>
根据本发明实施例的空间定位装置包括水平摄像头组和垂直摄像头组;
该水平摄像头组包括参数相同的至少两个摄像头,水平摄像头组的至少两个摄像头在水平方向上对齐设置;
该垂直摄像头组也包括参数相同的至少两个摄像头,垂直摄像头组的至少两个摄像头在垂直方向上对齐设置;
摄像头的图像分辨率Px×Py决定了所采集图像的每行(水平方向)的像素数和每列(垂直方向)的像素数,其中,每行的像素数为Px,每列的像素数为Py。
摄像头的水平方向的视场角度2φ决定了摄像头在水平方向上的最大摄取范围。本发明中的水平方向具体指摄像头的图像传感器标定的水平方向。
水平摄像头组的至少两个摄像头在水平方向上对齐设置。该对齐使得水平摄像头组的至少两个摄像头的图像传感器的任意相同点(例如中心点、四个边角点)的连线均平行于水平方向。
对于型号相同的各摄像头,例如可以通过设置各摄像头的底面共面、及各摄像头的前端面共面来实现各摄像头在水平方向上的对齐。
垂直摄像头组的至少两个摄像头在垂直方向上对齐设置。该对齐使得垂直摄像头组的至少两个摄像头的图像传感器的任意相同点(例如中心点、四个边角点)的连线均平行于垂直方向。
对于型号相同的各摄像头,例如可以通过设置各摄像头的前端面共面、及各摄像头的左端面和/或右端面共面来实现各摄像头在垂直方向上的对齐。
由于本发明实施例的空间定位装置分别在水平方向上和垂直方向上设置了水平摄像头组和垂直摄像头组,这样,通过控制两个摄像头组同时采集图像,便能获得空间实物的能够通过比对像素点内容被识别的特征在同一时刻的两组深度值数据,通过两组深度值数据的互相补充便可以有效减少甚至消除单一方向拍摄图像过程中出现的盲点数。另外,分别设置水平摄像头组和垂直摄像头组还可以提高实物在水平方向和垂直方向的空间位置坐标的测量精度,进而提高对空间实物的定位精度。根据本发明实施例的空间定位装置可以包括一个该种水平摄像头组,或者两个以上(包括两
个)该种水平摄像头组。
根据本发明实施例的空间定位装置可以包括一个该种垂直摄像头组,或者两个以上(包括两个)该种垂直摄像头组。
<空间定位装置的定位处理方法>
图2为用于以上空间定位装置的一种定位处理方法的流程示意图。
根据图2所示,该定位处理方法可以包括:
步骤S210,分别获取水平摄像头组和垂直摄像头组在同一时间采集的图像。
实施本发明定位处理方法的定位处理装置例如可以通过至少一个处理器接收水平摄像头组和垂直摄像头组中的每一摄像头采集到的图像。
步骤S220,根据水平摄像头组采集的图像计算表示同一实物中相同特征的像素点对的水平像素差,及根据垂直摄像头组采集的图像计算表示同一实物中相同特征的像素点对的垂直像素差。
每一像素点对表示同一实物中相同特征说明:像素点对的图像内容为同一实物的相同特征,例如,像素点对的图像内容为同一人物的相同手部特征。
在水平摄像头组采集的图像及垂直摄像头组采集的图像中,能够通过比对像素点内容提取到像素点对的实物特征为该实物的边缘特征、角部特征等。例如,水平摄像头组采集的图像中,有两幅图像具有表示同一人物的手部特征的像素点,通过比对得到表示手部相同边缘特征的像素点在两幅图像中位于相同的像素行,但具有不同的像素位置,二者之间的像素坐标的差值便为水平像素差。
又例如,垂直摄像头组采集的图像中,有两幅图像具有表示同一人物的头部特征的像素点,通过比对得到表示头部相同边缘特征的像素点在两幅图像中位于相同的像素列,但具有不同的像素位置,二者之间的像素坐标的差值便为垂直像素差。
在该步骤中,可以分别针对水平摄像头组采集的图像及垂直摄像头组采集的图像提取所有像素点,并通过像素点的来源摄像头及像素坐标标记每一像素点,再在来自水平摄像头组的像素点之间、及来自垂直摄像头组的像素点之间分别进行相同特征的比对,得到表示同一实物中相同特征的像素点对,进而根据每一像素点对的像素位置获得水平像素差或者垂直像素差。
步骤S230,根据像素点对的水平像素差,计算水平摄像头组采集的图像中的其他像素点对应的水平像素差,及根据像素点对的垂直像素差,计算垂直摄像头组采集的图像中的其他像素点对应的垂直像素差。
由于能够通过比对像素点内容得到像素点对的实物特征有限,仅限于边缘特征、角部特征等,而空间实物的测量不仅需要这些像素点对所表示特征的空
间位置数据,也需要其他特征的空间位置数据,因此,在该步骤S230中,可以将像素点对的水平像素差作为基准,计算出水平摄像头组采集的图像中的其他像素点对应的水平像素差,及将像素点对的垂直像素差作为基准,计算垂直摄像头组采集的图像中的其他像素点对应的垂直像素差。
以水平摄像头组采集的第一图像为例,设第一图像的一部分像素点与水平摄像头组采集的其他图像(其他图像由水平摄像头组中,除采集第一图像的摄像头以外的其他摄像头获得)通过比对成为像素点对,则第一图像中除该一部分像素点以外的其他部分像素点则为第一图像的其他像素点。
以垂直摄像头组采集的第三图像为例,设第三图像的一部分像素点与垂直摄像头组采集的其他图像(其他图像由垂直摄像头组中,除采集第三图像的摄像头以外的其他摄像头获得)通过比对成为像素点对,则第三图像中除该一部分像素点之外的其他部分像素点则为第三图像的其他像素点。
通过步骤S230,可以获得水平摄像头组采集的每一图像的所有像素点对应的水平像素差,及垂直摄像头组采集的每一图像的所有像素点对应的垂直像素差。
例如,水平摄像头组采集的一图像中,像素点A1与水平摄像头组采集的另一图像中的像素点A2形成像素点对A,像素点对A之间的水平像素差为dxa,像素点B1与该另一图像中像素点B2形成像素点B,像素点B之间的水平像素差为dxb,其中,像素点A1与像素点B1位于同一像素行,二者之间在水平方向上间隔n个像素点,这样,可以通过对水平像素差dxb与水平像素差dxa在n个像素点上进行线性插值,得到n个像素点中每一像素点的水平像素差。
又例如,垂直摄像头组采集的一图像中,像素点C1与垂直摄像头组采集的另一图像中的像素点C2形成像素点对C,像素点对C之间的垂直像素差为dyc,像素点D1与该另一图像中像素点D2形成像素点D,像素点D之间的垂直像素差为dyd,其中,像素点C1与像素点D1位于同一像素列,二者之间在垂直方向上间隔m个像素点,这样,可以通过对垂直像素差dyc与垂直像素差dyd在m个像素点上进行线性插值,得到m个像素点中每一像素点的垂直像素差。
步骤S240,根据水平摄像头组采集的图像中每一像素点对应的水平像素差计算所表示特征的深度值作为水平深度值,及根据垂直摄像头组采集
的图像中每一像素点对应的垂直像素差计算所表示特征的深度值作为垂直深度值。
以上水平深度值为对应特征与水平摄像头组的图像传感器所在平面间的距离,即在图3a和图3b中Z轴方向上的距离。
以上垂直深度值为对应特征与垂直摄像头组的图像传感器所在平面间的距离,即在图3a和图3b中Z轴方向上的距离。
在该步骤中,设对应特征F的水平像素差为dx、垂直像素差为dy、水平深度值为FZx、及垂直深度值为FZy,下面参照图3a和图3b说明水平深度值FZx与水平像素差dx之间的关系、及垂直深度值为FZy与垂直像素差为dy之间的关系。
对于水平摄像头组中的任一摄像头,参照图3a和图3b所示,其所采集图像上的表示特征F的像素点的像素坐标为(Fx,Fy),该像素坐标与特征F沿水平方向和垂直方向的空间位置坐标(UF,VF)之间的关系为:
在图3a和图3b中,U轴、V轴、Z轴代表空间坐标系,其中,U轴沿水平方向设置、V轴沿垂直方向设置、Z轴垂直于图像传感器所在平面。
在公式(1)和(2)中:(UF,VF)为特征F沿水平方向和垂直方向的空间位置坐标;(U0,V0)为像素坐标为(0,0)的像素点所表示的特征在水平方向和垂直方向上的空间位置坐标;(Fx,Fy)为特征F的像素点的像素坐标;FZx为水平深度值,Px为对应摄像头的每行的像素数,Py为对应摄像头的每列的像素数;φ为对应摄像头的水平方向的视场角度的一半;为对应摄像头的垂直方向的视场角度的一半。
如果该特征F同时存在于水平摄像头组的两个摄像头采集的图像中,则:
对于其中一个摄像头,按照上述公式(1)可以得到如下公式(3):
UF=σFx×Fx+U0 公式(3);
对于其中另一个摄像头,按照上述公式(1)可以得到如下公式(4):
UF=σFx×(Fx-dx)+(U0+a) 公式(4);
其中,a为两个摄像头在水平方向上的距离,即水平基线长度;dx为水平像素差。
结合公式(3)和公式(4),可得到:
因此,如果特征F同时存在于水平摄像头组的两个摄像头采集的图像中,则可以根据公式(1)、公式(2)和(5)计算得到特征F的空间位置数据,该空间位置数据包括特征F的水平深度值FZx、及沿水平方向和垂直方向的空间位置坐标(UF,VF)。
对于垂直摄像头组的任一摄像头,同样参照图3a和图3b所示,其所采集图像上的表示特征F的像素点的像素坐标为(Fx,Fy),该像素坐标与特征F沿水平方向和垂直方向的空间位置坐标(UF,VF)之间的关系为:
在公式(6)和(7)中:(UF,VF)为特征F沿水平方向和垂直方向的空间位置坐标;(U0,V0)为像素坐标为(0,0)的像素点所表示的特征在水平方向和垂直方向上的空间位置坐标;(Fx,Fy)为特征F的像素点的像素坐标;FZy为垂直深度值,Px为对应摄像头的每行的像素数,Py为对应摄像头的每列的像素数;φ为对应摄像头的水平方向的视场角度的一半;为对应摄像头的垂直方向的视场角度的一半。
如果该特征F同时存在于垂直摄像头组的两个摄像头采集的图像中,则:
对于其中一个摄像头,按照上述公式(7)可以得到如下公式(8):
VF=σFy×Fy+V0 公式(8);
对于其中另一个摄像头,按照上述公式(2)可以得到如下公式(9):
VF=σFy×(Fy-dy)+(V0+b) 公式(9);
其中,b为两个摄像头在垂直方向上的距离,即垂直基线长度;dy为垂直像素差。
结合公式(8)和公式(9),可得到:
因此,如果特征F同时存在于垂直摄像头组的两个摄像头采集的图像中,则可以根据公式(6)、公式(7)和公式(10)计算得到特征F的空间位置数据,该空间位置数据包括特征F的垂直深度值FZy、及沿水平方向和垂直方向的空间位置坐标(UF,VF)。
步骤S250,根据水平深度值和垂直深度值,计算得到对应特征的空间
位置坐标。
在该步骤S250中,可以根据以上公式(1)、公式(2)和(5)或者以上公式(6)、公式(7)和公式(10)计算得到特征F沿水平方向和垂直方向的空间位置坐标。
由此可见,根据本发明的空间定位装置,可以通过以上定位处理方法对水平摄像头组和垂直摄像头组在同一时间采集到的图像进行处理,由于在不同的方向上设置了摄像头组,因此,在步骤S220中,能够在不同的方向上通过比对像素点内容提取到表示同一实物中相同特征的像素点对,并得到每一像素点对的准确像素差作为基准像素差,以通过不同方向上的像素点对的相互补充减少甚至消除盲点的数量。这样,在步骤S230中,便具有更多的用于计算其他像素点对应的像素差的基准像素差,进而提高通过插值等手段计算得到的所有图像中每一像素点对应的像素差的准确性,提高空间定位的可靠性。
另外,由于摄像头的固有失真,摄像头成像与实物是有微小差异的,这体现在:位于图像中间的成像与实物一致,处于图像边缘的成像比实物略小,这就会导致基于图像进行实物的测量存在偏差。而根据本发明实施例的空间定位装置,由于分别设置了水平摄像头组和垂直摄像头组,因此,可以利用水平摄像头组中两个摄像头之间的具有参考作用的水平基线长度,有效减小通过由水平像素差计算得到的特征F沿水平方向的空间位置坐标、对实物进行水平方向测量的偏差,以能够将水平方向的测量偏差控制在可以接受的范围内,这对于进行实物在水平方向上的测量是有利的。同时,还可以利用垂直摄像头组中两个摄像头之间的具有参考作用的垂直基线长度,有效减小通过由垂直像素差得到的特征F沿垂直方向的空间位置坐标、对实物进行垂直方向测量的偏差,以还能够将垂直方向的测量偏差控制在可以接受的范围内,这对于进行实物在垂直方向上的测量是有利的。
本发明实施例的空间定位装置可以固定安装在选定的定位空间中。
本发明实施例的空间定位装置也可以固定安装在运动物体上,例如在虚拟现实应用中,安装在虚拟现实头盔上。
<定位处理装置的硬件结构>
根据本发明实施例的空间定位装置的每一摄像头均需要将各自采集的图像发送至实施以上定位处理方法的定位处理装置中进行像素点的提取、匹配等处理,以根据每一摄像头采集的图像计算得到所需特征的空间位置数据。
图4为根据本发明实施例的定位处理装置的硬件结构示意图。
根据图4所示,该定位处理装置可以包括至少一个处理器410和至少
一个存储器420。
该存储器420用于存储指令,该指令用于控制处理器410进行操作以执行根据本发明的定位处理方法。
该存储器420可以包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。
在至少一个处理器410中,第一处理器与空间定位装置的每一摄像头例如通过MIPI总线连接,以获取每一摄像头采集到的图像。
第一处理器可以在获取到每一摄像头采集到的图像后,直接执行根据本发明的定位处理方法,以获得空间实物的空间位置数据。
第一处理器也可以在获取到每一摄像头采集到的图像后,对各图像进行预处理,并将预处理后的图像通过图4中的通信装置430或者数据总线发送到至少一个处理器中的其他处理器执行根据本发明的定位处理方法。
该通信装置430可以是有线通信装置,例如USB通信装置等。
该通信装置430也可以是无线通信装置,例如蓝牙通信装置、WIFI通信装置等。
第一处理器还可以在获取到每一摄像头采集到的图像后,先根据本发明的定位处理方法计算得到空间实物的深度值数据,并将深度值数据通过图4中的通信装置430或者数据总线发送到至少一个处理器中的其他处理器执行根据本发明的定位处理方法,以进一步计算得到空间实物的其他空间位置数据,例如沿水平方向和垂直方向的空间位置坐标等。
<例子1>
图5为根据本发明实施例的空间定位装置的配置结构示意图。
根据图5所示,在该实施例中,空间定位装置包括第一摄像头C1、第二摄像头C2和第三摄像头C3,三个摄像头C1、C2、C3具有相同的参数,该参数包括图像分辨率Px×Py、水平方向的视场角度2φ、及垂直方向的视场角度
第一摄像头C1与第二摄像头C2在水平方向上对齐设置构成水平摄像头组的一对水平摄像头。
第三摄像头C3与第二摄像头C2在垂直方向上对齐设置构成垂直摄像头组的一对垂直摄像头。
在该实施例中,由于一对水平摄像头与一对垂直摄像头共用第二摄像头C2,因此,可以第二摄像头C2为基准确定水平基线长度和垂直基线长度,并以第二摄像头C2作为基准在一对水平摄像头之间及一对垂直摄像头之间进行全像素的匹配,进而实现对同一空间实物的空间位置数据的相互补充,以根据定位需求进行灵活的定位处理。
根据该实施例的空间定位装置,以图1中的特征F5为例,特征F5为第一摄像头C1的盲点,因此,根据一对水平摄像头C1、C2将无法获得特征F5的准确深度值。但是,通过增加摄像头C3与摄像头C2组成一对垂直摄像头,则在特征F5能够被摄像头C3所拍摄到的情况下,便可以根据一对垂直摄像头C2、C3获得特征F5的准确深度值,进而使得特征F5不再成为空间定位装置的盲点。由此可见,通过本实施例的空间定位装置,至少可以减少甚至消除盲点,提高空间定位的可靠性。
另外,根据本实施例的空间定位装置,由于通过摄像头C1和摄像头C2组成了一对水平摄像头,二者之间具有作为参考的水平基线长度a,该水平基线长度a可以有效减小通过由水平像素差计算得到的特征F沿水平方向的空间位置坐标、对实物进行水平方向测量的偏差,以能够将对实物进行水平方向的测量偏差控制在可以接受的范围内。这是由于对实物进行水平方向的测量是基于实物各特征沿水平方向的空间位置坐标的相对差值进行的,如果各特征的沿水平方向的空间位置坐标均是基于水平基线长度a得到的数据,那么,相同的误差便可在计算相对差值时得以消除,进而提高在水平方向上的测量精度。
同理,由于本实施例的空间定位装置还通过摄像头C2和摄像头C3组成的一对垂直摄像头,二者之间具有作为参考的垂直基线长度b,该垂直基线长度b可以有效减小通过由垂直像素差计算得到的特征F沿垂直方向的空间位置坐标、对实物进行垂直方向测量的偏差,以还能够将垂直方向的测量偏差控制在可以接受的范围内。这是由于对实物进行垂直方向的测量是基于实物各特征沿垂直方向的空间位置坐标的相对差值进行的,如果各特征的沿垂直方向的空间位置坐标均是基于垂直基线长度b得到的数据,那么,相同的误差便可在计算相对差值时得以消除,进而提高在垂直方向上的测量精度。
图6为用于图5所示空间定位装置的一种定位处理方法的流程示意图。
根据图6所示,该定位处理方法可以包括如下步骤:
步骤S610,获取第一摄像头C1、第二摄像头C2和第三摄像头C3在同一时间采集到的图像,分别对应为第一图像、第二图像和第三图像。
步骤S621,比较第一图像和第二图像,沿水平方向匹配得到表示同一实物中相同特征的像素点对作为水平像素对。
该水平像素对在第一图像和第二图像上位于相同像素行的不同像素位置,因此,该水平像素对在第一图像和第二图像上具有水平像素差。
步骤S631,根据水平像素对在第一图像和第二图像上的像素位置,确定水平像素对在第一图像和第二图像上的水平像素差。
步骤S641,根据水平像素对的水平像素差,计算第一图像和第二图像中其他像素点对应的水平像素差。
在该步骤S641中,例如以水平像素对的水平像素差作为已知的基准像素差,并通过插值手段得到第一图像和第二图像中其他像素点对应的水平像素差。
步骤S651,根据第一图像和第二图像中每一像素点对应的水平像素差,计算所表示特征的深度值作为水平深度值。
在该步骤中,可以利用以上公式(5)计算第一图像和第二图像中每一像素点所表示特征F的深度值作为水平深度值FZx。
步骤S622,比较第二图像和第三图像,沿垂直方向匹配得到表示同一实物中相同的特征的像素点对作为垂直像素对。
该垂直像素对在第二图像和第三图像上位于相同像素列的不同像素位置,因此,该垂直像素对在第二图像和第三图像上具有垂直像素差。
步骤S632,根据垂直像素对在第二图像和第三图像上的像素位置,确定垂直像素对在第二图像和第三图像上的垂直像素差。
步骤S642,根据垂直像素对的垂直像素差,计算第二图像和第三图像中其他像素点对应的垂直像素差。
在该步骤S642中,例如以垂直像素对的垂直像素差作为已知的基准像素差,并通过插值手段得到第二图像和第三图像中其他像素点对应的垂直像素差。
步骤S652,根据第二图像和第三图像中每一像素点对应的垂直像素差,计算所表示特征的深度值作为垂直深度值。
在该步骤中,可以利用以上公式(10)计算第二图像和第三图像中每一像素点所表示特征F的深度值作为垂直深度值FZy。
步骤S660,根据水平深度值和垂直深度值,计算对应特征沿水平方向和沿垂直方向的空间位置坐标。
在该步骤S660中,对于一对水平摄像头C1、C2,可以根据以上公式(1)、公式(2)计算得到水平深度值所表示特征沿水平方向和沿垂直方向的空间位置坐标。
在该步骤S660中,对于一对垂直摄像头C2、C3,可以根据以上公式(6)、公式(7)计算得到垂直深度值所表示特征沿水平方向和沿垂直方向的空间位置坐标。
例如,人体手部特征同时被摄像头C1、C2采集到,而未被摄像头C3采集到,则可以利用表示该人体手部特征的水平像素对的水平像素差作为基准像素差来计算表示人体其他特征的像素点对应的水平像素差,并利用该水平像素对
的水平像素差计算得到该人体手部特征的准确的空间位置数据。
又例如,人体头部特征同时被摄像头C2、C3采集到,而未被摄像头C1采集到,则可以利用表示该人体头部特征的垂直像素对的垂直像素差作为基准像素差来计算表示人体其他特征的像素点对应的垂直像素差,并利用该垂直像素对的垂直像素差计算得到该人体头部特征的准确的空间位置数据。
进一步地,可以基于人体各特征在水平方向上的空间位置坐标对人体进行水平方向上的测量,例如测量人体的腰围,及可以基于人体各特征在垂直方向上的空间位置坐标进行人体在垂直方向上的测量,例如测量人体的身高。
<例子2>
在图5所示实施例的空间定位装置的基础上,可以设置一对水平摄像头C1、C2间的水平基线长度a不等于一对垂直摄像头C3、C4间的垂直基线长度b,这样,便可有效解决增大能够使用的深度数据范围与增大两个摄像头之间的交叠区域范围之间的矛盾问题,该矛盾体现在:
(1)参照图1可知,两个摄像头之间的距离越远,则二者之间的交叠区域范围越小,因此,为了增大二者之间的交叠区域范围以减小盲区,则需要减小两个摄像头之间的距离。
(2)以一对水平摄像头为例,水平深度值越远的特征点,在第一图像和第二图像中的水平像素差越小,这会导致基于水平像素差计算的深度数据的误差过大而无法使用,因此,为了增加能够使用的深度数据范围,则需要增大两个摄像头之间的距离。
由于本实施例包括一对水平摄像头及一对垂直摄像头,且二者共用摄像头C2,因此,如果设置垂直基线长度b大于水平基线长度a,则可以通过一对水平摄像头解决增大交叠区域范围的问题,并通过一对垂直摄像头解决增大能够使用的深度数据范围的问题。如果设置水平基线长度a大于垂直基线长度b,则可以通过一对垂直摄像头解决增大交叠区域范围的问题,并通过一对水平摄像头解决增大能够使用的深度数据范围的问题。
在解决以上矛盾问题的基础上,为了使得一对水平摄像头及一对垂直摄像头均具有合理的交叠区域,以获得尽可能多的像素点对,参考人眼的瞳距:
(1)以上水平基线长度a和垂直基线长度b的范围均可以在小于或者等于200mm的范围内选定,例如,其中的较短者等于100mm,较长者等于200mm。
(2)以上垂直基线长度b与水平基线长度a的比值小于或者等于3倍。
对应一对水平摄像头C1、C2的水平基线长度a小于一对垂直摄像头C2、C3的垂直基线长度b的空间定位装置,以上步骤S660也可以进一步包括:
步骤S661,从所有水平深度值中筛选小于设定深度阈值的水平深度值,
计算对应特征沿水平方向和沿垂直方向的空间位置坐标。
步骤S662,从所有垂直深度值中筛选大于或者等于该深度阈值的垂直深度值,计算对应特征沿水平方向和沿垂直方向的空间位置坐标。
以设定深度阈值为5m为例,根据步骤S661,在根据第一图像和第二图像中每一像素点对应的水平像素差计算得到的所有水平深度值中,筛选出数值小于5m的水平深度值来计算对应特征沿水平方向和沿垂直方向的空间位置坐标;并根据步骤S662,在根据第二图像和第三图像中每一像素点对应的垂直像素差计算得到的所有垂直深度值中,筛选出数值大于或者等于5m的垂直深度值计算对应特征沿水平方向和沿垂直方向的空间位置坐标。
以上水平基线长度a越短,该深度阈值将设定的越小。
在该例子中,对于深度值小于深度阈值的特征在水平方向上的测量将具有较高的测量精度,对于深度值大于或者等于深度阈值的特征在垂直方上的测量将具有较高的测量精度。
<例子3>
根据本发明实施例的空间定位装置还可以在图5所示实施例的基础上,增加参数相同的第四摄像头,第四摄像头与第一摄像头C1在水平方向上对齐排列构成水平摄像头组的另一对水平摄像头,其中,第一摄像头C1与第四摄像头分设在第二摄像头C2的两侧。
进一步地,还可以设置一对水平摄像头的水平基线长度a不等于另一对水平摄像头的水平基线长度,以有效解决增大能够使用的深度数据范围与增大两个摄像头之间的交叠区域范围之间的矛盾问题,这体现在:
由于本实施例包括由第一摄像头与第二摄像头构成的第一对水平摄像头、及包括由第二摄像头与第四摄像头构成的第二对水平摄像头,因此,如果设置第一对水平摄像头之间的水平基线长度大于第二对水平摄像头之间的水平基线长度,则可以通过第二对水平摄像头解决增大交叠区域范围的问题,并通过第一对水平摄像头解决增大能够使用的深度数据范围的问题。如果设置第一对水平摄像头之间的水平基线长度小于第二对水平摄像头之间的水平基线长度,则可以通过第一对水平摄像头解决增大交叠区域范围的问题,并通过第二对水平摄像头解决增大能够使用的深度数据范围的问题。
在该例子中,两对水平摄像头中的每一对均可以按照图2或者图7所示的定位处理方法获得实物特征的空间位置数据。因此,该种结构能够通过第一摄像头C1、第二摄像头C2和第三摄像头C3组成共用第二摄像头C2的一组合,还能够通过第四摄像头、第二摄像头C2和第三摄像头C3组成共用第二摄像头C2的另一组合,两个组合不仅可以分别实现对同一空间实物特征F的数据补充,还能结合起来以第二摄像头C2为基准实现对同
一空间实物特征F的数据补充,更有利于实现更精准和灵活的空间定位。
在另外的例子中,第四摄像头也可以设置在第一摄像头C1的旁侧,以使第四摄像头与第二摄像头C2分设在第一摄像头C1的两侧,以还能够通过共用第一摄像头C1的水平摄像头组对空间实物特征F进行空间定位。
<例子4>
根据本发明实施例的空间定位装置还可以在图5所示实施例的基础上,增加参数相同的第五摄像头,第五摄像头与第三摄像头C3在垂直方向上对齐排列构成垂直摄像头组的另一对垂直摄像头,其中,第三摄像头C3与第五摄像头C5分设在第二摄像头C2的两侧。
进一步地,还可以设置一对垂直摄像头的垂直基线长度b不等于另一对垂直摄像头的垂直基线长度,以有效解决增大能够使能的深度数据范围与增大两个摄像头之间的交叠区域范围之间的矛盾问题,具体分析参见例子3中的相关描述,在此不再赘述。
在该例子中,两对垂直摄像头中的每一对均可以按照图2或者图7所示的定位处理方法获得实物特征的空间位置数据。因此,该种结构能够通过第一摄像头C1、第二摄像头C2和第三摄像头C3组成共用第二摄像头C2的一组合,还能够通过第五摄像头、第二摄像头C2和第一摄像头C1组成共用第二摄像头C2的另一组合,两个组合不仅可以分别实现对空间实物特征F的数据补充,还能结合起来以第二摄像头C2为基准实现对空间实物特征F的数据补充,更有利于实现更精准和灵活的空间定位。
在另外的例子中,第五摄像头也可以设置在第三摄像头C3的旁侧,以使第五摄像头与第二摄像头C2分设在第三摄像头C3的两侧,以还能够通过共用第三摄像头C3的垂直摄像头组对空间实物特征F进行空间定位。
在另外的例子中,本发明实施例的空间定位装置还可以在第四摄像头和/或第五摄像头的基础上,再增加其他摄像头成为水平摄像头组和/或垂直摄像头组的一部分。
<定位处理装置>
图7为根据本发明实施例定位处理装置的方框原理图。
根据图7所示,该实施例的定位处理装置包括图像获取模块710、像素差计算模块720、全像素匹配模块730、深度值计算模块740、及坐标计算模块750。
该图像获取模块710用于分别获取水平摄像头组和垂直摄像头组在同一时间采集的图像。
该像素差计算模块720用于根据水平摄像头组采集的图像计算表示同一实物中相同特征的像素点对的水平像素差,及根据垂直摄像头组采集的图像计算表示同一实物中相同特征的像素点对的垂直像素差。
该全像素匹配模块730用于根据像素点对的水平像素差,计算水平摄像头组采集的图像中的其他像素点对应的水平像素差,及根据像素点对的垂直像素差,计算垂直摄像头组采集的图像中的其他像素点对应的垂直像素差。
该深度值计算模块740用于根据水平摄像头组采集的图像中每一像素点对应的水平像素差计算所表示特征的深度值作为水平深度值,及根据垂直摄像头组采集的图像中每一像素点对应的垂直像素差计算对应所表示特征的深度值作为垂直深度值。
该坐标计算模块750用于根据水平深度值和垂直深度值,计算得到对应特征沿水平方向和垂直方向的空间位置坐标。
图8为根据本发明另一实施例定位处理装置的方框原理图。
图8所示实施例与图5所示实施例的空间定位装置相对应。
在该实施例中,图像获取模块710用于获取第一摄像头、第二摄像头和第三摄像头在同一时间采集到的图像,分别对应为第一图像、第二图像和第三图像。
在该实施例中,像素差计算模块720进一步包括水平像素差计算单元721和垂直像素差计算单元722。
该水平像素差计算单元721用于比较第一图像和第二图像,沿水平方向匹配得到表示同一实物中相同特征的像素点对作为水平像素对;及根据水平像素对在第一图像和第二图像上的像素位置,确定水平像素对在第一图像和第二图像上的水平像素差。
该垂直像素差计算单元722用于比较第二图像和第三图像,沿垂直方向匹配得到表示同一实物中相同的特征的像素点对作为垂直像素对;及根据垂直像素对在第二图像和第三图像上的像素位置,确定垂直像素对在第二图像和第三图像上的垂直像素差。
在该实施例中,全像素匹配模块730进一步包括水平全像素匹配单元731和垂直全像素匹配单元732。
水平全像素匹配单元731用于根据水平像素对的水平像素差,计算第一图像和第二图像中其他像素点对应的水平像素差。
垂直全像素匹配单元732用于根据垂直像素对的垂直像素差,计算第二图像和第三图像中其他像素点对应的垂直像素差。
在该实施例中,深度值计算模块740进一步包括水平深度值计算单元741和垂直深度值计算单元742。
该水平深度值计算单元741用于根据第一图像和第二图像中每一像素点的水平像素差,计算所表示特征的深度值作为水平深度值。
该垂直深度值计算单元742用于根据第二图像和第三图像中每一像素
点的垂直像素差,计算所表示特征的深度值作为垂直深度值。
在该实施例中,坐标计算模块750用于根据水平深度值和垂直深度值,计算对应特征沿水平方向和沿垂直方向的空间位置坐标。
进一步地,以上坐标计算模块750可以进一步用于:
从所有水平深度值中筛选小于设定深度阈值的水平深度值,计算对应特征沿水平方向和沿垂直方向的空间位置坐标;以及,
从所有垂直深度值中筛选大于或者等于该深度阈值的垂直深度值,计算对应特征沿水平方向和沿垂直方向的空间位置坐标。
这样,该坐标计算模块750能够解决增大能够使能的深度数据范围与增大两个摄像头之间的交叠区域范围之间的矛盾问题。
<虚拟现实系统>
图9是根据本发明实施例的虚拟现实系统的方框原理图。
根据图9所示,该虚拟现实系统包括以上任一种空间定位装置,在图9中被标记为910。
该空间定位装置910例如是图5所示实施例中的空间定位装置。
该虚拟现实系统还包括以上任一种定位处理装置,该定位处理装置例如是图7或图8中所示的定位处理装置,在图9中被标记为920。
该虚拟现实系统还可以包括头戴设备、控制手柄等。
该定位处理装置920可以与空间定位装置910集成在一起,该定位处理装置920可以通过通信装置430将所需特征的空间位置数据发送至虚拟现实系统的主机进行人机交互。
该定位处理装置920也可以至少将第一处理器与空间定位装置910集成在一起,并将部分处理器设置在虚拟现实系统的主机中。该主机可以是固定式主机,也可以是移动主机。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分相互参见即可,每个实施例重点说明的都是与其他实施例的不同之处,但本领域技术人员应当清楚的是,上述各实施例可以根据需要单独使用或者相互结合使用。另外,对于装置实施例而言,由于其是与方法实施例相对应,所以描述得比较简单,相关之处参见方法实施例的对应部分的说明即可。以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的。
以上已经描述了本发明的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本发明的范围由所附权利要求来限定。
Claims (14)
- 一种空间定位装置,其特征在于,包括水平摄像头组和垂直摄像头组,所述水平摄像头组和所述垂直摄像头组各自包括参数相同的至少两个摄像头,所述参数包括图像分辨率、水平方向的镜头视角和垂直方向的镜头视角;所述水平摄像头组的至少两个摄像头在所述水平方向上对齐设置,所述垂直摄像头组的至少两个摄像头在所述垂直方向上对齐设置。
- 根据权利要求1所述的空间定位装置,其特征在于,所述水平摄像头组包括第一摄像头和第二摄像头,所述垂直摄像头组包括所述第二摄像头和第三摄像头。
- 根据权利要求2所述的空间定位装置,其特征在于,所述第一摄像头与所述第二摄像头之间的水平基线长度不等于所述第二摄像头与所述第三摄像头之间的垂直基线长度。
- 根据权利要求2或3所述的空间定位装置,其特征在于,所述第一摄像头与所述第二摄像头之间的水平基线长度小于或者等于200mm,所述第二摄像头与所述第三摄像头之间的垂直基线长度小于或者等于200mm。
- 根据权利要求2至4中任一项所述的空间定位装置,其特征在于,所述水平摄像头组还包括第四摄像头,所述第一摄像头与所述第四摄像头分设在所述第二摄像头的两侧。
- 根据权利要求5所述的空间定位装置,其特征在于,所述第一摄像头与所述第二摄像头之间的水平基线长度不等于所述第二摄像头与所述第四摄像头之间的水平基线长度。
- 根据权利要求2至6中任一项所述的空间定位装置,其特征在于,所述垂直摄像头组还包括第五摄像头,所述第三摄像头与所述第五摄像头分设在所述第二摄像头的两侧。
- 根据权利要求7所述的空间定位装置,其特征在于,所述第二摄像头与所述第三摄像头之间的垂直基线长度不等于所述第二摄像头与所述第五摄像头之间的垂直基线长度。
- 一种用于权利要求1所述空间定位装置的定位处理方法,其特征在于,包括:分别获取所述水平摄像头组和垂直摄像头组在同一时间采集的图像;根据所述水平摄像头组采集的图像计算表示同一实物中相同特征的像素点对的水平像素差,及根据所述垂直摄像头组采集的图像计算表示同 一实物中相同特征的像素点对的垂直像素差;根据所述像素点对的水平像素差,计算所述水平摄像头组采集的图像中的其他像素点对应的水平像素差,及根据所述像素点对的垂直像素差,计算所述垂直摄像头组采集的图像中的其他像素点对应的垂直像素差;根据所述水平摄像头组采集的图像中每一像素点对应的水平像素差计算所表示特征的深度值作为水平深度值,及根据所述垂直摄像头组采集的图像中每一像素点对应的垂直像素差计算所表示特征的深度值作为垂直深度值;根据所述水平深度值和垂直深度值,计算得到对应特征沿所述水平方向和所述垂直方向的空间位置坐标。
- 根据权利要求9所述的定位处理方法,所述空间定位装置的水平摄像头组包括第一摄像头和第二摄像头,所述空间定位装置的垂直摄像头组包括所述第二摄像头和第三摄像头,其特征在于,所述定位处理方法包括:获取所述第一摄像头、第二摄像头和第三摄像头在同一时间采集到的图像,分别对应为第一图像、第二图像和第三图像;比较所述第一图像和所述第二图像,沿所述水平方向匹配得到表示同一实物中相同特征的像素点对作为水平像素对;根据所述水平像素对在所述第一图像和所述第二图像上的像素位置,确定所述水平像素对在所述第一图像和所述第二图像上的水平像素差;根据所述水平像素对的水平像素差,计算所述第一图像和所述第二图像中其他像素点对应的水平像素差;根据所述第一图像和所述第二图像中每一像素点对应的水平像素差,计算所表示特征的深度值作为水平深度值;比较所述第二图像和所述第三图像,沿所述垂直方向匹配得到表示同一实物中相同的特征的像素点对作为垂直像素对;根据所述垂直像素对在所述第二图像和所述第三图像上的像素位置,确定所述垂直像素对在所述第二图像和所述第三图像上的垂直像素差;根据所述垂直像素对的垂直像素差,计算所述第二图像和所述第三图像中其他像素点对应的垂直像素差;根据所述第二图像和所述第三图像中每一像素点对应的垂直像素差,计算所表示特征的深度值作为垂直深度值;根据所述水平深度值和所述垂直深度值,计算对应特征沿所述水平方 向和沿所述垂直方向的空间位置坐标。
- 根据权利要求10所述的定位处理方法,所述第一摄像头与所述第二摄像头之间的水平基线长度小于所述第二摄像头与所述第三摄像头之间的垂直基线长度,其特征在于,所述根据水平深度值和所述垂直深度值,计算对应特征沿所述水平方向和沿所述垂直方向的空间位置坐标包括:从所有水平深度值中筛选小于设定深度阈值的水平深度值,计算对应特征沿所述水平方向和沿所述垂直方向的空间位置坐标;从所有垂直深度值中筛选大于或者等于所述深度阈值的垂直深度值,计算对应特征沿所述水平方向和沿所述垂直方向的空间位置坐标。
- 一种用于权利要求1所述空间定位装置的定位处理装置,其特征在于,包括:图像获取模块,用于分别获取所述水平摄像头组和垂直摄像头组在同一时间采集的图像;像素差计算模块,用于根据所述水平摄像头组采集的图像计算表示同一实物中相同特征的像素点对的水平像素差,及根据所述垂直摄像头组采集的图像计算表示同一实物中相同特征的像素点对的垂直像素差;全像素匹配模块,用于根据所述像素点对的水平像素差,计算所述水平摄像头组采集的图像中的其他像素点对应的水平像素差,及根据所述像素点对的垂直像素差,计算所述垂直摄像头组采集的图像中的其他像素点对应的垂直像素差;深度值计算模块,用于根据所述水平摄像头组采集的图像中每一像素点对应的水平像素差计算所表示特征的深度值作为水平深度值,及根据所述垂直摄像头组采集的图像中每一像素点对应的垂直像素差计算所表示特征的深度值作为垂直深度值;以及,坐标计算模块,用于根据所述水平深度值和垂直深度值,计算得到对应特征沿所述水平方向和所述垂直方向的空间位置坐标。
- 根据权利要求12所述的定位处理装置,所述空间定位装置的水平摄像头组包括第一摄像头和第二摄像头,所述空间定位装置的垂直摄像头组包括所述第二摄像头和第三摄像头,其特征在于,所述图像获取模块用于获取所述第一摄像头、第二摄像头和第三摄像头在同一时间采集到的图像,分别对应为第一图像、第二图像和第三图像;所述像素差计算模块包括水平像素差计算单元和垂直像素差计算单 元;所述水平像素差计算单元用于比较所述第一图像和所述第二图像,沿所述水平方向匹配得到表示同一实物中相同特征的像素点对作为水平像素对;及根据所述水平像素对在所述第一图像和所述第二图像上的像素位置,确定所述水平像素对在所述第一图像和所述第二图像上的水平像素差;所述垂直像素差计算单元用于比较所述第二图像和所述第三图像,沿所述垂直方向匹配得到表示同一实物中相同的特征的像素点对作为垂直像素对;及根据所述垂直像素对在所述第二图像和所述第三图像上的像素位置,确定所述垂直像素对在所述第二图像和所述第三图像上的垂直像素差;所述全像素匹配模块包括水平全像素匹配单元和垂直全像素匹配单元;所述水平全像素匹配单元用于根据所述水平像素对的水平像素差,计算所述第一图像和所述第二图像中其他像素点对应的水平像素差;所述垂直全像素匹配单元用于根据所述垂直像素对的垂直像素差,计算所述第二图像和所述第三图像中其他像素点对应的垂直像素差;所述深度值计算模块包括水平深度值计算单元和垂直深度值计算单元;所述水平深度值计算单元用于根据所述第一图像和所述第二图像中每一像素点对应的水平像素差,计算所表示特征的深度值作为水平深度值;所述垂直深度值计算单元用于根据所述第二图像和所述第三图像中每一像素点对应的垂直像素差,计算所表示特征的深度值作为垂直深度值;所述坐标计算模块用于根据所述水平深度值和所述垂直深度值,计算对应特征沿所述水平方向和沿所述垂直方向的空间位置坐标。
- 根据权利要求13所述的定位处理装置,所述第一摄像头与所述第二摄像头之间的水平基线长度小于所述第二摄像头与所述第三摄像头之间的垂直基线长度,其特征在于,所述坐标计算模块用于:从所有水平深度值中筛选小于设定深度阈值的水平深度值,计算对应特征沿所述水平方向和沿所述垂直方向的空间位置坐标;以及,从所有垂直深度值中筛选大于或者等于所述深度阈值的垂直深度值,计算对应特征沿所述水平方向和沿所述垂直方向的空间位置坐标。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/741,975 US10699436B2 (en) | 2017-06-21 | 2017-08-11 | Spatial positioning device and positioning processing method and device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710474296.4 | 2017-06-21 | ||
| CN201710474296.4A CN107274400B (zh) | 2017-06-21 | 2017-06-21 | 空间定位装置、定位处理方法及装置、虚拟现实系统 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018232900A1 true WO2018232900A1 (zh) | 2018-12-27 |
Family
ID=60068044
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/097098 Ceased WO2018232900A1 (zh) | 2017-06-21 | 2017-08-11 | 空间定位装置、定位处理方法及装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US10699436B2 (zh) |
| CN (1) | CN107274400B (zh) |
| WO (1) | WO2018232900A1 (zh) |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108534760A (zh) * | 2018-05-05 | 2018-09-14 | 福建汇川物联网技术科技股份有限公司 | 一种基于双目摄像机与激光测距传感器的图片测量方法 |
| CN109186455A (zh) * | 2018-09-06 | 2019-01-11 | 安徽师范大学 | 一种基于视觉测量动态物体三维坐标的装置 |
| CN109685764B (zh) * | 2018-11-19 | 2020-10-30 | 深圳市维图视技术有限公司 | 产品定位方法、装置及终端设备 |
| CN109510887A (zh) * | 2018-12-14 | 2019-03-22 | 深圳市鼎元智能科技有限公司 | 一种双镜头智能手机 |
| CN109615665B (zh) * | 2018-12-27 | 2021-02-26 | 浙江大华技术股份有限公司 | 一种坐标校准系统、方法、装置及存储介质 |
| CN111191083B (zh) * | 2019-09-23 | 2021-01-01 | 牧今科技 | 用于对象标识的方法和计算系统 |
| US11635408B2 (en) * | 2019-09-24 | 2023-04-25 | The Boeing Company | Method for tracking location of two-dimensional non-destructive inspection scanner on target object using scanned structural features |
| CN110830781B (zh) * | 2019-10-30 | 2021-03-23 | 歌尔科技有限公司 | 一种基于双目视觉的投影图像自动校正方法及系统 |
| CN111953933B (zh) * | 2020-07-03 | 2022-07-05 | 北京中安安博文化科技有限公司 | 一种确定火灾区域的方法、装置、介质和电子设备 |
| US11212503B1 (en) * | 2020-07-14 | 2021-12-28 | Microsoft Technology Licensing, Llc | Dual camera HMD with remote camera alignment |
| CN117461309A (zh) * | 2021-05-18 | 2024-01-26 | 斯纳普公司 | 对于计算机立体视觉的未对准观察点缓解 |
| CN116503570B (zh) * | 2023-06-29 | 2023-11-24 | 聚时科技(深圳)有限公司 | 图像的三维重建方法及相关装置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103868460A (zh) * | 2014-03-13 | 2014-06-18 | 桂林电子科技大学 | 基于视差优化算法的双目立体视觉自动测量方法 |
| CN104933436A (zh) * | 2014-03-19 | 2015-09-23 | 通用汽车环球科技运作有限责任公司 | 具有动态完整性评分的基于视觉的多摄像头工厂监测 |
| CN106456070A (zh) * | 2014-06-26 | 2017-02-22 | 索尼公司 | 成像装置和方法 |
| CN106529495A (zh) * | 2016-11-24 | 2017-03-22 | 腾讯科技(深圳)有限公司 | 一种飞行器的障碍物检测方法和装置 |
| CN106643699A (zh) * | 2016-12-26 | 2017-05-10 | 影动(北京)科技有限公司 | 一种虚拟现实系统中的空间定位装置和定位方法 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101794444B (zh) * | 2010-01-28 | 2012-05-23 | 南京航空航天大学 | 坐标循环逼进式对偶型正交摄像机系统视频定位方法及系统 |
| CN101777182B (zh) * | 2010-01-28 | 2012-02-29 | 南京航空航天大学 | 坐标循环逼进式正交摄像机系统视频定位方法及系统 |
| CN101807309B (zh) * | 2010-03-17 | 2011-12-21 | 浙江大学 | 基于差动拍摄装置的壁画高保真三维重建方法 |
| WO2012078126A1 (en) * | 2010-12-08 | 2012-06-14 | Thomson Licensing | System and method for trinocular depth acquisition with triangular sensor |
| CN105160680B (zh) * | 2015-09-08 | 2017-11-21 | 北京航空航天大学 | 一种基于结构光的无干扰深度相机的设计方法 |
| CN105608704A (zh) * | 2015-12-31 | 2016-05-25 | 信利光电股份有限公司 | 一种摄像头模组的校正装置 |
| CN105739231B (zh) * | 2016-05-06 | 2019-04-26 | 中国科学技术大学 | 一种平面分布的多摄像头全景立体成像装置 |
-
2017
- 2017-06-21 CN CN201710474296.4A patent/CN107274400B/zh active Active
- 2017-08-11 US US15/741,975 patent/US10699436B2/en active Active
- 2017-08-11 WO PCT/CN2017/097098 patent/WO2018232900A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103868460A (zh) * | 2014-03-13 | 2014-06-18 | 桂林电子科技大学 | 基于视差优化算法的双目立体视觉自动测量方法 |
| CN104933436A (zh) * | 2014-03-19 | 2015-09-23 | 通用汽车环球科技运作有限责任公司 | 具有动态完整性评分的基于视觉的多摄像头工厂监测 |
| CN106456070A (zh) * | 2014-06-26 | 2017-02-22 | 索尼公司 | 成像装置和方法 |
| CN106529495A (zh) * | 2016-11-24 | 2017-03-22 | 腾讯科技(深圳)有限公司 | 一种飞行器的障碍物检测方法和装置 |
| CN106643699A (zh) * | 2016-12-26 | 2017-05-10 | 影动(北京)科技有限公司 | 一种虚拟现实系统中的空间定位装置和定位方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107274400B (zh) | 2021-02-12 |
| US20190051010A1 (en) | 2019-02-14 |
| CN107274400A (zh) | 2017-10-20 |
| US10699436B2 (en) | 2020-06-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018232900A1 (zh) | 空间定位装置、定位处理方法及装置 | |
| CN108510540B (zh) | 立体视觉摄像机及其高度获取方法 | |
| CN106683071B (zh) | 图像的拼接方法和装置 | |
| JP7018566B2 (ja) | 撮像装置、画像処理方法及びプログラム | |
| JP6585006B2 (ja) | 撮影装置および車両 | |
| US20110249117A1 (en) | Imaging device, distance measuring method, and non-transitory computer-readable recording medium storing a program | |
| CN110473262A (zh) | 多目相机的外参标定方法、装置、存储介质及电子设备 | |
| JP2017112602A (ja) | パノラマ魚眼カメラの画像較正、スティッチ、および深さ再構成方法、ならびにそのシステム | |
| CN107230225A (zh) | 三维重建的方法和装置 | |
| CN108734744A (zh) | 一种基于全站仪的远距离大视场双目标定方法 | |
| CN105654547B (zh) | 三维重建方法 | |
| CN107084680B (zh) | 一种基于机器单目视觉的目标深度测量方法 | |
| CN104052986B (zh) | 检测用具、立体照相机检测装置以及检测方法 | |
| US9818199B2 (en) | Method and apparatus for estimating depth of focused plenoptic data | |
| WO2021068723A1 (zh) | 传感器标定方法和传感器标定装置 | |
| JP6694234B2 (ja) | 距離測定装置 | |
| CN110692085B (zh) | 用于摄像机设备的控制装置、摄像机组件和用于立体地拍摄监测区域的方法 | |
| WO2022241964A1 (zh) | 测温方法、计算机设备和计算机可读存储介质 | |
| CN109920003A (zh) | 相机标定检测方法、装置以及设备 | |
| CN110260801A (zh) | 用于测量物料体积的方法和装置 | |
| CN110610171A (zh) | 图像处理方法和装置、电子设备、计算机可读存储介质 | |
| TW202242716A (zh) | 用於目標匹配的方法、裝置、設備及儲存媒體 | |
| WO2021049281A1 (ja) | 画像処理装置、ヘッドマウントディスプレイ、および空間情報取得方法 | |
| CN109547692B (zh) | 图像姿态矫正方法、设备及终端 | |
| JP6602286B2 (ja) | 画像処理装置、画像処理方法およびプログラム |
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: 17915188 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: 17915188 Country of ref document: EP Kind code of ref document: A1 |