Next Article in Journal
Evaluating Dendrolimus superans (Lepidoptera: Lasiocampidae) Occurrence and Density Modeling with Habitat Conditions
Previous Article in Journal
Utilizing Comprehensive Criteria and Indicators for Post-Fire Forest Restoration in Spatial Decision Support Systems (SDSS)
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Design and Implementation of an Intelligent Log Diameter Grading and Sorting Line Based on Machine Vision

1
School of Mechanical and Automotive Engineering, Fujian University of Technology, Fuzhou 350118, China
2
Digital Fujian Industrial Manufacturing Internet of Things Laboratory, Fuzhou 350118, China
*
Author to whom correspondence should be addressed.
Forests 2024, 15(2), 387; https://doi.org/10.3390/f15020387
Submission received: 3 January 2024 / Revised: 20 January 2024 / Accepted: 31 January 2024 / Published: 19 February 2024
(This article belongs to the Section Wood Science and Forest Products)

Abstract

:
In order to address the challenges posed by elevated manual labor costs and limited automation in traditional log diameter grading and sorting processes, this paper centers on the design and research of an intelligent log diameter grading and sorting line utilizing machine vision. The study focuses on logs with smaller diameters located in Fujian province, China. By analyzing production requirements, the study formulates the structure of the feeding, alignment, detection, and sorting zones to fulfill sorting functions. Using the YOLOv5 model, the system achieves accurate log end face positioning, and the diameter is computed through a designated algorithm. The operational process of the system is examined, and the control logic governing the production line is elucidated. Evaluating the practical performance of the production line, the study assesses the accuracy of diameter recognition, precision in grading, and operational efficiency. The results reveal that the absolute error in diameter detection for the sorting line averages 1.12 mm, with sorting accuracy exceeding 95%. The sorting line can automatically categorize logs with diameters ranging from 60 mm to 300 mm and lengths ranging from 2 m to 6 m, achieving an annual sorting capacity of 120,000 to 130,000 cubic meters. The research findings illustrate that the system fulfills the industry’s demands for log diameter grading and sorting, thereby enhancing economic efficiency for enterprises.

1. Introduction

Following the harvesting of timber in forestry operations, harvested logs are transported to sawmills for processing. With the rising cost of logs, diminishing supply, and an increasing demand for specialty products, sawmills globally are compelled to maximize the extraction of value from raw materials. Hence, sawmills worldwide have been actively exploring strategies to reduce raw material waste and enhance the yield from original logs [1]. In order to minimize material waste, the pre-sorting of logs based on their diameter is an indispensable step for the majority of sawmills before processing begins [2]. This step is pivotal in determining the specifications, quality, and suitability of the logs. Pre-sorting practices are widespread in southern Europe and eastern Canada, with over 95% of sawmills in countries such as Sweden implementing pre-sorting procedures.
However, most domestic enterprises in China still rely on traditional manual log diameter grading and sorting, a process fraught with numerous challenges. Given the vast quantity of harvested logs, manual measurements frequently lead to instances of under-detection and missed logs. Traditional manual measurements also require the collaboration of two to three individuals, with two tasked with measurements and one assigned to record keeping [3], demanding a considerable amount of manpower. Furthermore, the Chinese National Standards GB/T 144-2013 [4] for the size inspection of logs is intricate; for instance, in the case of the commonly encountered elliptical end face logs, the diameter measurement involves taking the short diameter through the center of the small end section, then vertically measuring the long diameter through the center of the short diameter (excluding bark thickness), and finally calculating the result according to the standard. In the face of a massive workload, workers often deviate from strict adherence to standards to ensure efficiency. The measurement methods, including the use of tape measures as measuring tools, are frequently not strictly in accordance with the standards. Consequently, the quality of tape measures used for measurement varies. As a result, the accuracy of log diameters cannot be guaranteed, leading to lower sorting precision [5]. When measuring logs that are stacked at elevated heights, workers must ascend to potentially hazardous positions, posing both danger and physical strain. Following diameter measurements, different-sized logs must be individually coded and sorted, adding to the labor intensity and risk factor of the entire process. In frigid regions, these challenges are further intensified. Therefore, the development of automatic log detection and sorting equipment is of significant importance in improving the production efficiency of log sorting, reducing labor intensity, and mitigating safety risks. This presents a practical solution for the development of related industries.
Regarding research on automatic log sorting systems, both domestic and international scholars, as well as companies, have conducted relevant research. The log sorting line developed by Hekotek, an Estonia-based company, employs X-ray scanning technology for the efficient sorting of logs within the diameter range of 80–600 mm. The system achieves an average sorting speed of 20 logs per minute, with an annual sorting capacity ranging from 150,000 to 1.1 million cubic meters, and has been successfully deployed in multiple countries. Importantly, the company offers comprehensive solutions to ensure the adaptability of the production line to various extreme operational conditions [6]. RewmaSawco, a Swedish-based company, has developed a comprehensive log sorting system that combines 3D scanners and X-ray technology. With its accompanying control system, this system increases customer output by 2% [7]. Latvijas Finieris, a Latvia-based company, has designed a log sorting line using a 3D log scanner, capable of sorting logs with diameters ranging from 140 to 700 mm. The system achieves an average sorting speed of over twenty logs per minute [8]. Nordautomation, a Finland-based company, has designed and delivered the world’s longest log sorting line, with a length of up to 500 m and 126 sorting bins controlled by a combination of hydraulic and electric systems. The system achieves an average sorting speed of around twenty logs per minute [9]. On the domestic front, Shandong Baishengyuan Group Co., Ltd. (Weihai, Shandong, China) has developed automatic log detection and sorting equipment. This equipment employs laser curtains for measuring log dimensions and automatic sorting and has reached an advanced level internationally [10].
Based on X-ray and 3D scanning technologies, scanning devices currently dominate the global market, and this technology is relatively mature. Many companies have adopted similar solutions, deployed in sawmills globally. Scanning devices can perform not only diameter detection but also projects such as heartwood content and edge density detection. However, their cost is high, typically reaching tens of thousands of dollars. Moreover, as sorting sites are often outdoors, the deployment and maintenance costs of these devices are also high. This paper applies machine vision and deep learning technology innovatively to log sorting equipment, aiming to explore the possibility of low-cost visual devices replacing traditional high-cost scanning detection devices. In comparison to scanning devices, the log detection work in this paper can be achieved with just one camera, at a cost of only around a thousand dollars. Although the scope of detection projects is limited, for the majority of practical enterprises, there is a strong demand for diameter detection only. Therefore, this low-cost and lightweight solution has greater advantages. With the rapid development of machine vision and deep learning technology, numerous papers and research results on log feature detection have emerged. Various log detections that were previously impossible with machine vision, such as defect detection, heartwood detection, edge detection, annual ring spacing, etc., have become possible. In the future, this equipment will continue to improve to achieve more detection goals, meeting the specific needs of enterprises with special requirements for sorting standards. The innovative human–machine interface (HMI) of this design [11,12] allows integration with third-party software, websites, etc., enabling remote control capabilities for third-party applications such as mobile apps.

