CN112561983A - Device and method for measuring and calculating surface weak texture and irregular stacking volume - Google Patents
Device and method for measuring and calculating surface weak texture and irregular stacking volume Download PDFInfo
- Publication number
- CN112561983A CN112561983A CN202011514274.4A CN202011514274A CN112561983A CN 112561983 A CN112561983 A CN 112561983A CN 202011514274 A CN202011514274 A CN 202011514274A CN 112561983 A CN112561983 A CN 112561983A
- Authority
- CN
- China
- Prior art keywords
- laser
- calculating
- binocular camera
- material pile
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 230000001788 irregular Effects 0.000 title claims abstract description 12
- 239000000463 material Substances 0.000 claims abstract description 42
- 238000003708 edge detection Methods 0.000 claims abstract description 22
- 238000004364 calculation method Methods 0.000 claims abstract description 21
- 238000007781 pre-processing Methods 0.000 claims abstract description 19
- 238000012545 processing Methods 0.000 claims description 11
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 8
- 230000008859 change Effects 0.000 claims description 7
- 238000001914 filtration Methods 0.000 claims description 6
- 229910052742 iron Inorganic materials 0.000 claims description 5
- 239000003245 coal Substances 0.000 claims description 4
- 230000000877 morphologic effect Effects 0.000 claims description 4
- 238000012937 correction Methods 0.000 claims description 3
- 239000010902 straw Substances 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 12
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 230000010354 integration Effects 0.000 description 7
- 238000005259 measurement Methods 0.000 description 6
- 239000013589 supplement Substances 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000000047 product Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000012535 impurity Substances 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 239000004576 sand Substances 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/55—Depth or shape recovery from multiple images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20032—Median filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20228—Disparity calculation for image-based rendering
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
技术领域technical field
本发明涉及料堆的体积实时测算技术领域,尤其涉及一种测算表面弱纹理且不规则堆料体积的装置及方法。The invention relates to the technical field of real-time measurement and calculation of the volume of a stockpile, in particular to a device and method for measuring the volume of a pile with weak surface texture and irregularity.
背景技术Background technique
在工业生产过程中,经常遇到需要快速获取料堆体积的情况,比如:煤料堆、垃圾料堆、粮食料堆等,由于这些料堆的体积比较大且一般表面都是不规则的,通过人工测量费时费力而且精确度不够高。随着工业自动化程度的不断提高,对料堆测量技术的要求也在不断提高,随着摄像机测量技术的不断发展,被广泛应用于料堆体积的实时检测,例如,在中国专利申请“一种基于双目相机的不规则料堆体积测量方法”(CN110738618A)中,利用双目视觉技术测量料堆体积,但是双目视觉技术难以用于测量表面弱纹理的料堆,比如:破碎后的垃圾物料、沙土、粮食以及煤等。In the process of industrial production, it is often encountered that it is necessary to quickly obtain the volume of the stockpile, such as coal stockpiles, garbage stockpiles, grain stockpiles, etc. Since these stockpiles are relatively large in size and generally have irregular surfaces, Manual measurements are time-consuming, labor-intensive, and not accurate enough. With the continuous improvement of industrial automation, the requirements for stockpile measurement technology are also constantly improving. With the continuous development of camera measurement technology, it is widely used in real-time detection of stockpile volume. For example, in the Chinese patent application "A In the method for measuring the volume of irregular stockpiles based on binocular cameras" (CN110738618A), binocular vision technology is used to measure the volume of stockpiles, but binocular vision technology is difficult to measure stockpiles with weak surface textures, such as: crushed garbage materials, sand, grain and coal, etc.
为解决上述问题,亟需一种能够测量表面弱纹理且不规则料堆的技术。In order to solve the above problems, there is an urgent need for a technology that can measure the weakly textured and irregular material piles on the surface.
发明内容SUMMARY OF THE INVENTION
本发明要解决的技术问题是,克服现有技术中的不足,提供一种测算表面弱纹理且不规则堆料体积的装置及方法。The technical problem to be solved by the present invention is to overcome the deficiencies in the prior art, and to provide a device and method for measuring the volume of materials with weak surface texture and irregular stacking.
为解决技术问题,本发明的解决方案是:For solving the technical problem, the solution of the present invention is:
本发明提供了一种测算表面弱纹理且不规则堆料体积的方法,包括以下步骤:The invention provides a method for measuring the volume of weakly textured and irregular piles on the surface, comprising the following steps:
(1)在料堆正上方合适位置设置双目相机,对双目相机进行标定操作,获得标定参数;(1) Set up a binocular camera at a suitable position directly above the material stack, and perform a calibration operation on the binocular camera to obtain the calibration parameters;
(2)在料堆上方合适位置处设置照明灯和由若干个线激光器组成的激光器组,以激光器组在料堆表面投射激光网格;利用双目相机按设定的时间间隔进行拍摄,实时采集料堆表面的左图像和右图像;(2) Set up lighting and a laser group consisting of several line lasers at a suitable position above the material pile, and use the laser group to project a laser grid on the surface of the material pile; use a binocular camera to shoot at a set time interval, real-time Collect left and right images of the pile surface;
(3)对双目相机获取的料堆表面的左图像和右图像进行校正和预处理,然后进行边缘检测,得到边缘图像;(3) Correcting and preprocessing the left and right images of the stockpile surface obtained by the binocular camera, and then performing edge detection to obtain an edge image;
(4)对边缘检测后的左右图像进行遍历,寻找激光网格在两幅边缘图像上的位置;利用两幅边缘图像上激光位置差异计算视差,进一步计算出激光网格上各像素的深度值;(4) Traverse the left and right images after edge detection to find the position of the laser grid on the two edge images; use the difference of the laser positions on the two edge images to calculate the parallax, and further calculate the depth value of each pixel on the laser grid ;
(5)根据激光网格上各像素的深度值,计算料堆表面各像素点的高度值;然后建立三维坐标系下的料堆模型,基于积分原理计算料堆的实时体积值。(5) According to the depth value of each pixel on the laser grid, calculate the height value of each pixel point on the surface of the pile; then establish the pile model under the three-dimensional coordinate system, and calculate the real-time volume value of the pile based on the integration principle.
本发明中,所述弱纹理且不规则堆料是指:垃圾堆料、秸秆堆料、粮食堆料或煤堆料中的任意一种,且堆料的表面具有表面凹凸不平、纹理不清晰或特征不够明显的特点。In the present invention, the weakly textured and irregular stacking refers to any one of garbage stacking, straw stacking, grain stacking or coal stacking, and the surface of the stacking has uneven surface and unclear texture. or features that are not sufficiently obvious.
本发明所述步骤(1)中,所述标定操作是指通过张正友棋盘标定法计算双目相机的标定参数。In the step (1) of the present invention, the calibration operation refers to calculating the calibration parameters of the binocular camera through the Zhang Zhengyou chessboard calibration method.
本发明所述步骤(3)中,所述校正是指利用MATLAB软件将标定参数传入rectifyStereoImages函数,获取校正后的料堆表面左右图像;所述预处理是指对校正后的图像进行灰度化和二值化处理获得二值图像,再依次进行噪声滤波处理和形态学处理得到预处理后的图像。In step (3) of the present invention, the correction refers to using MATLAB software to transfer the calibration parameters to the rectifyStereoImages function to obtain the corrected left and right images of the stockpile surface; the preprocessing refers to performing grayscale on the corrected images Binarization and binarization are performed to obtain a binary image, followed by noise filtering and morphological processing to obtain a preprocessed image.
本发明所述所述步骤(4)具体包括:The step (4) of the present invention specifically includes:
(4.1)按从左到右、从上到下的顺序,对边缘检测后的左右图像的每个像素进行遍历,寻找激光网格的位置并记录位置信息;(4.1) In the order from left to right and top to bottom, traverse each pixel of the left and right images after edge detection, find the position of the laser grid and record the position information;
(4.2)利用图像与激光网格相对应的每个像素之间存在的横坐标差异,计算视差d=|xl-xr|;(4.2) Using the abscissa difference between each pixel corresponding to the image and the laser grid, calculate the parallax d=|x l -x r |;
(4.3)根据深度公式计算激光网格上每个像素点的深度信息Zij;(4.3) According to the depth formula Calculate the depth information Z ij of each pixel on the laser grid;
式中,f为双目相机的焦距;B为双目相机的两条中心轴线的距离(用游标卡尺测量);d为步骤(4.2)计算获得的视差。In the formula, f is the focal length of the binocular camera; B is the distance between the two central axes of the binocular camera (measured with a vernier caliper); d is the parallax calculated in step (4.2).
本发明所述步骤(5)中具体包括如下计算过程:The step (5) of the present invention specifically includes the following calculation process:
(5.1)将双目相机距离料斗底部的高度H减去激光网格像素点的深度信息Zij,获得各像素点的高度hij;根据各像素点的高度信息和位置信息,建立三维坐标系下的料堆模型;(5.1) Subtract the depth information Z ij of the pixel points of the laser grid from the height H of the binocular camera from the bottom of the hopper to obtain the height h ij of each pixel point; establish a three-dimensional coordinate system according to the height information and position information of each pixel point The stockpile model below;
(5.2)利用双目相机的分辨率X×Y、视野角θ以及激光网格上每个像素点的深度信息Zij,以及关系式求取每个像素点对应的大小aij;(5.2) Using the resolution X×Y of the binocular camera, the viewing angle θ, and the depth information Z ij of each pixel on the laser grid, and the relational expression Find the size a ij corresponding to each pixel;
(5.3)已知料堆表面左右两部分的图像上激光网格横纵条数比为n×m,将每个像素点基于积分原理,计算料堆的总体积 (5.3) It is known that the ratio of the horizontal and vertical bars of the laser grid on the images of the left and right parts of the stack surface is n×m, and the total volume of the stack is calculated based on the integration principle of each pixel point.
本发明中进一步包括:对设定时间间隔内的料堆体积变化情况进行记录,并将前后时刻的体积值做差值运算,获得料堆体积变化速率。The present invention further includes: recording the volume change of the stockpile within the set time interval, and performing a difference operation on the volume values at the previous and subsequent times to obtain the rate of change of the stockpile volume.
本发明还提供了一种用于实现前述方法的装置,包括双目相机、激光器组、照明灯和上位工控机,双目相机通过信号线连接至上位工控机;激光器组设于料堆上方合适位置,是由若干个线激光器组成,用于发出激光网格并均匀投射于料堆表面;双目相机由两个参数结构完全相同的工业相机水平并列连接组成,位于料堆正上方合适位置且镜头向下。The present invention also provides a device for implementing the aforementioned method, comprising a binocular camera, a laser group, a lighting lamp and an upper-level industrial computer, wherein the binocular camera is connected to the upper-level industrial computer through a signal line; the laser group is appropriately arranged above the material stack The position is composed of several line lasers, which are used to emit laser grids and evenly project them on the surface of the stockpile; the binocular camera is composed of two industrial cameras with the same parameter structure that are connected horizontally in parallel, located at a suitable position just above the stockpile and Lens down.
本发明中,还包括由竖杆和横杆连接而成的倒L型的铁架杆,所述激光器组、照明灯和双目相机固定安装在横杆上。In the present invention, an inverted L-shaped iron frame rod formed by connecting a vertical rod and a horizontal rod is also included, and the laser group, the lighting lamp and the binocular camera are fixedly installed on the horizontal rod.
本发明中,所述上位工控机中内嵌了左右图像预处理模块、料堆高度计算模块、料堆体积计算模块;其中,In the present invention, the upper industrial computer is embedded with a left and right image preprocessing module, a stock pile height calculation module, and a stock pile volume calculation module; wherein,
左右图像预处理模块,用于对双目相机获取的料堆表面的左图像和右图像进行校正预处理和边缘检测;The left and right image preprocessing module is used to perform correction preprocessing and edge detection on the left and right images of the stockpile surface obtained by the binocular camera;
料堆高度计算模块,用于对边缘检测后的左右图像进行遍历,寻找激光网格在两幅边缘图像上的位置;利用两幅边缘图像上激光位置差异计算视差,然后通过视差计算出激光网格上各像素的深度值;The stack height calculation module is used to traverse the left and right images after edge detection to find the position of the laser grid on the two edge images; calculate the parallax by using the difference of the laser positions on the two edge images, and then calculate the laser grid through the parallax. The depth value of each pixel on the grid;
料堆体积计算模块,用于根据激光网格上各像素的深度值,计算料堆表面各像素点的高度值;然后建立三维坐标系下的料堆模型,基于积分原理计算料堆的实时体积值。The stack volume calculation module is used to calculate the height value of each pixel point on the stack surface according to the depth value of each pixel on the laser grid; then establish a stack model under the three-dimensional coordinate system, and calculate the real-time volume of the stack based on the principle of integration value.
与现有技术相比,本发明的有益效果如下:Compared with the prior art, the beneficial effects of the present invention are as follows:
1、本发明使用由若干个线激光器组成的激光器组,将激光与双目视觉技术相结合,解决了双目视觉技术难以测量表面弱纹理料堆深度的问题;1. The present invention uses a laser group composed of several line lasers, and combines the laser with the binocular vision technology to solve the problem that the binocular vision technology is difficult to measure the depth of the pile with weak surface texture;
2、通过使用照明灯补光,本发明适用于各种光照情况的环境;2. The present invention is suitable for environments with various lighting conditions by using lighting lamps to supplement light;
3、本发明中激光器组发射的激光形状选用网格型,有利于提高三维建模和料堆体积计算的准确性;3. In the present invention, the shape of the laser emitted by the laser group adopts a grid type, which is beneficial to improve the accuracy of three-dimensional modeling and volume calculation of the stockpile;
4、本发明计算量较小,速度快,可被应用于各种自动控制场景。4. The present invention has a small amount of calculation and high speed, and can be applied to various automatic control scenarios.
附图说明Description of drawings
图1为料堆体积实时测算流程的示意图;Fig. 1 is the schematic diagram of the real-time measurement and calculation process of stockpile volume;
图2为本发明中计算模块之间运行流程的示意图;Fig. 2 is the schematic diagram of the operation flow between computing modules in the present invention;
图3为装置工作结构示意图;3 is a schematic diagram of the working structure of the device;
图中附图标记:301铁架杆;302料堆;303激光器组;304双目相机;305照明灯。Reference numerals in the figure: 301 iron frame rod; 302 material pile; 303 laser group; 304 binocular camera; 305 lighting.
具体实施方式Detailed ways
首先需要说明的是,本发明涉及图像处理技术,是计算机技术在图像处理及工业控制领域的一种应用。在本发明的实现过程中,会涉及到多个软件功能模块的应用。申请人认为,如在仔细阅读申请文件、准确理解本发明的实现原理和发明目的以后,在结合现有公知技术的情况下,本领域技术人员完全可以运用其掌握的软件编程技能实现本发明。前述软件功能模块包括但不限于:左右图像预处理模块、料堆高度计算模块、料堆体积计算模块等,凡本发明申请文件提及的均属此范畴,申请人不再一一列举。First of all, it should be noted that the present invention relates to image processing technology, which is an application of computer technology in the field of image processing and industrial control. In the implementation process of the present invention, the application of multiple software function modules will be involved. The applicant believes that, after carefully reading the application documents, accurately understanding the realization principle of the present invention and the purpose of the invention, and in combination with the prior art, those skilled in the art can fully use the software programming skills they master to realize the present invention. The aforementioned software function modules include, but are not limited to: left and right image preprocessing modules, stock pile height calculation modules, stock pile volume calculation modules, etc. All mentioned in the application documents of the present invention belong to this category, and the applicant will not list them one by one.
为了使本发明的目的、技术方案和优点更加清晰,下面结合附图以及具体实施例对本发明作进一步的说明,显然,所述实施例仅仅是本发明最基础的实施例,而不是全部实施例。基于本发明的其他实施例,均属于本发明保护的范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described below with reference to the accompanying drawings and specific embodiments. Obviously, the above-mentioned embodiments are only the most basic embodiments of the present invention, rather than all the embodiments. . Other embodiments based on the present invention all belong to the protection scope of the present invention.
本实施例中的表面弱纹理且不规则堆料体积测算装置,设有铁架杆301、激光器组303、双目相机304、照明灯305;铁架杆301由横杆和竖杆连接而成且设置成倒L型,在横杆上安装有激光器组303、照明灯305和双目相机304;照明灯305可选用能耗低、光照充足的LED灯,双目相机304镜头向下安装在料堆302正上方位置,所述双目相机304由两个参数结构完全相同的工业相机,水平并列连接组成,通过信号线连接至上位工控机。激光器组303设置在料堆302上方合适位置,能够发出激光网格并保证激光网格能够均匀投射于料堆302表面;激光器组303由若干个线激光器组成,可选市售常规产品,例如益正激光公司的YZ6506KS5-GD1035型号产品。The device for calculating the volume of materials with weak surface texture and irregular stacking in this embodiment is provided with an
上位工控机中内嵌了左右图像预处理模块、料堆高度计算模块、料堆体积计算模块,这些均为软件功能模块,所有图像储存、处理、运算都在上位工控机中完成。其中,左右图像预处理模块,用于对双目相机获取的左右相机进行灰度化和二值化处理,并对获得的二值化图像依次进行中值滤波处理和开运算处理,最后对图像进行Canny算子的边缘检测;料堆高度计算模块,分别对检测后的左右图像按以下顺序从左到右、从上到下,对左右图像每个像素进行遍历,寻找激光网格的位置并记录位置信息;利用左右图像激光网格相对应的每个像素之间存在横坐标差异,计算视差;用游标卡尺测量出两个工业相机中心轴线的距离B,并将相机焦距f和两个工业相机中心轴线的距离B代入深度公式,获得激光网格上每个像素点的深度信息Zij;料堆体积计算模块,将双目相机距离料斗底部的高度H减去所获激光线深度信息Zij,即获得料堆表面激光网格各像素点的高度hij,并根据激光网格上各像素点的高度信息和位置信息建立三维坐标系下的料堆模型;根据双目相机的分辨率X×Y、视野角θ以及激光网格上每个像素点的深度信息Zij,利用相互关系式,求取每个像素点对应的大小aij;已知料堆表面左右两部分的图像上激光网格横纵条数比为n×m,将每个像素点基于积分原理,计算料堆的总体积。The left and right image preprocessing modules, the stack height calculation module, and the stack volume calculation module are embedded in the upper IPC, which are all software function modules. All image storage, processing, and operations are completed in the upper IPC. Among them, the left and right image preprocessing module is used to perform grayscale and binarization processing on the left and right cameras obtained by the binocular camera, and perform median filtering processing and opening operation processing on the obtained binarized images in turn. Perform the edge detection of Canny operator; the stack height calculation module respectively traverses each pixel of the left and right images in the following order from left to right, and from top to bottom, to find the position of the laser grid and Record the position information; use the abscissa difference between each pixel corresponding to the laser grid of the left and right images to calculate the parallax; use the vernier caliper to measure the distance B between the central axes of the two industrial cameras, and calculate the camera focal length f and the two industrial cameras. The distance B of the central axis is substituted into the depth formula, and the depth information Z ij of each pixel on the laser grid is obtained; the pile volume calculation module, the height H from the binocular camera to the bottom of the hopper is subtracted from the obtained laser line depth information Z ij , that is, the height h ij of each pixel point of the laser grid on the surface of the material pile is obtained, and the material pile model under the three-dimensional coordinate system is established according to the height information and position information of each pixel point on the laser grid; according to the resolution X of the binocular camera ×Y, the viewing angle θ, and the depth information Z ij of each pixel on the laser grid, use the correlation formula to find the size a ij corresponding to each pixel; The ratio of the horizontal and vertical bars of the grid is n×m, and the total volume of the stockpile is calculated based on the integration principle of each pixel point.
具体地,本实施例中快速、精准的表面弱纹理且不规则堆料体积测算方法,其流程如图1所示,包括以下步骤:Specifically, the rapid and accurate method for measuring the volume of weakly textured surface and irregular piles in the present embodiment, the process of which is shown in Figure 1, including the following steps:
步骤101:安装好双目相机后,对双目相机进行标定操作;Step 101: After installing the binocular camera, perform a calibration operation on the binocular camera;
步骤102:使用双目相机采集料堆表面的左图像和右图像;Step 102: Use the binocular camera to collect the left image and the right image of the surface of the stockpile;
步骤103:基于设定的图像预处理方法,对左右图像进行校正和预处理,获得校正和预处理后的图像;Step 103: Based on the set image preprocessing method, correct and preprocess the left and right images to obtain corrected and preprocessed images;
步骤104:对预处理后的左右图像进行边缘检测,获得边缘检测后的左右图像;Step 104: Perform edge detection on the preprocessed left and right images to obtain left and right images after edge detection;
步骤105:对边缘检测后的左右图像进行遍历,寻找激光网格在图像上的位置,利用左右图像激光位置差异,计算视差,并通过视差计算出激光网格上各像素的深度值;Step 105: traverse the left and right images after edge detection, find the position of the laser grid on the image, calculate the parallax by using the difference between the laser positions of the left and right images, and calculate the depth value of each pixel on the laser grid through the parallax;
步骤106:根据激光网格上各像素的深度值,计算料堆表面各像素点的高度值,建立三维坐标系下的料堆模型;然后基于积分原理,计算料堆的实时体积值。Step 106 : According to the depth value of each pixel on the laser grid, calculate the height value of each pixel point on the surface of the material pile, and establish a material pile model in a three-dimensional coordinate system; and then calculate the real-time volume value of the material pile based on the integration principle.
相对于人工测量,该方法能够测算出体积变化速度,为耦合自动控制系统提供技术支撑。具体是:对设定时间间隔内的料堆体积变化情况进行记录,并将前后时刻的体积值做差值运算,获得料堆体积变化速率;Compared with manual measurement, this method can measure the volume change speed and provide technical support for the coupled automatic control system. Specifically: record the volume change of the stockpile within the set time interval, and calculate the difference between the volume values before and after, to obtain the rate of change of the stockpile volume;
下面,将对本发明实施例中的各个步骤进行详细说明:Below, each step in the embodiment of the present invention will be described in detail:
步骤101:安装好双目相机后,对双目相机进行标定操作,具体标定操作是通过张正友棋盘标定法计算出双目相机的标定参数。Step 101 : After installing the binocular camera, perform a calibration operation on the binocular camera. The specific calibration operation is to calculate the calibration parameters of the binocular camera through the Zhang Zhengyou chessboard calibration method.
步骤102:使用双目相机采集料堆表面的左图像和右图像。Step 102: Use the binocular camera to acquire left and right images of the surface of the stockpile.
采集到左右图像之后,基于设定的图像预处理方法,对左右图像进行校正和预处理,获得校正和预处理后的图像,即步骤103。After the left and right images are collected, based on the set image preprocessing method, the left and right images are corrected and preprocessed to obtain corrected and preprocessed images, that is,
步骤103:基于设定的图像预处理方法,利用左右图像预处理模块对左右图像进行校正和预处理。Step 103: Based on the set image preprocessing method, correct and preprocess the left and right images by using the left and right image preprocessing module.
利用MATLAB软件将标定参数传入rectifyStereoImages函数,获取校正后的左右图像;对校正后的左右图像进行灰度化和二值化处理,获得二值图像;再对二值图像依次进行噪声滤波处理和形态学处理,得到预处理后的左右图像。Use MATLAB software to transfer the calibration parameters to the rectifyStereoImages function to obtain the corrected left and right images; grayscale and binarize the corrected left and right images to obtain a binary image; then perform noise filtering and Morphological processing to obtain the left and right images after preprocessing.
优选地,所述噪声滤波处理选用中值滤波,可以较好的去除噪声还能使图像轮廓保持较好的清晰度;所述形态学处理选用开运算,去除料堆轮廓外杂质的同时,还能够填充料堆轮廓内的孔隙,为后续料堆高度计算提供更好的图像。Preferably, median filtering is used in the noise filtering process, which can better remove noise and keep the image outline better; the morphological process uses open operation, which removes impurities outside the stack outline and also The ability to fill voids within the stack contour provides a better image for subsequent stack height calculations.
得到预处理后的左右图像之后,对预处理后的左右图像进行边缘检测,获得边缘检测后的左右图像,即步骤104。After the preprocessed left and right images are obtained, edge detection is performed on the preprocessed left and right images to obtain the left and right images after edge detection, that is,
步骤104:对预处理后的左右图像进行边缘检测,获得边缘检测后的左右图像。Step 104: Perform edge detection on the preprocessed left and right images to obtain left and right images after edge detection.
优选地,所述边缘检测选用Canny算法,获得边缘检测后的左右图像。Preferably, a Canny algorithm is used for edge detection to obtain left and right images after edge detection.
步骤105:对边缘检测后的左右图像进行遍历,寻找激光网格在图像上的位置,利用左右图像激光位置差异,计算视差,并通过视差计算出激光网格上各像素的深度值。Step 105 : traverse the left and right images after edge detection, find the position of the laser grid on the image, calculate the parallax by using the difference of the laser positions of the left and right images, and calculate the depth value of each pixel on the laser grid through the parallax.
利用料堆高度计算模块,分别对检测后的左右图像按以下顺序从左到右、从上到下,对左右图像每个像素进行遍历,寻找激光网格的位置并记录位置信息;利用左右图像激光网格相对应的每个像素之间存在横坐标差异,计算视差d=|xl-xr|;用游标卡尺测量出两个工业相机中心轴线的距离B,并将相机焦距f和两个工业相机中心轴线的距离B代入深度公式:获得激光网格上每个像素点的深度信息Zij;Using the stack height calculation module, traverse each pixel of the left and right images in the following order from left to right and from top to bottom, find the position of the laser grid and record the position information; use the left and right images There is abscissa difference between each pixel corresponding to the laser grid, calculate the parallax d=|x l -x r |; use the vernier caliper to measure the distance B between the central axes of the two industrial cameras, and compare the camera focal length f with the two The distance B of the central axis of the industrial camera is substituted into the depth formula: Obtain the depth information Z ij of each pixel on the laser grid;
步骤106:根据激光网格上各像素的深度值,计算料堆表面各像素点的高度值;然后建立三维坐标系下的料堆模型,基于积分原理计算料堆的实时体积值。Step 106: Calculate the height value of each pixel point on the surface of the material pile according to the depth value of each pixel on the laser grid; then establish a material pile model in a three-dimensional coordinate system, and calculate the real-time volume value of the material pile based on the integration principle.
利用料堆体积计算模块,将双目相机距离料斗底部的高度H减去所获激光线深度信息Zij,即获得料堆表面激光网格各像素点的高度hij,并根据激光网格上各像素点的高度信息和位置信息建立三维坐标系下的料堆模型;根据双目相机的分辨率X×Y、视野角θ以及激光网格上每个像素点的深度信息Zij,以及关系式求取每个像素点对应的大小aij;已知料堆表面左右两部分的图像上激光网格横纵条数比为n×m,将每个像素点基于积分原理,计算料堆的总体积 Using the stack volume calculation module, the height H from the binocular camera to the bottom of the hopper is subtracted from the obtained laser line depth information Z ij , that is, the height h ij of each pixel point of the laser grid on the stack surface is obtained. The height information and position information of each pixel point establishes a stockpile model in a three-dimensional coordinate system; according to the resolution X×Y of the binocular camera, the viewing angle θ and the depth information Z ij of each pixel point on the laser grid, and the relationship Mode Find the size a ij corresponding to each pixel point; it is known that the ratio of the horizontal and vertical bars of the laser grid on the images of the left and right parts of the material pile surface is n×m, and each pixel point is based on the integration principle to calculate the total amount of the material pile. volume
显然,本领域的技术人员可以对本发明进行后续的各种应用、补充、改动和变型而不脱离本发明的精神和范围。如果基于本发明的各种应用、补充、改动和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些应用、补充、改动和变型在内。Obviously, those skilled in the art can make subsequent various applications, supplements, changes and modifications to the present invention without departing from the spirit and scope of the present invention. If various applications, supplements, modifications and variations based on the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these applications, supplements, modifications and variations.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011514274.4A CN112561983A (en) | 2020-12-19 | 2020-12-19 | Device and method for measuring and calculating surface weak texture and irregular stacking volume |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011514274.4A CN112561983A (en) | 2020-12-19 | 2020-12-19 | Device and method for measuring and calculating surface weak texture and irregular stacking volume |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112561983A true CN112561983A (en) | 2021-03-26 |
Family
ID=75032000
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011514274.4A Pending CN112561983A (en) | 2020-12-19 | 2020-12-19 | Device and method for measuring and calculating surface weak texture and irregular stacking volume |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112561983A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113239944A (en) * | 2021-06-08 | 2021-08-10 | 矿冶科技集团有限公司 | Image feature extraction method and device, electronic equipment and medium |
CN113252103A (en) * | 2021-05-11 | 2021-08-13 | 安徽理工大学 | Method for calculating volume and mass of material pile based on MATLAB image recognition technology |
CN113860000A (en) * | 2021-10-21 | 2021-12-31 | 四川阿泰因机器人智能装备有限公司 | Intelligent variable-speed balanced grain throwing method |
CN113888571A (en) * | 2021-09-16 | 2022-01-04 | 锐创理工科技(大连)有限公司 | Material pile edge detection method |
CN115018903A (en) * | 2022-08-10 | 2022-09-06 | 安维尔信息科技(天津)有限公司 | Method and system for calculating volume of stock pile in stock yard |
CN116665139A (en) * | 2023-08-02 | 2023-08-29 | 中建八局第一数字科技有限公司 | Method and device for identifying volume of piled materials, electronic equipment and storage medium |
TWI858860B (en) * | 2023-08-10 | 2024-10-11 | 中國鋼鐵股份有限公司 | Reserve calculation system and reserve calculation method for stacked material |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111637834A (en) * | 2019-03-01 | 2020-09-08 | 北京伟景智能科技有限公司 | Three-dimensional data measuring device and method |
CN112082608A (en) * | 2020-08-05 | 2020-12-15 | 陕西天诚合创智能控制工程有限责任公司 | Method for detecting solid particle flow on conveyer belt by using binocular vision |
-
2020
- 2020-12-19 CN CN202011514274.4A patent/CN112561983A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111637834A (en) * | 2019-03-01 | 2020-09-08 | 北京伟景智能科技有限公司 | Three-dimensional data measuring device and method |
CN112082608A (en) * | 2020-08-05 | 2020-12-15 | 陕西天诚合创智能控制工程有限责任公司 | Method for detecting solid particle flow on conveyer belt by using binocular vision |
Non-Patent Citations (2)
Title |
---|
博古斯拉夫.赛干内克 等: "《三维计算机视觉技术和算法导论》", 31 October 2014, 国防大学出版社 * |
韦山: "《便携式计算机的车载激光扫描盘煤系统研究》", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113252103A (en) * | 2021-05-11 | 2021-08-13 | 安徽理工大学 | Method for calculating volume and mass of material pile based on MATLAB image recognition technology |
CN113239944A (en) * | 2021-06-08 | 2021-08-10 | 矿冶科技集团有限公司 | Image feature extraction method and device, electronic equipment and medium |
CN113239944B (en) * | 2021-06-08 | 2023-07-14 | 矿冶科技集团有限公司 | Image feature extraction method and device, electronic equipment and medium |
CN113888571A (en) * | 2021-09-16 | 2022-01-04 | 锐创理工科技(大连)有限公司 | Material pile edge detection method |
CN113860000A (en) * | 2021-10-21 | 2021-12-31 | 四川阿泰因机器人智能装备有限公司 | Intelligent variable-speed balanced grain throwing method |
CN115018903A (en) * | 2022-08-10 | 2022-09-06 | 安维尔信息科技(天津)有限公司 | Method and system for calculating volume of stock pile in stock yard |
CN116665139A (en) * | 2023-08-02 | 2023-08-29 | 中建八局第一数字科技有限公司 | Method and device for identifying volume of piled materials, electronic equipment and storage medium |
CN116665139B (en) * | 2023-08-02 | 2023-12-22 | 中建八局第一数字科技有限公司 | Method and device for identifying volume of piled materials, electronic equipment and storage medium |
TWI858860B (en) * | 2023-08-10 | 2024-10-11 | 中國鋼鐵股份有限公司 | Reserve calculation system and reserve calculation method for stacked material |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112561983A (en) | Device and method for measuring and calculating surface weak texture and irregular stacking volume | |
CN107424143B (en) | Mining belt conveyor coal quantity detection method based on binocular stereoscopic vision depth perception | |
CN110230998B (en) | Rapid and precise three-dimensional measurement method and device based on line laser and binocular camera | |
CN104537671B (en) | A kind of cigarette filter stick on-line counting and quality determining method based on machine vision | |
CN107816943B (en) | A logistics box volume and weight measurement system and its implementation method | |
CN107869954B (en) | A binocular vision volume weight measurement system and its realization method | |
CN106949848A (en) | A kind of high-precision laser 3D profiles phone structural detection method | |
CN110033516A (en) | Flat-elongated particles detection method of content based on the identification of binocular camera Image Acquisition | |
CN109406527B (en) | System and method for detecting fine appearance defects of micro camera module lens | |
CN107687819A (en) | A fast and high-precision method for extracting sub-pixels in the center of light bars | |
CN114972633B (en) | Fast scanning point cloud interpolation method under constraint of crossed laser lines | |
CN113610929B (en) | Combined calibration method of camera and multi-line laser | |
CN105574845A (en) | Cigarette pack lamination layer number measurement method and device by multi-camera array | |
CN104992446B (en) | The image split-joint method of non-linear illumination adaptive and its realize system | |
CN107796325A (en) | A kind of measuring method and measuring system of pavement texture construction depth | |
WO2023134251A1 (en) | Clustering-based light bar extraction method and apparatus | |
CN112017234A (en) | Stockpile volume measurement method based on sparse point cloud reconstruction | |
CN112432952A (en) | Cigarette loose end detection method based on machine vision technology | |
CN115375636A (en) | A full-scale detection method and device for a power battery module | |
CN104458764A (en) | Curved uneven surface defect identification method based on large-field-depth stripped image projection | |
CN104515479A (en) | Medium plate plane shape measuring system and method | |
CN116883483A (en) | Fish body measuring method based on laser camera system | |
CN107948464B (en) | A kind of geometric correction method and system of the laterally offset of printed matter detection image | |
CN204329898U (en) | Medium plate plane shape acquisition system | |
CN100359286C (en) | The method of image processing to improve the accuracy of laser measurement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210326 |
|
RJ01 | Rejection of invention patent application after publication |