WO2019119752A1 - Obstacle recognition method and terminal - Google Patents

Obstacle recognition method and terminal Download PDF

Info

Publication number
WO2019119752A1
WO2019119752A1 PCT/CN2018/091638 CN2018091638W WO2019119752A1 WO 2019119752 A1 WO2019119752 A1 WO 2019119752A1 CN 2018091638 W CN2018091638 W CN 2018091638W WO 2019119752 A1 WO2019119752 A1 WO 2019119752A1
Authority
WO
WIPO (PCT)
Prior art keywords
detection window
pixel
image
obstacle
determining
Prior art date
Application number
PCT/CN2018/091638
Other languages
French (fr)
Chinese (zh)
Inventor
曲磊
Original Assignee
海信集团有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 海信集团有限公司 filed Critical 海信集团有限公司
Publication of WO2019119752A1 publication Critical patent/WO2019119752A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads

Definitions

  • the embodiments of the present invention relate to the field of assisted driving technologies, and in particular, to an obstacle recognition method and a terminal.
  • image recognition technology high-resolution image information and depth information of an image can be acquired by binocular stereo vision technology. Therefore, binocular stereo vision technology is widely used in image recognition.
  • the binocular stereo vision technology is usually used to acquire the disparity map of the image to be recognized, and the obstacle recognition is performed according to the lines in the disparity map.
  • this conventional obstacle recognition method may recognize the same obstacle as a plurality of obstacles when performing obstacle recognition based on the lines in the parallax map, resulting in a lower accuracy of obstacle recognition.
  • the embodiment of the present invention provides an obstacle recognition method and terminal. Improves the accuracy of obstacle recognition.
  • an embodiment of the present invention provides an obstacle recognition method, including:
  • a first start pixel Determining, on the oblique line, a first start pixel, where a sum of values of pixels in the set of pixels corresponding to the first start pixel is greater than a first threshold, and a set of pixels corresponding to the first start pixel includes the first start pixel a pixel in the column above the slash;
  • determining the first starting pixel on the oblique line comprises:
  • the pixel set corresponding to the first pixel includes a pixel located above the oblique line in the column of the first pixel.
  • the preset obstacle type includes a first obstacle type, the first obstacle type corresponds to a first window parameter; according to a disparity of the first starting pixel and the first window a parameter, in the V disparity map, determining a first detection window corresponding to the first start pixel, including:
  • determining the first detection window in the V disparity map according to the size of the first detection window comprises:
  • the first detection window is determined in the V disparity map according to a position of the first start pixel in the first detection window and a size of the first detection window.
  • determining the type of the obstacle identified in the image to be identified according to the recognition degree of the image in the detection window includes:
  • the obstacle type corresponding to the target window is determined as the obstacle type identified in the image to be identified.
  • the detection window includes a second detection window, the second detection window corresponding to the second obstacle type; and the image in the second detection window according to the second obstacle type Performing detection to obtain the recognition degree of the image in the second detection window, including:
  • the similarity is determined as the degree of recognition of the image in the second detection window.
  • the oblique line includes a straight line of the lower edge of the obstacle in the V-disparity map.
  • the oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and a portion of the upper edge line and/or the lower edge line of the V-disparity map.
  • an embodiment of the present invention provides an obstacle recognition apparatus, including an extraction module, a first determining module, a second determining module, and a third determining module, where
  • the extracting module is configured to extract a diagonal line in the V disparity map of the image to be identified
  • the first determining module is configured to determine, on the oblique line, a first starting pixel, where a sum of values of pixels in the pixel set corresponding to the first starting pixel is greater than a first threshold, where the first starting pixel corresponds
  • the set of pixels includes pixels in the column in which the first start pixel is located above the oblique line;
  • the second determining module is configured to determine, according to a parallax of the first starting pixel and a window parameter corresponding to the preset obstacle type, a detection window corresponding to the first starting pixel in the V disparity map;
  • the third determining module is configured to determine an obstacle type identified in the image to be identified according to the recognition degree of the image in the detection window.
  • the first determining module is specifically configured to:
  • the pixel set corresponding to the first pixel includes a pixel located above the oblique line in the column of the first pixel.
  • the preset obstacle type includes a first obstacle type, and the first obstacle type corresponds to a first window parameter; and the second determining module is specifically configured to:
  • the second determining module is specifically configured to:
  • the first detection window is determined in the V disparity map according to a position of the first start pixel in the first detection window and a size of the first detection window.
  • the third determining module is specifically configured to:
  • the obstacle type corresponding to the target window is determined as the obstacle type identified in the image to be identified.
  • the detection window includes a second detection window, and the second detection window corresponds to a second obstacle type; the third determining module is specifically configured to:
  • the similarity is determined as the degree of recognition of the image in the second detection window.
  • the oblique line includes a straight line of the lower edge of the obstacle in the V-disparity map.
  • the oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and a portion of the upper edge line and/or the lower edge line of the V-disparity map.
  • an embodiment of the present invention provides an obstacle recognition terminal, including a processor, a memory, a camera component, and a communication bus, where the communication bus is used to implement connection between components, and the memory is used to store a computer.
  • An instruction, the processor configured to execute the computer instructions to cause the terminal to execute:
  • a first start pixel Determining, on the oblique line, a first start pixel, where a sum of values of pixels in the set of pixels corresponding to the first start pixel is greater than a first threshold, and a set of pixels corresponding to the first start pixel includes the first start pixel a pixel in the column above the slash;
  • an embodiment of the present invention provides a computer readable storage medium storing computer executable instructions for causing the computer to perform any of the foregoing Methods.
  • FIG. 1 is a schematic diagram of an application scenario of an obstacle recognition method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart 1 of an obstacle recognition method according to an embodiment of the present invention.
  • 3A is a schematic diagram 1 of a diagonal line according to an embodiment of the present invention.
  • FIG. 3B is a schematic diagram 2 of a diagonal line according to an embodiment of the present invention.
  • 3C is a schematic diagram 3 of a diagonal line according to an embodiment of the present invention.
  • FIG. 3D is a schematic diagram 4 of a diagonal line according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a process of determining a first start pixel according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of a method for determining a first detection window according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of an obstacle recognition process according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of an obstacle recognition apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an obstacle recognition terminal according to an embodiment of the present invention.
  • a binocular stereoscopic vision technique is generally used to acquire a disparity map of an image to be recognized, and an obstacle recognition is performed according to a line in the disparity map.
  • the edge line of the obstacle can usually be preserved normally, while the part of the homogenous weak texture usually disappears, and the continuous envelope of the obstacle in the disparity map may be divided into discrete segments.
  • the overall line of the bus in the disparity map is divided into two parts (head line and tail line).
  • the front and rear of the bus are often judged as Two objects, which in turn cause the bus identification in the image to fail.
  • the obstacle recognition is performed according to the line in the parallax map, the same obstacle may be recognized as a plurality of obstacles, resulting in a lower accuracy of the obstacle recognition.
  • FIG. 1 is a schematic diagram of an application scenario of an obstacle recognition method according to an embodiment of the present invention.
  • a V-disparity map 101 and an identification model 102 including an image to be identified are included.
  • the image to be identified in the present application may include a plurality of obstacles, and correspondingly, the V-disparity map 101 includes an envelope map corresponding to each obstacle (a line drawing of the obstacle), and the obstacle in the V-disparity map 101 The line in the envelope map may be partially missing.
  • the V-disparity map 101 of the image to be recognized shown in FIG. 1 includes the obstacle 101-1 and the obstacle 101-2 in the envelope diagram of the obstacle 101-1. Part of the line of obstacle 101-1 is missing.
  • the recognition model 102 is obtained by learning a large number of samples.
  • the identification module 102 may include multiple obstacle types and window parameters corresponding to each obstacle type.
  • the window parameters may be used to indicate the window. Length, width, etc.
  • a starting pixel of the obstacle may be first determined in the V disparity map of the image to be identified, and determined according to a window parameter corresponding to the obstacle type in the recognition model.
  • the detection window identifies the image in the determined detection window according to the obstacle type corresponding to the detection window to determine the recognition degree of the image in the detection window, wherein the recognition degree of the image in the detection window is: detecting the image in the window.
  • the detection window A, the detection window B, and the detection window C corresponding to the recognition obstacle 101-1 can be determined based on the recognition model.
  • the obstacle types corresponding to the detection window A, the detection window B, and the detection window C are pedestrians, small cars, and buses, respectively
  • the recognition degree of the image in the detection window A is determined (the similarity between the image in the detection window A and the preset pedestrian) Degree is the first degree of recognition
  • determining the degree of recognition of the image in the detection window B detecting the similarity between the image in the window B and the preset small car
  • determining the degree of recognition of the image in the detection window C The similarity between the image in the detection window C and the preset bus is the third recognition degree.
  • the second degree of recognition is the highest, it is possible to determine that the obstacle 101-1 is a small car.
  • FIG. 2 is a schematic flowchart 1 of an obstacle recognition method according to an embodiment of the present invention.
  • the method may include:
  • the execution subject of the embodiment of the present invention may be an obstacle recognition device.
  • the obstacle recognition device may be implemented by software, or the obstacle recognition device may also be implemented by a combination of software and hardware.
  • the image to be recognized may be an image taken by the imaging device.
  • the disparity map of the image to be identified may be acquired first, the V disparity map corresponding to the disparity map is obtained, and the oblique line is extracted in the V disparity map. It should be noted that the process of acquiring the disparity map of the image to be identified and the process of obtaining the V disparity map of the disparity map may be referred to the prior art, which is not specifically limited in the embodiment of the present invention.
  • the value of each pixel in the disparity map is the parallax of the pixel.
  • the number of rows of the V disparity map is the same as the number of rows of the disparity map.
  • the number of columns of the V-disparity map is the same as the range of the parallax in the parallax map. For example, if the disparity range in the disparity map is 0-5 (a total of 6 disparity), the number of columns of the V disparity map is 6 columns.
  • the value of the pixel of the pixel (i, j) in the V disparity map is the number of pixels in the i-th row of the disparity map and having a disparity of j. For example, if the number of pixels having a parallax of 3 in the second row of the parallax map is three, the value of the pixel in the second row and the third column in the V-disparity map is three.
  • the existing theory proves that the locally flat ground has an inclined straight line in the V parallax map.
  • the oblique line in the embodiment of the present invention includes a straight line where the ground is located, for example, the inclined straight line may be a part of a diagonal line or a diagonal line.
  • the shape of the obstacle, the angle, the position, and the like of the obstacle in the V-disparity map are different, and the oblique line and the V-disparity map are shown in the embodiment of the present invention.
  • the shape of the obstacle, the angle at which the obstacle is placed (lateral, positive, etc.), and the position of the obstacle in the V-disparity map are related.
  • the oblique line may include a straight line where the lower edge of the obstacle in the V-disparity map is located; or the oblique line may include a straight line where the lower edge of the obstacle in the V-disparity map is located and a partial upper edge line of the V-disparity map; or, oblique The line may include a line where the lower edge of the obstacle in the V-disparity map is located and a part of the lower edge line of the V-disparity map; or, the oblique line may include a line on the lower edge of the obstacle in the V-disparity map, and a portion of the V-disparity map The edge line and part of the lower edge line of the V disparity map.
  • a straight line fit may be performed in the V disparity map to obtain an initial oblique line, which may be a diagonal line in the embodiment of the present invention, or a part of the oblique line in the embodiment of the present invention. It is determined whether the two ends of the initial oblique line can extend to the left and right edges of the V disparity map. If yes, it can be determined that the initial oblique line is the oblique line in the embodiment of the present invention, and if not, the upper edge of the V disparity map can be followed. And/or the lower edge, the initial oblique line is extended such that the initial oblique line can extend to the left and right edges of the V disparity map. Specifically, the following four cases may be included.
  • oblique lines will be described in detail with reference to FIGS. 3A to 3D.
  • FIG. 3A is a schematic diagram 1 of a diagonal line according to an embodiment of the present invention.
  • FIG. 3B is a schematic diagram 2 of a diagonal line according to an embodiment of the present invention.
  • FIG. 3C is a third schematic diagram of a diagonal line according to an embodiment of the present invention.
  • FIG. 3D is a schematic diagram 4 of a diagonal line according to an embodiment of the present invention.
  • a V-disparity map and oblique lines extracted in the V-disparity map are included.
  • the initial oblique line obtained by fitting in the V disparity map may extend to the left and right edges of the V disparity map, and therefore, the initial oblique line may be directly determined as the oblique line S1.
  • the oblique line S1 includes a straight line where the lower edge of the obstacle in the V-disparity map is located.
  • the left end of the initial oblique line fitted in the V disparity map may extend to the right edge of the V disparity map, but the right end of the initial oblique line may only extend to the M point of the V disparity map, and may not extend to V.
  • the left edge of the disparity map. Therefore, the initial oblique line can be extended to the left along the upper edge of the V-disparity map to obtain the oblique line S2.
  • the oblique line S2 includes a straight line where the lower edge of the obstacle in the V-disparity map is located and a partial upper edge line of the V-disparity map.
  • the right end of the initial oblique line fitted in the V disparity map may extend to the left edge of the V disparity map, but the left end of the initial oblique line may only extend to the N point of the V disparity map, and may not extend to V.
  • the right edge of the disparity map. Therefore, the initial oblique line can be extended to the right along the lower edge of the V-disparity map to obtain the oblique line S3.
  • the oblique line S3 includes a straight line where the lower edge of the obstacle in the V-disparity map is located and a partial lower edge line of the V-disparity map.
  • the left end of the initial oblique line fitted in the V disparity map can only extend to the P point of the V disparity map, and cannot extend to the left edge of the V disparity map, and the right end of the initial oblique line can only extend to V.
  • the Q point of the disparity map cannot be extended to the right edge of the V disparity map. Therefore, the initial oblique line can be extended to the left along the upper edge of the V-disparity map, and the initial oblique line can be extended to the right along the lower edge of the V-disparity map to obtain the oblique line S4.
  • the oblique line S4 includes a straight line where the lower edge of the obstacle in the V-disparity map, a partial upper edge line of the V-disparity map, and a partial lower edge line of the V-disparity map.
  • the slanting line may be extracted in the V disparity map by an algorithm such as Hough transform, RANSAC, and least squares, and is not described herein again in the embodiment of the present invention.
  • the sum of the values of the pixels in the set of pixels corresponding to the first start pixel is greater than the first threshold, and the set of pixels corresponding to the first start pixel includes the pixels above the oblique line in the column of the first start pixel.
  • the obstacle in the process of identifying the obstacle in the V disparity map, the obstacle may be identified from left to right, or the obstacle may be identified from right to left.
  • the pixel on the oblique line is sequentially determined as the first pixel from the end of the oblique line along the extending direction of the oblique line. And obtaining a sum of values of pixels in the set of pixels corresponding to the first pixel, until the sum of the values of the pixels in the set of pixels corresponding to the first pixel obtained on the oblique line is greater than the first threshold, determining the first pixel as The first starting pixel.
  • the sum of the values of the pixels in the set of pixels corresponding to the first pixel is used to indicate the number of pixels in the obstacle included in the column of the first pixel in the V disparity map.
  • one end of the slash can be an end point of the slash, or the end of a detection window in the slash.
  • one end of the oblique line is an end point of the oblique line.
  • one end of the oblique line is the end point of the most recently determined detection window in the oblique line.
  • FIG. 4 is a schematic diagram of a process of determining a first start pixel according to an embodiment of the present invention.
  • an obstacle 401, an obstacle 402, and a diagonal S are included in the V-disparity map.
  • the pixel A is first determined as the first pixel, and the sum of the values of the pixels located above the oblique line S in the column of the pixel A is obtained, and the value is determined. And if it is greater than the first threshold. As can be seen from FIG. 4, the pixel in the obstacle 401 is not included in the column of the pixel A. Therefore, the sum of the values of the pixels located above the oblique line S in the column of the pixel A is smaller than the first threshold.
  • the pixel B is determined as the first pixel, and it is judged that the pixel B does not satisfy the condition as the first start pixel.
  • the pixel C is determined as the first pixel, and it is judged that the pixel C does not satisfy the condition as the first start pixel.
  • the pixel D is determined as the first pixel, and the pixel D is determined to be the first starting pixel, and the pixel D is determined as the first starting pixel.
  • the pixel E is first determined as the first pixel, and it is judged that the pixel E does not satisfy the condition as the first starting pixel. Further, the pixel F is determined as the first pixel, and it is judged that the pixel F does not satisfy the condition as the first start pixel. Further, the pixel G is determined as the first pixel, and the pixel G is determined to be the first starting pixel, and the pixel G is determined as the first starting pixel.
  • S203 Determine, according to a parallax of the first starting pixel and a window parameter corresponding to the preset obstacle type, a detection window corresponding to the first starting pixel in the V disparity map.
  • the number of the preset obstacle types may be one, or may be multiple.
  • the number of the preset obstacle types may be set according to actual needs, which is not used in the embodiment of the present invention. Specifically limited.
  • a preset obstacle type corresponds to a window parameter, and the preset obstacle type and the corresponding window parameter are obtained by learning a large number of samples in advance.
  • the correspondence between the preset obstacle type and the window parameter can be as shown in Table 1.
  • the first start pixel is used as the lower right corner of the detection window, and each preset is determined according to the window parameter corresponding to each preset obstacle type.
  • the detection window corresponding to the obstacle type is used as the lower right corner of the detection window, and each preset is determined according to the window parameter corresponding to each preset obstacle type.
  • Preset obstacle type Window parameter bus Length Z1, height: Y1 truck Length: Z2, height: Y2 Small car Length: Z3, high: Y3 non-motor vehicle Length: Z4, high: Y4 ;
  • the first start pixel is used as the lower left corner of the detection window, and each preset is determined according to the window parameter corresponding to each preset obstacle type.
  • the detection window corresponding to the obstacle type is used as the lower left corner of the detection window, and each preset is determined according to the window parameter corresponding to each preset obstacle type.
  • the number of detection windows is the same as the number of preset obstacle types. For example, if five preset obstacle types are pre-set, it can be determined that five detection windows corresponding to the first start pixel are obtained.
  • S204 Determine, according to the recognition degree of the image in the detection window, the type of the obstacle identified in the image to be identified.
  • the detection window may be pre-processed to extract an image in the detection window.
  • the pre-processing may include: culling the slash in the detection window, randomly adding or deleting points on the oblique line in the detection window, performing appropriate enlargement or reduction processing on the detection window, and the like.
  • the preset processing may also include other processing, which is not specifically limited in this embodiment of the present invention.
  • the image in the detection window may be detected according to the preset obstacle type corresponding to the detection window, to obtain the recognition degree of the image in the detection window, and the target detection window is determined according to the recognition degree of the image in the detection window.
  • the image in the detection window has the highest degree of recognition, and the type of obstacle corresponding to the target window is determined as the type of obstacle identified in the image to be recognized.
  • the detection window includes a second detection window
  • the second detection window corresponds to the second obstacle type.
  • the recognition degree of the image in the second detection window is obtained according to the following feasible implementation manner, including: acquiring the second obstacle type corresponding
  • the standard image determines the similarity between the image in the second detection window and the standard image, and determines the similarity as the recognition degree of the image in the second detection window.
  • multiple features of the image in the second detection window may be extracted, multiple features of the standard image are extracted, and multiple features of the image in the second detection window are matched with multiple features of the standard image to determine The similarity between the image in the second detection window and the standard image. Wherein, the more the number of features of the image in the second detection window matches the features of the standard image, the higher the similarity.
  • the feature extraction method may include HOG, LBP, DPM, and the like.
  • the detection window determined according to the window parameter corresponding to the preset obstacle type “bus” is the detection window 1
  • the detection window 1 is detected
  • Comparing the image in the detection window 1 with the preset bus image to obtain the similarity between the image in the detection window 1 and the bus
  • determining the similarity between the image in the detection window 1 and the bus as detection The degree of recognition of the image in window 1.
  • the feature of the image in the detection window may be extracted first, and the obstacle recognition may be performed according to the feature of the image in the detection window.
  • the feature extraction method may include HOG, LBP, DPM, etc. Obstacle recognition can also be performed by convolutional neural networks.
  • each obstacle can be identified in the image to be identified, correspondingly
  • the recognition result may include an obstacle type included in the image to be detected, and a position of the obstacle type in the image to be detected.
  • the obstacle recognition method first extracts a diagonal line in the V-disparity map of the image to be recognized when the obstacle recognition is required for the image to be recognized, and determines the first start pixel on the oblique line according to the first start. a parallax corresponding to the pixel and a window parameter corresponding to the preset obstacle type, determining a detection window corresponding to the first starting pixel in the V disparity map, and determining an obstacle recognized in the image to be identified according to the recognition degree of the image in the detection window Types of.
  • the correct one only one detection window in the determined detection window is the window in which the obstacle is located (hereinafter referred to as the correct one). Detection window), other detection windows are not the window where the obstacle is located (hereinafter referred to as the error detection window). Since the type of the preset obstacle corresponding to the erroneous detection window is different from the type of the obstacle in the detection window, the image recognition degree in the erroneous detection window is usually lower than the preset threshold.
  • the correct detection window corresponds to the type of the preset obstacle and the type of the obstacle in the detection window. Even if the obstacle envelope line in the V disparity map is partially missing, the image recognition in the correct detection window will still be caused. The degree is greater than the preset threshold.
  • the recognition degree of the image in the correct detection window is much higher than the recognition degree of the image in the erroneous detection window, and therefore, even if it is to be identified
  • the envelope diagram of the obstacle in the V-disparity map of the image is partially missing, the type of the obstacle can still be accurately identified in the image to be recognized, thereby improving the accuracy of the obstacle recognition.
  • the first start pixel corresponding to the window parameter corresponding to the preset obstacle type and the window parameter corresponding to the preset obstacle type may be determined according to the feasible implementation manner.
  • the process of determining each detection window in the detection window is the same.
  • the preset obstacle type is the first obstacle type
  • the window parameter is the first window parameter
  • the determined detection window is determined as the first detection.
  • the window is explained as an example.
  • FIG. 5 is a schematic flowchart of a method for determining a first detection window according to an embodiment of the present invention. Referring to FIG. 5, the method may include:
  • the first window parameter may include a length, a width, a height, and the like of the obstacle corresponding to the first obstacle type.
  • the content included in the first window parameter may be set according to actual needs, which is not specifically limited in this embodiment of the present invention.
  • the obstacle recognition direction includes left to right and right to left.
  • the camera shown in the embodiment of the present invention is usually a binocular camera.
  • the camera parameters generally include the baseline length, focal length, and the like of the binocular camera.
  • the size of the first detection window generally includes the length and width of the first detection window.
  • the width of the first detection window may be determined by the following formula 1, wherein the width of the first detection window refers to the lateral length.
  • x is the width of the first detection window
  • d is the parallax of the first starting pixel
  • ⁇ z is the preset width in the first window parameter
  • B is the baseline length of the binocular camera
  • f is the focal length of the binocular camera.
  • the width of the first detection window may be determined by the following formula 2, wherein the width of the first detection window refers to the lateral length.
  • x is the width of the first detection window
  • d is the parallax of the first starting pixel
  • ⁇ z is the preset width in the first window parameter
  • B is the baseline length of the binocular camera
  • f is the focal length of the binocular camera.
  • the height of the first detection window may be determined by the following formula 3, wherein the height of the first detection window refers to the longitudinal length.
  • y is the height of the first detection window
  • d is the parallax of the first starting pixel
  • ⁇ y is the preset height in the first window parameter
  • B is the baseline length of the binocular camera.
  • the above is only a schematic manner for determining the size of the first detection window in an exemplary manner.
  • the size of the first detection window may be determined according to actual needs, which is not used by the embodiment of the present invention. Specifically limited.
  • the first detection window may also be determined according to the preset window shape.
  • the preset window shape may be a polygon such as a rectangle or a trapezoid.
  • the preset window shape may be set according to actual needs, which is not specifically limited in the embodiment of the present invention.
  • the position of the first start pixel in the first detection window may be determined according to the obstacle recognition direction, according to the position of the first start pixel in the first detection window and the size of the first detection window, in the V disparity map The first detection window is determined.
  • the first detection window is determined in the V disparity map according to the size of the first detection window with the first starting pixel as the lower right corner of the first detection window.
  • the first detection window is determined in the V disparity map according to the size of the first detection window with the first starting pixel as the lower left corner of the first detection window.
  • FIG. 6 is a schematic diagram of an obstacle recognition process according to an embodiment of the present invention. Referring to FIG. 6, the scene 601 to the scene 603 are included.
  • the oblique line S is extracted in the V disparity map.
  • the oblique line S includes a line where the lower edge of the obstacle in the V-disparity map is located and a portion of the lower edge line of the disparity map.
  • the pixel A is now determined as the first pixel, and it is judged that the pixel A does not satisfy the condition as the first start pixel.
  • the pixel B is further determined as the first pixel, and it is judged that the pixel B does not satisfy the condition as the first start pixel.
  • the pixel C is further determined as the first pixel, and it is judged that the pixel C does not satisfy the condition as the first start pixel. Further determining the pixel D as the first pixel and determining that the pixel D satisfies the condition as the first starting pixel, the pixel D is determined as the first starting pixel.
  • scenario 603 assuming that there are four types of obstacles, namely pedestrians, non-motor vehicles, small cars and buses. Then, the position of the pixel D is taken as the lower right corner, and the detection window K1 is determined according to the window parameter corresponding to the pedestrian. Taking the position of the pixel D as the lower right corner, the detection window K2 is determined according to the window parameter corresponding to the non-motor vehicle. Taking the position of the pixel D as the lower right corner, the detection window K3 is determined according to the window parameter corresponding to the small car. Taking the position of the pixel D as the lower right corner, the detection window K4 is determined according to the window parameter corresponding to the bus.
  • the detection window K1 is determined according to the window parameter corresponding to the pedestrian.
  • the detection window K2 is determined according to the window parameter corresponding to the non-motor vehicle.
  • the detection window K3 is determined according to the window parameter corresponding to the small car.
  • the detection window K4 is determined according to the window parameter corresponding to the bus.
  • FIG. 7 is a schematic structural diagram of an obstacle recognition apparatus according to an embodiment of the present invention. Referring to FIG. 7, an extraction module 11, a first determining module 12, a second determining module 13, and a third determining module 14 are included, where
  • the extraction module 11 is configured to extract a diagonal line in the V disparity map of the image to be identified;
  • the first determining module 12 is configured to determine, on the oblique line, a first starting pixel, where a sum of values of pixels in the pixel set corresponding to the first starting pixel is greater than a first threshold, where the first starting pixel corresponds to a set of pixels includes pixels in the column in which the first start pixel is located above the oblique line;
  • the second determining module 13 is configured to determine, according to the parallax of the first starting pixel and the window parameter corresponding to the preset obstacle type, a detection window corresponding to the first starting pixel in the V disparity map;
  • the third determining module 14 is configured to determine an obstacle type identified in the image to be identified according to the recognition degree of the image in the detection window.
  • the obstacle recognition device provided in the embodiment of the present invention can perform the technical solution shown in the foregoing method embodiment, and the implementation principle and the beneficial effects are similar, and details are not described herein.
  • the first determining module 12 is specifically configured to:
  • the pixel set corresponding to the first pixel includes a pixel located above the oblique line in the column of the first pixel.
  • the preset obstacle type includes a first obstacle type, and the first obstacle type corresponds to a first window parameter; and the second determining module 13 is specifically configured to:
  • the second determining module 13 is specifically configured to:
  • the first detection window is determined in the V disparity map according to a position of the first start pixel in the first detection window and a size of the first detection window.
  • the third determining module 14 is specifically configured to:
  • the obstacle type corresponding to the target window is determined as the obstacle type identified in the image to be identified.
  • the detection window includes a second detection window, and the second detection window corresponds to a second obstacle type; the third determining module 14 is specifically configured to:
  • the similarity is determined as the degree of recognition of the image in the second detection window.
  • the oblique line includes a straight line of the lower edge of the obstacle in the V-disparity map.
  • the oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and a portion of the upper edge line and/or the lower edge line of the V-disparity map.
  • the obstacle recognition device provided in the embodiment of the present invention can perform the technical solution shown in the foregoing method embodiment, and the implementation principle and the beneficial effects are similar, and details are not described herein.
  • FIG. 8 is a schematic structural diagram of an obstacle recognition terminal according to an embodiment of the present invention.
  • a processor 21, a memory 22, a camera component 23, and a communication bus 24 are provided.
  • the communication bus 24 is used to implement a connection between components.
  • the processor 21 is the control center of the obstacle recognition terminal, and connects various parts of the terminal using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 22, and calling the memory 22 in the memory.
  • the internal data performs various functions and processing data of the obstacle recognition terminal, thereby performing overall monitoring of the terminal.
  • the memory 22 can be used to store software programs and modules, and the processor 21 executes various functional applications and data processing by running software programs and modules stored in the memory 22.
  • the memory 22 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to the use of the obstacle recognition terminal ( For example, the acquired image, the calculated parallax image, or the processed grayscale image, etc.).
  • the camera assembly 23 is for acquiring images and transmitting the images to the memory 21 and/or the processor 22; the memory 21 is for storing computer instructions; the processor 22 is configured to perform the Computer instructions for causing the terminal to perform: extracting a diagonal line in a V-disparity map of the image to be identified; determining a first starting pixel on the oblique line, a sum of values of pixels in a pixel set corresponding to the first starting pixel
  • the pixel set corresponding to the first start pixel includes a pixel located above the oblique line in the column of the first start pixel; the parallax according to the first start pixel and the preset obstacle type And corresponding to the window parameter, determining, in the V disparity map, a detection window corresponding to the first starting pixel; and determining, according to the recognition degree of the image in the detection window, an obstacle type identified in the to-be-identified image.
  • the processor 22 determines the first starting pixel on the oblique line by performing the following process:
  • the set of pixels corresponding to the first pixel includes pixels located above the oblique line in the column of the first pixel.
  • the preset obstacle type includes a first obstacle type, the first obstacle type corresponding to a first window parameter; the processor 22 performs according to the first start by performing processing described below Determining a parallax of the pixel and the first window parameter, determining, in the V disparity map, a first detection window corresponding to the first starting pixel:
  • the processor 22 determines the first detection window in the V disparity map according to the size of the first detection window by performing a process of:
  • the size of the first detection window is determined in the V disparity map.
  • the processor 22 determines the type of obstacle identified in the image to be identified according to the recognition degree of the image in the detection window by performing the following processing:
  • the image in the detection window To obtain the recognition degree of the image in the detection window; determining the target detection window according to the recognition degree of the image in the detection window, the target detection The image in the window has the highest degree of recognition; the obstacle type corresponding to the target window is determined as the type of obstacle identified in the image to be recognized.
  • the detection window includes a second detection window, the second detection window corresponding to a second obstacle type; the processor 22 performs, according to the second obstacle type, by performing the following processing, The image in the second detection window is detected to obtain the recognition degree of the image in the second detection window:
  • the oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located; or the oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and the V The portion of the upper edge line and/or the lower edge line of the disparity map.
  • the number of camera components may be one or more.
  • the number of the camera components may be set according to actual needs, which is not specifically limited in the embodiment of the present invention.
  • An embodiment of the present invention provides a computer readable storage medium storing computer executable instructions for causing the computer to execute the method described in any of the above embodiments.
  • the aforementioned program may be stored in a computer readable storage medium storing computer executable instructions for causing the computer to perform any of the methods described above.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

