WO2023213070A1 - Method and apparatus for obtaining goods pose based on 2d camera, device, and storage medium - Google Patents

Method and apparatus for obtaining goods pose based on 2d camera, device, and storage medium Download PDF

Info

Publication number
WO2023213070A1
WO2023213070A1 PCT/CN2022/133338 CN2022133338W WO2023213070A1 WO 2023213070 A1 WO2023213070 A1 WO 2023213070A1 CN 2022133338 W CN2022133338 W CN 2022133338W WO 2023213070 A1 WO2023213070 A1 WO 2023213070A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
corner
information
goods
dimensional
Prior art date
Application number
PCT/CN2022/133338
Other languages
French (fr)
Chinese (zh)
Inventor
沈维国
Original Assignee
劢微机器人科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 劢微机器人科技(深圳)有限公司 filed Critical 劢微机器人科技(深圳)有限公司
Publication of WO2023213070A1 publication Critical patent/WO2023213070A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • G06K17/0025Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device the arrangement consisting of a wireless interrogation device in combination with a device for optically marking the record carrier
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes

Definitions

  • This application relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for obtaining the pose of goods based on a 2D camera.
  • the main purpose of this application is to provide a method, device, equipment and storage medium for obtaining the posture of goods based on a 2D camera, aiming to solve the technical problem of high cost in determining the posture of goods in the existing technology.
  • this application provides a method for obtaining the pose of goods based on a 2D camera.
  • the method includes the following steps:
  • the position and orientation of the goods are determined according to the three-dimensional spatial coordinates of the two-dimensional code.
  • determining the three-dimensional spatial coordinates of the QR code based on the QR code corner information and preset calibration parameters includes:
  • the three-dimensional space coordinates of the two-dimensional code are determined according to the two-dimensional code corner information, the standard corner information and the preset calibration parameters.
  • an information area and a positioning area are provided in the QR code image, and the three-dimensional spatial coordinates of the QR code are determined based on the QR code corner information, the standard corner information and preset calibration parameters.
  • the three-dimensional space coordinates of the two-dimensional code are determined according to the corner point information of the positioning area, the standard corner point information and the preset calibration parameters.
  • determining the three-dimensional spatial coordinates of the QR code based on the corner point information of the positioning area, the standard corner point information and preset calibration parameters includes:
  • the three-dimensional spatial coordinates of the two-dimensional code are determined according to the corresponding relationship and the preset calibration parameters.
  • determining the three-dimensional spatial coordinates of the two-dimensional code based on the corresponding relationship and preset calibration parameters includes:
  • the three-dimensional spatial coordinates of the two-dimensional code are determined according to the actual spatial positions of the corner points of each positioning area.
  • the unmanned forklift is equipped with a fill light.
  • the method further includes:
  • the QR code image of the goods is recognized.
  • determining the QR code corner information based on the cargo QR code image includes:
  • the two-dimensional code corner information is determined according to the image outline.
  • this application also proposes a device for obtaining the posture of goods based on a 2D camera.
  • the device for obtaining the posture of goods based on a 2D camera includes:
  • a processing module configured to determine the QR code corner information based on the QR code image of the goods
  • the processing module is also used to determine the three-dimensional spatial coordinates of the QR code based on the QR code corner information and preset calibration parameters;
  • the processing module is also used to determine the position and orientation of the goods according to the three-dimensional spatial coordinates of the two-dimensional code.
  • this application also proposes a device for obtaining the posture of goods based on a 2D camera.
  • the equipment for obtaining the posture of goods based on a 2D camera includes: a memory, a processor, and a device that is stored on the memory and can be used on the A program for acquiring the cargo pose based on the 2D camera running on the processor is configured to implement the steps of the method for acquiring the cargo pose based on the 2D camera as described above.
  • this application also proposes a storage medium, which stores a program for obtaining the posture of goods based on a 2D camera.
  • the program for obtaining the posture of goods based on a 2D camera is executed by the processor, the above implementation is implemented.
  • This application obtains the QR code image of the goods; determines the QR code corner information based on the QR code image of the goods; determines the 3D corresponding to the QR code image of the goods based on the QR code corner information and preset calibration parameters. Spatial coordinates; determine the posture of the cargo according to the three-dimensional spatial coordinates of the QR code.
  • the calibration information is used to convert the points in the plane of the QR code into points in the three-dimensional space. Since the QR code is set at a fixed position of the goods, the relative position of the points in the QR code and the goods is and posture are fixed, so only the QR code can be used to locate the three-dimensional posture of the goods. The posture of the goods can still be determined without the need for a 3D camera, which saves the unmanned truck the trouble of determining the posture of the goods. cost.
  • Figure 1 is a schematic structural diagram of a device for acquiring cargo pose based on a 2D camera in the hardware operating environment involved in the embodiment of the present application;
  • Figure 2 is a schematic flowchart of the first embodiment of the method for obtaining the pose of goods based on a 2D camera according to this application;
  • Figure 3 is a schematic diagram of a QR code according to one embodiment of the method for obtaining the pose of goods based on a 2D camera;
  • Figure 4 is a schematic flowchart of the second embodiment of the method for obtaining the pose of goods based on a 2D camera in this application;
  • Figure 5 is a structural block diagram of the first embodiment of the device for obtaining the position and orientation of goods based on a 2D camera in this application.
  • Figure 1 is a schematic structural diagram of a device for acquiring cargo pose based on a 2D camera in the hardware operating environment involved in the embodiment of the present application.
  • the device for acquiring cargo pose based on a 2D camera may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is used to realize connection communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard).
  • the user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface).
  • the memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory.
  • RAM Random Access Memory
  • NVM Non-Volatile Memory
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • Figure 1 does not constitute a limitation on the device for acquiring cargo posture based on a 2D camera. It may include more or less components than shown in the figure, or some components may be combined or different. component layout.
  • memory 1005 which is a storage medium, may include an operating system, a network communication module, a user interface module, and a program for obtaining the posture of goods based on a 2D camera.
  • the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; this application acquires the cargo pose based on a 2D camera
  • the processor 1001 and the memory 1005 in the device can be configured in the device for acquiring the cargo pose based on the 2D camera.
  • the device for acquiring the cargo pose based on the 2D camera calls the program for acquiring the cargo pose based on the 2D camera stored in the memory 1005 through the processor 1001. , and execute the method for obtaining the cargo pose based on the 2D camera provided by the embodiment of this application.
  • FIG. 2 is a schematic flow chart of a method of obtaining the posture of goods based on a 2D camera according to the first embodiment of the present application.
  • the method for obtaining the pose of goods based on a 2D camera includes the following steps:
  • Step S10 Obtain the QR code image of the goods.
  • the execution subject of this embodiment is a cargo posture detection system.
  • the cargo posture detection system is installed on an unmanned handling equipment.
  • the unmanned handling equipment can be an unmanned forklift or an AGV car. , it can also be an unmanned transport robot, or even other equipment that has the same or similar functions as an unmanned forklift.
  • This embodiment is not limited to this, and is only explained using an unmanned forklift as an example.
  • this embodiment is applied to the process of detecting cargo poses by unmanned trucks, unmanned forklifts, and handling robots.
  • the accuracy of the cargo pose detection process directly affects the process of cargo loading and unloading.
  • 3D scanning equipment such as lidar is used to 3D scan goods to obtain a 3D lattice model of the goods.
  • this method requires the assembly of a large number of high-precision sensors, which is costly and requires a lot of data to be processed during pose detection. The amount of data is huge, the memory usage is high, and the handling process is easily affected by long response times and lags. Therefore, this embodiment proposes a solution that only needs to be equipped with a 2D camera to accurately detect the pose, so as to obtain a more economical pose. testing method.
  • the QR code image of the goods can be obtained through the image collection equipment on the unmanned forklift. For example, by taking a photo, the image information is obtained, and then the image is positioned on the QR code to obtain the QR code image.
  • the goods QR code is a QR code identification fixed on the goods, which stores the identification information of the goods, and the position of the QR code is very fixed, that is, each position in the QR code is relative to each position of the goods.
  • the relative distances are fixed, which also lays the foundation for determining the acquisition pose based on the QR code pose.
  • a fill light is provided on the unmanned forklift.
  • the method further includes: when it is detected that the distance of the goods is less than a preset distance, controlling the fill light to supplement the light; When the fill light supplements the light, the QR code image of the goods is recognized.
  • the unmanned forklift in this solution can be equipped with an ordinary camera and a fill light.
  • the fill light is placed near the camera and fixed on the unmanned forklift together with the camera.
  • the fill light will illuminate and the camera will start taking pictures, thereby obtaining a two-dimensional image of the cargo. code image. This can operate in more scenes with poor lighting. Since this embodiment uses 2D pose detection technology, the impact of light is greater, so a fill light can be used to assist to improve the accuracy of pose detection.
  • Step S20 Determine the QR code corner information based on the cargo QR code image.
  • corner point information of the QR code can be obtained directly by performing corner point recognition on the QR code.
  • corner point identification on the QR code all corner position information in the QR code can be obtained, for example: in Figure 3
  • the corner positions of the upper left, upper right, lower left, lower right corners of the information area. Store the images and coordinates of these corner points as QR code corner point information.
  • corner detection can identify the position of each corner point, it cannot identify the identity of each corner point. Therefore, it is necessary to further determine the identity of each QR code corner point. Only by identifying the identity can each corner point be determined. Where should the normal placement be?
  • adaptive threshold segmentation is performed on the QR code image to obtain an image outline; the QR code corner information is determined based on the image outline.
  • adaptive threshold segmentation can be performed on the QR code image, that is, the color image is converted into a black and white image, so that the black and white boundary, that is, the image outline, can be determined. According to the image outline The success rate of corner point identification will be greatly improved, and the corner information of the QR code will be finally determined.
  • Step S30 Determine the three-dimensional space coordinates corresponding to the cargo QR code image based on the QR code corner information and preset calibration parameters.
  • the position of the unmanned forklift can be adjusted so that the goods are in an ideal relative position, for example: through the 4 information areas in Figure 3
  • the corner points determine whether the connected graphics are squares, determine whether the direction is correct, and then determine whether the distance is correct based on the size of the square.
  • the corner points of each information area are converted according to the preset calibration parameters to determine each The three-dimensional coordinates of the corner points are enough.
  • the preset calibration parameters can be internal calibration parameters and external calibration parameters.
  • the internal calibration parameters are used to determine the accurate position of each point in the image in the camera coordinate system
  • the external calibration parameters are used to convert the coordinates in the camera coordinate system into
  • the unmanned forklift is the spatial coordinate of the reference system.
  • Step S40 Determine the posture of the goods according to the three-dimensional spatial coordinates of the QR code.
  • This embodiment obtains the QR code image of the goods; determines the QR code corner information based on the QR code image of the goods; determines the corresponding QR code image of the goods based on the QR code corner information and preset calibration parameters. Three-dimensional space coordinates; determine the posture of the cargo according to the three-dimensional space coordinates of the QR code.
  • the calibration information is used to convert the points in the plane of the QR code into points in the three-dimensional space. Since the QR code is set at a fixed position of the goods, the relative position of the points in the QR code and the goods is and posture are fixed, so only the QR code can be used to locate the three-dimensional posture of the goods. The posture of the goods can still be determined without the need for a 3D camera, which saves the unmanned truck the trouble of determining the posture of the goods. cost.
  • Figure 4 is a schematic flowchart of a second embodiment of a method for obtaining the pose of goods based on a 2D camera according to the present application.
  • the method of obtaining the pose of the goods based on the 2D camera also includes:
  • Step S31 Obtain standard corner point information.
  • the standard corner point information can be the location of each corner point in the QR code during calibration, or other corner point information used to determine the deviation between the currently detected corner point and the standard corner point position.
  • the corner coordinates of the four corners of the information area in Figure 3 are (2, 2) (-2, 1) (-2, -1) (2, -2) and the standard corner coordinates are (2, 2 ) (-2, 2) (-2, -2) (2, -2), that is, it is determined that the goods are not facing the forklift but deflected to the right. This is because the length distance between the two corner points The farther the image acquisition device is, the shorter the length displayed in the image.
  • Step S32 Determine the three-dimensional spatial coordinates of the two-dimensional code based on the two-dimensional code corner information, the standard corner information and preset calibration parameters.
  • the degree of deviation of the posture from the standard posture can be known, and then the conversion of pixel coordinates and actual space coordinates can be performed in combination with the preset calibration parameters. Determine the three-dimensional coordinates of the QR code.
  • the information area corner point and positioning information are determined based on the QR code corner point information; the homography matrix of the QR code is determined based on the information area corner point and standard corner point information; The homography matrix and standard corner point information determine the corner point information of the positioning area; the three-dimensional space coordinates of the two-dimensional code are determined according to the corner point information of the positioning area, the standard corner point information and the preset calibration parameters.
  • this embodiment actually first identifies and determines the QR code in the information area.
  • the position of the QR code in the image is determined at the same time as the goods ID, and the QR code corners of the four information areas are determined based on the position of the information area.
  • the homography matrix is used to reflect the correlation between two images on the same plane in space at any different shooting angles.
  • the corner points of the information area on the camera photo can be first arrayed with The homography matrix is determined by using the standard information area corners in the standard corner point information to obtain the spatial relationship between the QR code image under the standard image and the QR code image under the current image; and then based on the homography matrix and the standard image Use the corner points of the positioning area under the current image to initially determine the approximate position of the corner points of the positioning area under the current image, and then use the approximate positions of these positioning area corner points to filter out the corner points of the positioning area, so that the accurate corner points of the positioning area can be obtained information.
  • multiple positioning area corner points and corresponding labels of the positioning area corner points are determined based on the positioning area corner point information; multiple standard positioning area corner points and standard positioning area corner points are determined based on the standard corner point information.
  • the corresponding label of the point determine the corresponding relationship between the corner point of the positioning area and the corner point of the standard positioning area according to the label corresponding to the corner point of the positioning area and the label corresponding to the corner point of the standard positioning area; according to the corresponding relationship and the preset calibration
  • the parameters determine the three-dimensional coordinates of the QR code.
  • the QR code is divided into a positioning area and an information area.
  • the position and posture of the goods can be calculated by comparing the corner points of the positioning area with the standard corner points.
  • this embodiment proposes an optimal solution with higher accuracy, as follows: Obtain the homography matrix based on the corner points of the four information areas and the standard corner point information, and then calculate the homography matrix based on the homography The matrix obtains the corner points of the black and white part of the image (corner points of the positioning area). It can be seen that there are 44 corner points of the information area in Figure 3. The corner points have high accuracy and a large number of corner points.
  • the logic of obtaining the corner points of the information area based on the homography matrix is to use the corner points of the information area as the basis to calculate which corners are the corner points of the positioning area, so as to avoid useless corner points from being mixed into the calculation process, and each information area corner point is not processed label, and then compare it with the corner point corresponding to the label in the standard corner point information.
  • the actual logic is consistent with the calculation process of corner points in the information area, except that there are more corner points in the positioning area, and the corner points in the positioning area cover a wider range. Therefore, the accuracy is higher, which will not be described in detail in this embodiment.
  • the relative positional relationship between the corner points of each positioning area and the corner points of the standard positioning area is determined according to the corresponding relationship; the actual spatial position of the corner points of each positioning area is determined according to the relative positional relationship and the preset calibration parameters;
  • the three-dimensional spatial coordinates of the two-dimensional code are determined according to the actual spatial positions of the corner points of each positioning area.
  • the relative positional relationship between the corner points of each positioning area and the corner points of the standard positioning area is determined based on the corresponding relationship. For example: assuming that each corner point of the positioning area in Figure 3 has a corresponding label, respectively, N1 ⁇ N44, Then the corresponding standard information area corner points in the standard corner point information also have corresponding numbers N1 ⁇ N44. The corner points with the same label are matched to determine the relative position relationship of each pair of corner points, thereby deducing the standard QR code and the current The pose relationship of the QR code can be used to calculate the three-dimensional coordinates of each corner point of the current QR code based on the three-dimensional coordinates of each corner point in the standard QR code.
  • this embodiment proposes a preferred implementation method, for example: fixing the QR code to the goods, fixing the position of the QR code to the position of the goods, and knowing the position and posture of the QR code means knowing the goods. position posture.
  • the position and posture of the QR code Process the image acquired by the camera, perform adaptive threshold segmentation to obtain a binary image, extract the contour, obtain the quadrilateral outline, decode the black and white on the image, and obtain the ID of the QR code and the four corner points of the QR code, as shown in the figure 3 shown.
  • the homography matrix is obtained based on these four corner points and the original image corner points, and then the corner points of the black and white part of the image are obtained based on the homography matrix.
  • the corner points have high accuracy and a large number of corner points.
  • the three-dimensional coordinates of the corner point are obtained based on the internal and external parameters of the camera, and the position and attitude of the QR code are obtained through the three-dimensional coordinates.
  • This embodiment obtains standard corner point information; determines the three-dimensional space coordinates of the two-dimensional code based on the two-dimensional code corner information, the standard corner point information and preset calibration parameters.
  • standard corner points are introduced so that the unmanned forklift can detect the posture of the cargo without adjusting its own posture, which improves the flexibility of cargo posture detection.
  • embodiments of the present application also propose a storage medium on which is stored a program for acquiring cargo poses based on a 2D camera.
  • the program for acquiring cargo poses based on a 2D camera is executed by a processor, the above-mentioned steps are implemented. Steps of obtaining cargo pose based on 2D camera.
  • Figure 5 is a structural block diagram of a first embodiment of a device for obtaining the position and orientation of goods based on a 2D camera according to the present application.
  • the device for obtaining the pose of goods based on a 2D camera proposed in the embodiment of this application includes:
  • the acquisition module 10 is used to acquire the QR code image of the goods
  • the processing module 20 is used to determine the QR code corner information based on the QR code image of the goods
  • the processing module 20 is also used to determine the three-dimensional spatial coordinates of the QR code based on the QR code corner information and preset calibration parameters;
  • the processing module 20 is also used to determine the position and orientation of the goods according to the three-dimensional spatial coordinates of the two-dimensional code.
  • the processing module 20 is also used to obtain standard corner point information
  • the three-dimensional space coordinates of the two-dimensional code are determined according to the two-dimensional code corner information, the standard corner information and the preset calibration parameters.
  • the processing module 20 is also used to determine the corner point of the information area and the positioning information based on the corner point information of the QR code;
  • the three-dimensional space coordinates of the two-dimensional code are determined according to the corner point information of the positioning area, the standard corner point information and the preset calibration parameters.
  • the processing module 20 is further configured to determine multiple positioning area corner points and labels corresponding to the positioning area corner points according to the positioning area corner point information;
  • the three-dimensional spatial coordinates of the two-dimensional code are determined according to the corresponding relationship and the preset calibration parameters.
  • the processing module 20 is further configured to determine the relative positional relationship between the corner points of each positioning area and the corner points of the standard positioning area according to the corresponding relationship;
  • the three-dimensional spatial coordinates of the two-dimensional code are determined according to the actual spatial positions of the corner points of each positioning area.
  • the processing module 20 is also used to control the fill light to supplement the light when it is detected that the distance of the goods is less than the preset distance;
  • the QR code image of the goods is recognized.
  • the processing module 20 is also used to perform adaptive threshold segmentation on the QR code image to obtain the image outline;
  • the two-dimensional code corner information is determined according to the image outline.
  • the acquisition module 10 obtains the QR code image of the goods; the processing module 20 determines the QR code corner information based on the QR code image of the goods; the processing module 20 determines the QR code corner information based on the QR code corner information and preset calibration parameters.
  • the calibration information is used to convert the points in the plane of the QR code into points in the three-dimensional space.
  • the QR code is set at a fixed position of the goods, the relative position of the points in the QR code and the goods is and posture are fixed, so only the QR code can be used to locate the three-dimensional posture of the goods.
  • the posture of the goods can still be determined without the need for a 3D camera, which saves the unmanned truck the trouble of determining the posture of the goods. cost.
  • the terms “include”, “comprises” or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or system that includes a list of elements includes not only those elements, but also other elements not expressly listed or elements inherent to the process, method, article or system.
  • an element defined by the statement “comprises a" does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology.
  • the computer software product is stored in a storage medium (such as a read-only memory). , ROM)/RAM, magnetic disk, optical disk), including several instructions to cause a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

