Whole-vehicle log diameter-level measurement and code spraying method, device and system

The three-axis mobile truss and camera system are used to automatically measure the log diameter and print the code, solving the problem of low efficiency of manual operation, achieving high-precision automated measurement and coding, and reducing safety risks.

CN120702360AActive Publication Date: 2025-09-26BEIJING ZHIDAHONGCHUANG TECH CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202510873322.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-26
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

The existing log diameter measurement and coding process relies on a lot of manual operations, resulting in low efficiency, inaccurate measurement data and safety hazards.

Method used

A three-axis mobile truss is used to drive a scanning camera and a camera to obtain three-dimensional point cloud data of the log stack. The diameter is automatically measured by calculating the three-dimensional point cloud data of the log end face contour, and the coding path is planned, and the coding is automatically performed using a coding device.

Benefits of technology

It realizes the automatic measurement and coding of log diameter parameters, improves the measurement accuracy and automation level, reduces the safety risks of manual operation, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120702360A_ABST
    Figure CN120702360A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of log gauging, and discloses a whole-vehicle log diameter-level measuring and code spraying method, device and system, and the method comprises the steps: controlling a scanning camera to move in the length direction of logs, and controlling the scanning camera to carry out the photographing, and obtaining the three-dimensional point cloud of the contour edge of a log stack; according to the three-dimensional point cloud of the contour edge of the log stack, determining a horizontal downward probing position coordinate and an initial downward probing depth of the camera; controlling a three-axis moving truss to drive a photographing camera to move and controlling the photographing camera to photograph based on the horizontal downward probing position coordinates and the initial downward probing depth, and obtaining contour three-dimensional point cloud data of the log front end face and the log rear end face of the log stack; calculating the log diameter level according to the contour three-dimensional point cloud data; according to the log diameter level and the center position of the log end face determined based on the contour three-dimensional point cloud data, a code spraying path is planned and code spraying is carried out, log diameter level parameter automatic measurement and code spraying can be achieved, and the automation and digitization level of log gauging is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of log measuring, and in particular to a method, device and system for measuring and coding the diameter grades of logs on a vehicle. Background Art

[0002] At docks and log processing plants, measuring logs primarily relies on manual labor, measuring each log individually. Traditionally, logs are marked with chalk at their ends. This can lead to data loss during long periods of storage, and repeated measurements are required before shipment. This creates a heavy workload, a time-consuming process, and can lead to inaccurate measurement data. Furthermore, the high level of manual labor involved on-site often leads to serious safety incidents.

[0003] Therefore, there is an urgent need for a new vehicle-wide log diameter measurement and coding system to realize intelligent processing of log diameter measurement and coding and reduce the workload of workers. Summary of the Invention

[0004] In view of this, the present invention provides a method, device and system for measuring and coding the diameter grade of logs on a whole vehicle, so as to solve the technical problem that the existing log diameter grade measurement and coding process requires manual processing and is inefficient.

[0005] In the first aspect, the present invention provides a method for measuring and coding the diameter of logs on a whole vehicle, including: controlling a three-axis mobile truss to drive a scanning camera to move along the length direction of the log and controlling the scanning camera to take pictures to obtain a three-dimensional point cloud of the contour edge of the log stack; determining the horizontal downward position coordinates and the initial downward depth of the camera based on the three-dimensional point cloud of the contour edge of the log stack; controlling the three-axis mobile truss to drive the camera to move based on the horizontal downward position coordinates and the initial downward depth and controlling the camera to take pictures to obtain the contour three-dimensional point cloud data of the front end face and the rear end face of the log stack; calculating the diameter of the log based on the contour three-dimensional point cloud data; planning the coding path based on the log diameter and the center position of the log end face determined based on the contour three-dimensional point cloud data, and controlling the three-axis mobile truss to drive the coding device to move based on the coding path and controlling the coding device to code.

[0006] The present invention controls a three-axis mobile truss to drive a scanning camera to move along the length direction of the logs and controls the scanning camera to take pictures, thereby obtaining a three-dimensional point cloud of the log stack contour edge, determining the horizontal downward position coordinates and initial downward depth of the camera based on the three-dimensional point cloud of the log stack contour edge, controlling the three-axis mobile truss to drive the camera to move based on the horizontal downward position coordinates and the initial downward depth, and controlling the camera to take pictures, thereby obtaining three-dimensional point cloud data of the contours of the front and rear ends of the logs of the log stack, calculating the log diameter based on the three-dimensional point cloud data of the contours, planning a coding path based on the log diameter and the center position of the log end face determined based on the three-dimensional point cloud data of the contours, and controlling the three-axis mobile truss to drive the movement of the coding device based on the coding path and controlling the coding device to print the codes, thereby realizing automatic measurement and coding of log diameter parameters, improving the automation and digitization level of log measurement, and effectively solving the objective problems of current manual measurement, solving the pain points of traditional log measurement, and reducing the potential safety risks of traditional measurement.

[0007] In an optional embodiment, the determining of the horizontal downward position coordinates and the initial downward depth of the camera based on the three-dimensional point cloud of the log stack contour edge includes: calculating the number of log stacks and the end face horizontal coordinate position and stack height corresponding to each log stack based on the three-dimensional point cloud of the log stack contour edge; determining the horizontal downward position coordinates of the camera based on the end face horizontal coordinate position; and calculating the initial downward depth of the camera based on the stack height and a preset vehicle plate depth.

[0008] In this way, by calculating the number of log stacks, the horizontal coordinate position of the end face of each stack, and the stack height, the moving position of the camera can be determined to obtain the end face image of the log.

[0009] In an optional embodiment, the calculating the initial diving depth of the camera according to the stacking height and the preset vehicle plate depth includes: subtracting the preset vehicle plate depth from the stacking height to obtain the initial diving depth of the camera.

