English:
[0001] Scanners come in a variety of types. Some scanners have sensor arrays that have three lines of sensors that scan three colors at the same time. Each of the three lines of sensors has a different color filter. These types of scanners typically use a light source that illuminates the object to be scanned with broad spectrum light. The broad spectrum light is typically a florescent bulb with three different phosphors, or a white LED. Other types of scanners may use a single unfiltered line of sensors that can detect a broad band of light frequencies (typically known as a broadband sensor). This type of scanner uses three different light sources, typically a red, green and blue light emitting diode (LED). The LED's are alternately pulsed to illuminate each scan line with the three different colors.
[0002] FIG. 1 is a block diagram of scanner 100 in an example embodiment of the invention.
[0003] FIG. 2 is a diagram of the exposures for scan lines in an example embodiment of the invention.
[0004] FIG. 3a is an example scan line sequence in an example embodiment of the invention.
[0005] FIG. 3b is a flow chart of a reconstruction algorithm in an example embodiment of the invention.
[0006] FIGS. 1 - 3 and the following description depict specific examples to teach those skilled in the art how to make and use the best mode of the invention. For the purpose of teaching inventive principles, some conventional aspects have been simplified or omitted. Those skilled in the art will appreciate variations from these examples that fall within the scope of the invention. Those skilled in the art will appreciate that the features described below can be combined in various ways to form multiple variations of the invention. As a result, the invention is not limited to the specific examples described below, but only by the claims and their equivalents.
[0007] A scanner typically creates an image of an object by capturing a plurality of scan lines from the object. Each scan line is made up of a number of pixels. A complete color representation of an object typically requires three different color values for each pixel in the image. For example, in the RGB color space a pixel will be represented with a red value, a green value, and a blue value. In the digital domain each value may be represented by a defined number of bits, for example 8, 10, 12 or 34 16 bits. Therefore an image of an object will contain a number of scan lines, where each scan line has a plurality of pixels, and each pixel will have three color values.
[0008] When scanning an object with a broadband sensor, a scanner typically takes three exposures for each scan line, one exposure for each color. The scanner will illuminate the object with a different color of light for each exposure. The different colors of light are used in a defined sequence, for example first the red light, then the green light, then the blue light. In some scanners, the optical head (also called the carriage) remains stationary during all three exposures. When the optical head remains stationary, the three exposures are of the same physical area on the object being scanned. In other examples, the optical head remains in motion under a stationary scanned object during each exposure as in a flatbed scanner, or the scanned object is moved across a stationary optical head, as in an automatic document feeder. Therefore the three exposures are for adjacent regions on the object being scanned. The three different exposures will be combined into one scan line in the scanner.
[0009] Figure 1 is a block diagram of scanner 100 in an example embodiment of the invention. Scanner 100 has a controller 102, a scan head 104 and a drive system 106. Controller 102 is coupled to scan head 104 and drive system 106 and controls the scanner. Controller 102 may comprise a processor, an ASIC, I/O module, memory and the like. The memory may comprise both volatile and non-volatile memory. Code stored in the memory, when executed by the processor, causes the scanner to perform functions, for example scanning. Drive system 106 is mechanically coupled to scan head 104 and moves scan head 104 during scanning.
[0011] In one example embodiment of the invention, scanner 100 will only take two exposures per scan line. One color of light is used for one of the exposures in every scan line. The color used in every scan line will be called the reference color. The other two colors of light are alternated between scan lines. Figure 2 is a diagram of the exposures for scan lines in an example embodiment of the invention.
[0012] Figure 2 shows a plurality of scan lines 1 - N. Each scan line contains two exposures using two different colors of light. In this example green is the reference color so every scan line has one exposure using green light. The other two colors (Red and Blue) are used every other scan line. Scan line 1 has one exposure using red light and one exposure using green light. Scan line 2 has one exposure using blue light and one exposure using green light. Scan line 3 has one exposure using red light and one exposure using green light, and so on. The exposure sequence for the scan lines is RGBGRGBG... Because each scan line requires only two exposures, the scanner can scan an object faster than scanners that use three exposures per scan line.
[0013] Each scan line in figure 2 only captures two different colors for each pixel in the scan line. Because a full color representation of an object requires three different color values for each pixel in the scan line, every pixel in each of the scan lines are missing a color value. The odd numbered scan lines are missing blue values and the even numbered scan lines are missing red values. The missing color values for each scan line can be reconstructed in a number of ways.
[0014] In one example embodiment of the invention, information from the reference channel is used to guide the reconstruction of the missing color channels. The green color is one choice for the full-resolution reference channel since it most closely represents luminance and therefore best preserves scan resolution detail. Figure 3a is an example scan line sequence in an example embodiment of the invention. In figure 3a the green color scan line has been chosen as the reference color channel.
[0015] The missing color pixel value within a scan line is reconstructed in the following fashion : Reference color scan line pixels are aligned with current missing pixel color scan line by "shifting" the reference line pixels up or down by one half of a scan line. So the green pixel value in the previous scan line gO is moved up by one half of a scan line and becomes green pixel aligned gOa. The green pixels in the current scan line gl becomes gla and the green pixels in the following scan line g2 become g2a. In one example implementation, moving or shifting the pixels by one half a scan line is performed using a bi-cubic spline filter, but similar results can be accomplished by any appropriate filter. Once shifted, the green pixels are ''aligned" to the corresponding red and blue pixels from the same scan line. This compensates for the motion of the scan head during the exposures for each scan line.
[0016] Figure 3b is a flow chart of the reconstruction algorithm in an example embodiment of the invention. Once the reference pixels have been aligned, the reconstruction algorithm starts at step 320. For clarity the "a" for aligned has been dropped from the pixel symbols. For each scan line, reference backward and forward differences are calculated. Reference backward difference (bdiff) is defined as the difference between the reference pixel in the current scan line and the reference pixel in the previous scan line. Reference forward difference (fdiff) refers to the difference between the reference pixel in the current scan line and the reference pixel in the following scan line. So for the current scan line bdiff = gl - gO and fdiff is equal to gl - g2. For the current scan line, the red pixel value is being reconstructed.
[0017] At step 322 bdiff is compared to fdiff. If bdiff is smaller than fdiff flow continues at step 324, otherwise flow continues at step 330. At step 324 the sum of the pixel value of the color being reconstructed from the following scan line r2 and fdiff is calculated (sum = r2 + fdiff). This sum is compared to the value of the color being reconstructed from the previous scan line (i.e. rO). If this sum is greater than the value of the color being reconstructed from the previous scan line (i.e. sum > rO), flow continues at step 326. Otherwise flow continues at step 328. At step 326, when r2 + fdiff>r0 the reconstructed pixel is set to the value from the previous scan line, i.e. rl is set equal to rO. At step 328, when r2 + fdiff was not greater than rO, the reconstmcted pixel value is set to the value of the sum, i.e. rl is set equal to r2+fdiff.
[0018] At step 330 when bdiff is greater than fdiff, the sum of the pixel value of the color being reconstructed from the previous scan line rO and bdiff is calculated (sum = rO + bdiff). This sum is compared to the value of the color being reconstructed from the following scan line (i.e. r2). If this sum is greater than the value of the color being reconsuxicted from the following scan line (i.e. sum > r2), flow continues at step 334. Otherwise flow continues at step 332. At step 334, when rO + bdiff>r2 the reconstructed pixel is set to the value from the following scan line, i.e. rl is set equal to r2. At step 332, when rO + bdiff was not greater than r2, the reconstructed pixel value is set to the value of the sum, i.e. rl is set equal to rO+bdiff.
[0019] In another example embodiment of the invention, the pixel values of the missing colors are reconstructed using reference forwards and backwards differences and reference forwards and backwards ratios. First the reference color scan line pixels are aligned with current missing pixel color scan line by "shifting" the reference line pixels up or down by one half of a scan line. In this example green is the reference color and the missing color is red (see figure 3). So the green pixel value in the previous scan line gO is moved up by one half of a scan line and becomes green pixel aligned gOa. The green pixels in the current scan line gl becomes gla and the green pixels in the following scan line g2 become g2a. In one example implementation, moving or shifting the pixels by one half a scan line is performed using a bi-cubic spline filter.
[0020] Once the reference pixels have been aligned, for each scan line, reference backward and forward differences are calculated. For clarity the "a" for aligned has been dropped from the pixel symbols. Reference backward difference (bdiff) is defined as the difference between the reference pixel in the current scan line and the reference pixel in the previous scan line. Reference forward difference (fdiff) refers to the difference between the reference pixel in the current scan line and the reference pixel in the following scan line. So for the current scan line bdiff = gl - gO and fdiff is equal to gl - g2-
[0022] To determine the pixel value of the missing color (red in this example) the reference backwards difference is compared to the reference forwards difference. When bdiff is smaller than fdiff the product of the pixel value of the color being reconstructed from the following scan line r2 and fratio is calculated (product = r2 * fratio). When the product (r2 * fratio) is greater than the same color pixel value in the previous scan line rO, rl is set equal to rO. Otherwise rl is set equal to the product r2 * fratio.
[0023] When bdiff is not smaller than fdiff the product of the pixel value of the color being reconstructed from the previous scan line rO and bratio is calculated (product = rO * bratio). When the product (rO * bratio) is greater than the same color pixel value in the following scan line, or rO * bratio > r2, rl is set equal to r2. Otherwise rl is set equal to the product rO * bratio. Other methods may also be used to reconstruct the pixel values of the missing colors.