An obstacle recognition method, device, and terminal, relating to the technical field of driver assistance. The method comprises: extracting an inclined line in a V disparity map of an image on which recognition is to be performed (S201); determining a first starting pixel on the inclined line (S202), wherein the sum of the values of pixels in a pixel set corresponding to the first starting pixel is greater than a first threshold, and the pixel set corresponding to the first starting pixel comprises a pixel located on the inclined line and in a column where the first starting pixel is located; determining, in the V disparity map, a detection window corresponding to the first starting pixel according to the disparity of the first starting pixel and a window parameter corresponding to a preset obstacle type (S203); and determining, according to the recognition degree of the image in the detection window, the type of an obstacle identified in the image on which recognition is to be performed (S204). The method is used for improving the obstacle recognition accuracy.

Description

一种障碍物识别方法和终端Obstacle recognition method and terminal 技术领域Technical field
本发明实施例涉及辅助驾驶技术领域,尤其涉及一种障碍物识别方法和终端。The embodiments of the present invention relate to the field of assisted driving technologies, and in particular, to an obstacle recognition method and a terminal.
背景技术Background technique
在图像识别技术中,通过双目立体视觉技术可以获取高分辨率的图像信息和图像的深度信息,因此,双目立体视觉技术被广泛应用于图像识别中。In the image recognition technology, high-resolution image information and depth information of an image can be acquired by binocular stereo vision technology. Therefore, binocular stereo vision technology is widely used in image recognition.
在基于双目立体视觉的障碍物识别过程中,通常先采用双目立体视觉技术获取待识别图像的视差图,并根据视差图中的线条进行障碍物识别。然而,这种常用的障碍物识别方法,在根据视差图中的线条进行障碍物识别时可能将同一障碍物识别成多个障碍物,导致障碍物识别的准确率较低。In the obstacle recognition process based on binocular stereo vision, the binocular stereo vision technology is usually used to acquire the disparity map of the image to be recognized, and the obstacle recognition is performed according to the lines in the disparity map. However, this conventional obstacle recognition method may recognize the same obstacle as a plurality of obstacles when performing obstacle recognition based on the lines in the parallax map, resulting in a lower accuracy of obstacle recognition.
发明内容Summary of the invention
为了解决由于同一障碍物在视差图中的包络线条的不连续,导致在障碍物识别时将同一障碍物识别成多个障碍物的问题,本发明实施例提供一种障碍物识别方法和终端,提高了障碍物识别的准确度。In order to solve the problem that the same obstacle is identified as a plurality of obstacles when the obstacle is recognized due to the discontinuity of the envelope line in the parallax map, the embodiment of the present invention provides an obstacle recognition method and terminal. Improves the accuracy of obstacle recognition.
第一方面,本发明实施例提供一种障碍物识别方法,包括:In a first aspect, an embodiment of the present invention provides an obstacle recognition method, including:
在待识别图像的V视差图中提取斜线;Extracting a diagonal line in the V disparity map of the image to be identified;
在所述斜线上确定第一起始像素,所述第一起始像素对应的像素集合中像素的数值之和大于第一阈值,所述第一起始像素对应的像素集合包括所述第一起始像素所在列中位于所述斜线之上的像素;Determining, on the oblique line, a first start pixel, where a sum of values of pixels in the set of pixels corresponding to the first start pixel is greater than a first threshold, and a set of pixels corresponding to the first start pixel includes the first start pixel a pixel in the column above the slash;
根据所述第一起始像素的视差和预设障碍物类型对应的窗口参数,在所述V视差图中确定所述第一起始像素对应的检测窗口;Determining, in the V disparity map, a detection window corresponding to the first start pixel according to a parallax of the first start pixel and a window parameter corresponding to the preset obstacle type;
根据所述检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型。Determining an obstacle type identified in the image to be identified according to the recognition degree of the image in the detection window.
在一种实施方式中,在所述斜线上确定第一起始像素,包括:In an embodiment, determining the first starting pixel on the oblique line comprises:
从所述斜线的一端起,沿着所述斜线的延伸方向,依次将所述斜线上的像素确定为第一像素,并获取所述第一像素对应的像素集合中像素的数值之和,直至在所述斜线上确定得到的第一像素对应的像素集合中像素的数值之和大于所述第一阈值时,将所述第一像素确定为所述第一起始像素;Determining, from the one end of the oblique line, the pixels on the oblique line as the first pixel along the extending direction of the oblique line, and acquiring the value of the pixel in the pixel set corresponding to the first pixel And determining, when the sum of the values of the pixels in the pixel set corresponding to the first pixel obtained on the oblique line is greater than the first threshold, determining the first pixel as the first start pixel;
其中,所述第一像素对应的像素集合包括所述第一像素所在列中位于所述斜线之上的像素。The pixel set corresponding to the first pixel includes a pixel located above the oblique line in the column of the first pixel.
在另一种实施方式中,所述预设障碍物类型包括第一障碍物类型,所述第一障碍物类型对应第一窗口参数;根据所述第一起始像素的视差和所述第一窗口参数,在所述V视差图中确定所述第一起始像素对应的第一检测窗口,包括:In another embodiment, the preset obstacle type includes a first obstacle type, the first obstacle type corresponds to a first window parameter; according to a disparity of the first starting pixel and the first window a parameter, in the V disparity map, determining a first detection window corresponding to the first start pixel, including:
获取所述第一障碍物类型对应的第一窗口参数;Obtaining a first window parameter corresponding to the first obstacle type;
根据障碍物识别方向、所述第一起始像素的视差、所述第一窗口参数和拍摄所述待识别图像的相机参数,确定所述第一检测窗口的大小;Determining a size of the first detection window according to an obstacle recognition direction, a parallax of the first start pixel, the first window parameter, and a camera parameter that captures the image to be recognized;
根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口,所述第一起始像素为所述第一检测窗口的一个角所在的像素。Determining, in the V disparity map, the first detection window according to a size of the first detection window, where the first starting pixel is a pixel of a corner of the first detection window.
在另一种实施方式中,根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口,包括:In another embodiment, determining the first detection window in the V disparity map according to the size of the first detection window comprises:
根据所述障碍物识别方向,确定所述第一起始像素在所述第一检测窗口中的位置;Determining a position of the first start pixel in the first detection window according to the obstacle recognition direction;
根据所述第一起始像素在所述第一检测窗口中的位置和所述第一检测窗口的大小,在所述V视差图中确定所述第一检测窗口。The first detection window is determined in the V disparity map according to a position of the first start pixel in the first detection window and a size of the first detection window.
在另一种实施方式中,根据检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型,包括:In another embodiment, determining the type of the obstacle identified in the image to be identified according to the recognition degree of the image in the detection window includes:
根据检测窗口对应的预设障碍物类型,对所述检测窗口中的图像进行检测,以获取检测窗口中图像的识别度;Detecting an image in the detection window according to a preset obstacle type corresponding to the detection window, to obtain an image recognition degree in the detection window;
根据检测窗口中图像的识别度,确定目标检测窗口,所述目标检测窗口中图像的识别度最高;Determining a target detection window according to the recognition degree of the image in the detection window, wherein the recognition degree of the image in the target detection window is the highest;
将所述目标窗口对应的障碍物类型确定为在所述待识别图像中识别的障碍物类型。The obstacle type corresponding to the target window is determined as the obstacle type identified in the image to be identified.
在另一种实施方式中,所述检测窗口包括第二检测窗口,所述第二检测 窗口对应第二障碍物类型;根据所述第二障碍物类型,对所述第二检测窗口中的图像进行检测,以获取所述第二检测窗口中图像的识别度,包括:In another embodiment, the detection window includes a second detection window, the second detection window corresponding to the second obstacle type; and the image in the second detection window according to the second obstacle type Performing detection to obtain the recognition degree of the image in the second detection window, including:
获取所述第二障碍物类型对应的标准图像;Obtaining a standard image corresponding to the second obstacle type;
确定所述第二检测窗口中的图像与所述标准图像的相似度;Determining a similarity between the image in the second detection window and the standard image;
将所述相似度确定为所述第二检测窗口中图像的识别度。The similarity is determined as the degree of recognition of the image in the second detection window.
在另一种实施方式中,所述斜线包括所述V视差图中障碍物的下边缘所在的直线;或者,In another embodiment, the oblique line includes a straight line of the lower edge of the obstacle in the V-disparity map; or
所述斜线包括所述V视差图中障碍物的下边缘所在的直线、和所述V视差图的上边缘线和/或下边缘线中的部分。The oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and a portion of the upper edge line and/or the lower edge line of the V-disparity map.
第二方面,本发明实施例提供一种障碍物识别装置,包括提取模块、第一确定模块、第二确定模块和第三确定模块,其中,In a second aspect, an embodiment of the present invention provides an obstacle recognition apparatus, including an extraction module, a first determining module, a second determining module, and a third determining module, where
所述提取模块用于,在待识别图像的V视差图中提取斜线;The extracting module is configured to extract a diagonal line in the V disparity map of the image to be identified;
所述第一确定模块用于,在所述斜线上确定第一起始像素,所述第一起始像素对应的像素集合中像素的数值之和大于第一阈值,所述第一起始像素对应的像素集合包括所述第一起始像素所在列中位于所述斜线之上的像素;The first determining module is configured to determine, on the oblique line, a first starting pixel, where a sum of values of pixels in the pixel set corresponding to the first starting pixel is greater than a first threshold, where the first starting pixel corresponds The set of pixels includes pixels in the column in which the first start pixel is located above the oblique line;
所述第二确定模块用于,根据所述第一起始像素的视差和预设障碍物类型对应的窗口参数,在所述V视差图中确定所述第一起始像素对应的检测窗口;The second determining module is configured to determine, according to a parallax of the first starting pixel and a window parameter corresponding to the preset obstacle type, a detection window corresponding to the first starting pixel in the V disparity map;
所述第三确定模块用于,根据所述检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型。The third determining module is configured to determine an obstacle type identified in the image to be identified according to the recognition degree of the image in the detection window.
在一种实施方式中,所述第一确定模块具体用于:In an embodiment, the first determining module is specifically configured to:
从所述斜线的一端起,沿着所述斜线的延伸方向,依次将所述斜线上的像素确定为第一像素,并获取所述第一像素对应的像素集合中像素的数值之和,直至在所述斜线上确定得到的第一像素对应的像素集合中像素的数值之和大于所述第一阈值时,将所述第一像素确定为所述第一起始像素;Determining, from the one end of the oblique line, the pixels on the oblique line as the first pixel along the extending direction of the oblique line, and acquiring the value of the pixel in the pixel set corresponding to the first pixel And determining, when the sum of the values of the pixels in the pixel set corresponding to the first pixel obtained on the oblique line is greater than the first threshold, determining the first pixel as the first start pixel;
其中,所述第一像素对应的像素集合包括所述第一像素所在列中位于所述斜线之上的像素。The pixel set corresponding to the first pixel includes a pixel located above the oblique line in the column of the first pixel.
在另一种实施方式中,所述预设障碍物类型包括第一障碍物类型,所述第一障碍物类型对应第一窗口参数;所述第二确定模块具体用于:In another embodiment, the preset obstacle type includes a first obstacle type, and the first obstacle type corresponds to a first window parameter; and the second determining module is specifically configured to:
获取所述第一障碍物类型对应的第一窗口参数;Obtaining a first window parameter corresponding to the first obstacle type;
根据障碍物识别方向、所述第一起始像素的视差、所述第一窗口参数和拍摄所述待识别图像的相机参数,确定所述第一检测窗口的大小;Determining a size of the first detection window according to an obstacle recognition direction, a parallax of the first start pixel, the first window parameter, and a camera parameter that captures the image to be recognized;
根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口,所述第一起始像素为所述第一检测窗口的一个角所在的像素。Determining, in the V disparity map, the first detection window according to a size of the first detection window, where the first starting pixel is a pixel of a corner of the first detection window.
在另一种实施方式中,所述第二确定模块具体用于:In another implementation, the second determining module is specifically configured to:
根据所述障碍物识别方向,确定所述第一起始像素在所述第一检测窗口中的位置;Determining a position of the first start pixel in the first detection window according to the obstacle recognition direction;
根据所述第一起始像素在所述第一检测窗口中的位置和所述第一检测窗口的大小,在所述V视差图中确定所述第一检测窗口。The first detection window is determined in the V disparity map according to a position of the first start pixel in the first detection window and a size of the first detection window.
在另一种实施方式中,所述第三确定模块具体用于:In another implementation, the third determining module is specifically configured to:
根据检测窗口对应的预设障碍物类型,对所述检测窗口中的图像进行检测,以获取检测窗口中图像的识别度;Detecting an image in the detection window according to a preset obstacle type corresponding to the detection window, to obtain an image recognition degree in the detection window;
根据检测窗口中图像的识别度,确定目标检测窗口,所述目标检测窗口中图像的识别度最高;Determining a target detection window according to the recognition degree of the image in the detection window, wherein the recognition degree of the image in the target detection window is the highest;
将所述目标窗口对应的障碍物类型确定为在所述待识别图像中识别的障碍物类型。The obstacle type corresponding to the target window is determined as the obstacle type identified in the image to be identified.
在另一种实施方式中,所述检测窗口包括第二检测窗口,所述第二检测窗口对应第二障碍物类型;所述第三确定模块具体用于:In another embodiment, the detection window includes a second detection window, and the second detection window corresponds to a second obstacle type; the third determining module is specifically configured to:
获取所述第二障碍物类型对应的标准图像;Obtaining a standard image corresponding to the second obstacle type;
确定所述第二检测窗口中的图像与所述标准图像的相似度;Determining a similarity between the image in the second detection window and the standard image;
将所述相似度确定为所述第二检测窗口中图像的识别度。The similarity is determined as the degree of recognition of the image in the second detection window.
在另一种实施方式中,所述斜线包括所述V视差图中障碍物的下边缘所在的直线;或者,In another embodiment, the oblique line includes a straight line of the lower edge of the obstacle in the V-disparity map; or
所述斜线包括所述V视差图中障碍物的下边缘所在的直线、和所述V视差图的上边缘线和/或下边缘线中的部分。The oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and a portion of the upper edge line and/or the lower edge line of the V-disparity map.
第三方面,本发明实施例提供一种障碍物识别终端,包括处理器、存储器、摄像头组件及通信总线,所述通信总线用于实现各元器件之间的连接,所述存储器用于存储计算机指令,所述处理器配置为执行所述计算机指令以使所述终端执行:In a third aspect, an embodiment of the present invention provides an obstacle recognition terminal, including a processor, a memory, a camera component, and a communication bus, where the communication bus is used to implement connection between components, and the memory is used to store a computer. An instruction, the processor configured to execute the computer instructions to cause the terminal to execute:
在待识别图像的V视差图中提取斜线;Extracting a diagonal line in the V disparity map of the image to be identified;
在所述斜线上确定第一起始像素,所述第一起始像素对应的像素集合中像素的数值之和大于第一阈值,所述第一起始像素对应的像素集合包括所述第一起始像素所在列中位于所述斜线之上的像素;Determining, on the oblique line, a first start pixel, where a sum of values of pixels in the set of pixels corresponding to the first start pixel is greater than a first threshold, and a set of pixels corresponding to the first start pixel includes the first start pixel a pixel in the column above the slash;
根据所述第一起始像素的视差和预设障碍物类型对应的窗口参数,在所述V视差图中确定所述第一起始像素对应的检测窗口;Determining, in the V disparity map, a detection window corresponding to the first start pixel according to a parallax of the first start pixel and a window parameter corresponding to the preset obstacle type;
根据所述检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型。Determining an obstacle type identified in the image to be identified according to the recognition degree of the image in the detection window.
第四方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行上述任一项所述的方法。In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium storing computer executable instructions for causing the computer to perform any of the foregoing Methods.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1为本发明实施例提供的障碍物识别方法的应用场景示意图;1 is a schematic diagram of an application scenario of an obstacle recognition method according to an embodiment of the present invention;
图2为本发明实施例提供的障碍物识别方法的流程示意图一;2 is a schematic flowchart 1 of an obstacle recognition method according to an embodiment of the present invention;
图3A为本发明实施例提供的斜线的示意图一;3A is a schematic diagram 1 of a diagonal line according to an embodiment of the present invention;
图3B为本发明实施例提供的斜线的示意图二;FIG. 3B is a schematic diagram 2 of a diagonal line according to an embodiment of the present invention; FIG.
图3C为本发明实施例提供的斜线的示意图三;3C is a schematic diagram 3 of a diagonal line according to an embodiment of the present invention;
图3D为本发明实施例提供的斜线的示意图四;FIG. 3D is a schematic diagram 4 of a diagonal line according to an embodiment of the present invention; FIG.
图4为本发明实施例提供的确定第一起始像素的过程示意图;4 is a schematic diagram of a process of determining a first start pixel according to an embodiment of the present invention;
图5为本发明实施例提供的确定第一检测窗口方法的流程示意图;FIG. 5 is a schematic flowchart of a method for determining a first detection window according to an embodiment of the present disclosure;
图6为本发明实施例提供的障碍物识别过程示意图;FIG. 6 is a schematic diagram of an obstacle recognition process according to an embodiment of the present invention; FIG.
图7为本发明实施例提供的障碍物识别装置的结构示意图;FIG. 7 is a schematic structural diagram of an obstacle recognition apparatus according to an embodiment of the present invention;
图8为本发明实施例提供的障碍物识别终端的结构示意图。FIG. 8 is a schematic structural diagram of an obstacle recognition terminal according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发 明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
相关技术中,在基于双目立体视觉的障碍物识别过程中,通常先采用双目立体视觉技术获取待识别图像的视差图,并根据视差图中的线条进行障碍物识别。然而,在视差图中,障碍物的边缘线条通常可以正常保留,而同质弱纹理的部分通常会消失,也就出现视差图中障碍物的连续包络可能被分为不连续的几段的情况。例如,对于图像中的公交车,视差图中公交车的整体线条被分为不连续的两部分(头部线条和尾部线条),在识别过程中,公交车的车头和车尾往往被判定为两个物体,进而导致对图像中的公交车识别失败。那么在根据视差图中的线条进行障碍物识别时可能将同一障碍物识别成多个障碍物,导致障碍物识别的准确率较低。In the related art, in the obstacle recognition process based on binocular stereo vision, a binocular stereoscopic vision technique is generally used to acquire a disparity map of an image to be recognized, and an obstacle recognition is performed according to a line in the disparity map. However, in the disparity map, the edge line of the obstacle can usually be preserved normally, while the part of the homogenous weak texture usually disappears, and the continuous envelope of the obstacle in the disparity map may be divided into discrete segments. Happening. For example, for a bus in an image, the overall line of the bus in the disparity map is divided into two parts (head line and tail line). In the identification process, the front and rear of the bus are often judged as Two objects, which in turn cause the bus identification in the image to fail. Then, when the obstacle recognition is performed according to the line in the parallax map, the same obstacle may be recognized as a plurality of obstacles, resulting in a lower accuracy of the obstacle recognition.
图1为本发明实施例提供的障碍物识别方法的应用场景示意图。请参见图1,包括待识别图像的V视差图101和识别模型102。其中,本申请待识别图像中可能包括多个障碍物,相应的,在V视差图101中包括各个障碍物对应的包络图(障碍物的线条图),V视差图101中的障碍物的包络图中的线条可能部分缺失,例如,图1所示的待识别图像的V视差图101中包括障碍物101-1和障碍物101-2,在障碍物101-1的包络图中,障碍物101-1的部分线条缺失。识别模型102为通过对大量的样本学习得到的,可选的,识别模块102中可以包括多种障碍物类型和每一种障碍物类型对应的窗口参数,例如,窗口参数可以用于指示窗口的长度、宽度等信息。FIG. 1 is a schematic diagram of an application scenario of an obstacle recognition method according to an embodiment of the present invention. Referring to FIG. 1, a V-disparity map 101 and an identification model 102 including an image to be identified are included. Wherein, the image to be identified in the present application may include a plurality of obstacles, and correspondingly, the V-disparity map 101 includes an envelope map corresponding to each obstacle (a line drawing of the obstacle), and the obstacle in the V-disparity map 101 The line in the envelope map may be partially missing. For example, the V-disparity map 101 of the image to be recognized shown in FIG. 1 includes the obstacle 101-1 and the obstacle 101-2 in the envelope diagram of the obstacle 101-1. Part of the line of obstacle 101-1 is missing. The recognition model 102 is obtained by learning a large number of samples. Optionally, the identification module 102 may include multiple obstacle types and window parameters corresponding to each obstacle type. For example, the window parameters may be used to indicate the window. Length, width, etc.
在本申请中,在识别待识别图像中的一个障碍物时,可以先在待识别图像的V视差图中确定障碍物的一个起始像素,并按照识别模型中障碍物类型对应的窗口参数确定检测窗口,按照检测窗口对应的障碍物类型,对确定的检测窗口中的图像进行识别,以确定检测窗口中的图像的识别度,其中,检测窗口中图像的识别度为:检测窗口中的图像与该检测窗口对应的预设图像之间的相似度,并将识别度最高的检测窗口对应的障碍物类型确定为该障碍物的障碍物类型。In the present application, when identifying an obstacle in the image to be identified, a starting pixel of the obstacle may be first determined in the V disparity map of the image to be identified, and determined according to a window parameter corresponding to the obstacle type in the recognition model. The detection window identifies the image in the determined detection window according to the obstacle type corresponding to the detection window to determine the recognition degree of the image in the detection window, wherein the recognition degree of the image in the detection window is: detecting the image in the window The similarity between the preset images corresponding to the detection window, and the type of the obstacle corresponding to the detection window having the highest recognition is determined as the obstacle type of the obstacle.
例如,请参见图1,在识别障碍物101-1时,可以根据识别模型确定识别 障碍物101-1对应的检测窗口A、检测窗口B和检测窗口C。假设检测窗口A、检测窗口B和检测窗口C对应的障碍物类型分别为行人、小型车和公交车,确定检测窗口A中图像的识别度(检测窗口A中图像与预设行人之间的相似度)为第一识别度,确定检测窗口B中图像的识别度(检测窗口B中图像与预设小型车之间的相似度)为第二识别度,确定检测窗口C中图像的识别度(检测窗口C中图像与预设公交车之间的相似度)为第三识别度。假设第二识别度最高,因此,可以确定障碍物101-1为小型车。For example, referring to Fig. 1, when the obstacle 101-1 is identified, the detection window A, the detection window B, and the detection window C corresponding to the recognition obstacle 101-1 can be determined based on the recognition model. It is assumed that the obstacle types corresponding to the detection window A, the detection window B, and the detection window C are pedestrians, small cars, and buses, respectively, and the recognition degree of the image in the detection window A is determined (the similarity between the image in the detection window A and the preset pedestrian) Degree is the first degree of recognition, determining the degree of recognition of the image in the detection window B (detecting the similarity between the image in the window B and the preset small car) as the second degree of recognition, determining the degree of recognition of the image in the detection window C ( The similarity between the image in the detection window C and the preset bus is the third recognition degree. Assuming that the second degree of recognition is the highest, it is possible to determine that the obstacle 101-1 is a small car.
下面,通过具体实施例对本申请所示的技术方案进行详细说明。需要说明的是,下面几个具体实施例可以相互结合,对于相同或相似的内容,在不同的实施例中不再进行重复说明。The technical solutions shown in the present application are described in detail below through specific embodiments. It should be noted that the following specific embodiments may be combined with each other, and the same or similar content will not be repeatedly described in different embodiments.
图2为本发明实施例提供的障碍物识别方法的流程示意图一。请参见图2,该方法可以包括:FIG. 2 is a schematic flowchart 1 of an obstacle recognition method according to an embodiment of the present invention. Referring to FIG. 2, the method may include:
S201、在待识别图像的V视差图中提取斜线。S201. Extract a diagonal line in the V-disparity map of the image to be identified.
本发明实施例的执行主体可以为障碍物识别装置。可选的,该障碍物识别装置可以通过软件实现,或者,该障碍物识别装置还可以通过软件和硬件的结合实现。The execution subject of the embodiment of the present invention may be an obstacle recognition device. Optionally, the obstacle recognition device may be implemented by software, or the obstacle recognition device may also be implemented by a combination of software and hardware.
可选的,待识别图像可以为通过摄像设备拍摄的图像。Optionally, the image to be recognized may be an image taken by the imaging device.
可选的,可以先获取待识别图像的视差图,获取视差图对应的V视差图,并在V视差图中提取斜线。需要说明的是,获取待识别图像的视差图的过程、以及获取视差图的V视差图的过程可以参见现有技术,本发明实施例对此不作具体限定。Optionally, the disparity map of the image to be identified may be acquired first, the V disparity map corresponding to the disparity map is obtained, and the oblique line is extracted in the V disparity map. It should be noted that the process of acquiring the disparity map of the image to be identified and the process of obtaining the V disparity map of the disparity map may be referred to the prior art, which is not specifically limited in the embodiment of the present invention.
可选的,视差图中每一个像素的值为该像素的视差。Optionally, the value of each pixel in the disparity map is the parallax of the pixel.
可选的,V视差图的行数与视差图的行数相同。V视差图的列数与视差图中视差的范围相同。例如,假设视差图中的视差范围为0-5(共6个视差),则V视差图的列数为6列。Optionally, the number of rows of the V disparity map is the same as the number of rows of the disparity map. The number of columns of the V-disparity map is the same as the range of the parallax in the parallax map. For example, if the disparity range in the disparity map is 0-5 (a total of 6 disparity), the number of columns of the V disparity map is 6 columns.
可选的,V视差图中像素(i,j)的像素的值为:视差图中第i行中、视差为j的像素的个数。例如,假设视差图中第2行中视差为3的像素的个数为3个,则V视差图中第2行第3列的像素的值为3。Optionally, the value of the pixel of the pixel (i, j) in the V disparity map is the number of pixels in the i-th row of the disparity map and having a disparity of j. For example, if the number of pixels having a parallax of 3 in the second row of the parallax map is three, the value of the pixel in the second row and the third column in the V-disparity map is three.
现有理论证明:局部平坦的地面在V视差图中呈一条倾斜的直线。在本发明实施例中的斜线包括地面所在的直线,例如,可以将该倾斜的直线作为 斜线、或者斜线中的一部分。The existing theory proves that the locally flat ground has an inclined straight line in the V parallax map. The oblique line in the embodiment of the present invention includes a straight line where the ground is located, for example, the inclined straight line may be a part of a diagonal line or a diagonal line.
可选的,当用户对V视差图的截取不同时,障碍物的形状、障碍物在V视差图中的角度、位置等均不相同,本发明实施例中所示的斜线与V视差图中的障碍物的形状、障碍物所处的角度(侧向、正向等)、障碍物在V视差图中的位置等因素相关。例如,斜线可以包括V视差图中障碍物的下边缘所在的直线;或者,斜线可以包括V视差图中障碍物的下边缘所在的直线和V视差图的部分上边缘线;或者,斜线可以包括V视差图中障碍物的下边缘所在的直线和V视差图的部分下边缘线;或者,斜线可以包括V视差图中障碍物的下边缘所在的直线、V视差图的部分上边缘线和V视差图的部分下边缘线。Optionally, when the interception of the V-disparity map is different, the shape of the obstacle, the angle, the position, and the like of the obstacle in the V-disparity map are different, and the oblique line and the V-disparity map are shown in the embodiment of the present invention. The shape of the obstacle, the angle at which the obstacle is placed (lateral, positive, etc.), and the position of the obstacle in the V-disparity map are related. For example, the oblique line may include a straight line where the lower edge of the obstacle in the V-disparity map is located; or the oblique line may include a straight line where the lower edge of the obstacle in the V-disparity map is located and a partial upper edge line of the V-disparity map; or, oblique The line may include a line where the lower edge of the obstacle in the V-disparity map is located and a part of the lower edge line of the V-disparity map; or, the oblique line may include a line on the lower edge of the obstacle in the V-disparity map, and a portion of the V-disparity map The edge line and part of the lower edge line of the V disparity map.
可选的,可以在V视差图中进行直线拟合,得到一条初始斜线,该初始斜线可以为本发明实施例中的斜线,或者为本发明实施例中的斜线的一部分。判断初始斜线的两端是否可以延伸至V视差图的左右边缘,若是,则可以确定初始斜线即为本发明实施例中的斜线,若否,则可以沿着V视差图的上边缘和/或下边缘,对初始斜线进行延伸,以使初始斜线可以延伸至V视差图的左右边缘。具体的,可以包括如下四种情况。下面,结合图3A-图3D,对斜线进行详细说明。Alternatively, a straight line fit may be performed in the V disparity map to obtain an initial oblique line, which may be a diagonal line in the embodiment of the present invention, or a part of the oblique line in the embodiment of the present invention. It is determined whether the two ends of the initial oblique line can extend to the left and right edges of the V disparity map. If yes, it can be determined that the initial oblique line is the oblique line in the embodiment of the present invention, and if not, the upper edge of the V disparity map can be followed. And/or the lower edge, the initial oblique line is extended such that the initial oblique line can extend to the left and right edges of the V disparity map. Specifically, the following four cases may be included. Hereinafter, oblique lines will be described in detail with reference to FIGS. 3A to 3D.
图3A为本发明实施例提供的斜线的示意图一。图3B为本发明实施例提供的斜线的示意图二。图3C为本发明实施例提供的斜线的示意图三。图3D为本发明实施例提供的斜线的示意图四。其中,在图3A-图3D中,包括V视差图和在V视差图中提取的斜线。FIG. 3A is a schematic diagram 1 of a diagonal line according to an embodiment of the present invention. FIG. 3B is a schematic diagram 2 of a diagonal line according to an embodiment of the present invention. FIG. 3C is a third schematic diagram of a diagonal line according to an embodiment of the present invention. FIG. 3D is a schematic diagram 4 of a diagonal line according to an embodiment of the present invention. Here, in FIGS. 3A to 3D, a V-disparity map and oblique lines extracted in the V-disparity map are included.
请参见图3A,在V视差图中拟合得到的初始斜线可以延伸至V视差图的左右边缘,因此,可以直接将初始斜线确定为斜线S1。该种情况下,斜线S1包括V视差图中障碍物的下边缘所在的直线。Referring to FIG. 3A, the initial oblique line obtained by fitting in the V disparity map may extend to the left and right edges of the V disparity map, and therefore, the initial oblique line may be directly determined as the oblique line S1. In this case, the oblique line S1 includes a straight line where the lower edge of the obstacle in the V-disparity map is located.
请参见图3B,在V视差图中拟合得到的初始斜线的左端可以延伸至V视差图的右边缘,但是初始斜线的右端只能延伸至V视差图的M点,无法延伸至V视差图的左边缘。因此,可以沿着V视差图的上边缘对初始斜线向左进行延伸,得到斜线S2。在该种情况下,斜线S2包括V视差图中障碍物的下边缘所在的直线和V视差图的部分上边缘线。Referring to FIG. 3B, the left end of the initial oblique line fitted in the V disparity map may extend to the right edge of the V disparity map, but the right end of the initial oblique line may only extend to the M point of the V disparity map, and may not extend to V. The left edge of the disparity map. Therefore, the initial oblique line can be extended to the left along the upper edge of the V-disparity map to obtain the oblique line S2. In this case, the oblique line S2 includes a straight line where the lower edge of the obstacle in the V-disparity map is located and a partial upper edge line of the V-disparity map.
请参见图3C,在V视差图中拟合得到的初始斜线的右端可以延伸至V 视差图的左边缘,但是初始斜线的左端只能延伸至V视差图的N点,无法延伸至V视差图的右边缘。因此,可以沿着V视差图的下边缘对初始斜线向右进行延伸,得到斜线S3。在该种情况下,斜线S3包括V视差图中障碍物的下边缘所在的直线和V视差图的部分下边缘线。Referring to FIG. 3C, the right end of the initial oblique line fitted in the V disparity map may extend to the left edge of the V disparity map, but the left end of the initial oblique line may only extend to the N point of the V disparity map, and may not extend to V. The right edge of the disparity map. Therefore, the initial oblique line can be extended to the right along the lower edge of the V-disparity map to obtain the oblique line S3. In this case, the oblique line S3 includes a straight line where the lower edge of the obstacle in the V-disparity map is located and a partial lower edge line of the V-disparity map.
请参见图3D,在V视差图中拟合得到的初始斜线的左端只能延伸至V视差图的P点,无法延伸至V视差图的左边缘,初始斜线的右端只能延伸至V视差图的Q点,无法延伸至V视差图的右边缘。因此,可以沿着V视差图的上边缘对初始斜线向左进行延伸、沿着V视差图的下边缘对初始斜线向右延伸,得到斜线S4。在该种情况下,斜线S4包括V视差图中障碍物的下边缘所在的直线、V视差图的部分上边缘线和V视差图的部分下边缘线。Referring to FIG. 3D, the left end of the initial oblique line fitted in the V disparity map can only extend to the P point of the V disparity map, and cannot extend to the left edge of the V disparity map, and the right end of the initial oblique line can only extend to V. The Q point of the disparity map cannot be extended to the right edge of the V disparity map. Therefore, the initial oblique line can be extended to the left along the upper edge of the V-disparity map, and the initial oblique line can be extended to the right along the lower edge of the V-disparity map to obtain the oblique line S4. In this case, the oblique line S4 includes a straight line where the lower edge of the obstacle in the V-disparity map, a partial upper edge line of the V-disparity map, and a partial lower edge line of the V-disparity map.
可选的,可以通过霍夫变换、RANSAC、最小二乘法等算法在V视差图中提取斜线,本发明实施例此处不再进行赘述。Optionally, the slanting line may be extracted in the V disparity map by an algorithm such as Hough transform, RANSAC, and least squares, and is not described herein again in the embodiment of the present invention.
S202、在斜线上确定第一起始像素。S202. Determine a first starting pixel on a diagonal line.
其中,第一起始像素对应的像素集合中像素的数值之和大于第一阈值,第一起始像素对应的像素集合包括第一起始像素所在列中位于斜线之上的像素。The sum of the values of the pixels in the set of pixels corresponding to the first start pixel is greater than the first threshold, and the set of pixels corresponding to the first start pixel includes the pixels above the oblique line in the column of the first start pixel.
可选的,在V视差图中进行障碍物识别的过程中,可以从左向右进行障碍物识别,也可以从右向左进行障碍物识别。Optionally, in the process of identifying the obstacle in the V disparity map, the obstacle may be identified from left to right, or the obstacle may be identified from right to left.
可选的,可以根据障碍物识别的方向(从左向右或者从右向左),从斜线的一端起,沿着斜线的延伸方向,依次将斜线上的像素确定为第一像素,并获取第一像素对应的像素集合中像素的数值之和,直至在斜线上确定得到的第一像素对应的像素集合中像素的数值之和大于第一阈值时,将第一像素确定为第一起始像素。Optionally, according to the direction of the obstacle recognition (from left to right or from right to left), the pixel on the oblique line is sequentially determined as the first pixel from the end of the oblique line along the extending direction of the oblique line. And obtaining a sum of values of pixels in the set of pixels corresponding to the first pixel, until the sum of the values of the pixels in the set of pixels corresponding to the first pixel obtained on the oblique line is greater than the first threshold, determining the first pixel as The first starting pixel.
可选的,第一像素对应的像素集合中像素的数值之和用于指示,V视差图中第一像素所在列中包含的障碍物中的像素个数。该数值之和越大,说明第一像素所在列中包括的障碍物的像素的个数越多。Optionally, the sum of the values of the pixels in the set of pixels corresponding to the first pixel is used to indicate the number of pixels in the obstacle included in the column of the first pixel in the V disparity map. The larger the sum of the values, the more the number of pixels of the obstacle included in the column in which the first pixel is located.
可选的,斜线的一端可以为斜线的一个端点,也可以为斜线中一个检测窗口的终点。例如,在开始对V视差图进行障碍物识别时,斜线的一端为斜线的一个端点。当V视差图中包括多个障碍物,且已识别一个障碍物之后,再继续进行障碍物识别时,则斜线的一端为斜线中、最近一次确定的检测窗 口的终点。Optionally, one end of the slash can be an end point of the slash, or the end of a detection window in the slash. For example, when the obstacle recognition is started on the V-disparity map, one end of the oblique line is an end point of the oblique line. When a plurality of obstacles are included in the V-disparity map and an obstacle has been identified, and then the obstacle recognition is continued, one end of the oblique line is the end point of the most recently determined detection window in the oblique line.
下面,结合图4,对确定第一起始像素的过程进行详细说明。Next, the process of determining the first start pixel will be described in detail with reference to FIG.
图4为本发明实施例提供的确定第一起始像素的过程示意图。请参见图4,在V视差图中包括障碍物401、障碍物402和斜线S。FIG. 4 is a schematic diagram of a process of determining a first start pixel according to an embodiment of the present invention. Referring to FIG. 4, an obstacle 401, an obstacle 402, and a diagonal S are included in the V-disparity map.
假设障碍物识别的方向为从右向左。在初始时,从斜线S的最右侧起,先将像素A确定为第一像素,并获取像素A所在列中、位于斜线S之上的像素的数值之和,并判断该数值之和是否大于第一阈值。由图4可知,像素A所在列中不包括障碍物401中的像素,因此,像素A所在列中、位于斜线S之上的像素的数值之和小于第一阈值。Assume that the direction of obstacle recognition is from right to left. Initially, starting from the rightmost side of the oblique line S, the pixel A is first determined as the first pixel, and the sum of the values of the pixels located above the oblique line S in the column of the pixel A is obtained, and the value is determined. And if it is greater than the first threshold. As can be seen from FIG. 4, the pixel in the obstacle 401 is not included in the column of the pixel A. Therefore, the sum of the values of the pixels located above the oblique line S in the column of the pixel A is smaller than the first threshold.
进一步的,将像素B确定为第一像素,且判断像素B不满足作为第一起始像素的条件。进一步的,将像素C确定为第一像素,且判断像素C不满足作为第一起始像素的条件。进一步的,将像素D确定为第一像素,且判断像素D满足作为第一起始像素的条件,则将像素D确定为第一起始像素。Further, the pixel B is determined as the first pixel, and it is judged that the pixel B does not satisfy the condition as the first start pixel. Further, the pixel C is determined as the first pixel, and it is judged that the pixel C does not satisfy the condition as the first start pixel. Further, the pixel D is determined as the first pixel, and the pixel D is determined to be the first starting pixel, and the pixel D is determined as the first starting pixel.
假设在V视差图中识别完障碍物401之后,则需要继续确定新的第一起始像素。具体的:Assuming that the obstacle 401 is identified in the V disparity map, it is necessary to continue to determine the new first starting pixel. specific:
按照斜线的延伸方向,先将像素E确定为第一像素,并判断像素E不满足作为第一起始像素的条件。进一步的,将像素F确定为第一像素,且判断像素F不满足作为第一起始像素的条件。进一步的,将像素G确定为第一像素,且判断像素G满足作为第一起始像素的条件,则将像素G确定为第一起始像素。According to the extending direction of the oblique line, the pixel E is first determined as the first pixel, and it is judged that the pixel E does not satisfy the condition as the first starting pixel. Further, the pixel F is determined as the first pixel, and it is judged that the pixel F does not satisfy the condition as the first start pixel. Further, the pixel G is determined as the first pixel, and the pixel G is determined to be the first starting pixel, and the pixel G is determined as the first starting pixel.
S203、根据第一起始像素的视差和预设障碍物类型对应的窗口参数,在V视差图中确定第一起始像素对应的检测窗口。S203. Determine, according to a parallax of the first starting pixel and a window parameter corresponding to the preset obstacle type, a detection window corresponding to the first starting pixel in the V disparity map.
可选的,预设障碍物类型的个数可以为1个,也可以为多个,在实际应用过程中,可以根据实际需要设置预设障碍物类型的个数,本发明实施例对此不作具体限定。Optionally, the number of the preset obstacle types may be one, or may be multiple. In the actual application process, the number of the preset obstacle types may be set according to actual needs, which is not used in the embodiment of the present invention. Specifically limited.
在本发明实施例中,一个预设障碍物类型对应一种窗口参数,该预设障碍物类型和对应的窗口参数为预先对大量样本学习得到的。In the embodiment of the present invention, a preset obstacle type corresponds to a window parameter, and the preset obstacle type and the corresponding window parameter are obtained by learning a large number of samples in advance.
例如,预设障碍物类型和窗口参数的对应关系可以如表1所示。For example, the correspondence between the preset obstacle type and the window parameter can be as shown in Table 1.
可选的,当障碍物识别方向为从右向左检测时,则以第一起始像素为检测窗口的右下角,按照每一种预设障碍物类型对应的窗口参数,确定每一种 预设障碍物类型对应的检测窗口。Optionally, when the obstacle recognition direction is detected from right to left, the first start pixel is used as the lower right corner of the detection window, and each preset is determined according to the window parameter corresponding to each preset obstacle type. The detection window corresponding to the obstacle type.
表1Table 1
预设障碍物类型Preset obstacle type 窗口参数Window parameter
公交车bus 长:Z1,高:Y1Length: Z1, height: Y1
货车truck 长:Z2,高:Y2Length: Z2, height: Y2
小型车Small car 长:Z3,高:Y3Length: Z3, high: Y3
非机动车non-motor vehicle 长:Z4,高:Y4Length: Z4, high: Y4
……...... ……......
可选的,当障碍物识别方向为从左向右检测时,则以第一起始像素为检测窗口的左下角,按照每一种预设障碍物类型对应的窗口参数,确定每一种预设障碍物类型对应的检测窗口。Optionally, when the obstacle recognition direction is detected from left to right, the first start pixel is used as the lower left corner of the detection window, and each preset is determined according to the window parameter corresponding to each preset obstacle type. The detection window corresponding to the obstacle type.
其中,确定得到检测窗口的数量通常与预设障碍物类型的个数相同。例如,假设预设有5个预设障碍物类型,则可以确定得到第一起始像素对应的5个检测窗口。Wherein, it is determined that the number of detection windows is the same as the number of preset obstacle types. For example, if five preset obstacle types are pre-set, it can be determined that five detection windows corresponding to the first start pixel are obtained.
需要说明的是,在图5所示的实施例中对确定检测窗口的方法进行详细说明,此处不再进行说明。It should be noted that the method for determining the detection window is described in detail in the embodiment shown in FIG. 5, and will not be described here.
S204、根据检测窗口中图像的识别度,确定在待识别图像中识别得到的障碍物类型。S204. Determine, according to the recognition degree of the image in the detection window, the type of the obstacle identified in the image to be identified.
可选的,在确定得到检测窗口之后,可以对检测窗口进行预处理,以提取检测窗口中的图像。Optionally, after determining the detection window, the detection window may be pre-processed to extract an image in the detection window.
例如,预处理可以包括:在检测窗口中剔除斜线、在检测窗口中随机增加或删除斜线上的点、对检测窗口进行适当的放大或缩小处理等。当然,在实际应用过程中,预设处理还可以包括其它处理,本发明实施例对此不作具体限定。For example, the pre-processing may include: culling the slash in the detection window, randomly adding or deleting points on the oblique line in the detection window, performing appropriate enlargement or reduction processing on the detection window, and the like. Of course, in the actual application process, the preset processing may also include other processing, which is not specifically limited in this embodiment of the present invention.
可选的,可以根据检测窗口对应的预设障碍物类型,对检测窗口中的图像进行检测,以获取检测窗口中图像的识别度,根据检测窗口中图像的识别度,确定目标检测窗口,目标检测窗口中图像的识别度最高,将目标窗口对应的障碍物类型确定为在待识别图像中识别的障碍物类型。Optionally, the image in the detection window may be detected according to the preset obstacle type corresponding to the detection window, to obtain the recognition degree of the image in the detection window, and the target detection window is determined according to the recognition degree of the image in the detection window. The image in the detection window has the highest degree of recognition, and the type of obstacle corresponding to the target window is determined as the type of obstacle identified in the image to be recognized.
假设检测窗口包括第二检测窗口,第二检测窗口对应第二障碍物类型,相应的,可以根据如下可行的实现方式获取第二检测窗口中图像的识别度, 包括:获取第二障碍物类型对应的标准图像,确定第二检测窗口中的图像与标准图像的相似度,将相似度确定为第二检测窗口中图像的识别度。It is assumed that the detection window includes a second detection window, and the second detection window corresponds to the second obstacle type. Correspondingly, the recognition degree of the image in the second detection window is obtained according to the following feasible implementation manner, including: acquiring the second obstacle type corresponding The standard image determines the similarity between the image in the second detection window and the standard image, and determines the similarity as the recognition degree of the image in the second detection window.
可选的,可以提取第二检测窗口中的图像的多个特征,提取标准图像的多个特征,将第二检测窗口中的图像的多个特征与标准图像的多个特征进行匹配,以确定第二检测窗口中的图像与标准图像的相似度。其中,第二检测窗口中的图像的特征与标准图像的特征相匹配的数量越多,则相似度越高。Optionally, multiple features of the image in the second detection window may be extracted, multiple features of the standard image are extracted, and multiple features of the image in the second detection window are matched with multiple features of the standard image to determine The similarity between the image in the second detection window and the standard image. Wherein, the more the number of features of the image in the second detection window matches the features of the standard image, the higher the similarity.
可选的,特征提取方法可以包括HOG、LBP、DPM等。Optionally, the feature extraction method may include HOG, LBP, DPM, and the like.
例如,假设预设障碍物类型为公交车,根据预设障碍物类型“公交车”对应的窗口参数确定得到的检测窗口为检测窗口1,则在对检测窗口1中的图像进行检测时,可以将检测窗口1中的图像与预设的公交车图像进行比对,以获取检测窗口1中的图像与公交车的相似度,并将检测窗口1中的图像与公交车的相似度确定为检测窗口1中图像的识别度。For example, if the preset obstacle type is a bus, and the detection window determined according to the window parameter corresponding to the preset obstacle type “bus” is the detection window 1, when the image in the detection window 1 is detected, Comparing the image in the detection window 1 with the preset bus image to obtain the similarity between the image in the detection window 1 and the bus, and determining the similarity between the image in the detection window 1 and the bus as detection The degree of recognition of the image in window 1.
可选的,在对检测窗口中的图像进行图像识别时,可以先提取检测窗口中图像的特征,并根据检测窗口中图像的特征进行障碍物识别,例如,特征提取方法可以包括HOG、LBP、DPM等。还可以通过卷积神经网络的方式进行障碍物识别。Optionally, when performing image recognition on the image in the detection window, the feature of the image in the detection window may be extracted first, and the obstacle recognition may be performed according to the feature of the image in the detection window. For example, the feature extraction method may include HOG, LBP, DPM, etc. Obstacle recognition can also be performed by convolutional neural networks.
需要说明的是,在实际应用过程中,当待识别图像中包括多个障碍物时,通过重复执行图2所示的实施例,可以分别在待识别图像中识别得到每一个障碍物,相应的,识别结果可以包括待检测图像中包括的障碍物类型、以及障碍物类型在待检测图像中的位置。It should be noted that, in the actual application process, when multiple obstacles are included in the image to be identified, by repeatedly performing the embodiment shown in FIG. 2, each obstacle can be identified in the image to be identified, correspondingly The recognition result may include an obstacle type included in the image to be detected, and a position of the obstacle type in the image to be detected.
本发明实施例提供的障碍物识别方法,当需要对待识别图像进行障碍物识别时,先在待识别图像的V视差图中提取斜线,在斜线上确定第一起始像素,根据第一起始像素的视差和预设障碍物类型对应的窗口参数,在V视差图中确定第一起始像素对应的检测窗口,并根据检测窗口中图像的识别度,确定在待识别图像中识别得到的障碍物类型。The obstacle recognition method provided by the embodiment of the present invention first extracts a diagonal line in the V-disparity map of the image to be recognized when the obstacle recognition is required for the image to be recognized, and determines the first start pixel on the oblique line according to the first start. a parallax corresponding to the pixel and a window parameter corresponding to the preset obstacle type, determining a detection window corresponding to the first starting pixel in the V disparity map, and determining an obstacle recognized in the image to be identified according to the recognition degree of the image in the detection window Types of.
在上述过程中,预设障碍物类型中只有一个预设障碍物类型为障碍物对应的障碍物类型,因此,确定得到的检测窗口中只有一个检测窗口为障碍物所在的窗口(下文简称正确的检测窗口),其它检测窗口均不是障碍物所在的窗口(下文简称错误的检测窗口)。由于错误的检测窗口对应的预设障碍物类型与该检测窗口中的障碍物的类型不同,因此,错误的检测窗口中的图 像识别度通常会低于预设阈值。而正确的检测窗口对应的预设障碍物类型与该检测窗口中的障碍物的类型相同,即使V视差图中的障碍物包络线条出现部分缺失,依然会使得正确的检测窗口中的图像识别度大于预设阈值。In the above process, only one of the preset obstacle types is the obstacle type corresponding to the obstacle. Therefore, only one detection window in the determined detection window is the window in which the obstacle is located (hereinafter referred to as the correct one). Detection window), other detection windows are not the window where the obstacle is located (hereinafter referred to as the error detection window). Since the type of the preset obstacle corresponding to the erroneous detection window is different from the type of the obstacle in the detection window, the image recognition degree in the erroneous detection window is usually lower than the preset threshold. The correct detection window corresponds to the type of the preset obstacle and the type of the obstacle in the detection window. Even if the obstacle envelope line in the V disparity map is partially missing, the image recognition in the correct detection window will still be caused. The degree is greater than the preset threshold.
由上可知,即使V视差图中的障碍物包络线条出现部分缺失,正确的检测窗口中图像的识别度也会远远高于错误的检测窗口中图像的识别度,因此,即使在待识别图像的V视差图中障碍物的包络图出现部分缺失时,依然可以准确的在待识别图像中识别出障碍物的类型,进而提高了障碍物识别的准确度。It can be seen from the above that even if the obstacle envelope line in the V disparity map is partially missing, the recognition degree of the image in the correct detection window is much higher than the recognition degree of the image in the erroneous detection window, and therefore, even if it is to be identified When the envelope diagram of the obstacle in the V-disparity map of the image is partially missing, the type of the obstacle can still be accurately identified in the image to be recognized, thereby improving the accuracy of the obstacle recognition.
在上述任意一个实施例的基础上,可选的,可以通过如下可行的实现方式根据第一起始像素的视差和预设障碍物类型对应的窗口参数,在V视差图中确定第一起始像素对应的检测窗口(图2所示实施例中的S203),具体的,请参见图5所示的实施例。On the basis of any of the foregoing embodiments, optionally, the first start pixel corresponding to the window parameter corresponding to the preset obstacle type and the window parameter corresponding to the preset obstacle type may be determined according to the feasible implementation manner. The detection window (S203 in the embodiment shown in FIG. 2), specifically, the embodiment shown in FIG.
需要说明的是,确定检测窗口中的每一个检测窗口的过程相同,下面,以预设障碍物类型为第一障碍物类型、窗口参数为第一窗口参数、确定得到的检测窗口为第一检测窗口为例进行说明。It should be noted that the process of determining each detection window in the detection window is the same. Below, the preset obstacle type is the first obstacle type, the window parameter is the first window parameter, and the determined detection window is determined as the first detection. The window is explained as an example.
图5为本发明实施例提供的确定第一检测窗口方法的流程示意图。请参见图5,该方法可以包括:FIG. 5 is a schematic flowchart of a method for determining a first detection window according to an embodiment of the present invention. Referring to FIG. 5, the method may include:
S501、获取第一障碍物类型对应的第一窗口参数。S501. Acquire a first window parameter corresponding to the first obstacle type.
可选的,第一窗口参数可以包括第一障碍物类型对应的障碍物的长度、宽度、高度等。当然,在实际应用过程中,可以根据实际需要设置第一窗口参数中包括的内容,本发明实施例对此不作具体限定。Optionally, the first window parameter may include a length, a width, a height, and the like of the obstacle corresponding to the first obstacle type. Of course, in the actual application process, the content included in the first window parameter may be set according to actual needs, which is not specifically limited in this embodiment of the present invention.
S502、根据障碍物识别方向、第一起始像素的视差、第一窗口参数和拍摄待识别图像的相机参数,确定第一检测窗口的大小。S502. Determine a size of the first detection window according to the obstacle recognition direction, the parallax of the first start pixel, the first window parameter, and the camera parameter that captures the image to be recognized.
可选的,障碍物识别方向包括从左向右和从右向左。Optionally, the obstacle recognition direction includes left to right and right to left.
可选的,本发明实施例所示的相机通常为双目相机,相应的,相机参数通常包括双目相机的基线长、焦距等。Optionally, the camera shown in the embodiment of the present invention is usually a binocular camera. Correspondingly, the camera parameters generally include the baseline length, focal length, and the like of the binocular camera.
可选的,第一检测窗口的大小通常包括第一检测窗口的长度和宽度。Optionally, the size of the first detection window generally includes the length and width of the first detection window.
可选的,当障碍物识别方向为从右向左时,则可以通过如下公式一确定第一检测窗口的宽度,其中,第一检测窗口的宽度是指横向长度。Optionally, when the obstacle recognition direction is from right to left, the width of the first detection window may be determined by the following formula 1, wherein the width of the first detection window refers to the lateral length.
Figure PCTCN2018091638-appb-000001
Figure PCTCN2018091638-appb-000001
其中,x为第一检测窗口的宽度,d为第一起始像素的视差,Δz为第一窗口参数中的预设宽度,B为双目相机的基线长,f为双目相机的焦距。Where x is the width of the first detection window, d is the parallax of the first starting pixel, Δz is the preset width in the first window parameter, B is the baseline length of the binocular camera, and f is the focal length of the binocular camera.
可选的,当障碍物识别方向为从左向右时,则可以通过如下公式二确定第一检测窗口的宽度,其中,第一检测窗口的宽度是指横向长度。Optionally, when the obstacle recognition direction is from left to right, the width of the first detection window may be determined by the following formula 2, wherein the width of the first detection window refers to the lateral length.
Figure PCTCN2018091638-appb-000002
Figure PCTCN2018091638-appb-000002
其中,x为第一检测窗口的宽度,d为第一起始像素的视差,Δz为第一窗口参数中的预设宽度,B为双目相机的基线长,f为双目相机的焦距。Where x is the width of the first detection window, d is the parallax of the first starting pixel, Δz is the preset width in the first window parameter, B is the baseline length of the binocular camera, and f is the focal length of the binocular camera.
可选的,可以通过如下公式三确定第一检测窗口的高度,其中,第一检测窗口的高度是指纵向长度。Alternatively, the height of the first detection window may be determined by the following formula 3, wherein the height of the first detection window refers to the longitudinal length.
Figure PCTCN2018091638-appb-000003
Figure PCTCN2018091638-appb-000003
其中,y为第一检测窗口的高度,d为第一起始像素的视差,Δy为第一窗口参数中的预设高度,B为双目相机的基线长。Where y is the height of the first detection window, d is the parallax of the first starting pixel, Δy is the preset height in the first window parameter, and B is the baseline length of the binocular camera.
需要说明的是,上述只是以示例的形式示意确定第一检测窗口的大小的方式,当然,在实际应用过程中,还可以根据实际需要确定第一检测窗口的大小,本发明实施例对此不作具体限定。It should be noted that the above is only a schematic manner for determining the size of the first detection window in an exemplary manner. Of course, in the actual application process, the size of the first detection window may be determined according to actual needs, which is not used by the embodiment of the present invention. Specifically limited.
S503、根据第一检测窗口的大小在V视差图中确定第一检测窗口。S503. Determine a first detection window in the V disparity map according to the size of the first detection window.
可选的,还可以根据预设窗口形状确定第一检测窗口,例如,预设窗口形状可以为矩形、梯形等多边形。当然,在实际应用过程中,可以根据实际需要设置预设窗口形状,本发明实施例对此不作具体限定。Optionally, the first detection window may also be determined according to the preset window shape. For example, the preset window shape may be a polygon such as a rectangle or a trapezoid. Of course, in the actual application process, the preset window shape may be set according to actual needs, which is not specifically limited in the embodiment of the present invention.
可选的,可以根据障碍物识别方向,确定第一起始像素在第一检测窗口中的位置,根据第一起始像素在第一检测窗口中的位置和第一检测窗口的大小,在V视差图中确定第一检测窗口。Optionally, the position of the first start pixel in the first detection window may be determined according to the obstacle recognition direction, according to the position of the first start pixel in the first detection window and the size of the first detection window, in the V disparity map The first detection window is determined.
可选的,当障碍物识别方向为从右向左时,则以第一起始像素为第一检测窗口的右下角、按照第一检测窗口的大小,在V视差图中确定第一检测窗口。Optionally, when the obstacle recognition direction is from right to left, the first detection window is determined in the V disparity map according to the size of the first detection window with the first starting pixel as the lower right corner of the first detection window.
可选的,当障碍物识别方向为从左向右时,则以第一起始像素为第一检测窗口的左下角、按照第一检测窗口的大小,在V视差图中确定第一检测窗口。Optionally, when the obstacle recognition direction is from left to right, the first detection window is determined in the V disparity map according to the size of the first detection window with the first starting pixel as the lower left corner of the first detection window.
在图5所示的实施例中,确定得到的第一检测窗口的尺寸与第一障碍物类型对应的障碍物的尺寸相匹配。In the embodiment shown in FIG. 5, it is determined that the size of the obtained first detection window matches the size of the obstacle corresponding to the first obstacle type.
下面,结合图6,通过具体示例,对上述方法实施例进行进一步详细说明。Hereinafter, the above method embodiment will be further described in detail by way of specific examples in conjunction with FIG. 6.
图6为本发明实施例提供的障碍物识别过程示意图。请参见图6,包括场景601至场景603。FIG. 6 is a schematic diagram of an obstacle recognition process according to an embodiment of the present invention. Referring to FIG. 6, the scene 601 to the scene 603 are included.
请参见场景601,在获取得到待识别图像的V视差图之后,在V视差图中提取斜线S。请参见场景601,斜线S中包括V视差图中障碍物的下边缘所在的直线和视差图的部分下边缘线。Referring to the scenario 601, after obtaining the V disparity map of the image to be identified, the oblique line S is extracted in the V disparity map. Referring to the scene 601, the oblique line S includes a line where the lower edge of the obstacle in the V-disparity map is located and a portion of the lower edge line of the disparity map.
请参见场景602,假设障碍物识别方向为从右向左,则从斜线的最右端起,现将像素A确定为第一像素,并判断像素A不满足作为第一起始像素的条件。进一步将像素B确定为第一像素,并判断像素B不满足作为第一起始像素的条件。进一步将像素C确定为第一像素,并判断像素C不满足作为第一起始像素的条件。进一步将像素D确定为第一像素,并判断像素D满足作为第一起始像素的条件,则将像素D确定为第一起始像素。Referring to the scenario 602, assuming that the obstacle recognition direction is from right to left, from the rightmost end of the oblique line, the pixel A is now determined as the first pixel, and it is judged that the pixel A does not satisfy the condition as the first start pixel. The pixel B is further determined as the first pixel, and it is judged that the pixel B does not satisfy the condition as the first start pixel. The pixel C is further determined as the first pixel, and it is judged that the pixel C does not satisfy the condition as the first start pixel. Further determining the pixel D as the first pixel and determining that the pixel D satisfies the condition as the first starting pixel, the pixel D is determined as the first starting pixel.
请参见场景603,假设预设有4个障碍物类型,分别为行人、非机动车、小型车和公交车。则以像素D所在位置为右下角,根据行人对应的窗口参数确定检测窗口K1。以像素D所在位置为右下角,根据非机动车对应的窗口参数确定检测窗口K2。以像素D所在位置为右下角,根据小型车对应的窗口参数确定检测窗口K3。以像素D所在位置为右下角,根据公交车对应的窗口参数确定检测窗口K4。Please refer to scenario 603, assuming that there are four types of obstacles, namely pedestrians, non-motor vehicles, small cars and buses. Then, the position of the pixel D is taken as the lower right corner, and the detection window K1 is determined according to the window parameter corresponding to the pedestrian. Taking the position of the pixel D as the lower right corner, the detection window K2 is determined according to the window parameter corresponding to the non-motor vehicle. Taking the position of the pixel D as the lower right corner, the detection window K3 is determined according to the window parameter corresponding to the small car. Taking the position of the pixel D as the lower right corner, the detection window K4 is determined according to the window parameter corresponding to the bus.
将检测窗口K1中的图像与标准行人图像进行比对,获取检测窗口K2与标准行人图像之间的相似度,并将该相似度确定为检测窗口K1中图像的识别度,记为识别度1。将检测窗口K2中的图像与标准非机动车图像进行比对,获取检测窗口K2与标准非机动车图像之间的相似度,并将该相似度确定为检测窗口K2中图像的识别度,记为识别度2。将检测窗口K3中的图像与标准小型车图像进行比对,获取检测窗口K3与标准小型车图像之间的相似度,并将该相似度确定为检测窗口K3中图像的识别度,记为识别度3。将检测窗口K4中的图像与标准公交车图像进行比对,获取检测窗口K4与标准公交车图像之间的相似度,并将该相似度确定为检测窗口K4中图像的识别度,记为识别度4。具体的,进行比对的图像、以及识别度可以如表2所示:Comparing the image in the detection window K1 with the standard pedestrian image, obtaining the similarity between the detection window K2 and the standard pedestrian image, and determining the similarity as the recognition degree of the image in the detection window K1, which is recorded as the recognition degree 1 . Comparing the image in the detection window K2 with the standard non-motor vehicle image, obtaining the similarity between the detection window K2 and the standard non-motor vehicle image, and determining the similarity as the recognition degree of the image in the detection window K2, To identify the degree 2. Comparing the image in the detection window K3 with the standard small car image, obtaining the similarity between the detection window K3 and the standard small car image, and determining the similarity as the recognition degree of the image in the detection window K3, which is recorded as identification Degree 3. Comparing the image in the detection window K4 with the standard bus image, obtaining the similarity between the detection window K4 and the standard bus image, and determining the similarity as the recognition degree of the image in the detection window K4, which is recorded as identification Degree 4. Specifically, the image to be compared and the degree of recognition can be as shown in Table 2:
表2Table 2
Figure PCTCN2018091638-appb-000004
Figure PCTCN2018091638-appb-000004
比较识别度1-识别度4,假设确定得到识别度3最大,则确定检测窗口3为目标检测窗口,并将检测窗口3对应的障碍物类型(小型车)确定为待识别图像中识别得到的障碍物类型。Comparing the degree of recognition 1 to the degree of recognition 4, assuming that the recognition degree 3 is determined to be the largest, determining that the detection window 3 is the target detection window, and determining the obstacle type (small car) corresponding to the detection window 3 as the recognition in the image to be recognized Type of obstacle.
图7为本发明实施例提供的障碍物识别装置的结构示意图。请参见图7,包括提取模块11、第一确定模块12、第二确定模块13和第三确定模块14,其中,FIG. 7 is a schematic structural diagram of an obstacle recognition apparatus according to an embodiment of the present invention. Referring to FIG. 7, an extraction module 11, a first determining module 12, a second determining module 13, and a third determining module 14 are included, where
所述提取模块11用于,在待识别图像的V视差图中提取斜线;The extraction module 11 is configured to extract a diagonal line in the V disparity map of the image to be identified;
所述第一确定模块12用于,在所述斜线上确定第一起始像素,所述第一起始像素对应的像素集合中像素的数值之和大于第一阈值,所述第一起始像素对应的像素集合包括所述第一起始像素所在列中位于所述斜线之上的像素;The first determining module 12 is configured to determine, on the oblique line, a first starting pixel, where a sum of values of pixels in the pixel set corresponding to the first starting pixel is greater than a first threshold, where the first starting pixel corresponds to a set of pixels includes pixels in the column in which the first start pixel is located above the oblique line;
所述第二确定模块13用于,根据所述第一起始像素的视差和预设障碍物类型对应的窗口参数,在所述V视差图中确定所述第一起始像素对应的检测窗口;The second determining module 13 is configured to determine, according to the parallax of the first starting pixel and the window parameter corresponding to the preset obstacle type, a detection window corresponding to the first starting pixel in the V disparity map;
所述第三确定模块14用于,根据所述检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型。The third determining module 14 is configured to determine an obstacle type identified in the image to be identified according to the recognition degree of the image in the detection window.
本发明实施例提供的障碍物识别装置可以执行上述方法实施例所示的技术方案,其实现原理以及有益效果类似,此处不再进行赘述。The obstacle recognition device provided in the embodiment of the present invention can perform the technical solution shown in the foregoing method embodiment, and the implementation principle and the beneficial effects are similar, and details are not described herein.
在一种实施方式中,所述第一确定模块12具体用于:In an embodiment, the first determining module 12 is specifically configured to:
从所述斜线的一端起,沿着所述斜线的延伸方向,依次将所述斜线上的像素确定为第一像素,并获取所述第一像素对应的像素集合中像素的数值之和,直至在所述斜线上确定得到的第一像素对应的像素集合中像素的数值之和大于所述第一阈值时,将所述第一像素确定为所述第一起始像素;Determining, from the one end of the oblique line, the pixels on the oblique line as the first pixel along the extending direction of the oblique line, and acquiring the value of the pixel in the pixel set corresponding to the first pixel And determining, when the sum of the values of the pixels in the pixel set corresponding to the first pixel obtained on the oblique line is greater than the first threshold, determining the first pixel as the first start pixel;
其中,所述第一像素对应的像素集合包括所述第一像素所在列中位于所述斜线之上的像素。The pixel set corresponding to the first pixel includes a pixel located above the oblique line in the column of the first pixel.
在另一种实施方式中,所述预设障碍物类型包括第一障碍物类型,所述第一障碍物类型对应第一窗口参数;所述第二确定模块13具体用于:In another embodiment, the preset obstacle type includes a first obstacle type, and the first obstacle type corresponds to a first window parameter; and the second determining module 13 is specifically configured to:
获取所述第一障碍物类型对应的第一窗口参数;Obtaining a first window parameter corresponding to the first obstacle type;
根据障碍物识别方向、所述第一起始像素的视差、所述第一窗口参数和拍摄所述待识别图像的相机参数,确定所述第一检测窗口的大小;Determining a size of the first detection window according to an obstacle recognition direction, a parallax of the first start pixel, the first window parameter, and a camera parameter that captures the image to be recognized;
根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口,所述第一起始像素为所述第一检测窗口的一个角所在的像素。Determining, in the V disparity map, the first detection window according to a size of the first detection window, where the first starting pixel is a pixel of a corner of the first detection window.
在另一种实施方式中,所述第二确定模块13具体用于:In another implementation, the second determining module 13 is specifically configured to:
根据所述障碍物识别方向,确定所述第一起始像素在所述第一检测窗口中的位置;Determining a position of the first start pixel in the first detection window according to the obstacle recognition direction;
根据所述第一起始像素在所述第一检测窗口中的位置和所述第一检测窗口的大小,在所述V视差图中确定所述第一检测窗口。The first detection window is determined in the V disparity map according to a position of the first start pixel in the first detection window and a size of the first detection window.
在另一种实施方式中,所述第三确定模块14具体用于:In another implementation, the third determining module 14 is specifically configured to:
根据检测窗口对应的预设障碍物类型,对所述检测窗口中的图像进行检测,以获取检测窗口中图像的识别度;Detecting an image in the detection window according to a preset obstacle type corresponding to the detection window, to obtain an image recognition degree in the detection window;
根据检测窗口中图像的识别度,确定目标检测窗口,所述目标检测窗口中图像的识别度最高;Determining a target detection window according to the recognition degree of the image in the detection window, wherein the recognition degree of the image in the target detection window is the highest;
将所述目标窗口对应的障碍物类型确定为在所述待识别图像中识别的障碍物类型。The obstacle type corresponding to the target window is determined as the obstacle type identified in the image to be identified.
在另一种实施方式中,所述检测窗口包括第二检测窗口,所述第二检测窗口对应第二障碍物类型;所述第三确定模块14具体用于:In another embodiment, the detection window includes a second detection window, and the second detection window corresponds to a second obstacle type; the third determining module 14 is specifically configured to:
获取所述第二障碍物类型对应的标准图像;Obtaining a standard image corresponding to the second obstacle type;
确定所述第二检测窗口中的图像与所述标准图像的相似度;Determining a similarity between the image in the second detection window and the standard image;
将所述相似度确定为所述第二检测窗口中图像的识别度。The similarity is determined as the degree of recognition of the image in the second detection window.
在另一种实施方式中,所述斜线包括所述V视差图中障碍物的下边缘所在的直线;或者,In another embodiment, the oblique line includes a straight line of the lower edge of the obstacle in the V-disparity map; or
所述斜线包括所述V视差图中障碍物的下边缘所在的直线、和所述V视差图的上边缘线和/或下边缘线中的部分。The oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and a portion of the upper edge line and/or the lower edge line of the V-disparity map.
本发明实施例提供的障碍物识别装置可以执行上述方法实施例所示的技术方案,其实现原理以及有益效果类似,此处不再进行赘述。The obstacle recognition device provided in the embodiment of the present invention can perform the technical solution shown in the foregoing method embodiment, and the implementation principle and the beneficial effects are similar, and details are not described herein.
图8为本发明实施例提供的障碍物识别终端的结构示意图。请参见图8,包括处理器21、存储器22、摄像头组件23及通信总线24,所述通信总线24用于实现各元器件之间的连接,其中,FIG. 8 is a schematic structural diagram of an obstacle recognition terminal according to an embodiment of the present invention. Referring to FIG. 8, a processor 21, a memory 22, a camera component 23, and a communication bus 24 are provided. The communication bus 24 is used to implement a connection between components.
处理器21是该障碍物识别终端的控制中心,利用各种接口和线路连接整个该终端的各个部分,通过运行或执行存储在存储器22内的软件程序和/或模块,以及调用存储在存储器22内的数据,执行障碍物识别终端的各种功能和处理数据,从而对该终端进行整体监控。The processor 21 is the control center of the obstacle recognition terminal, and connects various parts of the terminal using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 22, and calling the memory 22 in the memory. The internal data performs various functions and processing data of the obstacle recognition terminal, thereby performing overall monitoring of the terminal.
存储器22可用于存储软件程序以及模块,处理器21通过运行存储在存储器22的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器22可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据障碍物识别终端的使用所创建的数据(比如采集到的图像、计算得到的视差图像或者处理得到的灰度图像等)等。The memory 22 can be used to store software programs and modules, and the processor 21 executes various functional applications and data processing by running software programs and modules stored in the memory 22. The memory 22 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to the use of the obstacle recognition terminal ( For example, the acquired image, the calculated parallax image, or the processed grayscale image, etc.).
所述摄像头组件23用于采集图像,并将所述图像传输至所述存储器21和/或所述处理器22;所述存储器21用于存储计算机指令;所述处理器22配置为执行所述计算机指令以使所述终端执行:在待识别图像的V视差图中提取斜线;在所述斜线上确定第一起始像素,所述第一起始像素对应的像素集合中像素的数值之和大于第一阈值,所述第一起始像素对应的像素集合包括所述第一起始像素所在列中位于所述斜线之上的像素;根据所述第一起始像素的视差和预设障碍物类型对应的窗口参数,在所述V视差图中确定所述第一起始像素对应的检测窗口;根据所述检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型。The camera assembly 23 is for acquiring images and transmitting the images to the memory 21 and/or the processor 22; the memory 21 is for storing computer instructions; the processor 22 is configured to perform the Computer instructions for causing the terminal to perform: extracting a diagonal line in a V-disparity map of the image to be identified; determining a first starting pixel on the oblique line, a sum of values of pixels in a pixel set corresponding to the first starting pixel The pixel set corresponding to the first start pixel includes a pixel located above the oblique line in the column of the first start pixel; the parallax according to the first start pixel and the preset obstacle type And corresponding to the window parameter, determining, in the V disparity map, a detection window corresponding to the first starting pixel; and determining, according to the recognition degree of the image in the detection window, an obstacle type identified in the to-be-identified image.
在一些实施方式中,所述处理器22通过执行下述处理进行在所述斜线上确定第一起始像素:In some embodiments, the processor 22 determines the first starting pixel on the oblique line by performing the following process:
从所述斜线的一端起,沿着所述斜线的延伸方向,依次将所述斜线上的像素确定为第一像素,并获取所述第一像素对应的像素集合中像素的数值之和,直至在所述斜线上确定得到的第一像素对应的像素集合中像素的数值之和大于所述第一阈值时,将所述第一像素确定为所述第一起始像素;其中,所述第一像素对应的像素集合包括所述第一像素所在列中位于所述斜线之上的像素。Determining, from the one end of the oblique line, the pixels on the oblique line as the first pixel along the extending direction of the oblique line, and acquiring the value of the pixel in the pixel set corresponding to the first pixel And determining, when the sum of the values of the pixels in the pixel set corresponding to the first pixel obtained on the oblique line is greater than the first threshold, determining the first pixel as the first start pixel; The set of pixels corresponding to the first pixel includes pixels located above the oblique line in the column of the first pixel.
在一些实施方式中,所述预设障碍物类型包括第一障碍物类型,所述第一障碍物类型对应第一窗口参数;所述处理器22通过执行下述处理进行根据所述第一起始像素的视差和所述第一窗口参数,在所述V视差图中确定所述第一起始像素对应的第一检测窗口:In some embodiments, the preset obstacle type includes a first obstacle type, the first obstacle type corresponding to a first window parameter; the processor 22 performs according to the first start by performing processing described below Determining a parallax of the pixel and the first window parameter, determining, in the V disparity map, a first detection window corresponding to the first starting pixel:
获取所述第一障碍物类型对应的第一窗口参数;根据障碍物识别方向、所述第一起始像素的视差、所述第一窗口参数和拍摄所述待识别图像的相机参数,确定所述第一检测窗口的大小;根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口,所述第一起始像素为所述第一检测窗口的一个角所在的像素。Obtaining a first window parameter corresponding to the first obstacle type; determining, according to an obstacle recognition direction, a parallax of the first starting pixel, the first window parameter, and a camera parameter that captures the image to be recognized a size of the first detection window; determining the first detection window in the V disparity map according to the size of the first detection window, where the first starting pixel is a pixel of a corner of the first detection window .
在一些实施方式中,所述处理器22通过执行下述处理进行根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口:In some embodiments, the processor 22 determines the first detection window in the V disparity map according to the size of the first detection window by performing a process of:
根据所述障碍物识别方向,确定所述第一起始像素在所述第一检测窗口中的位置;根据所述第一起始像素在所述第一检测窗口中的位置和所述第一检测窗口的大小,在所述V视差图中确定所述第一检测窗口。Determining, according to the obstacle recognition direction, a position of the first start pixel in the first detection window; according to a position of the first start pixel in the first detection window and the first detection window The size of the first detection window is determined in the V disparity map.
在一些实施方式中,所述处理器22通过执行下述处理进行根据检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型:In some embodiments, the processor 22 determines the type of obstacle identified in the image to be identified according to the recognition degree of the image in the detection window by performing the following processing:
根据检测窗口对应的预设障碍物类型,对所述检测窗口中的图像进行检测,以获取检测窗口中图像的识别度;根据检测窗口中图像的识别度,确定目标检测窗口,所述目标检测窗口中图像的识别度最高;将所述目标窗口对应的障碍物类型确定为在所述待识别图像中识别的障碍物类型。And detecting, according to the preset obstacle type corresponding to the detection window, the image in the detection window to obtain the recognition degree of the image in the detection window; determining the target detection window according to the recognition degree of the image in the detection window, the target detection The image in the window has the highest degree of recognition; the obstacle type corresponding to the target window is determined as the type of obstacle identified in the image to be recognized.
在一些实施方式中,所述检测窗口包括第二检测窗口,所述第二检测窗口对应第二障碍物类型;所述处理器22通过执行下述处理进行根据所述第二障碍物类型,对所述第二检测窗口中的图像进行检测,以获取所述第二检测窗口中图像的识别度:In some embodiments, the detection window includes a second detection window, the second detection window corresponding to a second obstacle type; the processor 22 performs, according to the second obstacle type, by performing the following processing, The image in the second detection window is detected to obtain the recognition degree of the image in the second detection window:
获取所述第二障碍物类型对应的标准图像;确定所述第二检测窗口中的图像与所述标准图像的相似度;将所述相似度确定为所述第二检测窗口中图像的识别度。Obtaining a standard image corresponding to the second obstacle type; determining a similarity between the image in the second detection window and the standard image; determining the similarity as an image recognition degree in the second detection window .
可选的,所述斜线包括所述V视差图中障碍物的下边缘所在的直线;或者,所述斜线包括所述V视差图中障碍物的下边缘所在的直线、和所述V视差图的上边缘线和/或下边缘线中的部分。Optionally, the oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located; or the oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and the V The portion of the upper edge line and/or the lower edge line of the disparity map.
可选的,摄像头组件的个数可以为1个,也可以为多个。在实际应用过程中,可以根据实际需要设置摄像头组件的个数,本发明实施例对此不作具体限定。Optionally, the number of camera components may be one or more. In the actual application process, the number of the camera components may be set according to actual needs, which is not specifically limited in the embodiment of the present invention.
本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行上述任意实施例所述的方法。An embodiment of the present invention provides a computer readable storage medium storing computer executable instructions for causing the computer to execute the method described in any of the above embodiments.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行上述任一所述方法。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。One of ordinary skill in the art will appreciate that all or part of the steps to implement the various method embodiments described above may be accomplished by hardware associated with the program instructions. The aforementioned program may be stored in a computer readable storage medium storing computer executable instructions for causing the computer to perform any of the methods described above. The program, when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是:以上各实施例仅用以说明本发明实施例的技术方案,而非对其限制;尽管参照前述各实施例对本发明实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明实施例方案的范围。It should be noted that the above embodiments are only used to explain the technical solutions of the embodiments of the present invention, and are not limited thereto; although the embodiments of the present invention are described in detail with reference to the foregoing embodiments, those skilled in the art It should be understood that the technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the essence of the corresponding technical solutions. The scope of the program.