[0010] In this method, the initial diving depth of the camera is obtained by taking the difference between the preset car plate depth and the stacking height. The method is simple and easy to implement, and can quickly and accurately determine the initial diving depth of the camera, providing a guarantee for obtaining clear and accurate images of the end faces of logs, thereby improving the accuracy of log diameter measurement.

[0011] In an optional embodiment, after determining the horizontal diving position coordinates and the initial diving depth of the camera according to the three-dimensional point cloud of the log stack outline edge, the method includes: calculating the target diving times according to the stack height.

[0012] In this method, the target number of descents is calculated based on the stack height, and the number of descents of the camera can be reasonably arranged according to the actual height of the log stack, which ensures that a sufficient amount of image data can be obtained to accurately calculate the log diameter, and avoids the camera from descending too low and hitting the vehicle deck.

[0013] In an optional embodiment, the camera is an array binocular vision camera, and correspondingly, based on the horizontal diving position coordinates and the initial diving depth, the three-axis mobile truss is controlled to drive the camera to move and control the camera to take pictures, so as to obtain the contour three-dimensional point cloud data of the front end face and the rear end face of the log stack, including: controlling the three-axis mobile truss to drive the camera to move along the X-axis direction and the Y-axis direction to the horizontal diving position, and then diving along the Z-axis direction to the initial diving depth and controlling the camera to take pictures; controlling the three-axis mobile truss to drive the camera to descend in sequence along the Z-axis direction to a preset depth until the number of diving times reaches the target number of diving times, and controlling the camera Take a picture after each descent; obtain the left-eye end face image and the right-eye end face image taken by the camera, calculate the left-eye end face image and the right-eye end face image through a binocular stereo matching algorithm based on deep learning, and obtain sub-three-dimensional point clouds of the front end face and the rear end face of the log of the log stack; calculate and obtain the posture relationship between the array cameras in the camera based on the feature point matching algorithm, and splice several of the sub-three-dimensional point clouds into an overall point cloud according to the posture relationship; segment the left-eye end face image of the camera based on the target segmentation algorithm to obtain the log end face contour, and project the coordinates of the log end face contour into the overall point cloud to obtain the contour three-dimensional point cloud data of the front end face and the rear end face of the log of the log stack.

[0014] In this method, a binocular stereo matching algorithm based on deep learning is used to calculate the left and right end face images, and a feature point matching algorithm is used to perform sub-3D point cloud stitching. This can improve the accuracy and reliability of image processing and point cloud stitching, thereby more accurately obtaining the contour 3D point cloud data of the log stack, thereby improving the accuracy of the log diameter calculation.

[0015] In an optional embodiment, the calculating the log diameter grade according to the contour three-dimensional point cloud data includes: calculating the major axis diameter and the minor axis diameter of each log in the front end face and the rear end face of the log according to the contour three-dimensional point cloud data; calculating the average value of the major axis diameter and the minor axis diameter to obtain the average diameter of each log at the front end face and the rear end face of the log; determining a matching pair of the front end face of the log and the rear end face of the log according to the three-dimensional positional relationship of the contour three-dimensional point cloud data of the front end face of the log and the contour three-dimensional point cloud data of the rear end face of the log; and processing the average diameter of the end face with the smaller average diameter in the matching pair according to the 2 cm rounding rule to obtain the log diameter grade.

[0016] In this way, the accuracy and comprehensiveness of log diameter calculation are improved, and by taking the average diameter of the end face with the smaller average diameter in the matching pair as the log diameter, it is more in line with the log measurement standard.

[0017] In an optional embodiment, the major axis diameter and the minor axis diameter of each log in the front end face and the rear end face of the log are calculated respectively according to the contour three-dimensional point cloud data, including: extracting the end face contour of each log in the front end face and the rear end face of the log according to the contour three-dimensional point cloud data; determining the center point of the end face contour, starting from the straight line passing through the center point, rotating the straight line counterclockwise or clockwise by a preset angle until it rotates 180 degrees, wherein the preset angle is 2 degrees to 5 degrees; calculating the distance between the two intersection points of the straight line and the end face contour after each rotation of the straight line by a preset angle; determining the shortest distance between the two intersection points, and determining the minor axis diameter based on the shortest distance, drawing a vertical line based on the shortest distance, and determining the major axis diameter based on the distance between the vertical line and the two intersection points of the end face contour.

[0018] In this method, the major axis diameter and minor axis diameter of the end face profile can be accurately determined by calculating the intersection distance by rotating the straight line.

[0019] In an optional embodiment, before controlling the three-axis mobile truss to drive the scanning camera to move along the length direction of the log and controlling the scanning camera to take pictures to obtain the three-dimensional point cloud of the log stack contour edge, it includes: identifying whether the vehicle currently traveling to the detection area of ​​the three-axis mobile truss is a log transfer vehicle; if the vehicle is not a log transfer vehicle, the vehicle is allowed to pass; if the vehicle is a log transfer vehicle, the step of controlling the three-axis mobile truss to drive the scanning camera to move along the length direction of the log and controlling the scanning camera to take pictures to obtain the three-dimensional point cloud of the log stack contour edge.

[0020] In this way, it is possible to identify whether the vehicle currently traveling into the three-axis mobile truss detection area is a log transfer vehicle, and allow non-transfer vehicles to pass, thus avoiding unnecessary detection and measurement of non-target vehicles and improving the operating efficiency of the system.

[0021] In a second aspect, the present invention provides a computer device comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for measuring and coding the diameter grade of logs on a vehicle as described in the first aspect of the present invention by executing the computer instructions.

