Method for creating and filtering combined sets of lines from scanner to reduce image artefacts

10602024 · 2020-03-24

Assignee

Inventors

Cpc classification

International classification

Abstract

Disclosed is a method of processing data from an image scanner for reducing image artefacts. The image scanner comprises a first image sensor arranged to: record a first set of lines, the first set of lines comprising a plurality of pixels representing recorded intensities of a first colour, record a second set of lines, the second set of lines comprising a plurality of pixels representing recorded intensities of a second colour; and record a third set of lines, the third set of lines comprising a plurality of pixels representing recorded intensities of a third colour. The method comprises the steps of: processing at least two of the first, the second or the third set of lines to create a first combined set of lines and filtering said first combined set of lines to filter out image artefacts creating a first filtered combined set of lines.

Claims

1. A method of processing data from an image scanner for reducing image artefacts, comprising at the image scanner comprising a first image sensor arranged to scan a physical object by relative movement between the physical object and the image sensor: recording a first set of lines from a first part of a physical object, the first set of lines comprising a plurality of pixels representing recorded intensities of a first colour; recording a second set of lines from the first part of the physical object, the second set of lines comprising a plurality of pixels representing recorded intensities of a second colour; and recording a third set of lines from the first part of the physical object, the third set of lines comprising a plurality of pixels representing recorded intensities of a third colour, and at a processing unit: processing at least two of the first set of lines, the second set of lines or the third set of lines to create a first combined set of lines including a plurality of pixels each pixel having a value that is determined on the basis of at least two of the first set of lines, the second set of lines or the third set of lines; processing at least two of the first set of lines, the second set of lines or the third set of lines to create a second combined set of lines including a plurality of pixels each pixel having a value that is determined on the basis of at least two of the first set of lines, the second set of lines or the third set of lines; processing at least two of the first set of lines, the second set of lines or the third set of lines to create a third combined set of lines including a plurality of pixels each pixel having a value that is determined on the basis of at least two of the first set of lines, the second set of lines or the third set of lines; wherein the first combined set of lines and the second combined set of lines represent color balance; and wherein the third combined set of lines represents total light intensity of recorded colors; and filtering said first combined set of lines to filter out image artefacts creating a first filtered combined set of lines, wherein filtering comprises filtering out high frequency content of the first combined set of lines; and filtering said second combined set of lines to filter out image artefacts creating a second filtered combined set of lines, wherein filtering comprises filtering out high frequency content of the first combined set of lines.

2. A method of processing signals according to claim 1, wherein the spatial locations on the physical object where the first set of lines are recorded at least partly overlap with the spatial location on the physical object where the second set of lines are recorded.

3. A method of processing signals according to claim 1, wherein the spatial location on the physical object where the second set of lines are recorded at least partly overlap with the spatial location on the physical object where the third set of lines are recorded.

4. A method of processing data according to claim 1, wherein a value of a particular pixel in the first combined set of lines is determined by processing a value obtained from a particular pixel in each of two selected set of lines of the first set of lines, the second set of lines or the third set of lines.

5. A method of processing data according to claim 4, wherein the two values of a particular pixel in the two selected set of lines is processed to create the value of the particular pixel in the first combined set of lines so that the value of the particular pixel in the first combined set of lines is dependent on the difference between the values of the particular pixel in the select two set of lines.

6. A method of processing data according to claim 5, wherein the two values of a particular pixel in the two selected set of lines is processed to create the value of the particular pixel in the first combined set of lines so that an increase in the difference between the values of the particular pixel in the select two set of lines always will result in an increase in the absolute value of the particular pixel in the first combines set of lines.

7. A method of processing signals according to claim 1, wherein the first set of lines, the second set of lines and the third set of lines are merged into a colour set of lines comprising a plurality of pixels, wherein each pixel in the colour set of lines comprises three colour values specifying recorded colour intensity values and wherein the step of creating a combined set of lines comprises for each pixel in the colour set of lines processing at least two of the three colour values together to form a pixel value in the combined set of lines so that each pixel in the combined set of lines is determined on the basis of at least two colour values of a pixel of the colour set of lines.

8. A method of processing signals according to claim 1, wherein the image sensor is a contact image sensor (CIS).

9. A method of processing signals according to claim 1, wherein the image sensor is a charge-coupled device (CCD).

10. A method of processing signals according to claim 1, wherein the step of filtering said first combined set of lines further comprises processing pixels of said first combined set of lines created from data recorded at different points in time.

11. A method of processing signals according to claim 1, wherein the step of filtering said first combined set of lines comprises median filtering the first combined set of lines.

12. A method of processing data according to claim 1, wherein, the method additionally comprises the step of: processing at least two of the first set of lines, the second set of lines or the third set of lines to create a second combined set of lines comprising a plurality of pixels each pixel having a value that is determined on the basis of at least two of the first set of lines, the second set of lines or the third set of lines; and filtering said second combined set of lines to filter out image artefacts creating a second filtered combined set of lines.

13. A method of processing data according to claim 12, wherein said first combined set of lines and said second combined set of lines are filtered independently so that the first filtered combined set of lines is not directly influenced by the second combined set of lines, and the second filtered combined set of lines is not directly influenced by the first filtered combined set of lines.

