Fixed-length log scale measuring device and method based on deep learning
Through the portable log ruler device, using deep learning and laser ranging technology, the shortest diameter and vertical diameter of logs are automatically calculated, solving the problems of large size, complex operation and high cost in existing equipment, and achieving efficient and accurate measurement of log volume.
Patent Information
- Application Number
- CN202410309946.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2025-08-01
AI Technical Summary
The existing log inspection equipment is large in size, complex in operation, high in cost, and cannot accurately measure the log wood volume that meets national standards. The manual measurement efficiency is low and there are errors.
The portable log ruler device based on deep learning is adopted, and the shortest diameter and vertical diameter of the small head end face of the log is automatically calculated using a convolutional neural network (CNN) and a laser ranging module, and data transmission is achieved in combination with the 4G upload module to meet national standards.
It improves the efficiency and accuracy of log inspection rulers, reduces costs, and facilitates promotion and application in ports, processing plants and transportation sites.
Smart Images

Figure CN120403464A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a fixed-length log scaling device and method based on deep learning, belonging to the technical field of machine vision. Background Art
[0002] The measurement of the volume of logs is based on the national GB / T 11716-2018 small-diameter logs and GB / T 4814-2013 log volume tables. By measuring the average value of the shortest diameter and its vertical diameter at the small end of a single log as the diameter of the approximate circular end face of the log, the volume of the log is calculated according to the general formula in the standard. Currently, at ports, processing plants, and log collection sites, the shortest diameter of logs is mainly visually judged by workers using portable soft tape measures. The main defects of this measurement method are: (1) Since there is often glue on the end face of the log, the tape measure becomes a disposable item; (2) At least three people are required in a group for measurement, and the measurement accuracy is highly related to the habits of the workers; (3) There is a certain danger when measuring stacks; (4) The work efficiency is low and the cost is high.
[0003] In recent years, some optoelectronic log measuring devices have been developed for log measurement. However, they are large in size and weight, and complex to operate. Generally, they are fixed at a certain place for installation. Especially, the equipment cost of several million yuan limits their application and promotion, and they are rarely seen in practical applications. The principles of the portable log measuring devices in the prior art do not quite conform to the requirements of log measurement practice. Such technologies use an inscribed approximate circle to estimate the end face radius of a log, which seems to be consistent with the calculated value of the shortest diameter of the log end face. However, the national general log measurement standard is based on the average value of the shortest diameter and its vertical diameter of the small end face of the log. For such log measurement methods based on computer vision, since they cannot determine the vertical diameter of the shortest diameter of the log end face, they cannot obtain log measurement results consistent with the national standard. Chinese invention patent CN202010584835, with the patent name of "A Method and Device for Measuring the Volume of Raw Wood Based on Computer Vision", has the following problems: (1) It does not specify the photographing method. For a log stack with more than several hundred logs, after photographing the front and back, the method proposed by this invention to achieve one-to-one correspondence of the end faces in the two photos of a single log through sorting has certain uncertainties; (2) It does not specify the photographing method. If there are many logs in the picture, the diameter measurement of the log end face far from the center point of the picture requires correction of distortion, and this invention does not specify the distortion coefficients of logs at different distances; (3) It does not measure the photographing distance and does not provide the influence of the photographing distance on the measurement result; (4) According to the national standard GB / T 4814 - 2013 raw wood volume table, log measurement uses the average value of the shortest diameter and its vertical diameter of the small end face of the log as the diameter of the log to calculate the raw wood volume. This invention only calculates the shortest radius of the small end of the log, and according to this method, it is impossible to find the vertical diameter corresponding to the shortest diameter of the small end face; (5) When photographing on cloudy days or in the early morning and evening, the image quality of those logs with indentations cannot be guaranteed, and there is a risk of measurement omission. Summary of the Invention
[0004] The purpose of the present invention is to provide a device and method for measuring the length of fixed-length logs based on deep learning. Using the deep learning technology of artificial intelligence convolutional neural network (CNN), through the error backpropagation neural network of supervised learning to optimize the feature matrix parameters, the portable device is trained to automatically calculate the average value of the shortest diameter and its vertical diameter of the small end face of the log as the diameter of the log, thus solving the problems existing in the background technology.
[0005] The technical solution of the present invention is as follows: A device for measuring the length of fixed-length logs based on deep learning, comprising a photographing module, an image processing module, a laser ranging module, a 4G uploading module, a display module, a DC power supply module, as well as an input module and a manual control operation module. The photographing module is a camera with a built-in fill light. The lens of the camera is vertically facing the log end face in the exact middle of the display screen, and takes photos of the front and back of the single log end face. The fill light is used to assist in photographing during the photographing. The input module and the manual control operation module are used to input log stacking information, log grader information, and log length information. The handheld log grading device is equipped with a USB interface, through which a keyboard and a mouse can be connected to input basic grading information (this information includes log origin, variety, ship number, freight information, etc.) before log grading starts. In addition, the buttons on the handheld log grading device provide portable operations such as taking pictures, storing, and uploading; The image processing module is used to process the captured images, convert each log end face contour into a contour map composed of 720 points; and calculate the shortest diameter of the log end face; The laser ranging module is used to measure the distance between the lens and the log end face, calibrate the pixel size information of the image pixel coordinate system with a checkerboard plane, and generate a distance dimension coefficient table; The 4G upload module is used to upload log stacking information, log grader information, images of the front and back sides of the log end face, and the values of the shortest diameter and its vertical diameter of the small end face of each log; The display module is used to display the information of the camera module, the image processing module, the laser ranging module, and the 4G upload module; The DC power supply module is used to provide power for the camera module, the image processing module, the laser ranging module, the 4G upload module, the display module, and the input module and the manual control operation module.
[0006] A method for grading fixed-length logs based on deep learning, using the above device, includes the following steps: S1. Taking pictures: The camera lens of the handheld grading device is directly facing the middle of the log end face on the display screen, and taking front and back pictures at close range; when taking pictures, measure the distance between the camera lens of the grading device and the middle log end face on the display screen at the same time; use a fill light to assist in taking pictures when taking pictures; each time a picture is taken, only take a complete end face of one log. When there are multiple complete log end faces in the picture, take the middle one for identification and calculation. S2. Log identification: After each picture is taken, the convolutional neural network trained by the deep learning technology based on the convolutional neural network CNN automatically identifies the end face contour and the center point of a complete log in the middle of the display screen, repairs the defective log end face, obtains the center points and contours of the front and back end faces of each log, numbers and manages each log, and the numbers of the two end faces of the same log in a stack are the same; S3. Image processing: Convert each log end face contour identified in S2 into a contour map composed of 720 points; calculate the shortest diameter of the log end face; S4. Calculate the shortest diameter and its vertical diameter of a single log: Measure and calculate the distances between all pairs of points passing through the center of the log end face on the log end face contour obtained in S3, and find the straight line between the two points corresponding to the minimum value. This straight line is the shortest diameter of the log end face. Draw a perpendicular line to this straight line through the log center to obtain the vertical diameter of the shortest diameter. Measure the length of the vertical diameter, calculate the average value of the shortest diameter and its vertical diameter of the log end face, compare the data of the two end faces of the same log, and confirm and save the data of the small end of the log; S5. Data upload: When the measurement of a complete stack is completed, number each log in the order of photographing, use the 4G upload module to upload each log end face image taken (including the large end and the small end, for later manual inspection and correction), upload the log stack information, upload the values of the shortest diameter and its vertical diameter of the small end of each log end face, input and upload the log length value, upload the information of the log inspector, and upload the information of the log inspection device; S6. Log volume calculation: The upper computer receives the stack information, operator information, handheld log inspection device information, data of the shortest diameter and its vertical diameter of the small end of each log end face, log number, and the front and back images of each log end face uploaded from the handheld log inspection device. Based on the national GB / T 11716-2018 small-diameter logs and GB / T 4814-2013 log volume table, calculate the volume of a single log. The volume of the entire log stack is calculated by summing the volumes of each log. According to the actual needs of users, generate various query and statistical reports, and at the same time provide a manual inspection and verification function.
[0007] The specific steps are as follows: First, take pictures of the front and back end faces of any number of log stacks in a single-log manner to obtain the images of the front and back end faces of each log. Perform log contour annotation on the original end face images of the front and back of the single-log end face. Use the convolutional neural network model (CNN) YOLO to extract the log contour feature vectors. Use this feature vector and the labeled log contour data set as the training set to train the handheld log inspection device to accurately identify the contour line and its center point of a single log in each image. Specify the number of this log contour in the order of photographing. The numbers of the front and back of the two ends of the same log are the same. Use a fixed algorithm to repair the defective log end face contour. After the measurement is completed, the log end face number specified during photographing is used as the unique number of this log in this stack, and the related photos and measurement data can be queried and used through this number.
[0008] When measuring the lengths of the shortest diameter and its vertical diameter of the log end face, use the built-in laser rangefinder to measure the distance between the measurement lens and the log end face, calibrate the pixel size information of the image pixel coordinate system with a checkerboard plane, and generate a distance-size coefficient table, which ensures the practicability of the log inspection device.
[0009] The process of training and extracting the feature matrix of the log contour is as follows: Using the manually annotated log end face contour image set as the training set, selecting any value between 0 and 1 as the initial value of the log contour feature matrix, and training the CNN neural network through supervised machine learning with the CNN convolutional neural network and the backpropagation error algorithm to obtain a feature matrix that can identify the log contour, identifying the log end face contour and its center point in the original log end face image, and numbering each log so that the numbers of the same log in the front image and the back image are the same.
[0010] The core of the small-end diameter measurement of the log in the present invention is to measure the shortest diameter of the log end face and the length of its corresponding vertical diameter. The present invention uses a specific photographing method to photograph the log end face, and adds a fill light to assist in photographing, ensuring the usability of the photographed image at any time period during the day and under any climatic conditions (except rain and snow). The log end face contour line is converted into 720 points, and the diameter value of each diameter passing through the log center is measured and calculated one by one. The shortest diameter of the log end face is obtained by the method of finding the minimum value, ensuring the uniqueness of each measurement. The measurement results obtained by anyone using this diameter measurement device are exactly the same, overcoming the disadvantages that the results are different each time during manual diameter measurement and the results are also different for different people during manual diameter measurement, because when manually measuring the diameter, the shortest diameter of the specified log is visually estimated by the human eye. A fixed algorithm is used to repair the defective log contour, effectively overcoming the disadvantages that vary from person to person and time to time during manual visual repair. When measuring the length of the shortest diameter of the log and its vertical diameter, a pixel coordinate system is adopted, and the nonlinear calibration method is used. The checkerboard is used as the calibration plane, the distance between the lens and the log end face is measured by the laser ranging module, and the shooting angle of the image is identified by the convolutional neural network (when the lens is not perpendicular to the log end face, a sound alarm is issued). After the present invention uses the method of photographing the image with the lens perpendicular to the end face of a single log, the radial and tangential distortions of the log end face caused by the angle can be ignored. Through on-site actual tests, the actual measurement results meet the requirements of diameter measurement. The log diameter measurement data is in cm. For example, if the measurement result is 24.8 cm, it is calculated as 24 cm. The measurement error of the present invention is less than 1 mm, meeting the requirements of diameter measurement.
[0011] The beneficial effects of the present invention are as follows: Using the deep learning technology of the artificial intelligence convolutional neural network (CNN), the parameters of the log contour feature matrix are optimized through the error backpropagation neural network of supervised learning, and the portable device is trained to automatically calculate the average value of the shortest diameter and its vertical diameter of the small end of the log as the diameter of the log; Based on the national standard as the development basis, aiming at practicability, portability, low cost, and easy promotion, it can be used at ports, log processing plants, and log transportation sites, improving the efficiency and speed of log diameter measurement. Brief Description of the Drawings
[0012] Figure 1 It is a physical diagram of the diameter measurement device of the present invention; Figure 2 Internal structure diagram of the log measurement device of the present invention; Figure 3 Front photo of the on-site photo of the log stack in the port of the present invention; Figure 4 Reverse photo of the on-site photo of the log stack in the port of the present invention; Figure 5 Original image of the log data annotation of the present invention; Figure 6 Actual measurement result diagram of the log measurement prototype of the present invention; Figure 7 Schematic diagram of the log contour annotation in the log contour recognition training set of the present invention; Figure 8 Precision callback curve during the training process of the log measurement prototype of the present invention; Figure 9 F1 confidence curve during the training process of the log measurement prototype of the present invention; Figure 10 Precision-confidence curve during the training process of the log measurement prototype of the present invention; Figure 11 Training measurement and calculation precision diagram of the log measurement prototype of the present invention; Figure 12 Pixel size for calibrating the image pixel coordinate system with a checkerboard plane by the log measurement prototype of the present invention; Figure 13 Complete log end face detection diagram of the log measurement prototype of the present invention; Figure 14 Principle module diagram of the measurement device of the present invention; Figure 15 Flowchart of the measurement device of the present invention. Detailed implementation manners
[0013] The present invention will be further described below with reference to the accompanying drawings by way of examples.
[0014] A fixed-length log measurement device based on deep learning includes a photographing module, an image processing module, a laser ranging module, a 4G uploading module, a display module, a DC power supply module, as well as an input module and a manual control operation module. The photographing module is a camera with a built-in fill light. The lens of the camera is vertically facing the center of the log end face in the display screen to take front and reverse photos of the end face of a single log, and the fill light is used to assist in taking photos during the photographing; The input module and the manual control operation module are used to input log stack information, log measurement employee information, and log length information; The image processing module is used to process the captured images and convert the contour of each log end face into a contour map composed of 720 points; The laser ranging module is used to measure the distance between the lens and the end face of the log, calibrate the pixel size information of the image pixel coordinate system with the checkerboard plane, and generate a distance dimension coefficient table; The 4G upload module is used to upload the log stacking information, the information of the log measurer, the front and back images of the end face of the log, and the values of the shortest diameter and its vertical diameter of the small end face of each log; The display module is used to display the information of the photographing module, the image processing module, the laser ranging module, and the 4G upload module; The DC power supply module is used to supply power to the photographing module, the image processing module, the laser ranging module, the 4G upload module, the display module, and the input module and the manual control operation module.
[0015] A method for measuring the fixed-length logs based on deep learning, using the above device, includes the following steps: S1. Photographing: Hold the camera lens of the log measuring device facing the center of the log end face on the display screen, and take front and back photos at close range; measure the distance between the camera lens of the log measuring device and the center of the log end face on the display screen while taking photos; use a fill light to assist in taking photos when taking photos; S2. Recognition of the log end face contour and center point: After each photo is taken, the convolutional neural network trained by the deep learning technology based on the convolutional neural network CNN automatically recognizes the end face contour and its center point of a complete log in the center of the display screen (if there are multiple complete log end faces in the picture, take the end face contour of the middle complete log as the measurement object), repair the defective log end face, obtain the center points and contours of the front and back end faces of each log, number and manage each log, and the numbers of the two end faces of the same log in a stack are the same; S3. Image processing: Convert each log end face contour recognized in S2 into a contour map composed of 720 points; S4. Calculate the shortest diameter and its vertical diameter of a single log: Measure and calculate the distances between all two points passing through the center point of the log end face on the log end face contour obtained in S3, find the straight line between the two points corresponding to the minimum value among them as the shortest diameter of the log end face, draw a perpendicular line to this straight line through the log center point, and the vertical diameter of the shortest diameter can be obtained. Measure the length of the vertical diameter, calculate the average value of the shortest diameter and its vertical diameter of the log end face, compare the data of the two end faces of the same log, and confirm and save the data of the small end of the log; S5. Data upload: After completing the measurement of a complete stack, number each log in the order of photographing, use the 4G upload module to upload each photo of the log end face taken, upload the log stacking information, upload the values of the shortest diameter and its vertical diameter of the small end of each log end face, input and upload the log length value, upload the information of the log measurer, and upload the information of the log measuring device; S6. Original log volume calculation: The host computer receives the stack information, operator information, handheld log measurement device information, data on the shortest diameter and its vertical diameter of the small end of each log end face, log numbers, and the front and back images of each log end face in the stack. Based on the national GB / T 11716-2018 small-diameter logs and GB / T 4814-2013 log volume tables, it calculates the volume of each single log, sums up the volumes of all single logs to obtain the volume of the overall stack, generates various query and statistical reports according to the actual needs of users, and provides an artificial inspection and verification function at the same time.
[0016] The specific steps are as follows: First, take pictures of any number of log stacks in the way of taking pictures of each single log to obtain the images of the front and back end faces of each log. Mark the log contours on the original end face images of the front and back of the single log end face. Use the convolutional neural network model (CNN) YOLO to extract feature vectors. Use this feature vector and the labeled log contour data set as the training set. Randomly specify the initial value (a decimal between 0 and 1) of the initial log contour feature matrix. Train the handheld log measurement device to accurately identify the contour line and its center point of the middle log in each image; specify its number, and the numbers of the front and back of the two ends of the same log are the same; use a fixed algorithm to repair the defective log end face contour; after the measurement, this number is the unique number of this log in this stack, and the related photos and measurement data can be queried and used through this number.
[0017] When measuring the length of the shortest diameter and its vertical diameter of the log end face, use the built-in laser rangefinder to measure the distance between the measurement lens and the log end face, calibrate the pixel size information of the image pixel coordinate system with a checkerboard plane, and generate a distance dimension coefficient table, which ensures the practicability of the log measurement device.
[0018] The process of training and extracting the feature matrix of the log contour is as follows: Use the manually labeled log end face contour image set as the training set, select any value between 0 and 1 as the initial value of the log contour feature matrix, and use the CNN convolutional neural network and the backpropagation error algorithm through supervised machine learning to train this CNN neural network to obtain a feature matrix that can identify the log contour, identify the log end face contour and its center point in the original log end face image, and number each log so that the numbers of the same log in the front image and the back image are the same.
[0019] This invention includes steps such as taking pictures of the front and back of a single log end face, identifying the log end face contour and center point, image processing, calculating the shortest diameter and its vertical diameter of the log end face, data uploading, and volume calculation. Specifically as follows: (1)Photography: Take a single photo of any number of log stacks. Hold the log measurement device (containing a common camera, laser rangefinder, fill light, and 4G upload module). The camera lens of the log measurement device is vertically facing the center of the log end face in the middle of the picture. Take a front and back photo of a single log at close range (any extra logs in the photo are incomplete log images. If there are more than one complete log end face images in the picture, take the complete log end face in the middle as the measurement object. The diameter of each log is not less than 4 cm, and the length of each log is 2 m - 20 m); Add a fill light during photography to offset the influence of strong or weak natural light on photography; Measure the straight-line distance (vertical distance) between the camera lens and the log end face simultaneously during photography. (2)Recognition of log end face contour and center point: Mark the original end face images of the front and back of a single log. After training the artificial neural network through YOLO 5 based on the convolutional neural network CNN, after training is completed, the log measurement device can automatically recognize the end face contour and its center point of each log after each photo is taken, repair defective log end faces, obtain the center points and contours of the front and back end faces of each log end face, and manage each log by number. The numbers of the two end faces of the same log are the same; The process of training and extracting the feature matrix of the log end face contour in the present invention is as follows: Use the manually marked log contour image set as the training set, select any value between 0 and 1 as the initial value of the log end face contour feature matrix, and train the CNN neural network through supervised machine learning with the CNN convolutional neural network and the backpropagation error algorithm to obtain a feature matrix that can recognize the log contour, recognize the end face contour and its center point of each log in the original log end face image, and number each log (specify this number in the photo-taking order) so that the numbers of the same log in the front image and the back image are the same; After training is completed, this process is no longer required when using the specific log measurement device of the present invention; After training the log contour feature matrix, the contour map and contour center point of each log end face can be obtained after taking a photo.
[0020] (3)Image processing: Process the log contour obtained in the log end face recognition step, and convert the log end face contour line into a dot matrix composed of 720 pixel points. (4) Calculate the shortest diameter and its perpendicular diameter of the log end face: Calculate the distance between any two points passing through the center point of the log end face in the contour of each log in the image processing step, find the shortest diameter and length value, draw its perpendicular diameter and calculate the length of the perpendicular diameter, and save the set of values with the smallest average of the shortest diameter and its perpendicular diameter in the two end faces of each log; When measuring the length of the shortest diameter and its perpendicular diameter of the log, use the built-in laser rangefinder (laser ranging module) to measure the distance between the lens and the log end face, calibrate the pixel size information of the pixel coordinate system with the checkerboard plane, and generate a distance size coefficient table; Based on the above steps, calculate the shortest diameter and its perpendicular diameter of the end face of each log in the front and back images, determine the small end of each log, and retain the data of the shortest diameter and its perpendicular diameter of the small end face. (5) Data upload: Use the 4G upload module in the scaling device, and manually operate the upload button of the portable scaling device to upload the scaling data to the designated host computer, and at the same time upload the operator information, the original end face image, the log stacking information, etc. (6) Volume calculation: The host computer receives the stacking information, operator (employee) information, handheld scaling device information, the data of the shortest diameter and its perpendicular diameter of the small end of each log end face, the log number (this number is the unique number of the number grouped by stacking), and the front and back images of the stack from the handheld scaling device. Based on the national GB / T 11716-2018 small-diameter logs and GB / T 4814-2013 log volume tables, calculate the volume of a single log. The volume of the entire log stack is calculated by summing the volumes of each log. According to the actual needs of the user, generate various management and statistical reports, and at the same time provide an artificial inspection and verification function.
[0021] The present invention first obtains images of the front and back end faces of each log end face by taking pictures, uses the labeled log end face image contour dataset as the training set, extracts the initial training log contour feature matrix, and trains the handheld device to accurately identify the contour and its center point of each log end face in each image; repairs defective log end face contours, numbers each log contour on each side in the order of taking pictures, and the numbers at both ends of the same log are the same; after measurement, this number is the unique number of each log in this stack, and related photos, measurement data, etc. can be queried and used through this number; the core of the small-end measurement of the log in the present invention is to measure the shortest diameter of the small-end face of the log and the length of its corresponding vertical diameter. The present invention uses a specific photographing method to take pictures of the log end face, adds a fill light to assist in photographing, and ensures the usability of the photographed image at any time period during the day and under any weather conditions (except rain and snow); converts the log end face contour line into 720 points, measures and calculates the diameter value of each diameter passing through the center point of the log end face one by one, and obtains the shortest diameter of the log end face by finding the minimum value, ensuring the uniqueness of each measurement. The measurement results obtained by anyone using this measuring device are exactly the same, overcoming the disadvantages that the results are different each time during manual measurement and the results are also different for different people during manual measurement, because during manual measurement, the shortest diameter of the specified log end face is visually estimated by the human eye; uses a fixed algorithm to repair defective log end face contours, effectively overcoming the disadvantages that vary from person to person and time to time during manual visual repair; when measuring the length of the shortest diameter and its vertical diameter of the log end face, uses an in-built laser rangefinder to measure the distance between the measuring lens and the log end face, calibrates the actual size distance coefficient corresponding to the image pixel coordinate system with a checkerboard plane, and the measurement of the distance coefficient ensures the practicality of the device of the present invention; measures the length of the shortest diameter and its vertical diameter of the log end face, uses a pixel coordinate system, uses a non-linear calibration method, uses a checkerboard as the calibration plane, and uses a neural network method to identify the shooting angle of the image. When the lens is not perpendicular to the log end face, a sound alarm is issued. After taking a single vertical picture of the log end face image in the present invention, the radial and tangential distortions of the log end face caused by the angle can be ignored. After testing, the actual measurement results meet the requirements of log measurement. The log measurement data is in cm. For example, if the measurement result is 24.8 cm, it is calculated as 24 cm. The measurement error of the present invention is less than 1 mm, meeting the requirements of log measurement.
[0022] Since logs of the same length are generally stacked at ports, processing plants, and log collection sites, the log scaling device of the present invention does not detect the length of the logs. Instead, according to the national standard GB / T 144-2013 for log inspection, after measuring the length of a stack of logs (generally, there is no need to measure, and the factory length can be directly used), it is directly input into the system. The present invention uses the national GB / T 11716-2018 for small-diameter logs and the GB / T 4814-2013 log volume table as the basis to calculate the volume of single logs or stacks; the handheld log scaling device terminal enters the log stack information and employee information, and after taking pictures, calculates the minimum diameter and its vertical diameter at both ends of each log; the handheld log scaling device uploads the log stack information, employee information, front and back images, the minimum diameter and its vertical diameter at both ends of each log using 4G or 5G technology, and the upper computer completes the calculation of the volume of single logs or log stacks; the present invention is small in size, portable, low in cost, and easy to promote.
[0023] In summary, the present invention is developed based on national standards, aiming at practicality, portability, low cost, and easy promotion. Through more than two years of testing and improvement at Tangshan Wenfeng Wharf, it has realized the prototype of the first-generation log scaling tool that can be used by workers at ports, log processing plants, and log transportation sites, improving the efficiency and speed of log scaling.
Claims
1. A fixed-length log scaling device based on deep learning, characterized in that: It includes a photographing module, an image processing module, a laser ranging module, a 4G uploading module, a display module, a DC power supply module, an input module and a manual control operation module. The photographing module is a camera with a fill light. The lens of the camera is vertically facing the center of the log end face in the display screen image, and takes pictures of the front and back of a single log end face. The fill light is used to assist in taking pictures during photography. The input module and the manual control operation module are used to input log stacking information, log grader information and log length information. The image processing module is used to process the captured images, and convert the contour of each log end face into a contour map composed of 720 points; it is used to calculate the shortest diameter of the log end face. The laser ranging module is used to measure the distance between the lens and the log end face, calibrate the pixel size information of the image pixel coordinate system with a checkerboard plane, and generate a distance size coefficient table. The 4G uploading module is used to upload log stacking information, log grader information, the front and back images of the log end face, and the values of the shortest diameter and its vertical diameter of the small end face of each log. The display module is used to display the information of the photographing module, the image processing module, the laser ranging module and the 4G uploading module. The DC power supply module is used to provide power for the photographing module, the image processing module, the laser ranging module, the 4G uploading module, the display module, the input module and the manual control operation module.
2. A fixed-length log scaling method based on deep learning, using the scaling device described in claim 1, characterized in that It includes the following steps: S1. Photographing: Hold the camera lens of the log grading device facing the center of the log end face in the display screen image, and take front and back pictures at close range; measure the distance between the camera lens of the log grading device and the center of the log end face in the display screen image during photography; use the fill light to assist in taking pictures during photography. Each time a picture is taken, only the complete end face of one log is photographed. When there are multiple complete log end faces in the picture, take the middle one log end face for identification and calculation. S2. Log identification: After each photographing, the convolutional neural network trained by the deep learning technology based on the convolutional neural network CNN automatically identifies the end face contour and the center point of a complete log in the center of the display screen image, repairs the defective log end face, obtains the center points and contours of the front and back end faces of each log, numbers and manages each log, and the numbers of the two end faces of the same log in a stack are the same. S3. Image processing: Convert the contour of each log end face identified in S2 into a contour map composed of 720 points; it is used to calculate the shortest diameter of the log end face. S4. Calculate the shortest diameter and its vertical diameter of a single log: Measure and calculate the distances between all two points passing through the center of the log end face on the log end face contour obtained in S3, find the straight line between the two points corresponding to the minimum value, which is the shortest diameter of the log end face. Draw a perpendicular line to this straight line through the center of the log to obtain the vertical diameter of the shortest diameter. Measure the length of the vertical diameter, calculate the average value of the shortest diameter and its vertical diameter of the log end face, compare the data of the two end faces of the same log, and confirm and save the data of the small end of the log. S5. Data Upload: When the measurement of a complete stack is finished, number each log in the order of taking pictures, use the 4G upload module to upload each end-face picture of the log taken, upload the log stack information, upload the values of the shortest diameter and its vertical diameter of the small end of each log end-face, input and upload the log length value, upload the information of the log measurer, and upload the information of the log measuring device; S6. Log Volume Calculation: The host computer receives the stack information, operator information, hand-held log measuring device information, data of the shortest diameter and its vertical diameter of the small end of each log end-face, log numbers, and the front and back images of each log end-face uploaded from the hand-held log measuring device, calculates the volume of a single log, and calculates the volume of the entire log stack by summing up the volumes of each log. According to the actual needs of users, various query and statistical reports are generated, and at the same time, a manual inspection and verification function is provided.
3. A fixed-length log scaling method based on deep learning according to claim 2, characterized in that The specific steps are as follows: First, take pictures of the front and back end-faces of each log in a single-log manner for any number of log stacks, label the original end-face images of the front and back of the single-log end-face with the log contour, use the convolutional neural network model YOLO to extract the log contour feature vector, and use this feature vector and the labeled log contour data set as the training set to train the hand-held log measuring device to accurately identify the contour line and its center point of a single log in each image; specify the number of this log contour in the order of taking pictures, and the numbers of the front and back of the same log at both ends are the same; use a fixed algorithm to repair the defective log end-face contour; after the measurement is completed, the log end-face number specified during taking pictures is used as the unique number of this log in this stack, and the related photos and measurement data can be queried and used through this number.
4. The fixed-length log scaling method based on deep learning according to claim 3, wherein: When measuring the length of the shortest diameter and its vertical diameter of the log end-face, use the built-in laser rangefinder to measure the distance between the measuring lens and the log end-face, calibrate the pixel size information of the image pixel coordinate system with a checkerboard plane, and generate a distance size coefficient table, which ensures the practicability of the log measuring device.
5. The fixed-length log scaling method based on deep learning according to claim 4, characterized in that: The process of training and extracting the feature matrix of the log contour is as follows: Use the manually labeled log end-face contour image set as the training set, select any value between 0 and 1 as the initial value of the log contour feature matrix, and use the CNN convolutional neural network and the backpropagation error algorithm to train this CNN neural network through supervised machine learning to obtain a feature matrix that can identify the log contour, identify the log end-face contour and its center point in the original log end-face image, and number each log so that the numbers of the same log in the front and back images are the same.
Citation Information
Patent Citations
Log stack dynamic scale measuring system and method based on binocular area parallax
CN113610933A
Method, device and equipment for determining length and diameter of log and storage medium
CN117372499A
Wood gauge diameter measuring method based on deep learning
CN117589076A
Machine vision-based log volume detection method and system
CN117635619A
Cited By
Hazardous and waste container stacking normalization detection method based on visual identification
CN121811333A