A method for contactless measurement of ice masonry volume on a conveyor belt of a production line
Through image acquisition and multi-scale fusion filtering processing, combined with Grabcut algorithm, ice masonry image segmentation is performed, and the ice masonry volume is finally calculated through the minimum external rectangle fitting, which solves the problem that the existing technology cannot achieve contactless ice masonry volume measurement, and realizes efficient and automated ice masonry volume measurement.
Patent Information
- Application Number
- CN202410421856.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-04-09
AI Technical Summary
The prior art cannot achieve contactless volume measurement of ice masonry with translucent and reflective characteristics on production line conveyor belts, resulting in low automation and low productivity.
Using an image acquisition and processing method, image acquisition is triggered by limit switches, multi-scale fusion filtering is used to pre-process the image, combined with Grabcut algorithm for image segmentation, and finally the volume of ice masonry is calculated by fitting the minimum external rectangle.
The contactless and automated volume measurement of the ice masonry on the production line conveyor belt is achieved, which improves the accuracy and efficiency of measurement, and reduces the impact of manual intervention and the natural environment.
Smart Images

Figure CN118172405B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for measuring the volume of ice masonry, in particular to a method for contactlessly measuring the volume of ice masonry on a conveyor belt of a production line, and belongs to the technical field of image recognition. Background Art
[0002] In the construction of modern ice landscapes, in order to improve the construction efficiency of ice buildings, many companies have begun to develop standardized ice masonry manufacturing equipment. However, the ice masonry cutting site is located on the outdoor river surface, with a complex surrounding environment and great influence from the natural environment. Moreover, the ice masonry is naturally formed river ice, which has the characteristics of translucency and reflection. In addition, due to the uncertainty of the weight of the ice masonry and the number of manual ice loading, the conveyor belt will be affected by speed fluctuations. Based on the above reasons, the current image processing algorithm cannot meet the requirements of on-site application, and the volume measurement of ice masonry is still completed manually. However, in an outdoor environment of minus 30°, manual detection has the problems of high labor intensity, poor detection stability and consistency, low degree of automation and low production efficiency.
[0003] In summary, a method for measuring the volume of ice masonry that can achieve automatic detection and contactless is needed. Summary of the invention
[0004] A brief overview of the present invention is provided below in order to provide a basic understanding of certain aspects of the present invention. It should be understood that this overview is not an exhaustive overview of the present invention. It is not intended to identify key or important parts of the present invention, nor is it intended to limit the scope of the present invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to a more detailed description discussed later.
[0005] In view of this, in order to solve the problem that the traditional ice masonry volume measurement method in the prior art cannot perform non-contact volume measurement of ice masonry with translucent and reflective characteristics on the conveyor belt of the production line, the present invention provides a method for non-contact measurement of the volume of ice masonry on the conveyor belt of the production line.
[0006] The technical solution is as follows: A method for contactlessly measuring the volume of ice masonry on a conveyor belt of a production line comprises the following steps:
[0007] S1. Capture an image of the ice masonry on the conveyor belt of the production line based on the limit switch trigger to obtain the original image;
[0008] S2. Preprocess the original image based on multi-scale fusion filtering to obtain four groups of image details, and weightedly fuse all the image details into the original image to obtain the final image processing result;
[0009] S3. Pre-set the segmentation area of the Grabcut algorithm, use the Grabcut algorithm to segment the final image processing result, and obtain the segmented ice masonry image;
[0010] S4. Perform minimum bounding rectangle fitting on the segmented ice masonry image, obtain the actual length, width and height of the ice masonry according to the length, width and height pixel values of the obtained minimum bounding rectangle, and multiply the length, width and height to obtain the volume of the ice masonry.
[0011] Further, in S2, the multi-scale fusion filtering includes Gaussian filtering and median filtering;
[0012] The processing formula of Gaussian filtering is expressed as:
[0013]
[0014] Where G is the Gaussian filter function, (x, y) is the coordinate of the image pixel, σ is the sigma value of the Gaussian filter, and k is the Gaussian kernel value of the Gaussian filter;
[0015] The processing formula of median filtering is expressed as:
[0016] Y[n,m]=median(x'[nz],…,x'[n],…,x'[n+z])
[0017] Where x' is the original signal, Y is the filtered signal, n is the current position, z is the window size, median is the median function, and m is the kernel value of the median filter;
[0018] Performing a first Gaussian filter on the original image using a multi-scale fusion filter to obtain a first processed image, performing a first median filter on the first processed image to obtain a second processed image, performing a second Gaussian filter on the second processed image to obtain a third processed image, and performing a second median filter on the third processed image to obtain a fourth processed image;
[0019] The formula of multi-scale fusion filtering is expressed as:
[0020] B1=img*G(x 1 ,y 1 ,k 1 )
[0021] B2=B1*Y(n 1 ,m 1 )
[0022] B3=B2*G(x 2 ,y 2 ,k 2 )
[0023] B4=B3*Y(n2 ,m 2 )
[0024] D1=img-B1
[0025] D2=B1-B2
[0026] D3=B2-B3
[0027] D4=B3-B4
[0028] Among them, img is the original image, k 1 is the Gaussian kernel value of the first Gaussian filter, and the sigma value of the first Gaussian filter is σ 1 ,(x 1 ,y 1 ) is the image pixel coordinate of the original image, B1 is the first processed image, m 1 is the first median filter kernel value, n 1 is the current position of the first processed image, B2 is the second processed image, (x 2 ,y 2 ) is the image pixel coordinate of the second processed image, k 2 is the Gaussian kernel value of the second Gaussian filter, and the sigma value is σ 2 , B3 is the third processed image, m 2 is the second median filter kernel value, n 2 is the current position of the third processed image, B4 is the fourth processed image, D1 is the first image detail, D2 is the second image detail, D3 is the third image detail, and D4 is the fourth image detail;
[0029] Add corresponding weight coefficients to the image details and fuse them into the original image to obtain the final image processing result F;
[0030] The weight coefficient is expressed as:
[0031] ω 1 =0.5
[0032] ω 2 =0.25
[0033] ω 3 =0.125
[0034] ω 4 =0.125
[0035] Among them, ω 1 is the first weight coefficient, ω 2 is the first weight coefficient, ω 3 is the first weight coefficient, ω 4 is the first weight coefficient;
[0036] The final image processing result F is expressed as:
[0037]
[0038] Where N = 4, ω i is the weight coefficient, D i For image details.
[0039] Furthermore, in S3, the length c and width d of the segmentation area are determined according to the actual size of the ice masonry, and the ice masonry is determined to be in the center of the image. The center point of the ice masonry in the image is taken as the origin, the length c of the segmentation area is equal to twice the length of the ice masonry in the image, and the maximum value of the length c is the image length, and the width d is equal to twice the width of the ice masonry in the image, and the maximum value of the width d is the image width.
[0040] The beneficial effects of the present invention are as follows: the present invention enhances the details of the ice masonry image through multi-scale fusion filtering, which greatly reduces the impact of the natural environment on the image. The traditional Grabcut segmentation algorithm does not have an ideal segmentation effect when processing complex natural backgrounds and requires manual interaction. The introduction of multi-scale fusion filtering into the preprocessing enables the improved Grabcut segmentation algorithm to achieve fully automatic segmentation without the need for multiple iterations, reducing the algorithm processing time, and meeting the image segmentation requirements of ice masonry on the conveyor belt of the production line in natural scenes, laying the foundation for the subsequent minimum circumscribed rectangle fitting and ice masonry volume measurement, and converting the length, width and height pixel values after the minimum circumscribed rectangle fitting to obtain the actual length, width and height dimensions of the ice masonry, and multiplying the three to obtain the volume of the ice masonry, thereby realizing non-contact measurement of the volume of the ice masonry on the conveyor belt of the production line and meeting the measurement accuracy requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0042] Figure 1 The present invention is a schematic flow chart of a method for contactless measurement of ice masonry volume on a conveyor belt of a production line. DETAILED DESCRIPTION
[0043] In order to make the technical solutions and advantages of the embodiments of the present invention more clearly understood, the exemplary embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0044] refer to Figure 1Detailed description of this embodiment, a method for contactlessly measuring the volume of ice masonry on a conveyor belt of a production line, specifically comprising the following steps:
[0045] S1. Capture an image of the ice masonry on the conveyor belt of the production line based on the limit switch trigger to obtain the original image;
[0046] Specifically: When the ice masonry reaches the designated position on the conveyor belt, the limit switch is triggered, and the limit switch transmits a signal to the computer, which controls the camera to take pictures;
[0047] S2. Preprocess the original image based on multi-scale fusion filtering to obtain four groups of image details, and weightedly fuse all the image details into the original image to obtain the final image processing result;
[0048] S3. Pre-set the segmentation area of the Grabcut algorithm, use the Grabcut algorithm to segment the final image processing result, and obtain the segmented ice masonry image;
[0049] S4. Perform minimum bounding rectangle fitting on the segmented ice masonry image, obtain the actual length, width and height of the ice masonry according to the length, width and height pixel values of the obtained minimum bounding rectangle, and multiply the length, width and height to obtain the volume of the ice masonry.
[0050] Further, in S2, the multi-scale fusion filtering includes Gaussian filtering and median filtering;
[0051] The processing formula of Gaussian filtering is expressed as:
[0052]
[0053] Where G is the Gaussian filter function, (x, y) is the coordinate of the image pixel, σ is the sigma value of the Gaussian filter, and k is the Gaussian kernel value of the Gaussian filter;
[0054] The processing formula of median filtering is expressed as:
[0055] Y[n,m]=median(x'[nz],…,x'[n],…,x'[n+z])
[0056] Where x' is the original signal, Y is the filtered signal, n is the current position, z is the window size, median is the median function, and m is the kernel value of the median filter;
[0057] Performing a first Gaussian filter on the original image using a multi-scale fusion filter to obtain a first processed image, performing a first median filter on the first processed image to obtain a second processed image, performing a second Gaussian filter on the second processed image to obtain a third processed image, and performing a second median filter on the third processed image to obtain a fourth processed image;
[0058] The formula of multi-scale fusion filtering is expressed as:
[0059] B1=img*G(x 1 ,y 1 ,k 1 )
[0060] B2=B1*Y(n 1 ,m 1 )
[0061] B3=B2*G(x 2 ,y 2 ,k 2 )
[0062] B4=B3*Y(n 2 ,m 2 )
[0063] D1=img-B1
[0064] D2=B1-B2
[0065] D3=B2-B3
[0066] D4=B3-B4
[0067] Among them, img is the original image, k 1 is the Gaussian kernel value of the first Gaussian filter, and the sigma value of the first Gaussian filter is σ 1 ,(x 1 ,y 1 ) is the image pixel coordinate of the original image, B1 is the first processed image, m 1 is the first median filter kernel value, n 1 is the current position of the first processed image, B2 is the second processed image, (x 2 ,y 2 ) is the image pixel coordinate of the second processed image, k 2 is the Gaussian kernel value of the second Gaussian filter, and the sigma value is σ 2 , B3 is the third processed image, m 2 is the second median filter kernel value, n 2 is the current position of the third processed image, B4 is the fourth processed image, D1 is the first image detail, D2 is the second image detail, D3 is the third image detail, and D4 is the fourth image detail;
[0068] Add corresponding weight coefficients to the image details and fuse them into the original image to obtain the final image processing result F;
[0069] The weight coefficient is expressed as:
[0070] ω 1 =0.5
[0071] ω 2 =0.25
[0072] ω 3 =0.125
[0073] ω 4 =0.125
[0074] Among them, ω 1 is the first weight coefficient, ω 2 is the first weight coefficient, ω 3 is the first weight coefficient, ω 4 is the first weight coefficient;
[0075] The final image processing result F is expressed as:
[0076]
[0077] Where N = 4, ω i is the weight coefficient, D i For image details.
[0078] Further, in said S3, the length c and width d of the segmentation area are determined according to the actual size of the ice masonry, and it is determined that the ice masonry is in the center of the image, and the center point of the ice masonry in the image is taken as the origin, the length c of the segmentation area is equal to twice the length of the ice masonry in the image, and the maximum value of the length c is the image length, and the width d is equal to twice the width of the ice masonry in the image, and the maximum value of the width d is the image width;
[0079] Specifically, in this embodiment, the collected images are river ice formed in a natural environment, and the location of the images is an artificially constructed ice cutting production line;
[0080] The selected area in the traditional Grabcut algorithm segmentation is manually selected. The present invention pre-sets the segmentation area, and the number of Grabcut algorithm iterations is reduced from five to one to meet the segmentation requirements. The processing time of the Grabcut algorithm is reduced by 3 times. The segmented image is then fitted with a minimum circumscribed rectangle. In the preliminary experiment, the pixel value of the ice masonry is obtained by Zhang Zhengyou's camera calibration method, and the actual size of the ice masonry in the preliminary experiment is measured to obtain the conversion ratio of the pixel value to the actual size, thereby calculating the volume of the ice masonry in actual production, thereby achieving the goal of contactless measurement of the volume of ice masonry on the conveyor belt of the production line.
[0081] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.
Claims
1. A method for contactless measurement of ice masonry volume on a production line conveyor belt, characterized in that: The following steps are involved: S1. Based on the limit switch trigger, the ice masonry on the conveyor belt of the production line is imaged to obtain the original image; S2. Preprocess the original image based on multi-scale fusion filtering to obtain four groups of image details, and weightedly fuse all the image details into the original image to obtain the final image processing result; The multi-scale fusion filtering includes Gaussian filtering and median filtering; The processing formula of Gaussian filtering is expressed as: Where G is the Gaussian filter function, (x, y) is the coordinate of the image pixel, σ is the sigma value of the Gaussian filter, and k is the Gaussian kernel value of the Gaussian filter; The processing formula of median filtering is expressed as: Y[n, m]=median(x′[nz],...,x′[n],...,x′[n+z]) Where x′ is the original signal, Y is the filtered signal, n is the current position, z is the window size, median is the median function, and m is the kernel value of the median filter; Performing a first Gaussian filter on the original image using a multi-scale fusion filter to obtain a first processed image, performing a first median filter on the first processed image to obtain a second processed image, performing a second Gaussian filter on the second processed image to obtain a third processed image, and performing a second median filter on the third processed image to obtain a fourth processed image; The formula of multi-scale fusion filtering is expressed as: B1=img*G(x1,y1,k1) B2=B1*Y(n1,m1) B3=B2*G(x2,y2,k2) B4=B3*Y(n2,m2) D1=img-B1 D2=B1-B2 D3=B2-B3 D4=B3-B4 Wherein, img is the original image, k1 is the Gaussian kernel value of the first Gaussian filter, the sigma value of the first Gaussian filter is σ1, (x1, y1) is the image pixel coordinates of the original image, B1 is the first processed image, m1 is the first median filter kernel value, n1 is the current position of the first processed image, B2 is the second processed image, (x2, y2) is the image pixel coordinates of the second processed image, k2 is the Gaussian kernel value of the second Gaussian filter, the sigma value is σ2, B3 is the third processed image, m2 is the second median filter kernel value, n2 is the current position of the third processed image, B4 is the fourth processed image, D1 is the first image detail, D2 is the second image detail, D3 is the third image detail, and D4 is the fourth image detail; S3. Pre-set the segmentation area of the Grabcut algorithm, use the Grabcut algorithm to segment the final image processing result, and obtain the segmented ice masonry image; S4. Perform minimum bounding rectangle fitting on the segmented ice masonry image, obtain the actual length, width and height of the ice masonry according to the length, width and height pixel values of the obtained minimum bounding rectangle, and multiply the length, width and height to obtain the volume of the ice masonry.
2. The method for contactlessly measuring the volume of ice masonry on a conveyor belt of a production line according to claim 1, characterized in that: In S2, corresponding weight coefficients are added to the image details and fused into the original image to obtain the final image processing result F; The weight coefficient is expressed as: ω1=0.5 ω2=0.25 ω3=0.125 ω4=0.125 Among them, ω1 is the first weight coefficient, ω2 is the second weight coefficient, ω3 is the second weight coefficient, and ω4 is the second weight coefficient; The final image processing result F is expressed as: Where N = 4, ω i is the weight coefficient, D i For image details.
3. The method for contactlessly measuring the volume of ice masonry on a conveyor belt of a production line according to claim 2, characterized in that: In S3, the length c and width d of the segmentation area are determined according to the actual size of the ice masonry, and the ice masonry is determined to be in the center of the image. The center point of the ice masonry in the image is taken as the origin, the length c of the segmentation area is equal to twice the length of the ice masonry in the image, and the maximum value of the length c is the image length, and the width d is equal to twice the width of the ice masonry in the image, and the maximum value of the width d is the image width.
Citation Information
Patent Citations
MSRCR image defogging algorithm based on multi-scale detail optimization
CN112950488A
Method, device and system for measuring length, width and height of object in industrial assembly line
CN113963048A