A method for rapid surface differentiation and specific target recognition based on depth images

Through the gradient map classification of depth images, the horizontal plane, left side and right side of the object are distinguished, which solves the limitations and time-consuming problems of cuboid-shaped target volume measurement in the logistics industry, and achieves rapid and accurate volume calculations, which improves the Package sorting efficiency.

CN110717940BActive Publication Date: 2024-11-15JIANGSU WATER SILK ROAD SUPPLY CHAIN MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910990408.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-17
Publication Date
2024-11-15
Estimated Expiration
2039-10-17

AI Technical Summary

Technical Problem

The prior art has limitations and time-consuming problems in the volume measurement of rectangular parcels, goods, and containers in the logistics industry, and it is impossible to effectively distinguish the rectangular planes, resulting in large volume calculation errors.

Method used

Using a rapid surface distinction method based on depth images, the pixel points are classified by obtaining gradient maps in the X-direction and Y-direction of the depth image, and distinguishing the horizontal plane, left-sided plane and right-sided plane in the image, and then identifying the upper surface of the target. , left and right sides, calculate the volume of the target.

Benefits of technology

The rapid and accurate volume measurement of the cuboid-shaped target is achieved, the parcel sorting efficiency in the logistics industry is improved, and the time cost of volume measurement is reduced.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention proposes a method for rapid surface distinction based on a depth image, comprising: S1, obtaining a depth image, and obtaining its gradient maps in the X direction and the Y direction respectively according to the depth image, wherein the size of the gradient map is consistent with the size of the depth image; S2, classifying the pixels therein according to the gradient map; S3, obtaining all horizontal planes, left vertical planes and right vertical planes in the depth image according to the classification result. On this basis, the present invention also proposes a specific target recognition method to obtain the upper surface, left vertical plane and right vertical plane of the target. The present invention can quickly distinguish the surface of an object, and can obtain the visible surface of a rectangular target. When applied in the field of logistics, it can solve the volume measurement limitations and time-consuming problems of rectangular packages, goods, containers and other targets, and improve sorting efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target recognition of depth images, and in particular to a method for rapid surface distinction and a method for specific target recognition based on depth images. Background Art

[0002] Depth images, also known as distance images, refer to images that use the distance from the image collector to each point in the scene as the pixel value. They directly reflect the geometry of the visible surface of the target. Therefore, depth images are widely used, especially in the logistics industry. At present, the throughput of domestic logistics, port shipping, and airport shipping is very large and increasing. The volume measurement of parcels, goods, containers, etc. at various sorting centers is relatively limited and time-consuming, which reduces transportation efficiency.

[0003] In the prior art, most packages are in the shape of rectangular prisms. The volume of packages is mainly measured by comparing the depth images of the conveyor belt before and after loading, extracting the rectangular area where the package is located to obtain the length and width of the package, and using the difference features to obtain the height of the package to calculate the volume of the package. This method is limited to specific scenarios and has a small scope of application. It cannot meet the needs of dense stacking of packages in the actual logistics industry. In addition, most of the prior art does not distinguish between rectangular planes, which can easily cause misjudgment of the length, width and height of rectangular objects, resulting in large errors in volume calculation. At present, the volume measurement of large goods and containers is also basically carried out by manual measurement. Summary of the invention

[0004] In order to solve the limitation and time-consuming problem of volume measurement of rectangular packages, goods, containers and other targets in the prior art, the present invention proposes a surface fast distinction method and a specific target recognition method based on depth images.

[0005] The technical solution of the present invention is achieved in this way:

[0006] A method for rapid surface differentiation based on a depth image, comprising:

[0007] S1. Obtain a depth image, and obtain the gradient maps in the X and Y directions respectively according to the depth image, where the size of the gradient map is consistent with the size of the depth image; S2. Classify the pixels therein according to the gradient map; S3. Obtain all horizontal planes, left vertical planes, and right vertical planes in the depth image according to the classification results.

