Method and system for automatically whitening agarwood

By combining layer-by-layer cutting with real-time image feedback, machine vision is used to identify resinous and sapwood areas and generate processing paths. This solves the problem of unknown resinous shape in agarwood logs, enabling precise and automated sapwood removal from agarwood logs, improving efficiency and reliability, and reducing costs.

CN121157159BActive Publication Date: 2026-07-31BEIJING WANXIANG BOZHONG SYST INTEGRATION CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING WANXIANG BOZHONG SYST INTEGRATION CO LTD
Filing Date
2025-11-07
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve precise and automated removal of sapwood when the shape and distribution of resin within agarwood logs are unknown. Furthermore, traditional processing methods suffer from low efficiency, significant material waste, and high costs.

Method used

The method combines layer-by-layer cutting with real-time image feedback. It uses a linear laser to project a laser line to obtain three-dimensional dimensional data, uses machine vision to identify the areas of resinous wood and white wood, generates a processing path, and achieves automated cutting through four-axis linkage control. The path data is updated in real time to adapt to the complex situation of resinous wood.

Benefits of technology

It has enabled precise and automated desandering of agarwood logs, preserving the precious agarwood resin to the maximum extent, improving processing efficiency, reducing labor costs, ensuring the continuity and reliability of the processing, and avoiding material waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121157159B_ABST
    Figure CN121157159B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for automatically removing sapwood from agarwood, belonging to the field of wood processing automation technology. The method includes: acquiring three-dimensional dimensional data of the agarwood log; acquiring cross-sectional images of the end face of the agarwood log; identifying the resin-forming region and the sapwood region based on the cross-sectional images, and generating processing path data; controlling the processing tool to cut the sapwood region layer by layer from one end of the agarwood log according to the processing path data; after each preset depth of cutting, re-acquiring the cross-sectional image of the current processing position and updating the processing path data; repeating the above steps until the entire agarwood log is processed. The system includes a processing device, a scanning processing table, a linear laser, an image acquisition device, and a processor. This invention achieves precise and automated removal of sapwood through real-time cross-sectional scanning and dynamic path planning, maximizing the preservation of agarwood resin, adapting to the complex situation of intermittent resin formation, and ensuring processing continuity and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated wood processing technology, specifically to a method and system for automatically removing white wood from agarwood. Background Technology

[0002] Agarwood is a precious natural fragrance, formed when plants of the genus *Aquilaria* in the Thymelaeaceae family secrete resin as a defense mechanism after being injured or attacked by pests and diseases, and this resin then solidifies with the woody components. The dark-colored part of the agarwood log containing resin is called "agarwood" or "resin-bearing resin," which has extremely high medicinal and economic value, while the light-colored woody part without resin is called "sapwood," which has no fragrance or usability. Therefore, the core process in agarwood processing is the precise separation of the precious resinous part from the sapwood part to obtain pure agarwood raw materials.

[0003] Traditional agarwood extraction and processing relies entirely on manual labor. First, the agarwood logs are cut into sections. Then, experienced craftsmen use axes, chisels, and specially made hook knives to split and scrape along the boundary between the resinous wood and the sapwood, gradually removing the sapwood. After the initial splitting, a meticulous process of refining the agarwood is required, where every strand of sapwood attached to the agarwood block is carefully removed using a small, curved hook knife. The entire process demands exceptional experience and skill from the craftsmen, requiring speed, precision, and efficient use of the materials, ensuring no precious resin is wasted.

[0004] However, this traditional processing method, which relies entirely on manual labor, has many drawbacks. First, because the shape, distribution, and continuity of the resinous material inside agarwood logs are random and unpredictable, craftsmen can only rely on experience and surface features to make judgments, making it difficult to accurately grasp the actual internal conditions and easily leading to over-cutting or omissions. Second, the splitting and processing of the resinous material are time-consuming and labor-intensive, and prolonged operation leads to visual fatigue and physical exhaustion, further reducing processing accuracy and efficiency. Third, the entire processing process demands extremely high levels of skill from craftsmen, requiring long-term accumulation of experience to master, resulting in high labor costs. These factors combined ultimately lead to prominent problems in traditional agarwood processing, including low efficiency, significant material waste, and high costs.