14. A method of processing data according to claim 1, wherein the first combined set of lines represents the colour balance between the first colour and the second colour in the first part of the physical object.

15. A method of processing data according to claim 1, wherein the second combined set of lines represents the colour balance between the second colour and the third colour in the first part of the physical object.

16. A method of processing data according to claim 1, wherein each of the first set of lines, the second set of lines and the third set of lines are processed to create the first combined set of lines, wherein the first combine set of lines comprises a plurality of pixels, each pixel having a value that is determined on the basis of the first set of lines, the second set of lines and the third set of lines.

17. A method of processing data according to claim 1, wherein the method further comprises processing at least two of the first set of lines, the second set of lines or the third set of lines to create a third combined set of lines comprising a plurality of pixels each pixel having a value that is determined on the basis of at least two of the first set of lines, the second set of lines or the third set of lines.

18. A method of processing data according to claim 1, wherein the first filtered combined set of lines is processed together with specific additional data to generate a first filtered set of lines comprising a plurality of pixels each pixel having a value that represents an intensity of the first colour.

19. A method of processing data according to claim 1, wherein the first filtered combined set of lines is processed together with specific additional data to generate a second filtered set of lines comprising a plurality of pixels each pixel having a value that represents an intensity of the second colour.

20. A method of processing data according to claim 1, wherein the first filtered combined set of lines and the second filtered combined set of lines is processed together with specific additional data to generate a first filtered set of lines comprising a plurality of pixels each pixel having a value that represents an intensity of the first colour, a second filtered set of lines comprising a plurality of pixels each pixel having a value that represents an intensity of the second colour, and a third filtered set of lines comprising a plurality of pixels each pixel having a value that represents an intensity of the third colour.

21. A method of processing data according to claim 1, wherein the second filtered combined set of lines is processed together with specific additional data to generate a second filtered set of lines comprising a plurality of pixels each pixel having a value that represents an intensity of the second colour.

22. A method of processing data according to claim 1, wherein the first combined set of lines is created by processing the first set of lines and the third set of lines, the second combined set of lines is created by processing the second and the third set of lines, and wherein the first filtered combined set of lines is processed together with the third set of lines to generate a first filtered set of lines, the first filtered set of lines comprising a plurality of pixels each pixel having a value that represents an intensity of the first colour, and the second filtered combined set of lines is processed together with the third set of lines to generate a second filtered set of lines, the second filtered set of lines comprising a plurality of pixels each pixel having a value that represents an intensity of the second colour.

23. A method of processing data according to claim 22, wherein the first filtered set of lines, the second filtered set of lines and the third set of lines are processed to generate a filtered colour set of lines comprising a plurality of pixels, wherein each pixel in the filtered colour set of lines comprises three colour values one obtained from the first filtered set of lines, one obtained from the second filtered set of lines, and one obtained from the third set of lines.

24. A method of processing data according to claim 1, wherein the image scanner further comprises a second image sensor arranged to: record a fourth set of lines from a second part of the physical object, the fourth set of lines comprising a plurality of pixels representing recorded intensities of the first colour; record a fifth set of lines from the second part of the physical object, the fifth set of lines comprising a plurality of pixels representing recorded intensities of the second colour; and record a sixth set of lines from the second part of the physical object, the sixth set of lines comprising a plurality of pixels representing recorded intensities of the third colour, wherein the method comprises the steps of: processing at least two of the fourth set of lines, the fifth set of lines or the sixth set of lines to create a fourth combined set of lines comprising a plurality of pixels each pixel having a value that is determined on the basis of at least two of the fourth set of lines, the fifth set of lines or the sixth set of lines; and filtering said fourth combined set of lines to filter out image artefacts creating a fourth filtered combined set of lines.

25. A computer program product comprising program code means adapted to cause a data processing system to perform the steps of the method according to claim 1, when said program code means are executed on the data processing system and are on a non-transitory computer-readable medium.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The above and/or additional objects, features and advantages of the present invention will be further elucidated by the following illustrative and non-limiting detailed description of embodiments of the present invention, with reference to the appended drawings, wherein:

(2) FIG. 1a-b show image sensors according to some embodiments of the present invention.

(3) FIG. 2 shows a schematic drawing of a method of processing data from an image sensor for removing image artefacts according to an embodiment of the present invention.

(4) FIGS. 3a-c illustrate how image artefacts may result from the recording setup used in commercially available scanners.

(5) FIG. 3d show three pixel values from a combined set of lines created according to an embodiment of present invention.

(6) FIGS. 4a-b show an image sensor according to embodiments of the present invention.

(7) FIG. 5 show a schematic drawing of a recording setup used in a large format scanner comprising two image sensors according to an embodiment of the present invention.

(8) FIG. 6 show a schematic drawing of a recording setup used in a large format scanner comprising two image sensors according to an embodiment of the present invention.

(9) FIG. 7a-b illustrate a problem associated with large format scanners.

(10) FIG. 8 shows a flow chart of a method of processing data from an image scanner for removing image artefacts according to an embodiment of the present invention.

