METHOD FOR DETERMINING THE WOOD/BARK RATIO FROM A FLOW OF WOOD MATERIAL

Abstract: The invention relates to a method for determining the wood/bark ratio from a flow of wood material (1), in which the flow is illuminated in a non-flashing manner, scanned along a transverse line with a video camera (2) with at least three channels, the line image corresponding to the line is digitalized into pixels each of which comprise intensity information, the intensity classes corresponding to the wood and the bark are determined in each channel and the pixels belonging to each class are calculated with the help of their intensity-information, and the wood/bark ratio is determined by the number of pixels situated in the different intensity classes. The dynamics of each channel are at least 10, most profitably 12 bit.

Description: METHOD FOR DETERMINING THE WOOD/BARK RATIO FROM A FLOW OF WOOD MATERIAL The invention relates to a method for determining the wood/bark ratio from a flow of wood material, in which the flow is illuminated, scanned along a transverse line with a video camera, the line image corresponding to the line is digitalized into pixels each of which comprise intensity information, the intensity classes corresponding to the wood and the bark are determined and the pixels belonging to each class are calculated with the help of their intensity information, and the wood/bark ratio is determined by the number of pixels situated in the different intensity classes. It is important to know the content of bark and wood in order to be able to peel the logs in an optimal way. By regulating the peeling process in such a way that the content of bark reaches the desired limiting values, it is on the one hand possible to avoid overpeeling and, on the other hand, possible to monitor the fulfilment of the quality requirements relating to the content of bark. An on-line method for determining the wood/bark ratio from a flow of wood material has been presented in the publication of the application 831320 concerning a European Patent. In the said method the flow of wood material is scanned with a CCD line camera that is fixed in the direction transverse to the flow, in which there are 30 - 300 pixels/cm each of which measures the gray scale of the corresponding image field. The pixels are divided into main groups and subgroups are chosen from these main groups in which there exist at the most a chosen number (1 - 20) of adjacent pixels, the gray scale of which exceeds a set limit. The subgroups are filtered from the main groups and the average brightness is calculated for each completed group. The wood and the bark and possibly the background have been set their own classes of brightness, according to which each group is classed into its own class of brightness. The wood/bark ratio in the flow of wood is calculated on the basis of the pixels situated in each class. The method according to the publication is not very suitable for determining a woodchip flow that contains the bark of birches. The wood material of birches and the gray scales of the surface side of their bark are so close to each other that it is especially difficult to separate one from the other. The Finnish patent 95511 presents a method for determining the differently coloured surface areas from a flow of material, which is set to move forward on a transparent conveyor. Backgrounds in accordance with the partial colours are used in the many consecutive chambers, with which backgrounds each colour is filtered in its turn. The colour of the bark of trees differs somewhat, and the method is not well suited to determining the wood/bark ratio. Attention has not been paid to the effect of the layer height (height of the surface) to the survey results. The pieces of woodchips do not move on the conveyor as separate pieces but often as layers as thick as 20- 50 cm. Furthermore, the woodchip and bark conveyors are not transparent . Publication WO97/37780 presents a colour separator, in which several images are taken with the help of an RGB colour camera of the subjects to be classified and the images are turned into colour shade and colour saturation values, on the basis of which the classification is carried out. Scanning technology of 24 bit dynamics (3*8 bits) is utilised in the method, whereby in the colour space of a specific yellow-brown area the colour separating ability is not of a sufficiently good level for the colour separation of wood and bark. In addition to this, 8 bit dynamics /channel has the problem that the sensor is easily saturated if an attempt has been made efficiently to take advantage of all the 256 gray scale values. US publication 5,887,073 presents a colour separator in which pixels of set colours are separated from a 3x8 bit RGB image into their own image. As above, there is here a low dynamics. In addition to this, intensity neutral colour and colour saturation colour coordinates are used, but not at all any intensity information and the colour response is not stabilized. The invention relates to a method for determining bark and wood content. It is important to know the bark and wood content, so that the peeling of logs may be carried out in an optimal way. At the present time, the determining of the quality of wood- chips is almost solely based on the taking of random samples, taken in different ways, and on the results achieved by the analysis of these samples. It is difficult to take a representative sample from a batch of woodchips . Furthermore, the taking of samples and especially the analyses are labourious and time consuming. It is not in practice possible to regulate the process with the help of the measurements, and the measure- ments only have meaning as a means of control. Continuously functional indicators based on gray scale CCD cameras are also available, but with them it is possible accurately to measure mainly the wood content on a bark conveyor. The determining of bark content on a woodchip conveyor is a much more demanding task, since the bark content to be measured is often 0,1 - 1,5 % . The darkness of the bark of many kinds of wood makes the optical observation more difficult. The object of this invention is to achieve an improved method for determining the wood/bark ratio in a flow of wood material. The characteristic features of the method according to the invention are presented in the adjoining patent claims. The changing of the black and white camera used in the method according to the EP-publication to a 24 bit colour camera of the same level does not considerably improve the ability to separate, because it is difficult to recognise the colour of the bark in a reliable manner and the colour responses are not stable . It is possible to improve the accuracy of the measurements to a considerable extent with the help of colour information, when at the same time the dynamics (per channel) are improved to the level of at least 10 bits, most profitably 12 bits and the colour responses are stabilised. It is then also essential to make the classification at least three-dimensionally. In order to achieve the best accuracy of the measurements, the colour response needs to be stabilised. The colour stimulus Φ(γ) is some combination of the effect spectrum (S(γ)) and, depending on the subject, of the transmis- sion (T(γ)), reflexion (R(γ)) or radiance spectrum (r(γ)). When examining the wood or bark content by a CCD colour camera technique it is a question of the reflexion spectrum (R(γ)) of the surface. The values R, G and B of the colour components are obtained as the scalar product of the colour stimulus Φ(γ) and the sensitivity curves r(γ), g(γ) and b(γ) of the red, green and blue components of the camera. The values (R, G and B) of the colour components disclose the internal relations of the primary colours (blue, green and red) in the colour mixture. In the method presented here the effect of the subject's change of brightness is minimised by calculating the relative shares of the colour components r, g and b (r=R/ (R+G+B) , g=G/(R+G+B) and b=B/ (R+G+B) , whereby r, g and b are not dependant on the extent of the radiation power if the form of the spectrum of the source of light stays the same. This requirement is in practice fulfilled when the lights are not regulated in ways that would affect the colour temperature of the source of light (no thyristor regulators are used) and the sources of light are allowed to stabilize for a time of sufficient length before starting the measurements (about 30 min) . The lighting must be non-flashing and its changes need to be compensated for. Non-flashing lighting may also be produced by synchronising the scanning to the frequency of the lighting. By taking advantage of the line camera technique, an even lighting of the subject may be achieved considerably more easily and more evenly than with the matrix camera technique. If the size of the scanned area is physically e.g. 600 mm x 600 mm, when using a matrix camera it is necessary to illuminate the whole 600 mm x 600 mm area evenly from the centre of the area as well as from its edges. In the line camera technique it is enough evenly to illuminate a 600 mm wide area in the direction transverse to the conveyor but only about 1-2 mm in length. With the line camera, a chosen number of line images is taken one after the other from the moving flow. The consecutive lines are connected to one separate image usually already by the image card attached to the camera and an image matrix is achieved for further processing. Different image processing operations are performed on the image matrix. The most essential information from the point of view of the invention is contained in each separate line image. In order to achieve statistical reliability, a vast number of line images is included in the calculation. In the method according to the invention the correction of the intensity has been achieved in two different ways: first, an rgb-image is calculated from the RGB image and, secondly, the intensity information of the chosen colour channel (R or G) that corresponds well to the overall intensity is transformed with the help of a measuring of the height of the surface to intensity information that is independent of the layer height. The adjoining figure presents a measuring arrangement according to the invention. The flow of material 1 moves from the left to the right in the figure e.g. by belt conveyor 5. The place that is to be scanned (the transverse line) is illuminated with lights 3 and the height of the woodchip surface at the place of scanning is measured with an indicator of the height of the surface 6 (e.g. an ultrasound measuring device, i.e. a US probe) . The measuring is synchronised in accordance with the speed of the transporter. With the help of colour line camera 2 a two-dimensional, digitalized image is obtained from the flow of wood material, when the consecutive line images are connected into the same matrix. A measuring of the height of the surface is advantageous, because the light intensity discerned by the camera drops in proportion to the square of the distance. Hereby the changes in the intensity in the RGB channels, caused by the changes in the layer height can be eliminated and also the intensity information of the subjects can be taken advantage of in the analysis. The detailed stages of the method according to the invention are the following. The following example presents a three- channel solution. Several colour channels can be used in a corresponding manner. 1) The subject is illuminated with a non-flashing light (e.g. halogen lights or light sources provided with an electronic controlling unit) . lb) The measuring only takes place if according to the information received from the US probe the layer height is sufficient, whereby the transporter belt will not be visible on the woodchip conveyor. 2) The subject is scanned with a three-channel, most profitably 36 bit RGB line camera (12 bits/channel ) . When each probe has i pixels (e.g. 1000 pixels) and when a number equal to j (e.g. 600) consecutive lines is scanned, three image matrices (R-, G- and B-image matrices) of the size [i,j] are formed from the subject that is scanned. 3) The biases R0 , GO and B0 of the corresponding channels are deducted from the image matrices of each channel R, G and B. The biases have been predefined by measuring the gray scales of the channels at a time when no light is allowed to shine on the probe. The correction of the bias is a very important measure when determining the colour of dark subjects, when the measured colour coordinate is close to the bias value of the channel in question. 4) From the images (R, G and B) in which the bias has been corrected, the corresponding intensity neutral rgb-image matrices are calculated, in which r = R/ (R+G+B) , g = G/ (R+G+B) and b = B/ (R+G+B) . 5) Each image point A(x,y) is classified as of the type bark or of the type wood in the rgb-space. For example an NN-classifier (nearest neighbour) can be used in the classification, whereby image point A(x,y) is classified as belonging to the class closest to which its rgb-coordinates ??? are in some (normally Eucledian) geometry. It is noteworthy that bark and wood may have more than 1 class centre. For example in the case of birch there can exist class centres both on the white bark and on the darker inner bark of the birch. The class centres are deter- mined in advance by analysing known samples (such as is done in figure 4 of US publication 5,887,073). 6) The intensity information of one of the channels the bias of which has been corrected (preferably R or G) is corrected with the help of a signal measured by a US probe, whereby it is possible also to take advantage of the intensity information of the subjects. In order to be able to take advantage of the intensity information it is necessary that the effect of the change of the layer height has been eliminated. 7) The points I(x,y) of the said intensity corrected matrix are classified according to the lightness of the pixel as either bark or wood. In the case of a woodchip conveyor, those points are classified as bark for which the following is true: If I(i,j) < Tl and I(i,(j-H)) < T2 and I(i,(j+H)) < T2 , then the subject is made up of bark. Here Tl and T2 are set intensity criteria and H is the required transition criterion (e.g. 5) . Now for Tl and T2 , Tl < T2 is true and with the help of H and T2 it is possible to fix the limits to the length and darkness of the subject. Those points for which the following is true are correspondingly accepted as wood on a woodchip conveyor : If I(i,j) > Tl and I(i,(j-H)) > T2 and I(i,(j+H)) > T2 , then the subject is made up of wood. Now Tl > T2. 8) The classifications that have been carried out in the stages 5 and 7 are combined, whereby in the case of a woodchip line only those image points are accepted as bark that have been recognised as bark in both stages 5 and 7. Correspondingly in the case of a bark line only those points are accepted as wood that have been recognised as wood in both stages 5 and 7. Depending on the situation, it is possible to use some other condition. 9) The bark-% or the wood-% is calculated as the ratio of the classified pixels. Shadows that are caused by the partial overlapping of the pieces of woodchips may cause lighting problems on a woodchip line, because the machine sight system may in some situations classify the shadows as bark. A method in which form information of the areas that are to be segmented may be used in the segmentation of the image in addition to the intensity information may be used to eliminate the effect of the shadows, i.e. a specific shape is required of the object in order for it to be accepted as a subject. In order to determine the form areas, the intensity matrix is graded with a grading method that takes into account the forms of the subject, and an additional requirement is set to the chosen class in the classification, stating that the form of a pixel that is to be placed in this class must belong to a form area that fulfills the criteria.

