WO2021146970A1 - 基于语义分割的测距方法、装置、设备及系统 - Google Patents

基于语义分割的测距方法、装置、设备及系统 Download PDF

Info

Publication number
WO2021146970A1
WO2021146970A1 PCT/CN2020/073657 CN2020073657W WO2021146970A1 WO 2021146970 A1 WO2021146970 A1 WO 2021146970A1 CN 2020073657 W CN2020073657 W CN 2020073657W WO 2021146970 A1 WO2021146970 A1 WO 2021146970A1
Authority
WO
WIPO (PCT)
Prior art keywords
movable platform
image
obstacle
distance
angle
Prior art date
Application number
PCT/CN2020/073657
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 PCT/CN2020/073657 priority Critical patent/WO2021146970A1/zh
Priority to CN202080004229.6A priority patent/CN112639400A/zh
Publication of WO2021146970A1 publication Critical patent/WO2021146970A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying

Definitions

  • This application relates to the technical field of distance measurement, and in particular to a distance measurement method, device, device and system based on semantic segmentation.
  • a distance measuring device can be set on the movable platform to measure the distance from the movable platform to the obstacle.
  • the distance measuring device can perform distance measurement based on the image captured by the monocular camera.
  • the principle of distance measurement is specifically as follows: first perform obstacle recognition through image matching to identify obstacles, such as various car models, pedestrians, and objects, and then estimate the distance to the obstacle based on the size of the obstacle in the image.
  • the embodiments of the present application provide a distance measurement method, device, device and system based on semantic segmentation to solve the difficulty in determining the distance between an obstacle point and a movable platform in a targeted manner in the prior art, so there is Poorly targeted issues.
  • an embodiment of the present application provides a distance measurement method based on semantic segmentation, which is applied to a movable platform on which a monocular camera is provided, and the method includes:
  • the first image collected by the monocular camera is acquired, the first image includes obstacles, and the first image is processed to obtain the first feature containing semantic information picture;
  • a second image collected by the monocular camera is acquired, the second image includes the obstacle, and the second image is processed.
  • an embodiment of the present application provides a distance measuring device based on semantic segmentation.
  • the distance measuring device is applied to a movable platform, the movable platform includes a monocular camera, and the device includes: a memory and a processor;
  • the memory is used to store program code
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • the first image collected by the monocular camera is acquired, the first image includes obstacles, and the first image is processed to obtain the first feature containing semantic information picture;
  • a second image collected by the monocular camera is acquired, the second image includes the obstacle, and the second image is processed.
  • an embodiment of the present application provides a movable platform including a monocular camera and a distance measuring device;
  • the monocular camera is used to collect images;
  • the distance measuring device includes a memory and a processor;
  • the memory is used to store program code
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • the first image collected by the monocular camera is acquired, the first image includes obstacles, and the first image is processed to obtain the first feature containing semantic information Figure;
  • a second image collected by the monocular camera is acquired, the second image includes the obstacle, and the processing The second image obtains a second feature map containing semantic information; and, according to the specific pixel points of the obstacle in the first feature map and the second feature map, it is determined that the obstacle is to the movable The distance of the platform.
  • an embodiment of the present application provides a distance measuring system based on semantic segmentation, including a monocular camera and a distance measuring device, the monocular camera is set on a movable platform for collecting images; the distance measuring device Including memory and processor;
  • the memory is used to store program code
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • the first image collected by the monocular camera is acquired, the first image includes obstacles, and the first image is processed to obtain the first feature containing semantic information Figure;
  • a second image collected by the monocular camera is acquired, the second image includes the obstacle, and the processing The second image obtains a second feature map containing semantic information; and, according to the specific pixel points of the obstacle in the first feature map and the second feature map, it is determined that the obstacle is to the movable The distance of the platform.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, the at least one piece of code can be executed by a computer to control the The computer executes the method described in any one of the above-mentioned first aspects.
  • an embodiment of the present application provides a computer program, when the computer program is executed by a computer, it is used to implement the method described in any one of the above-mentioned first aspects.
  • the embodiments of the present application provide a distance measurement method, device, equipment, and system based on semantic segmentation.
  • the first image including the obstacle collected by the monocular camera is acquired, and the processing Obtain the first feature map containing semantic information from the first image.
  • the movable platform moves from the first position to the second position, obtain the second image including the obstacle collected by the monocular camera, and process the second image to obtain
  • the second feature map contains semantic information, and the distance from the obstacle to the movable platform is determined according to the specific pixels of the obstacle in the first feature map and the second feature map, and the second feature map containing semantic information is realized according to the first position.
  • the distance from the specific obstacle point of the obstacle to the movable platform can be determined, thereby improving the pertinence of determining the distance from the obstacle to the movable platform.
  • FIG. 1 is a schematic diagram of an application scenario of a distance measurement method based on semantic segmentation provided by an embodiment of this application;
  • FIG. 2 is a schematic flowchart of a distance measurement method based on semantic segmentation provided by an embodiment of this application;
  • FIG. 3A is a first image provided by an embodiment of this application.
  • FIG. 3B is a first characteristic diagram of the first image shown in FIG. 3A;
  • FIG. 4 is a schematic flowchart of a distance measurement method based on semantic segmentation according to another embodiment of the application.
  • FIG. 5 is a schematic diagram of a movable platform rotating in situ according to an embodiment of the application.
  • Fig. 6 is a schematic structural diagram of a neural network model provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of determining a first angle according to an embodiment of the application.
  • FIG. 8 is a schematic diagram of determining the distance from an obstacle to a movable platform according to an embodiment of the application.
  • FIG. 9 is a schematic diagram of determining the distance from an obstacle to a movable platform according to another embodiment of the application.
  • FIG. 10 is a schematic flowchart of a distance measurement method based on semantic segmentation provided by another embodiment of this application.
  • FIG. 11A is a first image provided by another embodiment of this application.
  • FIG. 11B is a first characteristic diagram of the first image shown in FIG. 11A;
  • FIG. 12A is a first image provided by another embodiment of this application.
  • FIG. 12B is a first characteristic diagram of the first image shown in FIG. 12A;
  • FIG. 13 is a schematic diagram of determining the distance from an obstacle to a movable platform according to another embodiment of this application.
  • FIG. 14 is a schematic structural diagram of a distance measuring device based on semantic segmentation provided by an embodiment of the application.
  • the distance measurement method based on semantic segmentation can be applied to the distance measurement system 10 shown in FIG. 1, and the distance measurement system 10 includes a monocular camera 11 and a controller 12.
  • the monocular camera 11 can be set on a movable platform to collect images; the controller 12 can obtain the image collected by the monocular camera 11 from the monocular camera 11, and use the original image according to the image collected by the monocular camera 1
  • the method provided in the application embodiment is processed to implement a distance measurement method based on semantic segmentation.
  • the movable platform may be, for example, an unmanned aerial vehicle, an unmanned vehicle, or the like.
  • the movable platform may include a controller 12, so that the controller 12 of the movable platform performs distance measurement according to an image collected by a monocular camera set on the movable platform. It is understandable that the movable platform may or may not include the monocular camera 11.
  • the first image collected by the monocular camera when the movable platform moves to the first position contains the first feature map of semantic information
  • the movable platform is controlled by the first image collected by the monocular camera.
  • the second image collected by the monocular camera contains the specific pixel points of the obstacle in the second feature map with semantic information, and the distance from the obstacle to the movable platform is determined, which realizes the determination of the distance between the obstacle and the movable platform.
  • the distance from the obstacle to the movable platform is used, the distance from the specific obstacle point of the obstacle to the movable platform can be determined, thereby improving the pertinence of determining the distance from the obstacle to the movable platform.
  • FIG. 2 is a schematic flowchart of a distance measurement method based on semantic segmentation provided by an embodiment of this application.
  • the execution subject of this embodiment may be the controller in FIG. 1, and specifically may be a controller included in a movable platform.
  • the method of this embodiment may include:
  • Step 201 Under the condition that the movable platform is moved to the first position, acquire a first image collected by the monocular camera, the first image includes an obstacle, and process the first image to obtain a semantic information The first feature map.
  • the first position can be any position during the movement of the movable platform.
  • the field of view direction of the monocular camera may be consistent with the target movement direction of the movable platform, so as to realize obstacle distance measurement in the target movement direction.
  • the field of view of the monocular camera can be the same as the target movement direction of the movable platform.
  • the field of view of the monocular camera can be directly in front of the movable platform.
  • the field of view of the monocular camera The direction can also be directly above the movable platform; or, the field of view direction of the monocular camera and the target movement direction of the movable platform can be different by a certain angle, for example, the field of view direction of the monocular camera can be the front left of the movable platform, for example
  • the direction of view of the monocular camera can also be the upper and front of the movable platform.
  • the first image may be a single image collected by the monocular camera;
  • the first image collected by the eye camera can only include part of the content of the scene of interest, the first image may be a combined image of multiple images with different viewing directions collected by the single eye camera.
  • the specific manner in which the first feature map includes semantic information may be that the pixel values in the feature map represent the object semantics of the corresponding pixels, where the object semantics may include recognizable object categories.
  • the movable platform can identify whether the image contains objects of the obstacle category. Based on this, a pixel value of 1 in the first feature map can indicate that the corresponding pixel is an obstacle category, and a pixel value of 0 can indicate that the corresponding pixel is not Obstacle category.
  • the movable platform can identify the specific types of objects contained in the image, such as sky, trees, buildings, etc.
  • the pixel position with the pixel value of 1 is the pixel position recognized as a building
  • the pixel position with the pixel value of 2 is The pixel position recognized as a tree
  • the pixel position with a pixel value of 3 is the pixel position recognized as the sky.
  • the first feature map containing semantic information may be as shown in FIG. 3B, for example.
  • the different gray levels in FIG. 3B can represent different object categories, specifically including "sky”, “buildings”, “trees” and “others”, where "others" can represent unrecognizable object categories.
  • the types of obstacles that affect the movement of the movable platform may be related to the scene targeted by the movable platform.
  • the obstacles may include buildings, trees, and so on.
  • Step 202 Under the condition that the movable platform moves from the first position to the second position, acquire a second image collected by the monocular camera, where the second image includes the obstacle, and process The second image obtains a second feature map containing semantic information.
  • the second position is different from the first position, and when the movable platform is located in the second position, the second image collected by the monocular camera may include the same as the first image.
  • the distance from the obstacle to the movable platform is determined based on the imaging of the same obstacle in the first image and the second image respectively.
  • the application does not limit the sequence of processing the first image to obtain the first feature map and obtaining the second image.
  • the first image and the second image can be processed separately to obtain the first feature map and the second feature map.
  • Step 203 Determine the distance from the obstacle to the movable platform according to specific pixels of the obstacle in the first characteristic map and the second characteristic map.
  • the characteristic pixel in the first characteristic map and the specific pixel in the second characteristic map correspond to the same part of the obstacle.
  • the specific pixel point is an obstacle pixel point of interest in the feature map, and specifically may be a key pixel point that determines the distance between the obstacle and the movable platform.
  • the specific pixel point may be a pixel point that is closest to the movable platform in the target movement direction of the movable platform among all edge pixel points of the obstacle.
  • the relative position relationship between the obstacle and the movable platform in the first position is different than the relative position relationship between the obstacle and the movable platform in the second position, so the obstacles are the same
  • the positions of the pixels in the first feature map and the second feature map are different.
  • the distance between a part of the obstacle in the first position and the movable platform, and the distance between the part of the obstacle in the second position and the movable platform, and this part in the first characteristic map and the second characteristic map there is a certain mathematical relationship between the pixel positions, so the distance from the obstacle to the movable platform can be determined according to the specific pixel points of the obstacle in the first feature map and the second feature map.
  • the first image including obstacles collected by the monocular camera is acquired, and the first image is processed to obtain the first feature map containing semantic information.
  • the platform moves from the first position to the second position the second image including the obstacle collected by the monocular camera is acquired, the second image is processed to obtain the second feature map containing semantic information, and the second feature map containing semantic information is obtained according to the first feature map and
  • the specific pixel points of the obstacle in the second feature map are determined to determine the distance from the obstacle to the movable platform, and the first feature map containing semantic information in the first position is realized, and the movement from the first position to the second position is included.
  • the specific pixel point of the obstacle in the second feature map of the voice information is used to determine the distance from the obstacle to the movable platform, so that when the distance from the obstacle to the movable platform is determined, the specific obstacle point of the obstacle can be determined to be movable The distance of the platform, thereby improving the pertinence of determining the distance from the obstacle to the movable platform.
  • the pan/tilt used to make the monocular camera move relative to the movable platform can be used to change all the images.
  • the field of view of the image acquisition device is used to obtain multiple images with different viewing directions; or, by changing the posture of the movable platform, multiple images with different viewing directions can also be obtained. In the following, the latter is mainly explained in detail.
  • FIG. 4 is a schematic flowchart of a distance measurement method based on semantic segmentation provided by another embodiment of this application.
  • This embodiment provides an optional implementation method on the basis of the embodiment shown in FIG. 2.
  • the method of this embodiment may include:
  • Step 401 When the movable platform is moved to the first position, control the movable platform to rotate in the first position by a first target angle, and rotate the first target angle in the movable platform in situ. In the process of a target angle, multiple images collected by the monocular camera at intervals of a preset angle are acquired.
  • a single image collected by the monocular camera may not contain all the content of the scene of interest, so that the movable platform can be rotated in place at the first position.
  • the field of view of the monocular camera can be continuously changed, so as to obtain images that include other parts of the scene of interest.
  • the direction of the arrow in FIG. 5 may indicate the orientation of the movable platform, and the change of the arrow direction indicates the change of the orientation when the movable platform rotates in situ.
  • the range corresponding to the two straight lines in Figure 5 represents the field of view of the monocular camera.
  • the clockwise direction of rotation in Figure 5 is only an example.
  • the first target angle can be flexibly realized according to the requirements.
  • the first target angle may be 360 degrees, that is, when the movable platform is moved to the first position, the movable platform is controlled to rotate once in the first position.
  • the preset angle can be flexibly implemented according to requirements. Specifically, the larger the preset angle, the smaller the number of images collected by in-situ rotation, and the less overlap between the images collected at adjacent moments; the smaller the preset angle, the greater the number of images collected by in-situ rotation. More, the more overlapped content between images collected at adjacent moments.
  • Step 402 Perform image merging on the multiple images to obtain the first image.
  • the first image is a combined image of multiple images collected by a monocular camera when the movable platform rotates in situ at the first position at a first target angle. Therefore, the first image may include all the content of the scene of interest in the target motion direction.
  • Step 403 Acquire a second image collected by the monocular camera when the movable platform is moved from the first position to the second position.
  • the method of acquiring the second image can be similar to the method of step 401-step 402, that is, the monocular camera can be acquired in the process of rotating the first target angle in situ at the second position of the movable platform
  • the preset angle is multiple images collected at intervals, and the multiple images are merged to obtain a second image.
  • the initial orientation of the movable platform when rotating in-situ at the second position can be the same as the initial orientation of the movable platform when rotating in-situ in the first position, based on this two times
  • the rotation direction of the in-situ rotation can be the same; or, when the first target angle is not 360°, the initial orientation of the movable platform when rotating in the second position can be the same as that of the movable platform when rotating in-situ in the first position.
  • the end orientation is the same, and the rotation direction of the two in-situ rotations can be reversed based on this.
  • step 403 may specifically include the following steps A1-step A3.
  • Step A1 Determine that the target image of the obstacle is included in the multiple images.
  • the multiple images are the images acquired in step 401. Since not every image in the multiple images may include obstacles, and for some images that include obstacles, the content of the scene about the obstacles may be repeated. Therefore, the target image for determining the distance can be determined from the partial images of the plurality of images including obstacles.
  • the number of target images can be one or more.
  • image recognition processing may be performed on each of the multiple images to identify whether each image includes obstacles.
  • image recognition processing may be performed on each of the multiple images to identify whether each image includes obstacles.
  • Step A2 Determine a second target angle rotated by the monocular camera to collect the target image.
  • the target image is acquired by the monocular camera rotating at a specific angle of the movable platform, and the specific angle is the second target angle.
  • the second target angle may correspond to a specific orientation of the movable platform. In the case of multiple target images, the number of second target angles may be multiple.
  • Step A3 Acquire a second image collected by the monocular camera when the movable platform is moved to the second position and rotated to the orientation corresponding to the second target angle.
  • the orientation of the movable platform when the monocular camera collects the second image is the same as the orientation of the movable platform when the monocular camera collects the target image.
  • steps A1-step A3 it is possible to directly control the movable platform to rotate to a specific orientation when in the second position, and obtain the second image collected by the monocular camera in the specific orientation. Compared with the multiple images collected by the eye camera at intervals of a preset angle and combining the multiple images to obtain the second image, this reduces the number of times of image acquisition by the monocular camera, which is beneficial to shorten the time for obtaining the second image. .
  • Step 404 Process the first image and the second image to obtain a first feature map and a second feature map containing semantic information.
  • a pre-trained neural network model may be used to process the first image and the second image separately to obtain a first feature map and a second feature map containing semantic information.
  • the neural network model may specifically be a convolutional neural network (Convolutional Neural Networks, CNN) model.
  • the structure of the neural network model may be as shown in FIG. 6, for example.
  • the neural network model may include multiple computing nodes, and each computing node may include a convolution (Conv) layer, batch normalization (BN), and an activation function ReLU. They can be connected in a skip connection mode, the input data of K ⁇ H ⁇ W can be input to the neural network model, and after processing by the neural network model, the output data of C ⁇ H ⁇ W can be obtained.
  • K can represent the number of input channels, and K can be equal to 4, corresponding to the four channels of red (R, red), green (G, green), blue (B, blue) and depth (D, deep) respectively;
  • H can represent the height of the input image (that is, the first image or the second image),
  • W can represent the width of the input image, and
  • C can represent the number of categories.
  • the input image when the input image is too large, an input image can be cut into N sub-images.
  • the input data can be N ⁇ K ⁇ H' ⁇ W'
  • the output data can be N ⁇ C ⁇ H' ⁇ W', where H'can represent the height of the sub-image, and W'can represent the width of the sub-image.
  • H'can represent the height of the sub-image
  • W'can represent the width of the sub-image.
  • the first feature map and the second feature map can also be obtained in other ways, which is not limited in this application.
  • processing the first image based on the pre-trained neural network model to obtain the first feature map may specifically include the following steps B1 and B2.
  • Step B1 Input the first image into the neural network model to obtain the model output result of the neural network model.
  • the model output result of the neural network model may include the confidence feature maps respectively output by multiple output channels, and the multiple output channels can correspond to multiple object categories one-to-one, and the pixels of the confidence feature map of a single object category The value is used to characterize the probability that the pixel is the object category.
  • Step B2 Obtain a first feature map containing semantic information according to the model output result of the neural network model.
  • the object category corresponding to the confidence feature map with the largest pixel value at the same pixel location in the multiple confidence feature maps one-to-one corresponding to the multiple output channels may be used as the object category of the pixel location to obtain The first feature map.
  • the four confidence feature maps are respectively the confidence feature map 1 to the confidence feature map 4, and the confidence feature map 1 corresponds to the sky and the confidence feature map 2.
  • the confidence characteristic figure 3 corresponds to trees, and the confidence characteristic figure 4 corresponds to "other".
  • the pixel value at the pixel location (100, 100) in the confidence feature map 1 is 70
  • the pixel value at the pixel location (100, 100) in the confidence feature map 2 is 50
  • the pixel at the pixel location (100, 100) in the confidence feature map 3 When the value is 20, and the pixel value of the pixel position (100, 100) in the confidence feature map 4 is 20, it can be determined that the pixel position (100, 100) is the sky.
  • the pixel value at the pixel location (100, 80) in the confidence feature map 1 is 20
  • the pixel value at the pixel location (100, 80) in the confidence feature map 2 is 30, and the pixel location in the confidence feature map 3
  • the pixel value of (100,80) is 20
  • the pixel value of pixel position (100,80) in the confidence feature figure 4 is 70
  • Step 405 Determine the distance from the obstacle to the movable platform according to specific pixels of the obstacle in the first characteristic map and the second characteristic map.
  • this step exemplarily, it may specifically include the following steps C1-step C3.
  • Step C1 Determine a first angle at which the specific pixel point in the first feature map is offset from the center of the first image field of view according to the field angle of the monocular camera.
  • the angle at which a specific pixel point in the first feature map deviates from the center of the first image field of view can be calculated with reference to the center of the field of view of the first image, that is, the first angle.
  • the first image is a single image collected by a monocular camera as an example. Assume that the horizontal field of view of the monocular camera is 80°, the vertical field of view is 60° and the monocular The resolution of the image captured by the camera is 9 ⁇ 6, which can indicate that the first angle at which the specific pixel point A in FIG. 7 is offset from the center of the first image field of view may include the first angle A11 in the horizontal direction and the first angle A12 in the vertical direction.
  • a square in FIG. 7 represents a pixel point
  • a circle point represents the center of the field of view.
  • Step C2 Determine a second angle at which the specific pixel point in the second feature map is offset from the center of the second image field of view according to the field of view angle.
  • the second image field of view center can be used as a reference to calculate the angle at which a specific pixel point in the second feature map deviates from the second image field of view center, that is, the second angle.
  • the manner of determining the second angle is similar to the manner of determining the first angle in step C1, and will not be repeated here.
  • Step C3 Determine the distance from the obstacle to the movable platform according to the first angle, the second angle, and the distance between the first position and the second position.
  • step C3 may specifically include: according to the first position O 1 , the second position O 2 , and the second position.
  • the field of view center O of an image and the specific pixel point A satisfy the following constraint conditions to determine the distance from the obstacle to the movable platform;
  • the constraint conditions include: the first position O 1 , the second position
  • the position O 2 is surrounded by two right triangles with the field of view center O and the specific pixel point A respectively, and the apex angle corresponding to the first position is the first angle ⁇ 1 , and the apex angle corresponding to the second position is The second angle ⁇ 2 .
  • the two right-angled triangles are a right-angled triangle AO 1 O and a right-angled triangle AO 2 O, respectively.
  • the following formula (1) and formula (2) can be obtained according to FIG. 8.
  • l 1 represents the distance between the first position and the second position, which is a known quantity
  • ⁇ 1 and ⁇ 2 are also known quantities, so d can be obtained.
  • the length of the two hypotenuses can also be determined, so that the linear distance between the movable platform and the obstacle at the first position or the second position can be determined.
  • the distance is determined based on the aforementioned constraints.
  • the two right-angled triangles are a right-angled triangle AO 2 O and a right-angled triangle AO 1 O, respectively.
  • a traffic judgment may be made according to the determined distance, so as to implement the movable platform based on the distance from the obstacle to the movable platform Motion control.
  • the following step may be further included: judging whether the distance from the obstacle to the movable platform is greater than a preset distance; if the distance from the obstacle to the movable platform is greater than the preset distance Distance, it is determined that the area corresponding to the target movement direction is a movable area, that is, the movable platform can move along the target movement direction.
  • the distance from the obstacle to the movable platform is less than or equal to the preset distance, it is determined that the area corresponding to the target movement direction is an immovable area, that is, the movable platform cannot be moved along the path.
  • the target movement direction moves.
  • the preset distance may be understood as the minimum condition that the distance between the movable platform and the obstacle should be satisfied under the condition that the movable platform can pass through the area corresponding to the target movement direction.
  • the target movement direction may include a vertical upward direction, and accordingly, the preset distance is between the center of the fuselage of the movable platform and the The maximum distance between the wings of a movable platform.
  • the movable platform when the movable platform is moved to the first position, the movable platform is controlled to rotate in the first position by the first target angle, and while the movable platform is rotated in situ by the first target angle, Acquire multiple images collected by the monocular camera at intervals of a preset angle, merge the multiple images to obtain the first image, and acquire the monocular camera when the movable platform moves from the first position to the second position
  • the second image is collected, the first image and the second image are processed to obtain the first feature map and the second feature map containing semantic information, and the specific pixels of the obstacle in the first feature map and the second feature map are determined
  • the distance from the obstacle to the movable platform makes it possible to determine the distance from the specific obstacle point of the obstacle to the movable platform when determining the distance from the obstacle to the movable platform, thereby improving the determination of the distance from the obstacle to the movable platform Targeted.
  • the first image is obtained by rotating in-situ at the first position, which reduces the requirement for
  • FIG. 10 is a schematic flowchart of a distance measurement method based on semantic segmentation provided by another embodiment of the application.
  • This embodiment provides an unmanned aerial vehicle when the movable platform is based on the embodiment shown in FIG. 2
  • the method of this embodiment may include:
  • Step 101 Under the condition that the movable platform is moved to the first position, obtain a first image collected by a monocular camera, the first image includes an obstacle, and process the first image to obtain a first feature map containing semantic information .
  • the monocular camera may be an upward-viewing camera for collecting scene content above the movable platform.
  • the first image obtained in step 101 may be as shown in FIG. 11A, and the corresponding first feature map may be as shown in FIG. 11B.
  • O can represent the center of the first image
  • A can represent a specific pixel
  • the outer circle can be It represents the region of interest in the first image
  • the inner circle can represent the distance to be determined between the obstacle, that is, the tree and the movable platform.
  • the area of interest can indicate the area where obstacle distance measurement is required, that is, when the obstacle is located in the area of interest, the obstacle can be distanced, and when the obstacle is outside the area of interest, the obstacle can not be distanced.
  • the view direction of the first image and the target movement direction are both vertically upward directions as an example.
  • step 101 the specific manner of obtaining the first image and the first feature map in step 101 can refer to the related description of the foregoing embodiment, and will not be repeated here.
  • Step 102 When the movable platform is located at the first position, control the movable platform to descend a preset height to control the movable platform to move from the first position to the second position .
  • the first position and the second position may correspond to different heights of the movable platform. Specifically, the first position and the second position may be different from the height corresponding to the movable platform.
  • the preset height It can be understood that the preset height is the distance between the first position and the second position.
  • the unmanned aerial vehicle when the unmanned aerial vehicle rises or falls, it may be affected by the airflow, etc., resulting in flight disturbance.
  • the preset distance may be small, for example, a few centimeters.
  • step 102 can be replaced with: when the movable platform is located at the first position, controlling the movable platform to rise by a preset height, so as to control the movable platform from the first position. Move to the second position. Since radar sensors are usually installed below the UAV, and there is usually no radar sensor above the UAV, the method of controlling the movable platform to descend the preset height in step 102 is better than the method of controlling the movable platform to rise the preset height. , Can avoid hitting obstacles when moving to the second position, which is beneficial to improve the safety of the unmanned aerial vehicle.
  • the purpose of controlling the movable platform to descend a preset height in step 102 may be to perform distance measurement of obstacles. Considering the scenario where distance measurement is not needed when the obstacle is far away, in order to simplify the implementation, it can be further judged whether the obstacle is included in the interest area of the first image before step 102. If obstacles are included, it can indicate that obstacle distance measurement is required, so step 102 can be further performed; if obstacles are not included, it can indicate that obstacle distance measurement is not required, so step 102 can be omitted. At this time, it can indicate that the target movement direction corresponds to The area is a movable area.
  • Step 103 Obtain a second image collected by the monocular camera, where the second image includes the obstacle, and process the second image to obtain a second feature map containing semantic information.
  • the second image obtained in step 103 may be as shown in FIG. 12A, and the corresponding second feature map may be as shown in FIG. 12B.
  • O can represent the center of the second image
  • A can represent a specific pixel
  • the outer circle can be It represents the area of interest in the second image
  • the inner circle can represent the distance between the obstacle, that is, the tree, and the movable platform.
  • the view direction of the second image and the target movement direction are both vertical upward directions as an example.
  • Step 104 Determine the distance from the obstacle to the movable platform according to specific pixels of the obstacle in the first characteristic map and the second characteristic map.
  • l 1 represents the preset distance
  • O 1 represents the first position
  • O 2 represents the second position
  • O represents the center of the field of view
  • A represents a specific pixel
  • the arrow direction represents the target movement direction.
  • the first image including obstacles collected by the monocular camera that can be viewed from above is acquired when the movable platform is moved to the first position, and the first image is processed to obtain the first feature map containing semantic information.
  • control the movable platform to lower the preset height to control the movable platform to move from the first position to the second position, and obtain the second position including obstacles collected by the monocular camera.
  • Image process the second image to obtain a second feature map containing semantic information, and determine the distance from the obstacle to the movable platform according to the specific pixel points of the obstacle in the first feature map and the second feature map, so that the movable platform can be determined
  • the distance from the obstacles above to the movable platform is improved compared with that in the related technology that does not measure the obstacles above the movable platform.
  • the airspace above the unmanned aerial vehicle is assumed to be safe. This improves the movable platform. Security.
  • the device 140 may include: a processor 141 and a memory 142.
  • the memory 142 is used to store program codes
  • the processor 141 calls the program code, and when the program code is executed, is configured to perform the following operations:
  • the first image collected by the monocular camera is acquired, the first image includes obstacles, and the first image is processed to obtain the first feature containing semantic information picture;
  • a second image collected by the monocular camera is acquired, the second image includes the obstacle, and the second image is processed.
  • the semantic segmentation-based ranging device provided in this embodiment can be used to implement the technical solutions of the foregoing method embodiments, and its implementation principles and technical effects are similar to those of the method embodiments, and will not be repeated here.
  • An embodiment of the present application also provides a movable platform including a monocular camera for collecting images and the semantic segmentation-based ranging device shown in FIG. 14.
  • An embodiment of the present application also provides a semantic segmentation-based ranging system, including a monocular camera set on a movable platform for capturing images.
  • the semantic segmentation-based ranging device shown in FIG. 14 is provided.
  • a person of ordinary skill in the art can understand that all or part of the steps in the foregoing method embodiments can be implemented by a program instructing relevant hardware.
  • the aforementioned program can be stored in a computer readable storage medium. When the program is executed, it executes the steps including the foregoing method embodiments; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Image Analysis (AREA)