(11) FIG. 9 shows a schematic drawing of an apparatus for scanning according to an embodiment of the present invention.

(12) FIG. 10 shows a schematic drawing of a method of processing data from an image sensor for removing image artefacts according to an embodiment of the present invention.

(13) FIG. 11 shows a schematic drawing of a method of processing data from an image sensor for removing image artefacts according to an embodiment of the present invention.

DETAILED DESCRIPTION

(14) In the following description, reference is made to the accompanying figures, which show, by way of illustration, how the invention may be practiced.

(15) FIG. 1a shows a schematic drawing of an image sensor 101 and a light source 103 according to an embodiment of the present invention. The image sensor 101 comprises a plurality of image sensor elements 102 arranged in a linear array. The light source 103 is associated with the first image sensor 101 by being arranged so that light is emitted from the light source 103 towards a physical object to be scanned and reflected by the physical object towards the image sensor 101. This allows the image sensor 101 to generate an image of the physical object. By mechanically moving the image sensor 101 over a physical object to be scanned and/or pulling the physical object over the image sensor 101 a complete image may be formed.

(16) The light source 103 may be configured to generate light with different colours e.g. red, green, and blue. By sequentially changing the colour of the light generated by the light source 103 while the image sensor moves relative to the physical object to be scanned, different sets of lines may be recorded representing colour intensities of different colours. By combining the different sets of lines a scanned full colour image of the physical object may be generated.

(17) FIG. 1b shows a schematic drawing of an image sensor 110 and a light source 114 according to an embodiment of the present invention. The image sensor 110 comprises three linear arrays 111 112 113 of image sensor elements spatially displaced relative to each other. The first linear array 111 comprises image sensor elements configured to detect light having a first colour e.g. red light. This may be achieved by using specific image sensor elements sensitive to the first colour and/or using filters positioned in front of the image sensor elements. The second linear array 112 comprises image sensor elements configured to detect light having a second colour e.g. green light. This may be achieved by using specific image sensor elements sensitive to the second colour and/or using filters positioned in front of the image sensor elements. The third linear array 113 comprises image sensor elements configured to detect light having a third colour e.g. blue light. This may be achieved by using specific image sensor elements sensitive to the third colour and/or using filters positioned in front of the image sensor elements. The light source 114 is configured to emit approximately white light towards a physical object to be scanned. By using the linear arrays 111 112 113 of the image sensor 110 to record the reflected light from the physical object, three lines may be formed representing colour intensities of three different colours. By mechanically moving the image sensor 110 over a physical object to be scanned and/or pulling the physical object over the image sensor 110 three sets of lines may be formed representing recorded colour intensities of three different colours of the physical object. By combining and rearranging the three sets of lines to counteract the displacement of the image sensors, a full colour image of the physical object may be formed.

(18) FIG. 2 shows a schematic drawing of a method of processing data from an image sensor for removing image artefacts according to an embodiment of the present invention. Shown is a first set of lines 202, a second set of lines 203, and a third set of lines 204. The first set of lines 202 comprises a plurality of lines 211 212 213 214 215 each comprising a plurality of pixels representing recorded intensities of a first colour. The second set of lines 203 comprises a plurality of lines 221 222 223 224 225 each comprising a plurality of pixels representing recorded intensities of a second colour. The third set of lines 204 comprises a plurality of lines 231 232 233 234 235 each comprising a plurality of pixels representing recorded intensities of a third colour.

(19) The plurality of lines in the first set of lines, the second set of lines and the third set of lines may be recorded with image sensors as shown in FIG. 1a-b e.g. each pixel may be recorded by an image sensor element.

(20) If the image sensor as shown in FIG. 1a is used to record the first set of lines, the second set of lines and the third set of lines, the individual lines may have been recorded in the following order: 211, 221, 231, 212, 222, 232, 213, 223, 233, 214, 224, 234, 215, 225, and 235.

(21) If the image sensor as shown in FIG. 1b is used to record the first set of lines, the second set of lines and the third set of lines, the individual lines may have been recorded in the following order: 211, 222 and 233 simultaneously, then 212 223 234 simultaneously, and so forth.

(22) By processing 205 at least two of the first set of lines, the second set of lines or the third set of lines 202 203 204 a first combined set of lines 206 is created comprising a plurality of pixels having a value that is determined on the basis of at least two of the first set of lines, the second set of lines or the third set of lines. By filtering 207 the first combined set of lines 206 a first filtered combined set of lines 208 is created.

(23) The information from the at least two sets of lines may be processed so that the combined set of lines 206 comprises information describing the relative distribution between the first colour, the second colour, and the third colour in the pixels. As some image artefacts e.g. the image artefacts described in relation to FIG. 3a-d, result in large changes in the relative distribution between the different colours, a filter 207 that works on the combined set of lines 206 may be more effective. The filtered combined set of lines 208 may optionally be transformed back into one or more filtered set of lines having pixels representing intensities of the first colour, the second colour, or the third colour.