[0005] To improve the automation level of agarwood processing, some computer vision-based automated processing devices have emerged in the prior art. For example, Chinese patent application CN119116066A discloses a computer vision-based agarwood grading and processing device and method. This scheme adopts a two-stage processing mode: in the first stage of rough cutting, images of both sides of the agarwood log are acquired, and the maximum height at both ends is taken as the cutting parameter. The part above this height is then rotated and cut as a whole. In the second stage of processing, a hook-shaped working component perpendicular to the agarwood segment is used for translational operation to hook the white wood area. After completing the current angle, the processing part is rotated at a fixed angle value and the operation is repeated.

[0006] However, the aforementioned existing technical solutions have serious technical defects in practical applications. For the first-stage rough cutting method, since it uses the line connecting the heights of both ends of the agarwood log as the boundary line for cutting and removal, and the cross-sectional shape of the resinous portion within the agarwood log is unknown, when the height of the resinous portion inside the cross-section exceeds the maximum height on both sides, the rough cutting operation will cut away the precious agarwood resin, failing to effectively preserve the agarwood. For the second-stage processing method, which uses a two-end clamping fixation method, when the resinous portion inside the agarwood log is discontinuous or broken, the hook knife may cause the log to break or fall off during the process of removing the white wood in the middle area, making subsequent processing impossible. These defects make the solution difficult to implement in practice and cannot meet the precision and reliability requirements of agarwood processing. Summary of the Invention

[0007] The purpose of this invention is to provide a method and system for automatically removing sapwood from agarwood, which can achieve precise and automated removal of sapwood even when the shape and distribution of resin formation inside the agarwood log are unknown. This method not only preserves the precious agarwood resin to the maximum extent, but also adapts to the complex situation where the resin formation may be intermittent, ensuring the continuity and reliability of the processing.

[0008] To achieve the above objectives, the present invention provides the following technical solution: A method for automatically removing white wood from agarwood includes the following steps: S1: Obtain the three-dimensional dimensional data of agarwood logs, including length and cross-sectional dimensions; S2: Acquire a cross-sectional image of the end face of the agarwood log; S3: Identify the resinous wood region and white wood region based on the cross-sectional image, and generate processing path data for the retained and removed regions; S4: Control the processing tool to start from one end of the agarwood log and cut the white wood area layer by layer according to the processing path data; S5: After each cut to a preset depth is completed, re-acquire the cross-sectional image of the current machining position and update the machining path data; S6: Repeat steps S4 and S5 until the entire agarwood log is processed.

[0009] Further: The method for obtaining the length of agarwood logs in step S1 includes: projecting laser lines onto the surface of agarwood logs using a linear laser, acquiring the curve image formed by the laser lines on the surface of the logs using an image acquisition device, and calculating the actual length of the agarwood logs based on the pixel coordinate sequence of the laser lines.

[0010] Further: the method for calculating the actual length based on the pixel coordinate sequence of the laser line includes: The acquired color images are converted to grayscale images and then filtered for noise reduction. A threshold segmentation algorithm is used to separate the laser lines from the background; For each column of pixels in the laser line, the centroid method is used to calculate the pixel coordinates of the center of that column of laser lines; The actual length of the agarwood log is calculated based on the length of the pixel coordinate sequence and the camera calibration parameters.

[0011] Further: the method for identifying the resinous wood region and the white wood region in step S3 includes: The cross-sectional image is processed by grayscale conversion, noise reduction, and binarization to obtain binary image data; Extract the external contour data and internal texture data of agarwood logs from binary image data; Based on preset processing rules, feature recognition is performed on contour data and texture data to distinguish between the resinous wood area and the white wood area; The extracted contour data is approximated by polygons or fitted with spline curves to generate vectorized processing path data.

[0012] Furthermore, the preset processing rules include at least one of grayscale level parameters, continuous gap parameters, and longitudinal discontinuity parameters.