[0022] In the third aspect, the present invention provides a whole-vehicle log diameter measurement and coding system, including: a frame column; a three-axis movable truss, arranged above the frame column, for driving the movement of a scanning camera, a camera and a coding device; and a computer device such as the second aspect of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0024] Figure 1 1 is a flow chart of a method for measuring and coding the diameter of logs on a vehicle according to an embodiment of the present invention;

[0025] Figure 2 2. It is a structural diagram of a vehicle-wide log diameter measurement and coding system according to an embodiment of the present invention;

[0026] Figure 3 2. This is a schematic diagram of the workflow of the vehicle log diameter measurement and coding system according to an embodiment of the present invention;

[0027] Figure 4 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention.

[0028] Description of reference numerals:

[0029] 1. X-axis truss; 2. Y-axis truss; 3. Z-axis truss; 4. Frame column; 5. Leveling base; 6. Scanning camera; 7. Photo camera; 8. Inkjet printer. DETAILED DESCRIPTION

[0030] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0031] In response to the problem that related technologies require manual measurement of logs, the present invention proposes a method, equipment and system for measuring and coding the diameter of a whole truck of logs, which effectively solves the pain points of low efficiency, large errors and high safety hazards of manual measurement. It is suitable for automated measurement and coding of the volume of whole trucks of logs in scenarios such as ports and logistics centers.

[0032] According to an embodiment of the present invention, an embodiment of a method for measuring and coding the diameter grades of logs on a whole truck is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] In this embodiment, a method for measuring and coding the diameter of logs on a vehicle is provided, which can be used in computer equipment, such as an intelligent terminal with a programmable logic controller, an industrial computer, a tablet computer, etc. The method is based on the system for measuring and coding the diameter of logs on a vehicle according to the embodiment of the present invention, and is combined with Figure 1 and Figure 2 As shown, the method includes the following steps:

[0034] Step S101 : Control the three-axis mobile truss to drive the scanning camera 6 to move along the length direction of the logs and control the scanning camera 6 to take pictures to obtain a three-dimensional point cloud of the edge of the log stack.

[0035] Specifically, the three-axis movable truss is arranged above the frame column 4 . When performing inspection, the vehicle carrying the logs travels to the bottom of the frame column 4 . The bottom of the frame column 4 is provided with a leveling base 5 .

[0036] The three-axis mobile truss consists of X-axis truss 1, Y-axis truss 2, and Z-axis truss 3, arranged along the X, Y, and Z axes, respectively. The X-axis is parallel to the length of the logs. Each truss is constructed of high-strength structural steel and integrates a servo drive system, a slide rail unit, and anti-collision protection. Laser ranging sensors and micro cameras are installed at the end of the truss mechanism, combined with OpenCV algorithms to identify obstacles and prevent hard collisions.

[0037] There are two X-axis trusses 1, each with an effective travel of approximately 15.3 meters. There are four Y-axis trusses 2, with two Y-axis trusses 2 installed in front and behind the X-axis truss 1, each with an effective travel of approximately 4.4 meters. Each Y-axis truss 2 is equipped with at least one Z-axis truss 3, with an effective travel of approximately 3.2 meters and a load capacity of ≥200kg. It uses a helical gear + ball screw drive to eliminate return clearance. The three-axis mobile truss is fixed to the frame column 4, and the base is adjusted to ensure that the equipment installation is always maintained at the same level, ensuring stable operation of the equipment. The truss is welded and formed from high-strength steel, and the slide rail mounting grooves are precision-machined by the CNC gantry.

[0038] Two groups of Y-axis trusses 2 are set at the rear end, which are respectively connected to the two groups of X-axis trusses 1 on the large frame through sliders. The trusses are driven by servo motors to move on high-precision slide rails. Two groups of Z-axis trusses 3 are fixed on the two groups of Y-axis trusses 2. A group of scanning cameras 6 and photo cameras 7 are fixed at the end of one group of Z-axis trusses 3. The Z-axis trusses 3 are driven by servo motors to move horizontally from the rear of the vehicle to drive the scanning camera 6 to scan the outline of the logs, and the Z-axis trusses 3 are driven to move in the vertical direction to drive the photo camera 7 to take pictures of the end faces of the logs. A coding unit is fixed at the end of the other group of Z-axis trusses 3, and the coding unit is driven by Y-axis and Z-axis servo motors to reach the end face position of the log. The coding device 8 fine-tunes the nozzle position to realize end face printing operation.

[0039] The structure of the two sets of Y-axis trusses 2 and Z-axis trusses 3 at the front end is the same as the structure of the two sets of Y-axis trusses 2 and Z-axis trusses 3 at the rear end. Anti-collision protection function is set between the four sets of Y-axis trusses 2 to serve as a safety protection mechanism during equipment operation.

[0040] In one example, a servo motor drives the motion mechanism to rapidly move the Y-axis truss 2 within the X-axis truss 1 at speeds up to 1 m / s, with a repeatability accuracy of ±0.5 mm. A servo motor drives the Z-axis truss 3 up and down within the Y-axis truss 2 at speeds of 0.8 m / s, with a repeatability accuracy of ±0.25 mm.

[0041] The computer controls the movement of each truss by controlling the rotation of the servo motors integrated into each truss. Specifically, when the log truck arrives at its location, the inspection process begins. The computer controls the servo motors to move the Z-axis truss 3, which is equipped with a scanning camera 6. The end scanning camera 6 scans from the end of the truck and stops at the end of the truck's pallet. The scanning camera group 6 then moves horizontally to the center of the X-axis truss 1, and the scanned data is synchronously transmitted to the computer.

[0042] Scanning camera 6 uses a binocular vision camera and tracks the log outline in real time based on the captured video. When the edge of the log stack's end is directly below the camera, the truss stops moving and the binocular vision camera is controlled to take a photo. Using the binocular vision algorithm, a 3D point cloud of the log stack's edge is obtained.

