Accumulation body image repose angle measuring method

Through image processing technology, the outer contour of the stacked body is extracted and polynomial fitted, and the tangent slope is calculated to determine the angle of rest, which solves the problem of large errors in traditional measurement methods and improves measurement accuracy and reliability.

CN120107294APending Publication Date: 2025-06-06HEBEI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510199033.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The traditional rest angle measurement method has a systematic error in the measurement results due to the unsatisfactory shape of the stacked body. The actual rest angle is often smaller than the true value, and the measurement accuracy is insufficient.

Method used

The stacked volume image angle of rest measurement method is adopted, and the stacked volume profile is accurately extracted and the angle of rest is calculated through steps such as image preprocessing, outer contour extraction, bottom contour removal, upper contour curve polynomial fitting, fitting effect evaluation, tangent point acquisition, tangent equation solution and angle of rest calculation.

Benefits of technology

By accurately describing the actual shape of the stacking body, errors in traditional methods are avoided, the accuracy and reliability of angle of rest measurement are improved, and more reliable parameter basis is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107294A_ABST
    Figure CN120107294A_ABST
Patent Text Reader

Abstract

The accumulation body image repose angle measurement method comprises the following steps: (1) image preprocessing; (2) outer contour extraction; (3) bottom contour removal; (4) performing polynomial fitting on the upper profile curve of the accumulation body image; (5) evaluating a fitting effect and determining a fitting polynomial function; (6) solving a tangent point of the fitting straight line segment; (7) solving a tangent equation; and (8) calculating a repose angle. According to the method, the complete contour of the accumulation body is processed, the shape information of the accumulation body is accurately obtained, and errors caused by assuming an ideal shape are avoided; polynomial fitting is carried out on the contour curve of the upper portion of the accumulation body, and the actual shape of the accumulation body can be described more accurately through a simple mathematical expression; the second derivative of the fitting function is zero, the tangent point of the fitting straight line segment is found, the tangent equation is solved, the repose angle is calculated according to the tangent slope, repose angle deviation caused by measurement errors is avoided, and the measurement precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for measuring an angle of repose, in particular to a method for measuring an angle of repose of a deposited body image, and belongs to the technical field of image processing and measurement of physical properties of granular materials. Background Art

[0002] The angle of repose is an important parameter for measuring the fluidity and stacking characteristics of granular materials. It is widely used in industrial production, construction engineering, geological exploration and other fields. The traditional method of measuring the angle of repose is usually to measure the height and bottom diameter of the pile and calculate it using simple geometric relationships. In the actual experimental measurement process of this method, the impact force generated by the particles' own gravity will cause the top of the pile to be clipped. At the same time, the inertia of the sand particles sliding down will cause the bottom edge to be non-slanted and straight, making the formed pile not an ideal cone shape, which will lead to systematic errors in the measurement results. The measured angle of repose is often smaller than the true value.

[0003] With the development of image processing technology, the application of image measurement methods of angle of repose in physical parameter measurement has gradually attracted attention. Compared with traditional measurement methods, the measurement method based on image processing has the advantages of non-contact, high precision, and fast speed. It can obtain the shape information of the deposit more accurately, and provides a new idea for the accurate measurement of the angle of repose. The current method of measuring the angle of repose of deposit images directly fits the half-part contour of the deposit through a straight line. When this method obtains the outer contour of the deposit, the top clipping part and the bottom sliding part will cause great interference to the measurement result, resulting in insufficient measurement accuracy. Therefore, there is a need for a method of measuring the angle of repose that can accurately extract the contour of the deposit and effectively avoid interference from the top and bottom, so as to solve the shortcomings of the existing methods and improve the accuracy and reliability of the measurement of the angle of repose of the deposit image. Summary of the invention

[0004] In view of the error problem of traditional angle of repose measurement methods, the present invention proposes a method for measuring the angle of repose of a deposited body image, which can more accurately describe the actual shape of the deposited body, improve the accuracy of the angle of repose measurement, and provide a more reliable parameter basis for applications in related fields.

[0005] The method for measuring the angle of repose of a deposited body image comprises the following steps: (1) Image preprocessing: The acquired color accumulation image must first be grayscaled, and then the grayscale image must be binarized; (2) Outer contour extraction: The Canny operator is used to extract the outer contour of the accumulation body; (3) Bottom contour removal: set a threshold and cut out the bottom contour of the outer contour of the accumulation image; (4) Polynomial fitting of the upper contour curve of the accumulation image: The fitting polynomial function is: y = an x n +a n−1 x n−1 +⋯+a 1 x+a 0 , where x is the horizontal coordinate of the contour curve, y is the vertical coordinate of the contour curve, and n ranges from 4 to 12; (5) Evaluation of fitting effect and determination of fitting polynomial function: Calculation of the coefficient of determination R of each order of fitting polynomial 2 , according to R 2 The closeness to 1 determines the best fitting polynomial function; (6) Obtain the tangent point of the fitted straight line segment: Set the second-order derivative of the fitted polynomial function to zero and obtain the tangent point (x, y) of the fitted straight line segment; (7) Obtain the tangent line equation: Obtain the tangent line y=kx+b of the fitted polynomial curve through the tangent point (x, y), where k is the slope of the tangent line and b is the intercept of the tangent line. (8) Calculation of the angle of repose: The angle of repose is calculated based on the slope of the tangent. The calculation formula for the angle of repose ɵ is: ɵ = |tan -1 k|, where k is the slope of the tangent line.