(24) FIGS. 3a-c illustrates how image artefacts may result from the recording setup used in commercially available scanners. FIG. 3a shows a top view of a physical object 300 comprising two white parts 301 303 and a black part 302. Shown is also three boxes showing the area from where three full colour pixels 313 314 315 are recorded. The three boxes have been moved slightly in a horizontal direction from their true position to make the drawing more intelligible.

(25) FIG. 3b shows a side view of the physical object 300 shown in FIG. 3a and the y position of the area from where three pixels 304 305 306 from three lines of a first set of lines are recorded, the y position of the area from where three pixels 307 308 309 from three lines of a second set of lines are recorded, and the y position of the area from where three pixels 310 311 312 from three lines of a third set of lines are recorded. The first set of lines comprises pixels representing recorded intensities of a first colour e.g. red, the second set of lines comprises pixels representing recorded intensities of a second colour e.g. green and the third set of line comprises pixels representing recorded intensities of a third colour e.g. blue.

(26) Using a recording setup as shown in FIG. 1a the pixels of the different sets of lines may be recorded interlaced e.g. in the following order: 304 307 310 305 308 311 306 309 312. In conventional image scanners, full colour pixel are formed by combining the pixels from the three sets of lines such that a first full colour pixel may be formed by combining pixel 304 307 310 in a first full colour pixel 313 having a colour distribution as shown in FIG. 3c, a second full colour pixel may be formed by combining pixel 305 308 311, and a third full colour pixel may be formed by combining pixel 306 309 312. Ideally, the full colour pixel 313 should have a colour corresponding to the average colour in the area from where it is recorded e.g. the full colour pixel 313 should have a relative colour distribution corresponding to average colour distribution in the area from where it is recorded. By looking at the area 313 in FIG. 3a it can be seen that two colours are present black and white. The correct colour of the full colour pixel should therefore be gray as gray is a mix of black and white. Gray is characterized by having equal RGB values. Ideally, the full colour pixel 313 therefore should have equal RGB values. However, as can be seen in FIG. 3c the full colour pixel comprises a strong red component, a medium green component and a low blue component. This is a result of the small spatial displacement between the areas from where the colour values are recorded. As can be seen from FIG. 3b the red component is recorded from an area having a white colour. The white colour reflects all coloured light highly, thereby resulting in the strong red component 304 shown in FIG. 3c. The green component 307 shown in FIG. 3c is recorded from an area having both a black colour and a white colour. Since the black colour absorbs all coloured light, the total resulting green component 307 shown in FIG. 3 is lower than the red component 304. The blue component 310 shown in FIG. 3c is recorded from an area having mainly a black colour. Again, since the black colour absorbs all coloured light, the total resulting blue component 310 shown in FIG. 3 is lower than both the red component 304 and the green component 310.

(27) The result of the artefact is that colours not present on the scanned physical object are introduced in the scanned image. In this example the first full colour pixel will get an orange colour instead of the correct gray colour. The same effect occurs in the third full colour pixel 315 shown in FIG. 3c where an erroneous blue colour is introduced instead of the correct gray colour. Only the second full colour pixel 314 will get the correct colour since all the pixels from the first, the second and the third set of lines 305 308 311 making up the second full colour pixel 314 are recorded from an area having the same colour. The artefact may be known as colour fringing.

(28) Applying filters to the individual colour channels of the scanned images has proven to be an ineffective way of removing the above described colour artefacts as such filters are less effective at changing the relative distribution between the different colours. However, by processing at least two of the first set of lines, the second set of lines and the third set of lines to create a first combined set of lines, a plurality of pixels may be formed where the value of the pixels may reflect a specific colour distribution. A filter applied to the combined set of lines can therefore more effectively change the relative colour distribution, thus more effectively remove the above described colour artefacts.

(29) FIG. 3d shows how three pixels from three lines in a first combined set of lines may be formed according to an embodiment of the present invention. The pixels are formed by subtracting the second set of lines from the first set of lines e.g. the green colour information from the red colour information. The first pixel 320 in the combined set of lines is formed by subtracting the value of pixel 307 from the value of pixel 304, the second pixel 321 is formed by subtracting the value of pixel 308 from the value of pixel 305, and the third pixel 322 is created by subtracting value of pixel 309 from the value of pixel 306. Thus pixel values that represent the colour balance between the red and the green colour are created. As the above described colour artefacts may be characterized by fast changes in the relative distribution of the recorded colours e.g. as can be seen in FIG. 3c, this will correspondingly result in rapid changes in the values of the pixels in the combined set of lines as can be seen in FIG. 3d, thus by applying a filter that limits the speed of such changes e.g. a low-pass filter, a specific rule based filter, or a median filter colour artefacts may be removed. After the filtration the filtered combined set of lines may optionally be transformed back into the original colour channels e.g. red and green.

(30) FIG. 4a shows an image sensor according to embodiments of the present invention. The image sensor 401 402 403 is in this example associated with one or more lense(s) 404 enabling the image sensor to have a wider field of view of the scanning plate 405. This setup is common with CCD image sensors and may be known as a CCD camera setup. The image sensor may comprise three or more linear arrays as shown in FIG. 1b e.g. a linear array for recording red light, a linear array for recording green light, and a linear array for recording blue light. Optionally the image sensor 401 402 403 may also comprise a fourth linear array configured to record black and white images. Due to misalignment between the sets of lines recorded by the three linear arrays of the image sensor 401 402 403 similar colour artefacts may result as described in relation to FIG. 3a-c.