[0008] Preferably, the specific method of classifying the pixels in the gradient map is:

[0009] Traverse each pixel value DX (r, c) in the gradient map in the X direction, and each pixel value DY (r, c) in the gradient map in the Y direction, where r = 0...m, c = 0...n, m represents the number of rows in the gradient map, and n represents the number of columns in the gradient map;

[0010] Given a positive segmentation threshold p and a negative segmentation threshold q, the pixels corresponding to DY(r, c) greater than or equal to p are located in the vertical plane, and the pixels corresponding to DY(r, c) less than or equal to q are located in the horizontal plane;

[0011] For all points on the vertical plane, the pixel points corresponding to DX(r, c) less than or equal to q are located on the left vertical plane, and the pixel points corresponding to DX(r, c) greater than or equal to p are located on the right vertical plane.

[0012] A specific target recognition method, based on any of the above-mentioned surface rapid differentiation methods based on depth images, includes S1, obtaining a depth image of the target, and obtaining its gradient maps in the X direction and Y direction respectively according to the depth image, and the size of the gradient map is consistent with the size of the depth image; S2, classifying the pixels therein according to the gradient map; S3, obtaining segmented images of the upper surface, left vertical surface and right vertical surface of the target in the depth image according to the classification result; S4, obtaining the upper surface, left vertical surface and right vertical surface of the target.

[0013] Preferably, in the specific target recognition method, the specific manner of obtaining the segmented images of the upper surface, the left vertical surface and the right vertical surface of the target in the depth image according to the classification result is:

[0014] According to the classification results, binary images of the horizontal plane, left vertical plane and right vertical plane with the same size as the gradient map are obtained, and a segmented image of the upper surface with the same size as the gradient map is defined, and the initial value of the pixel point is set to 0;

[0015] Traverse the pixels in the first column of the binary image of the horizontal plane from bottom to top, obtain the credibility value of each pixel according to the depth map, give a credibility threshold, if the credibility value of the pixel is less than the given credibility threshold, the state of the pixel is unknown, and process the next pixel; otherwise, if the corresponding pixel value is 255, the state of the pixel is horizontal, if the corresponding pixel is 0, the state of the pixel is vertical, if the number of pixels with a pixel value of 0 is greater than the given height threshold, then the pixels with a pixel value of 255 that appear later are mapped to the segmented image of the upper surface and their pixel values ​​are updated to 255, and the row number of the pixel where the pixel state changes each time is recorded. After traversing all rows of the first column, set the pixel values ​​of all pixels in the first column from the recorded row number to the first row corresponding to the position on the segmented image of the upper surface to 0, traverse all rows and columns of the parallel surface image in the same way, obtain the initial segmented image of the upper surface, repair the obtained initial segmented image of the upper surface, and update the segmented image of the upper surface;

[0016] Obtain an edge point map of the depth image, correspond the edge points in the edge point map one by one in the updated segmentation image of the upper surface, the binary image of the left vertical surface, and the binary image of the right vertical surface, update the pixel values ​​of the horizontal non-edge points in the updated segmentation image of the upper surface to 0, update the pixel values ​​of the non-edge points in the binary image of the left vertical surface with a pixel value of 255 to 0, and update the pixel values ​​of the non-edge points in the binary image of the right vertical surface with a pixel value of 255 to 0, obtain the final segmentation image of the upper surface, the binary image of the left vertical surface, and the binary image of the right vertical surface, and record the binary image of the left vertical surface and the binary image of the right vertical surface as the segmentation image of the left vertical surface and the segmentation image of the right vertical surface, respectively.

[0017] Preferably, in the specific target recognition method, the specific manner of obtaining the upper surface, left vertical surface and right vertical surface of the target is:

[0018] Contour detection is performed on the final segmented image of the upper surface, the segmented image of the left vertical plane, and the segmented image of the right vertical plane to obtain all contours. Each contour area of ​​the segmented image of the upper surface is the upper surface of the rectangular target, and the left vertical plane contour area and right vertical plane contour area corresponding to each upper surface are the left vertical plane and right vertical plane of the target.