Abstract

The present application relates to the technical field of image processing, and discloses a method and apparatus for obtaining a goods pose based on a 2D camera, a device, and a storage medium. The method comprises: obtaining a goods QR code image; determining QR code corner information according to the goods QR code image; determining, according to the QR code corner information and a preset calibration parameter, three-dimensional space coordinates corresponding to the goods QR code image; and determining a goods pose according to the QR code three-dimensional space coordinates.

Description

基于2d相机获取货物位姿方法、装置、设备及存储介质Methods, devices, equipment and storage media for obtaining cargo pose based on 2D camera
本申请要求于2022年5月6日申请的、申请号为202210486489.2的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202210486489.2 filed on May 6, 2022, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及图像处理技术领域,尤其涉及一种基于2d相机获取货物位姿方法、装置、设备及存储介质。This application relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for obtaining the pose of goods based on a 2D camera.
背景技术Background technique
随着智能工业和智能物流的发展,仓库管理越来越趋向于无人化,货物尺寸测量在仓库管理中扮演了十分重要的角色。无人叉车如何去取人工杂乱放置的货物是智能仓储行业中一个重要的问题,其中最重要的是如何准确的确定货物的位姿,目前一般的方法是采用3D相机来获取货物的点云,然后根据点云来确定货物的位置和姿态。然而该方法成本高,对光照环境依赖大,并且需要货物是同一规格。如何更经济的实现货物位姿的获取成为亟待解决的技术问题。With the development of smart industry and smart logistics, warehouse management is becoming more and more unmanned, and cargo size measurement plays a very important role in warehouse management. How an unmanned forklift picks up goods that have been placed randomly is an important issue in the smart warehousing industry. The most important of these is how to accurately determine the position of the goods. The current general method is to use a 3D camera to obtain the point cloud of the goods. Then the position and attitude of the goods are determined based on the point cloud. However, this method is costly, highly dependent on the lighting environment, and requires the goods to be of the same specifications. How to achieve the acquisition of cargo position more economically has become an urgent technical problem that needs to be solved.
上述内容仅用于辅助理解本申请的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solutions of the present application, and does not represent an admission that the above content is prior art.
技术问题technical problem
本申请的主要目的在于提供一种基于2d相机获取货物位姿方法、装置、设备及存储介质,旨在解决现有技术确定货物位姿成本过高的技术问题。The main purpose of this application is to provide a method, device, equipment and storage medium for obtaining the posture of goods based on a 2D camera, aiming to solve the technical problem of high cost in determining the posture of goods in the existing technology.
技术解决方案Technical solutions
为实现上述目的,本申请提供了一种基于2d相机获取货物位姿方法,所述方法包括以下步骤:In order to achieve the above purpose, this application provides a method for obtaining the pose of goods based on a 2D camera. The method includes the following steps:
获取货物二维码图像;Obtain the QR code image of the goods;
根据所述货物二维码图像确定二维码角点信息;Determine the QR code corner information based on the cargo QR code image;
根据所述二维码角点信息和预设标定参数确定所述货物二维码图像对应的三维空间坐标;Determine the three-dimensional space coordinates corresponding to the cargo QR code image based on the QR code corner information and preset calibration parameters;
根据所述二维码三维空间坐标确定货物位姿。The position and orientation of the goods are determined according to the three-dimensional spatial coordinates of the two-dimensional code.
在一实施例中,所述根据所述二维码角点信息和预设标定参数确定二维码三维空间坐标,包括:In one embodiment, determining the three-dimensional spatial coordinates of the QR code based on the QR code corner information and preset calibration parameters includes:
获取标准角点信息;Get standard corner point information;
根据所述二维码角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。The three-dimensional space coordinates of the two-dimensional code are determined according to the two-dimensional code corner information, the standard corner information and the preset calibration parameters.
在一实施例中,二维码图像中设置有信息区和定位区,所述根据所述二维码角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标,包括:In one embodiment, an information area and a positioning area are provided in the QR code image, and the three-dimensional spatial coordinates of the QR code are determined based on the QR code corner information, the standard corner information and preset calibration parameters. ,include:
根据所述二维码角点信息确定所述信息区角点以及定位信息;Determine the corner point of the information area and positioning information based on the QR code corner point information;
根据所述信息区角点以及标准角点信息确定二维码的单应性矩阵;Determine the homography matrix of the two-dimensional code based on the corner points of the information area and the standard corner point information;
根据所述单应性矩阵以及标准角点信息确定定位区角点信息;Determine corner point information of the positioning area according to the homography matrix and standard corner point information;
根据所述定位区角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。The three-dimensional space coordinates of the two-dimensional code are determined according to the corner point information of the positioning area, the standard corner point information and the preset calibration parameters.
在一实施例中,所述根据所述定位区角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标,包括:In one embodiment, determining the three-dimensional spatial coordinates of the QR code based on the corner point information of the positioning area, the standard corner point information and preset calibration parameters includes:
根据所述定位区角点信息确定多个定位区角点以及定位区角点对应的标号;Determine multiple positioning area corner points and labels corresponding to the positioning area corner points according to the positioning area corner point information;
根据所述标准角点信息确定多个标准定位区角点以及标准定位区角点对应的标号;Determine multiple standard positioning area corner points and labels corresponding to the standard positioning area corner points according to the standard corner point information;
根据所述定位区角点对应的标号和标准定位区角点对应的标号确定所述定位区角点和标准定位区角点的对应关系;Determine the corresponding relationship between the corner points of the positioning area and the corner points of the standard positioning area based on the labels corresponding to the corner points of the positioning area and the labels corresponding to the corner points of the standard positioning area;
根据所述对应关系和预设标定参数确定二维码的三维空间坐标。The three-dimensional spatial coordinates of the two-dimensional code are determined according to the corresponding relationship and the preset calibration parameters.
在一实施例中,所述根据所述对应关系和预设标定参数确定二维码的三维空间坐标,包括:In one embodiment, determining the three-dimensional spatial coordinates of the two-dimensional code based on the corresponding relationship and preset calibration parameters includes:
根据所述对应关系确定各定位区角点与标准定位区角点的相对位置关系;Determine the relative positional relationship between the corner points of each positioning area and the corner points of the standard positioning area according to the corresponding relationship;
根据所述相对位置关系和预设标定参数确定各定位区角点的实际空间位置;Determine the actual spatial position of the corner points of each positioning area according to the relative position relationship and the preset calibration parameters;
根据所述各定位区角点的实际空间位置确定二维码的三维空间坐标。The three-dimensional spatial coordinates of the two-dimensional code are determined according to the actual spatial positions of the corner points of each positioning area.
在一实施例中,无人叉车上设置有补光灯,所述获取货物二维码图像之前,还包括:In one embodiment, the unmanned forklift is equipped with a fill light. Before obtaining the QR code image of the goods, the method further includes:
在检测到货物距离小于预设距离时,控制所述补光灯补充灯光;When it is detected that the distance of the goods is less than the preset distance, control the fill light to supplement the light;
在所述补光灯补充灯光时,识别货物二维码图像。When the fill light supplements the light, the QR code image of the goods is recognized.
在一实施例中,所述根据所述货物二维码图像确定二维码角点信息,包括:In one embodiment, determining the QR code corner information based on the cargo QR code image includes:
对所述二维码图像进行自适应阈值分割,得到图像轮廓;Perform adaptive threshold segmentation on the QR code image to obtain the image outline;
根据所述图像轮廓确定二维码角点信息。The two-dimensional code corner information is determined according to the image outline.
此外,为实现上述目的,本申请还提出一种基于2d相机获取货物位姿装置,所述基于2d相机获取货物位姿装置包括:In addition, in order to achieve the above purpose, this application also proposes a device for obtaining the posture of goods based on a 2D camera. The device for obtaining the posture of goods based on a 2D camera includes:
获取模块,用于获取货物二维码图像;Acquisition module, used to obtain QR code images of goods;
处理模块,用于根据所述货物二维码图像确定二维码角点信息;A processing module configured to determine the QR code corner information based on the QR code image of the goods;
所述处理模块,还用于根据所述二维码角点信息和预设标定参数确定二维码三维空间坐标;The processing module is also used to determine the three-dimensional spatial coordinates of the QR code based on the QR code corner information and preset calibration parameters;
所述处理模块,还用于根据所述二维码三维空间坐标确定货物位姿。The processing module is also used to determine the position and orientation of the goods according to the three-dimensional spatial coordinates of the two-dimensional code.
此外,为实现上述目的,本申请还提出一种基于2d相机获取货物位姿设备,所述基于2d相机获取货物位姿设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于2d相机获取货物位姿程序,所述基于2d相机获取货物位姿程序配置为实现如上文所述的基于2d相机获取货物位姿方法的步骤。In addition, in order to achieve the above purpose, this application also proposes a device for obtaining the posture of goods based on a 2D camera. The equipment for obtaining the posture of goods based on a 2D camera includes: a memory, a processor, and a device that is stored on the memory and can be used on the A program for acquiring the cargo pose based on the 2D camera running on the processor is configured to implement the steps of the method for acquiring the cargo pose based on the 2D camera as described above.
此外,为实现上述目的,本申请还提出一种存储介质,所述存储介质上存储有基于2d相机获取货物位姿程序,所述基于2d相机获取货物位姿程序被处理器执行时实现如上文所述的基于2d相机获取货物位姿方法的步骤。In addition, in order to achieve the above purpose, this application also proposes a storage medium, which stores a program for obtaining the posture of goods based on a 2D camera. When the program for obtaining the posture of goods based on a 2D camera is executed by the processor, the above implementation is implemented. The steps of the method of obtaining cargo pose based on 2D camera.
有益效果beneficial effects
本申请获取货物二维码图像;根据所述货物二维码图像确定二维码角点信息;根据所述二维码角点信息和预设标定参数确定所述货物二维码图像对应的三维空间坐标;根据所述二维码三维空间坐标确定货物位姿。通过上述方式,使用标定信息将二维码中平面的点位转换为三维空间中的点位,由于二维码是设置在货物固定的位置上,二维码中的点位与货物的相对位置和姿态都是固定的,因此可以只需要二维码就可以实现货物三维姿态的定位,在不需要3D摄像机的情况下依然可以确定货物位姿,节约了无人搬运车对货物位姿确定的成本。This application obtains the QR code image of the goods; determines the QR code corner information based on the QR code image of the goods; determines the 3D corresponding to the QR code image of the goods based on the QR code corner information and preset calibration parameters. Spatial coordinates; determine the posture of the cargo according to the three-dimensional spatial coordinates of the QR code. Through the above method, the calibration information is used to convert the points in the plane of the QR code into points in the three-dimensional space. Since the QR code is set at a fixed position of the goods, the relative position of the points in the QR code and the goods is and posture are fixed, so only the QR code can be used to locate the three-dimensional posture of the goods. The posture of the goods can still be determined without the need for a 3D camera, which saves the unmanned truck the trouble of determining the posture of the goods. cost.
附图说明Description of the drawings
图1是本申请实施例方案涉及的硬件运行环境的基于2d相机获取货物位姿设备的结构示意图;Figure 1 is a schematic structural diagram of a device for acquiring cargo pose based on a 2D camera in the hardware operating environment involved in the embodiment of the present application;
图2为本申请基于2d相机获取货物位姿方法第一实施例的流程示意图;Figure 2 is a schematic flowchart of the first embodiment of the method for obtaining the pose of goods based on a 2D camera according to this application;
图3为本申请基于2d相机获取货物位姿方法一实施例的二维码示意图;Figure 3 is a schematic diagram of a QR code according to one embodiment of the method for obtaining the pose of goods based on a 2D camera;
图4为本申请基于2d相机获取货物位姿方法第二实施例的流程示意图;Figure 4 is a schematic flowchart of the second embodiment of the method for obtaining the pose of goods based on a 2D camera in this application;
图5为本申请基于2d相机获取货物位姿装置第一实施例的结构框图。Figure 5 is a structural block diagram of the first embodiment of the device for obtaining the position and orientation of goods based on a 2D camera in this application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings.
本发明的实施方式Embodiments of the invention
应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
参照图1,图1为本申请实施例方案涉及的硬件运行环境的基于2d相机获取货物位姿设备结构示意图。Referring to Figure 1, Figure 1 is a schematic structural diagram of a device for acquiring cargo pose based on a 2D camera in the hardware operating environment involved in the embodiment of the present application.
如图1所示,该基于2d相机获取货物位姿设备可以包括:处理器1001,例如中央处理器(Central Processing Unit,CPU),通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),在一实施例中,用户接口1003还可以包括标准的有线接口、无线接口。在一实施例中,网络接口1004可以包括标准的有线接口、无线接口(如无线保真(Wireless-Fidelity,Wi-Fi)接口)。存储器1005可以是高速的随机存取存储器(Random Access Memory,RAM)存储器,也可以是稳定的非易失性存储器(Non-Volatile Memory,NVM),例如磁盘存储器。在一实施例中,存储器1005还可以是独立于前述处理器1001的存储装置。As shown in Figure 1, the device for acquiring cargo pose based on a 2D camera may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize connection communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). In one embodiment, the user interface 1003 may also include a standard wired interface and a wireless interface. In an embodiment, the network interface 1004 may include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. In an embodiment, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
本领域技术人员可以理解,图1中示出的结构并不构成对基于2d相机获取货物位姿设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 1 does not constitute a limitation on the device for acquiring cargo posture based on a 2D camera. It may include more or less components than shown in the figure, or some components may be combined or different. component layout.
如图1所示,作为一种存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及基于2d相机获取货物位姿程序。As shown in Figure 1, memory 1005, which is a storage medium, may include an operating system, a network communication module, a user interface module, and a program for obtaining the posture of goods based on a 2D camera.
在图1所示的基于2d相机获取货物位姿设备中,网络接口1004主要用于与网络服务器进行数据通信;用户接口1003主要用于与用户进行数据交互;本申请基于2d相机获取货物位姿设备中的处理器1001、存储器1005可以设置在基于2d相机获取货物位姿设备中,所述基于2d相机获取货物位姿设备通过处理器1001调用存储器1005中存储的基于2d相机获取货物位姿程序,并执行本申请实施例提供的基于2d相机获取货物位姿方法。In the device for acquiring cargo pose based on a 2D camera shown in Figure 1, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; this application acquires the cargo pose based on a 2D camera The processor 1001 and the memory 1005 in the device can be configured in the device for acquiring the cargo pose based on the 2D camera. The device for acquiring the cargo pose based on the 2D camera calls the program for acquiring the cargo pose based on the 2D camera stored in the memory 1005 through the processor 1001. , and execute the method for obtaining the cargo pose based on the 2D camera provided by the embodiment of this application.
本申请实施例提供了一种基于2d相机获取货物位姿方法,参照图2,图2为本申请一种基于2d相机获取货物位姿方法第一实施例的流程示意图。The embodiment of the present application provides a method for obtaining the posture of goods based on a 2D camera. Refer to Figure 2. Figure 2 is a schematic flow chart of a method of obtaining the posture of goods based on a 2D camera according to the first embodiment of the present application.
本实施例中,所述基于2d相机获取货物位姿方法包括以下步骤:In this embodiment, the method for obtaining the pose of goods based on a 2D camera includes the following steps:
步骤S10:获取货物二维码图像。Step S10: Obtain the QR code image of the goods.
需要说明的是,本实施例的执行主体为货物位姿检测系统,所述货物位姿检测系统设置与无人搬运设备上,其中,无人搬运设备可以为无人叉车,也可以为AGV小车,还可以为无人搬运机器人,甚至可以为其他与无人叉车功能相同或者相似的其他设备,本实施例对此不加以限定,仅仅以无人叉车为例进行说明。It should be noted that the execution subject of this embodiment is a cargo posture detection system. The cargo posture detection system is installed on an unmanned handling equipment. The unmanned handling equipment can be an unmanned forklift or an AGV car. , it can also be an unmanned transport robot, or even other equipment that has the same or similar functions as an unmanned forklift. This embodiment is not limited to this, and is only explained using an unmanned forklift as an example.
可以理解的是,本实施例应用于无人搬运车、无人叉车以及搬运机器人进行货物位姿检测的过程中,货物位姿检测过程的精确度直接影响着货物装卸的过程,而目前在无人工厂中都是通过三维扫描设备例如激光雷达对货物进行三维扫描得到货物的三维点阵模型,但这种方法需要装配大量高精度传感器,成本较高,而且在进行位姿检测时处理的数据量巨大,内存占用量高,容易出现响应时间过长卡顿等情况影响搬运流程,因此本实施例提出一种只需要装配2d相机就可以精确检测位姿的方案,以得到更加经济的位姿检测手段。It can be understood that this embodiment is applied to the process of detecting cargo poses by unmanned trucks, unmanned forklifts, and handling robots. The accuracy of the cargo pose detection process directly affects the process of cargo loading and unloading. In man-made factories, 3D scanning equipment such as lidar is used to 3D scan goods to obtain a 3D lattice model of the goods. However, this method requires the assembly of a large number of high-precision sensors, which is costly and requires a lot of data to be processed during pose detection. The amount of data is huge, the memory usage is high, and the handling process is easily affected by long response times and lags. Therefore, this embodiment proposes a solution that only needs to be equipped with a 2D camera to accurately detect the pose, so as to obtain a more economical pose. testing method.
应当说明的是,货物二维码图像可以通过在无人叉车上的图像采集设备获取,例如:通过拍照的手段,得到图像信息,再将图像定位在二维码上得到二维码图像。It should be noted that the QR code image of the goods can be obtained through the image collection equipment on the unmanned forklift. For example, by taking a photo, the image information is obtained, and then the image is positioned on the QR code to obtain the QR code image.
具体的,货物二维码为固定在货物上的二维码标识,其存储了货物的标识信息,而二维码设置的位置时十分固定的,即二维码中各个位置相对于货物各个位置的相对距离都是固定的,这也为根据二维码位姿确定获取位姿奠定了基础。Specifically, the goods QR code is a QR code identification fixed on the goods, which stores the identification information of the goods, and the position of the QR code is very fixed, that is, each position in the QR code is relative to each position of the goods. The relative distances are fixed, which also lays the foundation for determining the acquisition pose based on the QR code pose.
在本实施例中,无人叉车上设置有补光灯,所述获取货物二维码图像之前,还包括:在检测到货物距离小于预设距离时,控制所述补光灯补充灯光;在所述补光灯补充灯光时,识别货物二维码图像。In this embodiment, a fill light is provided on the unmanned forklift. Before acquiring the QR code image of the goods, the method further includes: when it is detected that the distance of the goods is less than a preset distance, controlling the fill light to supplement the light; When the fill light supplements the light, the QR code image of the goods is recognized.
需要说明的是,本方案中的无人叉车上可以设置有一个普通相机和一个补光灯。在使用过程中,补光灯放置在相机附近,与相机一起固定在无人叉车上,当叉车行驶至货物附件,停止下来后,补光灯会打光,相机开始拍照,从而获取到货物二维码图像。这样可以在更多光线不好的场景下运作,由于本实施例使用的是2D位姿检测技术,光线的影响较大,因此可以使用补光灯进行辅助,以提高位姿检测的准确性。It should be noted that the unmanned forklift in this solution can be equipped with an ordinary camera and a fill light. During use, the fill light is placed near the camera and fixed on the unmanned forklift together with the camera. When the forklift drives to the cargo attachment and stops, the fill light will illuminate and the camera will start taking pictures, thereby obtaining a two-dimensional image of the cargo. code image. This can operate in more scenes with poor lighting. Since this embodiment uses 2D pose detection technology, the impact of light is greater, so a fill light can be used to assist to improve the accuracy of pose detection.
步骤S20:根据所述货物二维码图像确定二维码角点信息。Step S20: Determine the QR code corner information based on the cargo QR code image.
可以理解的是,二维码角点信息可以直接对二维码进行角点识别获取,通过对二维码进行角点识别可以得到二维码中所有的角点位置信息,例如:图3中信息区左上右上左下右下四个角的角点位置。将这些角点的图像以及坐标等相关信息存储为二维码角点信息。It can be understood that the corner point information of the QR code can be obtained directly by performing corner point recognition on the QR code. By performing corner point identification on the QR code, all corner position information in the QR code can be obtained, for example: in Figure 3 The corner positions of the upper left, upper right, lower left, lower right corners of the information area. Store the images and coordinates of these corner points as QR code corner point information.
需要说明的是,虽然角点检测可以识别出每个角点的位置,但无法识别每个角点的身份,因此还需要进一步确定各个二维码角点的身份根据身份方能确定各角点正常摆放情况应当是在什么位置。It should be noted that although corner detection can identify the position of each corner point, it cannot identify the identity of each corner point. Therefore, it is necessary to further determine the identity of each QR code corner point. Only by identifying the identity can each corner point be determined. Where should the normal placement be?
在本实施例中,对所述二维码图像进行自适应阈值分割,得到图像轮廓;根据所述图像轮廓确定二维码角点信息。In this embodiment, adaptive threshold segmentation is performed on the QR code image to obtain an image outline; the QR code corner information is determined based on the image outline.
需要说明的是,由于直接进行角点识别误差可能会很大,因此可以对维码图像进行自适应阈值分割,即将彩色图像转换为黑白图像,从而可以确定黑白的边界即图像轮廓,根据图像轮廓进行角点识别成功率将大大提高,最终确定二维码角点信息。It should be noted that since the error of direct corner point recognition may be very large, adaptive threshold segmentation can be performed on the QR code image, that is, the color image is converted into a black and white image, so that the black and white boundary, that is, the image outline, can be determined. According to the image outline The success rate of corner point identification will be greatly improved, and the corner information of the QR code will be finally determined.
步骤S30:根据所述二维码角点信息和预设标定参数确定所述货物二维码图像对应的三维空间坐标。Step S30: Determine the three-dimensional space coordinates corresponding to the cargo QR code image based on the QR code corner information and preset calibration parameters.
可以理解的是,根据二维码角点信息可以判断此时无人叉车是否正对着货物,再调整无人叉车位置让货物处于一个理想的相对位置,例如:通过图3中4个信息区角点判断所连起来图形是否为正方形判断方向是否正确,再根据正方形大小判断距离是否正确,当方向和距离均为理想状态时,根据预设标定参数对各信息区角点进行换算以确定各角点的三维坐标即可。It is understandable that based on the QR code corner information, it can be judged whether the unmanned forklift is facing the goods at this time, and then the position of the unmanned forklift can be adjusted so that the goods are in an ideal relative position, for example: through the 4 information areas in Figure 3 The corner points determine whether the connected graphics are squares, determine whether the direction is correct, and then determine whether the distance is correct based on the size of the square. When the direction and distance are both ideal, the corner points of each information area are converted according to the preset calibration parameters to determine each The three-dimensional coordinates of the corner points are enough.
其中,预设标定参数可以为内部标定参数和外部标定参数,内部标定参数用于确定图像中各个点在相机坐标系下的准确位置,外部标定参数用于将相机坐标系下的坐标转换为以无人叉车为参考系的空间坐标。Among them, the preset calibration parameters can be internal calibration parameters and external calibration parameters. The internal calibration parameters are used to determine the accurate position of each point in the image in the camera coordinate system, and the external calibration parameters are used to convert the coordinates in the camera coordinate system into The unmanned forklift is the spatial coordinate of the reference system.
步骤S40:根据所述二维码三维空间坐标确定货物位姿。Step S40: Determine the posture of the goods according to the three-dimensional spatial coordinates of the QR code.
可以理解的是,由于二维码与整个货物的相对位置固定,因此得到了二维码的三维空间坐标后,可以根据原始二维码三维空间坐标与货物三维空间坐标的位置关系,推算出来此时货物三维空间坐标从而得到货物的三维空间坐标以确定位姿。It can be understood that since the relative position of the QR code and the entire cargo is fixed, after obtaining the three-dimensional space coordinates of the QR code, this can be calculated based on the positional relationship between the three-dimensional space coordinates of the original QR code and the three-dimensional space coordinates of the cargo. The three-dimensional space coordinates of the cargo are obtained to determine the posture.
本实施例获取货物二维码图像;根据所述货物二维码图像确定二维码角点信息;根据所述二维码角点信息和预设标定参数确定所述货物二维码图像对应的三维空间坐标;根据所述二维码三维空间坐标确定货物位姿。通过上述方式,使用标定信息将二维码中平面的点位转换为三维空间中的点位,由于二维码是设置在货物固定的位置上,二维码中的点位与货物的相对位置和姿态都是固定的,因此可以只需要二维码就可以实现货物三维姿态的定位,在不需要3D摄像机的情况下依然可以确定货物位姿,节约了无人搬运车对货物位姿确定的成本。This embodiment obtains the QR code image of the goods; determines the QR code corner information based on the QR code image of the goods; determines the corresponding QR code image of the goods based on the QR code corner information and preset calibration parameters. Three-dimensional space coordinates; determine the posture of the cargo according to the three-dimensional space coordinates of the QR code. Through the above method, the calibration information is used to convert the points in the plane of the QR code into points in the three-dimensional space. Since the QR code is set at a fixed position of the goods, the relative position of the points in the QR code and the goods is and posture are fixed, so only the QR code can be used to locate the three-dimensional posture of the goods. The posture of the goods can still be determined without the need for a 3D camera, which saves the unmanned truck the trouble of determining the posture of the goods. cost.
参考图4,图4为本申请一种基于2d相机获取货物位姿方法第二实施例的流程示意图。Referring to Figure 4, Figure 4 is a schematic flowchart of a second embodiment of a method for obtaining the pose of goods based on a 2D camera according to the present application.
基于上述第一实施例,本实施例基于2d相机获取货物位姿方法在所述步骤S30,还包括:Based on the above-mentioned first embodiment, in this embodiment, the method of obtaining the pose of the goods based on the 2D camera also includes:
步骤S31:获取标准角点信息。Step S31: Obtain standard corner point information.
需要说明的是,标准角点信息可以进行标定时二维码中各角点所在的位置,也可以是其他用于确定当前检测到的角点与标准角点位置之间偏差的角点信息。例如:例如图3中信息区四个角的角点坐标为(2,2)(-2,1)(-2,-1)(2,-2)而标准角点坐标为(2,2)(-2,2)(-2,-2)(2,-2),即可以确定货物并非正对着叉车而是向右偏转的,这是因为,两个角点之间的长度距离图像采集设备越远在图像中显示的长度就越短,因此可以根据4个角点根据标准角点与二维码角点进行比对得到,当前二维码的位姿相比于标准二维码的位姿产生了多少偏差,从而推出当前二维码的位姿。It should be noted that the standard corner point information can be the location of each corner point in the QR code during calibration, or other corner point information used to determine the deviation between the currently detected corner point and the standard corner point position. For example: For example, the corner coordinates of the four corners of the information area in Figure 3 are (2, 2) (-2, 1) (-2, -1) (2, -2) and the standard corner coordinates are (2, 2 ) (-2, 2) (-2, -2) (2, -2), that is, it is determined that the goods are not facing the forklift but deflected to the right. This is because the length distance between the two corner points The farther the image acquisition device is, the shorter the length displayed in the image. Therefore, it can be obtained by comparing the standard corner points and the QR code corner points based on the 4 corner points. The pose of the current QR code is compared with the standard 2D code. How much deviation has occurred in the pose of the code, thereby inferring the pose of the current QR code.
步骤S32:根据所述二维码角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。Step S32: Determine the three-dimensional spatial coordinates of the two-dimensional code based on the two-dimensional code corner information, the standard corner information and preset calibration parameters.
可以理解的是,根据所述二维码角点信息对比标准角点信息,即可知道位姿偏移标准位姿的程度,再结合预设标定参数进行像素坐标与实际空间坐标的换算即可确定二维码的三维空间坐标。It can be understood that by comparing the QR code corner point information with the standard corner point information, the degree of deviation of the posture from the standard posture can be known, and then the conversion of pixel coordinates and actual space coordinates can be performed in combination with the preset calibration parameters. Determine the three-dimensional coordinates of the QR code.
在本实施例中,根据所述二维码角点信息确定所述信息区角点以及定位信息;根据所述信息区角点以及标准角点信息确定二维码的单应性矩阵;根据所述单应性矩阵以及标准角点信息确定定位区角点信息;根据所述定位区角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。In this embodiment, the information area corner point and positioning information are determined based on the QR code corner point information; the homography matrix of the QR code is determined based on the information area corner point and standard corner point information; The homography matrix and standard corner point information determine the corner point information of the positioning area; the three-dimensional space coordinates of the two-dimensional code are determined according to the corner point information of the positioning area, the standard corner point information and the preset calibration parameters.
需要说明的是,虽然角点检测可以识别出每个角点的位置,但无法识别每个角点的身份,因此这一过程本实施例实际上是先对信息区的二维码进行识别确定货物ID的同时确定二维码在图像中的位置,依据信息区的位置确定4个信息区的二维码角点。It should be noted that although corner point detection can identify the position of each corner point, it cannot identify the identity of each corner point. Therefore, in this process, this embodiment actually first identifies and determines the QR code in the information area. The position of the QR code in the image is determined at the same time as the goods ID, and the QR code corners of the four information areas are determined based on the position of the information area.
可以理解的是,其中单应性矩阵用于体现空间中同一平面的在任意不同拍摄角度下两幅图像的关联性,如图3所示,可以先阵通过相机照片上的信息区角点与标准角点信息中的标准信息区角点来确定单应性矩阵,以获得标准图像下二维码图像与当前图像下二维码图像的空间关系;再根据所述单应性矩阵和标准图像下的定位区角点,来初步确定当前图像下的定位区角点的大致位置,然后用对这些定位去角点的大致位置筛选出定位区角点,由此可获取精确的定位区角点信息。It can be understood that the homography matrix is used to reflect the correlation between two images on the same plane in space at any different shooting angles. As shown in Figure 3, the corner points of the information area on the camera photo can be first arrayed with The homography matrix is determined by using the standard information area corners in the standard corner point information to obtain the spatial relationship between the QR code image under the standard image and the QR code image under the current image; and then based on the homography matrix and the standard image Use the corner points of the positioning area under the current image to initially determine the approximate position of the corner points of the positioning area under the current image, and then use the approximate positions of these positioning area corner points to filter out the corner points of the positioning area, so that the accurate corner points of the positioning area can be obtained information.
在本实施例中,根据所述定位区角点信息确定多个定位区角点以及定位区角点对应的标号;根据所述标准角点信息确定多个标准定位区角点以及标准定位区角点对应的标号;根据所述定位区角点对应的标号和标准定位区角点对应的标号确定所述定位区角点和标准定位区角点的对应关系;根据所述对应关系和预设标定参数确定二维码的三维空间坐标。In this embodiment, multiple positioning area corner points and corresponding labels of the positioning area corner points are determined based on the positioning area corner point information; multiple standard positioning area corner points and standard positioning area corner points are determined based on the standard corner point information. The corresponding label of the point; determine the corresponding relationship between the corner point of the positioning area and the corner point of the standard positioning area according to the label corresponding to the corner point of the positioning area and the label corresponding to the corner point of the standard positioning area; according to the corresponding relationship and the preset calibration The parameters determine the three-dimensional coordinates of the QR code.
可以理解的是,如图3所示,二维码分为了定位区和信息区,一般来说通过定位区角点与标准角点进行比对即可推算出货物位姿,但实际上仅仅根据4个点进行推算精度十分有限,因此本实施例提出一种精度更加高的优选方案,如下:根据这个四个信息区角点与标准角点信息求得单应性矩阵,然后根据单应性矩阵求得图像上黑白相间部分的角点(定位区角点),可见图3中有44个信息区角点,该角点精度高,角点个数多。然后根据相机内参和外参求得该角点的三维坐标。通过三维坐标求得二维码的位置和姿态。根据单应性矩阵获取信息区角点的逻辑即在于以信息区角点为基准推算出哪些角点是定位区角点,以免无用的角点混入推算过程,并未每个信息区角点进行标号,再与标准角点信息中对应标号的角点进行比对,实际逻辑与信息区角点的推算过程一致,只不过定位区角点更多,定位区角点所覆盖的范围更广,因此精度更高,本实施例对此不加以赘述。It can be understood that, as shown in Figure 3, the QR code is divided into a positioning area and an information area. Generally speaking, the position and posture of the goods can be calculated by comparing the corner points of the positioning area with the standard corner points. However, in fact, it is only based on The calculation accuracy of 4 points is very limited, so this embodiment proposes an optimal solution with higher accuracy, as follows: Obtain the homography matrix based on the corner points of the four information areas and the standard corner point information, and then calculate the homography matrix based on the homography The matrix obtains the corner points of the black and white part of the image (corner points of the positioning area). It can be seen that there are 44 corner points of the information area in Figure 3. The corner points have high accuracy and a large number of corner points. Then the three-dimensional coordinates of the corner point are obtained based on the internal and external parameters of the camera. The position and attitude of the QR code are obtained through three-dimensional coordinates. The logic of obtaining the corner points of the information area based on the homography matrix is to use the corner points of the information area as the basis to calculate which corners are the corner points of the positioning area, so as to avoid useless corner points from being mixed into the calculation process, and each information area corner point is not processed label, and then compare it with the corner point corresponding to the label in the standard corner point information. The actual logic is consistent with the calculation process of corner points in the information area, except that there are more corner points in the positioning area, and the corner points in the positioning area cover a wider range. Therefore, the accuracy is higher, which will not be described in detail in this embodiment.
在本实施例中,根据所述对应关系确定各定位区角点与标准定位区角点的相对位置关系;根据所述相对位置关系和预设标定参数确定各定位区角点的实际空间位置;根据所述各定位区角点的实际空间位置确定二维码的三维空间坐标。In this embodiment, the relative positional relationship between the corner points of each positioning area and the corner points of the standard positioning area is determined according to the corresponding relationship; the actual spatial position of the corner points of each positioning area is determined according to the relative positional relationship and the preset calibration parameters; The three-dimensional spatial coordinates of the two-dimensional code are determined according to the actual spatial positions of the corner points of each positioning area.
应当说明的是,根据所述对应关系确定各定位区角点与标准定位区角点的相对位置关系,例如:假定图3中每个位置定位区角点都有对应标号分别为N1~N44,然后标准角点信息中对应的标准的信息区角点也有对应的编号为N1~N44,将相同的标号的角点进行匹配确定每对角点相对位置关系,从而推算出标准二维码与当前二维码的位姿关系,从而根据标准二维码中各角点的三维坐标推算出当前二维码各角点的三维坐标。It should be noted that the relative positional relationship between the corner points of each positioning area and the corner points of the standard positioning area is determined based on the corresponding relationship. For example: assuming that each corner point of the positioning area in Figure 3 has a corresponding label, respectively, N1~N44, Then the corresponding standard information area corner points in the standard corner point information also have corresponding numbers N1~N44. The corner points with the same label are matched to determine the relative position relationship of each pair of corner points, thereby deducing the standard QR code and the current The pose relationship of the QR code can be used to calculate the three-dimensional coordinates of each corner point of the current QR code based on the three-dimensional coordinates of each corner point in the standard QR code.
在具体实现中,本实施例提出一种优选的实现方式,例如:将二维码固定到货物上,二维码的位置与货物的位置固定,已知二维码的位置姿态即已知货物的位置姿态。所以这里求的是二维码的位置姿态。对相机获取到的图像进行处理,自适应阈值分割得到二值图,轮廓提取,获取四边形轮廓,图像上的黑白进行解码,得到二维码的ID以及二维码的四个角点,如图3所示。根据这个四个角点与原始图像角点求得单应性矩阵,然后根据单应性矩阵求得图像上黑白相间部分的角点,该角点精度高,角点个数多。然后根据相机内参和外参求得该角点的三维坐标,通过三维坐标求得二维码的位置和姿态。In specific implementation, this embodiment proposes a preferred implementation method, for example: fixing the QR code to the goods, fixing the position of the QR code to the position of the goods, and knowing the position and posture of the QR code means knowing the goods. position posture. So what we are looking for here is the position and posture of the QR code. Process the image acquired by the camera, perform adaptive threshold segmentation to obtain a binary image, extract the contour, obtain the quadrilateral outline, decode the black and white on the image, and obtain the ID of the QR code and the four corner points of the QR code, as shown in the figure 3 shown. The homography matrix is obtained based on these four corner points and the original image corner points, and then the corner points of the black and white part of the image are obtained based on the homography matrix. The corner points have high accuracy and a large number of corner points. Then the three-dimensional coordinates of the corner point are obtained based on the internal and external parameters of the camera, and the position and attitude of the QR code are obtained through the three-dimensional coordinates.
本实施例获取标准角点信息;根据所述二维码角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。通过上述方法,引入标准角点让无人叉车在不调整自身位姿的情况下,也可以检测出货物的位姿,提高了货物位姿检测的灵活性。This embodiment obtains standard corner point information; determines the three-dimensional space coordinates of the two-dimensional code based on the two-dimensional code corner information, the standard corner point information and preset calibration parameters. Through the above method, standard corner points are introduced so that the unmanned forklift can detect the posture of the cargo without adjusting its own posture, which improves the flexibility of cargo posture detection.
此外,本申请实施例还提出一种存储介质,所述存储介质上存储有基于2d相机获取货物位姿程序,所述基于2d相机获取货物位姿程序被处理器执行时实现如上文所述的基于2d相机获取货物位姿方法的步骤。In addition, embodiments of the present application also propose a storage medium on which is stored a program for acquiring cargo poses based on a 2D camera. When the program for acquiring cargo poses based on a 2D camera is executed by a processor, the above-mentioned steps are implemented. Steps of obtaining cargo pose based on 2D camera.
参照图5,图5为本申请基于2d相机获取货物位姿装置第一实施例的结构框图。Referring to Figure 5, Figure 5 is a structural block diagram of a first embodiment of a device for obtaining the position and orientation of goods based on a 2D camera according to the present application.
如图5所示,本申请实施例提出的基于2d相机获取货物位姿装置包括:As shown in Figure 5, the device for obtaining the pose of goods based on a 2D camera proposed in the embodiment of this application includes:
获取模块10,用于获取货物二维码图像;The acquisition module 10 is used to acquire the QR code image of the goods;
处理模块20,用于根据所述货物二维码图像确定二维码角点信息;The processing module 20 is used to determine the QR code corner information based on the QR code image of the goods;
所述处理模块20,还用于根据所述二维码角点信息和预设标定参数确定二维码三维空间坐标;The processing module 20 is also used to determine the three-dimensional spatial coordinates of the QR code based on the QR code corner information and preset calibration parameters;
所述处理模块20,还用于根据所述二维码三维空间坐标确定货物位姿。The processing module 20 is also used to determine the position and orientation of the goods according to the three-dimensional spatial coordinates of the two-dimensional code.
在一实施例中,所述处理模块20,还用于获取标准角点信息;In one embodiment, the processing module 20 is also used to obtain standard corner point information;
根据所述二维码角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。The three-dimensional space coordinates of the two-dimensional code are determined according to the two-dimensional code corner information, the standard corner information and the preset calibration parameters.
在一实施例中,所述处理模块20,还用于根据所述二维码角点信息确定所述信息区角点以及定位信息;In one embodiment, the processing module 20 is also used to determine the corner point of the information area and the positioning information based on the corner point information of the QR code;
根据所述信息区角点以及标准角点信息确定二维码的单应性矩阵;Determine the homography matrix of the two-dimensional code based on the corner points of the information area and the standard corner point information;
根据所述单应性矩阵以及标准角点信息确定定位区角点信息;Determine corner point information of the positioning area according to the homography matrix and standard corner point information;
根据所述定位区角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。The three-dimensional space coordinates of the two-dimensional code are determined according to the corner point information of the positioning area, the standard corner point information and the preset calibration parameters.
在一实施例中,所述处理模块20,还用于根据所述定位区角点信息确定多个定位区角点以及定位区角点对应的标号;In one embodiment, the processing module 20 is further configured to determine multiple positioning area corner points and labels corresponding to the positioning area corner points according to the positioning area corner point information;
根据所述标准角点信息确定多个标准定位区角点以及标准定位区角点对应的标号;Determine multiple standard positioning area corner points and labels corresponding to the standard positioning area corner points according to the standard corner point information;
根据所述定位区角点对应的标号和标准定位区角点对应的标号确定所述定位区角点和标准定位区角点的对应关系;Determine the corresponding relationship between the corner points of the positioning area and the corner points of the standard positioning area based on the labels corresponding to the corner points of the positioning area and the labels corresponding to the corner points of the standard positioning area;
根据所述对应关系和预设标定参数确定二维码的三维空间坐标。The three-dimensional spatial coordinates of the two-dimensional code are determined according to the corresponding relationship and the preset calibration parameters.
在一实施例中,所述处理模块20,还用于根据所述对应关系确定各定位区角点与标准定位区角点的相对位置关系;In one embodiment, the processing module 20 is further configured to determine the relative positional relationship between the corner points of each positioning area and the corner points of the standard positioning area according to the corresponding relationship;
根据所述相对位置关系和预设标定参数确定各定位区角点的实际空间位置;Determine the actual spatial position of the corner points of each positioning area according to the relative position relationship and the preset calibration parameters;
根据所述各定位区角点的实际空间位置确定二维码的三维空间坐标。The three-dimensional spatial coordinates of the two-dimensional code are determined according to the actual spatial positions of the corner points of each positioning area.
在一实施例中,所述处理模块20,还用于在检测到货物距离小于预设距离时,控制所述补光灯补充灯光;In one embodiment, the processing module 20 is also used to control the fill light to supplement the light when it is detected that the distance of the goods is less than the preset distance;
在所述补光灯补充灯光时,识别货物二维码图像。When the fill light supplements the light, the QR code image of the goods is recognized.
在一实施例中,所述处理模块20,还用于对所述二维码图像进行自适应阈值分割,得到图像轮廓;In one embodiment, the processing module 20 is also used to perform adaptive threshold segmentation on the QR code image to obtain the image outline;
根据所述图像轮廓确定二维码角点信息。The two-dimensional code corner information is determined according to the image outline.
应当理解的是,以上仅为举例说明,对本申请的技术方案并不构成任何限定,在具体应用中,本领域的技术人员可以根据需要进行设置,本申请对此不做限制。It should be understood that the above are only examples and do not constitute any limitation on the technical solution of the present application. In specific applications, those skilled in the art can make settings as needed, and the present application does not impose any limitations on this.
本实施例获取模块10获取货物二维码图像;处理模块20根据所述货物二维码图像确定二维码角点信息;处理模块20根据所述二维码角点信息和预设标定参数确定所述货物二维码图像对应的三维空间坐标;处理模块20根据所述二维码三维空间坐标确定货物位姿。通过上述方式,使用标定信息将二维码中平面的点位转换为三维空间中的点位,由于二维码是设置在货物固定的位置上,二维码中的点位与货物的相对位置和姿态都是固定的,因此可以只需要二维码就可以实现货物三维姿态的定位,在不需要3D摄像机的情况下依然可以确定货物位姿,节约了无人搬运车对货物位姿确定的成本。In this embodiment, the acquisition module 10 obtains the QR code image of the goods; the processing module 20 determines the QR code corner information based on the QR code image of the goods; the processing module 20 determines the QR code corner information based on the QR code corner information and preset calibration parameters. The three-dimensional space coordinates corresponding to the two-dimensional code image of the goods; the processing module 20 determines the posture of the goods according to the three-dimensional space coordinates of the two-dimensional code. Through the above method, the calibration information is used to convert the points in the plane of the QR code into points in the three-dimensional space. Since the QR code is set at a fixed position of the goods, the relative position of the points in the QR code and the goods is and posture are fixed, so only the QR code can be used to locate the three-dimensional posture of the goods. The posture of the goods can still be determined without the need for a 3D camera, which saves the unmanned truck the trouble of determining the posture of the goods. cost.
需要说明的是,以上所描述的工作流程仅仅是示意性的,并不对本申请的保护范围构成限定,在实际应用中,本领域的技术人员可以根据实际的需要选择其中的部分或者全部来实现本实施例方案的目的,此处不做限制。It should be noted that the workflow described above is only illustrative and does not limit the scope of protection of the present application. In practical applications, those skilled in the art can select part or all of it for implementation according to actual needs. The purpose of this embodiment is not limited here.
另外,未在本实施例中详尽描述的技术细节,可参见本申请任意实施例所提供的基于2d相机获取货物位姿方法,此处不再赘述。In addition, for technical details that are not described in detail in this embodiment, please refer to the method for obtaining cargo pose based on a 2D camera provided in any embodiment of this application, and will not be described again here.
此外,需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。Furthermore, it should be noted that, as used herein, the terms "include", "comprises" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or system that includes a list of elements includes not only those elements, but also other elements not expressly listed or elements inherent to the process, method, article or system. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器(Read Only Memory,ROM)/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology. The computer software product is stored in a storage medium (such as a read-only memory). , ROM)/RAM, magnetic disk, optical disk), including several instructions to cause a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of the present application may be directly or indirectly used in other related technical fields. , are all equally included in the patent protection scope of this application.

