Reference object and image processing-based knot size measurement method
Through reference objects and image processing methods, the problems of low efficiency and poor accuracy of node size measurement are solved, and efficient and scientific node size measurement is achieved. It is suitable for different scenarios and heights, reducing measurement costs and errors. Industrialized production.
Patent Information
- Application Number
- CN202310672618.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, the measurement efficiency of the nodule size is low and the speed is slow, the measurement results are quite different, and there is a lack of scientific and reasonable measurement methods, which affects the evaluation of glue performance and material output rate.
Using reference and image processing methods, the conversion rate of pixels to units is calculated through pixel calibration, image graying, binarization, Gaussian filtering, Canny edge detection and hole filling techniques to achieve accurate measurement of node size .
It improves the efficiency and accuracy of the measurement of node size, reduces the influence of human and environmental factors, is suitable for different heights and scenarios, reduces measurement costs and errors, and is suitable for industrial production.
Smart Images

Figure CN119107350A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the fields of wood science, furniture structure, building structure, and in particular to a knot size measurement method based on reference objects and image processing. Background Art
[0002] Knot size measurement is an important indicator for characterizing the gluing performance of cross-laminated timber. Knots smaller than 25 mm will not affect the gluing performance of cross-laminated timber (CLT). Accurate and efficient measurement of knot size can not only improve the yield rate when optimizing CLT raw materials and achieve the purpose of cost saving, but also has an important role and significance for quickly evaluating the gluing performance of CLT. Therefore, in the field of wood processing, it is still urgent to find a more scientific and reasonable method for measuring knot size.
[0003] Currently, the measurement of knot size is mainly assessed by visual inspection and CT scanning. These methods are inefficient, slow, and the measurement results vary greatly. In order to improve the measurement accuracy, a scientific knot size measurement method has become an urgent need.
[0004] The method of the present invention mainly converts the image into a grayscale image and then performs a binary segmentation threshold. First, a concept similar to a scale is introduced, and a reference object of a certain size is calibrated in pixels. The image containing the reference object at this height is subjected to Gaussian filtering, Canny edge detection, hole filling, node perimeter extraction, and the outline of the reference object, and the reference object size and pixel-to-unit conversion rate are calculated. Then, the node image with measurement is subjected to Gaussian filtering, Canny edge detection, hole filling, and size calculation using the pixel-to-unit conversion rate, so that the outline of the target object can be measured and the size of the node can be measured.
[0005] The infrared camera is used to measure the height, and the reference object at a known height is called, and the reference object of the specified size is calibrated in pixels. Then, the measured knot image is subjected to Gaussian filtering, Canny edge detection, hole filling, and size calculation using the pixel-to-unit conversion ratio, so that the outline of the target object can be measured and the size of the knot can be measured. Summary of the invention
[0006] The invention provides a method for measuring the size of a knot based on a reference object and image processing, which solves the problem of difficulty in measuring the size of a knot in the prior art.
[0007] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0008] A method for measuring the size of knots based on reference objects and image processing is provided, which is characterized in that the reference object of a certain size is first calibrated in pixels, and the size of the knots can be measured by image processing such as OpenCV measurement; or the height is measured by an infrared camera, and a reference object at a known height is called, and the size of the knots is measured by calibrating the pixels of the known reference object. In order to facilitate the identification of whether the sawn timber knots on the conveyor belt reach directly below the lens, this method projects infrared rays in the width direction of the board surface directly below the lens, and the knot image that passes through the infrared rays is used to calculate the actual knot size. The following steps are included:
[0009] S1. Project infrared light in the width direction of the board directly below the lens, and use the infrared light as a reference to identify whether the sawn timber knots on the conveyor belt have reached directly below the lens;
[0010] S2, calibrate the reference objects of the same size at different heights, and calculate the conversion rate from the reference object size and pixel to unit;
[0011] S3, using solid sawn wood such as larch, beech and poplar as materials, image acquisition, image cropping and correction;
[0012] S4, collecting knotty images of different sawn timbers, and performing grayscale and binarization processing on the original images;
[0013] S5, performing Gaussian filtering, Canny edge detection, and hole filling on the measured node image;
[0014] S6. Measure the height of the plate surface from the camera lens, or use an infrared rangefinder to automatically measure the plate surface height, compare the pixel area and contour circumference of the knot image with a calibration reference object of the same height as the actual plate, and calculate the actual size of the knot based on the ratio.
[0015] Furthermore, in S1, in order to facilitate the identification of whether the sawn timber knot on the conveyor belt reaches directly below the lens, infrared rays of the length of the board are projected directly below the lens, and the infrared rays are used as a reference. When the knot on the sawn timber reaches the infrared projection area, the image is collected at this time, which can avoid the influence of the shooting angle of the knot on the measurement result and improve the accuracy of the knot measurement.
[0016] Furthermore, S2 introduces a concept similar to a scale, and the reference object of the specified size is calibrated in pixels. The image containing the reference object at this height is subjected to Gaussian filtering, Canny edge detection, hole filling, node perimeter extraction, and the outline of the reference object is obtained, and the reference object size and pixel-to-unit conversion rate are calculated.
[0017] Furthermore, in S3, solid sawn wood such as larch, beech and poplar is used as material, and image acquisition is performed at a height of 10-90 cm by an electronic digital device for shooting images or videos and an image acquisition device. In the collected sawn wood knot image, the wood is parallel to the lens of the image acquisition device. The purpose of image cropping and correction is to remove background elements outside the main specimen and obtain the desired experimental image.
[0018] Furthermore, in S4, the collected image is grayed to achieve the purpose of decolorization and dimensionality reduction; the collected image is binarized, and pixels with brightness values lower than the optimal threshold are considered to be wood areas and are assigned a "0" value (dark area), while pixels with higher brightness values are assigned to knot areas and are assigned a "1" value (bright area).
[0019] Furthermore, in S5, the image of the node with measurement is subjected to Gaussian filtering, Canny edge detection, hole filling, and size calculation using a pixel-to-unit conversion ratio, so that the contour of the target object can be measured and the size of the node can be measured.
[0020] Furthermore, in S6, the height of the plate surface is automatically measured by an infrared rangefinder, a reference object at a known height is called, and the reference object of a certain size is pixel-calibrated. Then, the measured knot image is subjected to Gaussian filtering, Canny edge detection, hole filling, and calculation using the conversion ratio from pixels to actual size, so that the contour of the target object can be measured and the knot size can be measured.
[0021] The advantages of this technology are:
[0022] The knot size measurement method based on reference objects and image processing can measure the knot size at any height. First, the reference object is marked at the height, and then the knots at this height are accurately measured. This method expands the method of knot size measurement, which is of great significance to improving the efficiency of knot size calculation. This not only helps to improve the evaluation system of glulam quality, but also helps to enrich the knot size measurement methods, greatly promoting the efficiency and accuracy of knot size measurement, and conforming to the industrial production process and requirements. In summary, the beneficial effects of the present invention are:
[0023] 1. High efficiency: Compared with the traditional method, the present invention reduces the measurement time and cost when measuring the size of the knots.
[0024] 2. Scientificity: The influence of human factors on image acquisition is reduced through reference objects and image processing; image acquisition through the knot image acquisition device can reduce the influence of environmental factors such as angle and lighting on image acquisition; and the scientificity of knot size measurement is greatly improved.
[0025] 3. Reasonableness: Introducing a concept similar to a scale, a pixel permetric ratio is given. After a fixed-size reference object is given, the size of other target objects at this height can be measured.
[0026] It can effectively extract low-dimensional and high-dimensional image features to accurately identify the knot area and accurately calculate the knot size. It is suitable for knot size measurement in different usage scenarios, saving labor costs and labor, reducing errors caused by manual measurement, and improving work efficiency and measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 The present invention provides a flow chart of a method for measuring the size of a node based on a reference object and image processing.
[0028] Figure 2 The invention provides a method for measuring the size of a knot based on a reference object and image processing, and the knot image directly below the lens is referenced by infrared light.
[0029] Figure 3a These are the grayscale image of larch wood with knots collected at a height of 10 cm and the binary processed image of the wood with knots according to Example 1 of the method of the present invention.
[0030] Figure 3b These are the grayscale image of beech wood with knots collected at a height of 20 cm and the binary processed image of the wood with knots according to Example 2 of the method of the present invention.
[0031] Figure 3c These are the grayscale image of poplar wood with knots collected at a height of 20 cm and the binary processed image of poplar wood with knots in Example 3 of the method of the present invention.
[0032] Figure 3d These are grayscale images of poplar wood with knots and binary processed images of poplar wood with knots collected under automatic height measurement by an infrared rangefinder according to Example 4 of the method of the present invention.
[0033] Figure 4 The invention provides a method for measuring the size of a knot based on a reference object and image processing and before and after Gaussian filtering. DETAILED DESCRIPTION
[0034] The specific implementation of the present invention will be described in detail below in conjunction with the drawings in the embodiments of the present invention, but it should be understood that the protection scope of the present invention is not limited by the specific implementation.
[0035] like Figure 1As shown, a method for measuring the size of a knot based on a reference object and image processing is characterized in that the reference object of a standard size is first calibrated in pixels, and the size of the knot can be measured by image processing such as OpenCV measurement; or we measure the height by an infrared camera, call a reference object at a known height, and measure the size of the knot by calibrating the pixels of the known reference object; in order to facilitate the identification of whether the sawn timber knot on the conveyor belt reaches directly below the lens, the method projects infrared rays in the width direction of the board surface directly below the lens, and the knot image passing through the infrared rays is used to calculate the actual knot size; the method includes the following steps:
[0036] S1. Project infrared light in the width direction of the board directly below the lens, and use the infrared light as a reference to identify whether the sawn timber knot on the conveyor belt reaches directly below the lens ( Figure 2 );
[0037] S2, calibrate the reference objects of the same size at different heights, and calculate the conversion rate from the reference object size and pixel to unit;
[0038] S3, using solid sawn wood such as larch, beech and poplar as materials, image acquisition, image cropping and correction;
[0039] S4, collecting knotty images of different sawn timbers, and performing grayscale and binarization processing on the original images;
[0040] S5, performing Gaussian filtering, Canny edge detection, and hole filling on the measured node image;
[0041] S6. Measure the height of the plate surface from the camera lens, or use an infrared rangefinder to automatically measure the plate surface height, compare the pixel area and contour circumference of the knot image with a calibration reference object of the same height as the actual plate, and calculate the actual size of the knot based on the ratio.
[0042] Embodiment 1:
[0043] The implementation method of this embodiment is as described above, and the specific steps will not be elaborated in detail. The following only shows its effect based on the case implementation conditions and case data.
[0044] This embodiment is a larch knot-containing image collected at a height of 10 cm. The pixel calibration is first performed on the reference object at this height, and then the size of the knot is measured. The measurement results of this method are compared with those of the manual method, and the feasibility of this method is determined by the relative error size.
[0045] Embodiment 2:
[0046] The implementation method of this embodiment is as described above, and the specific steps will not be elaborated in detail. The following only shows its effect based on the case implementation conditions and case data.
[0047] This embodiment is an image of beech wood with knots collected at a height of 20 cm. The pixel calibration of the reference object at this height is first performed, and then the size of the knots is measured. The measurement results of this method are compared with those of the manual method, and the feasibility of this method is determined by the relative error size.
[0048] Embodiment 3:
[0049] The implementation method of this embodiment is as described above, and the specific steps will not be elaborated in detail. The following only shows its effect based on the case implementation conditions and case data.
[0050] This embodiment is a poplar wood knot image collected at a height of 20 cm. The reference object at this height is first calibrated in pixels, and then the knot size is measured. The measurement results of this method are compared with the manual method, and the feasibility of this method is determined by the relative error size.
[0051] Embodiment 4:
[0052] The implementation method of this embodiment is as described above, and the specific steps will not be elaborated in detail. The following only shows its effect based on the case implementation conditions and case data.
[0053] In this embodiment, the height of the poplar surface is automatically measured by an infrared rangefinder, and the measured height is 30 cm. A reference object calibrated at a height of 30 cm is retrieved to measure the size of the knots at this height.
[0054] The measurement results of this method are compared with those of the manual method, and the feasibility of this method is determined by the relative error size.
[0055] Table 1 Comparison of the measurement results of knot size under different substrates
[0056] serial number Substrate high Absolute error Relative error Example 1 Larch 10cm 1.11 8.9% Example 2 Beech 20cm 1.08 8.4% Example 3 Poplar 20cm 0.73 5.8% Example 4 Poplar 30cm 1.23 6.6%
[0057] It can be seen from the results in Table 1 that the present invention can effectively measure the wood breakage rate with low errors (absolute error, relative error).
[0058] In summary, the method of the present invention can make full use of reference objects and image processing to measure the size of knots, while the traditional knot size measurement method is subject to greater tool and human limitations and has poor adaptability. The knot size measurement method based on reference objects and image processing proposed by the present invention can adapt to complex problems in multiple scenarios, and the measured value is closer to the true value with a small measurement error. The automated, industrialized and intelligent measurement of knot size measurement is realized.
Claims
1. A method for measuring the size of a knot based on reference objects and image processing, Features First, pixel calibration is performed on reference objects of different sizes at different heights, and the knot image is processed by OpenCV measurement and the like, and the knot size can be measured by comparing the area of the reference object calibrated at a known height; or the height of the board surface is automatically measured by an infrared rangefinder, and a reference object at a known height is called, and the knot size is measured by comparing the pixel area of the known calibrated reference object; in order to facilitate the identification of whether the sawn timber knot on the conveyor belt reaches directly below the lens, this method projects infrared rays in the width direction of the board surface directly below the lens, and the knot image passing through the infrared rays is used to calculate the actual knot size; the method includes the following steps: S1. Project infrared light in the width direction of the board directly below the lens, and use the infrared light as a reference to identify whether the sawn timber knots on the conveyor belt have reached directly below the lens; S2, calibrating the reference object of the specified size in pixels at different heights, and calculating the conversion rate between the actual size of the reference object and the pixel size; S3, using solid sawn wood such as larch, beech and poplar as materials, image acquisition, image cropping and correction; S4, collecting knotty images of different sawn timbers, and performing grayscale and binarization processing on the original images; S5, performing Gaussian filtering, Canny edge detection, and hole filling on the node image to be measured; S6. Measure the height of the plate surface from the camera lens, or use an infrared rangefinder to automatically measure the plate surface height, compare the pixel area and contour circumference of the knot image with a calibration reference object of the same height as the actual plate, and calculate the actual size of the knot based on the ratio.
2. A method for measuring the size of a node based on a reference object and image processing according to claim 1, It is characterized in that The wood knot image in S3 is acquired by an electronic digital device for taking images or videos and an image acquisition device; wherein the sawn timber knot image is at a height of 10-90 cm, and in the acquired sawn timber knot image, the wood is parallel to the lens of the image acquisition device, and the image is cropped and corrected in order to remove background elements outside the main specimen and obtain the desired experimental image.
Citation Information
Cited By
Image processing method and image processing system
CN119905215A
Image Processing Method and Image Processing System
CN119905215B