Abstract

一种基于语义分割的测距方法、装置(140)、设备及系统(10),方法包括:在可移动平台移动至第一位置情况下,获取单目摄像头采集到的第一图像,第一图像包括障碍物,处理第一图像得到包含语义信息的第一特征图(201);在可移动平台由第一位置移动至第二位置情况下,获取单目摄像头采集到的第二图像,第二图像包括障碍物,处理第二图像得到包含语义信息的第二特征图(202);根据第一特征图和第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离(203)。提高了确定障碍物到可移动平台距离的针对性。

Description

基于语义分割的测距方法、装置、设备及系统 技术领域
本申请涉及测距技术领域,尤其涉及一种基于语义分割的测距方法、装置、设备及系统。
背景技术
近年来,随着可移动平台的广泛应用,可移动平台实现障碍物测距的需求也越来越多。
通常,可以通过在可移动平台上设置测距装置测量可移动平台到障碍物的距离,具体的,测距装置可以基于单目摄像头拍摄得到的图像进行测距。其测距原理具体为:先通过图像匹配进行障碍物识别,以识别出障碍物,例如各种车型、行人、物体,再通过障碍物在图像中的大小去估算到障碍物的距离。
然而,上述测距方式,难以针对性地确定出某个障碍物点与可移动平台之间的距离,因此存在针对性较差的问题。
发明内容
本申请实施例提供一种基于语义分割的测距方法、装置、设备及系统,用以解决现有技术中难以针对性地确定出某个障碍物点与可移动平台之间的距离,因此存在针对性较差的问题。
第一方面,本申请实施例提供一种基于语义分割的测距方法,应用于可移动平台,所述可移动平台上设置有单目摄像头,所述方法包括:
在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信 息的第一特征图;
在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图;
根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
第二方面,本申请实施例提供一种基于语义分割的测距装置,所述测距装置应用于可移动平台,所述可移动平台包括单目摄像头,所述装置包括:存储器和处理器;
所述存储器,用于存储程序代码;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图;
在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图;
根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
第三方面,本申请实施例提供一种可移动平台,包括单目摄像头以及测距装置;
其中,所述单目摄像头用于采集图像;所述测距装置包括存储器和处理器;
所述存储器,用于存储程序代码;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图;在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍 物,处理所述第二图像得到包含语义信息的第二特征图;以及,根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
第四方面,本申请实施例提供一种基于语义分割的测距系统,包括单目摄像头以及测距装置,所述单目摄像头设置于可移动平台上,用于采集图像;所述测距装置包括存储器和处理器;
所述存储器,用于存储程序代码;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图;在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图;以及,根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
第五方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行上述第一方面任一项所述的方法。
第六方面,本申请实施例提供一种计算机程序,当所述计算机程序被计算机执行时,用于实现上述第一方面任一项所述的方法。
本申请实施例提供一种基于语义分割的测距方法、装置、设备及系统,通过在可移动平台移动至第一位置情况下,获取单目摄像头采集到的包括障碍物的第一图像,处理第一图像得到包含语义信息的第一特征图,在可移动平台由第一位置移动至第二位置情况下,获取单目摄像头采集到的包括该障碍物的第二图像,处理第二图像得到包含语义信息的第二特征图,并根据第一特征图和第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离,实现了根据第一位置下包含语义信息的第一特征图,以及由第一位置运动至第二位置下包含语音信息的第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离,使得在确定障碍物到可移动平台的距离时,能 够确定障碍物的特定障碍物点到可移动平台的距离,从而提高了确定障碍物到可移动平台距离的针对性。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的基于语义分割的测距方法的应用场景示意图;
图2为本申请一实施例提供的基于语义分割的测距方法的流程示意图;
图3A为本申请一实施例提供的第一图像;
图3B为图3A所示第一图像的第一特征图;
图4为本申请另一实施例提供的基于语义分割的测距方法的流程示意图;
图5为本申请一实施例提供的可移动平台原地旋转的示意图;
图6为本申请实施例提供的神经网络模型的结构示意图;
图7为本申请实施例提供的确定第一角度的示意图;
图8为本申请一实施例提供的确定障碍物到可移动平台距离的示意图;
图9为本申请另一实施例提供的确定障碍物到可移动平台距离的示意图;
图10为本申请又一实施例提供的基于语义分割的测距方法的流程示意图;
图11A为本申请另一实施例提供的第一图像;
图11B为图11A所示第一图像的第一特征图;
图12A为本申请又一实施例提供的第一图像;
图12B为图12A所示第一图像的第一特征图;
图13为本申请又一实施例提供的确定障碍物到可移动平台距离的示意图;
图14为本申请一实施例提供的基于语义分割的测距装置的结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供的基于语义分割的测距方法可以应用于如图1所示的测距系统10,测距系统10包括单目摄像头11和控制器12。其中,单目摄像头11可以设置在可移动平台上,用于采集图像;控制器12可以从单目摄像头11获取单目摄像头11采集到的图像,并根据单目摄像头1采集到的图像采用本申请实施例提供的方法进行处理,以实现基于语义分割的测距方式。其中,可移动平台例如可以为无人飞行器、无人车等。
示例性的,可移动平台可以包括控制器12,以实现可移动平台的控制器12根据可移动平台上设置的单目摄像头采集到的图像进行测距。可以理解的是,可移动平台可以包括单目摄像头11也可以不包括单目摄像头11。
本申请实施例提供的基于语义分割的测距方法,通过根据可移动平台移动至第一位置情况下单目摄像头采集到的第一图像其包含语义信息的第一特征图,以及可移动平台由第一位置移动至第二位置情况下单目摄像头采集到的第二图像其包含语义信息的第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离,实现了在确定障碍物到可移动平台的距离时,能够确定障碍物的特定障碍物点到可移动平台的距离,从而提高了确定障碍物到可移动平台距离的针对性。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。需要说明的是,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。
图2为本申请一实施例提供的基于语义分割的测距方法的流程示意图,本实施例的执行主体可以为图1中控制器,具体可以是可移动平台包括的控制器。如图2所示,本实施例的方法可以包括:
步骤201,在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包 含语义信息的第一特征图。
本步骤中,第一位置可以为所述可移动平台移动过程中的任一位置。所述单目摄像头的视野方向可以与所述可移动平台的目标运动方向一致,用以实现目标运动方向上的障碍物测距。在实际应用中,单目摄像头的视野方向与可移动平台的目标运动方向可以相同,例如单目摄像头的视野方向可以为可移动平台的正前方,又例如对于无人飞行器,单目摄像头的视野方向还可以为可移动平台的正上方;或者,单目摄像头的视野方向与可移动平台的目标运动方向可以相差一定角度,例如单目摄像头的视野方向可以为可移动平台的左前方,又例如对于无人飞行器,单目摄像头的视野方向还可以为可移动平台的上前方。
需要说明的是,在所述单目摄像头采集到的单张图像能够包括目标运动方向全部兴趣场景内容情况下,所述第一图像可以为单目摄像头采集到的单张图像;在所述单目摄像头采集到的单张图像仅能够包括部分兴趣场景内容情况下,所述第一图像可以为所述单目摄像头采集到视野方向不同的多张图像的合并图像。
其中,第一特征图包含语义信息的具体方式可以是特征图中的像素值表征对应像素的对象语义,其中,对象语义可以包括能够识别出的对象类别。可选的,可移动平台能够识别出图像中是否包含障碍物类别的对象,基于此,第一特征图中像素值是1可以表示对应像素是障碍物类别,像素值是0可以表示对应像素不是障碍物类别。或者,可选的,可移动平台能够识别出图像中具体包含哪些类别的对象,例如,天空、树木、建筑物等,基于此,假设像素值为1可以表示建筑物、像素值为2可以表示树木、像素值为3可以表示天空,则处理第一图像所得到的第一特征图中,像素值为1的像素位置即为识别为建筑物的像素位置,像素值为2的像素位置即为识别为树木的像素位置,像素值为3的像素位置即为识别为天空的像素位置。
对于图3A所示的第一图像,其包含语义信息的第一特征图例如可以如图3B所示。图3B中不同灰度可以表示不同的对象类别,具体包括了“天空”、“建筑物”、“树木”以及“其他”,其中,“其他”可以表示无法识别的对象类别。
需要说明的是,影响可移动平台运动的障碍物的类型可以与可移动平台针对的场景有关,例如在可移动平台为无人飞行器场景下,障碍物可以包括 建筑物、树木等。
步骤202,在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图。
本步骤中,所述第二位置与所述第一位置不同,且在所述可移动平台位于所述第二位置的情况下,单目摄像头采集到的第二图像中可以包括与第一图像中相同的障碍物,以基于同一障碍物在第一图像和第二图像中分别的成像确定障碍物到所述可移动平台的距离。
需要说明的是,第二特征图与第一特征图的具体内容类似,在此不再赘述。
需要说明的是,对于处理第一图像得到第一特征图,与获取第二图像的先后顺序,本申请不做限定。可选的,可以在获取到第二图像之后,再分别处理第一图像和第二图像,以得到第一特征图和第二特征图。
步骤203,根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
本步骤中,第一特征图中的所述特征像素点与第二特征图中的所述特定像素点对应所述障碍物的同一部位。所述特定像素点为特征图中感兴趣的障碍物像素点,具体可以是决定障碍物与可移动平台之间距离的关键像素点。示例性的,所述特定像素点可以为所述障碍物的所有边缘像素点中在所述可移动平台的目标运动方向上,距离所述可移动平台最近的像素点。
由于第一位置和第二位置为不同位置,因此障碍物与第一位置下可移动平台的相对位置关系,较障碍物与第二位置下可移动平台的相对位置关系不同,因此障碍物的同一部位在第一特征图和第二特征图中的像素位置不同。
并且,由于第一位置下障碍物的一部位到可移动平台的距离、第二位置下障碍物的该部位到可移动平台的距离,与该部位在第一特征图和第二特征图中的像素位置之间存在一定的数学关系,因此可以根据第一特征图和第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离。
本实施例中,通过在可移动平台移动至第一位置情况下,获取单目摄像头采集到的包括障碍物的第一图像,处理第一图像得到包含语义信息的第一特征图,在可移动平台由第一位置移动至第二位置情况下,获取单目摄像头采集到的包括该障碍物的第二图像,处理第二图像得到包含语义信息的第二 特征图,并根据第一特征图和第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离,实现了根据第一位置下包含语义信息的第一特征图,以及由第一位置运动至第二位置下包含语音信息的第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离,使得在确定障碍物到可移动平台的距离时,能够确定障碍物的特定障碍物点到可移动平台的距离,从而提高了确定障碍物到可移动平台距离的针对性。
前述方法实施例中,在第一图像为视野方向不同的多张图像的合并图像情况下,在获取第一图像时可以通过用于使得单目摄像头相对于可移动平台移动的云台,改变所述图像获取装置的视野范围,以得到视野方向不同的多张图像;或者,也可以通过改变可移动平台的姿态,以得到视野方向不同的多张图像。以下,主要针对后者进行具体说明。
图4为本申请另一实施例提供的基于语义分割的测距方法的流程示意图,本实施例在图2所示实施例的基础上给出了一种可选的实现方式。如图4所示,本实施例的方法可以包括:
步骤401,在所述可移动平台移动至第一位置情况下,控制所述可移动平台在所述第一位置原地旋转第一目标角度,并在所述可移动平台原地旋转所述第一目标角度的过程中,获取所述单目摄像头以预设角度为间隔采集到的多张图像。
本步骤中,受单目摄像头视野方向以及视场角的限制,所述单目摄像头采集的单张图像可能无法包含全部兴趣场景内容,由此可以通过可移动平台在第一位置原地旋转,以得到能包含全部兴趣内容的第一图像。如图5所示,在可移动平台在第一位置原地旋转的过程中,可以不断改变单目摄像头的视野范围,从而获得包括其他部分兴趣场景内容的图像。需要说明的是,图5中箭头方向可以表示可移动平台的朝向,箭头方向的变化表示可移动平台原地旋转时朝向的变化。图5中两条直线对应的范围表示单目摄像头的视野范围。图5顺时针的旋转方向仅为举例。
根据采集图像的需求,第一目标角度可以根据需求灵活实现。示例性的,第一目标角度可以为360度,即在所述可移动平台移动至第一位置情况下,控制所述可移动平台在所述第一位置原地旋转一周。
其中,预设角度可以根据需求灵活实现。具体的,预设角度越大,原地旋转采集到图像的数量越少,相邻时刻采集到的图像之间重叠的内容越少; 预设角度越小,原地旋转采集到图像的数量越多,相邻时刻采集到的图像之间重叠的内容越多。
步骤402,对所述多张图像进行图像合并,以得到所述第一图像。
本步骤中,所述第一图像为可移动平台在所述第一位置原地旋转第一目标角度中单目摄像头采集到的多张图像的合并图像。因此,第一图像中可以包括目标运动方向全部兴趣场景内容。
步骤403,在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像。
本步骤中,可选的,获取第二图像的方式可以与步骤401-步骤402的方式类似,即可以在可移动平台第二位置原地旋转第一目标角度的过程中,获取单目摄像头以预设角度为间隔采集到的多张图像,并对该多张图像进行合并以得到第二图像。其中,在第一目标角度不为360°时,在第二位置原地旋转时可移动平台的起始朝向可以与第一位置原地旋转时可移动平台的起始朝向相同,基于此两次原地旋转的旋转方向可以相同;或者,在第一目标角度不为360°时,在第二位置原地旋转时可移动平台的起始朝向可以与第一位置原地旋转时可移动平台的结束朝向相同,基于此两次原地旋转的旋转方向可以相反。
或者,可选的,步骤403具体可以包括如下步骤A1-步骤A3。
步骤A1,确定所述多张图像中包括所述障碍物的目标图像。
其中,所述多张图像为步骤401采集获得的图像,由于该多张图像中并不一定每张图像均包括障碍物,并且对于包括障碍物的部分图像其关于障碍物的场景内容可能重复,因此可以从该多张图像的包括障碍物的部分图像中确定出用于确定距离的目标图像。目标图像的数量可以为一张或多张。
示例性的,可以针对所述多张图像中的每张图像均进行图像识别处理,以识别每张图像中是否包括障碍物,为了减少计算量,这里无需获得每张图像的包含语义信息的特征图,只需识别出每张图像是包含障碍物还是不包含障碍物即可。
步骤A2,确定所述单目摄像头采集所述目标图像所旋转的第二目标角度。
其中,所述目标图像为所述单目摄像头在可移动平台旋转特定角度采集获得,该特定角度即为第二目标角度。第二目标角度可以对应可移动平台的特定朝向。在所述目标图像为多张情况下,第二目标角度的个数可以为多个。
步骤A3,在所述可移动平台移动至所述第二位置,并旋转至所述第二目标角度对应朝向的情况下,获取所述单目摄像头采集到的第二图像。
可以理解的是,所述单目摄像头采集第二图像时所述可移动平台的朝向,与所述单目摄像头采集目标图像时所述可移动平台的朝向相同。
通过上述步骤A1-步骤A3,可以实现在第二位置时,直接控制可移动平台旋转至特定朝向,并在特定朝向下获取单目摄像头采集到的第二图像,与原地旋转过程中获取单目摄像头以预设角度为间隔采集到的多张图像,并对该多张图像进行合并以得到第二图像相比,减少了单目摄像头图像采集的次数,有利于缩短获得第二图像的时长。
步骤404,处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图。
本步骤中,示例性的,可以采用预先训练好的神经网络模型,分别处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图。所述神经网络模型具体可以为卷积神经网络(Convolutional Neural Networks,CNN)模型。所述神经网络模型的结构例如可以如图6所示。如图6所示,所述神经网络模型可以包括多个计算节点,每个计算节点中可以包括卷积(Conv)层、批量归一化(Batch Normalization,BN)以及激活函数ReLU,计算节点之间可以采用跳跃连接(Skip Connection)方式连接,K×H×W的输入数据可以输入所述神经网络模型,经过所述神经网络模型处理后,可以获得C×H×W的输出数据。其中,K可以表示输入通道的个数,K可以等于4,分别对应红(R,red)、绿(G,green)、蓝(B,blue)和深度(D,deep)共四个通道;H可以表示输入图像(即第一图像或第二图像)的高,W可以表示输入图像的宽,C可以表示类别数。
需要说明的是,当输入图像过大时,可以将一个输入图像切割为N个子图像,相应的,输入数据可以为N×K×H’×W’,输出数据可以为N×C×H’×W’,其中,H’可以表示子图像的高,W’可以表示子图像的宽。当然,在其他实施例中,也可以通过其他方式获得第一特征图和第二特征图,本申请对此不做限定。
以神经网络模型处理第一图像为例,示例性的,基于预先训练好的神经网络模型处理第一图像,得到第一特征图,具体可以包括如下步骤B1和步骤B2。
步骤B1,将所述第一图像输入所述神经网络模型,得到所述神经网络模型的模型输出结果。
其中,所述神经网络模型的模型输出结果可以包括多个输出通道分别输出的置信度特征图,该多个输出通道可以与多个对象类别一一对应,单个对象类别的置信度特征图的像素值用于表征像素是所述对象类别的概率。
步骤B2,根据所述神经网络模型的模型输出结果,得到包含语义信息的第一特征图。
示例性的,可以将与该多个输出通道一一对应的多个置信度特征图中同一像素位置像素值最大的置信度特征图对应的对象类别,作为所述像素位置的对象类别,从而得到第一特征图。
假设,所述神经网络模型的输出通道的个数为4,4个置信度特征图分别为置信度特征图1至置信度特征图4,且置信度特征图1对应天空、置信度特征图2对应建筑物、置信度特征图3对应树木、置信度特征图4对应“其他”。例如,当置信度特征图1中像素位置(100,100)的像素值是70,置信度特征图2中像素位置(100,100)的像素值是50,置信度特征图3中像素位置(100,100)的像素值是20,置信度特征图4中像素位置(100,100)的像素值是20时,可以确定像素位置(100,100)是天空。又例如,当置信度特征图1中像素位置(100,80)的像素值是20,置信度特征图2中像素位置(100,80)的像素值是30,置信度特征图3中像素位置(100,80)的像素值是20,置信度特征图4中像素位置(100,80)的像素值是70时,可以确定像素位置(100,80)是其他,即不是树木、建筑物和树木中的任意一种。
步骤405,根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
本步骤中,示例性的,具体可以包括如下步骤C1-步骤C3。
步骤C1,根据所述单目摄像头的视场角,确定所述第一特征图中所述特定像素点偏移所述第一图像视野中心的第一角度。
其中,可以以第一图像视野中心为参考,计算第一特征图中特定像素点偏移第一图像视野中心的角度,即第一角度。为了便于说明,以第一图像为单目摄像头采集到的单张图像为例进行说明,假设单目摄像头的视场角中水平视场角为80°,垂直视场角为60°且单目摄像头所采集图像的分辨率为9×6,则可以表示图7中特定像素点A偏移第一图像视野中心的第一角度可以包括 水平方向的第一角度A11以及垂直方向的第一角度A12,其中,A11等于80°÷8×3=30°,A12等于60°÷6×2=20°。需要说明的是,图7中一个方格表示一个像素点,圆点表示视野中心。
步骤C2,根据所述视场角,确定所述第二特征图中所述特定像素点偏移所述第二图像视野中心的第二角度。
其中,可以以第二图像视野中心为参考,计算第二特征图中特定像素点偏移第二图像视野中心的角度,即第二角度。关于确定第二角度的方式与步骤C1中确定第一角度的方式类似,在此不再赘述。
步骤C3,根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离。
其中,为了便于说明,以下以第一图像和第二图像的视野方向相同,且与可移动平台的目标运动方向相同,第一位置到第二位置的连线方向与目标运动方向相同为例进行说明,基于此,第一图像和第二图像的视野中心可以相同,如图8所示,步骤C3具体可以包括:按照所述第一位置O 1、所述第二位置O 2、所述第一图像的视野中心O以及所述特定像素点A满足如下约束条件,确定所述障碍物到所述可移动平台的距离;所述约束条件包括:所述第一位置O 1、所述第二位置O 2分别与所述视野中心O以及所述特定像素点A围城两个直角三角形,且所述第一位置对应的顶角为第一角度α 1,所述第二位置对应的顶角为第二角度α 2
其中,两个直角三角形分别为直角三角形AO 1O,以及直角三角形AO 2O。以需要确定所述障碍物到所述可移动平台的目标运动方向的垂直距离,即图8中的d为例,根据图8可以获得如下公式(1)和公式(2)。
Figure PCTCN2020073657-appb-000001
Figure PCTCN2020073657-appb-000002
整理公式(1)、公式(2),可以得到如下公式(3)。
Figure PCTCN2020073657-appb-000003
其中,l 1表示第一位置与第二位置之间的距离,其为已知量,α 1和α 2也均为已知量,因此可以求得d。需要说明的是,对于图8所示的两个直角三角形,还可以确定出两个斜边的长度,从而可以确定出可移动平台在第一位置或第 二位置处与障碍物的直线距离。
可以理解的是,对于第一图像和第二图像的视野方向相同,且与可移动平台的目标运动方向相同,第一位置到第二位置的连线方向与目标运动方向相反的场景,也可以基于前述约束条件确定距离。例如,如图9所示,两个直角三角形分别为直角三角形AO 2O,以及直角三角形AO 1O。以需要确定所述障碍物到所述可移动平台的目标运动方向的垂直距离,即图9中的d为例,根据图9可以获得如下公式(4)和公式(5)。
Figure PCTCN2020073657-appb-000004
Figure PCTCN2020073657-appb-000005
整理公式(4)、公式(5),可以得到如下公式(6)。
Figure PCTCN2020073657-appb-000006
需要说明的是,对于第一图像和第二图像的视野方向不同,视野方向与目标运动方向不同,第一位置到第二位置的连线方向与目标运动方向不相同或相反的其他场景,可以通过取与目标运动方向分量的方式,获得两个直角三角形,并进一步采用与图8、图9类似的方式确定可移动平台到障碍物的距离。
可选的,在确定所述障碍物到所述可移动平台的目标运动方向的垂直距离之后,可以根据确定的该距离进行通行判断,以实现基于障碍物到可移动平台的距离进行可移动平台的运动控制。示例性的,步骤405之后还可以包括如下步骤:判断所述障碍物到所述可移动平台的距离是否大于预设距离;若所述障碍物到所述可移动平台的距离大于所述预设距离,则确定所述目标运动方向对应的区域为可移动区域,即所述可移动平台可以沿所述目标运动方向移动。进一步的,若所述障碍物到所述可移动平台的距离小于或等于所述预设距离,则确定所述目标运动方向对应的区域为不可移动区域,即所述可移动平台不可以沿所述目标运动方向移动。
其中,所述预设距离可以理解为所述可移动平台能够通过所述目标运动方向对应区域条件下,所述可移动平台到所述障碍物的距离应满足的最低条件。示例性的,在所述可移动平台为无人飞行器的情况下,所述目标运动方向可以包括垂直向上方向,相应的,所述预设距离为所述可移动平台的机身 中心与所述可移动平台的机翼之间的最大距离。
本实施例中,通过在可移动平台移动至第一位置情况下,控制可移动平台在第一位置原地旋转第一目标角度,并在可移动平台原地旋转第一目标角度的过程中,获取单目摄像头以预设角度为间隔采集到的多张图像,对多张图像进行图像合并以得到第一图像,在可移动平台由第一位置移动至第二位置情况下,获取单目摄像头采集到的第二图像,处理第一图像和第二图像得到包含语义信息的第一特征图和第二特征图,并根据第一特征图和第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离,使得在确定障碍物到可移动平台的距离时,能够确定障碍物的特定障碍物点到可移动平台的距离,从而提高了确定障碍物到可移动平台距离的针对性。另外,通过在第一位置原地旋转的方式获得第一图像,降低了对可移动平台上设置的单目摄像头视场角的要求,有利于节省成本。
图10为本申请又一实施例提供的基于语义分割的测距方法的流程示意图,本实施例在图2所示实施例的基础上给出了可移动平台为无人飞行器情况下一种可选的实现方式。如图10所示,本实施例的方法可以包括:
步骤101,在可移动平台移动至第一位置情况下,获取单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图。
本步骤中,所述单目摄像头可以为可上视摄像头,用于采集可移动平台上方的场景内容。步骤101获取的第一图像可以如图11A所示,相应的第一特征图可以如图11B所示,图11B中O可以表示第一图像的视野中心,A可以表示特定像素点,外圆可以表示第一图像的兴趣区域,内圆可以表示障碍物即树木与可移动平台之间需要确定的距离。其中,兴趣区域可以表示需要进行障碍物测距的区域,即当障碍物位于兴趣区域内时可以对该障碍物进行测距,当障碍物位于兴趣区域之外时可以不对该障碍物进行测距。需要说明的是,图11A和图11B中以第一图像的视野方向以及目标运动方向均为垂直向上方向为例。
需要说明的是,步骤101获取第一图像以及第一特征图的具体方式可以参见前述实施例的相关描述,在此不再赘述。
步骤102,在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台下降预设高度,以控制所述可移动平台由所述第一位置移动至所述第 二位置。
本步骤中,所述第一位置和所述第二位置可以对应所述可移动平台的不同高度,具体的,所述第一位置和所述第二位置对应所述可移动平台的高度可以相差所述预设高度。可以理解的是,所述预设高度即为所述第一位置与所述第二位置之间的距离。
考虑到无人飞行器上升或下降时,可能受到气流等的影响导致飞行出现扰动,为了减小扰动,提高测距的精确性,所述预设距离可以较小,例如为几厘米。
可替换的,步骤102可以替换为:在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台上升预设高度,以控制所述可移动平台由所述第一位置移动至所述第二位置。由于无人飞行器的下方通常安装有雷达传感器,而无人飞行器的上方通常未雷达传感器,步骤102中通过控制可移动平台下降预设高度的方式,较通过控制可移动平台上升预设高度的方式,可以避免在移动至第二位置的过程中撞到障碍物,有利于提高无人飞行器的安全性。
步骤102中控制所述可移动平台下降预设高度的目的可以为进行障碍物的测距。考虑到障碍物距离较远情况下无需进行测距的场景,为了简化实现,步骤102之前可以进一步判断第一图像的兴趣区域中是否包括障碍物。若包括障碍物可以表征需要进行障碍物测距,因此可以进一步执行步骤102;若不包括障碍物可以表征不需要进行障碍物测距,因此可以不执行步骤102,此时可以表征目标运动方向对应区域为可移动区域。
步骤103,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图。
需要说明的是,步骤103获取第二图像以及第二特征图的具体方式可以参见前述实施例的相关描述,在此不再赘述。步骤103获取的第二图像可以如图12A所示,相应的第二特征图可以如图12B所示,图12B中O可以表示第二图像的视野中心,A可以表示特定像素点,外圆可以表示第二图像的兴趣区域,内圆可以表示障碍物即树木与可移动平台之间需要确定的距离。需要说明的是,图12A和图12B中以第二图像的视野方向以及目标运动方向均为垂直向上方向为例。
步骤104,根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
本步骤中,对应于图11B和图12B,可以参照图13障碍物到所述可移动平台的距离
Figure PCTCN2020073657-appb-000007
图13中,l 1表示预设距离,O 1表示第一位置,O 2表示第二位置,O表示视野中心,A表示特定像素点,箭头方向表示目标运动方向。
本实施例中,通过在可移动平台移动至第一位置情况下,获取可上视的单目摄像头采集到的包括障碍物的第一图像,处理第一图像得到包含语义信息的第一特征图,在可移动平台位于第一位置的情况下,控制可移动平台下降预设高度,以控制可移动平台由第一位置移动至第二位置,获取单目摄像头采集到的包括障碍物的第二图像,处理第二图像得到包含语义信息的第二特征图,根据第一特征图和第二特征图中障碍物的特定像素点,确定障碍物到可移动平台的距离,使得能够确定可移动平台上方的障碍物到可移动平台的距离,与相关技术中未对可移动平台上方进行障碍物测距在无人飞行器进行返航时默认无人飞行器的上方为安全空域相比,提高了可移动平台的安全性。
图14为本申请一实施例提供的基于语义分割的测距装置的结构示意图,所述测距装置应用于可移动平台,所述可移动平台包括单目摄像头,如图14所示,该装置140可以包括:处理器141和存储器142。
所述存储器142,用于存储程序代码;
所述处理器141,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图;
在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图;
根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
本实施例提供的基于语义分割的测距装置,可以用于执行前述方法实施例的技术方案,其实现原理和技术效果与方法实施例类似,在此不再赘述。
本申请实施例还提供一种可移动平台,包括用于采集图像的单目摄像头以及图14所示的基于语义分割的测距装置。
本申请实施例还提供一种基于语义分割的测距系统,包括设置于可移动平台上用于采集图像的单目摄像头图14所示的基于语义分割的测距装置。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (74)

  1. 一种基于语义分割的测距方法,应用于可移动平台,所述可移动平台上设置有单目摄像头,其特征在于,所述方法包括:
    在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图;
    在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图;
    根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
  2. 根据权利要求1所述的方法,其特征在于,所述在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,包括:
    在所述可移动平台移动至第一位置情况下,控制所述可移动平台在所述第一位置原地旋转第一目标角度;
    在所述可移动平台原地旋转所述第一目标角度的过程中,获取所述单目摄像头以预设角度为间隔采集到的多张图像;
    对所述多张图像进行图像合并,以得到所述第一图像。
  3. 根据权利要求2所述的方法,其特征在于,所述第一目标角度为360度。
  4. 根据权利要求2所述的方法,其特征在于,所述在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,包括:
    确定所述多张图像中包括所述障碍物的目标图像;
    确定所述单目摄像头采集所述目标图像所旋转的第二目标角度;
    在所述可移动平台移动至所述第二位置,并旋转至所述第二目标角度对应朝向的情况下,获取所述单目摄像头采集到的第二图像。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述可移动平台包括无人飞行器。
  6. 根据权利要求5所述的方法,其特征在于,所述第一位置和所述第二位置对应所述可移动平台的不同高度。
  7. 根据权利要求6所述的方法,其特征在于,所述单目摄像头为可上视 摄像头。
  8. 根据权利要求7所述的方法,其特征在于,所述获取所述单目摄像头采集到的第二图像之前,还包括:
    在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台下降或者上升预设高度,以控制所述可移动平台由所述第一位置移动至所述第二位置。
  9. 根据权利要求8所述的方法,其特征在于,所述可移动平台的目标运动方向包括垂直向上方向。
  10. 根据权利要求8所述的方法,其特征在于,所述控制所述可移动平台下降或者上升预设高度,包括:
    确定所述第一图像的兴趣区域中是否包括障碍物;
    若所述第一图像的兴趣区域中包括障碍物,则在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台下降或者上升预设高度。
  11. 根据权利要求1所述的方法,其特征在于,处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图,包括:
    采用训练好的神经网络模型,分别处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离,包括:
    根据所述单目摄像头的视场角,确定所述第一特征图中所述特定像素点偏移所述第一图像视野中心的第一角度;
    根据所述视场角,确定所述第二特征图中所述特定像素点偏移所述第一图像视野中心的第二角度;
    根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离。
  13. 根据权利要求12所述的方法,其特征在于,所述第一图像和所述第二图像的视野方向相同,且与所述可移动平台的目标运动方向相同;所述根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离,包括:
    按照所述第一位置、所述第二位置、所述第一图像的视野中心以及所述 特定像素点满足如下约束条件,确定所述障碍物到所述可移动平台的距离;
    所述约束条件包括:所述第一位置、所述第二位置分别与所述视野中心以及所述特定像素点围城两个直角三角形,且所述第一位置对应的顶角为第一角度,所述第二位置对应的顶角为第二角度。
  14. 根据权利要求1-11任一项所述的方法,其特征在于,所述特定像素点为所述障碍物的所有边缘像素点中在所述可移动平台的目标运动方向上,距离所述可移动平台最近的像素点。
  15. 根据权利要求14所述的方法,其特征在于,所述障碍物到所述可移动平台的距离包括:所述障碍物到所述可移动平台的目标运动方向的垂直距离。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    判断所述障碍物到所述可移动平台的距离是否大于预设距离;
    若所述障碍物到所述可移动平台的距离大于所述预设距离,则确定所述目标运动方向对应的区域为可移动区域。
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:
    若所述障碍物到所述可移动平台的距离小于或等于所述预设距离,则确定所述目标运动方向对应的区域为不可移动区域。
  18. 根据权利要求16所述的方法,其特征在于,所述目标运动方向包括垂直向上方向,所述可移动平台为无人飞行器,所述预设距离为所述可移动平台的机身中心与所述可移动平台的机翼之间的最大距离。
  19. 一种基于语义分割的测距装置,所述测距装置应用于可移动平台,所述可移动平台包括单目摄像头,其特征在于,所述装置包括:存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
    在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图;
    在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述 第二图像得到包含语义信息的第二特征图;
    根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
  20. 根据权利要求19所述的装置,其特征在于,所述处理器用于在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,具体包括:
    在所述可移动平台移动至第一位置情况下,控制所述可移动平台在所述第一位置原地旋转第一目标角度;
    在所述可移动平台原地旋转所述第一目标角度的过程中,获取所述单目摄像头以预设角度为间隔采集到的多张图像;
    对所述多张图像进行图像合并,以得到所述第一图像。
  21. 根据权利要求20所述的装置,其特征在于,所述第一目标角度为360度。
  22. 根据权利要求20所述的装置,其特征在于,所述处理器用于在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,具体包括:
    确定所述多张图像中包括所述障碍物的目标图像;
    确定所述单目摄像头采集所述目标图像所旋转的第二目标角度;
    在所述可移动平台移动至所述第二位置,并旋转至所述第二目标角度对应朝向的情况下,获取所述单目摄像头采集到的第二图像。
  23. 根据权利要求19-22任一项所述的装置,其特征在于,所述可移动平台包括无人飞行器。
  24. 根据权利要求23所述的装置,其特征在于,所述第一位置和所述第二位置对应所述可移动平台的不同高度。
  25. 根据权利要求24所述的装置,其特征在于,所述单目摄像头为可上视摄像头。
  26. 根据权利要求25所述的装置,其特征在于,所述处理器用于获取所述单目摄像头采集到的第二图像之前,还用于:
    在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台下降或者上升预设高度,以控制所述可移动平台由所述第一位置移动至所述第二位置。
  27. 根据权利要求26所述的装置,其特征在于,所述可移动平台的目标运动方向包括垂直向上方向。
  28. 根据权利要求26所述的装置,其特征在于,所述处理器用于控制所述可移动平台下降或者上升预设高度,具体包括:
    确定所述第一图像的兴趣区域中是否包括障碍物;
    若所述第一图像的兴趣区域中包括障碍物,则在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台下降或者上升预设高度。
  29. 根据权利要求19所述的装置,其特征在于,所述处理器用于处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图,具体包括:
    采用训练好的神经网络模型,分别处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图。
  30. 根据权利要求19-29任一项所述的装置,其特征在于,所述处理器用于根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离,具体包括:
    根据所述单目摄像头的视场角,确定所述第一特征图中所述特定像素点偏移所述第一图像视野中心的第一角度;
    根据所述视场角,确定所述第二特征图中所述特定像素点偏移所述第一图像视野中心的第二角度;
    根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离。
  31. 根据权利要求30所述的装置,其特征在于,所述第一图像和所述第二图像的视野方向相同,且与所述可移动平台的目标运动方向相同;所述处理器用于根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离,具体包括:
    按照所述第一位置、所述第二位置、所述第一图像的视野中心以及所述特定像素点满足如下约束条件,确定所述障碍物到所述可移动平台的距离;
    所述约束条件包括:所述第一位置、所述第二位置分别与所述视野中心以及所述特定像素点围城两个直角三角形,且所述第一位置对应的顶角为第一角度,所述第二位置对应的顶角为第二角度。
  32. 根据权利要求19-29任一项所述的装置,其特征在于,所述特定像素 点为所述障碍物的所有边缘像素点中在所述可移动平台的目标运动方向上,距离所述可移动平台最近的像素点。
  33. 根据权利要求32所述的装置,其特征在于,所述障碍物到所述可移动平台的距离包括:所述障碍物到所述可移动平台的目标运动方向的垂直距离。
  34. 根据权利要求33所述的装置,其特征在于,所述处理器还用于:
    判断所述障碍物到所述可移动平台的距离是否大于预设距离;
    若所述障碍物到所述可移动平台的距离大于所述预设距离,则确定所述目标运动方向对应的区域为可移动区域。
  35. 根据权利要求34所述的装置,其特征在于,所述处理器还用于:
    若所述障碍物到所述可移动平台的距离小于或等于所述预设距离,则确定所述目标运动方向对应的区域为不可移动区域。
  36. 根据权利要求34所述的装置,其特征在于,所述目标运动方向包括垂直向上方向,所述可移动平台为无人飞行器,所述预设距离为所述可移动平台的机身中心与所述可移动平台的机翼之间的最大距离。
  37. 一种可移动平台,其特征在于,包括单目摄像头以及测距装置;
    其中,所述单目摄像头用于采集图像;所述测距装置包括存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
    在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图;在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图;以及,根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
  38. 根据权利要求37所述的可移动平台,其特征在于,所述处理器用于在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,具体包括:
    在所述可移动平台移动至第一位置情况下,控制所述可移动平台在所述第一位置原地旋转第一目标角度;
    在所述可移动平台原地旋转所述第一目标角度的过程中,获取所述单目摄像头以预设角度为间隔采集到的多张图像;
    对所述多张图像进行图像合并,以得到所述第一图像。
  39. 根据权利要求38所述的可移动平台,其特征在于,所述第一目标角度为360度。
  40. 根据权利要求38所述的可移动平台,其特征在于,所述处理器用于在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,具体包括:
    确定所述多张图像中包括所述障碍物的目标图像;
    确定所述单目摄像头采集所述目标图像所旋转的第二目标角度;
    在所述可移动平台移动至所述第二位置,并旋转至所述第二目标角度对应朝向的情况下,获取所述单目摄像头采集到的第二图像。
  41. 根据权利要求37-40任一项所述的可移动平台,其特征在于,所述可移动平台包括无人飞行器。
  42. 根据权利要求41所述的可移动平台,其特征在于,所述第一位置和所述第二位置对应所述可移动平台的不同高度。
  43. 根据权利要求42所述的可移动平台,其特征在于,所述单目摄像头为可上视摄像头。
  44. 根据权利要求43所述的可移动平台,其特征在于,所述处理器用于获取所述单目摄像头采集到的第二图像之前,还用于:
    在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台下降或者上升预设高度,以控制所述可移动平台由所述第一位置移动至所述第二位置。
  45. 根据权利要求44所述的可移动平台,其特征在于,所述可移动平台的目标运动方向包括垂直向上方向。
  46. 根据权利要求44所述的可移动平台,其特征在于,所述处理器用于控制所述可移动平台下降或者上升预设高度,具体包括:
    确定所述第一图像的兴趣区域中是否包括障碍物;
    若所述第一图像的兴趣区域中包括障碍物,则在所述可移动平台位于所 述第一位置的情况下,控制所述可移动平台下降或者上升预设高度。
  47. 根据权利要求37所述的可移动平台,其特征在于,所述处理器用于处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图,具体包括:
    采用训练好的神经网络模型,分别处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图。
  48. 根据权利要求37-47任一项所述的可移动平台,其特征在于,所述处理器用于根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离,具体包括:
    根据所述单目摄像头的视场角,确定所述第一特征图中所述特定像素点偏移所述第一图像视野中心的第一角度;
    根据所述视场角,确定所述第二特征图中所述特定像素点偏移所述第一图像视野中心的第二角度;
    根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离。
  49. 根据权利要求48所述的可移动平台,其特征在于,所述第一图像和所述第二图像的视野方向相同,且与所述可移动平台的目标运动方向相同;所述处理器用于根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离,具体包括:
    按照所述第一位置、所述第二位置、所述第一图像的视野中心以及所述特定像素点满足如下约束条件,确定所述障碍物到所述可移动平台的距离;
    所述约束条件包括:所述第一位置、所述第二位置分别与所述视野中心以及所述特定像素点围城两个直角三角形,且所述第一位置对应的顶角为第一角度,所述第二位置对应的顶角为第二角度。
  50. 根据权利要求37-47任一项所述的可移动平台,其特征在于,所述特定像素点为所述障碍物的所有边缘像素点中在所述可移动平台的目标运动方向上,距离所述可移动平台最近的像素点。
  51. 根据权利要求50所述的可移动平台,其特征在于,所述障碍物到所述可移动平台的距离包括:所述障碍物到所述可移动平台的目标运动方向的垂直距离。
  52. 根据权利要求51所述的可移动平台,其特征在于,所述处理器还用 于:
    判断所述障碍物到所述可移动平台的距离是否大于预设距离;
    若所述障碍物到所述可移动平台的距离大于所述预设距离,则确定所述目标运动方向对应的区域为可移动区域。
  53. 根据权利要求52所述的可移动平台,其特征在于,所述处理器还用于:
    若所述障碍物到所述可移动平台的距离小于或等于所述预设距离,则确定所述目标运动方向对应的区域为不可移动区域。
  54. 根据权利要求52所述的可移动平台,其特征在于,所述目标运动方向包括垂直向上方向,所述可移动平台为无人飞行器,所述预设距离为所述可移动平台的机身中心与所述可移动平台的机翼之间的最大距离。
  55. 一种基于语义分割的测距系统,其特征在于,包括单目摄像头以及测距装置,所述单目摄像头设置于可移动平台上,用于采集图像;所述测距装置包括存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
    在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,所述第一图像包括障碍物,处理所述第一图像得到包含语义信息的第一特征图;在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,所述第二图像包括所述障碍物,处理所述第二图像得到包含语义信息的第二特征图;以及,根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离。
  56. 根据权利要求55所述的系统,其特征在于,所述处理器用于在所述可移动平台移动至第一位置情况下,获取所述单目摄像头采集到的第一图像,具体包括:
    在所述可移动平台移动至第一位置情况下,控制所述可移动平台在所述第一位置原地旋转第一目标角度;
    在所述可移动平台原地旋转所述第一目标角度的过程中,获取所述单目摄像头以预设角度为间隔采集到的多张图像;
    对所述多张图像进行图像合并,以得到所述第一图像。
  57. 根据权利要求56所述的系统,其特征在于,所述第一目标角度为360度。
  58. 根据权利要求56所述的系统,其特征在于,所述处理器用于在所述可移动平台由所述第一位置移动至所述第二位置情况下,获取所述单目摄像头采集到的第二图像,具体包括:
    确定所述多张图像中包括所述障碍物的目标图像;
    确定所述单目摄像头采集所述目标图像所旋转的第二目标角度;
    在所述可移动平台移动至所述第二位置,并旋转至所述第二目标角度对应朝向的情况下,获取所述单目摄像头采集到的第二图像。
  59. 根据权利要求55-58任一项所述的系统,其特征在于,所述可移动平台包括无人飞行器。
  60. 根据权利要求59所述的系统,其特征在于,所述第一位置和所述第二位置对应所述可移动平台的不同高度。
  61. 根据权利要求60所述的系统,其特征在于,所述单目摄像头为可上视摄像头。
  62. 根据权利要求61所述的系统,其特征在于,所述处理器用于获取所述单目摄像头采集到的第二图像之前,还用于:
    在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台下降或者上升预设高度,以控制所述可移动平台由所述第一位置移动至所述第二位置。
  63. 根据权利要求62所述的系统,其特征在于,所述可移动平台的目标运动方向包括垂直向上方向。
  64. 根据权利要求62所述的系统,其特征在于,所述处理器用于控制所述可移动平台下降或者上升预设高度,具体包括:
    确定所述第一图像的兴趣区域中是否包括障碍物;
    若所述第一图像的兴趣区域中包括障碍物,则在所述可移动平台位于所述第一位置的情况下,控制所述可移动平台下降或者上升预设高度。
  65. 根据权利要求55所述的系统,其特征在于,所述处理器用于处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图,具体包括:
    采用训练好的神经网络模型,分别处理所述第一图像和所述第二图像,得到包含语义信息的第一特征图和第二特征图。
  66. 根据权利要求55-65任一项所述的系统,其特征在于,所述处理器用于根据所述第一特征图和所述第二特征图中所述障碍物的特定像素点,确定所述障碍物到所述可移动平台的距离,具体包括:
    根据所述单目摄像头的视场角,确定所述第一特征图中所述特定像素点偏移所述第一图像视野中心的第一角度;
    根据所述视场角,确定所述第二特征图中所述特定像素点偏移所述第一图像视野中心的第二角度;
    根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离。
  67. 根据权利要求66所述的系统,其特征在于,所述第一图像和所述第二图像的视野方向相同,且与所述可移动平台的目标运动方向相同;所述处理器用于根据所述第一角度、所述第二角度以及所述第一位置与所述第二位置之间的距离,确定所述障碍物到所述可移动平台的距离,具体包括:
    按照所述第一位置、所述第二位置、所述第一图像的视野中心以及所述特定像素点满足如下约束条件,确定所述障碍物到所述可移动平台的距离;
    所述约束条件包括:所述第一位置、所述第二位置分别与所述视野中心以及所述特定像素点围城两个直角三角形,且所述第一位置对应的顶角为第一角度,所述第二位置对应的顶角为第二角度。
  68. 根据权利要求55-65任一项所述的系统,其特征在于,所述特定像素点为所述障碍物的所有边缘像素点中在所述可移动平台的目标运动方向上,距离所述可移动平台最近的像素点。
  69. 根据权利要求68所述的系统,其特征在于,所述障碍物到所述可移动平台的距离包括:所述障碍物到所述可移动平台的目标运动方向的垂直距离。
  70. 根据权利要求69所述的系统,其特征在于,所述处理器还用于:
    判断所述障碍物到所述可移动平台的距离是否大于预设距离;
    若所述障碍物到所述可移动平台的距离大于所述预设距离,则确定所述目标运动方向对应的区域为可移动区域。
  71. 根据权利要求70所述的系统,其特征在于,所述处理器还用于:
    若所述障碍物到所述可移动平台的距离小于或等于所述预设距离,则确定所述目标运动方向对应的区域为不可移动区域。
  72. 根据权利要求70所述的系统,其特征在于,所述目标运动方向包括垂直向上方向,所述可移动平台为无人飞行器,所述预设距离为所述可移动平台的机身中心与所述可移动平台的机翼之间的最大距离。
  73. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行如权利要求1-18任一项所述的方法。
  74. 一种计算机程序,其特征在于,当所述计算机程序被计算机执行时,用于实现如权利要求1-18任一项所述的方法。