2. Materials and Methods

2.1. Requirements

To meet the practical production requirements and align with the enterprise’s production needs, the design must address several key technical challenges:
  • The sorting of timber diameters is mainly conducted based on the diameter at the small end, with a small portion involving a combination of diameter and length. This research exclusively focuses on detecting the small end diameter of timber. Therefore, it requires the implementation of an automated method for measuring timber diameter. The measurement method must comply with national standards and meet production accuracy requirements. The enterprise has specified that the absolute error in diameter detection must not exceed 5 mm.
  • Once the diameter of the timber is known, it is necessary to develop precise control algorithms to achieve the final sorting function, ensuring that timber of the same diameter class is directed to the same discharge outlet for subsequent transport. The sorting accuracy needs to be controlled to be at or above 95%, and the sorting speed should reach 100 m3/8 h, equivalent to 25,000 m3/year, in accordance with the enterprise’s requirements.
  • This design must be compatible with sorting all types of timber collected at the deployment site. All timber has a uniform length of 6 m, and the diameter at the small end falls within the range of 60–300 mm.
  • The sorting targets for this design are freshly felled timber; therefore, it will be extensively deployed at logging sites. Given the complex and variable environmental conditions in forest areas, a high level of robustness is required for the system to ensure that the entire equipment set can support continuous, high-intensity operation in adverse conditions.
  • While ensuring all the aforementioned conditions, the design should prioritize making the equipment as lightweight as possible to reduce costs. Additionally, it should feature good human–machine interaction characteristics.
In addressing these technical challenges, the structure of the designed log diameter automatic sorting system is illustrated in Figure 1. This design comprises the feeding preparation zone, small end alignment zone, inclined transport zone, diameter measurement zone, monitoring unit, automatic sorting zone, and sorting storage zone.

2.2. System Design

In response to the aforementioned technical challenges, Figure 1 illustrates the structure of the designed automatic timber diameter sorting system. The system primarily comprises the loading zone, alignment zone, incline transportation zone, diameter detection zone, monitoring unit, automatic sorting zone, and material storage rack.
  • Loading zone: this zone is designed to achieve uniform and orderly loading of timber through mechanical structures.
  • Alignment zone: after passing through the loading zone, the timber is transported to the alignment zone. A machine vision approach is employed for diameter detection, requiring the capture of images of the small end face of the timber. Since depth information is needed to determine the actual size represented by a single pixel when calculating the diameter, the distance from the timber end face to the camera needs to be consistent. The purpose of this zone is to align the small end face of the timber for effective detection. Diameter measurement: following the aforementioned steps, logs are arranged neatly, with even spacing and aligned butts, entering the diameter measurement zone. This design innovatively incorporates a solution that combines machine vision with deep learning for diameter measurement.
  • Diameter measurement zone: this zone is designed for timber end face detection and diameter calculation.
  • Automatic sorting zone: the design of this zone aims to automatically sort timber according to its diameter and within specified diameter ranges.
  • Material storage rack: timber of the same diameter class, sorted in the automatic sorting zone, is stacked in the same material storage rack for convenient subsequent transportation.

2.3. Hardware Selection

Due to environmental influences and production requirements, the system requires robustness; therefore, the use of high-quality and stable hardware is indispensable. The hardware composition of this design is illustrated in Figure 2. Following principles of reliability and cost-effectiveness, the design adopts the Haiwell T60S0T programmable logic controller (PLC) [13,14] as the control core. Given the need for a large number of I/O ports in practical development, a digital input module H36DOT is equipped to expand the PLC ports. Additionally, two communication expansion modules S01RS are added to extend the host communication interface. The system is also equipped with an HMI display screen, model C10S-W, for human–machine interface development.
The PLC in this design serves as the lower-level controller, responsible for overseeing overall equipment operation control. Diameter measurement is controlled by the upper-level program, comprising an industrial computer and a binocular camera. After obtaining diameter data, the industrial computer communicates with the PLC by transmitting the diameter values. The coordinated operation of these components comprises the automatic control system of the device.
Apart from the upper- and lower-level controllers, there are various conveying mechanisms and hardware for executing actions, including motors, cylinders, sensors, etc. These components are made of high-quality steel to ensure stability and corrosion resistance. All cables undergo multiple layers of wrapping to reduce aging and the likelihood of damage, particularly from animals like rodents. The core controllers and electronic components are uniformly installed in an electrical control cabinet, which is situated in a dedicated control room.

2.4. Wood Log End Face Detection Model and Diameter Calculation Based on YOLOv5

The development of an automatic sorting system for log diameter classification depends on high-precision diameter detection. In this research, we employ machine vision technology for diameter detection, using the ZED2i stereo camera as the image acquisition device. Due to the deployment of the equipment outdoors, the system is significantly influenced by lighting conditions. Moreover, the wide field of view of the stereo camera poses challenges in threshold segmentation, making it susceptible to background interference and natural lighting effects, resulting in inaccurate segmentation of elliptical end faces. To address this issue, we establish a YOLOv5 object detection model [15,16,17,18,19] for rapid and accurate extraction of log end face contours. The exceptional performance of the YOLOv5 model depends heavily on the computational capabilities of the running device. YOLOv5s, known for its compact model size and fast computation speed, is often applied in scenarios where computational performance is limited or real-time detection is required [20]. Therefore, we prioritize the use of YOLOv5s for testing purposes.

2.4.1. Construction of the Dataset

To construct the dataset for detecting timber end face contours, this research deployed equipment on-site and utilized a stereo camera system. A total of 5000 images of timber end faces were taken under diverse conditions, including varying shooting angles, depths, diameters, shapes, and lighting intensities. The images were taken at a resolution of 1920 × 1080 pixels in the JPG format. Figure 3 illustrates a subset of the collected images.
In this research, we annotated the images using the LabelImg software (version 1.8.5), with a single class labeled as “Wood”. Due to the relatively small size of the dataset, to mitigate information leakage and offer a more accurate reflection of the model’s performance, the annotated images were randomly partitioned into training, validation, and test sets following the common ratio of 6:2:2.

2.4.2. Detection Model for Timber End Faces

