Image Processing in the Woodworking Industry: Challenges, Solutions and Platforms

Machine vision, automatic optical inspection and image processing has been used for quality control in electronics industry forseveral years. Many applications have been developed for security, packaging industries and elsewhere, but machine vision and imageprocessing is relatively new and underused area in the woodworking industry. Wood is very characteristic and although the applicationareas of image processing in woodworking industries are endless, the processing methods are rather complex. This paper describesbriefly an image processing applications mainly and currently used in woodworking industries nowadays, unsolved challenges of imageprocessing and possible solutions. Also benefits and performance aspects of real-time low-cost low-power embedded platforms, likeTexas Instruments OMAP processors with embedded ARM and DSP cores have been analyzed and discussed. Ill. 2, bibl. 10 (in English;abstracts in English and Lithuanian). http://dx.doi.org/10.5755/j01.eee.113.7.610


Introduction
Machine vision, automatic optical inspection (AOI) and image processing has been used for printed circuit board assembly lines and for quality control in electronics industry for several years.Many applications have been developed for security, packaging industries and elsewhere but machine vision and image processing is relatively new or underused area in the woodworking industry.The amount of manual work in many woodworking techniques can be reduced or even eliminated with image processing applications while at the same time increasing the quality and reducing the time.

Image processing applications and techniques mainly and currently used in woodworking industries
Most of image processing applications in the woodworking industry are less or more related with quality control application.Quality of the timber is important in order to decide where the timber should be used.Loadbearing structures should be more resilient therefore with fewer defects, but in structures where the load-bearing is less important, wood defects highlight the inherent structure of the wood.
To assess the quality of the timber, imperfections (defects) in wood surface should be detected then the grading of timber can be done.Typical defects of the timber are cracks, splits, blue stains, pitches, knots (sound knot, dry knot) and wormholes.Many promising techniques have been studied and developed on automatic detecting and classification of wood defects in the last decade.Estevez in 2003 proposed a genetic algorithm for the classification of 10 types of defects where he characterized each defect by a feature vector of size 182.In 1999 Silven and Kauppinen proposed a recognition system of defects on lumber boards using simple RGB color percentile features calculated from arbitrary rectangular regions.The system uses a non-supervised clusteringbased approach for detecting and recognizing defects in lumber boards.A self organizing map (SOM, a special type of artificial neural network) were employed for discriminating between sound wood and various types of defects.The method achieved low false alarm rate.Further improvement was made by Chacon and Alonso in 2006 where the classifier employs supervised and nonsupervised artificial neural networks (self-organized neural network-SONN and fuzzy SONN) as well as feed forward perception where the knot features are obtained from Gabor filters (linear filter used for edge detection).The system has resulted in a classification rate of 91.17% [1].Tree ring detection is one of the oldest areas of machine vision and image processing in the woodworking industries.Dendrochnology is the science that studies the annual tree rings from the cross section of the tree trunk.Cross section of the tree trunk is presented in Fig. 1.It's a dating technique which determines the living period of trees.Cross section shows that tree growth is seasonal; cells elaborated in the growing season are large, light with thin walls (early-wood) and those formed later are small, dark with thick walls (latewood).The annual ring is the beginning of early-wood to latewood formation.The ring width depends on several internal factors such age, genotype and external ones such climate, altitude, soil, http://dx.doi.org/10.5755/j01.eee.113.7.610 human interventions, and mechanical injuries (like fire) etc. [2].
Many algorithms [3,4] use some kind of modified edge detection in order to detect the annual tree rings.Those algorithms give the best results when the cross sections are sanded to ensure the maximal concentration between early-wood and latewood.Some algorithms [5] can even detect tree rings without sanding the cross sections when the cross section is a fresh cut from log end face.
3D laser scanner system is a system that uses laser and a digital camera to analyze a real-world object and create a digital 3 dimensional model of the object.3D laser scanner systems are the main machine vision and image processing systems in the woodworking industry.There are two basic methods for 3D scanning: laser signal delay method and laser projection method.Laser signal delay method sends a laser signal impulse out of the laser.The signal gets reflected back from the object to the photo sensor.The time of that laser signal journey is measured and then the distance of the measured point can be found.Laser angle and position must be amended to measure another point.Laser projection method uses line laser and a digital camera.The laser and the camera are positioned at an angle.Line laser creates a line to the object.The line is then captured by the camera.After the line has been captured, many image processing algorithms [6] can be used to detect the line from an image.According to the object height the shape of the line will change.The line is strait if the object height is zero.If the angle between the laser and the camera and the distance from the object is known, then the height and the width of the object can be found.
Both methods have its advantages and disadvantages.The first method has its advantages of accuracy and the lower implications of external environment.The disadvantage of the first method is the higher proportion of the moving parts.Industry has usually a lot of dust and it can fall between moving parts and damage the device.The second method has the advantage of cheaper price and the lack of moving parts.The disadvantage of the second method is, however, high external environmental influence.Lighting of the object affects the results.Because of the advantages of the second method, this method is mostly used in the woodworking industries.
In sawmills, logs are scanned with 3D laser scanner in order to gain the log profile.This enables to place the boards inside the virtual log in order to achieve the maximum amount of straight boards.Some sawmills even cut the boards according to the log's shape in order to achieve a minimum loss of valuable material.3D scanning systems in veneer peeling applications observe the natural log shape and change the cutting blade radius according to the 3D scanner data thereby achieving a homogeneous thickness of veneer and the maximal use of material [7] 3D laser scanners are also used to calculate the volume of the grain material that moves on the conveyer belt in wood working factories.
Furthermore a 3D laser scanner system has been developed for handcrafted log-house industry in order to automate the log grooving process, which is the most time consuming operation in log-house building [6].