Claims (15)

  1. 一种障碍物识别方法,其特征在于,包括:An obstacle recognition method, comprising:
    在待识别图像的V视差图中提取斜线;Extracting a diagonal line in the V disparity map of the image to be identified;
    在所述斜线上确定第一起始像素,所述第一起始像素对应的像素集合中像素的数值之和大于第一阈值,所述第一起始像素对应的像素集合包括所述第一起始像素所在列中位于所述斜线之上的像素;Determining, on the oblique line, a first start pixel, where a sum of values of pixels in the set of pixels corresponding to the first start pixel is greater than a first threshold, and a set of pixels corresponding to the first start pixel includes the first start pixel a pixel in the column above the slash;
    根据所述第一起始像素的视差和预设障碍物类型对应的窗口参数,在所述V视差图中确定所述第一起始像素对应的检测窗口;Determining, in the V disparity map, a detection window corresponding to the first start pixel according to a parallax of the first start pixel and a window parameter corresponding to the preset obstacle type;
    根据所述检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型。Determining an obstacle type identified in the image to be identified according to the recognition degree of the image in the detection window.
  2. 根据权利要求1所述的方法,其特征在于,在所述斜线上确定第一起始像素,包括:The method of claim 1 wherein determining the first starting pixel on the oblique line comprises:
    从所述斜线的一端起,沿着所述斜线的延伸方向,依次将所述斜线上的像素确定为第一像素,并获取所述第一像素对应的像素集合中像素的数值之和,直至在所述斜线上确定得到的第一像素对应的像素集合中像素的数值之和大于所述第一阈值时,将所述第一像素确定为所述第一起始像素;Determining, from the one end of the oblique line, the pixels on the oblique line as the first pixel along the extending direction of the oblique line, and acquiring the value of the pixel in the pixel set corresponding to the first pixel And determining, when the sum of the values of the pixels in the pixel set corresponding to the first pixel obtained on the oblique line is greater than the first threshold, determining the first pixel as the first start pixel;
    其中,所述第一像素对应的像素集合包括所述第一像素所在列中位于所述斜线之上的像素。The pixel set corresponding to the first pixel includes a pixel located above the oblique line in the column of the first pixel.
  3. 根据权利要求1或2所述的方法,其特征在于,所述预设障碍物类型包括第一障碍物类型,所述第一障碍物类型对应第一窗口参数;根据所述第一起始像素的视差和所述第一窗口参数,在所述V视差图中确定所述第一起始像素对应的第一检测窗口,包括:The method according to claim 1 or 2, wherein the preset obstacle type comprises a first obstacle type, the first obstacle type corresponding to a first window parameter; according to the first starting pixel Determining, by the disparity and the first window parameter, determining, in the V disparity map, a first detection window corresponding to the first start pixel, including:
    获取所述第一障碍物类型对应的第一窗口参数;Obtaining a first window parameter corresponding to the first obstacle type;
    根据障碍物识别方向、所述第一起始像素的视差、所述第一窗口参数和拍摄所述待识别图像的相机参数,确定所述第一检测窗口的大小;Determining a size of the first detection window according to an obstacle recognition direction, a parallax of the first start pixel, the first window parameter, and a camera parameter that captures the image to be recognized;
    根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口,所述第一起始像素为所述第一检测窗口的一个角所在的像素。Determining, in the V disparity map, the first detection window according to a size of the first detection window, where the first starting pixel is a pixel of a corner of the first detection window.
  4. 根据权利要求3所述的方法,其特征在于,根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口,包括:The method according to claim 3, wherein determining the first detection window in the V disparity map according to the size of the first detection window comprises:
    根据所述障碍物识别方向,确定所述第一起始像素在所述第一检测窗口 中的位置;Determining a position of the first start pixel in the first detection window according to the obstacle recognition direction;
    根据所述第一起始像素在所述第一检测窗口中的位置和所述第一检测窗口的大小,在所述V视差图中确定所述第一检测窗口。The first detection window is determined in the V disparity map according to a position of the first start pixel in the first detection window and a size of the first detection window.
  5. 根据权利要求1或2所述的方法,其特征在于,根据检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型,包括:The method according to claim 1 or 2, wherein determining the type of the obstacle identified in the image to be identified according to the degree of recognition of the image in the detection window comprises:
    根据检测窗口对应的预设障碍物类型,对所述检测窗口中的图像进行检测,以获取检测窗口中图像的识别度;Detecting an image in the detection window according to a preset obstacle type corresponding to the detection window, to obtain an image recognition degree in the detection window;
    根据检测窗口中图像的识别度,确定目标检测窗口,所述目标检测窗口中图像的识别度最高;Determining a target detection window according to the recognition degree of the image in the detection window, wherein the recognition degree of the image in the target detection window is the highest;
    将所述目标窗口对应的障碍物类型确定为在所述待识别图像中识别的障碍物类型。The obstacle type corresponding to the target window is determined as the obstacle type identified in the image to be identified.
  6. 根据权利要求5所述的方法,其特征在于,所述检测窗口包括第二检测窗口,所述第二检测窗口对应第二障碍物类型;根据所述第二障碍物类型,对所述第二检测窗口中的图像进行检测,以获取所述第二检测窗口中图像的识别度,包括:The method according to claim 5, wherein the detection window comprises a second detection window, the second detection window corresponds to a second obstacle type; and according to the second obstacle type, the second Detecting an image in the window to detect the image in the second detection window, including:
    获取所述第二障碍物类型对应的标准图像;Obtaining a standard image corresponding to the second obstacle type;
    确定所述第二检测窗口中的图像与所述标准图像的相似度;Determining a similarity between the image in the second detection window and the standard image;
    将所述相似度确定为所述第二检测窗口中图像的识别度。The similarity is determined as the degree of recognition of the image in the second detection window.
  7. 根据权利要求1或2所述的方法,其特征在于,Method according to claim 1 or 2, characterized in that
    所述斜线包括所述V视差图中障碍物的下边缘所在的直线;或者,The oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located; or
    所述斜线包括所述V视差图中障碍物的下边缘所在的直线、和所述V视差图的上边缘线和/或下边缘线中的部分。The oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and a portion of the upper edge line and/or the lower edge line of the V-disparity map.
  8. 一种障碍物识别终端,其特征在于,包括处理器、存储器、摄像头组件及通信总线,所述通信总线用于实现各元器件之间的连接,所述存储器用于存储计算机指令,所述处理器配置为执行所述计算机指令以使所述终端执行:An obstacle recognition terminal, comprising: a processor, a memory, a camera assembly, and a communication bus, wherein the communication bus is used to implement a connection between components, and the memory is configured to store computer instructions, and the processing The processor is configured to execute the computer instructions to cause the terminal to execute:
    在待识别图像的V视差图中提取斜线;Extracting a diagonal line in the V disparity map of the image to be identified;
    在所述斜线上确定第一起始像素,所述第一起始像素对应的像素集合中像素的数值之和大于第一阈值,所述第一起始像素对应的像素集合包括所述第一起始像素所在列中位于所述斜线之上的像素;Determining, on the oblique line, a first start pixel, where a sum of values of pixels in the set of pixels corresponding to the first start pixel is greater than a first threshold, and a set of pixels corresponding to the first start pixel includes the first start pixel a pixel in the column above the slash;
    根据所述第一起始像素的视差和预设障碍物类型对应的窗口参数,在所述V视差图中确定所述第一起始像素对应的检测窗口;Determining, in the V disparity map, a detection window corresponding to the first start pixel according to a parallax of the first start pixel and a window parameter corresponding to the preset obstacle type;
    根据所述检测窗口中图像的识别度,确定在所述待识别图像中识别得到的障碍物类型。Determining an obstacle type identified in the image to be identified according to the recognition degree of the image in the detection window.
  9. 根据权利要求8所述的终端,其特征在于,所述处理器通过执行下述处理进行在所述斜线上确定第一起始像素:The terminal according to claim 8, wherein said processor determines a first start pixel on said oblique line by performing processing described below:
    从所述斜线的一端起,沿着所述斜线的延伸方向,依次将所述斜线上的像素确定为第一像素,并获取所述第一像素对应的像素集合中像素的数值之和,直至在所述斜线上确定得到的第一像素对应的像素集合中像素的数值之和大于所述第一阈值时,将所述第一像素确定为所述第一起始像素;Determining, from the one end of the oblique line, the pixels on the oblique line as the first pixel along the extending direction of the oblique line, and acquiring the value of the pixel in the pixel set corresponding to the first pixel And determining, when the sum of the values of the pixels in the pixel set corresponding to the first pixel obtained on the oblique line is greater than the first threshold, determining the first pixel as the first start pixel;
    其中,所述第一像素对应的像素集合包括所述第一像素所在列中位于所述斜线之上的像素。The pixel set corresponding to the first pixel includes a pixel located above the oblique line in the column of the first pixel.
  10. 根据权利要求8或9所述的终端,其特征在于,所述预设障碍物类型包括第一障碍物类型,所述第一障碍物类型对应第一窗口参数;所述处理器通过执行下述处理进行根据所述第一起始像素的视差和所述第一窗口参数,在所述V视差图中确定所述第一起始像素对应的第一检测窗口:The terminal according to claim 8 or 9, wherein the preset obstacle type includes a first obstacle type, the first obstacle type corresponds to a first window parameter; and the processor performs the following Processing, according to the disparity of the first starting pixel and the first window parameter, determining, in the V disparity map, a first detection window corresponding to the first starting pixel:
    获取所述第一障碍物类型对应的第一窗口参数;Obtaining a first window parameter corresponding to the first obstacle type;
    根据障碍物识别方向、所述第一起始像素的视差、所述第一窗口参数和拍摄所述待识别图像的相机参数,确定所述第一检测窗口的大小;Determining a size of the first detection window according to an obstacle recognition direction, a parallax of the first start pixel, the first window parameter, and a camera parameter that captures the image to be recognized;
    根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口,所述第一起始像素为所述第一检测窗口的一个角所在的像素。Determining, in the V disparity map, the first detection window according to a size of the first detection window, where the first starting pixel is a pixel of a corner of the first detection window.
  11. 根据权利要求10所述的终端,其特征在于,所述处理器通过执行下述处理进行根据所述第一检测窗口的大小在所述V视差图中确定所述第一检测窗口:The terminal according to claim 10, wherein the processor determines the first detection window in the V-disparity map according to a size of the first detection window by performing a process of:
    根据所述障碍物识别方向,确定所述第一起始像素在所述第一检测窗口中的位置;Determining a position of the first start pixel in the first detection window according to the obstacle recognition direction;
    根据所述第一起始像素在所述第一检测窗口中的位置和所述第一检测窗口的大小,在所述V视差图中确定所述第一检测窗口。The first detection window is determined in the V disparity map according to a position of the first start pixel in the first detection window and a size of the first detection window.
  12. 根据权利要求8或9所述的终端,其特征在于,所述处理器通过执行下述处理进行根据检测窗口中图像的识别度,确定在所述待识别图像中识 别得到的障碍物类型:The terminal according to claim 8 or 9, wherein the processor determines the type of the obstacle recognized in the image to be recognized based on the degree of recognition of the image in the detection window by performing the following processing:
    根据检测窗口对应的预设障碍物类型,对所述检测窗口中的图像进行检测,以获取检测窗口中图像的识别度;Detecting an image in the detection window according to a preset obstacle type corresponding to the detection window, to obtain an image recognition degree in the detection window;
    根据检测窗口中图像的识别度,确定目标检测窗口,所述目标检测窗口中图像的识别度最高;Determining a target detection window according to the recognition degree of the image in the detection window, wherein the recognition degree of the image in the target detection window is the highest;
    将所述目标窗口对应的障碍物类型确定为在所述待识别图像中识别的障碍物类型。The obstacle type corresponding to the target window is determined as the obstacle type identified in the image to be identified.
  13. 根据权利要求12所述的终端,其特征在于,所述检测窗口包括第二检测窗口,所述第二检测窗口对应第二障碍物类型;所述处理器通过执行下述处理进行根据所述第二障碍物类型,对所述第二检测窗口中的图像进行检测,以获取所述第二检测窗口中图像的识别度:The terminal according to claim 12, wherein the detection window includes a second detection window, the second detection window corresponds to a second obstacle type; and the processor performs the following processing by performing the following processing a second obstacle type, detecting an image in the second detection window to obtain an image recognition degree in the second detection window:
    获取所述第二障碍物类型对应的标准图像;Obtaining a standard image corresponding to the second obstacle type;
    确定所述第二检测窗口中的图像与所述标准图像的相似度;Determining a similarity between the image in the second detection window and the standard image;
    将所述相似度确定为所述第二检测窗口中图像的识别度。The similarity is determined as the degree of recognition of the image in the second detection window.
  14. 根据权利要求8或9所述的终端,其特征在于,A terminal according to claim 8 or 9, wherein
    所述斜线包括所述V视差图中障碍物的下边缘所在的直线;或者,The oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located; or
    所述斜线包括所述V视差图中障碍物的下边缘所在的直线、和所述V视差图的上边缘线和/或下边缘线中的部分。The oblique line includes a straight line where the lower edge of the obstacle in the V-disparity map is located, and a portion of the upper edge line and/or the lower edge line of the V-disparity map.
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行权利要求1-7任一项所述的方法。A computer readable storage medium storing computer executable instructions for causing the computer to perform the method of any of claims 1-7.
PCT/CN2018/091638 2017-12-21 2018-06-15 Obstacle recognition method and terminal WO2019119752A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711389258.5A CN107977649B (en) 2017-12-21 2017-12-21 Obstacle identification method and device and terminal
CN201711389258.5 2017-12-21

