CN114359376A - Parcel positioning method and device, electronic equipment and storage medium - Google Patents

Parcel positioning method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114359376A
CN114359376A CN202111612734.1A CN202111612734A CN114359376A CN 114359376 A CN114359376 A CN 114359376A CN 202111612734 A CN202111612734 A CN 202111612734A CN 114359376 A CN114359376 A CN 114359376A
Authority
CN
China
Prior art keywords
point
depth
pixel
points
parcel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111612734.1A
Other languages
Chinese (zh)
Inventor
谢世斌
周璐
刘羽
李晶
李铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Huaray Technology Co Ltd
Original Assignee
Zhejiang Huaray Technology Co Ltd
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 Zhejiang Huaray Technology Co Ltd filed Critical Zhejiang Huaray Technology Co Ltd
Priority to CN202111612734.1A priority Critical patent/CN114359376A/en
Publication of CN114359376A publication Critical patent/CN114359376A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a parcel positioning method, a parcel positioning device, electronic equipment and a storage medium, which are used for cutting adhered parcels and positioning the parcels. In the embodiment of the application, based on the projection depth map containing the package, the depth value of each pixel point in the projection depth map is determined, and the candidate segmentation point is determined from the pixel points according to the depth value; determining a segmentation point by adopting a local threshold segmentation method aiming at each candidate segmentation point; then, the segmentation points are removed from the projection depth map, and finally, the position of the parcel is determined based on the remaining points in the projection depth map. In this application, determine the cut-off point based on containing the projection depth map of parcel, got rid of the interference of parcel surface texture, then cut apart the parcel based on the cut-off point, adhesion parcel is cut apart to the cut-off that can be accurate, fixes a position the parcel based on remaining point pair, has promoted the accuracy of parcel three-dimensional position information.

Description