PCT/CN2020/073657 2020-01-21 2020-01-21 基于语义分割的测距方法、装置、设备及系统 WO2021146970A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/073657 WO2021146970A1 (zh) 2020-01-21 2020-01-21 基于语义分割的测距方法、装置、设备及系统
CN202080004229.6A CN112639400A (zh) 2020-01-21 2020-01-21 基于语义分割的测距方法、装置、设备及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/073657 WO2021146970A1 (zh) 2020-01-21 2020-01-21 基于语义分割的测距方法、装置、设备及系统

Publications (1)

Publication Number Publication Date
WO2021146970A1 true WO2021146970A1 (zh) 2021-07-29

Family

ID=75291526

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/073657 WO2021146970A1 (zh) 2020-01-21 2020-01-21 基于语义分割的测距方法、装置、设备及系统

Country Status (2)

Country Link
CN (1) CN112639400A (zh)
WO (1) WO2021146970A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114608520B (zh) * 2021-04-29 2023-06-02 北京石头创新科技有限公司 一种测距方法、装置、机器人和存储介质
CN114018215B (zh) * 2022-01-04 2022-04-12 智道网联科技(北京)有限公司 基于语义分割的单目测距方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016148956A (ja) * 2015-02-10 2016-08-18 株式会社デンソーアイティーラボラトリ 位置合わせ装置、位置合わせ方法及び位置合わせ用コンピュータプログラム
CN106910206A (zh) * 2017-01-17 2017-06-30 邢惠钧 一种目标跟踪方法及装置
CN106970618A (zh) * 2017-04-06 2017-07-21 北京臻迪科技股份有限公司 一种无人船控制方法及系统
CN107687841A (zh) * 2017-09-27 2018-02-13 中科创达软件股份有限公司 一种测距方法及装置
CN108051831A (zh) * 2017-11-08 2018-05-18 哈尔滨工业大学 基于地物坐标信息的目标快速定位的方法、装置、卫星搭载设备和存储介质
CN109074476A (zh) * 2016-08-01 2018-12-21 深圳市大疆创新科技有限公司 用于障碍物规避的系统以及方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014019132A1 (en) * 2012-07-31 2014-02-06 Harman International Industries, Incorporated System and method for detecting obstacles using a single camera
CN104677329B (zh) * 2015-03-19 2017-06-30 广东欧珀移动通信有限公司 基于摄像头的目标测距方法及装置
CN105716582B (zh) * 2016-02-15 2018-08-28 中林信达(北京)科技信息有限责任公司 摄像机视场角的测量方法、装置以及摄像机视场角测量仪
CN106529495B (zh) * 2016-11-24 2020-02-07 腾讯科技(深圳)有限公司 一种飞行器的障碍物检测方法和装置
CN106643667B (zh) * 2016-12-14 2020-03-10 中国石油天然气集团公司 测距方法和装置
CN106767720A (zh) * 2016-12-30 2017-05-31 广州地理研究所 基于无人机的单镜头倾斜摄影测量方法、装置和系统
CN109443319A (zh) * 2018-12-21 2019-03-08 联创汽车电子有限公司 基于单目视觉的障碍物测距系统及其测距方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016148956A (ja) * 2015-02-10 2016-08-18 株式会社デンソーアイティーラボラトリ 位置合わせ装置、位置合わせ方法及び位置合わせ用コンピュータプログラム
CN109074476A (zh) * 2016-08-01 2018-12-21 深圳市大疆创新科技有限公司 用于障碍物规避的系统以及方法
CN106910206A (zh) * 2017-01-17 2017-06-30 邢惠钧 一种目标跟踪方法及装置
CN106970618A (zh) * 2017-04-06 2017-07-21 北京臻迪科技股份有限公司 一种无人船控制方法及系统
CN107687841A (zh) * 2017-09-27 2018-02-13 中科创达软件股份有限公司 一种测距方法及装置
CN108051831A (zh) * 2017-11-08 2018-05-18 哈尔滨工业大学 基于地物坐标信息的目标快速定位的方法、装置、卫星搭载设备和存储介质