(31) FIG. 4b shows an image sensor according to an embodiment of the present invention. The image sensor 406 is a contact image sensor (CIS) being in contact or proximity of the scan plate 405, where the physical object to be scanned is placed. The image sensor 406 may have a light source associated, the light sources being configured to generate light with different colours as described in relation to FIG. 1a.

(32) FIG. 5 show a side view of a recording setup used in a large format scanner comprising a first image sensor 502 and a second image sensor 503 according to an embodiment of the present invention. Each image sensor 502 503 has a lens associated as described in relation to FIG. 4a. The first image sensor 502 is configured to record lines from a first part of the physical object 504 and the second image sensor 503 is configured to record lines from a second part 505 of a physical object. The first part and the second part 504 505 comprises a common part 506. By combining the recorded images from the two image sensors 502 503 large physical objects may be scanned.

(33) FIG. 6 show a top view of a recording setup used in a large format scanner comprising a first image sensor 601 and a second image sensor 602 according to an embodiment of the present invention. The image sensors 601 602 are CIS image sensors as described in relation to FIG. 4b. The first image sensor 601 is configured to record lines from a first part of a physical object and the second image sensor 602 is configured to record lines from a second part of a physical object. The first image sensor 601 is positioned slightly in front of the second image sensor 602 so that the first part and the second part comprise a common part 605. By combining the recorded images from the two image sensors 601 602 large physical objects may be scanned.

(34) FIG. 7a illustrates a problem associated with large format scanners. Shown is a scanned image comprising a first part 702 recorded by a first image sensor and a second part 703 recorded by a second image sensor. The first image sensor and the second image sensor may be arranged as shown in FIG. 5 or FIG. 6. The image 701 is an image of a physical object having a sharp black line surrounded by two white areas. This situation corresponds to the situation presented in FIGS. 3a-c and as a result image artefacts 705 707 706 708 are present in the image. The image artefacts can be seen as the introduction of erroneous colours in the image 701. However, due to differences between the image sensors and/or alignment errors between the image sensors the artefacts will further differ for the different image sensors e.g. the artefact 705 is different from the artefact 707 and the artefact 706 is different from the artefact 708. As a result the artefacts will lower the homogeneity of the image 701 lowering the overall image quality.

(35) FIG. 7b shows the same image 701 as shown in FIG. 7a after a method of processing data from an image scanner for reducing image artefacts according to an embodiment of the present invention has been used. The resulting image is more homogeneous and it is harder for a viewer to tell that more than one image sensor has been used, thus the overall image quality is raised.

(36) FIG. 8 shows a flow chart of a method of processing data from an image scanner for removing image artefacts according to an embodiment of the present invention. In step 801, a first image sensor is selected. In step 802, using the first image sensor a first set of lines is recorded comprising a plurality of pixels representing recorded intensities of a first colour recorded from a first part the physical object. In step 803, using the first image sensor a second set of lines is recorded comprising a plurality of pixels representing recorded intensities of a second colour recorded from the first part the physical object. In step 804, using the first image sensor a third set of lines is recorded comprising a plurality of pixels representing recorded intensities of a third colour recorded from the first part the physical object.

(37) In step 805, a first combined set of lines is created by processing the first set of lines and the third set of lines together. The processing may be achieved using any algorithm. The processing may comprise a per pixel division of the first set of lines with the third set of lines and/or a per pixel subtraction of the first set of lines from the third set of lines. In step 806, the first combined set of lines is filtered to remove image artefacts creating a first filtered combined set of lines. Next, in step 807 a second combined set of lines is created by processing the second and the third set of lines. The processing may comprise at least a per pixel division of the second set of lines with the third set of lines and/or a per pixel subtraction of the second set of lines from the third set of lines. In step 808, the second combined set of lines is filtered to remove image artefacts. Finally in step 809, the filtered first set of lines, the filtered second set of lines and the third set of lines are processed to generate a filtered colour set of lines comprising a plurality of pixels, wherein each pixel in the filtered colour set of lines comprises three colour values a first colour value obtained from the filtered first set of lines representing the intensity of the first colour, a second colour value obtained from the filtered second set of lines representing the intensity of the second colour, and a third colour value obtained from the third set of lines representing the intensity of the third colour, thus a filtered full colour scanned image of the first part of the physical object may be created.

(38) The first colour values of the filtered colour set of lines may be created by per pixel subtracting the first filtered combined set of lines from the third set of lines, if the first combined set of lines is created by a per pixel subtraction of the first set of lines from the third set of lines. The second colour values of the filtered colour set of lines may be created by per pixel subtracting the second filtered combined set of lines from the third set of lines, if the second combined first set of lines is created by a per pixel subtraction of the second set of lines from the third set of lines. The third colour values of the filtered colour set of lines may simply correspond to the third set of lines. Thus by transforming the recorded colours into another colour space, filtering the data in that colour space, and transforming the data back into the original colour space a simple and effective method of removing image artefacts is provided. All the above steps may be repeated for a plurality of image sensors 810. It should be understood that some or all of the above described steps does not need to run sequentially, and will often in practice run in parallel e.g. the different sets of lines may be recorded in parallel or interlaced, additionally steps 805-809 may be combined into a single step.

(39) FIG. 9 shows a schematic drawing of an apparatus for scanning 901, according to an embodiment of the present invention. The apparatus comprises a first image sensor 902 and a processing unit 904 connected to the image sensors by data communication means 906. The apparatus may further optionally comprise a second image sensor 903. The processing unit 904 may process the signals received from the image sensor 902 using the principles discussed above to remove image artefacts. All components of the apparatus 701 may be integrated in a single integral unit, e.g. in an optical scanner, or the different parts of the apparatus may be implemented in different components; e.g. the image sensor 902 may be implemented in a first component 908 and the processing unit may be implemented in a second component 904 e.g. in a personal computer (PC) connected to the first component 908 with data communication means 906 or in a server connected to the internet communicating directly or indirectly with the first component 908 using data communication means 906.

(40) FIG. 10 shows a schematic drawing of a method of processing data from an image sensor for removing image artefacts according to an embodiment of the present invention. A first set of lines 1001, a second set of lines 1002, and a third set of lines 1003 is recorded from a first part of a physical object. The first set of lines 1001 comprises a plurality of pixels representing recorded colour intensities of a first colour such as red, the second set of lines 1002 comprises a plurality of pixels representing recorded colour intensities of a second colour such as green, and the third set of lines 1003 comprises a plurality of pixels representing recorded colour intensities of a third colour such as blue. The first set of lines 1001, the second set of lines 1002, and optionally the third set of lines 1003 are processed together 1011 to create a first combined set of lines 1021. The processing may be done by for each pixel, subtracting the average of the second set of lines 1002 and the third set of lines 1003, from the first set of lines 1001 e.g. using the equation below:

(41) comb 1 ( x , y ) = ( 418 .Math. set 1 ( x , y ) - 209 .Math. ( set 2 ( x , y ) + set 3 ( x , y ) ) ) 512
where comb1.sub.(x,y) is the pixel value in the first combined set of lines 1021 having index x,y, set1.sub.(x,y) is the pixel value in the first set of lines 1001 having index x,y, set2.sub.(x,y) is the pixel value in the second set of lines 1002 having index x,y and set3.sub.(x,y) is the pixel value in the third set of lines 1003 having index x,y.

(42) The second set of lines 1002, the third set of lines 1003, and optionally the first set of lines 1001 are processed together 1012 to create a second combined set of lines 1022. The processing may be done by for each pixel, subtracting the third set of lines 1003 from the second set of lines 1002 e.g. using the equation below:

(43) comb 2 ( x , y ) = 362 .Math. ( set 2 ( x , y ) - set 3 ( x , y ) ) 512
where comb2.sub.(x,y) is the pixel value in the second combined set of lines 1022 having index x,y, set2.sub.(x,y) is the pixel value in the second set of lines 1002 having index x,y and set3.sub.(x,y) is the pixel value in the third set of lines 1003 having index x,y.

(44) The first set of lines 1001 the second set of lines 1002, and the third set of lines 1003 are processed together 1013 to create a third combined set of lines 1023. The processing may be done by for each pixel, adding the first set of lines 1001, the second set of lines 1002 and the third set of lines 1003 e.g. using the equation below:

(45) comb 3 ( x , y ) = 296 .Math. ( set 1 ( x , y ) + set 2 ( x , y ) + set 3 ( x , y ) ) 512
where comb3.sub.(x,y) is the pixel value in the third combined set of lines 1023 having index x,y, set1.sub.(x,y) is the pixel value in the first set of lines 1001 having index x,y, set2.sub.(x,y) is the pixel value in the second set of lines 1002 having index x,y and set3.sub.(x,y) is the pixel value in the third set of lines 1003 having index x,y.

(46) The first combined set of lines 1021, the second combine set of lines 1022, and the third combined set of lines 1023 may comprise all information present in the first set of lines, the second set of lines and the third set of lines 1001 1002 1003. The first combined set of lines 1021 and the second combined set of lines 1022 may represent the colour balance. The third combined set of lines 1023 may represent the light intensity.

(47) The first combined set of lines 1021 is filtered 1031 to create a first filtered combined set of lines 1041, and the second combined set of lines 1022 is filtered 1032 to create a second filtered combined set of lines 1042. The filtering process may be performed by moving a filter kernel over the first combined set of lines 1021 and the second combined set of lines 1022. The filter may be a linear filter e.g. a low-pass filter and/or a non linear filter e.g. a median filter. The filter kernel may have an elongated shape. The filter kernel may have a shape so that pixels from at least 2, 3, 4, 5, 6, 8 or 10 lines are processed together to yield an output value of the filtering process. The filter kernel may have a shape so that no more than 1, 2, 3, 4 or 5 pixels from a line are processed together to yield an output value of the filtering process.

