Automatic Measurement Method of Slump Flow of Cement Paste Based on Dynamic Image Processing Technology

e slump ow and ow time T200 are the main parameters to evaluate the rheological properties of cement paste. Generally, the manual measurement method is used and it is dicult to get T200 accurately. In this paper, an automatic measurement method of slump ow based on dynamic image processing technology is studied. Firstly, the cement paste owability test video is divided into frames every 100ms; secondly, based on the principle of perspective transformation, an automatic point selection method is proposed to correct the frame image to solve the problem of shooting angle; thirdly, the watershed algorithm based on distance transformation is used to segment the boundary of the cement paste area, and the slump ow is calculated according to the polar coordinates of the boundary; lastly, the relationship curve between slump ow and time is automatically output, and the slump ow at any time is obtained. e method is veried by nine groups of cement paste owability tests. e results show that this method can fastly and accurately obtain the slump ow and ow time T200. Compared with the traditional manual measurement method, the measurement error of slump ow is less than 2%, and the measurement error of ow time T200 is less than 8%. e method enables real-time dynamic measurement of the slump ow.


Introduction
It is generally accepted that fresh cement-based materials such as concrete, cement mortar, and cement paste are Bingham uids. Yield stress and plastic viscosity are the two basic physical parameters characterizing their rheological behavior [1]. e rheology of cement paste is an important parameter for evaluating the workability of self-compacting concrete. e two rheological parameters of cement paste can be calculated from the slump ow and the ow time T200, which are obtained from the cement paste owability test [2,3]. e slump ow is usually measured manually, while T200 is di cult to be obtained directly by the manual measurement and needs to read the cement paste owability test video, which is a tedious operation. With the continuous upgrading of information technology and arti cial intelligence industries, the automation of image processing has gradually become the future development trend. In image processing, orthogonal polynomial transform plays an important role, which is widely used in face recognition, target classi cation, template matching, and image edge detection [4,5]. At present, there are few studies on the rheological process of cement paste by using image processing technology.
Tregger et al. [6] used MATLAB software to take the position with the maximum image brightness gradient as the boundary of the cement paste and calculate the slump ow by the boundary coordinates information.
is method strictly requires the camera imaging surface to be parallel to the glass plate, and T200 cannot be obtained accurately. Shen [7] took photos with a smartphone and estimated the slump ow by the proportion of concrete and a prede ned sign in the image.
is method requires arti cially specifying concrete boundary points on the mobile phone, and the object needs to be photographed squarely. Li et al. [8] rst calculated the spatial location coordinates of the identication image using the Vuforia Technology and took the distance between the two endpoints as the slump ow. is method solves the problem of shooting angle, but it still requires artificially selected boundary points. Based on the Vuforia package, Nie [9] first corrected the image according to the coordinate information of the identification image and took the position with the maximum image brightness gradient vector as the boundary of the cement paste. is method can accurately obtain the slump flow, but there is an obvious error in the measurement of T200. e improvement is difficult because the internal parameters of Vuforia cannot be adjusted.
In fact, the measurement of the flow time T200 and the slump flow boils down to finding the diameter of the cement paste at a specific moment. In this paper, based on Python language and OpenCV library [10], an automated detection technology of slump flow is studied. rough the framing processing, image correction, boundary segmentation, and other steps of the cement paste flowability test video, the relationship curve between slump flow and time can be output automatically, and the slump flow corresponding to any moment can be obtained; the automatic detection process is achieved. Moreover, the measurement accuracy is greatly improved. e image processing technology is applied to the field of cement-based material workability testing to improve efficiency and lay the foundation for smart production of concrete.

Method of Image Correction
Automatically. It is difficult to achieve image alignment when shooting the cement paste flowability test video, so the images need to be corrected first.
In this paper, the perspective transformation [11] method is used to correct the glass plate, as shown in a11 a12 a13 a21 a22 a23 a31 a32 a33 where [x ′ , y ′ , w ′ ] is the transformed coordinate, [u, v, w] is the coordinate before the transformation, a11 a12 a13 a21 a22 a23 a31 a32 a33 is the transformation matrix, and a33 is a constant with the value 1. Since the image being processed is two-dimensional, w is constant at 1. As shown in the following equation, e two-dimensional image transformation equation can be obtained. As shown in the following equation, erefore, the transformation matrix can be solved only by giving the coordinates of the original image's four corner points (u, v) and the transformed image's target coordinates. e critical problem is how to determine the coordinates of the four corner points of the image before the transformation. In this paper, two methods are proposed to determine the coordinates of four corner points before transformation: manual point selection and automatic point selection methods.

Manual Point Selection Method.
is method calls the mouse event in OpenCV, using the function setMouse-Callback(). By tapping the four corner points of the glass plate in the image, their coordinate values can be obtained [12]. e order of the selected points is recommended to be A, B, C, and D. e correction results of the manual point selection method are shown in Figure 1.

Automatic Point Selection Method.
Based on the analysis of the characteristics of the corner coordinates of the original image, a method for automatically obtaining the four corner coordinates of the glass plate before transformation is proposed. As shown in Figure 2, M and K are points with the smallest and largest X coordinate values; N and L are points with the smallest and largest Y coordinate values, respectively. e NumPy library can obtain these four corner coordinates in Python [13]. Just rotate the glass plate counterclockwise at a certain angle to make its corner coordinates comply with Figure 2. e result of automatic correction of the glass plate using the perspective transformation function is shown in Figure 3. e result of the automatic correction of the glass plate using the perspective transformation function is shown in Figure 3.