[0019] Preferably, in the specific target recognition method, the specific method for obtaining the binary image of the horizontal plane, the binary image of the left vertical plane and the binary image of the right vertical plane that are the same size as the gradient map is as follows: three new images of the same size as the gradient map are created respectively, and the initial pixel values ​​of the images are set to 0; all the pixels belonging to the horizontal plane are matched on one image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the horizontal plane; all the pixels belonging to the left vertical plane are matched on another image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the left vertical plane; all the pixels belonging to the right vertical plane are matched on the last image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the right vertical plane.

[0020] Preferably, in the specific target recognition method, the specific method of obtaining the edge point map of the depth image is as follows: calculate the gradient average value Yp of all pixels in the vertical plane after classification, the gradient average value Yq of all pixels in the horizontal plane in the Y direction, the gradient average value Xp of all pixels in the left vertical plane in the X direction, and the gradient average value Xq of all pixels in the right vertical plane in the X direction; set the positive threshold in the Y direction, the negative threshold in the Y direction, the positive threshold in the X direction, and the negative threshold in the X direction according to Yp, Yq, Xp, and Xq; define an image of the same size as the gradient map, and set the initial value of the pixel in the image to 0; traverse the gradient in the X direction For each pixel point, if the absolute value of the gradient value in the Y direction is greater than the absolute value of the gradient value in the X direction, and is less than the negative threshold in the Y direction or greater than or equal to the positive threshold in the Y direction, the pixel point is an edge point, and the pixel point is mapped to the defined image and its pixel value is updated to 255; if the absolute value of the gradient value in the Y direction is less than the absolute value of the gradient value in the X direction, and the absolute value of the gradient value in the X direction is less than or equal to the negative threshold in the X direction or greater than or equal to the positive threshold in the X direction, the pixel point is an edge point, and the pixel point is mapped to the defined image and its pixel value is updated to 255; an edge point map is obtained.

[0021] Preferably, in the specific target recognition method, the acquired initial upper surface segmentation image is patched, and the specific method of updating the upper surface segmentation image is as follows: given an image slice size threshold t, an upper surface patch image of the same size as the upper surface segmentation image is defined, an initial value of a pixel is set to 0, and the pixel value from the tth column to the total number of columns minus the tth column of the upper surface patch image is updated according to the upper surface segmentation image, all rows and 1 to 2*t columns of the upper surface segmentation image are traversed, and each pixel value of the tth column of each row of the upper surface patch image is updated to the sum of the pixel values ​​of the 1 to 2*t columns of the current row of the upper surface segmentation image, and the upper surface patch image is updated; traversed For all rows and columns from t+1th to the total number of columns minus t columns of the segmented image of the upper surface, update each pixel value of the upper surface patched image to the pixel value of the upper surface patched image in the previous column of the current row and current column plus the pixel value of the upper surface segmented image in the current row and current column plus t columns, and then subtract the pixel value of the upper surface segmented image in the current row and current column minus t columns, to obtain the final upper surface patched image; traverse all pixels of the upper surface patched image, give a pixel value sum threshold, if the pixel value of the current pixel is greater than the given pixel value sum threshold, then update its corresponding pixel value on the segmented image of the upper surface to 255, otherwise update it to 0, and update the segmented image of the upper surface.