[0006] Beneficial technical effects of the present invention: (1) By processing the complete contour of the deposit, the shape information of the deposit can be accurately obtained, avoiding the error caused by assuming an ideal shape in traditional methods; (2) Perform polynomial fitting on the upper contour curve of the deposit, evaluate the fitting effect by calculating the determination coefficient R2, and select the best fitting polynomial function, which can accurately describe the actual shape of the deposit with a concise mathematical expression; (3) By making the second-order derivative of the fitting function zero, the tangent point of the fitting straight line segment is found and the tangent equation is solved. The angle of repose is calculated based on the slope of the tangent. This avoids the deviation of the angle of repose caused by measurement error in traditional methods and improves the measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 It is a flow chart of the method for measuring the angle of repose of a deposited body image of the present invention; Figure 2 This is a grayscale processing effect diagram of the particle accumulation image of the present invention; Figure 3 It is a binary processing effect diagram of the deposited body image of the present invention; Figure 4 It is the outer contour image of the accumulation body image extracted by the Canny operator in the present invention; Figure 5 It is the outer contour diagram of the deposited body image after removing the bottom contour of the present invention; Figure 6 It is a polynomial fitting effect diagram of the outer contour of the upper part of the deposited body of the present invention; Figure 7 It is a schematic diagram of fitting a polynomial curve to obtain a tangent line according to the present invention. DETAILED DESCRIPTION

[0008] Combined with Figure 1-7 , describing the steps and specific operations of the present invention.

[0009] The present invention aims at measuring the repose angle of a particle accumulation body image, uses image processing technology to perform partial fitting on the outer contour of the accumulation body, and achieves the purpose of accurately measuring the repose angle.

[0010] Deposits can be divided into physical entity images and simulation model images according to their types. For physical entity images, clear deposit images can be obtained by frontal photography using an image acquisition device such as a camera. For simulation model images, deposit images can be obtained by screenshots.

[0011] The method for measuring the angle of repose of a deposited body image comprises the following steps: (1) Image preprocessing: The acquired color accumulation image must first be grayscaled, and then the grayscale image must be binarized; (2) Outer contour extraction: The Canny operator is used to extract the outer contour of the accumulation body; (3) Bottom contour removal: set a threshold and cut out the bottom contour of the outer contour of the accumulation image; (4) Polynomial fitting of the upper contour curve of the accumulation image: The fitting polynomial function is: y = a n x n +a n−1 x n−1 +⋯+a 1 x+a 0 , where x is the horizontal coordinate of the contour curve, y is the vertical coordinate of the contour curve, and n ranges from 4 to 12; (5) Evaluation of fitting effect and determination of fitting polynomial function: Calculation of the coefficient of determination R of each order of fitting polynomial 2 , according to R 2 The closeness to 1 determines the best fitting polynomial function; (6) Obtain the tangent point of the fitted straight line segment: Set the second-order derivative of the fitted polynomial function to zero and obtain the tangent point (x, y) of the fitted straight line segment; (7) Obtain the tangent line equation: Obtain the tangent line y=kx+b of the fitted polynomial curve through the tangent point (x, y), where k is the slope of the tangent line and b is the intercept of the tangent line. (8) Calculation of the angle of repose: The angle of repose is calculated based on the slope of the tangent. The calculation formula for the angle of repose ɵ is: ɵ = |tan -1k|, where k is the slope of the tangent line.

[0012] Specifically, the main steps of the method for measuring the angle of repose of a deposited body image of the present invention are as follows: 1. Image preprocessing Grayscale and binarization methods are mainly used in image preprocessing.

[0013] Image preprocessing is one of the key steps in the entire angle of repose measurement method. Its purpose is to convert the original acquired color image into a binary image that is convenient for subsequent processing, while removing noise and interference to ensure that the outline of the deposit can be accurately extracted. Image preprocessing mainly includes the following two steps: (1) Grayscale processing: Grayscale images only contain brightness information and remove color information, which helps reduce the amount of data and simplify subsequent processing steps. Grayscale can be achieved through a variety of methods. The most commonly used method is the weighted average method, which is to add the values ​​of the three RGB channels according to a certain weight to obtain the grayscale value; (2) Binarization: The image is converted into a binary image by setting an appropriate threshold.

