https://doi.org/10.31449/inf.v46i7.4115 Informatica 46 (2022) 1–12 1 Research on Weighing of Concrete Aggregate Pile Based on Binocular Vision Chang Su 1, 2 , Liu Wang 1, 2 *, Zhuang Wu 1, 2 , Hua Xu 1, 2 E-mail: 18860484902@163.com, 2390459091@qq.com *Corresponding Author 1 State Key Laboratory of Mining Response and Disaster Prevention and Control in Deep Coal Mine, Anhui University of Science and Technology, Huainan Anhui 232001, P.R. China 2 School of Mechanical Engineering, Anhui University of Science and Technology, Huainan Anhui 232001, P.R. China Keywords: aggregate pile, weight measurement, binocular stereo vision, SMG stereo matching algorithm, OTSU threshold segmentation algorithm Received: April 14, 2022 At present, the weighing process of concrete aggregate is cumbersome, and the weighing result has a large error. This paper proposes a method for measuring the weight of irregular bone stockpiles based on binocular vision. Firstly, based on the principle of binocular vision, the improved SMG stereo matching algorithm and OTSU threshold segmentation algorithm are used to calculate the 3D point cloud coordinates corresponding to the disparity map. Then, the 3D reconstruction of the aggregate pile and the calculation method of volume and mass are proposed. The results show that the method can accurately measure the aggregate pile weight, and the measurement error is less than 6%. The method can effectively reduce the operating cost of the concrete batching station and improve the measurement efficiency. Povzetek: Razvita je metoda strojnega vida, ki oceni težo betonskih kosov. 1 Introduction The traditional aggregate weighing system of concrete plant is composed of a weighing hopper and a sensor. The weighing method is carried out by weighing distribution equipment on the market [1]. The existence of the drop value makes this part of the error inevitable, but there are some problems with various concrete weighing and inevitable. When the system is running, the measurement results will be automatically corrected according to the actual drop value. Actual drop values are not stable due to changes in aggregate storage and the closing speed of the batching door. Additionally, expensive instruments and easily damaged components add uncertainty to the weighing process. At present, binocular vision volume measurement without the aid of structured light has been reported [2]. The literature integrates and improves the weight measurement system of aggregate pile, and finally integrates all modules to realize the integrated measurement of concrete aggregate quality. Compared with the previous concrete aggregate weighing system, the measurement system not only has the advantages of convenient and fast weighing and low cost, but also can adapt to the industrial production environment under harsh conditions. In recent years, due to the development of related algorithms, there has been a study of 3D reconstruction of real object data using camera. Visual measurement method has the characteristics of non-contact and high precision, which can automatically and efficiently obtain target information. Similar to the ranging function of various mobile phones, the length and area of the object are measured by mobile camera. In the visual measurement method, binocular vision system similar to human eyes has been highly concerned and has a very broad prospect in practical applications. Based on the above research on binocular vision, in order to realize the function of binocular stereo vision to measure the weight of the target, this paper will carry out the experiment on the measurement effect of binocular stereo vision. Computer vision refers to the use of computer simulation of human visual function. In reality, all objects are three-dimensional. Binocular vision has inherent advantages in capturing three-dimensional information, and the process is simple and reliable. Therefore, this paper introduces the weight measurement method based on binocular stereo vision. Many scholars use image method to measure the physical volume. The research of stereo vision technology can be traced back to the1960s. Professor Robert of Massachusetts Institute of Technology reconstructs three-dimensional information from regular 2 Informatica 46 (2022) 1–12 C. Su et al. two-dimensional images. Professor Robert of Massachusetts Institute of Technology reconstructs three-dimensional information of regular polyhedron from ordinary two-dimensional images, and obtains the shape and position information of objects in real space. At present, binocular vision volume measurement without the aid of structured light has been reported. Since then, the process from two-dimensional graphics to research three-dimensional information has taken a crucial step, which is also the symbol of the beginning of stereoscopic vision technology [3]. In 2017, inspired by the principle of brain tissue, Marc Osswald of Zurich University designed a visual sensor based on events to solve the problem of stereo correspondence [4]. In 2021, Ze Qiu and Ming Wang designed a system that used non-contact photoelectric method to measure the volume of the object and used laser to locate the center position. [5] Ming Wang first placed the object on the rotating platform and captured the double lenses with an industrial camera, then processed the image on MATLAB software, and finally calculated the volume, accuracy and speed of the target object. On the basis of the above work, this paper proposes a binocular system to solve the weight measurement problem of irregular aggregate piles. The weight data of aggregate pile is obtained according to the idea of volume multiplied by density, and the volume calculation of aggregate pile is obtained according to the idea of bottom area multiplied by height. The steps of measuring the weight of aggregate pile are as follows: The first step is to calculate the volume of aggregate pile. Firstly, the initial image of bone pile was collected by binocular camera for preprocessing [6]. Then, this paper uses MATLAB to extract the feature points of the preprocessed image [7]. The stereo matching of corner detection method is completed by using OpenCV software. Next, the improved SMG (Semi Global Matching) stereo matching algorithm is used to obtain the disparity map of the stacking image, and the corresponding three-dimensional point cloud coordinates of the disparity map are calculated. Then, the improved OTSU threshold segmentation algorithm is used to extract the aggregate heap area in the disparity map [8]. The third chapter gives the three-dimensional reconstruction and volume calculation method of aggregate pile [9]. In the second step, the density of the aggregate pile is calculated first, and finally the weight of the target aggregate pile is calculated from the volume and density of the aggregate pile. 2 Basic principle and overall workflow A pair of cameras in binocular vision system is equivalent to human eyes the parallax of each pixel is obtained from the left and right images, and then the three-dimensional information is reconstructed by using the similar triangle principle to identify the obstacle object. It can calculate the distance from the space point to the camera imaging plane. Compared with monocular vision, binocular vision does not rely on a large training set, ranging accuracy is higher. Figure1 and Figure 2. Figure 1: Image Schematic of Binocular Stereo Vision. The essence of binocular stereo matching is to calculate the distance from the space point to the camera imaging plane. The left and right cameras shoot the images of the left and right sides of the material pile, and then find two overlapping points corresponding to any point in the left and right images. The schematic is shown in Figure 2. From the mathematical analysis, the stereo matching problem is an optimization problem solving process, and the design of effective cost evaluation function is the primary work to solve the stereo matching problem. In real binocular images, there are often many interference factors such as image noise, mirror reflection of smooth surface, image distortion caused by optical distortion, large area repetitive feature area or smooth area, which are difficult to achieve accurate stereo matching. Therefore, in solving the stereo matching problem, constraints are usually introduced to improve the accuracy of stereo matching. Research on Weighing of Concrete Aggregate Pile Based… Informatica 46 (2022) 1–12 3 Figure 2: The principle diagram of binocular stereo vision imaging. Figure 2 shows the ideal binocular stereo vision imaging schematic. As shown in the figure, 𝐵 is the distance between the projection centers of two cameras ( baseline length ), 𝑓 is focal length. Optical axis 1 is parallel to optical axis 2. The z is the depth distance and the imaging plane is on the same plane. The d is disparity. where, points 𝑃 1 and 𝑃 2 are points in the space, 𝑃 is the image point on the imaging surface of the left camera and the right camera, and the line segments 𝑥 1 and 𝑥 2 are the distances from the left and right image points to the boundary of the camera imaging surface, respectively. With geometric relationship, triangle 𝑃𝑃 1 𝑃 2 is similar to triangle𝑃𝑂 1 𝑂 2 , and the following relationship can be obtained from the schematic diagram: The disparity of P on left and right cameras is: 1 2 X X d   (1) The distance from point P to the camera z is: (2) From Equation (2), it can be concluded that the depth distance is inversely proportional to the parallax, and is proportional to the focal length. The farther the object is from the binocular camera, the smaller the parallax is. The closer the object is from the camera, the larger the parallax is. Therefore, to know the distance of the camera, it is necessary to obtain the focal length 𝑓 of the camera and the center distance 𝐵 of the left and right cameras. The weight measurement method of large and medium-sized aggregate pile designed in this paper first uses binocular camera to collect the image of the target aggregate pile, and then conducts binocular calibration. In this process, the camera parameters need to be calibrated, that is, the three-dimensional space is converted into a two-dimensional plane required coordinate relationship, and then the system calibration [10]. After that, the internal and external parameters of the camera need to be obtained, and the process of calculating the parameters is called camera calibration. The calibration method is Zheng you Zhang. Then, the collected images are preprocessed, namely graying, binaryzation, noise reduction, edge detection and a series of processing, so as to be more suitable for the calculation of computer image software. Then stereo matching is performed to convert 3D images into 2D images. In the feature point extraction of the preprocessed image, this paper uses MATLAB to manually extract the feature points [11], and completes the stereo matching of corner detection method with the help of OpenCV software. In the extraction of feature points of preprocessed images, this paper uses MATLAB to manually extract feature points. Then, with the help of OpenCV software, complete the corner detection method of stereo matching, the final step of error analysis and correction. The flowchart is as follows pixelsize × d f z B  4 Informatica 46 (2022) 1–12 C. Su et al. Figure 3 :System flowchart. 3 Camera calibration and image preprocessing 3.1 Acquisition and correction of target image Parallax is the horizontal distance between the center pixels of two matching blocks in the left and right binocular images. The disparity map is based on the left image and stores the difference between the left and right images. In this paper, the stereo matching of the stereo corrected image pairs is needed to obtain the disparity image. Figures 4 and 5 are corrected left and right views. Figure 4: Left and right views corrected. 3.2 Selection of calibration method The calibration method selected in this paper is Zheng you Zhang calibration method. The calibration board is a chessboard calibration board with black and white phase. The size of the chessboard calibration board is 18.55×26.5mm, and the length of the cells is 2.65mm, with a total of 7×10 squares. Firstly, a template is printed and affixed to a plane, and several template images are taken from different angles. Then, the feature points in the image are detected, and the internal and external parameters of the camera are calculated under the ideal distortion-free condition, and the maximum likelihood Collecting binocular camera view Binocular camera calibration Matching point parallax correction Calculation of camera parameters Zheng you Zhang calibration algorithm Three-dimensional reconstruction Weight measurement V olume measurement Feature point matching Feature point extraction Feature point extraction Feature point extraction Stereo matching Image processing Research on Weighing of Concrete Aggregate Pile Based… Informatica 46 (2022) 1–12 5 estimation is used to improve the accuracy. The actual distortion coefficient is calculated by the least square method, and then the internal and external parameters of the camera and the distortion coefficient are obtained. The maximum likelihood method is used to optimize the estimation to reduce the data error, and finally the required internal and external parameters and distortion coefficient of the camera are obtained. 3.3 Distortion correction Distortion parameters are internal camera parameters. Distortion is generally divided into radial distortion and tangential distortion. The radial distortion is manifested by the more obvious bending of the light near the edge. The reason for the tangential distortion is that the lens caused by manufacturing defects and other factors is not parallel to the imaging plane. The mathematical relationship between point (𝑥 1 , 𝑦 1 ) after distortion correction and point (𝑥 0 , 𝑦 0 ) before correction is:                               ) 2 ( 2 ) 2 ( 2 ) 1 ( 2 0 2 1 0 0 2 2 0 2 2 0 0 1 0 0 6 3 4 2 2 2 2 1 2 1 y r p y x p x r p y x p y x r k r k r k r k x x (3) Among them, 𝑘 1 , 𝑘 2 , 𝑘 3 ) are radial distortion parameters, 𝑝 1 , 𝑝 2 are tangential distortion parameters, 𝑟 is the distance between point (𝑥 0 , 𝑦 0 ) and imaging ce 3.4 Calibration of internal and external parameters of camera The camera plays the role of collecting images, so the accuracy of camera calibration will also affect the accuracy of the final results. The two-dimensional image captured by the camera is an important factor in the three-dimensional data information of the object to be measured. The camera converts the scene information into computer identifiable digital information. The establishment of the world coordinate system is to convert the information of the space three-dimensional material stack into the information of the two-dimensional plane for computer calculation. Therefore, camera calibration becomes particularly important. The following table is the internal and external parameters set by the camera. Left camera Right camera focal length [1124.36794 1128.75022]+/-[21.45391 21.34720] [1129.05242 1134.06927]+/-[23.0452 22.8529] distortion [0.09335 -0.23285 -0.00525 0.00155 0.00000] +/- [0.01596 0.05788 0.00241 0.00185 0.00000] [0.0935 -0.23285 -0.00525 0.00155 0.00000] +/- [0.01549 0.05165 0.00245 0.00197 0.00000] principal point [709.72375 264.81611]+/-[6.45663 8.26639] [641.82716 233.14656]+/-[7.10825 9.00957] rotational vector om = [ 0.00290 0.00334 -0.00079 ] translation vector T = [ -24.66938 0.75139 5.45794 ] Table 1: Internal and external parameters of camera 3.5 Image preprocessing The images collected by the camera are inevitably affected by their own factors and external environment, so it is necessary to preprocess the collected images [12] [13]. (1) Image graying: Graying is the process of converting different values of each component in RGB of color image into the same value of each component. That is, the value of R = G = B in RGB, which is the gray value. The whole image is grayed by color. After graying, each pixel has 256 values (0-255), but it can still represent the brightness change and tone distribution of the image. The common methods of graying are as follows: ① Maximum method: The maximum value of the three values of red, green and blue (RGB) is set to the gray value of the image. ②weighted average method: The three values in red, green and blue (RGB) are calculated by weighted average according to different weights as gray values. The formula is as follows: (4) ③ Image Component Method: Take three different values of red, green and blue (RGB) as gray values of         j i B c j i G b j i R a j i f , , , ,       6 Informatica 46 (2022) 1–12 C. Su et al. three different images. ④averaging method: The average value of the three values in red, green and blue (RGB) is taken as the gray value. By comparison, the weighted average method is more suitable for this image gray processing. Grayscale images are shown below: Figure 5 (a): Binocular camera left and right image weighted averaging method graying. (2) binary processing on images: Set a threshold, which is obtained between 0 and 255 of the gray value of pixels in the original image. The gray value greater than this threshold is set to 0, and the gray value less than this threshold is set to 1. This renders the image black and white. The selection of threshold should follow the principle of image rationalization. OTSU threshold segmentation is an automatic threshold determination algorithm using maximum interclass variance. The algorithm is obtained on the basis of the principle of the least square method of discriminant analysis. It is a global-based binaryzation algorithm. When the image threshold is segmented, the selected segmentation threshold should maximize the difference between the average gray level of the foreground region, the average gray level of the background region and the average gray level of the whole image. Finally, the optimal threshold of the maximum variance is obtained. If the traditional OTSU segmentation algorithm is used to segment disparity map, the result is always unable to be extracted correctly. Therefore, an improved OTSU algorithm is proposed to compensate for the problem that the target area close to the background cannot be displayed. Figure 6 and Figure 7 are the images of traditional OTSU threshold segmentation and improved OTSU threshold segmentation, respectively. Figure 6: the images of traditional OTSU threshold segmentation. Figure 7: improved OTSU threshold segmentation. 4 Stereo matching and 3D reconstruction 4.1 Stereo matching In 2005, Heiko Hirschmuller proposed a semi-global stereo matching algorithm called SGM (Semi Global Matching) [14] [15]. This algorithm uses single-pixel mutual information (HMI) as the matching cost, and performs one-dimensional energy minimization along multiple directions to approximately replace two-dimensional global energy minimization, so it is called semi-global algorithm. In order to obtain better matching results, the SGM algorithm still adopts the idea of global stereo matching algorithm, namely, the global energy optimization strategy. In short, it is to find the optimal disparity of each pixel to minimize the global energy function of the whole image. The big premise of SMG algorithm is image pair input, that is, the left and right images obtained by binocular by binocular cameras must be the core line relative. SMG algorithm has the following four steps: cost calculation, cost aggregation, parallax calculation and parallax optimization. (1) Cost calculation : Cost calculation based on census-Trasform. Zabin and Woodfill proposed a Census transform based method which is widely used in matching cost calculation [16]. The essence of Census transform is to convert the pixel gray level into a bit string by using the local gray difference in the pixel neighborhood. It retains the location characteristics of the pixels in the window and is robust to the brightness deviation. Generally speaking, it can reduce the error caused by illumination difference. The principle is to map the obtained Boolean value to a bit string by comparing the gray value of pixels in the neighborhood window of size m n  with the gray value of the center pixel of the window, and finally use the value of the bit string as the Census transform value C s of the center pixel, as shown in formula 5:       ) , ( , , : , , , , , j v i u I v u I v u C m m i n n i s           (5) Where 𝑛 ′ and 𝑚 ′ are not more than half the integers of n and m, respectively, and n and m are odd. The  means bit-by-bit connection operation,  is defined as operation formula 6:         y x y x y x 1 0 ,  (6) Calculation of Hamming Distance: The matching cost calculation method based on Census transform is to calculate the Hamming distance of the Census transform Research on Weighing of Concrete Aggregate Pile Based… Informatica 46 (2022) 1–12 7 value of the two pixels corresponding to the left and right images. The formula is as follows formula 7: (7) H represents Hamming distance, that is, the number of corresponding bits of two bit strings is different. (3) Cost aggregation: Stereo matching algorithm is divided into global stereo matching algorithm and semi-global stereo matching algorithm. The global stereo matching algorithm obtains disparity map by minimizing global energy. In the cost calculation based on Census, only the local energy correlation is studied, so the adaptability to noise is poor, and it is difficult to calculate the optimal disparity. This is also why the SGM algorithm needs cost aggregation. In volume measurement, the selected algorithm needs better matching constraint effect, and the SGM algorithm is no exception. The idea of the SGM algorithm is to approximate the two-dimensional energy minimization by equalizing the cost aggregation on one-dimensional paths in multiple directions and then using WTA to solve disparity. The following figure 8 shows: Figure 8: schematic diagram of SGM algorithm. Cost aggregation formula is as follows formula 8:             . 1 , min 1 , 1 , , min , , 2 ' 1 ' 1 ' ' ' ) , , ( P d L P d L P d L d L d C d L i             r p r p r p r p p p r r r r r (8) (3) Parallax calculation: In the SMG algorithm, the disparity calculation after cost aggregation adopts the winner-take-all algorithm strategy that is the same as the local algorithm, and each pixel selects the disparity value corresponding to the minimum aggregation generation value as the final disparity. The calculation formula is as follows formula 9:   d p S d , m in arg   (9) (4) disparity refinement :Use the most common error matching elimination method. In order to quickly measure the volume of aggregate pile, the matching algorithm not only needs to achieve certain accuracy requirements, but also requires real-time matching. The global algorithm requires very high computation or memory consumption, and requires very high hardware of the computer, so its application conditions are not extensive. Therefore, this paper proposes an improved semi-global stereo matching SMG algorithm to meet certain accuracy requirements and has real-time matching function. Establishment of P image layers with different resolutions for original image pairs. Except the first layer (original resolution), the resolution of each layer is a quarter of the upper layer (length and width are reduced by half), forming a multi-layer pyramid image set. The images with low resolution are located in the upper layer of the pyramid. A fast stereo matching algorithm is obtained by improving the SMG algorithm, which can complete the pixel-by-pixel stereo matching of images in a very short time. The algorithm is divided into three types according to the degree of optimization: the unoptimized SGM algorithm, the parallel optimization algorithm SGM+P (4 Cores + SSE (Streaming SIMD Extension)), and the optimization algorithm SGM+P+H with parallel optimization and hierarchical strategy. The efficiency of the three algorithms is tested by selecting one of the regional images of a stereo pair of data. The resolution of the regional image pair is 1200 × 1000, and the search range of parallax is set to 256, 512 and 1024, respectively. In terms of parameter setting, the number of cost aggregation paths is 8, the number of matching layers is 5, and the window size of Census transform is 5 × 5. The following table simply reflects the improvement performance of the adopted optimization strategy at the SGM algorithm level: D=512 D=1024 D=2056 SGM 9.63s 17.91s 45.12s SGM+P 1.58s 3.13s 7.52s SGM+P+H 0.36s 0.38s 0.39s Table 2 Three algorithms take time As can be seen from table 2, the parallel optimized algorithm SGM+P is 4-5 times more efficient than the unoptimized algorithm SGM, but does not achieve the expected speedup. The efficiency of the algorithm SGM+P+H with parallel optimization and hierarchical matching strategy is 5-18 times higher than that of the algorithm SGM + P with only parallel optimization. The disparity map obtained by the improved SGM algorithm is as follows:         v d u C v u C H d v u C sr sl , , , : , ,   8 Informatica 46 (2022) 1–12 C. Su et al. Figure 9: disparity map. Figure 10 is the disparity map preprocessed by the improved OUST algorithm to prepare for the next three-dimensional reconstruction. Figure 10: disparity map pretreated by improved OUST algorithm. 4.2 Delaunay triangulation Given a set of points [𝑋 𝑖 , 𝑌 𝑖 ] 𝑇 (i=1,2,... ) in 2D plane, Delaunay triangulation is to find a group of triangles [17], so that any circumcircle of a triangle does not contain points, corresponding to V oronoi polygons. The center of the circumcircle of a triangle is the vertex of the V oronoi polygon, and the edge of the V oronoi polygon is on the vertical line of the two points. 4.3 Three-dimensional reconstruction 3D reconstruction is the process of restoring the 2D image of the object to the original 3D shape of the object [18]. The surface of the object is reconstructed by obtaining three-dimensional coordinates of points on the surface. Firstly, SGM features are extracted from the left and right aggregate heap views obtained by binocular stereo vision. Then, the point pairs of matching images are found through feature matching, and the three-dimensional coordinates of corresponding spatial points are obtained [19], so as to obtain the three-dimensional coordinates of the surface points of the aggregate pile. [𝑋 𝑖 , 𝑌 𝑖 , 𝑍 𝑖 ] 𝑇 is the 3D coordinates of the i th point obtained. In order to reconstruct the surface shape of aggregate piles, it is necessary to project the obtained point [𝑋 𝑖 , 𝑌 𝑖 , 𝑍 𝑖 ] 𝑇 (i = 1,2..., ) onto the plane of the world coordinate system𝑋 𝑊 𝑂 𝑊 𝑊 𝑊 𝑍 𝑊 , and do Delaunay triangulation on the projection point set [𝑋 𝑖 , 𝑌 𝑖 ] 𝑇 (i= 1,2..., ).Then the surface of the aggregate pile is reconstructed by using the three-dimensional grid drawing function of MATLAB. Finally, the entire surface will be formed by a series of triangles. From formula 2, the pixel point of distance Z from a point to the camera plane can be obtained. By using this formula, the coordinates of Z of each pixel in the world coordinate system can be obtained by traversing each pixel in the disparity map, and then the complete three-dimensional coordinates of each pixel in the world coordinate system can be obtained. Use MATLAB software to save the three-dimensional coordinate data. Record the saved three-dimensional coordinate data in MATLAB. The display effect as shown in Figure 11: Figure 11: Image depth map to be measured. The binocular camera obtains the depth map from the top of the aggregate pile, and then obtains the depth information from the depth map of the aggregate pile. As shown in the figure, the cumulative sum of the volume of the corresponding blocks per unit area is the total volume of the aggregate heap in the desired area. The average depth of each pixel is about the average depth of the whole aggregate pile. 5. Volume and weight measurement method Is the first triangle of Delaunay triangulation of projection point set, as shown in the figure. The two-dimensional coordinate table of the corresponding three vertices is[𝑋 𝑖 1 , 𝑌 𝑖 2 ] 𝑇 , [𝑋 𝑖 2 , 𝑌 𝑖 2 ] 𝑇 , [𝑋 𝑖 3 , 𝑌 𝑖 4 ] 𝑇 and the coordinates of the points on the surface of the aggregate pile are [𝑋 𝑖 1 , 𝑌 𝑖 1 , 𝑍 𝑖 1 ] 𝑇 , [𝑋 𝑖 2 , 𝑌 𝑖 2 , 𝑍 𝑖 2 ] 𝑇 , [𝑋 𝑖 3 , 𝑌 𝑖 3 , 𝑍 𝑖 3 ] 𝑇 . Then the volume of the aggregate pile is calculated as follows formula 10:     3 2 1 , , min i i i i i Z Z Z S V     (10 ) ) ( i S  is the area of the i th triangle, obviously,     3 2 1 , , m in i i i i Z Z Z S   is the approximate value of the irregular cylinder in the graph. In order to improve the calculation accuracy, the exact volume of irregular cylinder i V is required [19]. The formula for calculating aggregate bulk volume is as follows formula 11:   i i V V (11 ) Research on Weighing of Concrete Aggregate Pile Based… Informatica 46 (2022) 1–12 9 Figure 12: Diagram of aggregate heap calculation. 5.1 Volume error correction of aggregate pile V olume calculation ignores the existence of particle voids in the volume of aggregate piles, so the volume error is inevitable. This paper attempts to use T-S fuzzy inference system to get the porosity of aggregate pile as a correction factor. Firstly, the area and perimeter of aggregate block are obtained, which are used as the input of void ratio reasoning. The watershed algorithm is used to obtain the surface block area and perimeter. The operation process is as follows: Calculate foreground markers. The reconstructed image is obtained by morphological techniques called ' Open after reconstruction' and ' Closed after reconstruction '. Then, by calculating the region extremum inside each block object, the foreground block seed mark region image is obtained. The foreground marker image is superimposed on the original image to obtain the foreground segmentation image of block aggregate heap. The area S and perimeter 1 of each aggregate block are calculated from the aggregate heap segmentation image. Next, the T-S fuzzy inference system is used to modify the initial volume, and the area S and perimeter 1 of the material block are defined as the input variables of the first-order T-S fuzzy inference. Finally, further volume date of aggregate piles are obtained, which slightly reduces the error. 5.2 Calculation of aggregate bulk density and weight In order to obtain the weight of aggregate pile, the density of aggregate pile needs to be measured. Since there are certain differences in the density of aggregate heaps composed of different sizes of aggregate blocks, this paper divides the aggregate heaps into coarse aggregate heap, medium aggregate heap and fine aggregate heap according to the size of aggregate blocks. Because the volume data of aggregate pile obtained by previous calculation are error data containing the internal space gap of aggregate pile, only the T-S fuzzy inference system is used to modify the initial volume to slightly reduce the volume error. So the reference (actual) density of the aggregate pile here is calculated in the following way: The aggregate pile is packed in an impervious bag and the reference (actual) volume of the aggregate pile is obtained by drainage method. Then weighing method, get the actual weight of aggregate pile. 6 Experimental discussion Table 3 and table 4 are volume and weight measurement results and errors: actual volume/cm 3 measuring volume/cm 3 error/% 7743.78 7528.57 1.28 7039.50 6727.53 4.94 5459.30 5255.98 3.74 4793.00 4670.90 2.67 4512.50 4310.43 4.45 3364.41 3377.63 0.37 3008.33 2994.18 0.46 Table 3 V olume Measurement Results and Errors actual quality/kg measurement quality/kg error/% 10.81 10.67 1.34 10.44 9.93 5.12 8.04 7.76 3.62 7.09 6.89 2.88 6.66 6.36 4.65 5.01 4.98 0.32 4.44 4.42 0.40 Table 4 Weight Measurement Results and Errors In this paper, a non-contact measurement method based on binocular vision is proposed for the measurement of aggregate pile weight, including the three-dimensional information extraction module, the weight calculation module, the three-dimensional reconstruction and the volume calculation method of the aggregate pile. The volume data calculated are slightly corrected, and the volume and weight of the target aggregate pile are finally calculated. The experimental 10 Informatica 46 (2022) 1–12 C. Su et al. results show that this method can measure the weight of aggregate pile in non-contact way. Different from the existing aggregate pile weighing technology, this method can avoid the cumbersome weighing of the aggregate pile in the traditional way by visual measurement, and the error is within 6 %, which can be applied to the actual aggregate pile weighing system. In further research, we will focus on improving the speed and accuracy of stereo matching. Although the proposed weighing method has a series of good performance, there are still some limitations, such as the camera is dirty in the actual production process, the void inside the aggregate pile is complex, and the color of the aggregate pile and the belt is too similar, which may lead to measurement error. The next phase will focus on addressing potential problems. In this stage of development, this method can only calculate the weight of aggregate heap in general. Acknowledgments The project was supported by the Independent Research Fund of the State Key Laboratory of Mining Response and Disaster Prevention and Control in Deep Coal Mines (no. SKLMRDPC20ZZ06) and the program in the Youth Elite Support Plan in Universities of Anhui Province (no. gxyq2020013). References [1] Lotfi Somayeh, Eggimann Manuel, Wagner Eckhard, Mroz Radoslaw, Deja Jan. Performance of recycled aggregate concrete based on a new concrete recycling technology[J]. Construction and Building Materials, 2015,95(octa1):243-256 https://doi.org/10.1016/j.conbuildmat.2015.07.021 [2] Di Cristo Cristiana, Greco Massimo, Iervolino Michele, Martino Riccardo, Vacca Andrea. A remark on finite volume methods for 2D shallow water equations over irregular bottom topography[J]. Journal of hydraulic research,2021,59(2):337-344 https://doi.org/10.1080/00221686.2020.1744752 [3] Panteleimon Chriskos, Christos A. Frantzidis, Polyxeni T. Gkivogkli, Panagiotis D. Amides, Chrisoula Kourtidou-Papadeli. Achieving Accurate Automatic Sleep Staging on Manually Pre-processed EEG Data Through Synchronization Feature Extraction and Graph Metrics[J]. Frontiers in Human Neuroscience,2018,12(1) https://doi.org/10.3389/fnhum.2018.00110 [4] Osswald, M., Ieng, SH., Benosman, R. et al. A spiking neural network model of 3D perception for event-based neuromorphic stereo vision systems. Sci Rep 7, 40703 (2017). https://doi.org/10.1038/srep40703 [5] Ze-wen Qiu and Min Wang "Non-contact measurement of complex surface object volume based on Image processing of double image field", Proc. SPIE 10841, 9th International Symposium on Advanced Optical Manufacturing and Testing Technologies: Meta-Surface-Wave and Planar Optics, 108410Q (30 January 2019); https://doi.org/10.1117/12.2506885 [6] Lu, P., Liu, Q., Guo, J. (2016). Camera Calibration Implementation Based on Zhang Zhengyou Plane Method. In: Jia, Y ., Du, J., Li, H., Zhang, W. (eds) Proceedings of the 2015 Chinese Intelligent Systems Conference. Lecture Notes in Electrical Engineering. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-48386-2_4 [7] Liu Hongqing. Fingerprint Identification Based on Wavelet Texture Features of Matlab[C]//. Proceedings of 2019 2nd International Conference on Computer Science and Advanced Materials (CSAM 2019). Francis Academic Press,2019:402-406. [8]BA. K. Bhandari, A. Singh and I. V. Kumar, "Spatial Context Energy Curve-Based Multilevel 3-D Otsu Algorithm for Image Segmentation," in IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol. 51, no. 5, pp. 2760-2773, May 2021, doi: 10.1109/TSMC.2019.2916876. https://doi.org/10.1109/TSMC.2019.2916876 [9] Z. Chao, L. Wei, S. Hongwei and L. Hong, "Three-dimensional surface reconstruction based on binocular vision," 2017 2nd International Conference on Robotics and Automation Engineering (ICRAE), 2017, pp. 389-393, doi: 10.1109/ICRAE.2017.8291416. http://doi.org/10.1109/ICRAE.2017.8291416 [10] Mingwei Shao,Zhenzhong Wei,Mengjie Hu. A flexible method for calibrating external parameters of two cameras with no-overlapping FOV[C]//International symposium on precision mechanical measurements.2016 https://doi.org/10.1117/12.2214697 [11] Wang, Y .; Wang, X.; Wan, Z.; Zhang, J. A Method for Extrinsic Parameter Calibration of Rotating Binocular Stereo Vision Using a Single Feature Point. Sensors 2018, 18, 3666. https://doi.org/10.3390/s18113666 [12] K. Salhi, E. M. Jaara and M. T. Alaoui, "Pretreatment Approaches for Texture Image Segmentation," 2016 13th International Conference on Computer Graphics, Imaging and Visualization (CGiV), 2016, pp. 221-225, doi: 10.1109/CGiV.2016.50. https://doi.org/10.1109/CGiV.2016.50 [13] R. Wang and Z. Liang, "Automatic Separation System of Coal Gangue Based on DSP and Digital Image Processing, “2011 Symposium on Photonics and Optoelectronics” (SOPO),2011, pp.1-3, doi:10.1109/SOPO.2011.5780625. https://doi.org/10.1109/SOPO.2011.5780625 [14] H. Hirschmuller, "Accurate and efficient stereo processing by semi-global matching and mutual information," 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05), 2005, pp. 807-814 vol. 2, doi: 10.1109/CVPR.2005.56. https://doi.org/10.1109/CVPR.2005.56 Research on Weighing of Concrete Aggregate Pile Based… Informatica 46 (2022) 1–12 11 [15] H. Hirschmuller, "Stereo Processing by Semiglobal Matching and Mutual Information," in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 30, no. 2, pp. 328-341, Feb. 2008, doi: 10.1109/TPAMI.2007.1166. https://doi.org/10.1109/TPAMI.2007.1166 [16] Zabih, R., Woodfill, J. (1994). Non-parametric local transforms for computing visual correspondence. In: Eklundh, JO. (eds) Computer Vision — ECCV '94. ECCV 1994. Lecture Notes in Computer Science, vol 801. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb00283455 [17] Zhong, L.; Qin, J.; Yang, X.; Zhang, X.; Shang, Y .; Zhang, H.; Yu, Q. An Accurate Linear Method for 3D Line Reconstruction for Binocular or Multiple View Stereo Vision. Sensors 2021, 21, 658. https://doi.org/10.3390/s21020658 [18] Yong Liu, Yanwei Zheng, "Accurate V olume Calculation Driven by Delaunay Triangulation for Coal Measurement", Scientific Programming, vol. 2021, Article ID 6613264, 10 pages, 2021. https://doi.org/10.1155/2021/6613264 [19] Z. Chao, L. Wei, S. Hongwei and L. Hong, "Three-dimensional surface reconstruction based on binocular vision," 2017 2nd International Conference on Robotics and Automation Engineering (ICRAE), 2017, pp. 389-393, doi: 10.1109/ICRAE.2017.8291416. https://doi.org/10.1109/ICRAE.2017.8291416