This study requires the application of algorithmic models to detect timber contours in the diameter measurement region. Since the target for detection is limited to the end faces of timber, and these end faces have relatively large contours with distinct features, the YOLOv5s detection model is chosen for this purpose. This model comprises four components: the input stage (input), backbone network (backbone), neck network (neck), and output stage (head) [21]. The input stage uses Mosaic data augmentation on the dataset images by randomly combining four different images of timber end faces to generate new composite images, thereby enhancing dataset diversity. The adaptive training sample selection (ATSS) algorithm automatically calculates anchor box parameters that are most suitable for the input image. Adaptive image scaling dynamically scales images to adapt to the varying scales of timber end face detection.
The preprocessed images of timber end faces are then fed into the backbone network, which mainly comprises the focus structure and cross stage partial (CSP) structure, effectively extracting features of timber end faces. The neck network combines the feature pyramid network (FPN) and path aggregation network (PAN), where FPN generates timber feature maps of different scales, and PAN fuses these feature maps to enhance the model’s feature representation and perception capabilities. The output stage generates confidence scores, class probabilities, and bounding box coordinates for the detected timber end faces.

2.4.3. Analysis of Model Training Results

This paper uses three metrics to evaluate the model’s detection performance: precision (P), recall (R), and mean average precision at an intersection over union (IOU) threshold of 0.5 (mAP@0.5).
P = T P + F P T P
R = T P + F N T P
m A p = Σ i = 1 C A P i C
where T P represents the count of timber end faces correctly identified by the model; F P represents instances where the model incorrectly identified non-timber end face objects; F N represents the number of timber end faces the model failed to recognize;  A P i represents the detection accuracy for the specific class; and C represent the total number of classes.
In this research, we set the initial learning rate to 0.01, the number of training epochs to 200, the batch size to 32, and configure the input image size for the neural network as 384 × 384. The model is trained on the Windows 11 operating system, using an AMD Ryzen 7 5800H CPU, NVIDIA GeForce RTX 3050 GPU, and PyTorch version 2.1.0 with CUDA 11.7, Python 3.9.13 as the training environment. Figure 4 illustrates the model’s loss on the validation set.
As evident from Figure 4, the model shows a rapid decrease in loss in the first 60 epochs. By the time the training reaches 150 epochs, the loss stabilizes, indicating that the model has effectively converged. Figure 5 presents other detection performance metrics for the model. The accuracy, recall, and mean average precision show a significant increase in the initial 10 epochs, followed by a more gradual improvement, ultimately reaching 99.77%, 99.85%, and 99.80%, respectively. In testing, the YOLOv5s, compared to other models in the YOLOv5 series, offers the advantages of minimal size and the fastest detection speed. Therefore, the use of this model meets the requirements for timber end face contour detection in production environments, ensuring both accuracy and speed.

2.4.4. Diameter Detection

After aligning the small end of each log, the camera position is fixed, ensuring a constant distance from the end face of each log. Before initiating actual measurements, position a standard circular object with a known diameter at this fixed distance, capturing its image using the camera. Then, apply the Canny edge detection algorithm to obtain the pixel size of its diameter (the number of pixels along its length). The real-world size of the standard object’s diameter is subsequently divided by the pixel size, yielding the actual size corresponding to a single pixel at that distance. In the actual testing phase, after acquiring log end face contours through the YOLOv5 model, the contours are cropped from the larger image. Following a series of image preprocessing steps, apply the Canny edge detection algorithm once again to extract contour points of the log end face. Subsequently, employ the least squares method for ellipse fitting [22,23,24,25], obtaining pixel sizes corresponding to the major and minor axes. Finally, multiply these pixel sizes by the real-world size corresponding to a single pixel, resulting in the actual diameter of the log end face. The detection results are depicted in Figure 6.
At this stage, the obtained sizes represent the dimensions before debarking. However, aligning with standard results requires debarking adjustments. Bark thickness on timber is significantly influenced by spatial and climatic factors and their interactions [26]. Additionally, it tends to increase with the diameter of the timber [27]. Adjustments need to be made based on the individual dimensions and type of the timber to account for bark proportion or thickness within the specified range [28]. The estimation of bark volume is closely tied to the value of the timber, making the accurate selection of the bark thickness estimation equation crucial [29]. The bark calculation equation used in this research was provided by a local industry. Depending on the type of timber and relative tree height, the calculated bark value can be deduced. Subtracting the corresponding bark thickness from the obtained major and minor axes sizes yields the debarked diameter of the timber.
The applicability of this proposed solution for log diameter detection depends on the size of the log end within the camera’s field of view. Successful detection can be achieved as long as the camera’s field of view can encompass the entire log end. In widely used scanning devices, the scanning limits typically range from 60 mm to 1200 mm. Due to the significant increase in the cost of scanning devices with an expanded detection range, manufacturers often customize scanning equipment based on specific detection requirements. The machine vision detection solution employed in this study uses a binocular camera with a broad field of view. Furthermore, the field of view can be increased by adjusting the distance from the camera to the log end, enabling it to achieve a detection range comparable to scanning devices. While there may be a marginal decrease in detection accuracy, the equipment cost remains nearly unchanged. Consequently, this approach provides increased flexibility in adjusting the detection range according to specific needs without a substantial impact on equipment costs.
For timber with extremely irregular end face shapes or noticeable defects, and because they constitute a very small portion of the overall production, the standard diameter calculation method is complex and yields relatively low economic benefits. Therefore, these atypical timber specimens will be excluded in the subsequent sorting steps after detection, and their impact on diameter detection and sorting accuracy is not considered.

2.4.5. Prospects

The application of deep learning models not only enables accurate detection of timber end face contours and diameter measurement but also demonstrates excellent scalability. For instance, extracting tree rings from timber end faces, closely linked to the timber’s strength, can serve as one of the criteria for timber sorting [30]. Defect detection on timber end faces, affecting the strength and texture of the timber, is another potential application [31]. Special types of timber, such as split wood or wood with detached small heads, can trigger corresponding diameter calculation programs to determine standard diameter sizes. The integration of current machine vision and deep learning technologies enables the extraction of various features from timber end faces, facilitating the addition of desired feature detection algorithms based on specific requirements. For different tree species, training specific diameter detection models and bark thickness calculation models can enhance the precision of detection and measurement. Thus, the intelligent timber sorting solution based on machine vision demonstrates strong scalability. Through the development of software algorithms, a more comprehensive sorting process can be achieved without a significant increase in hardware costs, thereby reducing the development difficulty.

2.5. Production Line Design

2.5.1. Overall Control Logic

The designed production line in this design consists of four distinct zones, and the overall control logic is depicted in Figure 7. It can accomplish loading, alignment, diameter detection, and diameter-grade sorting functions. The following sections provide an explanation of the structure design and control logic for each zone of the production line.

2.5.2. Design and Control of Loading Zone