[0014] Image preprocessing is achieved through the opencv, numpy, and matplotlib code libraries in the Python program code. Specifically, the cvtColor function in the opencv library is used for grayscale operations, the threshold function is used for binarization operations, and finally the processed image is plotted through the pyplot function in the matplotlib library.

[0015] 2. Outline extraction The purpose of contour extraction is to extract the outer contour of the accumulation body from the preprocessed binary image for subsequent shape analysis and fitting. This method uses the Canny operator to extract the edge contour of the accumulation body and obtains the contour coordinate point set through findContours.

[0016] This step is implemented through the opencv, numpy, and matplotlib code libraries in the Python program code. First, use the cv2.Canny function to detect the edge contour of the image, and use the findContours function to extract the contour in the image. The function returns a list of contours, each of which is a set of coordinate points. Among them, cv2.RETR_EXTERNAL is used to detect the outermost contour in the image. cv2.CHAIN_APPROX_NONE is a contour approximation method, which means compressing the contour, deleting all redundant points, and only retaining the inflection point information of the contour. This can reduce the storage volume of the contour data while retaining the main shape features of the contour. At the same time, cv2.contourArea(contour) is used to calculate the area of ​​all contours, and the area threshold is set to delete the contours with smaller areas to further reduce redundant contours. Then, the extracted contour points are converted into numpy arrays through the np.array function in the numpy library. The pyplot function in the matplotlib library is used to draw the coordinate system and the outer contour image with the bottom direction as the X-axis and the height direction as the Y-axis. Since the upper left corner of the extracted image pixel is the starting point by default, and the starting point of the coordinate system we are familiar with is in the lower left corner, the coordinate system is transformed through the equation y*=hy-1, where y* is the ordinate value of the contour point after transformation, y is the ordinate value of the contour point before transformation, and h is the total height of the image.

[0017] 3. Bottom contour removal Since the obtained outer contour of the pile body includes two parts, the upper and lower parts, but the measurement of the repose angle of the pile body only needs the upper contour, the points of the bottom contour are redundant parts, and the contour part of the bottom of the pile body needs to be removed and the upper contour curve needs to be retained.

[0018] First, a vertical coordinate threshold y is set according to the height of the stack and the size of the image a , used to cut off the bottom contour; then, the threshold is used to cut off the binary image and remove the bottom contour.

[0019] The contour point array extracted in step 2 determines the range of the ordinates of all contour points (y min ,y max ), then y a =1.05y min Then, use the if statement to filter the y* <y a Finally, the processed image is plotted through the pyplot function in the matplotlib library to obtain the final contour to be fitted after cutting.

[0020] 4. Polynomial fitting of the upper contour curve of the accumulation image By extracting the coordinates of the points on the contour curve, these points are fitted using a polynomial fitting function to obtain a polynomial function. In order to ensure the fitting effect, it is necessary to try polynomials of different orders and select the polynomial with the best fitting effect as the final fitting function.

[0021] The specific steps are as follows: (1) Store the coordinates of the points on the contour curve after shearing; (2) Use the numpy.polyfit function to fit a polynomial to these points, trying polynomials of different orders; (3) Draw a graph of the fitting function.

[0022] This step is implemented through the opencv, numpy, and matplotlib code libraries in the Python program code. First, a list filtered_points.appand() is created to store the coordinates of the remaining points. Then, the coordinates are converted into NumPy arrays through the array function for subsequent polynomial fitting. Then, the polynomial fitting is performed on these points through the numpy.polyfit function, and a polynomial object is created through the coefficient list through the np.poly1d function. Finally, the fitted polynomial image is plotted through the pyplot function in the matplotlib library.

[0023] 5. Evaluate the fitting effect and determine the fitting polynomial function After completing the polynomial fitting, the fitting effect needs to be evaluated to ensure that the selected polynomial can accurately describe the contour of the accumulation body. The quality of the fitting effect can be evaluated by calculating the coefficient of determination R2.

[0024]

[0025] In the formula, y i is the value of the actual data point; is the fitting curve at x i The value at is the mean of the actual data; n is the total number of data points.

[0026] Coefficient of determination R 2 It is a statistic that indicates the degree to which the fitted model explains the observed data. The closer it is to 1, the better the fitting effect. In practice, we usually start from a lower order and gradually increase the order of the polynomial until R 2 The value reaches a satisfactory level, or increasing the order no longer significantly improves R 2Although a high-order polynomial may provide a better fitting effect, it may also cause overfitting problems. Based on a large amount of test experience, the order n of the polynomial fitting is determined to be in the range of 4 to 12.