[0022] The beneficial effects of the present invention are as follows: a method for rapid surface distinction based on a depth image of the present invention classifies the pixel points in the depth image according to the characteristics of the depth image and the corresponding gradient map, and can quickly distinguish the horizontal plane, left vertical plane and right vertical plane of all objects in the image. For the specific target recognition method, the surface distinction is performed on the rectangular target, and the upper surface points without sufficient vertical surface points below it are eliminated, and the upper surface points with sufficient number of vertical surface points below it are obtained to obtain the upper surface of the rectangular target object, and then the edge point map of all objects in the image is obtained by using the classification result, and the edge points and contour of the upper surface of the rectangular target object are obtained by combining the edge point map and all the upper surface points belonging to the rectangular target object, and the upper surface contour of the rectangular target object is determined, and then the left vertical plane contour and the right vertical plane contour corresponding to each upper surface contour are obtained according to the points belonging to the left vertical plane and the right vertical plane. The specific target recognition method is applied to the volume measurement of parcels, goods, containers and other targets. It avoids comparing the depth images before and after the conveyor belt is loaded. Instead, it directly distinguishes the upper surface, left vertical surface and right vertical surface of the rectangular target to obtain the corresponding length, width and height to calculate the volume of the target. It solves the limitation and time-consuming problem of parcel volume measurement, helps the logistics industry improve the efficiency of parcel sorting, and has important practical application significance. The surface rapid distinction method and specific target recognition method of the present invention can also be applied in the field of image recognition. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Embodiment 1: A method for rapid surface distinction based on a depth image, comprising: S1, obtaining a depth image of a target using a TOF camera, and obtaining gradient maps in the X and Y directions respectively according to the depth image, wherein the size of the gradient map is consistent with the size of the depth image; S2, classifying the pixel points therein according to the gradient map; S3, obtaining all horizontal planes, left vertical planes, and right vertical planes in the depth image according to the classification results.

[0025] Depth images can be acquired using depth cameras. Current depth cameras can be divided into three types based on their working principles: TOF (Time Of Flight) depth cameras, binocular stereo depth cameras, and structured light depth cameras. In actual use, a suitable depth camera can be selected according to specific needs to acquire depth images. The pixel classification method is applicable to any object in any scene, and the acquired depth image can be a depth image of any scene.

[0026] The specific method of S2 is: traverse each pixel value DX (r, c) in the gradient map in the X direction, and each pixel value DY (r, c) in the gradient map in the Y direction, where r = 0...m, c = 0...n, m represents the number of rows in the gradient map, and n represents the number of columns in the gradient map; given a positive segmentation threshold p and a negative segmentation threshold q, the pixel points corresponding to DY (r, c) greater than or equal to p are located in the vertical plane, and the pixel points corresponding to DY (r, c) less than or equal to q are located in the horizontal plane; for all points on the vertical plane, the pixel points corresponding to DX (r, c) less than or equal to q are located in the left vertical plane, and the pixel points corresponding to DX (r, c) greater than or equal to p are located in the right vertical plane.

[0027] Embodiment 2: A method for identifying a specific target, including S1 and S2 in Embodiment 1, S1, obtaining a depth image of the target, and obtaining its gradient maps in the X and Y directions respectively according to the depth image, wherein the size of the gradient map is consistent with the size of the depth image; S2, classifying the pixels therein according to the gradient map; S3, obtaining segmented images of the upper surface, left vertical surface and right vertical surface of the target in the depth image according to the classification result; S4, obtaining the upper surface, left vertical surface and right vertical surface of the target.

[0028] When the surface rapid differentiation method based on the depth image is actually applied to the recognition of a rectangular target object, the depth image of the target obtained can be a depth image of the target object in any scene, and the rectangular target contains at least a visible upper surface and a vertical surface in the image, and the plane where the target is located is the lowest plane in the depth image or directly on the ground, so as to more accurately determine the various surfaces of the target. Embodiment 2 is an application of Embodiment 1.

[0029] The specific method of S2 in Example 2 is: traverse each pixel point value DX (r, c) in the gradient map in the X direction, and each pixel point value DY (r, c) in the gradient map in the Y direction, where r = 0...m, c = 0...n, m represents the number of rows in the gradient map, and n represents the number of columns in the gradient map; given a positive segmentation threshold p and a negative segmentation threshold q, the pixel points corresponding to DY (r, c) greater than or equal to p are located in the vertical plane, and the pixel points corresponding to DY (r, c) less than or equal to q are located in the horizontal plane; for all points on the vertical plane, the pixel points corresponding to DX (r, c) less than or equal to q are located in the left vertical plane, and the pixel points corresponding to DX (r, c) greater than or equal to p are located in the right vertical plane.