In the timber sorting yard, bulk loading of logs is typically carried out using forklifts, and the structure of the loading zone is shown in Figure 7. When a batch of logs is positioned at the front end of the material storage rack, the conveyor motor in the loading zone is activated. The four toggling structures of the alignment structure will be subjected to force on only one side. Due to the uneven force, the end that reaches first will be held in place until the other end also arrives. Both ends will then simultaneously lock into the four grooves of the toggling structure. At this moment, with the force evenly distributed, the structure toggles, allowing a log to pass through. Consequently, the originally inclined log is adjusted to a horizontal position. Subsequently, the logs continue to advance and encounter the hook-shaped wheel, which is a solid disc with hook-shaped grooves on both sides, as shown in Figure 8, structure 3. When a log reaches this point and encounters the curved surface, it is held in place until the hook-shaped wheel rotates into position, lifting the log. The grooves of the left and right hook-shaped wheels can catch and release one log at a time, and subsequent logs will be held by the circular arc surface until the next groove releases them.

2.5.3. Design and Control of Alignment Zone

After being captured by the hook-shaped wheel, the logs reach the alignment zone. Below the alignment wheel, in the alignment zone, there are two photoelectric sensors, one on the left and one on the right (through practical testing, it was found that having only one sensor may lead to missed triggers, especially when the difference in diameters between the small and large ends of the log is significant, hence sensors are set at both ends). When a log enters the alignment zone, the photoelectric sensor triggers, and the system recognizes that the log has entered the alignment zone.
Once within the alignment zone, the conveyor motor in the loading zone is turned off. Next, the alignment motor is activated. The alignment motor drives the alignment wheel to rotate to the left, causing the log to shift to the left for alignment. A pressure sensor is installed on the alignment side, and a baffle is externally attached to the pressure sensor. The baffle does not touch the sensor when there is no force applied. When the log moves to the far-left position, the baffle presses against the pressure sensor, triggering the pressure sensor, and the system determines that alignment is complete. The alignment motor stops, and the ramp motor starts. The chain on the ramp motor is equipped with equally spaced hook teeth, as shown in Figure 9, structure 1. When the hook teeth reach the position of the log, they can capture the log from the alignment zone. When neither the photoelectric sensor nor the pressure sensor is triggered, the system determines that the previous log has left, indicating that alignment is complete. At this point, the conveyor motor in the loading zone restarts, and the hook-shaped wheel captures the next log into the alignment zone, repeating the alignment process. To ensure efficiency, the ramp motor will not be turned off thereafter.

2.5.4. Design and Control of Diameter Detection Zone

As the log is transported by the ramp motor to the highest point of the ramp, it will drop onto the platform in the diameter detection zone. The structure of the detection zone is shown in Figure 10. The conveyor motor in this zone is in a normally open state, and the log advances along with the transfer chain on the conveyor platform.
At the diameter detection platform, there is a photoelectric sensor, and the camera is mounted approximately 1 m behind the photoelectric sensor. When the log reaches this point, the sensor triggers. After a minimal delay (to allow the log to reach the center of the image), a photograph is captured. Subsequently, the timber end face image is sent to the upper computer. The pre-trained YOLOv5s model on the upper computer performs contour extraction on the image, followed by running a diameter calculation program, which can complete the diameter calculation within 1 s. Once the diameter size is obtained, the upper computer sends the diameter data to the PLC using the Modbus communication protocol [32,33].
The transmission and handling of diameter data utilize a first-in-first-out (FIFO) sequential queue algorithm [34]. Upon receiving the first diameter data, the PLC stores these data at the front of the queue and increments the rear pointer by one position. Each time new data are received, they are stored in the register at the address pointed to by the rear pointer. At this point, the diameter data of the logs are arranged in the queue in the same order as the logs on the equipment. Subsequently, the logs continue to be transported forward, moving out of the measurement zone.

2.5.5. Design and Control of Automatic Sorting Zone

After moving out of the measurement zone, the timber enters the sorting zone, which consists of multiple individual sorting sections, as illustrated in Figure 11. Each sorting section has movable flaps on both the left and right sides, each connected to a cylinder. When the cylinder moves, it pushes the flaps upward at an angle. Additionally, each sorting section is equipped with a photoelectric sensor, and there is a rectangular hole cut in front of the sensor, through which the triggering light beam is emitted. As the timber moves with the transfer chain in the middle of the sorting section, when the timber reaches the position of the sensor in a sorting section, the sensor at that location is triggered. At this point, the PLC dequeues the data at the front of the queue storing the diameter of the timber, based on the first-in-first-out principle. This diameter datapoint corresponds to the diameter of the current timber. The PLC then compares this diameter datapoint with the diameter range set by the user for the current section. For example, if the lower limit and upper limit values for the diameter range on the left side of sorting section one are X1 mm and X2 mm, respectively, then if the diameter of the current timber is within the [X1, X2] interval, it meets the sorting condition. Since the photoelectric sensor is triggered by the end face, after a certain delay, when the middle position of the timber reaches the location of the cylinder, the sorting action is triggered. The cylinder pushes the flap, and the timber is pushed down. The left cylinder moves to push the timber to the left stacking area of this section, and the right cylinder does the same on the right side. Each sorting section can perform sorting for two diameter grades.
If the diameter of the timber does not meet the diameter range on both ends of that section, the PLC will create a second queue of the same size. When the timber triggers the photoelectric sensor for sorting section two, the second queue will also undergo dequeuing in a first-in-first-out manner. If it still does not meet the diameter requirements for section two, the data will be enqueued into a new queue for that section, and so on, until the last section. In summary, each sorting section has a corresponding sequential queue. When the photoelectric sensor of a section is triggered, the value from the queue of that section is dequeued, and a comparison with the set values is made. This algorithm efficiently links diameter recognition and automatic sorting functions.
There is no diameter range set on the right side of the last sorting section. When the timber reaches this section and triggers the photoelectric sensor, if it still does not meet the diameter requirements set on the left side, the cylinder will act to push the timber to the right. The timber piled on this side consists of logs that do not fall within the set diameter ranges or those that were recognized incorrectly. This allows for additional sorting to improve sorting accuracy. It is worth mentioning that the photoelectric sensor for each section is triggered by the end of the timber, and a suitable delay needs to be set. Only then, if a sorting action is triggered, can the timber be smoothly pushed down by the cylinder. At this point, the automatic sorting of the timber is achieved, and the entire sorting process is completed.

2.5.6. Analysis of Production Line Speed