Publications (1)

Publication Number Publication Date
WO2019119752A1 true WO2019119752A1 (en) 2019-06-27

Family

ID=62007054

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/091638 WO2019119752A1 (en) 2017-12-21 2018-06-15 Obstacle recognition method and terminal

Country Status (2)

Country Link
CN (1) CN107977649B (en)
WO (1) WO2019119752A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111932506A (en) * 2020-07-22 2020-11-13 四川大学 Method for extracting discontinuous straight line in image

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107977649B (en) * 2017-12-21 2020-02-07 海信集团有限公司 Obstacle identification method and device and terminal
CN111284490B (en) * 2018-12-06 2021-06-04 海信集团有限公司 Method for detecting vehicle sliding of front vehicle by vehicle-mounted binocular camera and vehicle-mounted binocular camera
CN109584632A (en) * 2018-12-14 2019-04-05 深圳壹账通智能科技有限公司 Road conditions method for early warning, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103052968A (en) * 2010-08-03 2013-04-17 松下电器产业株式会社 Object detection device, object detection method, and program
CN103123722A (en) * 2011-11-18 2013-05-29 株式会社理光 Road object detection method and system
CN105740802A (en) * 2016-01-28 2016-07-06 北京中科慧眼科技有限公司 Disparity map-based obstacle detection method and device as well as automobile driving assistance system
EP3188118A1 (en) * 2014-08-26 2017-07-05 Hitachi Automotive Systems, Ltd. Object detecting device
CN107977649A (en) * 2017-12-21 2018-05-01 海信集团有限公司 A kind of obstacle recognition method, device and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103052968A (en) * 2010-08-03 2013-04-17 松下电器产业株式会社 Object detection device, object detection method, and program
CN103123722A (en) * 2011-11-18 2013-05-29 株式会社理光 Road object detection method and system
EP3188118A1 (en) * 2014-08-26 2017-07-05 Hitachi Automotive Systems, Ltd. Object detecting device
CN105740802A (en) * 2016-01-28 2016-07-06 北京中科慧眼科技有限公司 Disparity map-based obstacle detection method and device as well as automobile driving assistance system
CN107977649A (en) * 2017-12-21 2018-05-01 海信集团有限公司 A kind of obstacle recognition method, device and terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111932506A (en) * 2020-07-22 2020-11-13 四川大学 Method for extracting discontinuous straight line in image
CN111932506B (en) * 2020-07-22 2023-07-14 四川大学 Method for extracting discontinuous straight line in image