Claims (10)

  1. 一种基于2d相机获取货物位姿方法,其中,货物二维码设置在货物的固定位置上,所述基于2d相机获取货物位姿方法包括:A method of obtaining the posture of goods based on a 2D camera, in which the QR code of the goods is set at a fixed position of the goods. The method of obtaining the posture of the goods based on a 2D camera includes:
    获取货物二维码图像;Obtain the QR code image of the goods;
    根据所述货物二维码图像确定二维码角点信息;Determine the QR code corner information based on the cargo QR code image;
    根据所述二维码角点信息和预设标定参数确定所述货物二维码图像对应的三维空间坐标;Determine the three-dimensional space coordinates corresponding to the cargo QR code image based on the QR code corner information and preset calibration parameters;
    根据所述二维码三维空间坐标确定货物位姿。The position and orientation of the goods are determined according to the three-dimensional spatial coordinates of the two-dimensional code.
  2. 如权利要求1所述的方法,其中,所述根据所述二维码角点信息和预设标定参数确定二维码三维空间坐标,包括:The method of claim 1, wherein determining the three-dimensional spatial coordinates of the two-dimensional code based on the two-dimensional code corner information and preset calibration parameters includes:
    获取标准角点信息;Get standard corner point information;
    根据所述二维码角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。The three-dimensional space coordinates of the two-dimensional code are determined according to the two-dimensional code corner information, the standard corner information and the preset calibration parameters.
  3. 如权利要求2所述的方法,其中,二维码图像中设置有信息区和定位区,所述根据所述二维码角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标,包括:The method of claim 2, wherein the two-dimensional code image is provided with an information area and a positioning area, and the two-dimensional code is determined based on the two-dimensional code corner information, the standard corner information and preset calibration parameters. The three-dimensional space coordinates of the code include:
    根据所述二维码角点信息确定所述信息区角点以及定位信息;Determine the corner point of the information area and positioning information based on the QR code corner point information;
    根据所述信息区角点以及标准角点信息确定二维码的单应性矩阵;Determine the homography matrix of the two-dimensional code based on the corner points of the information area and the standard corner point information;
    根据所述单应性矩阵以及标准角点信息确定定位区角点信息;Determine corner point information of the positioning area according to the homography matrix and standard corner point information;
    根据所述定位区角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标。The three-dimensional space coordinates of the two-dimensional code are determined according to the corner point information of the positioning area, the standard corner point information and the preset calibration parameters.
  4. 如权利要求3所述的方法,其中,所述根据所述定位区角点信息、所述标准角点信息以及预设标定参数确定二维码的三维空间坐标,包括:The method of claim 3, wherein determining the three-dimensional spatial coordinates of the two-dimensional code based on the corner point information of the positioning area, the standard corner point information and preset calibration parameters includes:
    根据所述定位区角点信息确定多个定位区角点以及定位区角点对应的标号;Determine multiple positioning area corner points and labels corresponding to the positioning area corner points according to the positioning area corner point information;
    根据所述标准角点信息确定多个标准定位区角点以及标准定位区角点对应的标号;Determine multiple standard positioning area corner points and labels corresponding to the standard positioning area corner points according to the standard corner point information;
    根据所述定位区角点对应的标号和标准定位区角点对应的标号确定所述定位区角点和标准定位区角点的对应关系;Determine the corresponding relationship between the corner points of the positioning area and the corner points of the standard positioning area based on the labels corresponding to the corner points of the positioning area and the labels corresponding to the corner points of the standard positioning area;
    根据所述对应关系和预设标定参数确定二维码的三维空间坐标。The three-dimensional spatial coordinates of the two-dimensional code are determined according to the corresponding relationship and the preset calibration parameters.
  5. 如权利要求4所述的方法,其中,所述根据所述对应关系和预设标定参数确定二维码的三维空间坐标,包括:The method of claim 4, wherein determining the three-dimensional spatial coordinates of the two-dimensional code according to the corresponding relationship and preset calibration parameters includes:
    根据所述对应关系确定各定位区角点与标准定位区角点的相对位置关系;Determine the relative positional relationship between the corner points of each positioning area and the corner points of the standard positioning area according to the corresponding relationship;
    根据所述相对位置关系和预设标定参数确定各定位区角点的实际空间位置;Determine the actual spatial position of the corner points of each positioning area according to the relative position relationship and the preset calibration parameters;
    根据所述各定位区角点的实际空间位置确定二维码的三维空间坐标。The three-dimensional spatial coordinates of the two-dimensional code are determined according to the actual spatial positions of the corner points of each positioning area.
  6. 如权利要求1~5中任一项所述的方法,其中,无人叉车上设置有补光灯,所述获取货物二维码图像之前,还包括:The method according to any one of claims 1 to 5, wherein the unmanned forklift is provided with a fill light, and before obtaining the QR code image of the goods, it also includes:
    在检测到货物距离小于预设距离时,控制所述补光灯补充灯光;When it is detected that the distance of the goods is less than the preset distance, control the fill light to supplement the light;
    在所述补光灯补充灯光时,识别货物二维码图像。When the fill light supplements the light, the QR code image of the goods is recognized.
  7. 如权利要求1~5中任一项所述的方法,其中,所述根据所述货物二维码图像确定二维码角点信息,包括:The method according to any one of claims 1 to 5, wherein determining the QR code corner information based on the cargo QR code image includes:
    对所述二维码图像进行自适应阈值分割,得到图像轮廓;Perform adaptive threshold segmentation on the QR code image to obtain the image outline;
    根据所述图像轮廓确定二维码角点信息。The two-dimensional code corner information is determined according to the image outline.
  8. 一种基于2d相机获取货物位姿装置,其中,所述基于2d相机获取货物位姿装置包括:A device for acquiring cargo pose based on a 2D camera, wherein the device for acquiring cargo pose based on a 2D camera includes:
    获取模块,用于获取货物二维码图像;Acquisition module, used to obtain QR code images of goods;
    处理模块,用于根据所述货物二维码图像确定二维码角点信息;A processing module configured to determine the QR code corner information based on the QR code image of the goods;
    所述处理模块,还用于根据所述二维码角点信息和预设标定参数确定二维码三维空间坐标;The processing module is also used to determine the three-dimensional spatial coordinates of the QR code based on the QR code corner information and preset calibration parameters;
    所述处理模块,还用于根据所述二维码三维空间坐标确定货物位姿。The processing module is also used to determine the position and orientation of the goods according to the three-dimensional spatial coordinates of the two-dimensional code.
  9. 一种基于2d相机获取货物位姿设备,其中,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于2d相机获取货物位姿程序,所述基于2d相机获取货物位姿程序配置为实现如权利要求1至7中任一项所述的基于2d相机获取货物位姿方法的步骤。A device for acquiring cargo poses based on a 2D camera, wherein the device includes: a memory, a processor, and a program for acquiring cargo poses based on a 2D camera that is stored on the memory and can run on the processor, the The program for acquiring the cargo pose based on the 2D camera is configured to implement the steps of the method for acquiring the cargo pose based on the 2D camera as described in any one of claims 1 to 7.
  10. 一种存储介质,其中,所述存储介质上存储有基于2d相机获取货物位姿程序,所述基于2d相机获取货物位姿程序被处理器执行时实现如权利要求1至7任一项所述的基于2d相机获取货物位姿方法的步骤。A storage medium, wherein a program for acquiring cargo poses based on a 2D camera is stored on the storage medium, and when the program for acquiring cargo poses based on a 2D camera is executed by a processor, the implementation is as described in any one of claims 1 to 7 The steps of obtaining the cargo pose based on 2D camera.