This section addresses the coordination issues identified through practical testing, analyzing, and adjusting the speeds of various sections of the production line. The meanings of all symbols used in this section’s formulae can be found in Table 1. When a log completes small end alignment and enters the alignment zone, the interval x between two logs when each row of hooks on the ramp chain picks up a log is equal to the distance ( x 2 ) between two rows of hooks, where x 2 is a predetermined value established during the design. Practical testing revealed that if the motor power for all sections of the production line is set to the maximum, when logs enter the final sorting step, the spacing between two logs becomes too small, resulting in collisions that prevent proper sorting. Specifically, when logs transition from the alignment zone to the detection zone, the spacing between two logs is insufficient. As a result, when entering the sorting zone, the preceding log has not completely left the connection zone, and the next log enters prematurely. To address this issue, adjustments to the motor power are required. The two logs entering the sorting zone will be connected end to end, preventing any collision if the forward speed of logs in the sorting zone is v 4 , assuming all logs have the same length L a v g , and when the following condition is satisfied:
L a v g v 4 = x 3 v 3 + T d
x 3 = v 3 x 2 v 2
Here, v 3 represents the log forward speed in the detection zone at maximum motor power, x 3 is the spacing between two logs in the detection zone, and T d is the time it takes for a log to fall from the detection zone to the sorting zone. As the actual log lengths are unequal, L m a x is used instead of L a v g . Thus, Equation (5) is replaced with:
L m a x v 4 = x 3 v 3 + T d
In practice, when the sorting conditions are met, the sorting zone activates the cylinder to raise the barrier, pushing the log down, and then retracts. During this action, if the next log is too close, it may get caught in the raised barrier. Therefore, there needs to be a sufficiently large spacing x 4 between the two logs in the sorting zone. Consequently, Equation (9) is optimized as follows:
L m a x + x 4 v 4 x 3 v 3 + T d
x 4 = v 4 T s
where T s is the time required for the cylinder to actuate and reset. From Equations (5), (7), and (8), it can be deduced that v 2 needs to satisfy the following equation:
x 2 v 2 L m a x / v 4 + T s T d
v 2 x 2 L m a x / v 4 + T s T d
From Equation (10), it can be inferred that the log transfer v 2 at the ramp must be less than a certain value. The power of the ramp motor should be adjusted to the maximum value that satisfies the conditions of the formula for converting motor speed to power:
P = T × n 9550
where P is the motor power, T is the torque, and n is the speed. At this point, the power of other motors can also be set to their maximum values. Through a series of derivations, it can be found that during the design, if the distance x 2 between the two rows of hooks on the ramp satisfies Equation (12), it is unnecessary to decrease the power of the ramp motor, allowing for an increase in the overall operating speed of the production line:
x 2 v 2 ( L m a x / v 4 + T s T d )
Through practical testing and verification, lowering the power of the motor at the ramp as required results in the smooth and stable operation of the entire production line.

3. Results and Discussion

3.1. An Analysis of Sorting Accuracy and Efficiency

This production line has been deployed in the sorting facility situated in Jiangle County, Fujian Province, China. The following tests were carried out at this sorting facility. In terms of sorting accuracy, this study included 10 sets of raw logs, each comprising 10 individual logs. Each log was randomly selected and measured manually for diameter using a high-quality tape measure following measurement standards. The diameter of each log, along with its identification number, was recorded on labels, and these labels were securely affixed to the non-measured end using push pins. The measured diameter at this point was considered the standard actual diameter.
Subsequently, sorting tests were conducted using the production line based on the assigned identification numbers, and the automatically recognized diameter values were recorded on the human–machine interface. After each sorting session, the measured diameter recorded on the label of each log in the storage rack was compared with the set diameter range for that storage rack. If the measured diameter was within the specified range, it was considered a successful sorting. Each storage rack represented a diameter grade, and the diameter range for this test is presented in Table 2. The results of one set of tests are presented in Table 3, with all diameter values rounded to the nearest value after debarking. The testing was conducted in the morning on a summer day, with a temperature of 35 °C and ample natural light during the testing period.
From Table 2 and Table 3, the obtained sorting results demonstrate relative accuracy, with an absolute error ranging from 1 to 2 mm and a relative error of less than 3%. During this test, there was one sorting failure observed. Upon analyzing the failed sorting, it was found that the failure occurred because the diameter of the wood was close to the threshold values of two diameter classes. Owing to the presence of errors, there was a misjudgment of the diameter class, as shown in the 9th set of data in Table 3, where the wood of Specification 3 was misidentified as Specification 2. A total of ten sets of these small-scale tests were conducted, and the results are presented in Table 4.
M A E = 1 k i = 1 k | E i |
A R E = 1 k i = 1 k | δ i |
P R E = n N × 100 %
where M A E stands for mean absolute error, A R E stands for average relative error, k represents the total number of experiments, E i is the absolute error for the i-th set, δ i is the relative error for the i-th set, P R E denotes the sorting accuracy, n is the number of successfully sorted logs, and N is the total number of logs sorted.
From Table 4, it is evident that out of a total of 100 wood tests, 98 woods were successfully sorted, and the occasional failures were attributed to the reasons mentioned earlier. Through calculations, the absolute error range in log diameter identification ranged between 0.8 and 1.4 mm, with an average absolute error of 1.12 mm and a maximum average relative error of 1.21%. This accuracy meets the enterprise’s requirement of being within 3%, achieving a sorting accuracy rate of 98%. The actual diameters in the experimental data were manually measured and calculated in accordance with national standards. This measurement process is time consuming and requires a significant amount of manpower, resulting in high labor costs. However, to maintain speed, workers may at times opt to measure the diameter of the end face directly based on subjective feelings, introducing high subjectivity and randomness. In this non-standardized and rapidly conducted manual measurement process involving high-intensity repetitive work, the accuracy of diameter measurement cannot be guaranteed, leading to lower sorting accuracy. In contrast, the implemented device can achieve accurate diameter identification according to national standards while ensuring high accuracy in diameter class sorting.
Following the determination of sorting accuracy, a statistical analysis of the sorting efficiency for this design was performed. The efficiency testing consisted of 10 groups, each lasting for 10 min. In the continuously running production line, timing began as the first log entered the feeding area, and counting started as the first log was pushed down. The testing concluded after the production line had operated continuously for ten minutes, and the count included all logs pushed down during this period. Each test group was separated by intervals, and the logs sorted in each group were stacked together to avoid confusion among different groups. Logs for testing were randomly selected for loading. After completing the tests, the diameters of the logs automatically identified were recorded. Subsequently, the correctness of the identified diameters was verified using a manual tape measure. In cases where sorting errors occurred, the correct diameter value obtained from the tape measure was used for volume calculation during the sorting process. The volume sorted in 10 min on the production line was then calculated, and the volume sorted per eight hours was extrapolated. The testing site remained the deployment location of the production line, with a temperature of 25 °C during testing. The tests were conducted in the afternoon in autumn, with sufficient natural light, ensuring no impact on the detection process. The statistical results of sorting efficiency are presented in Table 5.
The lengths of the sorted wood in the aforementioned cases were all 6 m, with diameters ranging from 60 to 300 mm. To facilitate volume calculation, a uniform log diameter of 200 mm was chosen. As shown in Table 5, the sorting efficiency achieves a rate surpassing 490 m3/8 h, far surpassing the enterprise’s requirement of 100 m3/8 h and meeting practical production needs. When calculated based on 250 working days per year, the annual sorting volume can reach 120,000–130,000 m3. Because it is in its initial development, there are some design imperfections, and there are coordination issues among the various parts of the equipment. Therefore, motor power has been appropriately decreased, and certain delays have been set to ensure the smoothness and stability of the operation. With calculations conducted under ideal conditions and maximum motor efficiency, the annual sorting volume can exceed 1,500,000 m3. This level of efficiency is comparable to foreign sorting efficiency. Calculated from the data in Table 5, the sorting time for each log (6 m) ranges from 7 to 8 s, whereas traditional manual sorting, from manually measuring the diameter to manually handling the classification, averages over 90 s for each log. In comparison, the implementation of this design significantly enhances the efficiency of log sorting.

