Smoothing out knots in wood inspection

An image processing system helps to scan wood veneer sheets for defects.

Wood production is a labour-intensive, multi-step process, where the product is measured and inspected several times during the production cycle. The production of plywood is just one branch of the wood industry, where the wood starts as a raw log and ends as a finished plywood panel.

When the trees are harvested, the raw stems are cut into segments, approximately 100 inches in length, which will be peeled by a lathe to produce long veneer ribbons. The peeling process is simpler when the wood is conditioned, so the segments are first placed in a pond or steam chamber to increase the moisture content.

The veneer ribbon is then inspected for defects, clipped into 4' x 8' sheets, and then passed through a dryer. After the drying stage, the sheets are inspected again and sorted according to their grades.

Several sheets, usually between 3 and 7, are then inserted into a press, layered together and combined with glue, pressure, and steam heat to make a plywood panel.

In some respects, wood inspection is no different from any other application that relies on human sight, and there are many factors which make wood inspection ideal for machine vision.

The veneer sheets pass along a conveyor belt at a rate of 1 per second, and the task of looking for knots, holes, dirt, gouges, and other defects is extremely hard on human eyes during an 8-hour shift, even if workers take regular breaks.

Human graders also lack the objectivity of automated systems. Finally, yet another reason for using machine vision is that the byproducts of the production process, namely smoke and wood dust, raise health concerns for employees working in the immediate area.

Ventek in Eugene, OR answered this need in its system called the GS2000, which automatically scans the wood veneer sheets after the drying stage.

The GS2000 inspects the veneer 24-hours a day, and calculates a grade with an accuracy rate of 95% or higher to determine its suitability for plywood.

The GS2000 has evolved over its short 3-year history. The first version, introduced in 2000, was built with a Matrox Genesis-LC frame grabber and the Matrox Imaging Library (MIL) version 6.1 on a dual 300 MHz Pentium-II PC.

Today, the latest version features an Atmel AVIIVA M2 CL 2K linescan camera and a Matrox Meteor-II/CameraLink frame grabber on a 3 GHz Xeon (with Hyper-threading technology) PC.

Three TIR Systems IRIDIS web lights illuminate the inspection area.

The image capture, processing, and measurements are all performed by MIL version 7, using the functions for image capture, thresholding, lookup tables, and blob analysis.

The GS2000 captures and processes the images that make up a single wood sheet in 0.5 seconds or less.

"As the images are captured, they are stored in a round-robin group of buffers and the sheets are detected and built into sheet image buffers," says Ventek Software Engineer James Gibbons.

The MIL algorithms quickly process the entire sheet image into raw blobs, which can then be classified by defect type.

Ventek's GS2000 system relies heavily on its Neural Network Classifier.

Neural Networks attempt to model certain features in biological neural systems through mathematical constructs. As the name suggests, the Neural Network Classifier is the brain of the system. In order for the GS2000 to effectively identify defects, the Neural Network Classifier must be trained with images of those defects.

The defects can be knots, holes, cracks, splits, stains, voids (broken areas such as clipped edges), and wane (areas of very thin wood). Each defect type has several parameters for size, shape, the maximum number permitted on one sheet, and even the type of wood, such as spruce, pine, hemlock or red fir.

The flexibility of MIL's blob analysis module proved to be indispensable during the development of the Neural Network Classifier.

"The blob analysis functions provide many input measurements that are easy to calculate and easily accessed within our program. Measurements that are not needed are easily removed and don't add to the processing time. Having access to the blob (defect) location allows us to make our own specialized measurements when necessary," explains Gibbons.

As powerful as they are, Neural Networks can only work if they are based on solid data; if they are trained on inconsistent data, they will give inconsistent results. "Neural Networks fully respect the old computer saying: garbage in, garbage out. We apply statistical tests to select the best blob input features and remove inconsistent data from the training sets. When properly used, Neural Networks can produce very robust results," adds Gibbons.

When the image processing locates a sheet's defects, the blob features are measured, classified according to their type, and compared against a list of grade rule decisions.

"Our grade rules are very flexible," notes Gibbons. "They are entered into a list structured database, allowing customers to specify only as many rules as necessary to define the grades."

The sheets will be assigned a valid grade or rejected when checked against the grade rule list.

While in some industries a product is discarded if it fails inspection, lower grade veneer sheets are still used as the central layer of the plywood.

Once the sheets are glued together, they are trimmed and further processed into finished plywood. Speed played a considerable role during the GS2000's development.

"We use MMX and multi-threading optimizations to their fullest extent to gain the speed advantage we need," notes Gibbons.

The custom database of wood defects was also a challenge, given the scope and variations which needed to be classified.

Stains, for example, commonly appear during the drying process and can complicate machine vision, underscoring the need for the Neural Network Classifier to be flexible enough for all types of defects.

During the early stages of development, "in-depth investigation of MIL showed us that the MIL Blob Analysis module would solve our need to measure defects and supply data to our Neural Network Classifier," he adds.

To date, over 25 GS200 systems have been sold to a number of key players in the plywood industry, including Boise Cascade, Georgia-Pacific, MARTCO, and Weyerhaeuser.

The GS2000 in operation

A veneer sheet (left) and the segmented image (right) highlighting defects such as splits, cracks, and knots

A zoomed image of the Neural Network displaying an open knot