Claims: Patent claims 1. A method for determining the wood/bark ratio from a flow of wood material (1), in which the flow is illuminated, scanned along a transverse line with a video camera (2) , the line image corresponding to the line is digitalized into pixels each of which comprise intensity information, the intensity classes corresponding to the wood and the bark are determined and the pixels belonging to each class are calculated with the help of their intensity information, and the wood/bark ratio is determined by the number of pixels situated in the different intensity classes, characterised in that the lighting is effected in a non-flashing manner, at least three colour channels are used the dynamics of which are each at least 10, most profitably 12 bit and the classes are fixed at least three-dimensionally on these channels. 2. Method according to patent claim 1, characterised in that the - subject is illuminated in such a manner that the colour temperature of the lighting is always kept stable and a bias correction is carried out to the absolute colour signals R, G and B of a colour probe, e.g. an RGB camera, by taking into account the response of the zero value of the actual light intensity of each channel and the colour signals are corrected to be relative (i.e. to be the intensity neutral r, g and b) by dividing the value of the signal of each channel with the sum (R+G+B) of the values of the signals of all channels. 3. Method according to patent claims 1 or 2 , characterised in that a CCD colour line camera is used as the camera (2) . 4. Method according to patent claims 1 - 3 , characterised in that an essentially unitary image area is scanned and a corresponding image matrix is formed and the corrections of the image and the classification of pixels are effected as matrix operations . 5. Method according to one of patent claims 1 - 4, character- ised in that the overall intensity, i.e. the gray scale value is measured as also the distance between the camera (2) and the flow of wood material (1) , according to which the grayscale value that is obtained is corrected and the pixels are classified according to the chosen gray scale criterion and the wood/bark ratio is calculated in accordance with the chosen condition by using both the already mentioned at least three- channel classification and the gray scale classification. 6. Method according to patent claim 5, characterised in that the corrected intensity matrix is graded with a grading method that takes into account the forms of the subject in order to determine the form areas and an additional requirement is set onto the chosen class in the classification, stating that the form of a pixel that is to be placed in this class must belong to a form area that fulfills the criteria

Inventors: AHO VELI-JUHANI, LAPPALAINEN TIMO, NOUSIAINEN ISMO, AHO, VELI-JUHANI, LAPPALAINEN, TIMO, NOUSIAINEN, ISMO
Applicants: AHO VELI JUHANI, LAPPALAINEN TIMO, NOUSIAINEN ISMO, VALTION TEKNILLINEN, AHO, VELI-JUHANI, LAPPALAINEN, TIMO, NOUSIAINEN, ISMO, VALTION TEKNILLINEN TUTKIMUSKESKUS
Application year: 2000
Main classification: G01N21
IPC codes: G01N21, G01N33