Imaging system cuts timber-inspection tasks to size

For several years, imaging technology has provided measurable benefits to the wood and timber industry in yield, productivity, and reduced manpower requirements. For example, industry studies prove that modern sawmills demonstrate a throughput capacity of more than

Aug 1st, 1999
Th Vsd52153 58

Imaging system cuts timber-inspection tasks to size

John Haystead

Contributing Editor

For several years, imaging technology has provided measurable benefits to the wood and timber industry in yield, productivity, and reduced manpower requirements. For example, industry studies prove that modern sawmills demonstrate a throughput capacity of more than

100 pieces/minute. Experienced human inspectors, however, can only sort reliably at half this rate, imposing a production bottleneck. In contrast, automated inspection and grading equipment from the Eye Tec Machine Division of CTBA Pole Productique (Pontà-Mousson, France) uses conventional digital color cameras and PCI- and ISA-based image-acquisition and C4x DSP modules from Hunt Engineering (Somerset, England) to identify and characterize lumber defects in real-time at full production rates.

The CTBA Scanwood vision inspection equipment and software are provided as part of a total production-line control system, often tightly integrated with the manufacturing, sorting, and milling equipment produced by partner companies (see Fig. 1). Says Robert Golja, CTBA project manager, "To apply the technology to a range of inspection and manufacturing-system offerings with minimum redesign, we needed to develop an interface system that was adaptable to multiple camera types as well as to open-architecture PC-based processing systems." In conjunction with Hunt Engineering, CTBA designed a modular camera subsystem that transmits real-time images to Hunt`s remote PC-based DSP-processing system.

The Scanwood system uses multiple color CLG1 linescan cameras from Dalsa Inc. (Waterloo, Ontario, Canada) to image the wood with the number and arrangement of cameras dependent on the application. For example, in crosscutting machines, four cameras are positioned to image all four sides of the timber being cut. However, in sheet-timber processing, two cameras are used to inspect the top and bottom surfaces. The use of color imaging analysis to detect wood-product defects has demonstrated a marked improvement over earlier black-and-white imaging systems by identifying much smaller variations in colors and defects, such as sapwood and blue stains. In fact, each camera can distinguish more than 16 million colors.

Even though the CLG1 cameras are capable of generating 2098, 24-bit color pixels, CTBA uses them in binning mode, whereby the charges from adjacent pixels are combined. Although binning mode is primarily intended for low-light-intensity applications, CTBA uses it to achieve a faster system throughput while maintaining adequate light exposure. The resultant pixel-array design handles 1049 24-bit pixels.

The RS-422 camera data are initially fed into the Hunt HEPC7-IM1 camera subsystem that is collocated and specifically designed for the Dalsa digital cameras. Hunt also provides module interfaces for other camera types, such as analog, 12-bit, and infrared. As pointed out by Peter Warnes, Hunt Engineering technical director, "The use of modular interfaces allows the same basic design to be re-used in a number of applications."

The IM1 camera subsystem converts the 24-bit raw camera data into a serial stream for transmission over a gigabit/second, copper-wire serial link to the 32-bit Hunt HEPC7-PCI card. This link allows the signal-processing system and operator to be separated by up to 20 meters from the production machines. According to Warnes, although the transmission system uses Fibre Channel system components, the data are not encoded in the Fibre Channel protocol. Instead, data are transmitted at 60 Mbytes/s as opposed to Fibre Channel`s maximum capacity of 100 Mbytes.

The IM1 subsystem also provides timing control for the camera. To ensure accurate measurements, the cameras must be synchronized with the controlled speed of the timber passing by the imaging system. Says Warnes, "With a camera scanning at a fixed frequency and timber passing through at varying speeds, you can`t guarantee consistent distance measurements between pixels in the image." To compensate, a field-programmable gate array (FPGA) from Xilinx (San Jose, CA) is used as a shaft-encoder input to generate scanning control signals for the cameras. The imaging resolution varies according to the timber throughput speed. In one application, however, the imaging system routinely detects 1-mm defects at production rates of more than 150 units/minute.