[0030] The specific method of obtaining the segmented images of the upper surface, left vertical surface and right vertical surface of the target in the depth image according to the classification results, gradient map and edge point map in S3 is as follows: according to the classification results, the binary images of the horizontal plane, left vertical surface and right vertical surface of the same size as the gradient map are obtained, and the segmented image of the upper surface of the same size as the gradient map is defined, and the initial value of the pixel point is set to 0; the pixel points in the first column of the binary image of the horizontal plane are traversed from bottom to top, and the credibility value of each pixel point is obtained according to the depth map, and a credibility threshold is given. If the credibility value of the pixel point is less than the given credibility threshold, the state of the pixel point is unknown, and the next pixel point is processed; otherwise, if the corresponding pixel point value is If the pixel value is 255, the state of the pixel is horizontal. If the corresponding pixel value is 0, the state of the pixel is vertical. If the number of pixels with a pixel value of 0 is greater than the given height threshold, the pixels with a pixel value of 255 that appear later are placed on the segmented image of the upper surface and their pixel values ​​are updated to 255. The row number of the pixel where the pixel state changes each time is recorded. After traversing all the rows of the first column, the pixel values ​​of all the pixels in the first column from the recorded row number to the first row corresponding to the position on the segmented image of the upper surface are set to 0. In the same way, all the rows and columns of the parallel surface image are traversed to obtain the initial upper surface. Segment the image; patch the acquired initial upper surface segmentation image, specifically in the following manner: given an image slice size threshold t, define an upper surface patch image of the same size as the segmentation image of the upper surface, set the initial value of the pixel to 0, update the pixel value of the upper surface patch image from the tth column to the total number of columns minus the tth column according to the segmentation image of the upper surface, traverse all rows and 1 to 2*t columns of the segmentation image of the upper surface, update each pixel value of the tth column of each row of the upper surface patch image to the sum of the pixel values ​​of the 1 to 2*t columns of the current row of the segmentation image of the upper surface, and update the upper surface patch image; traverse all rows of the segmentation image of the upper surface and the number of columns from t+1th to the total number of columns minus t columns, update each pixel value of the upper surface patch image to the pixel value of the upper surface patch image in the previous column of the current row and current column plus the pixel value of the upper surface segmentation image of the current row and current column plus t columns minus the pixel value of the upper surface segmentation image of the current row and current column minus t columns, and obtain the final upper surface patch image; traverse all pixels of the upper surface patch image, give a pixel value sum threshold, if the pixel value of the current pixel is greater than the given pixel value sum threshold, then update its corresponding pixel value on the upper surface segmentation image to 255, otherwise update it to 0, and update the upper surface segmentation image;

[0031] Obtain an edge point map of the depth image, correspond the edge points in the edge point map one by one in the updated segmentation image of the upper surface, the binary image of the left vertical surface, and the binary image of the right vertical surface, update the pixel values ​​of the horizontal non-edge points in the updated segmentation image of the upper surface to 0, update the pixel values ​​of the non-edge points in the binary image of the left vertical surface with a pixel value of 255 to 0, and update the pixel values ​​of the non-edge points in the binary image of the right vertical surface with a pixel value of 255 to 0, obtain the final segmentation image of the upper surface, the binary image of the left vertical surface, and the binary image of the right vertical surface, and record the binary image of the left vertical surface and the binary image of the right vertical surface as the segmentation image of the left vertical surface and the segmentation image of the right vertical surface, respectively.

[0032] During the calculation process, due to noise interference, individual points on the upper surface may be misjudged as points on the vertical surface, resulting in discontinuity of the upper surface points. In order to improve the stability of the algorithm, the segmented image of the upper surface is repaired.

