Developing a production line inspection system with linescan cameras

A start up company had developed some expertise in detecting defects in raw wood, when it was being processed in a sawmill. The traditional way to operate was to cut all of the timber into standard lengths, and then to manually inspect each length. Any that had defects like knots or splits were then rejected.

Being able to detect the defects before the cutting enabled them to optimise the cutting of the timber to minimise the amount that was being wasted. Electronically detecting these faults required cameras to take images of the timber that could be electronically processed.

Conventional cameras form images by scanning a rectangle in front of them, forming a 2D image. To form a good image the item being imaged need to be stationary when the image is taken. If the piece of wood being inspected is very long, it is not possible to get a detailed image of its whole length in a single camera image, but multiple images are difficult to join together accurately.

For this reason Linescan cameras were chosen. These cameras scan just one straight line as their 1D image, and the second dimension is formed by the movement of the timber. As the timber travelled through the sawmill rollers gripped it and turned an encoder that produced pulses as it turned. These pulses could be used to trigger scans of the linescan camera at fixed distances regardless of the speed variation of the timber.

Linescan Inspection System

The images formed could be processed by a PC, but for it to be processed in real-time, the speed of that processing limited the speed that the timber could travel through the sawmill. It was decided that programmable Digital Signal Processor devices could be used to extract the faults from the images, and to pass on the position of those faults to a PC that collated the results. The result was a real-time system that could operate at the full speed of the sawmill.

A piece of timber has 4 faces, and there can be defects on any of them. This meant that it was necessary to make a cabin that housed four linescan cameras, and they all four data streams be processed in the same way. The results of all four cameras then had to be combined to make the decisions of how to cut the timber in the most optimal way, and to send commands to the saw machinery further down the production line.

The solution was to produce a custom circuit board that was fitted into the imaging cabin, near to the linescan cameras. This board received the signal from the encoder, and provided the triggers and other control signals for the four linescan cameras. It also took the parallel digital image signal from each camera and serialised it, so that the data from each camera could be transmitted over 20 metres using a screened serial cable at 1.25Gbits/second.

The serial connection made it easier to place the DSPs and PC away from the difficult and dirty environment of the sawmill. The Gigabit receivers were designed into cards that could present the image data to their own cluster of real-time processors. These were on a PCI plug in card so that the results could be easily accessed by the controlling PC. The PC part of the custom system also provided an up-link to the remote PCB so that things like the spacing of the scans and exposure time of the linescan cameras could be controlled by the PC software.

The PC then used Ethernet to communicate downstream to the saw, so that the timber could be cut in the optimised lengths the system had calculated.

One version of this system software was developed to control a finger jointing machine in place of the saw, making it possible to produce long lengths of fault free timber, which could be used to make windows, doors and mouldings in a very efficient way.

Dotstar Design are capable of helping you to design systems like this, with a thorough understanding of imaging systems and image processing. In modern times it might be better to use FPGAs in a system like this – using their built in high speed serial interfaces in place of the Gbit transceivers and also for PCI Express.

Our design tools can enable us to keep control of almost the whole custom design process.

Our production tools including vapour phase soldering also allow us to quickly produce prototypes and low to medium volumes for production systems.

If you have a similar requirement please contact us.

Click here to tell us about your project!

Copyright © 2018 DOTSTAR DESIGN
All Rights Reserved.
SITE MAP