Challenges
Despite of some applications, image processing is still relatively new or underused in the woodworking industry, because wood is very characteristic and the processing methods are rather complex, nevertheless, this area is evolving.
Handcrafted log-house industry is one of the woodworking industries that have very little or mostly none of automation involved in production processes.As known the handcrafted log-houses gets built in the factory.The walls of the log-house are constructed one log at a time.Because of the natural knotted shape of the logs, every log is fitted individually to get the best result.This means that every log has only one place after the processing where it fits.When the walls are ready in the factory the logs are labeled (an identification number is given to every log) and then the walls are taken apart for transportation.The log identification is important in order to identify and place the log into the same location when the log-house is installed in the construction site.Standard pencil is used mostly to label the logs.Combination of letters and numbers are used for labels, where the letter represents the wall and the number represents the number of the row where the log's location is.Sometimes a piece of paper attached to the log is used to label the log with the same letter and number combination.This log identification method has many disadvantages.
The identification numbers that are written on to the logs must be placed in the visible part of the log and large enough to be seen from afar.After the house has been installed, the numbers are not useful anymore and certainly they are not beautiful.They must be scrubbed off with sandpaper.This process takes a lot of time.However, if the piece of paper were used to label the logs, in order to save time from scrubbing of the written numbers, then often the piece of paper disappear with the transport or the numbers become unreadable, this means additional time spent searching the correct logs.
Another challenge in the woodworking industry is how to determine the log rotation before processing in order to process the log with the right angle.When the log is moving along the production line the log inevitably moves and rotates.This rotation needs to be corrected before processing takes place.As an example in sawmills were the logs are scanned with 3D laser scanners in order to place the boards inside the virtual, the angle of the log is very important.When the rotation angle is wrong then much of the material can easily be wasted.
One method which has been mostly used for log rotation is an alignment line based rotation.An alignment line is drawn with the desired angle at the end of the log.Before the log rotation machine the line is captured with the camera and an image processing is used to determine the rotation angle.The problem is that the rotation of the log is based on one image before the rotation machine and if the rotation machine makes a mistake or is not properly calibrated the rotation angle is wrong.Research of log rotation in Sawmills from Tomi Tulokas and Jawdat Tannous [8] showed that an average rotation error was 20° and some cases the rotation error was nearly 50° which is rather large and needs to be improved.