[0033] Record the row number of each pixel point where the state of the pixel point changes, obtain the depth image of the target in S1, the target can be completely seen in the depth image, traverse each column of pixels from bottom to top, if the vertical and horizontal surfaces of the target appear successively, the pixel state will definitely change again, and set the pixel values ​​of all pixels in the current column from the row number corresponding to the position where the pixel state was last recorded to the first row corresponding to the pixel value on the segmented image of the upper surface to 0 (the point value of the recorded row number to the first row may be 0 or 255, and is uniformly set to 0); otherwise, it is very likely that the upper surface of the current target does not appear completely in the picture, and such upper surface points are eliminated, and the pixel values ​​corresponding to them on the segmented image of the upper surface are set to 0.

[0034] The specific method for obtaining the upper surface, left vertical surface and right vertical surface of the target in S4 is: perform contour detection on the final segmented image of the upper surface, the segmented image of the left vertical surface and the segmented image of the right vertical surface to obtain all contours, each contour area of ​​the segmented image of the upper surface is the upper surface of the rectangular target, and the left vertical surface contour area and the right vertical surface contour area corresponding to each upper surface below are the left vertical surface and the right vertical surface of the target.

[0035] The specific method of obtaining the edge point map of the depth image is as follows: calculate the gradient average value Yp of all pixels in the vertical plane after classification, the gradient average value Yq of all pixels in the horizontal plane in the Y direction, the gradient average value Xp of all pixels in the left vertical plane in the X direction, and the gradient average value Xq of all pixels in the right vertical plane in the X direction; set the positive threshold in the Y direction, the negative threshold in the Y direction, the positive threshold in the X direction, and the negative threshold in the X direction according to Yp, Yq, Xp, and Xq; define an image of the same size as the gradient map, and set the initial value of the pixels in the image to 0; traverse the gradient map in the X direction and the gradient map in the Y direction For all pixels of , for each pixel, if the absolute value of the gradient value in the Y direction is greater than the absolute value of the gradient value in the X direction, and is less than the negative threshold in the Y direction or greater than or equal to the positive threshold in the Y direction, the pixel is an edge point, and the pixel is mapped to the defined image and its pixel value is updated to 255; if the absolute value of the gradient value in the Y direction is less than the absolute value of the gradient value in the X direction, and the absolute value of the gradient value in the X direction is less than or equal to the negative threshold in the X direction or greater than or equal to the positive threshold in the X direction, the pixel is an edge point, and the pixel is mapped to the defined image and its pixel value is updated to 255; an edge point map is obtained.

[0036] The specific method of obtaining the binary image of the horizontal plane, the binary image of the left vertical plane, and the binary image of the right vertical plane with the same size as the gradient map is as follows: three new images with the same size as the gradient map are created respectively, and the initial value of the pixel points of the image is set to 0; all the pixels belonging to the horizontal plane are matched on one image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the horizontal plane; all the pixels belonging to the left vertical plane are matched on another image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the left vertical plane; all the pixels belonging to the right vertical plane are matched on the last image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the right vertical plane.

[0037] The depth image, the gradient map in the X direction, the gradient map in the Y direction, the binary map of the horizontal plane, the binary map of the left vertical plane, the binary map of the right vertical plane, the edge map point map, the segmented image of the upper surface, the segmented image of the left vertical plane and the segmented image of the right vertical plane are all the same size, so as to make the pixel points corresponding to any row or column on each image correspond to other images one by one, so as to quickly distinguish the upper surface, left vertical plane and right vertical plane of the rectangular target. By classifying each pixel point on the gradient map in the X direction and the gradient map in the Y direction, the pixel points are directly divided into three categories: the horizontal plane, the left vertical plane and the right vertical plane, and then the parallel points on the horizontal plane are distinguished from each other by using the vertical plane below the upper surface. Combined with the edge map, the final segmented image of the upper surface, the segmented image of the left vertical plane and the segmented image of the right vertical plane are quickly and accurately distinguished, and then the upper surface, left vertical plane and right vertical plane of each target are obtained, so that the surface of the target can be quickly distinguished. The depth image-based rapid surface differentiation method and specific target recognition method of the present invention can be used in the volume measurement of packages, goods, and containers in the logistics industry, and can also be applied to the rapid surface differentiation of specific targets in other industries.

[0038] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for rapid surface differentiation and specific target recognition based on depth images, characterized in that: include: S1. Obtain a depth image of the target, and obtain its gradient maps in the X and Y directions respectively according to the depth image, and the size of the gradient map is consistent with the size of the depth image; S2. Classify the pixels therein according to the gradient map; S3. Obtain the segmented images of the upper surface, left vertical surface and right vertical surface of the target in the depth image according to the classification result; S4. Obtain the upper surface, left vertical surface and right vertical surface of the target; The specific method of classifying the pixels in the gradient map is as follows: Traverse each pixel value DX (r, c) in the gradient map in the X direction, and each pixel value DY (r, c) in the gradient map in the Y direction, where r = 0...m, c = 0...n, m represents the number of rows in the gradient map, and n represents the number of columns in the gradient map; Given a positive segmentation threshold p and a negative segmentation threshold q, the pixels corresponding to DY(r, c) greater than or equal to p are located in the vertical plane, and the pixels corresponding to DY(r, c) less than or equal to q are located in the horizontal plane; For all points on the vertical plane, the pixel points corresponding to DX (r, c) less than or equal to q are located on the left vertical plane, and the pixel points corresponding to DX (r, c) greater than or equal to p are located on the right vertical plane; The specific method of obtaining the segmented images of the upper surface, left vertical surface and right vertical surface of the target in the depth image according to the classification results is: According to the classification results, binary images of the horizontal plane, left vertical plane and right vertical plane with the same size as the gradient map are obtained, and a segmented image of the upper surface with the same size as the gradient map is defined, and the initial value of the pixel point is set to 0; Traverse the pixels in the first column of the binary image of the horizontal plane from bottom to top, obtain the credibility value of each pixel according to the depth map, give a credibility threshold, if the credibility value of the pixel is less than the given credibility threshold, the state of the pixel is unknown, and process the next pixel; otherwise, if the corresponding pixel value is 255, the state of the pixel is horizontal, if the corresponding pixel is 0, the state of the pixel is vertical, if the number of pixels with a pixel value of 0 is greater than the given height threshold, then the pixels with a pixel value of 255 that appear later are mapped to the segmented image of the upper surface and their pixel values ​​are updated to 255, and the row number of the pixel where the pixel state changes each time is recorded. After traversing all rows of the first column, set the pixel values ​​of all pixels in the first column from the recorded row number to the first row corresponding to the position on the segmented image of the upper surface to 0, traverse all rows and columns of the parallel surface image in the same way, obtain the initial segmented image of the upper surface, repair the obtained initial segmented image of the upper surface, and update the segmented image of the upper surface; Obtain an edge point map of the depth image, correspond the edge points in the edge point map one by one in the updated segmentation image of the upper surface, the binary image of the left vertical surface, and the binary image of the right vertical surface, update the pixel values ​​of the horizontal non-edge points in the updated segmentation image of the upper surface to 0, update the pixel values ​​of the non-edge points in the binary image of the left vertical surface with a pixel value of 255 to 0, and update the pixel values ​​of the non-edge points in the binary image of the right vertical surface with a pixel value of 255 to 0, obtain the final segmentation image of the upper surface, the binary image of the left vertical surface, and the binary image of the right vertical surface, and record the binary image of the left vertical surface and the binary image of the right vertical surface as the segmentation image of the left vertical surface and the segmentation image of the right vertical surface, respectively.