Also Published As

Publication number Publication date
CN112639400A (zh) 2021-04-09

Similar Documents

Publication Publication Date Title
US9996746B1 (en) Systems and methods for autonomous perpendicular imaging with a target field of view
US20210279444A1 (en) Systems and methods for depth map sampling
US20230360230A1 (en) Methods and system for multi-traget tracking
US10089530B2 (en) Systems and methods for autonomous perpendicular imaging of test squares
CN115439424B (zh) 一种无人机航拍视频图像智能检测方法
CN110825101B (zh) 一种基于深度卷积神经网络的无人机自主降落方法
US10810426B2 (en) Systems and methods for autonomous perpendicular imaging of test squares
WO2017045326A1 (zh) 一种无人飞行器的摄像处理方法
CN106871906B (zh) 一种盲人导航方法、装置及终端设备
CN106973221B (zh) 基于美学评价的无人机摄像方法和系统
CN111856963A (zh) 一种基于车载环视系统的泊车仿真方法及装置
WO2021146970A1 (zh) 基于语义分割的测距方法、装置、设备及系统
WO2021047502A1 (zh) 一种目标状态估计方法、装置和无人机
CN111213153A (zh) 目标物体运动状态检测方法、设备及存储介质
CN113903011A (zh) 一种适用于室内停车场的语义地图构建及定位方法
CN110009675A (zh) 生成视差图的方法、装置、介质及设备
CN109543634B (zh) 定位过程中的数据处理方法、装置、电子设备和存储介质
WO2021056139A1 (zh) 获取降落位置的方法、设备、无人机、系统及存储介质
CN115147328A (zh) 三维目标检测方法及装置
CN112699748B (zh) 基于yolo及rgb图像的人车距离估计方法
CN110414392B (zh) 一种障碍物距离的确定方法及装置
CN112514366A (zh) 图像处理方法、图像处理装置和图像处理系统
CN114549825A (zh) 目标检测方法、装置、电子设备与存储介质
CN108573492B (zh) 一种实时雷达探测区域检测方法
WO2021237555A1 (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: 20915077

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

Country of ref document: EP

Kind code of ref document: A1