中文:
[0001]扫描仪形成多种形式。一些扫描仪具有传感器阵列,该传感器阵列具有同时扫描三种颜色的三行传感器。这三行传感器中的每行具有不同的滤色器。通常,这些类型的扫描仪使用利用宽谱光源照亮待扫描对象的光源。该宽谱光源是通常具有三种不同荧光物质的荧光灯,或者是白色LED。其它类型的扫描仪可以使用能检测宽带光频率的单行无过滤的传感器(通常被称为宽带传感器)。这种类型的扫描仪使用三种不同的光源,通常是红色发光二极管(LED)、绿色发光二极管和蓝色发光二极管。这些LED被交替地施以脉冲以用这三种不同颜色照亮每条扫描线。
[0002]图1是本发明的示例实施例中的扫描仪100的框图。
[0003]图2是本发明的示例实施例中的扫描线的曝光的图。
[0004]图3a是本发明的示例实施例中的示例扫描线顺序。
[0005]图3b是本发明的示例实施例中的重建算法的流程图。
[0006]图1-图3和以下描述说明具体示例,以教导本领域技术人员如何获得和使用本发明的最佳模式。为了教导创造性原理,已经简化或省略一些传统方面。本领域技术人员将理解落入本发明的范围内的这些示例的变型。本领域技术人员将理解,下面描述的特征可以以各种方式组合以形成本发明的多种变型。因此,本发明不是由下面描述的具体示例限制,而是仅由权利要求及其等同物限制。
[0007]通常,扫描仪通过捕捉来自对象的多条扫描线来创建该对象的图像。每条扫描线由多个像素组成。通常,对象的完整颜色展现需要图像中每个像素的三种不同颜色值。例如,在RGB颜色空间中,像素将用红色值、绿色值和蓝色值展现。在数字领域,每个值可以通过限定的多个比特(例如8个、10个、12个或者16个比特)来展现。因此,对象的图像将包含多个扫描线,其中每条扫描线具有多个像素,并且每个像素将具有三个颜色值。
[0008]当使用宽带传感器扫描对象时,扫描仪通常对每条扫描线进行三次曝光,对每种颜色曝光一次。扫描仪会针对每次曝光用不同颜色的光照亮对象。以限定的顺序使用不同颜色的光,例如首先是红色光,然后是绿色光,然后是蓝色光。在一些扫描仪中,在所有三次曝光期间,光学头(还被称为笔架(carriage))保持静止。当光学头保持静止时,三次曝光在被扫描的对象上具有相同的物理区域。在其它示例中,在平台式扫描仪中光学头在每次曝光期间在静止的被扫描对象下方保持运动,或者在自动文档馈送器中使被扫描对象移动跨过静止的光学头。因此,三次曝光针对被扫描对象上的邻近区域。三次不同曝光将结合成扫描仪中的一条扫描线。
[0009]图1是本发明的示例实施例中的扫描仪100的框图。扫描仪100具有控制器102、扫描头104以及驱动系统106。控制器102联接至扫描头104和驱动系统106,并且控制扫描仪。控制器102可以包括处理器、ASIC、I/O模块、存储器等。存储器可以既包括易失性存储器又包括非易失性存储器。在存储器中存储的代码在由处理器执行时使扫描仪执行功能,例如扫描。驱动系统106机械地联接至扫描头104,并且在扫描期间移动扫描头104。
[0011]在本发明的一个示例实施例中,扫描仪100将对每条扫描线只进行两次曝光。在每条扫描线中,一种颜色的光用于这两次曝光之一。在每条扫描线中使用的那个颜色将被称为参考颜色。其它两种颜色的光在扫描线之间交替。图2是本发明的示例实施例中的扫描线的曝光的图。
[0012]图2示出多条扫描线1-N。每条扫描线包含使用两种不同颜色的光的两次曝光。在本示例中,绿色是参考颜色,因此每条扫描线具有使用绿色光的一次曝光。每隔一条扫描线使用另两种颜色(红色和蓝色)。扫描线1具有使用红色光的一次曝光和使用绿色光的一次曝光。扫描线2具有使用蓝色光的一次曝光和使用绿色光的一次曝光。扫描线3具有使用红色光的一次曝光和使用绿色光的一次曝光,等等。这些扫描线的曝光顺序是RGBGRGBG...。因为每条扫描线仅需要两次曝光,所以该扫描仪与对每条扫描线使用三次曝光的扫描仪相比可以更快地扫描对象。
[0013]图2中的每条扫描线仅为该扫描线中的每个像素捕捉两种不同颜色。因为对象的全色彩展现需要扫描线中每个像素的三种不同颜色值,所以每条扫描线中的每个像素缺失一种颜色值。奇数编号的扫描线缺失蓝色值,偶数编号的扫描线缺失红色值。可以以多种方式重建每条扫描线缺失的颜色值。
[0014]在本发明的一个示例实施例中,来自参考通道的信息用于指导缺失的颜色通道的重建。因为绿颜色最密切地展现亮度并且因此最好地保留扫描分辨率细节,所以绿色是全分辨率参考通道的一种选择。图3a是本发明的示例实施例中的示例扫描线顺序。在图3a中,已经将绿色扫描线选择作为参考颜色通道。
[0015]以下面的方式重建扫描线中缺失的颜色像素值:通过将参考线像素向上或者向下“移位”扫描线的一半,将参考颜色扫描线像素与当前缺失的像素颜色扫描线对齐。因此,前一扫描线中的绿色像素值g0向上移动扫描线的一半,并且成为对齐的绿色像素g0a。当前扫描线中的绿色像素g1成为g1a,下一扫描线中的绿色像素g2成为g2a。在一个示例实现方式中,使用双三次样条滤波器(bi-cubic spline filter)实施像素移动或移位一半扫描线,但是任何适合的滤波器可以达到相似的结果。一旦被位移,绿色像素就与来自相同扫描线的对应红色像素和蓝色像素“对齐”。这在每条扫描线的曝光期间,补偿扫描头的移动。
[0016]图3b是本发明的示例实施例中的重建算法的流程图。一旦对齐了参考像素,该重建算法就在步骤320处开始。为了清楚,用于对齐的“a”已从像素符号中删掉。对于每条扫描线,计算参考后向差和参考前向差。参考后向差(bdiff)被定义为当前扫描线中的参考像素和前一扫描线中的参考像素之间的差。参考前向差(fdiff)指当前扫描线中的参考像素和下一扫描线中的参考像素之间的差。因此,对于当前扫描线来说,bdiff=g1–g0并且fdiff等于g1–g2。对于当前扫描线来说,红色像素值正被重建。
[0017]在步骤322处,将bdiff和fdiff比较。如果bdiff小于fdiff,则流程在步骤324处继续,否则流程在步骤330处继续。在步骤324处,计算从下一扫描线重建的颜色的像素值r2以及fdiff之和(sum=r2+fdiff)。将该和与从前一扫描线重建的颜色的值(即r0)相比较。如果该和(sum)大于从前一扫描线重建的颜色的值(即sum>r0),则流程在步骤326处继续。否则,流程在步骤328处继续。在步骤326处,当r2+fdiff>r0时,将被重建的像素设置为来自前一扫描线的值,即设置r1等于r0。在步骤328处,当r2+fdiff不大于r0时,将被重建的像素值设置为该和的值,即设置r1等于r2+fdiff。
[0018]在步骤330处,当bdiff大于fdiff时,计算从前一扫描线重建的颜色的像素值r0以及bdiff之和(sum=r0+bdiff)。将该和(sum)与从下一扫描线重建的颜色的值(即r2)相比较。如果该和大于从下一扫描线的重建的颜色的值(即sum>r2),则流程在步骤334处继续。否则,流程在步骤332处继续。在步骤334处,当r0+bdiff>r2时,将被重建的像素设置为来自下一扫描线的值,即设置r1等于r2。在步骤332处,当r0+bdiff不大于r2时,将被重建的像素值设置为该和的值,即设置r1等于r0+bdiff。
[0019]在本发明的另一示例实施例中,使用参考前向差和参考后向差以及参考前向比和参考后向比重建缺失颜色的像素值。首先,通过将参考线像素向上或者向下“移位”扫描线的一半,使参考颜色扫描线像素与当前缺失的像素颜色的扫描线对齐。在本示例中,绿色是参考颜色,缺失的颜色是红色(见图3)。因此,前一条扫描线中的绿色像素值g0向上移动扫描线的一半并且成为对齐的绿色像素g0a。当前扫描线中的绿色像素g1成为g1a并且下一条扫描线中的绿色像素g2成为g2a。在一个示例实现方式中,使用双三次样条滤波器实施像素移动或移位扫描线的一半。
[0020]一旦对齐了参考像素,就针对每条扫描线计算参考后向差和参考前向差。为了清楚,用于对齐的“a”已从像素符号中删掉。参考后向差(bdiff)被定义为当前扫描线中的参考像素和前一扫描线中的参考像素之间的差。参考前向差(fdiff)指的是当前扫描线中的参考像素和下一扫描线中的参考像素之间的差。因此,对于当前扫描线来说,bdiff=g1–g0并且fdiff等于g1–g2。
[0022]为了确定缺失颜色(本示例中为红色)的像素值,将参考后向差和参考前向差相比较。当bdiff小于fdiff时,计算从下一扫描线重建的颜色的像素值r2与fratio之乘积(product=r2*fratio)。当该乘积(r2*fratio)大于前一扫描线中相同颜色像素值r0时,设置r1等于r0。否则,设置r1等于乘积r2*fratio。
[0023]当bdiff不小于fdiff时,计算从前一扫描线重建的颜色的像素值r0与bratio之乘积(product=r0*bratio)。当该乘积(r0*bratio)大于下一扫描线中相同颜色的像素值时,或者当r0*bratio>r2时,设置r1等于r2。否则,设置r1等于乘积r0*bratio。其它方法也可以用于重建缺失颜色的像素值。