(48) In some embodiments, the third combined set of lines is not filtered. That may be an advantage for removal of colour fringing image artefacts, as it is the erroneous relative distribution of the recorded colours that is the main source for the artefact and not the total light intensity of the recorded colours, which the third combined set of lines may represent.

(49) The first filtered combined set of lines 1041, the third combined set of lines 1023 and optionally the second filtered combined set of lines 1042 are processed together 1051 to create a first filtered set of lines 1061. The processing may be done by for each pixel adding the first filtered combined set of lines 1041 weighted with a first factor, with the third combined set of lines 1023 weighted with a second factor e.g. using the equation below:

(50) f set 1 ( x , y ) = 418 .Math. filt_comb 1 ( x , y ) + 296 .Math. comb 3 ( x , y ) 512
where fset1.sub.(x,y) is the pixel value in the first filtered set of lines 1061 having index x,y, filt_comb1.sub.(x,y) is the pixel value in the first filtered combined set of lines 1041 having index x,y, and filt_comb3.sub.(x,y) is the pixel value in the third combined set of lines 1023 having index x,y.

(51) The first filtered combined set of lines 1041, the second filtered combined set of lines 1042 and the third combined set of lines 1023 are processed together 1052 to create a second filtered set of lines 1062. The processing may be done by for each pixel, adding the second filtered combined set of lines 1042 weighted with a first factor, with the third combined set of lines 1023 weighted with a second factor and subtracting first filtered combined set of lines 1041 weighted with a third factor e.g. using the equation below:

(52) f set 2 ( x , y ) = 362 .Math. filt_comb 2 ( x , y ) + 296 .Math. comb 3 ( x , y ) - 209 .Math. filt_comb 1 ( x , y ) 512
where fset2.sub.(x,y) is the pixel value in the second filtered set of lines 1062 having index x,y, filt_comb1.sub.(x,y) is the pixel value in the first filtered combined set of lines 1041 having index x,y, filt_comb2.sub.(x,y) is the pixel value in the second filtered combined set of lines 1042 having index x,y, and comb3.sub.(x,y) is the pixel value in the third combined set of lines 1023 having index x,y.

(53) The first filtered combined set of lines 1041, the second filtered combined set of lines 1042 and the third combined set of lines 1023 are processed together 1052 to create a third filtered set of lines 1063. The processing may be done by for each pixel, subtracting the first filtered combined set of lines 1041 weighted with a first factor and the second filtered combined set of lines 1042 weighted with a second factor from the third combined set of lines 1023 weighted with a third factor e.g. using the equation below:

(54) f set 3 ( x , y ) = 296 .Math. comb 3 ( x , y ) - 209 .Math. filt_comb 1 ( x , y ) - 362 .Math. filt_comb 2 ( x , y ) 512
where fset3.sub.(x,y) is the pixel value in the third filtered set of lines 1063 having index x,y, filt_comb1.sub.(x,y) is the pixel value in the first filtered combined set of lines 1041 having index x,y, filt_comb2.sub.(x,y) is the pixel value in the second filtered combined set of lines 1042 having index x,y, and comb3.sub.(x,y) is the pixel value in the third combined set of lines 1023 having index x,y.

(55) The first filtered set of lines 1061 comprises a plurality of pixels representing filtered recorded intensities of the first colour from the first part of the physical object, the second filtered set of lines 1062 comprises a plurality of pixels representing filtered recorded intensities of the second colour from the first part of the physical object, and the third filtered set of lines 1063 comprises a plurality of pixels representing filtered recorded intensities of the third colour from the first part of the physical object. Finally, the first filtered set of lines, the second filtered set of lines and third filtered set of lines 1061 1062 1063 are merged into a filtered colour set of lines 1071. The filtered colour set of lines comprises a plurality of pixels each pixel comprises three colour values one obtained from the first filtered set of lines 1061, one obtained from the second filtered set of lines 1062, and one obtained from the third filtered set of lines 1063. Thus a filtered full colour image is created with reduced image artefacts.

(56) FIG. 11 shows a schematic drawing of a method of processing data from an image sensor for removing image artefacts, according to an embodiment of the present invention. A first set of lines 1101, a second set of lines 1102, and a third set of lines 1103 is recorded from a first part of a physical object by an image sensor. The first set of lines 1101 comprises a plurality of pixels representing recorded colour intensities of a first colour such as red, the second set of lines 1102 comprises a plurality of pixels representing recorded colour intensities of a second colour such as green, and the third set of lines 1103 comprises a plurality of pixels representing recorded colour intensities of a third colour such as blue. The first set of lines 1101 and the third set of lines 1103 are processed together 1111 to create a first combined set of lines 1121. The processing 1111 may be done by, for each pixel subtracting the first set of lines 1101 from the third set of lines 1103 e.g. using the below equation:
Comb1.sub.(x,y)=set3.sub.(x,y)set1.sub.(x,y)

(57) Where Comb1.sub.(x,y) is the pixel value in the first combined set of lines 1121 having index x,y, set3.sub.(x,y) is the pixel value in the third set of lines 1103 having index x,y, and set1.sub.(x,y) is the pixel value in the first set of lines 1101 having index x,y.

(58) Correspondingly, the second set of lines 1102 and the third set of lines 1103 are processed together 1112 to create a second combined set of lines 1122. The processing 1112 may be done by, for each pixel subtracting the second set of lines 1102 from the third set of lines e.g. using the below equation:
Comb2.sub.(x,y)=set3.sub.(x,y)set2.sub.(x,y)

(59) Where Comb2.sub.(x,y) is the pixel value in the second combined set of lines 1122 having index x,y, set3.sub.(x,y) is the pixel value in the third set of lines 1103 having index x,y, and set1.sub.(x,y) is the pixel value in the first set of lines 1101 having index x,y.

(60) The first combined set of lines 1121, the second combine set of lines 1122, and the third set of lines 1103 may comprise all information present in the first set of lines the second set of lines and the third set of lines 1101 1102 1103. The first combined set of lines 1121 may represent the colour balance between the first colour and the third colour in the first part of the physical object and the second combined set of lines 1122 may represent the colour balance between the second and the third colour in the first part of the physical object.

(61) Next, the first combined set of lines 1121 is filtered 1131 to create a first filtered combined set of lines 1141. The filtering process may be carried out by using a median filter e.g. using the below equation:
filt_comb1.sub.(x,y)=median(comb1.sub.(x,y1),comb1.sub.(x,y),comb1.sub.(x,y+1))

(62) Where filt_comb1.sub.(x,y) is pixel value of the first filtered combined set of lines 1141 having pixel index x,y, where y specify a particular line and x specify a particular pixel on said line, comb1.sub.(x,y) is the pixel value of the first combined set of lines 1121 having pixel index x,y, and median is a function that returns the median of its input. Thus in this example, median returns the median of the three values comb1.sub.(x,y1), comb1.sub.(x,y), comb1.sub.(x,y+1).

(63) Correspondingly, the second combined set of lines 1122 is filtered 1132 to create a second filtered combined set of lines 1142. The filtering process may be carried out using a median filter e.g. using the below equation:
filt_comb2.sub.(x,y)=median(comb2.sub.(x,y1),comb2.sub.(x,y),comb2.sub.(x,y+1))

(64) Where filt_comb2.sub.(x,y) is the pixel value of the second filtered combined set of lines 1142 having pixel index x,y, where y specify a particular line and x specify a particular pixel on said line, comb2.sub.(x,y) is the pixel value of the second combined set of lines 1122 having pixel index x,y, and median is a function that returns the median of its input. Thus in this example, median returns the median of the three values comb2.sub.(x,y1), comb2.sub.(x,y), comb2.sub.(x,y+1).

(65) Then, the first filtered combined set of lines 1141, the second filtered combined set of lines 1142, and the third set of lines 1103 are processed together 1151 to create a first filtered set of lines 1161 and a second filtered set of lines 1162. The first filtered set of lines 1161 may be created by for each pixel subtracting the first filtered combined set of lines 1141 from the third set of lines 1103 e.g. using the below equation:
fset1.sub.(x,y)=set3.sub.(x,y)filt_comb1.sub.(x,y)

(66) Where fset1.sub.(x,y) is the pixel value of the first filtered set of lines 1161 having pixel index x,y, set3.sub.(x,y) is the pixel value of the third set of lines 1103 having pixel index x,y, and filt_comb1.sub.(x,y) is the pixel value of the first filtered combined set of lines 1161 having pixel index x,y.

(67) Correspondingly, the second filtered set of lines 1162 may be created by for each pixel subtracting the second filtered combined set of lines 1142 from the third set of lines 1103 e.g. using the below equation:
fset2.sub.(x,y)=set3.sub.(x,y)filt_comb2.sub.(x,y)

(68) Where fset2.sub.(x,y) is the pixel value of the second filtered set of lines 1162 having pixel index x,y, set3.sub.(x,y) is the pixel value of the third set of lines 1103 having pixel index x,y, and filt_comb2.sub.(x,y) is the pixel value of the second filtered combined set of lines 1162 having pixel index x,y.

(69) Finally, the first filtered set of lines, the second filtered set of lines and third set of lines 1261 1262 1103 are merged into a filtered colour set of lines 1171. The filtered colour set of lines comprises a plurality of pixels each pixels comprises three colour values one obtained from the first filtered set of lines 1161, one obtained from the second filtered set of lines 1162, and one obtained from the third set of lines 1103. Thus a filtered full colour image is created with reduced image artefacts. By directly using the values from the third set of lines 1103 to create the filtered colour set of lines 1171, fewer computations are needed.

(70) Although some embodiments have been described and shown in detail, the invention is not restricted to them, but may also be embodied in other ways within the scope of the subject matter defined in the following claims. In particular, it is to be understood that other embodiments may be utilised and structural and functional modifications may be made without departing from the scope of the present invention.

(71) In device claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The mere fact that certain measures are recited in mutually different dependent claims or described in different embodiments does not indicate that a combination of these measures cannot be used to advantage.

(72) It should be emphasized that the term comprises/comprising when used in this specification is taken to specify the presence of stated features, integers, steps or components, but does not preclude the presence or addition of one or more other features, integers, steps, components or groups thereof.