Parcel positioning method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of three-dimensional processing technologies, and in particular, to a package positioning method and apparatus, an electronic device, and a storage medium.
Background
With the development of three-dimensional (3-dimensional, 3D) vision technology, 3D vision technology has been applied to a plurality of links in the industrial field. Compared with two-dimensional (2-dimension, 2D) vision, the 3D vision can acquire accurate space position information of an object, and has great advantages in the industrial field.
In the logistics package sorting link, a single piece separation package sorting device is provided, a large number of entering packages are sorted into ordered packages with consistent distances from front to back through the device, and the acquisition of single package information by subsequent devices is guaranteed. One of the core technologies in the single piece separation device is to acquire the position information of each parcel through a 3D camera, and then realize parcel separation by controlling the movement of different motors. However, in the related art, an edge detection method is adopted when the packages are separated, but the method cannot separate the packages when the packages are adhered, and thus the packages are inaccurately positioned.
Disclosure of Invention
The application aims to provide a parcel positioning method, a parcel positioning device, electronic equipment and a storage medium, which are used for cutting adhered parcels and positioning the parcels.
In a first aspect, an embodiment of the present application provides a package positioning method, including:
determining the depth value of each pixel point in the projection depth map based on the projection depth map containing the package, and determining candidate segmentation points from the pixel points according to the depth value;
aiming at each candidate segmentation point, taking the candidate segmentation point as a target candidate segmentation point, taking the target candidate segmentation point as a starting point, and continuously acquiring two-dimensional coordinates of a specified number of pixel points in a gradient descending direction by taking pixels as units; determining the slope of a straight line to be synthesized by the corresponding pixel points based on the acquired two-dimensional coordinates, and if the slope is greater than a specified threshold, determining a target candidate segmentation point corresponding to the slope as a segmentation point; the abscissa of the pixel point represents the distance between the pixel point and the target candidate segmentation point, and the ordinate represents the depth value;
and eliminating the segmentation points from the projection depth map, and determining the position of the parcel based on the remaining points in the projection depth map.
In this application, determine the cut-off point based on containing the projection depth map of parcel in, got rid of the interference of parcel surface texture, then cut apart the parcel based on the cut-off point, adhesion parcel is cut apart to the cut-off that can be accurate, fixes a position the parcel based on remaining point pair, has promoted the accuracy to the parcel location.
In some possible embodiments, the projected depth map containing the parcel is obtained according to the following method:
acquiring a color space (RGB) image and a depth image containing a parcel;
carrying out deep learning instance segmentation on the RGB image to obtain the mask image;
aligning pixel points of the depth image with pixel points of the RGB image based on a mapping relation between the depth image and the RGB image to obtain depth values of the pixel points;
obtaining point cloud data based on the depth values of the pixel points and the mask image;
and projecting the pixel points in the point cloud data to a reference plane to obtain a projected depth map containing the packages.
In the application, the deep learning example segmentation is carried out on the RGB images containing the packages, the conglutination packages can be roughly segmented, namely, the primary screening is realized, and the calculated amount is less for subsequent determination of segmentation points.
In some possible embodiments, the projecting the pixel points in the point cloud data to the reference plane to obtain the projected depth map including the parcel includes:
according to a pre-calibrated platform plane equation, projecting pixel points in the point cloud data to a reference plane to obtain a projection diagram;
determining a distance between each pixel point in the point cloud data and the projected graph;
generating the projected depth map based on the distances and the projected map.
In the application, the position of the package is determined by adopting the projection depth map, so that the length, width, height and other dimension information of the package can be conveniently calculated, and the package can be positioned more accurately.
In some possible embodiments, the obtaining point cloud data based on the depth values of the pixel points and the mask image includes:
inputting the depth values of the pixel points and the mask image into a depth camera with internal parameters calibrated in advance;
and acquiring the point cloud data generated by the depth camera.
In the method and the device, the point cloud data containing the packages are acquired through the depth camera, so that the subsequent calculation difficulty is reduced, and the calculation power is saved.
In some possible embodiments, the determining candidate segmentation points from pixel points according to the depth value includes:
aiming at each pixel point in the projection depth map, taking the pixel point as a target pixel point;
determining the pixel point with the maximum depth value and the minimum depth value in the designated area by taking the target pixel point as the center;
and if the depth difference value between the pixel point with the maximum depth value and the pixel point with the minimum depth value is larger than a first threshold value, and the depth value of the target pixel point is smaller than a second threshold value, taking the target pixel point as a candidate segmentation point.
In the method and the device, the candidate segmentation points are determined from the projection depth map through the gradient, the calculation amount of subsequently determined segmentation points is reduced, and further the efficiency is improved.
In some possible embodiments, the second threshold is a depth value of a pixel point with a largest depth value and a depth mean value of a pixel point with a smallest depth value in the designated area.
In some possible embodiments, the determining the location of the parcel based on remaining points in the projected depth map comprises:
and analyzing the connected domain of the rest points to obtain the position of the package.
In the present application, in order to improve the accuracy of positioning a parcel, after determining a segmentation point of the parcel, connected domain analysis is performed on the remaining points.
Second aspect the present application also provides a package locating device, the device comprising:
the candidate segmentation point determining module is used for determining the depth value of each pixel point in the projection depth map based on the projection depth map containing the package, and determining candidate segmentation points from the pixel points according to the depth values;
the division point determining module is used for taking the candidate division points as target candidate division points according to each candidate division point, taking the target candidate division points as starting points, and continuously acquiring two-dimensional coordinates of a specified number of pixel points in a gradient descending direction by taking pixels as units; determining the slope of a straight line to be synthesized by the corresponding pixel points based on the acquired two-dimensional coordinates, and if the slope is greater than a specified threshold, determining a target candidate segmentation point corresponding to the slope as a segmentation point; the abscissa of the pixel point represents the distance between the pixel point and the target candidate segmentation point, and the ordinate represents the depth value;
and the parcel position determining module is used for removing the segmentation points from the projection depth map and determining the position of the parcel based on the remaining points in the projection depth map.
In some possible embodiments, the projected depth map containing the parcel is obtained according to the following method:
acquiring an RGB image and a depth image containing a package;
carrying out deep learning instance segmentation on the RGB image to obtain the mask image;
aligning pixel points of the depth image with pixel points of the RGB image based on a mapping relation between the depth image and the RGB image to obtain depth values of the pixel points;
obtaining point cloud data based on the depth values of the pixel points and the mask image;
and projecting the pixel points in the point cloud data to a reference plane to obtain a projected depth map containing the packages.
In some possible embodiments, when the candidate segmentation point determination module performs projection of the pixel points in the point cloud data to a reference plane to obtain a projection depth map including a parcel, the candidate segmentation point determination module is configured to:
according to a pre-calibrated platform plane equation, projecting pixel points in the point cloud data to a reference plane to obtain a projection diagram;
determining a distance between each pixel point in the point cloud data and the projected graph;
generating the projected depth map based on the distances and the projected map.
In some possible embodiments, the candidate segmentation point determination module, when performing deriving the point cloud data based on the depth values of the pixel points and the mask image, is configured to:
inputting the depth values of the pixel points and the mask image into a depth camera with internal parameters calibrated in advance;
and acquiring the point cloud data generated by the depth camera.
In some possible embodiments, the segmentation point determination module, when performing determining the candidate segmentation point from the pixel points according to the depth value, is configured to:
aiming at each pixel point in the projection depth map, taking the pixel point as a target pixel point;
determining the pixel point with the maximum depth value and the minimum depth value in the designated area by taking the target pixel point as the center;
and if the depth difference value between the pixel point with the maximum depth value and the pixel point with the minimum depth value is larger than a first threshold value, and the depth value of the target pixel point is smaller than a second threshold value, taking the target pixel point as a candidate segmentation point.
In some possible embodiments, the second threshold is a depth value of a pixel point with a largest depth value and a depth mean value of a pixel point with a smallest depth value in the designated area.
In some possible embodiments, the parcel location determination module, when performing determining the location of the parcel based on the remaining points in the projected depth map, is configured to:
and analyzing the connected domain of the rest points to obtain the position of the package.
In a third aspect, another embodiment of the present application further provides an electronic device, including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the methods provided by the embodiments of the first aspect of the present application.
In a fourth aspect, another embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is configured to cause a computer to execute any one of the methods provided in the first aspect of the present application.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an application scenario diagram of a parcel positioning method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a parcel positioning method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of determining a projection depth map according to a parcel positioning method provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a parcel mask for a parcel positioning method according to an embodiment of the present application;
fig. 5 is a schematic flow chart of a parcel positioning method according to an embodiment of the present disclosure for acquiring point cloud data;
fig. 6 is a schematic flowchart of a method for locating a package according to an embodiment of the present application for obtaining a projection depth map;
fig. 7 is a schematic projection diagram of a parcel positioning method according to an embodiment of the present application;
fig. 8 is a schematic flowchart of determining candidate segmentation points in a parcel positioning method according to an embodiment of the present application;
fig. 9 is a schematic diagram of determining candidate segmentation points in a parcel positioning method according to an embodiment of the present application;
fig. 10 is a schematic flowchart of determining a segmentation point in a package positioning method according to an embodiment of the present application;
fig. 11 is a schematic diagram of determining a segmentation point in a parcel positioning method according to an embodiment of the present application;
fig. 12 is a schematic diagram of an apparatus for a parcel positioning method according to an embodiment of the present application;
fig. 13 is a schematic view of an electronic device of a package positioning method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
It is noted that the terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The inventor researches and discovers that with the development of 3D vision technology, the 3D vision technology has been applied to various links in the industrial field. Compared with 2D vision, the 3D vision can acquire accurate space position information of an object, and has great advantages in the industrial field.
In the logistics package sorting link, a single piece separation package sorting device is provided, a large number of entering packages are sorted into ordered packages with consistent distances from front to back through the device, and the acquisition of single package information by subsequent devices is guaranteed. One of the core technologies in the single piece separation device is to acquire the position information of each parcel through a 3D camera, and then realize parcel separation by controlling the movement of different motors. However, in the related art, an edge detection method is used when the package is separated, but this method cannot separate the package when the package has adhesion.
In view of the above, the present application provides a package positioning method, an apparatus, an electronic device and a storage medium, which are used to solve the above problems. The inventive concept of the present application can be summarized as follows: determining the depth value of each pixel point in the projection depth map based on the projection depth map containing the package, and determining candidate segmentation points from the pixel points according to the depth values; determining a segmentation point by adopting a local threshold segmentation method aiming at each candidate segmentation point; then, the segmentation points are removed from the projection depth map, and finally, the position of the parcel is determined based on the remaining points in the projection depth map.
For ease of understanding, the embodiments of the present application provide a detailed description of a package positioning method in conjunction with the accompanying drawings:
fig. 1 is a diagram of an application scenario of the parcel positioning method in the embodiment of the present application. The figure includes: server 10, memory 20, camera 30;
the server 10 obtains the image containing the package shot by the camera 30 from the memory 20, processes the image to obtain a projection depth map containing the package, determines a depth value of each pixel point in the projection depth map based on the projection depth map containing the package, and determines candidate segmentation points from the pixel points according to the depth values; aiming at each candidate segmentation point, taking the candidate segmentation point as a target candidate segmentation point, taking the target candidate segmentation point as a starting point, and continuously acquiring two-dimensional coordinates of a specified number of pixel points along a gradient descending direction by taking a pixel as a unit; determining the slope of a straight line to be synthesized by the corresponding pixel points based on the obtained two-dimensional coordinates, and determining a target candidate segmentation point corresponding to the slope as a segmentation point if the slope is greater than a specified threshold; and removing the segmentation points from the projection depth map, and determining the position of the parcel based on the remaining points in the projection depth map.
Only a single server or camera is detailed in the description of the present application, but it will be understood by those skilled in the art that the illustrated camera 30, server 10 and memory 20 are intended to represent the operations of the camera, server and memory involved in the technical solutions of the present application. The individual servers and memories are described in detail for convenience of illustration only and not to imply any limitation as to the number, type, or location of cameras and servers. It should be noted that the underlying concepts of the example embodiments of the present application may not be altered if additional modules are added or removed from the illustrated environments.
It should be noted that the storage in the embodiment of the present application may be, for example, a cache system, or a hard disk storage, a memory storage, and the like. In addition, the parcel positioning method provided by the application is not only suitable for the application scene shown in fig. 1, but also suitable for any device with parcel positioning requirements.
The following describes the parcel positioning method proposed in the present application in detail, and as shown in fig. 2, is an overall flowchart of the parcel positioning method provided in the embodiment of the present application, where:
in step 201: determining the depth value of each pixel point in the projection depth map based on the projection depth map containing the package, and determining candidate segmentation points from the pixel points according to the depth values;
in step 202: aiming at each candidate segmentation point, taking the candidate segmentation point as a target candidate segmentation point, taking the target candidate segmentation point as a starting point, and continuously acquiring two-dimensional coordinates of a specified number of pixel points along a gradient descending direction by taking a pixel as a unit; determining the slope of a straight line to be synthesized by the corresponding pixel points based on the obtained two-dimensional coordinates, and determining a target candidate segmentation point corresponding to the slope as a segmentation point if the slope is greater than a specified threshold; the horizontal coordinate of the pixel point represents the distance between the pixel point and the target candidate segmentation point, and the vertical coordinate represents the depth value;
in step 203: and removing the segmentation points from the projection depth map, and determining the position of the parcel based on the remaining points in the projection depth map.
For ease of understanding, the steps involved in FIG. 2 are described in detail below:
in the embodiment of the present application, in order to determine three-dimensional information of the length, width and height of a parcel, the position of the parcel is determined according to a projected depth map of the parcel, wherein the projected depth map can be determined by the steps shown in fig. 3, wherein:
in step 301: acquiring an RGB image and a depth image containing a package;
in step 302: carrying out deep learning instance segmentation on the RGB image to obtain a mask image;
as shown in FIG. 4, the left side is the RGB map containing parcel A, and the right side is the mask image containing parcel A.
In step 303: aligning pixel points of the depth image with pixel points of the RGB image based on a mapping relation between the depth image and the RGB image to obtain depth values of the pixel points;
in the method and the device, after the coordinates of the pixel points in the RGB image containing the package are obtained, the pixel points in the RGB image are mapped into the depth image according to the mapping relation between the depth image and the RGB image which are calibrated in advance, and then the depth value of each pixel point can be obtained.
In step 304: obtaining point cloud data based on the depth value of the pixel point and the mask image;
in the embodiment of the present application, the method for acquiring point cloud data may be specifically implemented as the steps shown in fig. 5:
in step 501: inputting the depth value and the mask image of the pixel point into a depth camera with internal parameters calibrated in advance;
in step 502: and acquiring point cloud data generated by the depth camera.
In the application, in order to make the generated point cloud data more accurate, internal parameters of the depth camera are calibrated in advance by a person skilled in the art according to actual requirements, and when the method is implemented specifically, the depth values and the mask images of the pixel points are directly input into the depth camera to obtain the point cloud data.
In step 305: and projecting the pixel points in the point cloud data to a reference plane to obtain a projected depth map containing the packages.
In the present application, step 305, when implemented, may be implemented as the steps shown in fig. 6, wherein:
in step 601: according to a pre-calibrated platform plane equation, projecting pixel points in the point cloud data to a reference plane to obtain a projection diagram;
the projection view is shown in fig. 7.
In step 602: determining the distance between each pixel point in the point cloud data and the projection graph;
in another specific implementation, the euclidean distance between each pixel point and the projection drawing may be determined to determine the distance between each pixel point and the projection drawing, and other methods may also be used to determine the distance between each pixel point and the projection drawing, which is not limited in this application.
In step 603: a projected depth map is generated based on the distances and the projection map.
The following describes in detail a process of selecting candidate segmentation points from pixel points, as shown in fig. 8, where:
in step 801: aiming at each pixel point in the projection depth map, taking the pixel point as a target pixel point;
in step 802: determining pixel points with the maximum depth value and the minimum depth value in the designated area by taking the target pixel point as a center;
as shown in fig. 9, the pixel point a is used as the target pixel point, the pixel point with the largest depth value in the designated area is used as the pixel point B, and the pixel point with the smallest depth value is used as the pixel point C.
In step 803: and if the depth difference value of the pixel point with the maximum depth value and the pixel point with the minimum depth value is larger than a first threshold value, and the depth value of the target pixel point is smaller than a second threshold value, taking the target pixel point as a candidate segmentation point.
In some embodiments, the first threshold is an empirical value determined empirically by a person skilled in the art, and the second preset value is a depth value of a pixel point with a largest depth value and a depth average value of a pixel point with a smallest depth value in the designated area, taking fig. 9 as an example, the second threshold is an average value of depth values of a pixel point B and a pixel point C.
To sum up, all candidate segmentation points can be obtained by traversing all pixel points by adopting the steps in fig. 8, and the following describes the steps of obtaining the segmentation points in detail, as shown in fig. 10:
in step 1001: aiming at each candidate segmentation point, taking the candidate segmentation point as a target candidate segmentation point;
in step 1002: continuously acquiring two-dimensional coordinates of a specified number of pixel points by taking the target candidate segmentation point as a starting point and taking the pixel as a unit along the gradient descending direction; the horizontal coordinate of the pixel point represents the distance between the pixel point and the target candidate segmentation point, and the vertical coordinate represents the depth value;
in step 1003: determining the slope of a straight line to be synthesized by corresponding pixel points based on the obtained two-dimensional coordinates;
in step 1004: and if the slope is larger than the specified threshold, determining the target candidate segmentation point corresponding to the slope as the segmentation point.
For example: as shown in fig. 11, if the pixel a is the target pixel and the designated number is 3, 3 pixels are selected from a point a along the gradient descending direction, and the pixel a and the selected 3 pixels are fitted into a straight line.
In summary, candidate segmentation points are determined according to a projection depth map containing the packages, then segmentation points are selected from the candidate segmentation points, and in the application, after the segmentation points are determined, connected domain analysis is performed on the remaining points, so that the positions of the packages can be obtained.
In this application, determine the cut-off point based on containing the projection depth map of parcel, got rid of the interference of parcel surface texture, then cut apart the parcel based on the cut-off point, adhesion parcel is cut apart to the cut-off that can be accurate, fixes a position the parcel based on remaining point pair, has promoted the accuracy of parcel three-dimensional position information.
As shown in fig. 12, based on the same inventive concept, there is provided a parcel positioning apparatus 1200, comprising:
a candidate segmentation point determination module 12001, configured to determine, based on a projection depth map including a parcel, a depth value of each pixel point in the projection depth map, and determine a candidate segmentation point from the pixel points according to the depth value;
a dividing point determining module 12002, configured to, for each candidate dividing point, take the candidate dividing point as a target candidate dividing point, and continuously obtain two-dimensional coordinates of a specified number of pixel points in a gradient descending direction by taking a pixel as a unit, with the target candidate dividing point as a starting point; determining the slope of a straight line to be synthesized by the corresponding pixel points based on the acquired two-dimensional coordinates, and if the slope is greater than a specified threshold, determining a target candidate segmentation point corresponding to the slope as a segmentation point; the abscissa of the pixel point represents the distance between the pixel point and the target candidate segmentation point, and the ordinate represents the depth value;
a parcel location determining module 12003, configured to remove the segmentation points from the projected depth map, and determine the location of the parcel based on the remaining points in the projected depth map.
In some possible embodiments, the projected depth map containing the parcel is obtained according to the following method:
acquiring an RGB image and a depth image containing a package;
carrying out deep learning instance segmentation on the RGB image to obtain the mask image;
aligning pixel points of the depth image with pixel points of the RGB image based on a mapping relation between the depth image and the RGB image to obtain depth values of the pixel points;
obtaining point cloud data based on the depth values of the pixel points and the mask image;
and projecting the pixel points in the point cloud data to a reference plane to obtain a projected depth map containing the packages.
In some possible embodiments, when the candidate segmentation point determination module performs projection of the pixel points in the point cloud data to a reference plane to obtain a projection depth map including a parcel, the candidate segmentation point determination module is configured to:
according to a pre-calibrated platform plane equation, projecting pixel points in the point cloud data to a reference plane to obtain a projection diagram;
determining a distance between each pixel point in the point cloud data and the projected graph;
generating the projected depth map based on the distances and the projected map.
In some possible embodiments, the candidate segmentation point determination module, when performing deriving the point cloud data based on the depth values of the pixel points and the mask image, is configured to:
inputting the depth values of the pixel points and the mask image into a depth camera with internal parameters calibrated in advance;
and acquiring the point cloud data generated by the depth camera.
In some possible embodiments, the segmentation point determination module, when performing determining the candidate segmentation point from the pixel points according to the depth value, is configured to:
aiming at each pixel point in the projection depth map, taking the pixel point as a target pixel point;
determining the pixel point with the maximum depth value and the minimum depth value in the designated area by taking the target pixel point as the center;
and if the depth difference value between the pixel point with the maximum depth value and the pixel point with the minimum depth value is larger than a first threshold value, and the depth value of the target pixel point is smaller than a second threshold value, taking the target pixel point as a candidate segmentation point.
In some possible embodiments, the second threshold is a depth value of a pixel point with a largest depth value and a depth mean value of a pixel point with a smallest depth value in the designated area.
In some possible embodiments, the parcel location determination module, when performing determining the location of the parcel based on the remaining points in the projected depth map, is configured to:
and analyzing the connected domain of the rest points to obtain the position of the package.
Having described the package locating method and apparatus of an exemplary embodiment of the present application, an electronic device according to another exemplary embodiment of the present application is next described.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present application may include at least one processor, and at least one memory. Wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the package locating method according to various exemplary embodiments of the present application described above in the present specification.
The electronic apparatus 130 according to this embodiment of the present application is described below with reference to fig. 13. The electronic device 130 shown in fig. 13 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 13, the electronic device 130 is represented in the form of a general electronic device. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur via input/output (I/O) interfaces 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, aspects of a package locating method provided herein may also be implemented in the form of a program product comprising program code for causing a computer device to perform the steps of a package locating method according to various exemplary embodiments of the present application described above in this specification when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for package location of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be executable on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (16)