PCT/CN2022/133338 2022-05-06 2022-11-21 Method and apparatus for obtaining goods pose based on 2d camera, device, and storage medium WO2023213070A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210486489.2 2022-05-06
CN202210486489.2A CN115062737A (en) 2022-05-06 2022-05-06 Method, device and equipment for acquiring cargo pose based on 2d camera and storage medium

Publications (1)

Publication Number Publication Date
WO2023213070A1 true WO2023213070A1 (en) 2023-11-09

Family

ID=83196813

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/133338 WO2023213070A1 (en) 2022-05-06 2022-11-21 Method and apparatus for obtaining goods pose based on 2d camera, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115062737A (en)
WO (1) WO2023213070A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115062737A (en) * 2022-05-06 2022-09-16 劢微机器人科技(深圳)有限公司 Method, device and equipment for acquiring cargo pose based on 2d camera and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121332A (en) * 2016-11-28 2018-06-05 沈阳新松机器人自动化股份有限公司 Indoor mobile robot positioner and method based on Quick Response Code
CN111179427A (en) * 2019-12-24 2020-05-19 深圳市优必选科技股份有限公司 Autonomous mobile device, control method thereof, and computer-readable storage medium
CN112766008A (en) * 2021-01-07 2021-05-07 南京邮电大学 Object space pose acquisition method based on two-dimensional code
CN115062737A (en) * 2022-05-06 2022-09-16 劢微机器人科技(深圳)有限公司 Method, device and equipment for acquiring cargo pose based on 2d camera and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121332A (en) * 2016-11-28 2018-06-05 沈阳新松机器人自动化股份有限公司 Indoor mobile robot positioner and method based on Quick Response Code
CN111179427A (en) * 2019-12-24 2020-05-19 深圳市优必选科技股份有限公司 Autonomous mobile device, control method thereof, and computer-readable storage medium
CN112766008A (en) * 2021-01-07 2021-05-07 南京邮电大学 Object space pose acquisition method based on two-dimensional code
CN115062737A (en) * 2022-05-06 2022-09-16 劢微机器人科技(深圳)有限公司 Method, device and equipment for acquiring cargo pose based on 2d camera and storage medium