[0043] Step S102 : determining the horizontal downward position coordinates and initial downward downward depth of the camera 7 based on the three-dimensional point cloud of the log stack outline edge.

[0044] Specifically, the 3D point cloud of the log stack's outline includes coordinate information and shape information of the logs' outlines. Based on this information, the size and position of the logs in the 3D point cloud of the log stack's outline can be calculated. Based on this size and position information, the horizontal position coordinates and initial depth of camera 7 can be determined, allowing camera 7 to descend to a suitable position to capture an image of the log's end face. The resulting image of the log's end face includes either the bottom edge or the top edge of the stack.

[0045] By using a binocular vision camera as the scanning camera 6 to obtain a three-dimensional point cloud of the log stack's outline edge, the horizontal probe position coordinates and initial probe depth of the camera 7 are determined. Compared with traditional three-dimensional modeling calculation methods, this method has the advantages of low computational complexity and fast scanning speed. In addition, related solutions use a laser 3D scanning method, discarding the target's RGB information. In actual operations, it is easy to mistakenly identify the front of the vehicle, the vehicle board, and other debris as part of the wood, resulting in calculation errors or errors. The solution of the embodiment of the present invention also takes into account the RGB information of the wood, resulting in better fault tolerance, higher calculation accuracy, faster scanning speed, and reduced waiting time during the scanning process.

[0046] Step S103, based on the horizontal diving position coordinates and the initial diving depth, the three-axis mobile truss is controlled to drive the camera 7 to move and control the camera 7 to take pictures, so as to obtain the three-dimensional point cloud data of the contours of the front and rear faces of the logs in the log stack.

[0047] Specifically, the X-axis servo motor is controlled according to the horizontal downward position coordinates to drive the front and rear two groups of cameras 7 to the corresponding end face downward position. After reaching the corresponding position, the front and rear two groups of Z-axis trusses 3 begin to drive the front and rear cameras 7 to start downward shooting under the control of the computer equipment. According to the images taken by the front and rear cameras 7, the contour three-dimensional point cloud data of the front end face and the rear end face of the log are generated respectively.

[0048] Step S104: Calculate the log diameter grade based on the outline three-dimensional point cloud data.

[0049] Specifically, the three-dimensional point cloud data of the end face contour includes the coordinate information of the end face contour of each log. Therefore, the diameter grade of the front face of the log can be calculated based on the three-dimensional point cloud data of the front face contour of the log, and the diameter grade of the rear face of the log can be calculated based on the three-dimensional point cloud data of the rear face contour of the log. The log diameter grade is calculated based on the diameter grade of the front face of the log and the diameter grade of the rear face. Preferably, the size of the diameter grade of the rear face of the log and the size of the front face of the log can be compared, and the smaller value can be taken as the log diameter grade.

[0050] Step S105, planning a coding path according to the log diameter grade and the center position of the log end face determined based on the contour three-dimensional point cloud data, and controlling the three-axis moving truss to drive the coding device 8 to move and control the coding device 8 to code based on the coding path.

[0051] Specifically, the camera 7 scans and images the log end face, stitches the image information obtained by each camera into a whole image, segments the log end face contour through a deep learning algorithm, and obtains the center position of each log in three-dimensional space by analyzing the depth information of the log end face. w and log diameter grade D w Then, first based on the center position P of the log end face w and log diameter grade D w Calculate the boundary outline of the log stack and the average distance between the ends of each log Among them, D sum is the sum of the end diameters of all logs, N w is the number of logs. The log stack is modeled into a dynamic hierarchical network model based on the boundary contour of the log stack and the average center spacing of the log end faces. The number of rows and columns of the log stack is then calculated, and the row and column where the log is located is obtained based on the position of the log, and is used as the index number of the log. The path planning algorithm traverses the log nodes in the dynamic hierarchical network model in a spiral progressive manner, generates a coding sequence list, and calculates the optimal coding path. Finally, the optimal coding path Path and the boundary contour Conta of the log are subjected to anti-collision constraints to optimize the safe coding path Path * By combining the physical constraints of log stacking, the traveling salesman problem of log coding is optimized. Compared with the traditional traveling salesman problem, it is divided into brute force enumeration method, dynamic programming, branch and bound method, greedy algorithm, etc., and its solution time complexity is O((n-1)!), O(n 2 2 n ), O(n!), O(n 2 ), and the solution time complexity of the present invention can reach O(nlog(n)), which is much lower than the traditional method. It greatly shortens the calculation time and the time to find the optimal path, thereby improving the efficiency of log measurement and coding.

[0052] Furthermore, an adjustable control telescopic structure and a coding device 8 are provided at the ends of the two groups of Z-axis trusses 3 in front and behind the three-axis mobile truss, and a posture sensor is provided to provide real-time feedback on the safe printing distance, controlling the coding device 8 to always maintain the safe threshold distance. The adjustable control telescopic structure adjusts the nozzle position to always maintain the safe threshold of 50mm. The dot matrix nozzle prints on the end faces of the logs one by one through the algorithm path, and the repeat position accuracy is controlled at 0.5mm. The inkjet printer is suitable for an ambient temperature of 0℃-45℃, and can print clearly on uneven and damp log ends. The printing font size is 50mm-80mm. After the log printing is completed, the system detects that the printing result is correct and then a voice reminder is given to the transfer vehicle to leave.

[0053] The embodiment of the present invention is applicable to logs with a diameter range of 80mm-1200mm and length specifications including 4 meters, 6 meters and 12 meters. The vehicle-carried stacks are 1 or 2 stacks, and the gap between the 2 stacks is greater than 800mm. If the stacking gap is too small, manual intervention is required.

[0054] In an embodiment of the present invention, a three-axis movable truss is controlled to drive a scanning camera 6 to move along the length direction of the logs and to control the scanning camera 6 to take pictures, thereby obtaining a three-dimensional point cloud of the log stack's outline edge. The horizontal downward position coordinates and initial downward depth of a camera 7 are determined based on the three-dimensional point cloud of the log stack's outline edge. Based on the horizontal downward position coordinates and the initial downward depth, the three-axis movable truss is controlled to drive the camera 7 to move and control the camera 7 to take pictures, thereby obtaining three-dimensional point cloud data of the front and rear ends of the logs of the log stack. The log diameter is calculated based on the three-dimensional point cloud data of the outline. A coding path is planned based on the log diameter and the center position of the log end determined based on the three-dimensional point cloud data of the outline. Based on the coding path, the three-axis movable truss is controlled to drive the coding device 8 to move and control the coding device 8 to print. In this way, the log diameter parameters can be automatically measured and printed, thereby improving the automation and digitization level of log measurement. At the same time, it can effectively solve the objective problems of current manual measurement, address the pain points of traditional log measurement, and reduce the potential safety risks of traditional measurement.

[0055] In some embodiments, step S102, determining the horizontal downward position coordinates and initial downward depth of the camera 7 based on the three-dimensional point cloud of the log stack outline edge, includes:

[0056] Step S1021 , calculating the number of log stacks and the horizontal coordinate position of the end face and the stack height corresponding to each log stack based on the three-dimensional point cloud of the log stack outline edge.

[0057] Specifically, there may be more than one stack of logs on each vehicle, so the number of log stacks is first identified. For example, when it is detected that the distance between two adjacent logs is greater than 500 mm, it is determined that the two logs belong to two different stacks, and the stack number is 2.

[0058] According to the position coordinates in the three-dimensional point cloud of the log stack outline edge, the horizontal coordinates of the end face and the stack height of each stack are further calculated.

[0059] Step S1022: determining the horizontal downward position coordinates of the camera 7 according to the horizontal coordinate position of the end surface.

[0060] Specifically, the horizontal coordinate position of the end surface is used as a reference, and the field of view of the camera 7 is added to determine the distance between the camera 7 and the end surface, so as to obtain the horizontal downward position coordinate.

[0061] Step S1023 , calculating the initial penetration depth of the camera 7 according to the stacking height and the preset vehicle plate depth.

[0062] Specifically, the initial penetration depth of the camera 7 is determined by subtracting the preset car plate depth from the stack height. This method is simple and easy to implement, and can quickly and accurately determine the camera's initial penetration depth, ensuring the acquisition of clear and accurate images of the log end faces, thereby improving the accuracy of log diameter measurement.

[0063] In the embodiment of the present invention, by calculating the number of log stacks, the horizontal coordinate position of the end face of each stack, and the stack height, the moving position of the camera 7 can be determined to obtain the end face image of the log.

[0064] Furthermore, in step S102, after determining the horizontal downward position coordinates and initial downward depth of the camera 7 according to the three-dimensional point cloud of the log stack outline edge, the following steps are included:

[0065] Step S1024: Calculate the target number of probes according to the stacking height.

[0066] Specifically, a preset depth is set for each exploration, and the stacking height is divided by the preset depth to obtain the target number of explorations.

[0067] In one example, the target number of descents is 4, and the preset depth of each descent is 400 mm-600 mm. The descents and photographs are completed in 4 times. After the photographic inspection is completed, the Z-axis truss 3 is quickly lifted and moved to the middle position of the stack.

[0068] The embodiment of the present invention can reasonably arrange the number of times the camera 7 is lowered according to the actual height of the log stack, which ensures that a sufficient amount of image data can be obtained to accurately calculate the log diameter grade, and avoids the camera 7 from descending too low and hitting the vehicle plate.

[0069] In some embodiments, the camera 7 is an array binocular vision camera. Correspondingly, in step S103, the three-axis mobile truss is controlled based on the horizontal probe position coordinates and the initial probe depth to drive the camera 7 to move and control the camera 7 to take pictures, thereby obtaining the three-dimensional point cloud data of the contours of the front and rear ends of the logs in the log stack, including:

[0070] Step S1031, controlling the three-axis movable truss to drive the camera 7 to move along the X-axis and Y-axis directions to the horizontal downward position, and then downward along the Z-axis direction to the initial downward depth and controlling the camera 7 to take pictures;

[0071] Step S1032: Control the three-axis mobile truss to drive the camera 7 to descend in sequence along the Z-axis to a preset depth until the number of descents reaches the target number, and control the camera 7 to take a picture after each descent;

[0072] Step S1033: Obtain the left end face image and the right end face image captured by the camera 7, and calculate the left end face image and the right end face image using a binocular stereo matching algorithm based on deep learning to obtain sub-3D point clouds of the front end face and the rear end face of the logs in the log stack;

[0073] Step S1034: Based on a feature point matching algorithm, calculate and obtain the posture relationship between the array cameras in the camera 7, and splice the plurality of sub-three-dimensional point clouds into an overall point cloud according to the posture relationship;

[0074] In step S1035, the left end face image of the camera 7 is segmented based on the target segmentation algorithm to obtain the log end face contour, and the coordinates of the log end face contour are projected into the overall point cloud to obtain the contour three-dimensional point cloud data of the front end face and the rear end face of the log stack.

[0075] Specifically, the array-type binocular vision camera is arranged along the Y-axis direction. The array-type binocular vision camera can obtain images collected by multiple cameras at one time, thereby improving shooting efficiency.

[0076] By controlling the number of probes and the depth of the probe, it is ensured that the images taken during multiple probes include the bottom edge of the stack or the top edge of the stack after being stitched together.

[0077] After capturing left and right end-face images with the binocular array, a deep learning-based binocular stereo matching algorithm is used to generate sub-3D point clouds of the photographed log ends. A feature point matching algorithm is then used to calculate the pose relationship between the array cameras, thereby stitching these multiple sub-3D point clouds into a single point cloud. Furthermore, an object segmentation algorithm is used to accurately determine the log end face outline using the RGB image captured by the left binocular camera. The coordinates of this log end face outline are then projected onto the overall point cloud, resulting in a 3D point cloud of the log end face outline.

[0078] The log diameter grade and the center position coordinates of the log end face are further calculated based on the three-dimensional point cloud data of the log end face contour.

[0079] In this method, a deep learning-based binocular stereo matching algorithm calculates the left and right end face images, and a feature point matching algorithm is used to stitch the sub-3D point clouds together to obtain a whole point cloud. The color image of the log end face contour is then projected to obtain the contour 3D point cloud data. Compared to the method of using a surface grating structured light camera to obtain 3D coordinates, the use of an array of binocular vision cameras reduces equipment costs and provides a self-controlled technical approach. In practice, surface grating structured light camera technology faces the problems of mutual interference between multiple camera arrays and multipath interference (when close to the vehicle floor), resulting in slow imaging speeds and weak anti-interference capabilities. The embodiment of the present invention uses an advanced binocular depth recovery algorithm based on a depth model, which not only achieves the same level of accuracy as a structured light camera, but also has fast imaging speeds, strong anti-interference capabilities, and a self-controlled algorithm.

[0080] In some embodiments, step S104, calculating the log diameter based on the contour three-dimensional point cloud data, includes:

[0081] Step S1041 , calculating the major axis diameter and the minor axis diameter of each log at the front end face and the rear end face of the log respectively based on the outline three-dimensional point cloud data.

[0082] Step S1041 includes:

[0083] Step a1, extracting the end face contours of each log at the front end face and the rear end face of the log based on the contour three-dimensional point cloud data;

[0084] Step a2, determining the center point of the end face profile, and starting from a straight line passing through the center point, rotating the straight line counterclockwise or clockwise by a preset angle until it rotates 180 degrees, wherein the preset angle is 2 degrees to 5 degrees;

[0085] Step a3, calculating the distance between two intersection points of the straight line and the end face contour after the straight line rotates by a preset angle each time;

[0086] Step a4, determining the shortest distance between the two intersection points, and determining the minor axis diameter based on the shortest distance, drawing a vertical line based on the shortest distance, and determining the major axis diameter based on the distance between the vertical line and the two intersection points of the end face profile.

[0087] The preset angle is between 2 degrees and 5 degrees. This reference is small and can obtain a more accurate minor axis diameter. By calculating the intersection distance by rotating the straight line, the major axis diameter and minor axis diameter of the end face profile can be accurately determined.

[0088] Exemplarily, the straight line passing through the center point is initially in a horizontal position, and the preset angle is 3 degrees, that is, the straight line is rotated 3 degrees each time, and the distance between the two intersection points of the straight line and the end face contour is calculated to obtain the diameter in the corresponding direction. After rotating 180 degrees, the diameters in various directions are obtained, and finally the minimum value is selected as the minor axis diameter, and the perpendicular line of the minor axis is taken as the major axis direction, and the vertical line is taken as the vertical major diameter.

[0089] Step S1042: Calculate the average value of the major axis diameter and the minor axis diameter to obtain the average diameter of each log at the front end and the rear end.

[0090] The average of the short diameter and the long diameter is taken, and then rounded up according to the rules as the average diameter. This method complies with the calculation standards for log diameter grades in international standards and has high applicability.

[0091] Step S1043 , determining a matching pair of the front end face of the log and the rear end face of the log according to the three-dimensional positional relationship between the three-dimensional point cloud data of the outline of the front end face of the log and the three-dimensional point cloud data of the outline of the rear end face of the log.

[0092] The contours of the same log in the three-dimensional point cloud data of the front end face of the log and the three-dimensional point cloud data of the rear end face of the log are relative. Therefore, based on the three-dimensional position of the log contour, it is possible to determine whether the contours in the three-dimensional point cloud data of the front and rear end faces are of the same log, and the contours of the same log in the three-dimensional point cloud data of the front and rear end faces are taken as a matching pair.

[0093] Step S1044 , processing the average diameter of the end face with the smaller average diameter in the matching pair according to the 2 cm rounding rule to obtain the log diameter grade.

[0094] Specifically, while calculating the average diameter of the front and rear ends of the log, the matching pairs of the front and rear ends are calculated, and the end face with the smaller diameter grade in the same matching pair is taken as the log end face for the final volume calculation. The average diameter of the end face is processed according to the 2cm rounding rule, with 2cm as the incremental unit, and the less than is rounded up to obtain the final log diameter grade.

[0095] The embodiment of the present invention intelligently identifies matching pairs and uses the average diameter of the end face with the smaller average diameter in the matching pair as the log diameter grade, which is more in line with the log measurement standard. There is no need to arrange the log heads in advance, which reduces manual participation, has higher feasibility in actual business and makes the detection process more convenient.

[0096] In some embodiments, in step S101, before controlling the three-axis mobile truss to drive the scanning camera 6 to move along the length direction of the logs and controlling the scanning camera 6 to take pictures and obtain the three-dimensional point cloud of the log stack outline edge, the process includes:

[0097] Step b1, identifying whether the vehicle currently traveling into the detection area of ​​the three-axis mobile truss is a log transfer vehicle.

[0098] Step b2: If the vehicle is not a log transfer vehicle, the vehicle is allowed to pass. If the vehicle is a log transfer vehicle, the process proceeds to the step of controlling the three-axis mobile truss to drive the scanning camera 6 to move along the length direction of the logs and controlling the scanning camera 6 to take pictures to obtain the three-dimensional point cloud of the log stack contour edge.