Also Published As

Publication number Publication date
CN107977649B (en) 2020-02-07
CN107977649A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
WO2019119752A1 (en) Obstacle recognition method and terminal
JP6670071B2 (en) Vehicle image recognition system and corresponding method
US10140529B2 (en) Method, apparatus and device for detecting lane lines
WO2020124988A1 (en) Vision-based parking space detection method and device
CN106326822B (en) Method and device for detecting lane line
CN112967283B (en) Target identification method, system, equipment and storage medium based on binocular camera
US8867792B2 (en) Environment recognition device and environment recognition method
JP2013109760A (en) Target detection method and target detection system
US20160180181A1 (en) Obstacle detecting apparatus and obstacle detecting method
US10521659B2 (en) Image processing device, image processing method, and image processing program
US20150178573A1 (en) Ground plane detection
US20150243169A1 (en) Traffic lane situation determining device and method for determining traffic lane situation
KR20090098167A (en) Method and system for detecting lane by using distance sensor
US20200134326A1 (en) Advanced driver assistance system and method
Suddamalla et al. A novel algorithm of lane detection addressing varied scenarios of curved and dashed lanemarks
US20210042536A1 (en) Image processing device and image processing method
WO2016059643A1 (en) System and method for pedestrian detection
Sun et al. A robust lane detection method for autonomous car-like robot
CN115578468A (en) External parameter calibration method and device, computer equipment and storage medium
WO2019149213A1 (en) Image-based road cone recognition method and apparatus, storage medium, and vehicle
CN111191482A (en) Brake lamp identification method and device and electronic equipment
KR101738425B1 (en) Apparatus and method for setting region of interest for detecting traffic lanes
KR101645717B1 (en) Apparatus and method for adaptive calibration of advanced driver assistance system
KR102188164B1 (en) Method of Road Recognition using 3D Data
KR101910256B1 (en) Lane Detection Method and System for Camera-based Road Curvature Estimation

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

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

Country of ref document: EP

Kind code of ref document: A1