1. A method of parcel positioning, the method comprising:
determining the depth value of each pixel point in the projection depth map based on the projection depth map containing the package, and determining candidate segmentation points from the pixel points according to the depth value;
aiming at each candidate segmentation point, taking the candidate segmentation point as a target candidate segmentation point, taking the target candidate segmentation point as a starting point, and continuously acquiring two-dimensional coordinates of a specified number of pixel points in a gradient descending direction by taking pixels as units; determining the slope of a straight line to be synthesized by the corresponding pixel points based on the acquired two-dimensional coordinates, and if the slope is greater than a specified threshold, determining a target candidate segmentation point corresponding to the slope as a segmentation point; the abscissa of the pixel point represents the distance between the pixel point and the target candidate segmentation point, and the ordinate represents the depth value;
and eliminating the segmentation points from the projection depth map, and determining the position of the parcel based on the remaining points in the projection depth map.
2. The method of claim 1, wherein the projected depth map containing the parcel is obtained according to the following method:
acquiring an RGB image and a depth image of a color space containing a package;
carrying out deep learning instance segmentation on the RGB image to obtain the mask image;
aligning pixel points of the depth image with pixel points of the RGB image based on a mapping relation between the depth image and the RGB image to obtain depth values of the pixel points;
obtaining point cloud data based on the depth values of the pixel points and the mask image;
and projecting the pixel points in the point cloud data to a reference plane to obtain a projected depth map containing the packages.
3. The method of claim 2, wherein projecting pixel points in the point cloud data to a reference plane results in a projected depth map containing parcels, comprising:
according to a pre-calibrated platform plane equation, projecting pixel points in the point cloud data to a reference plane to obtain a projection diagram;
determining a distance between each pixel point in the point cloud data and the projected graph;
generating the projected depth map based on the distances and the projected map.
4. The method of claim 2, wherein obtaining point cloud data based on the depth values of the pixel points and the mask image comprises:
inputting the depth values of the pixel points and the mask image into a depth camera with internal parameters calibrated in advance;
and acquiring the point cloud data generated by the depth camera.
5. The method of claim 1, wherein determining candidate segmentation points from pixel points according to the depth value comprises:
aiming at each pixel point in the projection depth map, taking the pixel point as a target pixel point;
determining the pixel point with the maximum depth value and the minimum depth value in the designated area by taking the target pixel point as the center;
and if the depth difference value between the pixel point with the maximum depth value and the pixel point with the minimum depth value is larger than a first threshold value, and the depth value of the target pixel point is smaller than a second threshold value, taking the target pixel point as a candidate segmentation point.
6. The method of claim 5, wherein the second threshold is a depth value of a pixel with a largest depth value and a depth mean of a pixel with a smallest depth value in the designated area.
7. The method of any of claims 1 to 6, wherein determining the location of the parcel based on the remaining points in the projected depth map comprises:
and analyzing the connected domain of the rest points to obtain the position of the package.
8. A package positioning device, the device comprising:
the candidate segmentation point determining module is used for determining the depth value of each pixel point in the projection depth map based on the projection depth map containing the package, and determining candidate segmentation points from the pixel points according to the depth values;
the division point determining module is used for taking the candidate division points as target candidate division points according to each candidate division point, taking the target candidate division points as starting points, and continuously acquiring two-dimensional coordinates of a specified number of pixel points in a gradient descending direction by taking pixels as units; determining the slope of a straight line to be synthesized by the corresponding pixel points based on the acquired two-dimensional coordinates, and if the slope is greater than a specified threshold, determining a target candidate segmentation point corresponding to the slope as a segmentation point; the abscissa of the pixel point represents the distance between the pixel point and the target candidate segmentation point, and the ordinate represents the depth value;
and the parcel position determining module is used for removing the segmentation points from the projection depth map and determining the position of the parcel based on the remaining points in the projection depth map.
9. The apparatus of claim 8, wherein the projected depth map containing the parcel is obtained according to the following method:
acquiring an RGB image and a depth image containing a package;
carrying out deep learning instance segmentation on the RGB image to obtain the mask image;
aligning pixel points of the depth image with pixel points of the RGB image based on a mapping relation between the depth image and the RGB image to obtain depth values of the pixel points;
obtaining point cloud data based on the depth values of the pixel points and the mask image;
and projecting the pixel points in the point cloud data to a reference plane to obtain a projected depth map containing the packages.
10. The apparatus of claim 9, wherein the candidate segmentation point determination module, when performing projection of pixel points in the point cloud data onto a reference plane to obtain a projected depth map containing a parcel, is configured to:
according to a pre-calibrated platform plane equation, projecting pixel points in the point cloud data to a reference plane to obtain a projection diagram;
determining a distance between each pixel point in the point cloud data and the projected graph;
generating the projected depth map based on the distances and the projected map.
11. The apparatus of claim 9, wherein the candidate segmentation point determination module, when performing deriving point cloud data based on the depth values of the pixel points and the mask image, is configured to:
inputting the depth values of the pixel points and the mask image into a depth camera with internal parameters calibrated in advance;
and acquiring the point cloud data generated by the depth camera.
12. The apparatus of claim 8, wherein the segmentation point determination module, when performing determining candidate segmentation points from pixel points according to the depth value, is configured to:
aiming at each pixel point in the projection depth map, taking the pixel point as a target pixel point;
determining the pixel point with the maximum depth value and the minimum depth value in the designated area by taking the target pixel point as the center;
and if the depth difference value between the pixel point with the maximum depth value and the pixel point with the minimum depth value is larger than a first threshold value, and the depth value of the target pixel point is smaller than a second threshold value, taking the target pixel point as a candidate segmentation point.
13. The apparatus according to claim 12, wherein the second threshold is a depth value of a pixel having a largest depth value and a depth mean of pixels having a smallest depth value in the designated area.
14. The apparatus of any of claims 8 to 13, wherein the parcel location determination module, when performing the determination of the location of the parcel based on the remaining points in the projected depth map, is configured to:
and analyzing the connected domain of the rest points to obtain the position of the package.
15. An electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A computer storage medium, characterized in that the computer storage medium stores a computer program for causing a computer to execute the method of any one of claims 1-7.
CN202111612734.1A 2021-12-27 2021-12-27 Parcel positioning method and device, electronic equipment and storage medium Pending CN114359376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111612734.1A CN114359376A (en) 2021-12-27 2021-12-27 Parcel positioning method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111612734.1A CN114359376A (en) 2021-12-27 2021-12-27 Parcel positioning method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114359376A true CN114359376A (en) 2022-04-15