Image preprocessing

Next, the serial data stream enters the HEPC7-PCI image-acquisition card. There, it is directed into first-in, first-out (FIFO) buffers that decouple the card from camera timing control. The data then pass through several on-board prefiltering and processing circuits in preparation for digital-signal processing (DSP).

Because timber sizes vary widely and crosscutting machines can handle wood sizes from an inch to a foot in width, the lumber being imaged does not always fill the entire field of view of the camera. To address this situation, the data are run through SRAM look-up tables (LUTs) for region-of-interest processing. This processing certifies and retains only valid pixels according to preprogrammed parameters and discards all the other pixels.

Because defect detection is based on identifying certain patterns of color in wood, the imaging system must determine any variations in intensity and color from one pixel to the next. However, as noted by Warnes, it is difficult to provide even lighting intensity across an entire piece of lumber under inspection. Instead, each pixel color is compared against a second LUT based on pixel location in the scan, and an individual lighting correction value is applied. The resultant output is normalized color information across the entire width of each scan line. Although Warnes notes that this function could also be performed by the DSP, he says, "It`s also easy to do in hardware at the full pixel rate, and it therefore offloads this task from the DSP."

Additional color-delay FIFOs are provided to accommodate the color cameras using three separate red-green-blue (RGB) charge-coupled devices looking through the same optics. Because the individual color scan lines represent imaging positions on the wood a few millimeters apart, imaging compensation is used to delay the red-to-green and green-to-blue signals by several lines to realign the scans and produce a clearer, better-focused image.

The RGB values of each pixel are then indexed into a SRAM-based hardware LUT or classifier. The classifier assigns 8-bit values for every pixel according to its color range. Therefore, the original 24-bit image data delivered to the DSP processor have been reduced to 8-bit (green) intensity value and 8-bit color marker.

As described by Warnes, the classifier software is individually "taught" inside each production-line facility according to the type of timber being processed. This is an important consideration because coloration is extremely variable between wood types. For example, coloration is generally more consistent in hard wood than in soft wood, but can still vary dramatically from tree to tree and also within individual trees. The CTBA software is structured to account for these variations within individual wood species.

After classifier processing, the data are simultaneously passed to on-board DRAM, which can be accessed via the PCI bus and to the HEPC7-OM1 output mezzanine card (see Fig. 2). Although the CTBA system does not display live imagery, the on-board DRAM captures images for use in initial programming or reconfiguration.

Additional FIFOs on the mezzanine card store and transmit the data to the Hunt C40 DSP system over four communication ports. As described by Warnes, the mezzanine card allows for easy conversion to other DSP systems, such as the Texas Instruments (Dallas, TX) C6000 DSPs. Hunt provides an application-programmable interface for its C40 DSP systems that provides software developers with a standard driver-interface independent of the operating system or host-bus architecture being used.

Recognition and detection

The CTBA inspection systems currently use either the Hunt HET40SDX TIM-40 modules, which provide a single C40 DSP, or the Hunt HETWIN44 modules with two TMS320C44 DSPs each. The HET40SDX module contains 1 Mbyte of SRAM on its local bus and 4 or 16 Mbytes of DRAM on its global bus, for a maximum of 5 or 17 Mbytes of mixed memory. Each of the two TMS320C44 processors on the HETWIN44 module has up to 2 Mbytes of SRAM on the local bus and up to 2 Mbytes on the global bus. In both systems the DSPs are mounted on ISA carrier boards that connect to the HEPC7-OM1 communication ports via ribbon cables. Some CTBA industrial-PC systems provide as many as nine or 12 TMS320C40 DSPs on multiple ISA cards.

The DSP system detects and identifies wood defects by relating the normalized image-intensity and color-label data characteristics of complete groups of pixels. Based on their combinations of shape, size, and proximity, the CTBA algorithms can immediately determine whether the defect constitutes a weakness in a particular piece of wood. As opposed to a simple pass/fail mechanism, the imaging system generates various categories of faults, noting and tracking their exact location on each piece of wood. This capability allows manufacturers to closely control timber quality while minimizing waste.

For example, in an application where multiple pieces of wood are laminated together to form plywood, the presence of a knot in a particular piece of lumber may or may not indicate a structural weakness. Based on information provided by the imaging inspection system, the production equipment can stamp out and replace any knots prior to forming the final pieces. Another application, called "finger-jointing," joins shorter lengths of timber together into single continuous pieces. In this case, the inspection system identifies the individual pieces of timber that are best for the process.

All the image-processing and application software for the Scanwood inspection systems is developed by CTBA. The PC-based application software is written in C language, whereas the DSP code is written in both C and Assembly.

The PC-based operating system is based on QNX real-time software from QNX Software Systems (Kanata, Ontario, Canada). Says CTBA`s Golja, "This software is an easier approach, because we don`t just develop the kernel of the processing unit, but rather design the entire real-time operating system." Says Hunt`s Warnes, "While PCs provide convenient user interfaces and interconnections to other systems and are getting faster all the time, they still can`t quite crack the real-time requirements of a production-line system." Instead, Warnes continues, it`s still best to segment tasks using pipeline processing with dedicated ASICs or FPGAs for high-speed, per-pixel operations, such as lighting correction and region-of-interest generation. Software-based processing via programmable DSPs is best suited for operations requiring random access of large image segments, adds Warnes.

Because many CTBA systems are multisensor platforms with each sensor processor individually optimized for real-time operation and accuracy, the graphical user interface for these systems is hosted on a separate Windows NT workstation. Says CTBA`s Golja, "Hosting the user-interface, data-collection, and fusion processes for multiple sensors on a separate platform simplifies both system design and operation." According to Golja, the objective of the current system design is to require only one operator for the complete scanner, optimizer, and production control of a full line. "Ultimately, the operator simply selects the kind of cuts wanted and the machine operates automatically," says Golja.

Another consideration behind the separation of real-time and management processing tasks was concern over the capabilities and reliability of Windows NT machines in 24-hour/seven-day production environments. CTBA currently has three production sites using the HEPC7-based image-acquisition system.

Click here to enlarge image

FIGURE 1. Automated inspection and grading equipment from the Eye Tec Machine Division of CTBA Pole Productique uses conventional digital color cameras from Dalsa Inc. and PCI- and ISA-based image-acquisition and C4x DSP processing modules from Hunt Engineering to identify and characterize lumber defects in real-time at full production rates.

Click here to enlarge image

FIGURE 2. The Hunt HEPC7-IM1/Dalsa digital camera subsystem controls camera scanning, accepts and formats the 24-bit RS-422 camera data, and transmits the data to the HEPC7-PCI card over a gigabit/s serial link. The HEPC7 modular image-acquisition system is based on the 32-bit HEPC7-PCI card. This card receives camera data via a gigabit/second serial link and places the data into an input first-in, first-out (FIFO) buffer.

Company Information

CTBA Pole Productique

54700 Pontà-Mousson, France

(33) 3-83-83.23.33

Fax: (33) 3-83-81-11-59

Web: www.eyetec.com

Dalsa Inc.

Waterloo, Ontario, Canada N2V 2E9

(519) 886-6000

Fax: (519) 886-8023

Web: www.dalsa.com

Hunt Engineering Ltd.

Somerset TA9 4BP, England

(+44) (0) 1278 760188

Fax: (+44) (0) 1278 760199

Web: www.hunteng.co.uk

QNX Software Systems Ltd.

Kanata, Ontario,

Canada K2M 1W8

(800) 676-0566 or (613) 591-0931

Fax: (613) 591-3579

E-mail: info@qnx.com

Texas Instruments Semiconductor Division

Stafford, TX 77477

(713) 274-2320

Fax: (713) 274-2324

Web: www.ti.com/dsps

Xilinx Inc.

San Jose, CA 95124

(408) 559-7778

Fax: (408) 879-4676

Web: www.xilinx.com

More in Cameras & Accessories