[0013] Furthermore: the layer-by-layer cutting process in step S4 employs four-axis linkage control, including: The A-axis controls the coaxial rotation of the agarwood logs; The X-axis controls the parallel left and right movement of the machining tool, which determines the cutting width; The Y-axis and Z-axis control the up-down and back-and-forth movement of the machining tool, enabling the tool to follow the movement of the agarwood log's cross-section and perform precise cutting along the contour of the machining end face.

[0014] Furthermore, the cutting width is in the range of 0.01-10 mm and is set before processing.

[0015] Furthermore: the preset depth in step S5 is determined based on the cutting width. When the lateral movement distance of the machining tool reaches the preset depth, the machining is paused, and the cross-sectional image acquisition and path planning are performed again.

[0016] Furthermore, the equipment calibration process is also included before processing begins. Use a grid calibration plate to correct focusing, image distortion, and aberration of the image acquisition device; The projection position of the linear laser was calibrated using a step gauge.

[0017] This invention also provides a system for automatically removing white wood from agarwood, comprising: The machining device includes a high-speed rotating machining tool and a four-axis linkage control mechanism. The four-axis linkage control mechanism includes a three-dimensional translational motion control mechanism composed of X-axis, Y-axis and Z-axis and an A-axis rotational control mechanism mounted on the three-dimensional translational motion control mechanism. A scanning processing table, mounted on the processing device, includes a clamp mounted on the A-axis rotation control mechanism for clamping and fixing one end of the agarwood log; A linear laser, mounted on the processing device, is used to project laser lines onto the surface of agarwood logs; An image acquisition device, installed on the processing device, includes a first image acquisition device for acquiring laser line images and a second image acquisition device for acquiring cross-sectional images; the first image acquisition device faces a direction perpendicular to the A-axis of the A-axis rotation control mechanism; the second image acquisition device faces a direction perpendicularly upward with the A-axis axis coinciding with the direction of the axis. The processor is used to receive image data, execute image processing algorithms, generate processing path data, and control the processing device to perform cutting processing according to the processing path data.

[0018] Compared with the prior art, the present invention has the following advantages: I. This invention employs a technical solution of cutting agarwood logs layer by layer from one end and acquiring cross-sectional images in real time. It eliminates the need to pre-determine the shape and distribution of the resinous material inside, instead dynamically generating the processing path by acquiring real-time cross-sectional information of the current processing location. This closed-loop control mode of "scanning, analyzing, and processing simultaneously" enables precise cutting along the actual outer contour of the resinous material, fundamentally solving the problem of over-cutting caused by relying on height estimation at both ends in existing technologies. This maximizes the preservation of precious agarwood resin and avoids material waste.

[0019] Second, this invention employs a single-end clamping and fixing method, using a clamp to hold the agarwood log at only one end, combined with a layer-by-layer processing strategy from that end to the other. When the resinous portion inside the agarwood log is discontinuous or broken, the processed section will naturally fall onto the worktable, allowing the processing to continue until completion without interruption due to a break in the middle of the log. This effectively solves the technical defect of existing two-end clamping methods that cannot complete processing when encountering discontinuous resinous formation, ensuring the continuity and reliability of the processing, and significantly improving the equipment's adaptability to complex logs and the processing success rate.

[0020] Third, this invention achieves fully automated operation from scanning to processing by using machine vision recognition and algorithms to automatically plan the processing path. It replaces the traditional manual splitting, scraping and processing of agarwood, which not only greatly improves processing efficiency and reduces labor intensity and labor costs, but also eliminates the problem of decreased accuracy caused by visual fatigue and physical exertion. It transforms agarwood processing from manual operation that relies on the experience of craftsmen into highly automated intelligent manufacturing, achieving a fundamental technological leap. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating a method for automatically removing white wood from agarwood according to the present invention. Figure 2 This is a schematic diagram of the structure of an automatic agarwood removal system according to the present invention; Figure 3 This is an enlarged schematic diagram of the end face structure of the agarwood log after the first layer of ring cutting; In the picture: 1. Processing device; 2. A-axis rotation control mechanism; 2.1. Fixture; 3. Linear laser; 4. First image acquisition device; 5. Second image acquisition device; 6. Agarwood log; 6.1. Agarwood formation area; 6.2. Tool leftward movement stroke. Detailed Implementation

[0022] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0024] The core idea of ​​the automatic agarwood removal method provided by this invention is to achieve precise and automated removal of the sapwood portion from agarwood logs by combining layer-by-layer cutting processing with real-time image feedback. In implementation, a PC and the automatic agarwood removal device are connected via USB cable. After powering on the device, a communication connection is automatically established by opening the software on the PC.

[0025] In one embodiment, such as Figure 2 As shown, this method is applied to a system for automatically removing white wood from agarwood, the system comprising: The processing device 1 includes a high-speed rotating processing tool and a four-axis linkage control mechanism. The four-axis linkage control mechanism includes a three-dimensional translational motion control mechanism composed of X-axis, Y-axis and Z-axis and an A-axis rotational control mechanism 2 mounted on the three-dimensional translational motion control mechanism. A scanning processing table, installed on the processing device 1, includes a clamp 2.1 installed on the A-axis rotation control mechanism 2, used to clamp and fix one end of the agarwood log 6; A linear laser 3 is mounted on the processing device 1 and is used to project laser lines onto the surface of the agarwood log 6; An image acquisition device, installed on the processing device 1, includes a first image acquisition device 4 for acquiring laser line images and a second image acquisition device 5 for acquiring cross-sectional images; the first image acquisition device 4 faces a direction perpendicular to the A-axis of the A-axis rotation control mechanism 2; the second image acquisition device 5 faces a direction perpendicularly upward with the A-axis axis coinciding with the direction of the A-axis axis. The processor is used to receive image data, execute image processing algorithms, generate processing path data, and control the processing device 1 to perform cutting processing according to the processing path data.

[0026] Specifically, such as Figure 1 As shown, this method includes the following steps: S1: Obtain the three-dimensional dimensional data of agarwood log 6, including length and cross-sectional dimensions; S2: Collect cross-sectional images of the six end faces of the agarwood log; S3: Identify the resinous wood region 6.1 and the white wood region based on the cross-sectional image, and generate processing path data for the retained and removed regions; S4: Control the processing tool to start from one end of the agarwood log 6 and perform layer-by-layer cutting processing on the white wood area according to the processing path data; S5: After each cut to a preset depth is completed, re-acquire the cross-sectional image of the current machining position and update the machining path data; S6: Repeat steps S4 and S5 until the entire agarwood log 6 is processed.

[0027] The following detailed embodiment illustrates the solution of the present invention and the technical effects it can achieve.

[0028] Before formal processing, the equipment needs to be calibrated to ensure measurement and processing accuracy. The calibration process includes two aspects: First, a square grid calibration plate with intersecting horizontal and vertical lines on a white background is used. This calibration plate resembles a Go board, with each grid cell having a side length of 2 cm. The calibration plate is placed in the processing area, and an image of the calibration plate is captured by the first image acquisition device 4, which is fixedly installed with its orientation 26° perpendicular to the A-axis center. Based on the captured image of the calibration plate, the focus of the first image acquisition device 4 is adjusted, and image distortion and aberration are corrected using algorithms. The correction parameters are then saved as factory settings. Second, the linear laser 3 is turned on, projecting a red laser line onto a step gauge clamped at the A-axis center. The first image acquisition device 4 captures the step-shaped image formed by the red laser line on the step gauge. By processing these step-shaped images, the distance relationship from the laser irradiation position to the A-axis center can be accurately fitted, and the relevant parameters are saved.

[0029] For the calibration of the second image acquisition device 5, the same grid calibration plate was placed perpendicular to the A-axis center. Images were taken using the second image acquisition device 5, which was fixedly mounted with its A-axis center aligned vertically upwards at a 45° angle. The focusing, image distortion, and aberration correction algorithms for the second image acquisition device 5 were completed, and the parameters were saved. These calibration steps ensured the proper functioning of both image acquisition devices and the line laser 3, laying the foundation for subsequent precise measurement and processing.

[0030] After equipment calibration, the automated desandering process for agarwood logs (6) begins. First, one end of a section of agarwood log (6) is inserted into the chuck of the scanning processing table and clamped. A single-end clamping method is used, fixing only one end of the log while leaving the other end free. The advantage of this clamping method is that if the resinous portion inside the log is discontinuous, the processed section can fall off naturally without affecting subsequent processing.

[0031] Next, the software is activated, and the device begins operation. A linear laser emitter emits a red laser line, projecting it vertically onto the surface of the agarwood log 6. Due to the uneven surface of the agarwood log 6, the laser line forms a curved line on the log's surface. The laser line extends from the clamped end of the agarwood log 6 to the free end, forming a complete line on the log's surface. The first image acquisition device 4 simultaneously acquires a clear image containing this red laser line and transmits the image data in real time to the software on the PC via a USB interface.

[0032] After receiving the image, the software first converts the color image to grayscale and performs filtering and noise reduction to eliminate image noise. Then, a threshold segmentation algorithm is used to effectively separate the laser lines from the background, taking advantage of the extremely high brightness of the laser lines. For the separated laser lines, the software calculates the pixel coordinates of the center of each column of pixels using the centroid method, ultimately obtaining a high-precision sequence of laser centerline pixel coordinates. Since the camera's pixel size is known at a fixed resolution, combined with the previously calibrated camera parameters, the actual length of the agarwood log (6) can be calculated based on the length of the laser centerline pixel coordinate sequence. This length data will be used to determine the start and end positions of the toolpath.

[0033] While acquiring the log length data, the machine controls the agarwood log 6 to rotate 360°, and the second image acquisition device 5 scans and acquires cross-sectional images of the end face of the agarwood log 6 during the rotation. Because the installation angle of the second image acquisition device 5 is optimized, it can clearly capture a complete image of the log's end face. The acquired end face images are also uploaded to the software on the PC via a USB interface.

[0034] The software performs a series of processes on the received end-face image. First, preprocessing is performed, including image grayscale conversion, noise reduction, and binarization, resulting in clear binary image data. From the binary image data, the external contour data and internal texture data of the agarwood log 6 are extracted. The resinous part of agarwood is typically dark, while the sapwood is light, showing significant differences in color, grayscale, and texture. Based on preset processing rules, including grayscale level parameters, continuous gap parameters, and longitudinal discontinuity parameters, the software performs feature recognition on the extracted contour and texture data, accurately distinguishing the resinous region 6.1 from the sapwood region. For the resinous region 6.1 to be retained and the sapwood region to be removed, the software generates corresponding processing paths. To facilitate execution by CNC equipment, the software performs polygon approximation or spline curve fitting on the extracted contour data, converting it into vector contour data composed of straight lines and arc segments.

[0035] Based on the measured log length data and the identified cross-sectional contour data, the software uses a processing timing optimization algorithm to integrate the tool path along the length direction and the tool path along the cross-sectional contour into complete processing path data, which is then transmitted to the automatic agarwood descaling equipment.

[0036] After receiving the processing data, the equipment automatically begins processing the logs. The processing tool automatically moves to the end face of the agarwood log 6 and uses a four-axis linkage control system for precise processing. The A-axis controls the coaxial rotation of the agarwood log 6, allowing it to rotate 360° for omnidirectional processing. The long-bladed processing tool rotates at high speed, and its up-down and back-and-forth movement is achieved through coordinated control of the Y and Z axes, enabling the tool to precisely follow the end face contour for cutting. The X-axis controls the parallel left-right movement of the processing tool, determining the width or depth of each cut.

[0037] The processing proceeds layer by layer from the outer surface of the log towards the center. The cutting tool first contacts the outer surface of the log to begin cutting. Following the generated toolpath data for retention and removal, the tool automatically moves up and down and back and forth, precisely cutting along the boundary between the resinous wood and the sapwood, removing the sapwood while retaining the resinous wood. The movement of the X-axis determines the depth of cut, which can be set via software before processing begins, ranging from 0.01 to 10 mm, and can be adjusted according to the specific condition of the log and the required processing precision.

[0038] For example, such as Figure 3 As shown, when the cutting depth is set to 1 mm, after the tool completes one revolution along the current cross-sectional contour, the X-axis controls the tool to move 1 mm to the left to enter the next cutting layer. When the tool's leftward travel distance 6.2 mm reaches a cumulative 1 mm, the equipment pauses the log rotation, and the tool automatically lifts and moves to a safe position outside the end face of the wood. At this time, the equipment automatically performs a new round of image acquisition: the log rotates 360° again, and the second image acquisition device 5 scans and acquires the cross-sectional image of the current processing position again.

[0039] The newly acquired cross-sectional image reflects the actual situation after a 1 mm deep cut, and may differ from the previous cross-sectional shape because the resin distribution inside the agarwood log 6 is uneven and unpredictable. The software performs the same processing and analysis on the new cross-sectional image, re-identifies the resin-bearing region 6.1 and the sapwood region at the current location, and generates new processing path data. This real-time feedback mechanism ensures that the processing path always remains consistent with the actual resin contour, avoiding processing deviations caused by pre-assumptions.

[0040] The equipment continues cutting to the next layer based on the updated processing path data. The entire process repeats continuously: cutting to a certain depth, acquiring a cross-sectional image, analyzing and generating a new path, and continuing cutting, forming a closed-loop control system. The processing gradually advances from the clamping end of the log to the free end until the entire log is processed, at which point the equipment automatically stops.

[0041] During the processing, if the resinous portion of the agarwood log (section 6) is discontinuous, for example, a section is entirely sapwood without resin, the resinous portion will fall onto the worktable after the sapwood is completely removed. Because of the single-end clamping method, the fallen resinous portion will not affect the processing of the remaining part; the equipment will continue processing the remaining log at the clamping end until the entire log is finished. This design effectively solves the problem of traditional two-end clamping methods being unable to continue processing when encountering discontinuous resinous sections.

[0042] Through the above-described embodiments, this invention achieves complete automation of the sapwood removal process from agarwood logs. The entire process requires no manual intervention; from log size measurement, cross-section identification, and path planning to actual cutting, everything is completed by machine vision and intelligent algorithms. Compared to traditional manual splitting and processing methods, this not only significantly improves processing efficiency and reduces labor costs, but also ensures processing accuracy through real-time image feedback, maximizing the preservation of precious agarwood resin and avoiding material waste.

[0043] In practical applications, operators only need to clamp the agarwood logs onto the equipment, set the cutting depth and other parameters, and start the equipment. The equipment will automatically complete the entire processing, completely separating the pure agarwood from the sapwood. After processing, the operator can collect the fallen agarwood pieces. The entire operation is simple and convenient, requiring no professional woodworking skills or experience, truly realizing the transformation of agarwood processing from traditional handicrafts to modern intelligent manufacturing.

[0044] The method of this invention also possesses excellent adaptability and flexibility. By adjusting parameter settings in the software, such as grayscale level parameters, continuous gap parameters, and longitudinal discontinuity parameters, it can adapt to the processing needs of agarwood logs from different origins and of different varieties. The adjustable range of cutting depth is from 0.01 mm to 10 mm, allowing for both fine processing to obtain high-quality agarwood products and rapid rough processing to improve production efficiency. This flexibility enables the method of this invention to meet the diverse needs of different users.

[0045] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for automatically whitening of agarwood, characterized by, Includes the following steps: S1: Obtain the three-dimensional dimensional data of agarwood logs, including length and cross-sectional dimensions; S2: Acquire a cross-sectional image of the end face of the agarwood log; S3: Identify the resinous wood region and white wood region based on the cross-sectional image, and generate processing path data for the retained and removed regions; S4: Control the processing tool to start from one end of the agarwood log and cut the white wood area layer by layer according to the processing path data; S5: After each cut to a preset depth is completed, re-acquire the cross-sectional image of the current machining position and update the machining path data; S6: Repeat steps S4 and S5 until the entire agarwood log is processed.

2. The method for automatically removing sapwood from agarwood according to claim 1, characterized in that, The method for obtaining the length of agarwood logs in step S1 includes: projecting a laser line onto the surface of the agarwood log using a linear laser, acquiring a curve image of the laser line on the log surface using an image acquisition device, and calculating the actual length of the agarwood log based on the pixel coordinate sequence of the laser line.

3. The method for automatically removing white wood from agarwood according to claim 2, characterized in that, The method for calculating the actual length based on the pixel coordinate sequence of the laser line includes: The acquired color images are converted to grayscale images and then filtered for noise reduction. A threshold segmentation algorithm is used to separate the laser lines from the background; For each column of pixels in the laser line, the centroid method is used to calculate the pixel coordinates of the center of that column of laser lines; The actual length of the agarwood log is calculated based on the length of the pixel coordinate sequence and the camera calibration parameters.

4. The method for automatically removing sapwood from agarwood according to claim 1, characterized in that, The method for identifying the resinous wood region and the white wood region in step S3 includes: The cross-sectional image is processed by grayscale conversion, noise reduction, and binarization to obtain binary image data; Extract the external contour data and internal texture data of agarwood logs from binary image data; Based on preset processing rules, feature recognition is performed on contour data and texture data to distinguish between the resinous wood area and the white wood area; The extracted contour data is approximated by polygons or fitted with spline curves to generate vectorized processing path data.

5. The method for automatically removing white wood from agarwood according to claim 4, characterized in that, The preset processing rules include at least one of grayscale level parameters, continuous gap parameters, and longitudinal discontinuity parameters.

6. The method for automatically removing sapwood from agarwood according to claim 1, characterized in that, The layer-by-layer cutting process in step S4 employs four-axis linkage control, including: The A-axis controls the coaxial rotation of the agarwood logs; The X-axis controls the parallel left and right movement of the machining tool, which determines the cutting width; The Y-axis and Z-axis control the up-down and back-and-forth movement of the machining tool, enabling the tool to follow the movement of the agarwood log's cross-section and perform precise cutting along the contour of the machining end face.

7. The method for automatically removing sapwood from agarwood according to claim 6, characterized in that, The cutting width is in the range of 0.01-10 mm and is set before machining.

8. The method for automatically removing white wood from agarwood according to claim 1, characterized in that, The preset depth in step S5 is determined based on the cutting width. When the lateral movement distance of the machining tool reaches the preset depth, the machining is paused, and the cross-sectional image acquisition and path planning are performed again.

9. The method for automatically removing white wood from agarwood according to claim 1, characterized in that, The equipment calibration process also includes a step before processing begins: Use a grid calibration plate to correct focusing, image distortion, and aberration of the image acquisition device; The projection position of the linear laser was calibrated using a step gauge.

10. A system for automatically removing blemishes from agarwood using the method for automatically removing blemishes from agarwood as described in any one of claims 1-9, characterized in that, include: The processing device includes a high-speed rotating processing tool and a four-axis linkage control mechanism. The four-axis linkage control mechanism includes a three-dimensional translational motion control mechanism composed of X-axis, Y-axis and Z-axis and an A-axis rotational control mechanism mounted on the three-dimensional translational motion control mechanism. The A-axis controls the coaxial rotation of the agarwood log. A scanning processing table, mounted on the processing device, includes a clamp mounted on the A-axis rotation control mechanism for clamping and fixing one end of the agarwood log; A linear laser, mounted on the processing device, is used to project laser lines onto the surface of agarwood logs; An image acquisition device, installed on the processing device, includes a first image acquisition device for acquiring laser line images and a second image acquisition device for acquiring cross-sectional images; the first image acquisition device faces a direction perpendicular to the A-axis of the A-axis rotation control mechanism; the second image acquisition device faces a direction perpendicularly upward with the A-axis axis coinciding with the direction of the axis. The processor is used to receive image data, execute image processing algorithms, generate processing path data, and control the processing device to perform cutting processing according to the processing path data.