[0027] 6. Find the tangent point of the fitted straight line segment According to the definition of the angle of repose, the angle between the part of the fitting function curve that approaches a straight line and the horizontal direction can approximately represent the angle of repose of the accumulation body, and the slope of the part that approaches a straight line is the same: the first-order derivative image approaches the horizontal, and the second-order derivative approaches 0. Therefore, by calculating the root of the second-order derivative function of the fitting function to zero, the part of the regional straight line in the fitting function can be obtained.

[0028] The specific steps are as follows: (1) Calculate the second-order derivative of the fitting polynomial; (2) Find the point where the second-order derivative is zero and obtain the coordinates of the tangent point.

[0029] This step is implemented through the numpy code library in the Python program code. The second-order derivative of the polynomial is calculated through the function np.polyder(). Since the pile generally has two repose angles on the left and right, two different roots will be obtained. The point where the second-order derivative is zero is solved through the function np.roots() to obtain the horizontal coordinate x of the tangent point. 1 and x 2 , respectively, into the fitting polynomial to obtain the tangent point coordinates (x 1 ,y 1 ) and (x 2 ,y 2 ).

[0030] 7. Find the tangent line equation After determining the tangent point, you need to calculate the tangent line equation at the tangent point. By solving the first-order derivative of the fitting polynomial at the tangent point, you can get the slope of the tangent line, and then find the tangent line equation y=kx+b, where k is the slope of the tangent line and b is the intercept of the tangent line.

[0031] The specific steps are as follows: (1) Calculate the first-order derivative of the fitting polynomial at the tangent point to obtain the slope of the tangent line; (2) Use the point-slope form to find the equation of the tangent line.

[0032] This step is implemented through the numpy and matplotlib code libraries in the Python program code. The first-order derivative of the polynomial is calculated by the function np.polyder(), and x is 1 、x 2 Substitute into the slope k 1 , k 2 Then according to (yy1 )=k 1 (xx 1 ), (yy 2 )=k 2 (xx 2 ), and the tangent line equation is obtained. Finally, the obtained tangent line image is plotted using the pyplot function in the matplotlib library.

[0033] 8. Calculate the angle of repose The angle of repose is calculated based on the slope of the tangent. The angle of repose is the angle between the tangent and the horizontal line, calculated using the inverse tangent function. The formula for calculating the angle of repose ɵ is: ɵ=|tan -1 k|, where k is the slope at the tangent point.

[0034] This step is implemented through the numpy code library in the python program code. The arc tangent value is obtained through the np.arctan function, and the arc tangent result is converted into an angle through the np.degrees function.

Claims

1. A method for measuring the angle of repose of an accumulation body image, which is used for measuring the angle of repose of an accumulation body, comprises the following steps: (1) Image preprocessing; (2) Outer contour extraction; (3) Bottom contour removal; (4) Polynomial fitting of the upper contour curve of the accumulation image; (5) Evaluate the fitting effect and determine the fitting polynomial function; (6) Find the tangent point of the fitted straight line segment; (7) Find the equation of the tangent line; (8) Calculate the angle of repose.

2. The method for measuring the angle of repose of a deposited body image according to claim 1, characterized in that: Step (1) image preprocessing includes graying the acquired color accumulation body image and then binarizing the gray image.

3. The method for measuring the angle of repose of a deposited body image according to claim 1, wherein: Step (2) Outer contour extraction: The Canny operator is used to extract the outer contour of the accumulation body.

4. The method for measuring the angle of repose of a deposited body image according to claim 1, wherein: The steps of removing the bottom contour in step (3) are as follows: first, a vertical coordinate threshold is set according to the height of the pile and the size of the image to cut the bottom contour; then, the threshold is used to cut the binary image to remove the bottom contour part.

5. The method for measuring the angle of repose of a deposited body image according to claim 1, characterized in that: Step (4) The fitting polynomial function of the polynomial fitting of the upper contour curve of the accumulation image is: y = a n x n +a n−1 x n−1 +⋯+a1x+a0, where x is the horizontal coordinate of the contour curve, y is the vertical coordinate of the contour curve, and n ranges from 4 to 12.

6. The method for measuring the angle of repose of a deposited body image according to claim 1, characterized in that: Step (5) The method of evaluating the fitting effect and determining the fitting polynomial function is to calculate the determination coefficient R of each order of the fitting polynomial 2 , according to R 2 The closeness to 1 determines the best fitting polynomial function.

7. The method for measuring the angle of repose of a deposited body image according to claim 1, characterized in that: The method for obtaining the tangent point of the fitted straight line segment in step (6) is to set the second-order derivative of the fitting polynomial function to zero and calculate the tangent point of the fitted straight line segment.

8. The method for measuring the angle of repose of a deposited body image according to claim 1, wherein: Step (8) The formula for calculating the angle of repose is: ɵ = |tan -1 k|, where k is the slope of the tangent line.