[0099] Specifically, the log transfer vehicle in the yard approaches the rolling gate in front of the inspection plant. The camera located on the rolling gate and other entrances takes a picture of the vehicle and identifies the license plate information. The license plate information is matched with the preset log transport vehicle database. When the identified license plate information is in the preset log transport vehicle database, the front and rear rolling gates open, and the vehicle enters the inspection area, triggering log inspection and coding. Otherwise, the vehicle is allowed to pass.

[0100] In this way, it is possible to identify whether the vehicle currently traveling into the three-axis mobile truss detection area is a log transfer vehicle, and allow non-transfer vehicles to pass, thus avoiding unnecessary detection and measurement of non-target vehicles and improving the operating efficiency of the system.

[0101] In an embodiment of the present invention, the detected log diameter information and the preset log transport vehicle database can be stored locally or in the cloud. The local storage uses SQLite real-time storage, and the cloud storage is synchronized to AWS S3 storage through the MQTT protocol and supports AES-256 encryption.

[0102] The embodiment of the present invention also provides a schematic diagram of the structure of a computer device, such as Figure 4As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.

[0103] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0104] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.

[0105] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0106] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0107] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 4 The bus connection is taken as an example.

[0108] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0109] The embodiment of the present invention further provides a vehicle-wide log diameter measurement and coding system, comprising:

[0110] Frame column 4;

[0111] A three-axis mobile truss is provided above the frame column 4 and is used to drive the scanning camera 6, the camera 7 and the inkjet device 8 to move;

[0112] Such as the computer device in the above embodiment of the present invention.

[0113] The three-axis mobile truss includes an X-axis truss 1, a Y-axis truss 2 and a Z-axis truss 3. Each truss has a slide rail and a driving mechanism. The driving mechanism can be a motor plus a gear rack to achieve linear transmission, driving the slider on the slide rail to move linearly. The X-axis truss 1 and the Y-axis truss 2 are connected by a slider, and the Y-axis truss 2 and the Z-axis truss 3 are connected by a slider. The slider between the two trusses adopts a main slider and an auxiliary support slider to provide a stable and stable support structure for the Z-axis truss 3. Compared with the traditional Z-axis truss overall upward movable structure, the overall structural frame is effectively reduced by 3 meters.

[0114] Furthermore, the vehicle-mounted log grading and coding system also includes a vehicle identification device, which includes a license plate recognition system and front and rear rolling shutters. Video detection determines whether a vehicle is a log carrier. Non-carrying vehicles are prohibited from passing through the gauge inspection equipment building. Parking signs are set up in the inspection equipment area, and transport vehicles must follow the physical marking lines.

[0115] The vehicle-mounted log diameter measurement and coding system also includes a data storage management module, which can use local or cloud storage. The storage system can detect the equipment's operating status in real time through the application interface, accurately detect the equipment's full life cycle status, dynamically display the transport vehicle's measurement process, and connect the detection data to the production system.

[0116] like Figure 3 As shown, the overall workflow of the vehicle log diameter measurement and coding system according to the embodiment of the present invention is as follows:

[0117] The vehicle's type is determined through video surveillance, and if it's a log transport vehicle, the system initiates a detection activation program. The end-of-line scanning camera 6, controlled by a computer and controlled by a servo motor, begins scanning from the vehicle's rear end and stops at the front end of the vehicle's pallet. The scanning camera 6 then moves horizontally to the center of the X-axis truss 1. The scanning information is synchronously transmitted to the computer, which determines the number of log stacks, the horizontal coordinates of each stack's end face, and the stack height. This information then determines the horizontal down-sweep position coordinates for the camera 7. For each log stack, the front and rear cameras 7, controlled by the computer and controlled by the X-axis servo motors, move the cameras 7 to their respective down-sweep positions. Once the cameras reach their respective positions, the Z-axis truss 3, under computer control, begins descending, driving the front and rear cameras 7 to take photos. Each dive takes place from 400mm to 600mm, and the photos are taken in three or four attempts. After the photo inspection is completed, the Z-axis truss 3 is quickly lifted and moved to the middle position of the stack, and the coding device 8 starts to move to the optimal end face printing position simultaneously. After the coding of one group of stacks is completed, the next stack is photographed and coded. After the process is completed, the camera 7 is reset.

[0118] The vehicle-scale log diameter measurement and coding system of this invention utilizes visual image acquisition and processing, deep learning algorithms, and high-precision mechanical control to automate the entire process of log end profile recognition, diameter calculation, coding marking, and timber volume measurement. The system supports logs with diameters ranging from 80mm to 1200mm and lengths from 4m to 12m, with a detection error of ≤3%, coding positioning accuracy of ±0.5mm, and a single-log detection and coding time of ≤3 seconds. This effectively addresses the inefficiency, large errors, and high safety risks of manual measurement, making it suitable for use in various scenarios such as ports and logistics centers.

[0119] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope of protection.

Claims

1. A method for measuring and coding the diameter of logs on a vehicle, characterized in that: include: Controlling the three-axis mobile truss to drive the scanning camera to move along the length direction of the logs and controlling the scanning camera to take pictures to obtain a three-dimensional point cloud of the edge of the log stack; Determining the horizontal downward position coordinates and initial downward depth of the camera according to the three-dimensional point cloud of the log stack outline edge; Based on the horizontal probe position coordinates and the initial probe depth, the three-axis movable truss is controlled to drive the camera to move and control the camera to take pictures, thereby obtaining three-dimensional point cloud data of the contours of the front and rear faces of the logs in the log stack; Calculating the log diameter grade based on the outline three-dimensional point cloud data; The coding path is planned according to the log diameter grade and the center position of the log end face determined based on the contour three-dimensional point cloud data, and the three-axis mobile truss is controlled based on the coding path to drive the coding device to move and control the coding device to print.