3.2. Analysis of the Impact of Environmental Conditions on Production Line

To assess the impact of temperature on the production line, this study conducted continuous 8 h operation tests during the coldest and hottest times of the year at the deployment site. The temperature at the deployment site ranged from −4 to 40 °C. The production line successfully completed continuous operation under these temperature conditions. Notably, during high temperatures, air conditioning in the control cabinet deployment room was necessary to prevent the overheating of control components and the consequent risk of fuse breakage.
To assess the impact of natural light variations on the production line, this study conducted detection tests in a well-lit laboratory environment with abundant natural light. A platform was set up in the experimental area to place log end samples with a fixed diameter of 154 mm. A binocular camera was positioned at a distance of 1.2 m, with the aperture size and setup distance matching those at the actual production line site. The testing occurred during winter, with clear weather conditions, ranging from strong daylight in the afternoon to extremely low light levels in the evening, without any other light sources affecting the environment. Illuminance levels were measured at the log end using a lux meter from Delixi. The illuminance was recorded at regular intervals, and log end face images were captured under the corresponding illuminance. Subsequently, the trained model was employed for end face detection tests, followed by diameter measurement and a calculation of whether successful detection occurred. The test results are presented in Table 6.
Table 6 indicates the successful detection of the timber end face and the collection of relatively accurate diameter sizes when the illuminance exceeds 25.7 lux. With decreasing illuminance, the influence of darkness causes the edge of the end face to blur, resulting in an increase in diameter detection errors. At extremely low illuminance values, although the outline can still be detected, the failure of diameter detection occurs due to the inability to complete threshold segmentation. Therefore, in the deployment of the production line, this design incorporates a mechanism that automatically activates additional light sources when the illuminance falls below the set threshold of 30 lux. These light sources uniformly increase the illuminance on the surface of the timber end face, measured to reach 160–180 lux. Measurements indicate that the illuminance at the end face can reach 160–180 lux under these conditions, satisfying the requirements for normal detection. Selected detection results are illustrated in Figure 12.

3.3. Limitations and Future Prospects of the Study

With the continuous development of the timber market, an increasing number of sawmills aim to achieve greater economic benefits by expanding their considerations beyond merely sorting logs based on diameter. Additional features of logs, such as tree species, grain patterns, heartwood percentage, sapwood percentage, color, etc., are becoming crucial factors. Currently, our design is limited to the identification of log diameters, lacking recognition techniques for other features, resulting in a relatively narrow sorting criterion. However, the current trend in log feature detection, particularly based on deep learning, has shown significant advancements, achieving the robust detection of various characteristics.
In the future, the design will draw inspiration from these studies by incorporating additional deep learning models into the detection algorithm to enhance the variety of detected features. Furthermore, this research will optimize the control system and introduce a log management database. This database will document all detected features, creating a “profile” for each log based on defects, tree species, grain patterns, and other characteristics. Sawmills can easily retrieve logs with the desired features by referencing these “profiles.”
For machine vision, natural light and other environmental factors present the greatest interference. The current detection area of this design is exposed to natural conditions, with only a few structures, such as sheds and sunshades, for protection and adjustment. While supplementary lighting can enable detection throughout working hours, changes in the deployment environment can easily disrupt the detection process. In the future, this study will install a protective shell in the detection area and establish a constant light source within the shell to maintain the stability of the detection environment.
Due to the commonality of log diameters below 300 mm in the test region, the structural design of the production line is suitable for small- and medium-sized logs, with limited adaptability to larger logs that may require structural optimization. This design has attracted attention from several domestic enterprises in China, including some port sorting yards that primarily handle large-diameter timber imported globally. Collaborations have been initiated. Future efforts will focus on designing a solution tailored to the sorting of large-diameter logs.

4. Conclusions

  • This study designed an automated log diameter grading sorting line capable of sorting logs with a diameter ranging from 60 to 300 mm and a length ranging from 2 to 6 m. The sorting line achieved a sorting accuracy exceeding 95%, with a sorting efficiency of 490 m3/8 h and an annual sorting volume ranging from 120,000 to 130,000 m3.
  • This study constructed a log end detection model using YOLOv5, which achieved an accuracy of 99.77%, a recall rate of 99.85%, and a mean average precision of 99.80% in identifying log end faces.
  • This study proposed and validated a diameter detection solution combining machine vision and deep learning. The average absolute error of the detection results was 1.12 mm, with a maximum average relative error of 1.21%. Detection in low-light environments can be achieved through supplementary lighting.
  • This stud implemented a machine vision solution in the sorting line, replacing the existing scanning device approach. While meeting production needs, this alternative considerably reduced equipment production, deployment, and maintenance costs. It is a preferred choice for enterprises with sorting requirements limited to log diameters. For enterprises with broader detection needs, there is still the possibility of additional feature development.

Author Contributions

Conceptualization, Z.D. and Y.G.; methodology, Z.D.; software, Y.G.; validation, Y.G. and J.Z.; formal analysis, Z.D.; investigation, Y.G.; resources, Z.D.; data curation, Z.D.; writing—original draft preparation, Y.G.; writing—review and editing, Z.D.; visualization, L.K.; supervision, J.Z.; project administration, Y.G.; funding acquisition, L.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the General Project of the National Natural Science Foundation of China, 52375539.

Data Availability Statement

If you require a dataset for the detection of wood end face profiles, hardware circuit diagrams, ladder diagrams, detection algorithm code, etc., please feel free to email us at gyy17682459343@outlook.com to obtain the necessary resources.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. An, Y. Coarse-Resolution CT Scanning for Sawmill Logs Sorting and Grading. Ph.D. Thesis, University of British Columbia, Vancouver, BC, Canada, 2013. [Google Scholar]
  2. An, Y.; Schajer, G.S. Geometry-based CT scanner for measuring logs in sawmills. Comput. Electron. Agric. 2014, 105, 66–73. [Google Scholar] [CrossRef]
  3. Borz, S.A.; Proto, A.R. Application and accuracy of smart technologies for measurements of roundwood: Evaluation of time consumption and efficiency. Comput. Electron. Agric. 2022, 197, 106990. [Google Scholar] [CrossRef]
  4. GB/T 144-2013; Log Inspection. State Forestry Administration: Beijing, China, 2013.
  5. de Miguel-Díez, F.; Reder, S.; Wallor, E.; Bahr, H.; Blasko, L.; Mund, J.-P.; Cremer, T. Further application of using a personal laser scanner and simultaneous localization and mapping technology to estimate the log’s volume and its comparison with traditional methods. Int. J. Appl. Earth Obs. Geoinf. 2022, 109, 102779. [Google Scholar] [CrossRef]
  6. Hekotek. Log Sorting Lines. Available online: https://hekotek.ee/wp-content/uploads/2020/09/Log-sorting-lines-ENG.pdf (accessed on 16 November 2023).
  7. RemaSawco. Log Sorting. Available online: https://remasawco.com/logsorting/ (accessed on 16 November 2023).
  8. Iekarturupnica. Log Sorting Lines. Available online: https://iekarturupnica.lv/products/log-sorting-lines/ (accessed on 17 November 2023).
  9. Nordautomation. Log Sorting. Available online: https://nordautomation.fi/en/products/log-sorting/ (accessed on 16 November 2023).
  10. Shandong Baishengyuan’s ‘Automatic Detection and Sorting Technology and Equipment for Logs’ has been appraised to reach the international advanced level. For. Mach. Woodwork. Equip. 2020, 48, 76.
  11. Bing, X.; Hua, C.; Li, Y.; Liu, C. Research on methods for developing HMI of Siemens CNC system. Manuf. Technol. Mach. Tool 2011, 10, 163–167. [Google Scholar]
  12. Liu, Y. Study of the Interaction Design of Man-machine Interface Based on Product Usability. Packag. Eng. 2008, 29, 81–83. [Google Scholar]
  13. Lv, P. Application of Control System Composed of PLC and Touch Screen. Process Autom. Instrum. 2010, 31, 45–47+51. [Google Scholar] [CrossRef]
  14. Huang, J.; Liu, J.; Kuang, H. Servo Motor Control System Based on Programmable Operation Display and PLC. Instrum. Tech. Sens. 2005, 2, 44–45. [Google Scholar]
  15. Xu, D.; Wang, L.; Li, F. Review of Typical Object Detection Algorithms for Deep Learning. Comput. Eng. Appl. 2021, 57, 10–25. [Google Scholar]
  16. Wan, P.; Huang, Y.; Wang, R. Design and experiments of the machinevision-based body orientation arrangement convey device for the Scomber japonicus. Trans. Chin. Soc. Agric. Eng. 2023, 39, 271–282. [Google Scholar]
  17. Sun, L.; Cai, Z.; Liang, K.; Wang, Y.; Zeng, W.; Yan, X. An intelligent system for high-density small target pest identification and infestation level determination based on an improved YOLOv5 model. Expert Syst. Appl. 2024, 239, 122190. [Google Scholar] [CrossRef]
  18. Zeng, X.; Zhang, X. A Log End Face Recognition and Positioning Model Based on YOLO-RW. For. Eng. 2023, 39, 144–153. [Google Scholar]
  19. Hu, L.; Hu, Z.; Gao, G. Design and realization of automatic controlling system for seed coater based on PLC. Trans. CSAE 2007, 23, 140–144. [Google Scholar]
  20. Tang, W.; Chen, Z.; Wang, D. Crack Detection Method for Preserved Eggs Based on Improved YOLOv5 for Online Inspection. Trans. Chin. Soc. Agric. Mach. 2023, 1–12. [Google Scholar]
  21. Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar]
  22. Yan, B.; Wang, B.; Li, Y. Optimal ellipse fitting method based on least-square principle. J. Beijing Univ. Aeronaut. Astronaut. 2008, 295–298. [Google Scholar] [CrossRef]
  23. Liu, S.; Li, P.; Na, Y. Evaluation of the Form Error of Ellipse Based on Least Square Method. Acta Metrol. Sin. 2002, 23, 245–247. [Google Scholar] [CrossRef]
  24. Chen, H.; Lei, H.; Kong, Y. An improved randomized algorithm for detecting ellipses based on least square approach. J. Zhejiang Univ. 2008, 42, 1360–1364. [Google Scholar]
  25. Mei, Z.; Ren, H.; Zhu, M. Algorithm of log end recognition based on non-linear least squares principle. Comput. Eng. Appl. 2012, 48, 177–178+210. [Google Scholar]
  26. Nie, W.; Liu, Y.; Tan, C.; Wang, Y.; Liu, J.; Zhao, X.; Jiang, Z.; Jia, Z. Characteristics and factors driving the variations in bark thickness of major woody plants in China. Ecol. Indic. 2022, 144, 109447. [Google Scholar] [CrossRef]
  27. Mirski, R.; Trociński, A.; Kawalerczyk, J.; Wieruszewski, M. Pine Logs Sorting as a Function of Bark Thickness. Forests 2021, 12, 893. [Google Scholar] [CrossRef]
  28. Li, R.; Weiskittel, A.R. Estimating and predicting bark thickness for seven conifer species in the Acadian Region of North America using a mixed-effects modeling approach: Comparison of model forms and subsampling strategies. Eur. J. For. Res. 2011, 130, 219–233. [Google Scholar] [CrossRef]
  29. Marshall, H.D.; Murphy, G.E.; Lachenbruch, B. Effects of bark thickness estimates on optimal log merchandising. For. Prod. J. 2006, 56, 87–92. [Google Scholar]
  30. Du, W.; Xi, Y.; Harada, K.; Zhang, Y.; Nagashima, K.; Qiao, Z. Improved Hough transform and total variation algorithms for features extraction of wood. Forests 2021, 12, 466. [Google Scholar] [CrossRef]
  31. Yang, Y.; Wang, H.; Jiang, D.; Hu, Z. Surface detection of solid wood defects based on SSD improved with Res Net. Forests 2021, 12, 1419. [Google Scholar] [CrossRef]
  32. Lu, W.; Len, S.; Yang, J. Remote Monitoring System with Modbus-based controllers. Electr. Power Autom. Equip. 2003, 23, 54–56. [Google Scholar]
  33. Lai, Y.; Liu, Z.; Cai, X. Research on intrusion detection of industrial control system. J. Commun. 2017, 38, 143–156. [Google Scholar]
  34. Ying, Z.; Liu, W.; Qin, Y. A New FPGA-Based Method for Realizing the Interface to Electronic Transducer. Autom. Electr. Power Syst. 2004, 28, 93–96+99. [Google Scholar]
Figure 1. Comprehensive view of the intelligent log sorting line. 1. Loading zone; 2. Alignment zone; 3. Slope transportation zone; 4. Diameter detection zone; 5. Monitoring unit; 6. Automatic sorting zone; 7. Material storage rack.
Figure 1. Comprehensive view of the intelligent log sorting line. 1. Loading zone; 2. Alignment zone; 3. Slope transportation zone; 4. Diameter detection zone; 5. Monitoring unit; 6. Automatic sorting zone; 7. Material storage rack.
Forests 15 00387 g001
Figure 2. Hardware component diagram.
Figure 2. Hardware component diagram.
Forests 15 00387 g002
Figure 3. Log End-Face Image.
Figure 3. Log End-Face Image.
Forests 15 00387 g003
Figure 4. Model loss curve.
Figure 4. Model loss curve.
Forests 15 00387 g004
Figure 5. Performance metrics of the trained model.
Figure 5. Performance metrics of the trained model.
Forests 15 00387 g005
Figure 6. Contour detection, cropping, and ellipse fitting results.
Figure 6. Contour detection, cropping, and ellipse fitting results.
Forests 15 00387 g006
Figure 7. Control logic diagram.
Figure 7. Control logic diagram.
Forests 15 00387 g007
Figure 8. Structure diagram of the loading zone. 1. alignment structure; 2. transmission chain; 3. hook wheel.
Figure 8. Structure diagram of the loading zone. 1. alignment structure; 2. transmission chain; 3. hook wheel.
Forests 15 00387 g008
Figure 9. Structural diagram of the sloped transport zone. 1. Toothed hook; 2. Alignment turning wheel; 3. Pressure sensor; 4. Slope motor.
Figure 9. Structural diagram of the sloped transport zone. 1. Toothed hook; 2. Alignment turning wheel; 3. Pressure sensor; 4. Slope motor.
Forests 15 00387 g009
Figure 10. Diagram of diameter detection zone structure. 1. Diameter measurement zone conveyor motor; 2. Photoelectric sensor; 3. Transmission chain.
Figure 10. Diagram of diameter detection zone structure. 1. Diameter measurement zone conveyor motor; 2. Photoelectric sensor; 3. Transmission chain.
Forests 15 00387 g010
Figure 11. Structural diagram of the automated sorting zone (single section). 1. Transmission chain; 2. Flap; 3. Cylinder; 4. Photoelectric sensor; 5. Drive gear; 6. Drive shaft.
Figure 11. Structural diagram of the automated sorting zone (single section). 1. Transmission chain; 2. Flap; 3. Cylinder; 4. Photoelectric sensor; 5. Drive gear; 6. Drive shaft.
Forests 15 00387 g011
Figure 12. Detection performance under different illumination conditions (from left to right, top to bottom, illumination conditions are 8, 6.5, 3.2, 1.8, 1.4, and 0.6 lux).
Figure 12. Detection performance under different illumination conditions (from left to right, top to bottom, illumination conditions are 8, 6.5, 3.2, 1.8, 1.4, and 0.6 lux).
Forests 15 00387 g012
Table 1. Nomenclature.
Table 1. Nomenclature.
x The gap between adjacent logs in the sloped transport zone v 2 The forward speed of logs in the sloped transport zone
x 2 The distance between two rows of toothed hooks in the sloped transport zone v 3 The forward speed of logs in the diameter detection zone at the maximum power of the motor
x 3 The gap between adjacent logs in the diameter detection zone v 4 The forward speed of logs in the automated sorting zone at the maximum power of the motor
x 4 The gap between adjacent logs in the automated sorting zone T d The time taken for logs to fall from the diameter detection zone to the automated sorting zone
L a v g The length of all logs (assuming they are equal) T s The time required for the actuation and reset of the cylinder
L m a x The actual longest log in practice (typically not exceeding 6.5 m; for the purpose of this paper, it is considered as 7 m) T Motor torque
P Motor power n Motor speed
Table 2. Diameter category table.
Table 2. Diameter category table.
SpecificationDiameter (cm)SpecificationDiameter (cm)
16.0–7.9718.0–19.9
28.0–9.9820.0–21.9
310.0–11.9922.0–23.9
412.0–13.91024.0–25.9
514.0–15.91126.0–27.9
616.0–17.91228.0–29.9
Table 3. Single group sorting results record table.
Table 3. Single group sorting results record table.
Serial NumberMeasured Diameter (mm)Automatic Diameter Recognition (mm)Absolute Error (mm)Relative Error (%)SpecificationSuccess or Not
17577+22.671Success
2105106+10.963Success
39898002Success
4165166+10.616Success
5120122+21.674Success
6134133−10.754Success
77877−11.281Success
8152152005Success
9180179−10.565Not
10162163+10.626Success
Table 4. Statistical summary of multiple sorting results.
Table 4. Statistical summary of multiple sorting results.
Serial Number N M A E (mm) A R E (%) n P R E (%)
1101.00.91990
2101.21.1210100
3101.30.96990
4101.11.0610100
5100.80.9210100
6101.21.2110100
7101.41.3210100
8101.11.0510100
9100.91.13990
10101.21.1010100
Total1001.121.269898
Table 5. Sorting efficiency statistics.
Table 5. Sorting efficiency statistics.
Serial NumberTest Duration (min)Number of Sorted LogsSorting Volume (m3/8 h)
11082494.6
21084506.7
31082494.6
41082494.6
51083500.6
61081488.6
71082494.6
81081488.6
91083500.6
101082494.6
Table 6. Test results of illuminance impact on detection.
Table 6. Test results of illuminance impact on detection.
Serial NumberIlluminance (Lux)End Face DetectionDetected Diameter (mm)
1184Success154
2162Success154
3145.2Success154
4105.6Success154
535.3Success154
625.7Success154
716.3Success155
88.0Success156
97.2Success156
106.5Success156
114.3Success156
123.2SuccessDetection Failures
131.8SuccessDetection Failures
141.4SuccessDetection Failures
150.6SuccessDetection Failures
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ding, Z.; Gong, Y.; Kong, L.; Zheng, J. Design and Implementation of an Intelligent Log Diameter Grading and Sorting Line Based on Machine Vision. Forests 2024, 15, 387. https://doi.org/10.3390/f15020387

AMA Style

Ding Z, Gong Y, Kong L, Zheng J. Design and Implementation of an Intelligent Log Diameter Grading and Sorting Line Based on Machine Vision. Forests. 2024; 15(2):387. https://doi.org/10.3390/f15020387

Chicago/Turabian Style

Ding, Zhigang, Yangyang Gong, Linghua Kong, and Jishi Zheng. 2024. "Design and Implementation of an Intelligent Log Diameter Grading and Sorting Line Based on Machine Vision" Forests 15, no. 2: 387. https://doi.org/10.3390/f15020387

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop