A whole vehicle timber measuring system and method based on ArUco code
Through the whole vehicle wood sizing system based on ArUco code, the problems of low efficiency and insufficient accuracy of wood material area detection in the prior art are solved, and automated detection is realized, efficiency and accuracy are improved, and costs are reduced.
Patent Information
- Application Number
- CN202111529294.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2041-12-14
AI Technical Summary
In the prior art, wood material area detection efficiency is low, accuracy is greatly affected by humans, and manual inspection rulers are large in workload and costly, so they cannot adapt to the development trend of modern wood processing and sales.
The whole vehicle wood ruler system based on ArUco code is adopted, and the photos are calibrated through the ArUco code module, the image acquisition and calibration module obtains camera parameters, the deep learning module recognizes the end face of the wood and generates a mask diagram. The material volume calculation module uses the ArUco code to calculate the actual length of each pixel, and combines the mask diagram to calculate the wood material volume.
Automatic wood material area detection is realized, which improves detection efficiency and accuracy, reduces manual intervention and reduces production costs.
Smart Images

Figure CN114202589B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of log volume detection, and in particular to a whole-vehicle log measurement system and method based on ArUco code. Background Art
[0002] Wood is a renewable energy source and a structural resource for the world's sustainable development. The United Nations Intergovernmental Panel on Climate Change (IPCC) believes that renewable wood energy is the key to all strategies to mitigate climate change. How to more efficiently develop wood resources in forests and improve recycling efficiency has important economic and environmental benefits.
[0003] At present, all links of forestry production, such as felling, timber making, transportation, and processing, have been mechanized and are gradually developing towards informatization and intelligence. At present, in forestry production, several links in the production process, such as felling, transportation, and field management, require manual measurement to achieve production settlement and sales payment settlement. Manual measurement is labor-intensive, inefficient, and highly affected by human factors. At the same time, the high cost of measurement increases production costs, and has high requirements for the staff's work attitude, work experience, and sense of responsibility. At the same time, there are some dangerous factors in the measurement environment.
[0004] The manual measurement method cannot visualize the measurement results, and it also cannot adapt to the development trend of modern wood processing and sales. In recent years, the development and progress of computer vision, digital image processing, deep learning and other technologies have injected new vitality into the development of various industries.
[0005] At present, wood detection research based on deep learning has just begun to emerge at home and abroad. Although the wood counting problem has been solved to a certain extent, the task of wood volume measurement is still in the exploratory stage.
[0006] The main methods for wood volume detection at home and abroad are:
[0007] 1. Apply the SSD (Single Shot MultiBox Detector) target detection model and use rectangular boxes to detect and mark wood.
[0008] 2. Combine the YOLOv3 (You Only Look Once) object detection model with the Hough circle transform and use circle detection to mark the wood.
[0009] 3. Combine the SSD (Single Shot MultiBox Detector) target detection model with the FCN semantic segmentation model. Use the SSD model to detect the location of wood piles on the car, crop it into wood area pictures, and send it to the FCN (Fully Convolution Network) model to complete wood segmentation.
[0010] Pose estimation plays an important role in computer vision: robot navigation, augmented reality, etc. The basis of this process is to find the corresponding points between the real world and the image projection. One of the most popular approaches is based on binary square marking, which can provide four corners to obtain information about the camera. The internal binary encoding allows the application of error detection and correction.
[0011] ArUco code, such as Figure 6 As shown in the figure, the Aruco code is a black and white grid composed of an outer border and an inner Hamming code. The outer border and four corners are mainly used for label positioning, and the inner Hamming code is mainly used for ID (Identity Document) recognition, information verification and error correction.
[0012] ArUco library is a very popular library for detecting binary markers. It can match 2D and 3D based on the 3D point cloud of images and lidar parameters, find corresponding points of at least 4 2D pixels and 3D point cloud points, and estimate the camera pose based on these four sets of corresponding points and camera internal and external parameters. ArUco detection library has been integrated into the OpenCV open source computer vision processing library and is widely used in fields such as augmented reality and robot navigation. For example, Sun Hao, Cui Rui, Duan Lunhui and others from Hebei University of Technology invented and disclosed a monocular 6D pose estimation method based on regular octahedron. The method combines ArUco code with regular octahedron and expands pose recognition from 2D label recognition to recognition of 3D space body. Deng Wenyao, Duan Xuechao and Jing Mingyang from the Key Laboratory of Electronic Equipment Structural Design of the Ministry of Education of Xidian University proposed a dynamic target tracking method based on ArUco marker and sparse optical flow. The combination of ArUco marker and sparse optical flow realizes dynamic tracking and improves the accuracy of binocular matching. Yuan Zhihao, Liu Guiyang, and Chen Guotai from the School of Electrical and Information Engineering of Heilongjiang Bayi Agricultural University have designed a mobile augmented reality simulation system for agricultural machinery turning the soil based on ArUco markers, aiming at the problem that traditional agricultural machinery turning the soil is seasonal and difficult to observe. Taking rice farm machinery as the research object, they have designed a mobile augmented reality simulation system for agricultural machinery turning the soil based on ArUco markers. Zhang Zhiguo, Li Xujie, Li Baoxiang, and others from Shandong University of Science and Technology have overcome the defects of traditional visual navigation methods, such as strong dependence on auxiliary physical conditions, high environmental requirements, and inflexibility, and have expanded the traditional visual navigation method that is only applicable to ground mobile robots to three-dimensional space. The present invention mainly calculates the actual length of a unit pixel in the photographed photo by identifying the ArUco maker and using its actual length. Summary of the invention
[0013] The object of the present invention is to provide a whole vehicle timber measuring system and method based on ArUco code.
[0014] The technical solution adopted by the present invention is:
[0015] A whole-vehicle timber measuring system based on ArUco code, comprising an ArUco code module, a server module, an image acquisition and calibration module, a deep learning module, a timber volume calculation module and a user operation module connected to the server module;
[0016] The ArUco code module is a PVC board with a known side length and printed with ArUco code. The ArUco code module is used to calibrate the taken photos and obtain the actual length of the unit pixel in the taken photos;
[0017] The image acquisition and calibration module includes an image acquisition part and a calibration part. The image acquisition part provides an industrial camera to take photos of the front and rear of the wood locomotive. The calibration part provides a black and white grid calibration plate and an open source camera parameter calibration program of OpenCV.
[0018] The server module is used to store and manage wood photos, deploy wood volume calculation algorithms, store wood volume information databases and user operation interfaces;
[0019] The deep learning module performs model training to identify wood end faces and generate mask images for wood segmentation, which are used for subsequent wood counting and volume calculation.
[0020] The volume calculation module includes the ArUco code detection program and the developed volume calculation program.
[0021] The user operation module provides a web page interface, and through the web page interface provides users with the functions of viewing wood volume information, marking missed wood, and re-storing it in the database.
[0022] Furthermore, the image acquisition and calibration module includes two 8-megapixel industrial cameras respectively fixed on the gantry.
[0023] Furthermore, the black-and-white grid calibration plate is a 16*10 black-and-white grid calibration plate.
[0024] Furthermore, the server module can select cloud servers from various providers.
[0025] Furthermore, the model carried by the deep learning module is an improved Mask-RCNN instance segmentation model.
[0026] Furthermore, the web page interface is a Java-based web page interface.
[0027] A method for measuring the length of a whole vehicle of wood based on ArUco code, comprising the following steps:
[0028] Step 1: Fix the industrial camera on the gantry and calibrate the internal and external parameters of the industrial camera;
[0029] Step 2: Take the image to be tested with the ArUco code and upload it to the server module.
[0030] Step 3: The deep learning module obtains the image to be tested and uses the pre-trained model to identify the end face of the wood and generate a mask image for each piece of wood;
[0031] Step 4: The volume calculation module identifies the position of the ArUco code in the image to be tested, and uses the ArUco code as a reference to calculate the actual length of each pixel in the image to be tested taken by the camera;
[0032] Step 5, the wood volume calculation module obtains the mask image of the wood and performs circle fitting or ellipse fitting through the developed software, calculates the pixel length occupied by the diameter or minimum diameter of each wood end face in the image to be measured in the fitted wood mask image, and calculates the corresponding measuring ruler length in combination with the actual length of each pixel;
[0033] Step 6: Substitute the gauge length and the gauge diameter of the wood obtained by using the ArUco code into the standard wood volume calculation formula to calculate the corresponding wood volume, and save the generated wood volume information in a database deployed on the server side.
[0034] Furthermore, in step 1, before officially acquiring the photos, twenty to thirty pictures need to be taken using a calibration board to obtain the internal and external parameters of the camera; that is, an image of wood is taken with a handheld calibration board, the calibration board is close to and parallel to the end face of the wood, and the hand does not block the black and white grid area inside the calibration board.
[0035] Furthermore, the pre-training steps of the model in step 3 are as follows:
[0036] Step 3-1: Collect no less than 300 photos of wood taken under different shooting conditions.
[0037] Specifically, as an effective implementation method, 1,000 wood pictures are collected, and different shooting conditions include different lighting conditions, different wood end surface backgrounds and different shooting angles.
[0038] Step 3-2: Remove blurry images or images that are severely blocked by branches and keep 150 clear images.
[0039] Step 3-3: Use the polygon annotation tool to mark the outlines of all the wood in the picture.
[0040] Furthermore, Labelme software was used to label the wood contours of all wood in the image using the polygon labeling tool.
[0041] Step 3-4: The training model is trained to learn the wood contour features based on the labeled wood images.
[0042] Furthermore, the specific steps of step 4 are as follows:
[0043] Step 4-1: The volume calculation module obtains the positions of the four corners of the ArUco code in the image to be tested through the ArUco code detection program in OpenCV.
[0044] Step 4-2, correct the position of the ArUco code through perspective transformation operation;
[0045] Step 4-3, based on the length of the ArUco code and the pixel value occupied by the ArUco code in the picture, calculate the actual length of each pixel in the picture to be tested.
[0046] The present invention adopts the above technical scheme, the image acquisition and calibration module uploads the calibration parameters and the image acquired by the camera to the server, the deep learning module is used to identify the end face of the wood, generate a mask map for wood segmentation, and is used for subsequent wood counting and volume calculation operations; the volume calculation module is composed of an ArUco code detection program and a volume calculation program; the user operating system is mainly used to check and fill in the gaps in the identified wood volume information. In the wood loading and unloading project, the end face of the wood may be blocked by leaves, so the deployed wood recognition model cannot fully recognize all wood 100%. For missed or misdetected wood, a simple check and fill operation is required in the human-computer interaction interface. The present invention frees up manpower, improves the efficiency of measuring rulers, and improves the calculation accuracy of forest wood volume. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments;
[0048] Figure 1 This is a schematic diagram of the architecture of a vehicle-wide timber measuring system based on ArUco code according to the present invention;
[0049] Figure 2 The flowchart of each module of the whole vehicle timber measuring system based on ArUco code of the present invention;
[0050] Figure 3 A schematic diagram of the camera calibration process of the present invention;
[0051] Figure 4 Label schematic diagrams for Labelme software;
[0052] Figure 5 3D simulation diagram for on-site implementation;
[0053] Figure 6 Schematic diagram of ArUco code. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0055] like Figures 1 to 5 As shown in FIG. 1 , the present invention discloses a whole-vehicle timber measuring system based on ArUco code, which includes an ArUco code module, a server module, and an image acquisition and calibration module, a deep learning module, a timber volume calculation module, and a user operation module connected to the server module;
[0056] The ArUco code module is a PVC board with a known side length and printed with ArUco code. The ArUco code module is used to calibrate the taken photos and obtain the actual length of the unit pixel in the taken photos;
[0057] The image acquisition and calibration module includes an image acquisition part and a calibration part. The image acquisition part provides an industrial camera to take photos of the front and rear of the wood locomotive. The calibration part provides a black and white grid calibration plate and an open source camera parameter calibration program.
[0058] The server module is used to store and manage wood photos, deploy timber volume calculation algorithms, store timber volume information databases and user operation interfaces; the server module is the central module that integrates the entire system. The deep learning reasoning module, camera-captured photos, identified timber volume information, and the front-end user operating system are all deployed on the server side.
[0059] The deep learning module performs model training to identify wood end faces and generates a mask image for wood segmentation, which is used for subsequent wood counting and volume calculation. The deep learning inference module deployed on the server side generates the image. After the image is uploaded to the server, the improved Mask R-CNN model outputs the identified wood mask image to the specified database on the server side.
[0060] The volume calculation module includes the ArUco code detection program and the developed volume calculation program.
[0061] The user operation module provides a web interface, and through the web interface provides users with the functions of viewing wood volume information, marking missed wood, and re-storing it to the database. Specifically, the user operating system is mainly used to check and fill in the gaps in the identified wood volume information. In the wood loading and unloading project, the end faces of the wood may be blocked by leaves, so the deployed wood recognition model cannot fully recognize all wood 100%. For missed or misdetected wood, simple checking and filling operations are required in the human-computer interaction interface.
[0062] Furthermore, the image acquisition and calibration module includes two 8-megapixel industrial cameras respectively fixed on the gantry 1 .
[0063] Furthermore, the black-and-white grid calibration plate is a 16*10 black-and-white grid calibration plate.
[0064] Furthermore, the server module is a Tencent Cloud server, an Alibaba Cloud server or a Google Cloud server.
[0065] Furthermore, the model carried by the deep learning module is an improved Mask-RCNN instance segmentation model.
[0066] Furthermore, the web page interface is a Java-based web page interface.
[0067] Specifically, the image acquisition and calibration module uploads the calibration parameters and the image acquired by the camera to the server. The improved Mask deep learning module and the volume calculation module are also deployed on the server module. The deep learning module is used to identify the end faces of wood and generate a mask map for wood segmentation, which is used for subsequent wood counting and volume calculation operations. The volume calculation module consists of an ArUco code detection program and a developed volume calculation program. The user operating system is mainly used to check and fill in the gaps in the identified wood volume information. In the wood loading and unloading project, the end faces of the wood may be blocked by leaves, etc. Therefore, the deployed wood recognition model cannot fully recognize all wood 100%. For missed and misdetected wood, simple leak-filling operations are required in the human-computer interaction interface.
[0068] A method for measuring the length of a whole vehicle of wood based on ArUco code, comprising the following steps:
[0069] Step 1, fix the industrial camera 2 on the gantry 1, and calibrate the internal and external parameters of the industrial camera 2;
[0070] Step 2: Take the image to be tested with the ArUco code and upload it to the server module.
[0071] Step 3, the deep learning module obtains the image to be tested and uses the pre-trained model to identify the end face of the wood 3 to generate a mask image of the wood;
[0072] Step 4: The volume calculation module identifies the position of the ArUco code in the image to be tested, and uses the ArUco code as a reference to calculate the actual length of each pixel in the image to be tested taken by the camera;
[0073] Step 5, the wood volume calculation module obtains the mask image of the wood and calculates the pixel length of the diameter or the minimum diameter of each wood end face in the image to be measured in the fitted wood mask image by performing circle fitting or ellipse fitting, and calculates the corresponding measuring ruler length in combination with the actual length of each pixel;
[0074] Step 6: Substitute the measured length and the measured diameter of the wood 3 obtained by using the ArUco code into the standard volume calculation formula to calculate the corresponding volume of the wood 3, and save the generated volume information of the wood 3 into the database deployed on the server side.
[0075] Specifically, the ruler length is the diameter or the pixel length of the minimum diameter obtained in step 5 * the actual length of each pixel measured in step 4, and the volume calculation formula is calculated according to the volume calculation formula listed in the national standard GB / T 4814-2013 "Log Volume Table" to calculate the corresponding wood volume.
[0076] According to my country's national standard GB / T 4814-2013 "Log Volume Table", the volume calculation of logs is determined by two parameters: the diameter grade of the end face of the log (measured diameter) and the length of the log (measured length). In the log trade and circulation industry, the length of the same batch of wood is relatively fixed and easier to obtain. In contrast, the end faces of logs vary in size, making it difficult to quickly obtain their diameter grades.
[0077] The gauge length refers to the actual length of the wood, which is provided by the gauge personnel. When calculating the volume of wood, the gauge diameter refers to the smallest diameter of the wood end surface. When manually measuring the wood, a ruler is used to measure and the smallest diameter of the wood end surface is observed with the naked eye, and this value is taken as the gauge diameter.
[0078] In the present invention, since the length of the ArUco code is known, the actual length represented by each pixel in the photo can be obtained by identifying the ArUco code. Through the Mask R-CNN instance segmentation model, the mask image of the wood end face (black and white wood end face contour image) is obtained, and then a circle or ellipse is fitted. In addition, the unit length of each pixel in the photo can be obtained through the ArUco code, and the pixels occupied by the diameter of the circle or ellipse after fitting are taken, and then multiplied by the actual length represented by each pixel to obtain the ruler length.
[0079] Different lengths and diameters of wood have different calculation formulas and calculation accuracy. If the length and diameter of the wood are known, you can substitute them into the corresponding formula for calculation. Please refer to the national standard GB / T 4814-2013 "Log Volume Table" for detailed instructions.
[0080] Furthermore, in step 1, before officially acquiring the photo, it is necessary to use the calibration board to take twenty to thirty pictures to obtain the internal and external parameters of the camera; that is, take an image of the wood 3 with a handheld calibration board, the calibration board is close to and parallel to the end surface of the wood 3, and the hand does not block the black and white grid area inside the calibration board.
[0081] Furthermore, the pre-training steps of the model in step 3 are as follows:
[0082] Step 3-1, collect no less than 300 pictures of wood 3 under different shooting conditions,
[0083] Specifically, as an effective implementation method, 1000 pictures of wood 3 are collected, and different shooting conditions include different lighting conditions, different wood end surface backgrounds and different shooting angles.
[0084] Step 3-2: Remove blurry images or images that are severely blocked by branches and keep 150 clear images.
[0085] Step 3-3: Use the polygon annotation tool to mark the outlines of all the wood in the picture.
[0086] Furthermore, the annotation software is used to annotate the wood contours of all the wood in the image using a polygon annotation tool.
[0087] Step 3-4: The training model is trained to learn the wood contour features based on the labeled wood images.
[0088] Furthermore, the specific steps of step 4 are as follows:
[0089] Step 4-1: The volume calculation module obtains the positions of the four corners of the ArUco code in the image to be tested through the ArUco code detection program.
[0090] Step 4-2, correct the position of the ArUco code through perspective transformation operation;
[0091] Step 4-3, based on the length of the ArUco code and the pixel value occupied by the ArUco code in the picture, calculate the actual length of each pixel in the picture to be tested.
[0092] The following is a detailed description of the specific working principle:
[0093] The image acquisition and calibration module requires the use of tools such as a gantry 1 to fix the camera for stable acquisition of wood photos. Before formally acquiring photos, it is necessary to use a calibration board to take 20 to 30 pictures to obtain the internal and external parameters of the camera. Hold the calibration board as close to the end face of the wood as possible and keep it parallel. The hand cannot cover the black and white grid area inside the calibration board. The shooting diagram is as follows Figure 3 Shown
[0094] The deep learning module is used to identify the end faces of wood. Considering the diversity of samples, 1,000 wood images were collected through industrial cameras 2 and other equipment, including images under different lighting conditions, different wood end face backgrounds, and different shooting angles. Mask R-CNN is a supervised learning model, and the outlines of the wood in the images need to be annotated. Blurred images and images that are severely obscured by branches are removed, and a total of 150 clear images are retained. The polygon annotation tool is used to annotate the outlines of all the wood in the images using annotation software. The annotation effect is as follows: Figure 4 As shown, the wood labeling information can provide the model with wood contour features, and the subsequent wood counting and wood volume calculation can be achieved according to the wood contour mask map.
[0095] The volume calculation module first needs to use the ArUco code detection program to obtain the positions of the four corners of the ArUco code in the image, and then correct the position of the ArUco code through perspective transformation and other operations. Since the ArUco code and the wood to be inspected are located on the same plane, the ArUco code is used as a reference. At the same time, the length of the ArUco code and the pixel value it occupies in the image are known. Therefore, based on these parameters, the actual length of each pixel in the photo taken by the camera can be obtained.
[0096] Then the mask map output by the improved Mask R-CNN model deployed on the server side is output to the developed software. By performing circle fitting or ellipse fitting, the pixel length of the diameter or minimum diameter of each wood end face in the photographed image can be calculated. Finally, the real diameter or minimum diameter of the wood can be obtained by a simple calculation, that is, diameter * actual length of each pixel. In the actual measurement process, the wood transport trucks usually transport wood of similar length, and most of them are 4m in length. Therefore, the measurement length and the measurement diameter of the wood obtained by ArUco code are substituted into the standard wood volume calculation formula to calculate the corresponding wood volume. Finally, the generated wood volume information is saved in the database deployed on the server side to facilitate subsequent additions, deletions, modifications and inquiries.
[0097] The present invention adopts the above technical scheme. The image acquisition and calibration module uploads the calibration parameters and the image acquired by the camera to the server. The deep learning module is used to identify the end face of the wood and generate a mask map for wood segmentation, which is used for subsequent wood counting and volume calculation operations; the volume calculation module is composed of an ArUco code detection program and a volume calculation program; the user operating system is mainly used to check and fill in the gaps in the identified wood volume information. In the wood loading and unloading project, the end face of the wood may be blocked by leaves, so the deployed wood recognition model cannot fully recognize all wood 100%. For missed or misdetected wood, a simple check and fill operation is required in the human-computer interaction interface. The present invention frees up manpower, improves the efficiency of measuring rulers, and improves the calculation accuracy of forest wood volume.
[0098] Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians of the art without making creative work are within the scope of protection of the present application.
Claims
1. A whole-vehicle timber measurement system based on ArUco code, characterized by: It includes an ArUco code module, a server module, and an image acquisition and calibration module, a deep learning module, a volume calculation module, and a user operation module connected to the server module; The ArUco code module is a PVC board with a known side length and printed with ArUco code. The ArUco code module is used to calibrate the taken photos and obtain the actual length of the unit pixel in the taken photos; The image acquisition and calibration module includes an image acquisition part and a calibration part. The image acquisition part provides an industrial camera to take photos of the front and rear of the wood locomotive. The calibration part provides a black and white grid calibration plate and an open source camera parameter calibration program. The server module is used to store and manage wood photos, deploy wood volume calculation algorithms, store wood volume information databases and user operation interfaces; The deep learning module performs model training to identify wood end faces and generate mask images for wood segmentation, which are used for subsequent wood counting and volume calculation. The volume calculation module includes an ArUco code detection program and a developed volume calculation program. The volume calculation module identifies the positions of the four corners of the ArUco code in the image to be tested through the ArUco code detection program, corrects the position of the ArUco code through a perspective transformation operation, and calculates the actual length of each pixel in the image to be tested based on the length of the ArUco code and the pixel value occupied by the ArUco code in the image. The volume calculation module obtains the mask image of the wood end face and calculates the pixel length of the diameter or the minimum diameter of each wood end face in the image to be measured in the fitted wood mask image through circle fitting or ellipse fitting, and then multiplies it by the actual length represented by each pixel to calculate the corresponding gauge length, and substitutes the gauge length and the gauge diameter of the wood obtained by the ArUco code into the standard volume calculation formula to calculate the corresponding wood volume; The user operation module provides a web page interface, and through the web page interface provides users with the functions of viewing wood volume information, marking missed wood, and re-storing it in the database.
2. The whole vehicle timber measuring system based on ArUco code according to claim 1 is characterized in that: The image acquisition and calibration module includes two 8-megapixel industrial cameras respectively fixed on the gantry.
3. The whole vehicle timber measuring system based on ArUco code according to claim 1 is characterized in that: The black and white grid calibration plate is a 16*10 black and white grid calibration plate.
4. The whole vehicle timber measuring system based on ArUco code according to claim 1 is characterized in that: The server module is Tencent Cloud Server, Alibaba Cloud Server or Google Cloud Server.
5. The whole vehicle timber measuring system based on ArUco code according to claim 1 is characterized in that: The model used in the deep learning module is the improved Mask-RCNN instance segmentation model.
6. A method for measuring the length of a whole truck of wood based on ArUco code, using the system for measuring the length of a whole truck of wood based on ArUco code according to any one of claims 1 to 5, characterized in that: The method comprises the following steps: Step 1: Fix the industrial camera on the gantry and calibrate the internal and external parameters of the industrial camera; Step 2: Take the image to be tested with the ArUco code and upload it to the server module. Step 3, the deep learning module obtains the image to be tested and uses the pre-trained model to identify the wood end face, generating a mask image of the wood end face; Step 4: The volume calculation module identifies the positions of the four corners of the ArUco code in the image to be tested through the ArUco code detection program, corrects the position of the ArUco code through a perspective transformation operation, and calculates the actual length of each pixel in the image to be tested based on the length of the ArUco code and the pixel value occupied by the ArUco code in the image; Step 5, the timber volume calculation module obtains the mask image of the timber end face and calculates the pixel length of the diameter or the minimum diameter of each timber end face in the image to be measured in the fitted timber mask image through circle fitting or ellipse fitting, and then multiplies it by the actual length represented by each pixel to calculate the corresponding measuring length; Step 6: Substitute the gauge length and the gauge diameter of the wood obtained by using the ArUco code into the standard wood volume calculation formula to calculate the corresponding wood volume, and save the generated wood volume information in a database deployed on the server side.
7. The method for measuring the length of a whole vehicle of wood based on ArUco code according to claim 6 is characterized in that: In step 1, before officially taking photos, you need to use the calibration board to take 20 to 30 pictures to obtain the internal and external parameters of the camera; that is, take an image of wood with a handheld calibration board, the calibration board is close to and parallel to the end face of the wood, and the hand does not block the black and white grid area inside the calibration board.
8. The method for measuring the length of a whole vehicle of wood based on ArUco code according to claim 6, characterized in that: The pre-training steps of the model in step 3 are as follows: Step 3-1: Collect no less than 300 photos of wood taken under different shooting conditions. Step 3-2: Remove blurry images or images that are severely blocked by branches and keep 150 clear images. Step 3-3: Use the polygon annotation tool to mark the outlines of all the wood in the picture. Step 3-4: The training model is trained to learn the wood contour features based on the labeled wood images.
9. The method for measuring the length of a whole vehicle of wood based on ArUco code according to claim 8, characterized in that: In step 3-3, use the annotation software to use the polygon annotation tool to mark the wood contours of all the wood in the image.
10. The method for measuring the length of a whole vehicle of wood based on ArUco code according to claim 6, characterized in that: The specific steps of step 4 are as follows: Step 4-1: The volume calculation module obtains the positions of the four corners of the ArUco code in the image to be tested through the ArUco code detection program. Step 4-2, correct the position of the ArUco code through perspective transformation operation; Step 4-3, based on the length of the ArUco code and the pixel value occupied by the ArUco code in the picture, calculate the actual length of each pixel in the picture to be tested.
Citation Information
Patent Citations
Image-based wood plate dimension measuring method
CN109631766A
Log scaling system and related methods
CN111512115A