Solutions
Log identification based on the crosscut image could be an alternative method or a possible solution to the handcrafted log-house industries log identification problems.The method uses a camera and an image processing system to label and identify every individual log based on the log crosscut image.The crosscut image of the log is very characteristic and unique to every log like a fingerprint which is also unique to every individual.In order to identify the log based on the crosscut image an image is taken from every log, at least one end of the log to gain the logs crosscut image.Image is taken before the house is disassembled in the factory.The image is processed in order to gain the most characteristic parameters of the log for unique identification.
In 2005 Carman G., Freeman P., Heyman O. and Briskey W. proposed a method for wood tracking by identification of surface characteristics.The method divides the image into 64x64 pixel areas and uses the FFT (Fast Fourier Transformation) to gain a set of values for unique identification.The values of interests included the most often found frequency in grain pattern or in the growth ring pattern and the grain direction [9].
In addition to the unique identification values the identification information should also include the location of the log in the wall in order to place the log into the same location where it was in the factory when the log-house was assembled.The identification information should be stored until the house reaches on the construction site where another image is taken from the crosscut.The same image processing tasks will be performed plus the comparison (correlation) with the stored values in order to identify the log and the location (the wall and the number of the row) of the log.
One aspect which should be taken into account with this type of identification is to determine whether it is possible to identify the log when another image (on construction site) is taken on another end of the log or when some of the log is cut off at the end of the log.
In order to improve the alignment line based rotation method in sawmills the camera should be mounted in front of the rotation machine in such a way that the camera can see the alignment line the whole time when the rotation is in process.Real time image processing should be used in order to correct the wrong rotation instantly.Also the time of the rotation can be reduced without drawing the alignment line by hand in the end of the log.The crosscut image which is unique and the characteristic markers on the image can be used as an alternative to the alignment line.

Benefits and performance aspects of Texas Instruments OMAP based embedded platforms
Woodworking industry usually has a lot of dust and noise, and thus a normal computer with forced cooling cannot be used.The image processing power that is needed for log identification or real time log rotation systems would require more than one regular PC-s in order to process the images fast enough.Also log identification system based on crosscut image must be very mobile, in order such a system to be convenient.Therefore an embedded platform camera with on board real time image processing is necessary to meet the needs.Embedded platform is a platform designed to perform one or a few dedicated functions often with real time.Real time systems are systems for which the system must execute the task for deadline.By contrast, a non-real-time system is one for which there is no deadline.Embedded real time platforms usually consist of many processors that are typically a general purpose processor (GPP) and a digital signal processor (DSP).GPP usually handles the communication and user interface tasks in a real time application and the DSP is used for processing digital signals in real time.DSP can perform an ultra fast instruction sequences, such as shift and add, and multiply and add, which are commonly used in math-intensive signal processing applications, thus making them ideal for image processing.Depending on the application, two kind of DSP-s (fixed point DSP and floating point DSP) can be used.Floating point calculations in the hardware are more complex thus making them slower than fixed point DSP-s.DSP-s can be programmed with conventional C++ language, but the ultra fast processing is achieved through the use of assembler language.
As an example a cross correlation function with two 240 x 360 pixel images written on assembler on Texas Instruments 1 GHz TMS320C64xx DSP compared with the same function written in C++ on the same processor, was nearly 50 times faster.Cross correlation function written on the regular PC with C++ was 10 times slower than on DSP [6].
One such an embedded platform that includes a general purpose ARM architecture processor and a digital signal processor is the Texas Instruments OMAP (Open Multimedia Application Platform) platform.OMAP family processors are a combination of high-performance and ultra-low power consumption processors which are intended mostly for portable and mobile multimedia applications.
Recently OMAP3530 and OMAP-L138 processors have received more focus thanks to their many interfaces, low power consumption and high performance.OMAP processors are currently used in many low-power, low-cost single-board computers like Beagleboard, Gumstix and Pandora which are mainly used as application development platforms.OMAP processors are also included in many end consumer mobile devises like Droid X, Samsung i9003, Palm Pre, Nokia N900 and Archos Internet Tablets.Also many OMAP based cameras like Matrix-Vision mvBlueLYNX-X have been already developed for machine vision applications.

Conclusions
In this paper an overview of image processing applications and techniques mainly and currently used in woodworking industries were given.The use of image processing in the woodworking applications like wood defect detection, tree ring detection and the 3D laser scanner systems were analyzed.Some unsolved challenges like "Log identification based on crosscut image" and "Log rotation based on crosscut image" were introduced and possible solutions to these challenges were analyzed.Also benefits and performance aspects of Texas Instruments OMAP based embedded platforms were discussed.

Fig. 1 .
Fig. 1.Cross section of the tree trunk