Also Published As

Publication number Publication date
CN115062737A (en) 2022-09-16

Similar Documents

Publication Publication Date Title
CN113657224B (en) Method, device and equipment for determining object state in vehicle-road coordination
WO2016199366A1 (en) Dimension measurement device and dimension measurement method
KR101095579B1 (en) A method for positioning and orienting of a pallet based on monocular vision
CN106779518B (en) Method and device for centralized delivery of goods
CN111627075B (en) Camera external parameter calibration method, system, terminal and medium based on aruco code
CN114494453A (en) Automatic loading and unloading method and automatic loading and unloading system based on radar and camera
WO2023213070A1 (en) Method and apparatus for obtaining goods pose based on 2d camera, device, and storage medium
CN111767780A (en) AI and vision combined intelligent hub positioning method and system
Wang et al. Autonomous landing of multi-rotors UAV with monocular gimbaled camera on moving vehicle
US11762394B2 (en) Position detection apparatus, position detection system, remote control apparatus, remote control system, position detection method, and program
CN112378333A (en) Method and device for measuring warehoused goods
CN115546300A (en) Method and device for identifying pose of tray placed tightly, computer equipment and medium
US20200074676A1 (en) Management system, storage medium, position calculation method, and management apparatus
US11430129B2 (en) Methods for unit load device (ULD) localization
JP2013532451A (en) Method and apparatus for locating an object in a warehouse
US11666948B2 (en) Projection instruction device, parcel sorting system, and projection instruction method
CN114758163B (en) Forklift movement control method and device, electronic equipment and storage medium
Varga et al. Improved autonomous load handling with stereo cameras
CN115187769A (en) Positioning method and device
CN113850100A (en) Method and device for correcting two-dimensional code
CN110837747B (en) Authentication method, device, equipment and storage medium for two-dimension code
CN112749591B (en) Storage logistics robot and article identification method and chip thereof
CN114043531B (en) Table tilt angle determination, use method, apparatus, robot, and storage medium
CN114723821A (en) Checkerboard label-based robot indoor positioning method and device
CN114723822A (en) Robot indoor positioning method and device based on bar code label

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22940764

Country of ref document: EP

Kind code of ref document: A1