Method for creating and filtering combined sets of lines from scanner to reduce image artefacts
10602024 · 2020-03-24
Assignee
Inventors
Cpc classification
H04N1/58
ELECTRICITY
H04N1/486
ELECTRICITY
H04N1/1932
ELECTRICITY
H04N1/482
ELECTRICITY
International classification
H04N1/193
ELECTRICITY
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)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
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)
(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)
(18)
(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
(20) If the image sensor as shown in
(21) If the image sensor as shown in
(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
(24)
(25)
(26) Using a recording setup as shown in
(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
(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)
(30)
(31)
(32)
(33)
(34)
(35)
(36)
(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)
(40)
(41)
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)
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)
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)
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)
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)
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)
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.