2. The method for measuring and coding the diameter of logs on a vehicle according to claim 1, characterized in that: The step of determining the horizontal downward position coordinates and the initial downward depth of the camera according to the three-dimensional point cloud of the log stack outline edge comprises: Calculating the number of log stacks and the horizontal coordinate position of the end face and the stack height corresponding to each log stack based on the three-dimensional point cloud of the log stack outline edge; Determine the horizontal downward position coordinates of the camera according to the horizontal coordinate position of the end surface; The initial penetration depth of the camera is calculated according to the stacking height and the preset vehicle plate depth.

3. The method for measuring and coding the log diameter of a vehicle according to claim 2, characterized in that: The calculating of the initial penetration depth of the camera according to the stacking height and the preset vehicle plate depth includes: The initial penetration depth of the camera is obtained by subtracting the preset vehicle plate depth from the stacking height.

4. The method for measuring and coding the diameter of logs on a vehicle according to claim 2, characterized in that: After determining the horizontal downward position coordinates and initial downward depth of the camera according to the three-dimensional point cloud of the log stack outline edge, the method includes: The target number of probes is calculated according to the stacking height.

5. The method for measuring and coding the diameter of logs on a vehicle according to claim 4, characterized in that: The camera is an array binocular vision camera. Correspondingly, based on the horizontal probe position coordinates and the initial probe depth, the three-axis mobile truss is controlled to drive the camera to move and control the camera to take pictures, thereby obtaining three-dimensional point cloud data of the contours of the front and rear ends of the logs in the log stack, including: Controlling the three-axis mobile truss to drive the camera to move along the X-axis and Y-axis directions to the horizontal downward position, and then downward along the Z-axis direction to the initial downward depth and controlling the camera to take pictures; Controlling the three-axis mobile truss to drive the camera to descend in sequence along the Z-axis to a preset depth until the number of descents reaches the target number of descents, and controlling the camera to take a picture after each descent; Obtaining a left end face image and a right end face image taken by the camera, and calculating the left end face image and the right end face image using a binocular stereo matching algorithm based on deep learning to obtain sub-three-dimensional point clouds of the front end face and the rear end face of the logs in the log stack; Based on a feature point matching algorithm, the pose relationship between the array cameras in the camera is calculated and obtained, and the plurality of sub-three-dimensional point clouds are spliced ​​into an overall point cloud according to the pose relationship; The left end face image of the camera is segmented based on the target segmentation algorithm to obtain the log end face contour, and the coordinates of the log end face contour are projected into the overall point cloud to obtain the contour three-dimensional point cloud data of the front end face and the rear end face of the log stack.

6. The method for measuring and coding the diameter of logs on a vehicle according to claim 1, characterized in that: The calculating of the log diameter grade according to the contour three-dimensional point cloud data includes: Calculating the major axis diameter and minor axis diameter of each log at the front end face and the rear end face of the log respectively based on the contour three-dimensional point cloud data; Calculating an average value of the major axis diameter and the minor axis diameter to obtain an average diameter of each log at the front end and the rear end; Determining a matching pair of the front end face of the log and the rear end face of the log based on a three-dimensional positional relationship between the three-dimensional point cloud data of the outline of the front end face of the log and the three-dimensional point cloud data of the outline of the rear end face of the log; The average diameter of the end face with the smaller average diameter in the matching pair is rounded off by 2 cm to obtain the log diameter grade.

7. The method for measuring and coding the diameter of logs on a vehicle according to claim 1, characterized in that: Calculating the major axis diameter and minor axis diameter of each log at the front end face and the rear end face of the log respectively according to the contour three-dimensional point cloud data includes: Extracting the end face contours of each log at the front end face and the rear end face of the log according to the contour three-dimensional point cloud data; Determine the center point of the end face profile, and starting from a straight line passing through the center point, rotate the straight line counterclockwise or clockwise by a preset angle until it rotates 180 degrees, wherein the preset angle is 2 degrees to 5 degrees; Calculating the distance between two intersection points of the straight line and the end face contour after the straight line rotates by a preset angle each time; Determine the shortest distance between the two intersection points and determine the minor axis diameter based on the shortest distance. Draw a perpendicular line based on the shortest distance and determine the major axis diameter based on the distance between the perpendicular line and the two intersection points of the end face profile.

8. The method for measuring and coding the diameter of logs on a vehicle according to claim 1, characterized in that: Before controlling the three-axis mobile truss to drive the scanning camera to move along the length direction of the logs and controlling the scanning camera to take pictures to obtain the three-dimensional point cloud of the log stack outline edge, the process includes: Identify whether the vehicle currently traveling into the detection area of ​​the three-axis mobile truss is a log transfer vehicle; If the vehicle is not a log transfer vehicle, the vehicle is allowed to pass. If the vehicle is a log transfer vehicle, the process begins with controlling the three-axis mobile truss to drive the scanning camera to move along the length direction of the log and controlling the scanning camera to take pictures to obtain a three-dimensional point cloud of the log stack contour edge.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the vehicle log diameter grade measurement and coding method according to any one of claims 1 to 8 by executing the computer instructions.

10. A vehicle-wide log diameter measurement and coding system, characterized in that: include: frame columns; A three-axis mobile truss is arranged above the frame column and is used to drive the scanning camera, the camera and the inkjet device to move; The computer device of claim 9.

Citation Information

Patent Citations

  • Charger scanner system

    CA2933490A1

  • Object measurement system

    CA3082445A1

  • Load scanning apparatus

    CA3127866A1

  • Log measuring device

    CN114705119A

  • Log measurement control method based on automatic prompt

    CN117249769A