Movatterモバイル変換


[0]ホーム

URL:


CN109631764B - Dimensional measurement system and method based on RealSense camera - Google Patents

Dimensional measurement system and method based on RealSense camera
Download PDF

Info

Publication number
CN109631764B
CN109631764BCN201811400371.3ACN201811400371ACN109631764BCN 109631764 BCN109631764 BCN 109631764BCN 201811400371 ACN201811400371 ACN 201811400371ACN 109631764 BCN109631764 BCN 109631764B
Authority
CN
China
Prior art keywords
camera
point cloud
measurement
cloud data
realsense
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201811400371.3A
Other languages
Chinese (zh)
Other versions
CN109631764A (en
Inventor
秦文翔
郭玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
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 Nanjing University of Science and TechnologyfiledCriticalNanjing University of Science and Technology
Priority to CN201811400371.3ApriorityCriticalpatent/CN109631764B/en
Publication of CN109631764ApublicationCriticalpatent/CN109631764A/en
Application grantedgrantedCritical
Publication of CN109631764BpublicationCriticalpatent/CN109631764B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种基于RealSense相机的尺寸测量系统及方法,测量系统包括投影仪、RealSense相机、数据处理模块和测量平台;RealSense相机和投影仪通过支架设置在测量平台上方,被测物品放置在测量平台上,投影仪在测量平台上投影出的标定图案,用于对RealSense相机进行位姿标定,RealSense相机采集测量平台上的被测物品图像,并发送给数据处理模块,数据处理模块求取被测物品的最小包装尺寸。本发明能够快速测量物品最小包装尺寸,适应更高速的流水作业,具有较高的测量精度。

Figure 201811400371

The invention discloses a size measurement system and method based on RealSense camera. The measurement system includes a projector, a RealSense camera, a data processing module and a measurement platform; the RealSense camera and the projector are arranged above the measurement platform through a bracket, and the object to be measured is placed on On the measuring platform, the calibration pattern projected by the projector on the measuring platform is used to calibrate the pose of the RealSense camera. The RealSense camera collects the image of the object to be measured on the measuring platform and sends it to the data processing module. The smallest package size of the item being tested. The invention can quickly measure the minimum package size of articles, adapt to higher-speed flow operations, and has higher measurement accuracy.

Figure 201811400371

Description

Translated fromChinese
基于RealSense相机的尺寸测量系统及方法Dimensional measurement system and method based on RealSense camera

技术领域technical field

本发明涉及应用立体视觉的测量领域,具体涉及一种基于RealSense相机的尺寸测量系统及方法。The invention relates to the field of measurement using stereo vision, in particular to a size measurement system and method based on a RealSense camera.

背景技术Background technique

在现代化的消费背景下,物流行业的地位举足轻重,物流的运转效率直接影响到整个产业链系统的效率。近几年,随着经济的进一步发展、互联网电子商务的崛起和消费新模式的出现,物流量呈现迅猛增长的态势,高昂的成本和激增的物流量,对自动化、智能化的物流管理提出了不小的要求。In the context of modern consumption, the status of the logistics industry plays a pivotal role, and the operational efficiency of logistics directly affects the efficiency of the entire industrial chain system. In recent years, with the further development of the economy, the rise of Internet e-commerce and the emergence of new consumption patterns, the logistics flow has shown a trend of rapid growth. Not a small request.

物流行业中时常会涉及到货物的包装,对于大小不一、形状各异的各种各样的货物,物流操作人员通常依靠经验主义,选取包装盒的规格,而造成了包装盒材料的严重浪费。货物包装作为物流的起点,对整个物流过程来说尤为重要。包装测量系统的灵活性直接影响着测量资源的利用效率和适用范围,测量的精度和稳定性直接决定着后续管理的可靠性,测量的速度直接决定着物流运转的效率。一个灵活稳定快速高精的物品最小包装测量系统能够为物流的成本管理优化提供有力的保证。The packaging of goods is often involved in the logistics industry. For a variety of goods of different sizes and shapes, logistics operators usually rely on empiricism to select the specifications of the packaging boxes, resulting in a serious waste of packaging materials. . As the starting point of logistics, cargo packaging is particularly important for the entire logistics process. The flexibility of the packaging measurement system directly affects the utilization efficiency and application scope of measurement resources, the accuracy and stability of measurement directly determine the reliability of subsequent management, and the speed of measurement directly determines the efficiency of logistics operations. A flexible, stable, fast, and high-precision minimum packaging measurement system can provide a strong guarantee for the optimization of logistics cost management.

针对物品尺寸信息的采集,目前已有解决方案所依靠的技术手段主要分(红外)光幕测量、超声波测量、激光测量和立体视觉测量四种。其中光幕测量难以测量不规则物品的尺寸,且操作复杂;超声波测量只能测量规则物品的尺寸,测量非规则品则需借助其他辅助工具完成,操作复杂,对环境要求较高;激光测量能够适用于规则及不规则物品,但需要依赖高价位的工业传感器,设备成本高,难以普及利用。For the collection of item size information, the technical means that the existing solutions rely on are mainly divided into four types: (infrared) light curtain measurement, ultrasonic measurement, laser measurement and stereo vision measurement. Among them, light curtain measurement is difficult to measure the size of irregular items, and the operation is complicated; ultrasonic measurement can only measure the size of regular items, and measurement of irregular items needs to be completed with the help of other auxiliary tools, which is complicated to operate and requires high environmental requirements; laser measurement can It is suitable for regular and irregular items, but it needs to rely on high-priced industrial sensors, and the equipment cost is high, which is difficult to popularize.

综上所述,物流行业急需一个能够有效测量最小包装尺寸,指导包装规格选择的自动化系统;而现有的测量技术,存在复杂度高,环境适应性差,对被测物品的形状要求高,成本高等问题。To sum up, the logistics industry urgently needs an automated system that can effectively measure the minimum packaging size and guide the selection of packaging specifications; however, the existing measurement technology has high complexity, poor environmental adaptability, high requirements on the shape of the tested item, and high cost. higher issues.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种基于RealSense相机的尺寸测量系统及方法,解决现有技术存在的适应性差、造价高昂等问题。The purpose of the present invention is to provide a size measurement system and method based on RealSense camera, so as to solve the problems of poor adaptability and high cost in the prior art.

实现本发明目的的技术方案为:一种基于RealSense相机的尺寸测量系统,包括投影仪、RealSense相机、数据处理模块和测量平台;The technical solution for realizing the object of the present invention is: a size measurement system based on RealSense camera, including projector, RealSense camera, data processing module and measurement platform;

所述RealSense相机和投影仪通过支架设置在测量平台上方,被测物品放置在测量平台上,投影仪在测量平台上投影出的标定图案,用于对RealSense相机进行位姿标定,RealSense相机采集测量平台上的被测物品图像,并发送给数据处理模块,数据处理模块求取被测物品的最小包装尺寸。The RealSense camera and the projector are set above the measuring platform through the bracket, the object to be measured is placed on the measuring platform, and the calibration pattern projected by the projector on the measuring platform is used to calibrate the pose of the RealSense camera, and the RealSense camera collects the measurement The image of the tested item on the platform is sent to the data processing module, and the data processing module obtains the minimum packaging size of the tested item.

一种基于RealSense相机的尺寸测量方法,包括以下步骤:A dimension measurement method based on RealSense camera, including the following steps:

步骤1,使用投影仪在测量平台上投影棋盘格的方式对相机的位姿进行标定,获得相机与测量平台坐标系的单应性矩阵;Step 1, use the projector to project the checkerboard on the measuring platform to calibrate the pose of the camera, and obtain the homography matrix of the coordinate system of the camera and the measuring platform;

步骤2,利用标定结果和RealSense相机固有的内置参数,求得相机相对于测量平台的位姿;Step 2, using the calibration result and the inherent built-in parameters of the RealSense camera to obtain the pose of the camera relative to the measurement platform;

步骤3,利用背景差分算法,从RealSense相机采集的图像深度数据中分割出属于被测物品的部分,并转为点云数据,并利用位姿关系将点云数据从相机坐标系转换到测量平台坐标系;Step 3: Using the background difference algorithm, segment the part belonging to the object under test from the image depth data collected by the RealSense camera, and convert it into point cloud data, and use the pose relationship to convert the point cloud data from the camera coordinate system to the measurement platform. Coordinate System;

步骤4,利用转移后的点云数据的z轴分量获取被测物品的高度尺寸;Step 4, using the z-axis component of the transferred point cloud data to obtain the height dimension of the tested item;

步骤5,将点云数据映射到测量平台所在平面,转为二维点云数据;Step 5, map the point cloud data to the plane where the measurement platform is located, and convert it into two-dimensional point cloud data;

步骤6,对二维点云数据降采样,获得均匀的数据;Step 6, down-sampling the two-dimensional point cloud data to obtain uniform data;

步骤7,将降采样后的二维点云数据平移到坐标轴原点,利用PCA算法获取二维点云数据的主分量方向,并以此为标准,将二维点云数据旋转到与坐标轴对齐的位置;Step 7: Move the downsampled two-dimensional point cloud data to the origin of the coordinate axis, use the PCA algorithm to obtain the principal component direction of the two-dimensional point cloud data, and use this as a standard to rotate the two-dimensional point cloud data to the coordinate axis. aligned position;

步骤8,使用二维点云数据的x轴分量和y轴分量获取被测物品的长度和宽度尺寸。Step 8: Use the x-axis component and the y-axis component of the two-dimensional point cloud data to obtain the length and width dimensions of the object to be tested.

与现有技术相比,本发明的显著优点为:(1)RealSense相机和测量平台的结构关系可以适应不同的测量场景,通过调整支架在一定范围内灵活的变动;(2)使用卡尔曼滤波算法对测量结果预测跟踪,抗噪声能力强,测量系统受到较大的噪声也能保证稳定地测量;(3)能够快速测量尺寸,适应更高速的流水线作业;(4)通过投影仪在测量平台上投影棋盘格的方式对相机的位姿进行标定,消除了以往使用标定板的方式中,由于标定板的厚度,对系统相机与测量平台的位姿关系引入的误差,有效提高测量精度;(5)一旦标定完成,只要相机与测试平台的相对结构不发生改变,就无需重新标定,投影仪可以拿走派为他用,最大化资源利用率;(6)能够有效应对机械结构的老化、人为接触的影响导致机械精度误差,从而导致的测量误差,有效延长系统的使用寿命。Compared with the prior art, the present invention has the following significant advantages: (1) the structural relationship between the RealSense camera and the measurement platform can be adapted to different measurement scenarios, and can be flexibly changed within a certain range by adjusting the bracket; (2) Kalman filter is used The algorithm predicts and tracks the measurement results, with strong anti-noise ability, and the measurement system can ensure stable measurement even if the measurement system is subjected to large noise; (3) it can quickly measure the size and adapt to higher-speed assembly line operations; (4) through the projector on the measurement platform The pose of the camera is calibrated by projecting a checkerboard, which eliminates the error introduced by the thickness of the calibration board and the pose relationship between the system camera and the measurement platform in the previous method of using the calibration board, and effectively improves the measurement accuracy; ( 5) Once the calibration is completed, as long as the relative structure of the camera and the test platform does not change, there is no need to re-calibrate, and the projector can be taken away for other use to maximize resource utilization; (6) It can effectively deal with the aging of the mechanical structure, The influence of human contact leads to mechanical precision error, which leads to measurement error, which effectively prolongs the service life of the system.

附图说明Description of drawings

图1是货物物品最小包装尺寸测量系统的结构示意图。FIG. 1 is a schematic diagram of the structure of a system for measuring the minimum package size of goods.

图2是相机位姿的灵活变换示意图。Figure 2 is a schematic diagram of flexible transformation of camera pose.

图3是相机位姿的标定示意图。Figure 3 is a schematic diagram of camera pose calibration.

图4是相机坐标系和测量平台坐标系示意图。FIG. 4 is a schematic diagram of the camera coordinate system and the measurement platform coordinate system.

图5是物品最小包装尺寸测量的流程示意图。Figure 5 is a schematic flow chart of the measurement of the minimum package size of an item.

图6是配合条码识别装置的流水线作业示意图。FIG. 6 is a schematic diagram of an assembly line working with a barcode identification device.

具体实施方式Detailed ways

针对物流行业中包装规格选择不当,包装耗材浪费严重的问题,本发明设计了一种使用立体视觉,具有灵活稳定快速高精特性的物品最小包装尺寸测量系统,用以为物流行业节省成本,提高效率。Aiming at the problems of improper selection of packaging specifications and serious waste of packaging consumables in the logistics industry, the invention designs a minimum packaging size measurement system for items that uses stereo vision and has the characteristics of flexibility, stability, speed, and high precision to save costs and improve efficiency for the logistics industry. .

如图1、图2所示,一种基于RealSense相机的尺寸测量系统,包括投影仪、RealSense相机、数据处理模块和测量平台;As shown in Figure 1 and Figure 2, a RealSense camera-based dimension measurement system includes a projector, a RealSense camera, a data processing module and a measurement platform;

所述RealSense相机和投影仪通过支架设置于测量平台上方,被测物品放置在测量平台上,投影仪在测量平台上投影出的标定图案,对RealSense相机进行标定,RealSense相机用于采集测量平台上的被测物品图像,并发送给数据处理模块,数据处理模块获取被测物品的最小包装尺寸。The RealSense camera and the projector are set above the measurement platform through the bracket, the object to be measured is placed on the measurement platform, and the calibration pattern projected by the projector on the measurement platform is used to calibrate the RealSense camera, and the RealSense camera is used to collect the measurement platform. The image of the tested item is sent to the data processing module, and the data processing module obtains the minimum packaging size of the tested item.

如图3所示,所述标定图案为棋盘格。As shown in FIG. 3 , the calibration pattern is a checkerboard.

如图4所示,投影仪位于测量平台的正上方,光轴方向垂直于测量平台平面,棋盘格完整地投影在测量平台平面,同时RealSense相机能够完整地拍摄到投影仪投影在测量平台平面上的棋盘格。承载RealSense相机的支架为位置可调节支架。As shown in Figure 4, the projector is located directly above the measuring platform, the optical axis direction is perpendicular to the measuring platform plane, the checkerboard is completely projected on the measuring platform plane, and the RealSense camera can completely capture the projector projected on the measuring platform plane. checkerboard. The stand that carries the RealSense camera is a position-adjustable stand.

如图5所示,本发明还提供一种基于RealSense相机的尺寸测量方法,包括以下步骤:As shown in FIG. 5 , the present invention also provides a size measurement method based on RealSense camera, comprising the following steps:

步骤1,使用投影仪在测量平台上投影棋盘格的方式对相机的位姿进行标定,获得相机与测量平台坐标系的单应性矩阵;Step 1, use the projector to project the checkerboard on the measuring platform to calibrate the pose of the camera, and obtain the homography matrix of the coordinate system of the camera and the measuring platform;

步骤2,利用标定结果和RealSense相机固有的内置参数,求得相机相对于测量平台的位姿;Step 2, using the calibration result and the inherent built-in parameters of the RealSense camera to obtain the pose of the camera relative to the measurement platform;

步骤3,利用背景差分算法,从RealSense相机采集的图像深度数据中分割出属于被测物品的部分,并转为点云数据,并利用位姿关系将点云数据从相机坐标系转换到测量平台坐标系;Step 3: Using the background difference algorithm, segment the part belonging to the object under test from the image depth data collected by the RealSense camera, and convert it into point cloud data, and use the pose relationship to convert the point cloud data from the camera coordinate system to the measurement platform. Coordinate System;

步骤4,利用转移后的点云数据的z轴分量获取被测物品的高度尺寸;Step 4, using the z-axis component of the transferred point cloud data to obtain the height dimension of the tested item;

步骤5,将点云数据映射到测量平台的平面,即x0y平面上,转为二维点云数据;Step 5, map the point cloud data to the plane of the measurement platform, that is, on the x0y plane, and convert it into two-dimensional point cloud data;

步骤6,对二维点云数据降采样,获得均匀的数据;Step 6, down-sampling the two-dimensional point cloud data to obtain uniform data;

步骤7,将降采样后的二维点云数据平移到坐标轴原点,利用PCA算法获取二维点云数据的主分量方向,并以此为标准,将二维点云数据旋转到与坐标轴对齐的位置;Step 7: Move the downsampled two-dimensional point cloud data to the origin of the coordinate axis, use the PCA algorithm to obtain the principal component direction of the two-dimensional point cloud data, and use this as a standard to rotate the two-dimensional point cloud data to the coordinate axis. aligned position;

步骤8,使用二维点云数据的x轴分量和y轴分量获取被测物品的长度和宽度尺寸。Step 8: Use the x-axis component and the y-axis component of the two-dimensional point cloud data to obtain the length and width dimensions of the object to be tested.

对同一物品进行多次测量,运用卡尔曼滤波算法,预测跟踪测量尺寸,使其收敛稳定到尺寸真值。The same item is measured multiple times, and the Kalman filter algorithm is used to predict and track the measurement size, so that it converges and stabilizes to the true value of the size.

进一步的,步骤2中,已知RealSense相机内置参数,结合标定取得的单应性矩阵,求得相机坐标系到测量平台坐标系的转移矩阵

Figure BDA0001876181940000041
其中M为相机的内参,H3和H1分别为标定所得单应性矩阵H的前三列和第四列。Further, instep 2, the built-in parameters of the RealSense camera are known, and the transfer matrix from the camera coordinate system to the measurement platform coordinate system is obtained by combining the homography matrix obtained by calibration.
Figure BDA0001876181940000041
Among them, M is the internal parameter of the camera, and H3 and H1 are the first three columns and the fourth column of the homography matrix H obtained by calibration, respectively.

进一步的,步骤3中,利用背景差分算法,从RealSense相机采集的图像深度数据中分割出属于被测物品的部分,并转为点云数据,矩阵表示形如

Figure BDA0001876181940000042
并利用位姿关系将点云数据从相机坐标系转换到测量平台坐标系,
Figure BDA0001876181940000043
Further, instep 3, the background difference algorithm is used to segment the part belonging to the object under test from the image depth data collected by the RealSense camera, and convert it into point cloud data. The matrix representation is as follows:
Figure BDA0001876181940000042
And use the pose relationship to convert the point cloud data from the camera coordinate system to the measurement platform coordinate system,
Figure BDA0001876181940000043

下面通过实施例对本发明做进一步说明。The present invention will be further illustrated by the following examples.

实施例Example

一种物品最小包装尺寸测量系统,主要包含四个部分,RealSense相机、投影仪、测量平台和PC电脑。RealSense相机和投影仪都通过USB接口与PC电脑相连,PC电脑通过USB控制投影仪,通过USB接收RealSense相机采集的图像数据。当被测物体被放上测量平台,RealSense相机能够迅速采集到视觉图像数据,并传送到PC端,利用PC端的软件算法进行进一步的数据处理,快速测量获得被测物体的包装尺寸。A minimum package size measurement system for items mainly includes four parts, RealSense camera, projector, measurement platform and PC computer. Both the RealSense camera and the projector are connected to the PC through the USB interface. The PC controls the projector through the USB and receives the image data collected by the RealSense camera through the USB. When the object to be measured is placed on the measuring platform, the RealSense camera can quickly collect visual image data and transmit it to the PC. The software algorithm on the PC is used for further data processing, and the packaging size of the object to be measured can be quickly measured.

按功能模块划分,本发明物品最小包装尺寸测量系统分为五个模块,投影仪控制模块、数据采集模块、数据处理模块、相机标定模块和机械承载模块。投影仪控制模块由PC电脑和投影仪组成,用于提供人机交互界面,控制投影仪打出标定所需的棋盘格,数据采集模块由RealSense相机组成,用于采集测量所需的图像深度数据,数据处理模块由PC电脑组成,用于处理RealSense相机传输来的数据,获取被测物品的包装尺寸,相机标定模块由投影仪和RealSense相机组成,用于获取RealSense相机的位姿,以便之后的数据处理;机械承载模块由测量平台和支架组成,测量平台用于承载被测物品和提供标定图案的载体,支架用于安装RealSense相机和投影仪。Divided by functional modules, the minimum package size measurement system of the present invention is divided into five modules, a projector control module, a data acquisition module, a data processing module, a camera calibration module and a mechanical bearing module. The projector control module is composed of a PC computer and a projector, which is used to provide a human-computer interface and control the projector to play the checkerboard required for calibration. The data acquisition module is composed of a RealSense camera, which is used to collect the image depth data required for measurement. The data processing module is composed of a PC computer, which is used to process the data transmitted by the RealSense camera and obtain the packaging size of the tested item. The camera calibration module is composed of a projector and a RealSense camera, and is used to obtain the pose of the RealSense camera for subsequent data. Processing; The mechanical bearing module consists of a measuring platform and a bracket, the measuring platform is used to carry the object to be measured and the carrier that provides the calibration pattern, and the bracket is used to install the RealSense camera and projector.

如图2所示,RealSense相机的位姿可以灵活的变动,每次变化后,只需配合投影仪重新标定一次即可立即再次投入使用。As shown in Figure 2, the pose of the RealSense camera can be flexibly changed. After each change, it can be used again immediately after recalibrating with the projector.

如图3所示,投影仪位于测量平台的正上方,光轴方向垂直于测量平台平面,离测量平台平面的高度可以自由调整,但必须保证棋盘格完整地投影在测量平台平面,同时保证,RealSense相机能够完整地拍摄到投影仪投影在测量平台平面上的棋盘格。As shown in Figure 3, the projector is located directly above the measuring platform, the optical axis direction is perpendicular to the measuring platform plane, and the height from the measuring platform plane can be adjusted freely, but it must be ensured that the checkerboard is completely projected on the measuring platform plane, and at the same time, The RealSense camera captures the full checkerboard projected by the projector on the plane of the measurement platform.

如图4所示,相机坐标系和测量平台坐标系均为直角坐标系。As shown in Figure 4, the camera coordinate system and the measurement platform coordinate system are both rectangular coordinate systems.

相机坐标系以相机光心作为原点,相机光轴作为z轴,并以相机正方向作为z轴正方向,以相机上下方向作为y轴,并以相机下方作为y轴正方向,以相机左右方向作为x轴,并以相机正向方右侧方向作为x轴正方向;The camera coordinate system takes the camera's optical center as the origin, the camera's optical axis as the z-axis, and the camera's positive direction as the z-axis positive direction, the camera's up and down direction as the y-axis, and the camera below as the y-axis positive direction, and the camera's left-right direction As the x-axis, and take the positive direction of the camera as the positive direction of the x-axis;

测量平台坐标系以投影仪投出的棋盘格最左上角点作为原点,以棋盘格矩形两边方向建立x轴和y轴,并作为x轴和y轴的正方向,同时建立测量平台坐标系z轴,以右手坐标系原则确定z轴正方向。The coordinate system of the measuring platform takes the upper left corner of the checkerboard projected by the projector as the origin, establishes the x-axis and the y-axis with the two sides of the checkerboard rectangle, and takes them as the positive directions of the x-axis and the y-axis, and establishes the measuring platform coordinate system z at the same time. The positive direction of the z-axis is determined according to the principle of the right-handed coordinate system.

本发明物品最小包装尺寸测量系统设计了一种物品最小包装尺寸测量方法,方法流程如图5所示,包含以下步骤:The minimum package size measurement system of the present invention designs a method for measuring the minimum package size of an item. The method flow is shown in Figure 5, and includes the following steps:

(1)使用投影仪在测量平台上投影棋盘格的方式对相机的位姿进行标定,获得相机与测量平台坐标系的单应性矩阵H;(1) Use the projector to project the checkerboard on the measuring platform to calibrate the pose of the camera, and obtain the homography matrix H of the coordinate system of the camera and the measuring platform;

(2)利用标定结果和RealSense相机固有的内置参数,求得相机相对于测量平台的位姿,在已知RealSense相机内置参数的情况下,结合标定取得的单应性矩阵,求得相机坐标系到测量平台坐标系的转移矩阵

Figure BDA0001876181940000061
其中M为相机的内参,H3和H1分别为标定所得单应性矩阵H的前三列和第四列;(2) Using the calibration results and the built-in parameters inherent to the RealSense camera, the pose of the camera relative to the measurement platform is obtained. When the built-in parameters of the RealSense camera are known, the camera coordinate system is obtained by combining the homography matrix obtained by calibration. Transfer matrix to measuring platform coordinate system
Figure BDA0001876181940000061
where M is the internal parameter of the camera, and H3 and H1 are the first three columns and the fourth column of the homography matrix H obtained from the calibration, respectively;

(3)利用背景差分算法,从RealSense相机采集的图像深度数据中分割出属于被测物品的部分,并转为点云数据,矩阵表示形如

Figure BDA0001876181940000062
并利用位姿关系将点云数据从相机坐标系转换到测量平台坐标系,
Figure BDA0001876181940000063
(3) Using the background difference algorithm, segment the part belonging to the object under test from the image depth data collected by the RealSense camera, and convert it into point cloud data. The matrix representation is as follows
Figure BDA0001876181940000062
And use the pose relationship to convert the point cloud data from the camera coordinate system to the measurement platform coordinate system,
Figure BDA0001876181940000063

(4)利用转移后的点云数据的z轴分量获取高度尺寸;(4) Utilize the z-axis component of the transferred point cloud data to obtain the height dimension;

(5)将点云数据映射到测量平台的平面,即x0y平面上,转为二维点云数据;(5) Map the point cloud data to the plane of the measurement platform, that is, on the x0y plane, and convert it into two-dimensional point cloud data;

(6)对二维点云数据降采样,获得均匀的数据;(6) Downsampling the two-dimensional point cloud data to obtain uniform data;

(7)将降采样后的二维点云数据平移到坐标轴原点,利用PCA算法获取二维点云数据的主分量方向,并以此为标准,将二维点云数据旋转到与坐标轴对齐的位置。(7) Move the downsampled 2D point cloud data to the origin of the coordinate axis, use the PCA algorithm to obtain the principal component direction of the 2D point cloud data, and use this as a standard to rotate the 2D point cloud data to the coordinate axis aligned position.

(8)使用二维点云数据的x轴分量和y轴分量获取长度和宽度尺寸;(8) Use the x-axis component and the y-axis component of the two-dimensional point cloud data to obtain the length and width dimensions;

(9)在对同一物品的多次测量中,运用卡尔曼滤波算法,预测跟踪测量尺寸,使其收敛稳定到尺寸真值。(9) In the multiple measurements of the same item, the Kalman filter algorithm is used to predict and track the measurement size, so that it converges and stabilizes to the true value of the size.

图6为本发明的一种应用示意图,配合条码识别装置进行流水线作业。FIG. 6 is a schematic diagram of an application of the present invention, which cooperates with a barcode identification device to perform an assembly line operation.

Claims (6)

Translated fromChinese
1.一种基于RealSense相机的尺寸测量方法,其特征在于,包括以下步骤:1. a dimension measuring method based on RealSense camera, is characterized in that, comprises the following steps:步骤1,使用投影仪在测量平台上投影棋盘格的方式对RealSense相机的位姿进行标定,获得相机与测量平台坐标系的单应性矩阵;Step 1, use the projector to project the checkerboard on the measuring platform to calibrate the pose of the RealSense camera, and obtain the homography matrix of the coordinate system of the camera and the measuring platform;步骤2,利用标定结果和RealSense相机固有的内置参数,求得相机相对于测量平台的位姿;Step 2, using the calibration result and the inherent built-in parameters of the RealSense camera to obtain the pose of the camera relative to the measurement platform;步骤3,利用背景差分算法,从RealSense相机采集的图像深度数据中分割出属于被测物品的部分,并转为点云数据,并利用位姿关系将点云数据从相机坐标系转换到测量平台坐标系;Step 3: Using the background difference algorithm, segment the part belonging to the object under test from the image depth data collected by the RealSense camera, and convert it into point cloud data, and use the pose relationship to convert the point cloud data from the camera coordinate system to the measurement platform. Coordinate System;步骤4,利用转移后的点云数据的z轴分量获取被测物品的高度尺寸;Step 4, using the z-axis component of the transferred point cloud data to obtain the height dimension of the tested item;步骤5,将点云数据映射到测量平台所在平面,转为二维点云数据;Step 5, map the point cloud data to the plane where the measurement platform is located, and convert it into two-dimensional point cloud data;步骤6,对二维点云数据降采样,获得均匀的数据;Step 6, down-sampling the two-dimensional point cloud data to obtain uniform data;步骤7,将降采样后的二维点云数据平移到坐标轴原点,利用PCA算法获取二维点云数据的主分量方向,并以此为标准,将二维点云数据旋转到与坐标轴对齐的位置;Step 7: Move the downsampled two-dimensional point cloud data to the origin of the coordinate axis, use the PCA algorithm to obtain the principal component direction of the two-dimensional point cloud data, and use this as a standard to rotate the two-dimensional point cloud data to the coordinate axis. aligned position;步骤8,使用二维点云数据的x轴分量和y轴分量获取被测物品的长度和宽度尺寸。Step 8: Use the x-axis component and the y-axis component of the two-dimensional point cloud data to obtain the length and width dimensions of the object to be tested.2.根据权利要求1所述的基于RealSense相机的尺寸测量方法,其特征在于,对同一物品进行多次测量,运用卡尔曼滤波算法,预测跟踪测量尺寸,使其收敛稳定到尺寸真值。2 . The size measurement method based on a RealSense camera according to claim 1 , wherein the same item is measured multiple times, and a Kalman filter algorithm is used to predict and track the measurement size, so that it converges and stabilizes to the true size value. 3 .3.根据权利要求1所述的基于RealSense相机的尺寸测量方法,其特征在于,步骤2中,已知RealSense相机内置参数,结合标定取得的单应性矩阵,求得相机坐标系到测量平台坐标系的转移矩阵
Figure FDA0002584118670000011
其中M为相机的内参,H3和H1分别为标定所得单应性矩阵H的前三列和第四列。3. The size measurement method based on the RealSense camera according to claim 1, wherein in step 2, the built-in parameters of the RealSense camera are known, and the homography matrix obtained by the calibration is used to obtain the camera coordinate system to the measurement platform coordinate transfer matrix
Figure FDA0002584118670000011
Among them, M is the internal parameter of the camera, and H3 and H1 are the first three columns and the fourth column of the homography matrix H obtained by calibration, respectively.4.根据权利要求3所述的基于RealSense相机的尺寸测量方法,其特征在于,步骤3中,利用背景差分算法,从RealSense相机采集的图像深度数据中分割出属于被测物品的部分,并转为点云数据,矩阵表示形如
Figure FDA0002584118670000012
并利用位姿关系将点云数据从相机坐标系转换到测量平台坐标系,
Figure FDA0002584118670000021
4. The size measurement method based on RealSense camera according to claim 3, is characterized in that, in step 3, utilize the background difference algorithm, segment the part belonging to the object to be measured from the image depth data collected by RealSense camera, and transfer it. is point cloud data, and the matrix representation is in the form of
Figure FDA0002584118670000012
And use the pose relationship to convert the point cloud data from the camera coordinate system to the measurement platform coordinate system,
Figure FDA0002584118670000021
5.根据权利要求1所述的基于RealSense相机的尺寸测量方法,其特征在于,投影仪位于测量平台的正上方,光轴方向垂直于测量平台平面,棋盘格完整地投影在测量平台平面,同时RealSense相机能够完整地拍摄到投影仪投影在测量平台平面上的棋盘格。5. The realSense camera-based dimension measurement method according to claim 1, wherein the projector is located directly above the measurement platform, the optical axis direction is perpendicular to the measurement platform plane, and the checkerboard is completely projected on the measurement platform plane, while the The RealSense camera captures the full checkerboard projected by the projector on the plane of the measurement platform.6.根据权利要求1所述的基于RealSense相机的尺寸测量方法,其特征在于,承载RealSense相机的支架为位置可调节支架。6 . The dimension measurement method based on the RealSense camera according to claim 1 , wherein the bracket carrying the RealSense camera is a bracket with adjustable position. 7 .
CN201811400371.3A2018-11-222018-11-22 Dimensional measurement system and method based on RealSense cameraExpired - Fee RelatedCN109631764B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201811400371.3ACN109631764B (en)2018-11-222018-11-22 Dimensional measurement system and method based on RealSense camera

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201811400371.3ACN109631764B (en)2018-11-222018-11-22 Dimensional measurement system and method based on RealSense camera

Publications (2)

Publication NumberPublication Date
CN109631764A CN109631764A (en)2019-04-16
CN109631764Btrue CN109631764B (en)2020-12-04

Family

ID=66069079

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811400371.3AExpired - Fee RelatedCN109631764B (en)2018-11-222018-11-22 Dimensional measurement system and method based on RealSense camera

Country Status (1)

CountryLink
CN (1)CN109631764B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114430842A (en)2020-01-192022-05-03乌迪森斯公司 Measurement calibration using patterned sheets
CN111640300B (en)*2020-04-282022-06-17武汉万集信息技术有限公司Vehicle detection processing method and device
USD937007S1 (en)2020-07-302021-11-30Udisense Inc.Bedsheet
CN112991423B (en)*2021-03-152024-06-11上海东普信息科技有限公司Sorting method, device, equipment and storage medium for logistics package
CN115179323B (en)*2022-07-122024-12-24南京工程学院 Machine terminal posture measurement device and precision improvement method based on telecentric vision constraint

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JPH08285587A (en)*1995-04-131996-11-01Mitsui Constr Co LtdPhotographic surveying method
EP1111356A2 (en)*1999-12-232001-06-27Applied Materials, Inc.Method and apparatus for processing semiconductor substrates
CN104567728A (en)*2014-12-242015-04-29天津大学Laser vision profile measurement system, measurement method and three-dimensional target
CN107067431A (en)*2017-01-162017-08-18河海大学常州校区A kind of object volume computational methods based on Kinect
CN108240793A (en)*2018-01-262018-07-03广东美的智能机器人有限公司Dimension of object measuring method, device and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105205858B (en)*2015-09-182018-04-13天津理工大学A kind of indoor scene three-dimensional rebuilding method based on single deep vision sensor
CN106709947B (en)*2016-12-202020-06-19西安交通大学Three-dimensional human body rapid modeling system based on RGBD camera
CN106846324B (en)*2017-01-162020-05-01河海大学常州校区 A Kinect-based Height Measurement Method for Irregular Objects
CN107463533B (en)*2017-08-172018-04-10广东工业大学A kind of three-dimensional CAD physical model manufacturing feature recognition methods based on PCA and CNN
CN108507472B (en)*2018-03-192020-09-15江南大学Non-contact visual detection method for size of automobile safety airbag seal
CN108537834B (en)*2018-03-192020-05-01杭州艾芯智能科技有限公司 A depth image-based volume measurement method, system and depth camera

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JPH08285587A (en)*1995-04-131996-11-01Mitsui Constr Co LtdPhotographic surveying method
EP1111356A2 (en)*1999-12-232001-06-27Applied Materials, Inc.Method and apparatus for processing semiconductor substrates
CN104567728A (en)*2014-12-242015-04-29天津大学Laser vision profile measurement system, measurement method and three-dimensional target
CN107067431A (en)*2017-01-162017-08-18河海大学常州校区A kind of object volume computational methods based on Kinect
CN108240793A (en)*2018-01-262018-07-03广东美的智能机器人有限公司Dimension of object measuring method, device and system

Also Published As

Publication numberPublication date
CN109631764A (en)2019-04-16

Similar Documents

PublicationPublication DateTitle
CN109631764B (en) Dimensional measurement system and method based on RealSense camera
CN105157725B (en)A kind of hand and eye calibrating method of two-dimensional laser visual sensor and robot
CN103727876B (en)Based on the strip width of parallel laser line and central management system and method
US8255184B2 (en)Programming system for a coordinate measuring machine and method thereof
CN105241399B (en)A kind of measuring method of precisely locating platform dynamic flatness
CN112361958B (en)Line laser and mechanical arm calibration method
de Araujo et al.Computer vision system for workpiece referencing in three-axis machining centers
CN110842901A (en)Robot hand-eye calibration method and device based on novel three-dimensional calibration block
CN105783723A (en)Machine vision-based precise die surface processing precision detection device and method
CN115035031A (en)Defect detection method and device for PIN (personal identification number) PIN, electronic equipment and storage medium
WO2020217878A1 (en)Device, method, and program for detecting position and orientation of object
CN110930442B (en)Method and device for determining positions of key points in robot hand-eye calibration based on calibration block
CN108562233A (en)Utilize the axis part diameter size On-line Measuring Method of conic section invariant
CN103148784A (en)Full size detection method for large vane
CN113269829B (en) Target positioning method, device, computer equipment and storage medium for assembly line
CN104154885B (en)A kind of small circle ring part micro-warpage detection method
CN108731602A (en)Object thickness measurement system, method, detection device and computer program product
CN102419157B (en)Micro-depth-dimension automatic image measuring system
CN1948896A (en)Dynamic 3D laser scanning testing head
JP5481397B2 (en) 3D coordinate measuring device
CN114581368A (en)Bar welding method and device based on binocular vision
Li et al.Stereo vision based automated solder ball height and substrate coplanarity inspection
TW201319769A (en)System and method for automatically replacing measuring probes
KR100857603B1 (en) Electronic component inspection system and control method
CN113932730B (en) A detection device for the shape of a curved plate

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20201204

Termination date:20211122


[8]ページ先頭

©2009-2025 Movatter.jp