Family

ID=81101449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111612734.1A Pending CN114359376A (en) 2021-12-27 2021-12-27 Parcel positioning method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114359376A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117765065A (en) * 2023-11-28 2024-03-26 中科微至科技股份有限公司 Target detection-based single-piece separated package rapid positioning method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117765065A (en) * 2023-11-28 2024-03-26 中科微至科技股份有限公司 Target detection-based single-piece separated package rapid positioning method
CN117765065B (en) * 2023-11-28 2024-06-04 中科微至科技股份有限公司 Target detection-based single-piece separated package rapid positioning method

Similar Documents

Publication Publication Date Title
EP3201881B1 (en) 3-dimensional model generation using edges
CN110286387B (en) Obstacle detection method and device applied to automatic driving system and storage medium
US11216971B2 (en) Three-dimensional bounding box from two-dimensional image and point cloud data
CN108961327A (en) A kind of monocular depth estimation method and its device, equipment and storage medium
CN111209978B (en) Three-dimensional visual repositioning method and device, computing equipment and storage medium
US8401242B2 (en) Real-time camera tracking using depth maps
JP2020042818A (en) Method and apparatus for generating three-dimensional data, computer device, and computer-readable storage medium
EP2956891B1 (en) Segmenting objects in multimedia data
JP2018163654A (en) System and method for telecom inventory management
EP2671384A2 (en) Mobile camera localization using depth maps
CN111950543A (en) Target detection method and device
CN111402413B (en) Three-dimensional visual positioning method and device, computing equipment and storage medium
CN112070782A (en) Method and device for identifying scene contour, computer readable medium and electronic equipment
WO2019175532A1 (en) Urban environment labelling
CN115861601A (en) Multi-sensor fusion sensing method and device
CN114359376A (en) Parcel positioning method and device, electronic equipment and storage medium
CN113126120A (en) Data annotation method, device, equipment, storage medium and computer program product
US20230281975A1 (en) Systems and methods for generating three-dimensional annotations for training a machine learning model
CN113487590B (en) Block processing method, device, computing equipment and storage medium
KR102313940B1 (en) Method for tracking object in continuous 3D data, and computer program recorded on record-medium for executing method therefor
CN113538558B (en) Volume measurement optimization method, system, equipment and storage medium based on IR diagram
US11657506B2 (en) Systems and methods for autonomous robot navigation
CN112686155A (en) Image recognition method, image recognition device, computer-readable storage medium and processor
CN111968071A (en) Method, device, equipment and storage medium for generating spatial position of vehicle
De Roovere et al. CenDerNet: Center and Curvature Representations for Render-and-Compare 6D Pose Estimation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination