Sawmill Industry

Technologies: C#, Halcon, .Net, scientific numerical programming


Developed a stand-alone application to detect wanes on rough hardwood lumber used in the sawmill facility in the optimization process (cut optimization). It featured an algorithm and image concepts, defined as a sequence of instructions that operates on a set of input images, transforming that information into an output image that is of interest to the user.


Hardwood sawmills’ major problem is optimizing the cuts for each board. Logs are first cut into boards that retain residual bark, called wane, and other undesirable features of the log that are removed by edge and trim cuts prior to sale. Tasks are human based, and value (decision) is determined using a combination of board size and quality, knowledge of wane position and defects is essential for selecting cuts that maximize profit.

Image Processing Technology 

This task is automated by using image processing technology such surface defect detection. Gray scale images are captured from the machine vision system (structured-light profiling system) (or, equivalently, range images) in which each pixel represents a measurement of board thickness. Then by applying filters based on threshold, extract profile images such as: median, slope, plateau, also removing black spots (not corresponding to wane). These images are analyzed to find wane boundaries using edge detection algorithm.

On the right vision system to scan the board. Picture on the right is a typical board, top left we can see a cross-section representing points provided by the scanner (board). On the edge we see brown area is what is called wane (missing wood). 

GUI for debugging and validating

Wane Simulator to visualize wane (help to validate and debug the algorithm). Steps consists of reading a shape file which contains data provided by the scanner. Validation Wane Algorithm steps:

  • Read shape file .shp (shape) 
  • Shape correction (detorsion of the board, to apply the algorithm need to a reference frame we can see board without curvature)
  • Applying filters (output images such median, plateau, without black)
  • Wane detection: apply edge detection and segmentation technique
  • Display and write wane values to (text file)

Image on the left is the final image we can see wane location on the edge, this information is used to optimize the cut according to market price.