METHOD FOR A SPECTRAL BASED REPRESENTATION OF IMAGE ELEMENTS ON A LINE

Abstract: Method of spectral-based representation of pixels on a line which is illuminated with light so as to produce a linear image, whereupon the linear image is transformed into a two-dimensional image in such a way that each column in the two-dimensional image can represent spectral divisions of the light which is reflected by corresponding points in the linear image. At least one total which can represent spectral characteristics for a pixel on the line if formed as a result of weighted pixels being totalized in columns. The method according to the invention is characterized in that a variable number of rows are read out from the two-dimensional image, and in that the image contents of the read-out rows are totalized in an analogue manner.

Description: Method for a spectral based representation of image elements on a line The present invention relates to a method of spectral-based representation of pixels on a line which is illuminated with light so as to produce a linear image, whereupon the linear image is transformed into a two-dimensional image in such a way that each column in the two-dimensional image can represent spectral divisions of the light which is reflected by corresponding points in the linear image, whereupon at least one total which can represent spectral characteristics for a pixel on the line is formed as a result of weighted pixels being totalized in columns. The spectral-based representation of pixels is desirable when classifying objects on the basis of their colour. In order that this can be performed, it is already known to detect the light reflected from the object by using a camera. By allowing the light to pass through a prism, the detected light can be divided into different spectral bands. If, for example, the object is red, the intensity for the divided light predominates principally in the red area. By establishing a number of weighted totals of intensities for the different colour components which are obtained by spectral division, it can be established whether the object has a given prescribed colour. The currently known method generally uses a conventional sensor, the entire two-dimensional image being read out and converted in an analogue-to-digital manner. This involves image data which do not actually need to be used in the classification process nevertheless having to be read out. The known method per se enables exact classification to be carried out but the great disadvantage is that the method is both complicated and time-consuming. A further disadvantage of the known method is that the sensors which are used therein do not enable the exposure time to be adapted to the varying light intensity within different areas in the spectrum for different parts of the sensor surface, which results in the signal/noise ratio being low whilst the light intensity varies greatly. The object of the present invention is to provide a method for facilitating more rapid spectral-based representation of pixels on a line. This object is achieved in that a variable number of rows are read out from the two-dimensional image, and in that the image contents in the rows read-out are totalized in columns in an analogue manner. According to a particular feature of the invention, the values of rows are weighted by using different exposure times for the rows in the two-dimensional image. According to another particular feature of the invention, a weighted row value is approximated by analogue totalizing of the row to be weighted and rows lying in close proximity thereto. The above-mentioned methods can evidently -be combined with the method according to the invention such that weighting occurs both by exposure for a relatively long time and by totalizing a frequency row and a number of rows adjacent thereto. In the following, the invention will be explained in greater detail with reference to the drawings, in which: - Figure 1 shows an arrangement suitable for applying the method according to the invention; - Figure 2 shows the manner in which different weighting can be attained by varying the exposure time; and - Figure 3 shows the manner in which different weighting can be attained by totalizing the frequency rows to be weighted and a number of rows adjacent thereto. In Figure 1, the reference sign 1 generally designates an optical system which comprises an objective 2, a gap 3, through which a linear image can be received, and a prism 4 by means of which the linear image can be transformed into a two-dimensional image. The two-dimensional image is transferred to a two-dimensional optical sensor 5 which is preferably adapted to carry out given image- processing on the image detected by the sensor. Finally, the sensor can be connected to any type of data system in which final evaluation is performed as necessary. Depending on the application for which the equipment is to be used, only given light frequencies need be investigated when the evaluation is carried out. This results in a substantially shorter exposure time for spectral-based representation. Advantageously the procedure can be carried out by using an optical sensor which enables any rows in a two-dimensional image to be read out. Reading out can be of the type which is non¬ destructive but it can also be of the destructive type. In the following, the method according to the invention will be explained on the basis of the application of a two-dimensional optical sensor which has given inherent possibilities for signal processing, for example a sensor of the MAPP 2200 type, produced by Integrated Vision Products AB. This sensor consists of an array of a number of photodiodes and comprises a built-in processor which can carry out parallel processing of a row of pixels. The sensor is constructed so that the rows to be processed can be selected in any order and read out without affecting the other data in the image. However, the reading out operation results in the data in the read-out rows being destroyed. When the light impinging on the camera has been transformed into a two-dimensional image in the prism, one dimension, the x- dimension, which corresponds to the position in terms of pixels in the linear image, whilst the y-dimension corresponds to the spectrum obtained at each point after transformation, the transformed image can impinge on the two-dimensional array of photodiodes which forms the sensor element in the optical sensor (MAPP 2200). When the image data following exposure in the sensor have been obtained, the rows which are of especial interest are processed in the image-processing circuit. Since these rows in the sensor correspond to given frequencies or frequency ranges, the addressing in terms of rows entails given frequencies being removed for further processing. It will be appreciated that the actual frequencies are determined by the actual application. It is, therefore, important that the addressed rows can be varied. The total corresponding to a given spectral characteristic is accordingly obtained by analogue totalizing of the rows read out. Owing to the fact that the totalizing by rows in MAPP sensors can be carried out in parallel manner, the spectral-based processing operation is very rapid. Analogue totalizing also results in a high signal/noise ratio in the end result. In order to evaluate spectral characteristics of a linear signal, the frequencies in question in the recorded spectrum are preferably totalized in a weighted manner. N s c (i) = ∑ j f(i,j) (l) For each column a number of totals is formed which correspond to a number of classes c. The totals formed can, for example, be used directly for classifying the pixel by selecting the class c for which the above-mentioned total S c (i) is the greatest. Practical tests have shown that highly precise evaluation of spectral characteristics of an object can be obtained with MAPP sensors, given that the frequency components which are included in the totals S c (i) may only occur in a total N S c (i) • = £ k,f (i,j) nM c - 0 ( 2 ) jf M c c The reason that the frequency components can only occur once when this sensor is used for implementing the method, is that the data stored in the sensor are destroyed during subsequent image- processing. When, instead, a sensor which can process the stored data without simultaneously destroying them is used, the frequency components can be freely re-used in the totalizing process. In order to calculate the totals Si, a number of multiplications with the weighting coefficients k, are required. These multiplications can be carried out as a result of the sensors' using different integration times (exposure times). This is illustrated, for example, in Figure 2 in which the exposure is active when there is black section. The left-hand end of the section symbolizes the beginning of exposure. In this case, the three actual frequencies xl, x2 and x3 have the coefficients 3, 1 and 2, which gives a total value S e (i) S e ( i ) = 3-f(i,x-.) + l*f(i, χ 2 ) + 2*f(i,χ 3 ) ( 3) A further variant for calculating the totals S c (i) is to totalize in an analogue manner a number of rows in the vicinity of the frequency in question. In this way, it should be possible to to approximate 3«f(i, x) according to the following 3-f(i,x)« l-f(i,x-l) + l-f(i,x) + l-f(i,x+l) ( 4 ) For the corresponding totalizing which is shown in Figure 2, it should be possible to carry out the approximation shown in Figure 3. An advantageous manner is, evidently, to combine methods according to the above. As a result per se of the first method, the most rapid possible row frequency which can be attained is limited by the longest exposure time but, on the other hand, this method has the advantage of being more precise than the method in which a number of approximate frequencies are totalized. The preferred arrangement for implementing the method according to the invention cannot be used in the above manner when negative coefficients have to be processed in the totals S c (i) since negative exposure is not possible. The signal-processing circuits are thus used in order to carry out this subtraction. For example, the positive coefficients are added first individually and the negative coefficients are added individually, whereupon necessary subtraction can be carried out in very different ways depending on which type of signal-processing circuits are used. Since the totals which are obtained when spectral data have been weighted provide information about the pixels to which these totals refer, the method according to the invention can be regarded as a method of reducing pixel data by the formation of linear combinations. By virtue of these linear combinations, a vector can be created for each pixel which has fewer dimensions than the original vector. The magnitude in the case of this vector depends to a certain extent on the degree of precision required when the information is subsequently processed. The information which is obtained when the method according to the invention has been applied is consequently a measure of the spectral characteristics of a large number of pixels; a number of reduced vectors to which further operations can be applied. In order that an object can be classified, for example on the basis of the reduced data, on the basis of its colour, linear or non-linear classification can be used. When linear classification is used, the classification can be brought about directly in the actual totalizing processes, only simple comparisons between the total values obtained having to be made. The method according to the invention is suitable for rapid inspection and can, therefore, advantageously be used when material which is conveyed along a running track is inspected. An application which is advantageous in this respect is when the camera is used for detecting defects in wood. The method can be applied in particular for finding defects which cause the colour to differ from the surrounding wood, such as bruising, rotting, random marks, etc. Generally, differences in colour caused by these defects are too small to be detected using conventional colour camera technology whilst the speed requirement is too great for conventional spectrometry technology to be used at a reasonable cost. A further suitable area of application is the inspection of paper. The method according to the invention can advantageously be used for checking that paper running along a track is of the correct colour. The above applications in no way restrict the method according to the invention but are merely given to exemplify some of the many applications which are advantageous with this method. The method according to the invention is restricted only by the scope of the following claims.

Claims: C_lajjB£ 1. Method of spectral-based representation of pixels on a line which is illuminated with light so as to produce a linear image, whereupon the linear image is transformed into a two-dimensional image in such a way that each column in the two-dimensional image can represent spectral divisions of the light which is reflected by corresponding points in the linear image, whereupon at least one total which can represent spectral characteristics for a pixel on the line is formed as a result of weighted pixels being totalized in columns, characterized in that a variable number of rows are read out from the two-dimensional image; and in that the image contents of the rows read-out are totalized in columns in an analogue manner. 2. Method according to Claim 1, characterized in that the values of the rows are weighted by using different exposure times for the rows in the two-dimensional image. 3. Method according to either of the preceding claims, characterized in that a weighted row value is approximated by analogue totalizing of the row to be weighted and of the rows lying in close proximity thereto.

Inventors: AASTRAND ERIK, AASTROEM ANDERS, AASTRAND, ERIK, AASTROEM, ANDERS
Applicants: AASTRAND ERIK, AASTROEM ANDERS, SOLITON ELEKTRONIK AB, AASTRAND, ERIK, AASTROEM, ANDERS
Application year: 1995
Main classification: G01J3
IPC codes: G01J3