2. The method for rapid surface differentiation and specific target recognition based on depth image according to claim 1, characterized in that: The specific method of obtaining the upper surface, left vertical surface and right vertical surface of the target is: Contour detection is performed on the final segmented image of the upper surface, the segmented image of the left vertical plane, and the segmented image of the right vertical plane to obtain all contours. Each contour area of ​​the segmented image of the upper surface is the upper surface of the rectangular target, and the left vertical plane contour area and right vertical plane contour area corresponding to each upper surface are the left vertical plane and right vertical plane of the target.

3. The method for rapid surface differentiation and specific target recognition based on depth image according to claim 1, characterized in that: The specific method of obtaining the binary image of the horizontal plane, the binary image of the left vertical plane, and the binary image of the right vertical plane with the same size as the gradient map is as follows: three new images with the same size as the gradient map are created respectively, and the initial value of the pixel points of the image is set to 0; all the pixels belonging to the horizontal plane are matched on one image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the horizontal plane; all the pixels belonging to the left vertical plane are matched on another image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the left vertical plane; all the pixels belonging to the right vertical plane are matched on the last image and all the corresponding pixel values ​​are updated to 255 to obtain the binary image of the right vertical plane.

4. The method for rapid surface differentiation and specific target recognition based on depth image according to claim 1, characterized in that: The specific method of obtaining the edge point map of the depth image is as follows: calculate the gradient average value Yp of all pixels in the vertical plane after classification, the gradient average value Yq of all pixels in the horizontal plane in the Y direction, the gradient average value Xp of all pixels in the left vertical plane in the X direction, and the gradient average value Xq of all pixels in the right vertical plane in the X direction; set the positive threshold in the Y direction, the negative threshold in the Y direction, the positive threshold in the X direction, and the negative threshold in the X direction according to Yp, Yq, Xp, and Xq; define an image of the same size as the gradient map, and set the initial value of the pixels in the image to 0; traverse the gradient map in the X direction and the gradient map in the Y direction For all pixels of , for each pixel, if the absolute value of the gradient value in the Y direction is greater than the absolute value of the gradient value in the X direction, and is less than the negative threshold in the Y direction or greater than or equal to the positive threshold in the Y direction, the pixel is an edge point, and the pixel is mapped to the defined image and its pixel value is updated to 255; if the absolute value of the gradient value in the Y direction is less than the absolute value of the gradient value in the X direction, and the absolute value of the gradient value in the X direction is less than or equal to the negative threshold in the X direction or greater than or equal to the positive threshold in the X direction, the pixel is an edge point, and the pixel is mapped to the defined image and its pixel value is updated to 255; an edge point map is obtained.

5. The method for rapid surface differentiation and specific target recognition based on depth image according to claim 1, characterized in that: The acquired initial upper surface segmentation image is repaired, and the specific method of updating the upper surface segmentation image is as follows: given an image slice size threshold t, an upper surface repair image of the same size as the upper surface segmentation image is defined, an initial value of a pixel is set to 0, and the pixel value of the upper surface repair image from the tth column to the total number of columns minus the tth column is updated according to the upper surface segmentation image, all rows and 1 to 2*t columns of the upper surface segmentation image are traversed, and each pixel value of the tth column of each row of the upper surface repair image is updated to the sum of the pixel values ​​of the 1 to 2*t columns of the current row of the upper surface segmentation image, and the upper surface repair image is updated; the upper surface segmentation image is traversed For all rows and columns from t+1th to the total number of columns minus t columns, each pixel value of the upper surface patched image is updated to the pixel value of the upper surface patched image in the previous column of the current row and current column plus the pixel value of the upper surface segmented image of the current row and current column plus t columns, and then minus the pixel value of the upper surface segmented image of the current row and current column minus t columns, to obtain the final upper surface patched image; traverse all pixels of the upper surface patched image, give a pixel value sum threshold, if the pixel value of the current pixel is greater than the given pixel value sum threshold, then update its corresponding pixel value on the upper surface segmented image to 255, otherwise update it to 0, and update the upper surface segmented image.