Image Boundary Segmentation.
After image correction, the cement paste area needs to be segmented from the glass plate. e boundary of the cement paste can be found to calculate the slump flow, that is, the maximum diameter of the cement paste area. In this paper, three algorithms are compared as follows.

Watershed Algorithm Based on Distance
Transformation. e foreground and background are labeled with different colours (or grayscale values), and the areas of uncertainty are labeled with 0. en, the watershed algorithm [14] is implemented to update the labels, and the boundary information of the target is obtained when the foreground and background meet [15]. In this paper, the area of cement paste is the foreground, and the area other than the cement paste is the background. e main steps are as follows: (1) Binarization [16], preset threshold Q, and pixel points with grayscale values less than Q are set as black, and those greater than or equal to Q are set as white.
2 Advances in Materials Science and Engineering (2) Morphological operations [17] remove all white noise in the image.

HSV Colour Segmentation Algorithm.
Compared with the RGB model, the HSV model is easier to track objects of a specific colour [18].
e H-value indicates the hue, the S-value indicates the saturation, and the V-value indicates the luminance. e colour of the cement paste area is relatively uniform and obviously different from other areas. erefore, a range of pixel values can be obtained by extracting the HSV value of the cement paste area, the pixel value located in this range is set to 255 (white), and the pixel value below or above this range is set to 0 (black). e results are shown in Figure 5.

GrabCut Foreground Segmentation Algorithm.
e GrabCut algorithm is based on colour features and edge features of the image [19]. e premise of image segmentation using the GrabCut algorithm is that there is a significant colour difference between foreground and background. e implementation process is to select the foreground area (cement paste) with the mouse; through the selected foreground information, obtain the remaining foreground and background; get the segmentation result after several iterations of calculation. e segmentation results may be different for different ways of foreground selection. As shown in Figure 6, the selection of foreground 2 cannot get a satisfactory segmentation result.

Calculation of Slump Flow.
In this paper, the watershed algorithm based on distance transformation is selected to segment the boundary of the corrected area of cement paste. e extreme points of the boundary are obtained by using the NumPy library [20]. As shown in Figure 7, the maximum diameter of the cement paste area can be calculated according to where (P 2 − P 1 ) is the distance between points P 1 and P 2 , and (P 4 − P 3 ) is the distance between points P 3 and P 4 . After the video is frame-separated, the above operation is performed for all images in turn. e visualization tool Matplotlib is used to draw the relationship curve between slump flow and time, as shown in Figure 8.

Automatic Test Method for Flowability of Cement Paste
e mapped desktop colour is not conducive to identifying the boundary of the glass plate, so the bottom of the glass plate can be padded with white paper or sprayed with white paint, and the outer ring wrapped with a yellow rubber band (size in 5 cm-8 cm), as shown in Figure 9(a). In addition, the laptop needs to be connected to an external USB camera, and the whole procedure is executed by the laptop, as shown in Figure 9(b). e process of automatic measurement of slump flow of cement paste is as follows: (1) Start-up procedure while the tester lifts the slump cone, and shoot the video of the cement paste flowability test automatically.   e flowchart is shown in Figure 10. In order to facilitate the conversion between the image pixel distance and the actual size, the size of the corrected glass plate can be set as the actual size, and the distance between the pixel value of the minimum point and the maximum point of the horizontal coordinate is the actual distance.

The Test Results and Analysis for Slump Flow Test of Cement Paste
Based on the above method, nine groups of flowability tests of cement paste were conducted with the water powder ratio being 0.9, 1.0, and 1.1 and the admixture content was 0.5%, 0.6%, and 0.7%. e results of slump flow by using a steel ruler and the automatic measurement results are shown in Table 1. It can be seen that the relative errors of the measurement results are minor and are below 2%. e method can record the slump flow every 100 ms, and the SF-T curve shows that the flow rate decreases gradually with time, which shows a high agreement with the manual measurement and can replace the manual measurement.
To compare with the results of automatic measurement, T200 can be obtained by observing the pictures. For example, if the diameter of the cement paste area in the nth picture after the framing process is exactly 200 mm, then T200 can be calculated with T200 � 100 ms · n. (5) Concurrently, this paper uses the algorithm in reference [9] to measure T200. e comparison results of the three methods are shown in Table 2. It can be seen that the relative error between the accurate value and the calculation result of the algorithm proposed in this paper is less than 8%. Compared to the algorithm in reference [9], there is a great improvement in the measurement accuracy. It can be used in practical experiments.

Conclusion
In this paper, based on dynamic image processing technology, the automatic detection method for the flowability test of cement paste is studied. is method is verified by nine groups of flowability tests of cement paste. e conclusions are as follows. e corner coordinates of the glass plate before transformation can be obtained fastly and accurately by using the automatic point selection method; the relationship curve between slump flow and time can be output automatically to get the slump flow at any moment; the errors of measurement results about slump flow are below 2%; the errors of measurement results about T200 are below 8%; this method is efficient and straightforward, which can replace the manual measurement method, and provides effective support for the mix proportion optimization system of selfcompacting concrete.
is work has the following limitations: the method has certain requirements for the brightness of the measurement environment, in addition to the interference of water damage and human shadows, which needs further improvement. In the future, this technology can be further applied to test the workability of concrete and develop a feedback mechanism based on the test results to adjust the mix proportion in real-time and realize smart production of concrete.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.