WO2010102519A1 - 一种校色的方法和装置 - Google Patents

一种校色的方法和装置 Download PDF

Info

Publication number
WO2010102519A1
WO2010102519A1 PCT/CN2010/000303 CN2010000303W WO2010102519A1 WO 2010102519 A1 WO2010102519 A1 WO 2010102519A1 CN 2010000303 W CN2010000303 W CN 2010000303W WO 2010102519 A1 WO2010102519 A1 WO 2010102519A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
image
pixels
color correction
pixel
Prior art date
Application number
PCT/CN2010/000303
Other languages
English (en)
French (fr)
Inventor
王剑
姚磊
Original Assignee
北大方正集团有限公司
北京北大方正电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北大方正集团有限公司, 北京北大方正电子有限公司 filed Critical 北大方正集团有限公司
Priority to JP2011553261A priority Critical patent/JP5710507B2/ja
Priority to US13/255,954 priority patent/US8538146B2/en
Priority to EP10750315.3A priority patent/EP2408188B1/en
Publication of WO2010102519A1 publication Critical patent/WO2010102519A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6072Colour correction or control adapting to different types of images, e.g. characters, graphs, black and white image portions

Definitions

  • the present invention relates to the field of computer image processing, and more particularly to a method and apparatus for color correction. Background technique
  • Computer image color correction is for the same image.
  • the image processing process is adopted to achieve a consistent output that is as close as possible to the original. (color) effect.
  • Different output devices have different color colors due to the difference in output characteristics.
  • the process of color correction is mainly to convert the image in a color space (the color space where the original is located, the source color space) into Another process in color space (device color space).
  • the color correction process for the output device is as shown in FIG. 1 , and includes the following steps: Step 1. Fine-tuning the color;
  • This step is mainly to compensate for the difference between the source color space and the ICC profile describing the source color space.
  • it can also be used to compensate for the difference between the device color space and the ICC profile describing the device color space, or simply to perform some special processing on the image, for example: the entire image of Cyan (Cyan, short for C), product (Magenta, abbreviated as M), yellow (Yellow, abbreviated as Y), black (Black, abbreviated as K) color components in the color component is increased.
  • This step is the core step of the entire color correction process. It needs to change the image in the source color space to the image with the same or close visual effect in the device color space on a pixel-by-pixel basis according to the characteristics of the source color space and the device color space. Please refer to the pseudo code representation below:
  • Res ICC_Convert ( [in] srcICC, [in] desICC, [in] src, [out] des,
  • ⁇ srcICC represents the ICC profile describing the source color space
  • desICC represents an ICC profile describing the color space of the device
  • src can also be a color value directly.
  • the converted color value can be obtained by des;
  • Res ICC— Convert ( [in] src-des-Link, [in] src, [out] des, [in] num);
  • Gray retention means that if the color value of a source image pixel satisfies the above definition of gray, then the color value before conversion will be changed again regardless of the color value after the color space conversion.
  • solid color is defined as except for one color component.
  • the “solid color” reservation means that if the color value of a source image pixel satisfies the definition of the above solid color, the color value before the conversion is re-established regardless of the color value after the color space conversion.
  • the reason for this step in the color correction process is mainly caused by two reasons: a) Whether it is “black”, “gray” or “solid color”, there may be multiple color values after performing color space conversion. The case where the color component is not 0 causes a visual "deterioration”.
  • Color space conversion functions often do not have such a function, so the pixel color values that should not be converted must be corrected after the image has been converted.
  • Step 4. Total ink volume control.
  • the total ink amount control is a method of reducing the value of each color component when the sum of the respective component values of the color of a certain pixel exceeds a certain threshold.
  • the following is a way to reduce the color component value in equal proportions to illustrate its role:
  • 50% of the input value output is 70%; to achieve 50% of the output, the input value must be changed to 33%.
  • Jitter is to remove this bad visual effect by blurring the boundaries of the mutation.
  • the range of II is 0-255.
  • II DT stands for the jitter table, and each of its values also contains four components. The value of II for each component is also between 0 and 255.
  • Image [i] . c + image [i] . c > DT [i%sizeofDT] . If ( image [i] . m>0 && image [i] . ra ⁇ 255 )
  • Image [i] . y + image [i] . y > DT [i%sizeofDT] . y ; if ( image [i] . k>0 && image [i] . k ⁇ 255 )
  • Image [i] . k + image [i] . k > DT [i%sizeofDT] . k ;
  • the effect of blurring the abrupt boundary is achieved by randomly increasing or decreasing the values of the respective components of the respective pixels of the input image.
  • the present invention provides a method and apparatus for color correction to solve the problem that the speed of color correction of a computer image in the prior art is low and cannot meet the needs of a fast output device.
  • Embodiments of the present invention provide a method for color correction, including:
  • Color correction is performed on one pixel of the simple block, and the color correction processing result is copied to other pixels in the simple block.
  • Another embodiment of the present invention further provides a device for color correction, including a segmentation unit, a determination unit, a processing unit, and a storage unit, wherein:
  • a segmentation unit for dividing an image into image blocks and transmitting the data of the image blocks to a determining unit and a processing unit;
  • a determining unit configured to determine whether the color component values of all the pixels in the image block are the same, and is further used to determine whether the color component value of the next pixel in the complex block is the same as the color value of the previous pixel color stored in the storage unit;
  • a processing unit configured to perform color correction processing on the pixel, and store the color correction result in the storage unit;
  • the storage unit is configured to store a color correction result for color correction of the pixel, and send the result to the judgment unit.
  • the present invention achieves the purpose of improving the processing speed by simplifying the processing of some image portions having special features, and can improve the color correction processing speed without substantially affecting the existing color correction effect.
  • FIG. 2 is a flow chart of performing color correction on an input computer image according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a color correction device according to an embodiment of the present invention. detailed description
  • the embodiment of the present invention provides a color correction method.
  • the main implementation principle, the specific implementation process and the corresponding beneficial effects of the embodiments of the present invention are described in detail below with reference to the accompanying drawings. Elaboration.
  • the computer image is divided into a plurality of smaller image blocks. If the color component values of all the pixels in the image block are the same, only one pixel needs to be color-corrected, and the result of the color correction processing is applicable. Other pixels in the image block; if different, the color component values of the previous pixel or the previous row and column pixels and the color correction processing result are buffered if the color component value of the next pixel or the subsequent row and column pixel is the same as the previous pixel or If the color component values of the previous row and column pixels are the same, the color correction processing result of the previous pixel or the previous row and column pixel is applied to the next pixel or the subsequent row and column pixel.
  • the specific process of coloring the input computer image is as shown in FIG. 1, and includes the following steps: Step 101: The input image is virtually cut into image blocks having a width of m pixels and a height of n pixels. For better results, m and n can take equal values and are both powers of two. At this time, the value of the same color plane of a plurality of pixels or the values of different color planes of one pixel can be combined into one large unit for comparison, which can effectively reduce the number of comparisons.
  • Step 102 If all the color component values of all pixels in the image block are the same, that is, composed of pixels of a single color, then the image block is a simple block; otherwise the image block is not a simple block, which we call a complex block. Finally, record the detection results.
  • signBlock indicates whether the current image block is a simple block, and the default is set to simple block.
  • ⁇ w represents the actual width of the image block, in pixels
  • ⁇ h represents the actual height of the image block, in pixels
  • p pC + i ⁇ width ⁇ n + j*m ;
  • adjacent simple blocks of the same color value can be combined into one large simple block.
  • the same adjacent complex blocks can also be combined into one large complex block, which can reduce the number of blocks of the entire image and increase the processing speed.
  • the image blocks shown in Table 1 can be combined into the image blocks in Table 2.
  • Step 103 For a simple block, step 1 to step 5 of the color correction processing in the background art can be greatly simplified, and no complicated calculation is performed on a pixel-by-pixel basis, and only calculation is performed for a certain pixel value, and when all the processing ends, the unified Copy the calculation results to all the pixels of the simple block.
  • the simple block may not participate in the dithering operation, that is, in the dither processing. In the process, all component values of all pixels in a simple block remain unchanged.
  • Step 104 For the complex block, the color component values and processing results for the previous pixel are retained during the color correction process.
  • Step 105 Compare various color component values of the next pixel and the previous pixel.
  • Step 106 If the values of the respective color components of the latter pixel and the previous pixel are the same, then no processing is needed, and the color correction processing result of the saved previous pixel is directly copied.
  • prevDot p[0] ;
  • procDot p[0] ;
  • the above method is a buffering for a single pixel, so it can be called point buffering. Because the correlation of adjacent pixels in the image is very strong, the point buffering strategy will reduce the complicated calculation and achieve a good acceleration effect.
  • a line buffering method can also be adopted.
  • the so-called line buffer method refers to retaining the color component values and processing results of the previous row or column of pixels in the color correction process, and then the pixels in the same row or column at the same position and the pixels in the same row or column in the same position have the same color component values. There is no need to process, but the result of the color correction processing result of the saved previous row or column pixel can be directly copied to the pixel of the same row or column at the same position.
  • the color space conversion step in the color correction process is taken as an example to illustrate the effect of the line buffer method in a pseudo code manner.
  • prevLine represents the color value before the previous row or column pixel processing
  • procLine represents the color value of the previous row or column pixel processing
  • P is a pointer to the color value of the current row or column first pixel, assuming it is stored in pixels
  • w The width of the current image.
  • the pixel value of the II position is the same as the previous row or column, and the processed color value is directly copied.
  • the pixel value of the II position is different from the previous row or column, then the recording position is in pos
  • procLine p ;
  • the correlation is found to be small during the comparison between two adjacent rows or two columns, then the comparison can be abandoned, and the current row or column of pixels can be directly processed, but the environment (prevLine and procLine) is reserved, and is reserved for further Used in the next row or column pixel processing. If there are three lines of image data, the correlation between the image data of the first line and the second line is small, but the correlation between the image data of the second line and the third line is large (this is a situation in which image data often occurs). Then our process is like this. After observing that the correlation between the image data of the first line and the second line is small, the optimized color correction process is no longer performed on the second line of data. At this time, the prevLine is likely to have not changed.
  • ICC Convert ( srcICC, desICC, p, p, w) ;
  • procLine p ;
  • line buffering can also effectively utilize adjacent pixels in the image.
  • the strong correlation the purpose of reducing the amount of calculation.
  • the image is reorganized into pixel-by-pixel storage.
  • the reason for this is that after simple block detection, the reason is: For simple blocks, there is no need to store them in pixels. In other words, image reorganization work is only done on complex blocks. See the pseudo code below for the effect of this method:
  • ⁇ and h respectively the width and height of the current image block
  • pC, pM, pY, pK are pointers to the upper left pixel of each color plate (CMYK) II of the current image block, and width represents the width of the entire image.
  • pNew is a pointer to the image block data stored in pixels obtained after processing.
  • Another embodiment of the present invention further provides an image color correction device, as shown in FIG. 3, including a segmentation unit 201, a determination unit 202, a processing unit 203, and a storage unit 204, wherein the segmentation unit 201 is configured to image
  • the image block is divided into image blocks, and the data of the image block is sent to the judging unit 202 and the processing unit 203, and is also used to merge the adjacent image blocks to form a new image block.
  • the determining unit 202 is configured to determine various colors between all pixels in the image block Whether the color component values are the same is also used to determine whether the color component value of the next pixel in the complex block is the same as the previous pixel color component value stored by the storage unit 204.
  • the processing unit 203 is configured to perform color correction processing on the pixels, and store the color correction result in the storage unit 204.
  • the storage unit 204 is configured to store the color correction result for correcting the pixels, and send the result to the determination unit 202.
  • This color correction device can simplify the processing of some image parts with special features to improve the processing speed, and improve the color correction processing speed without affecting the existing color correction effect.

Abstract

本发明公开了一种校色的方法和装置,用以解决现有技术对输入计算机图像的校色处理速度较低的问题。主要技术方案包括:将输入的图像划分成不少于1个图像块;对每个图像块中所有像素之间的各种颜色分量值进行比较,相同的成为简单块,不同的成为复杂块;对简单块的一个像素进行校色处理,并将校色处理结果复制到所述简单块中的其他像素上。通过该技术方案,可以针对某些具有特殊特征的图像部分做简化处理来达到提高处理速度的目的,在基本不影响现有校色效果的情况下提高校色处理速度。

Description

一种校色的方法和装置 技术领域
本发明涉及计算机图像处理领域, 尤其涉及一种校色的方法和装 置。 背景技术
计算机图像校色是针对同一幅图像,为了消除不同的输出设备(屏 幕、 打印机) 之间的输出特性差异, 所采取的图像处理过程, 其核心 是为了达成一致的、 与原稿尽可能接近的输出 (色彩) 效果。 不同的 输出设备由于输出特性的差异导致它们能够输出的色彩分别属于不同 的色彩空间, 校色的过程其实主要就是把处于一个色彩空间 (原稿所 在的色彩空间一源色彩空间) 中的图像转换到另一个色彩空间 (设备 色彩空间) 中的过程。 不同的色彩空间的特性通常采用国际色彩联盟
( International Color Consortium) 指定的工业标准来描述, 我们 称之为 ICC特性文件 (ICC Profile) 。
通常针对输出设备的校色过程如图 1所示, 包括以下几个步骤: 步骤 1、 颜色微调;
这个步骤主要是为了补偿源色彩空间和描述源色彩空间的 ICC特 性文件之间的差异而设置的。 当然在实际操作中也可以用作补偿设备 色彩空间和描述设备色彩空间的 ICC特性文件之间的差异, 或者是单 纯地对图像进行某些特殊处理,例如:将整个图像的青(Cyan,简称 C)、 品 (Magenta, 简称 M) 、 黄(Yellow, 简称 Y) 、 黑 (Black, 简称 K) 颜色分量中的品色分量调高。
步骤 2、 色彩空间转换;
这个步骤是整个校色过程的核心步骤, 它需要根据源色彩空间和 设备色彩空间的特性, 逐个像素把处于源色彩空间的图像变成设备色 彩空间下视觉效果相同或者接近的图像。 请参考下面的伪代码表示:
Res = ICC_Convert ( [in] srcICC, [in] desICC, [in] src, [out] des,
[in] num) ; II ICC一 Convert是进行色彩空间转换的函数
II Res表示转换过程的结果, 例如: 是成功还是失败
〃 srcICC表示描述源色彩空间的 ICC特性文件
II desICC表示描述设备色彩空间的 ICC特性文件
II src是一个指向 srcICC色彩空间下图像的数据缓冲区的指针
II des用于输出, 是指向转换后图像缓冲区的指针
II num表示需要转换的像素个数
当然 src也可以直接是一个颜色值, 此时通过 des就能得到转换 后的颜色值;
有时为了加快速度, srcICC和 desICC会合并成为一个文件来指导 两个色彩空间的转换过程, 我们称之为 DeViCeLink。 使用使用 DeviceLink, 那么上述代码就变成:
Res = ICC— Convert ( [in] src一 des一 Link , [in] src , [out] des, [in] num) ;
其中 src一 des— Link 表示从源色彩空间转换到设备色彩空间的
Devicelink。
步骤 3、 "黑色" I "灰色" I "纯色"系保留;
在 CMYK色彩空间下, "黑色 " 的定义有两种:
a) 黑颜色分量值为 100%, 其他颜色分量值为 0, 即 k = 100% = 1 并且 c = 0并且 m = 0并且 y = 0; 或者
b ) 黑颜色分量值为 100%即可, 即 K = 100%。
"黑色"保留指的是如果某个源图像像素的颜色值满足上述黑色 的定义, 那么无论色彩空间转换后颜色值变成什么, 都要重新变为 ( c=0, m=0, y=0, k=l ) 的标准黑色值。
在 CMYK色彩空间下, "灰色"的定义为除了 k颜色分量外, 其他 颜色分量相等并且为 0, 即 c = m = y = 0。
"灰色保留"指的是如果某个源图像像素的颜色值满足上述灰色 的定义, 那么无论色彩空间转换后颜色值变成什么, 都要重新变为转 换前的颜色值。
在 CMYK色彩空间下, "纯色 "的定义为除了一个颜色分量外, 其 "纯色"保留指的是如果某个源图像像素的颜色值满足上述纯色 的定义, 那么无论色彩空间转换后颜色值变成什么, 都要重新变为转 换前的颜色值。
之所以在校色过程中存在这一步骤, 主要是两个原因引起的: a) 无论是 "黑色"、 "灰色"还是 "纯色" , 在执行色彩空间转 换之后其颜色值都可能存在多个颜色分量不为 0 的情况, 从而引起视 觉上的 "恶化" 。
b )色彩空间转换函数往往没有此类功能, 因此必须在图像经过转 换之后再对不应该进行转换的像素颜色值进行修正。
步骤 4、 总墨量控制。
不同的纸张对不同油墨的吸收能力有很大区别。 如果在同一个位 置 (像素) 上, 各个颜色分量的值之和过高, 那么就会导致油墨量超 过纸张的吸收能力而发生流动或者无法附着到输出介质上, 最终破坏 整个图像的输出效果。
总墨量控制就是当某个像素的颜色各个分量值之和超过某个阈值 时, 而采取的削减各个颜色分量值的方法。 下面以等比例降低颜色分 量值的方法来阐述一下它的作用:
// 首先计算总墨量
sum 二 c + m + y + k ;
if ( sum > Threshold)
{
II 如果总墨量超出了阀值, 那么等比例削减各个颜色分量 c = c 氺 Threshold / sum ;
m = m * Threshold I sum ;
y = y * Threshold I sum ;
k = k * Threshold / sum ;
}
值得注意的是等比例降低各个颜色分量的方法只是总墨量控制的 一种方法。 步骤 5、 线性化
大多数输出设备往往并不能准确地体现输入的颜色值。 例如: 彩 色喷墨打印机在打印一个 50%的纯青色(其颜色值为(c=0. 5, m=0, y=0, k=0 ) ) 色块时, 实际输出的青色测量值往往为 70%甚至更高。 此时为 了获得 50%的输出青色值, 我们需要把输入的青色进行调整。
比如, 50%的输入值输出效果为 70%; 为了达到 50%的输出效果, 必须把输入值变成 33%。
步骤 6、 抖动
有时, 图像中存在从一个颜色到另一个颜色的均匀过渡的区域, 其实就是在某个方向上, 相邻像素的颜色值发生微小的、 有规律的变 化。
但是由于前面的处理步骤, 这种颜色过渡的均匀性会受到破坏。 此时在颜色逐渐过渡过程中, 会发生相邻像素的颜色值发生相对剧烈 的变化, 从而导致视觉上的 "恶化" 。
抖动就是为了去除这种不良的视觉效果, 使用的方法是模糊发生 突变的边界。
和总墨量控制一样, 抖动的方法也有很多, 下面举例说明其中的 一种方法及其作用:
II sizeoflmage表示图像的像素个数
for ( int i = 0 ; i < sizeoflmage ; i++ )
II image表示图像数据, 包含 CMYK四个分量。 每个分量
II 的取值范围为 0—255.
II DT表示抖动表, 它的每个值也包含四个分量。 每个分量的取 II 值也在 0到 255之间。
II sizeofDT表示抖动表的大小, 为了最大程度上避免重复性,
II sizeofDT—般为素数。
if ( image [i] . c>0 && image [i] . c<255 )
II %表示同余操作
image [i] . c += image [i] . c > DT [i%sizeofDT] . c ; if ( image [i] . m>0 && image [i] . ra<255 )
image [i] . m +二 image [i] . m > DT [i%sizeofDT] . m ;
if ( image [i] . y>0 image [i] . y<255 )
image [i] . y += image [i] . y > DT [i%sizeofDT] . y ; if ( image [i] . k>0 && image [i] . k〈255 )
image [i] . k += image [i] . k > DT [i%sizeofDT] . k ;
}
从上述方法中可以看出, 通过把输入图像各个像素的各个分量的 值随机地增加或者减小的方式达到模糊突变边界的效果。
虽然上面只列出了计算机图像校色处理过程中的六个处理步骤, 但是在实际工作中还可能有更多, 同时处理步骤之间的顺序也不是完 全固定的。
从上面各个校色处理步骤我们已经看出, 通常的校色方法需要针 对原始图像进行多步骤、 逐像素地处理, 计算量非常庞大。 特别是当 输入图像为高分辨率和大尺寸时, 处理速度便成为一个巨大的瓶颈, 无法满足快速输出设备的需要。 发明内容
本发明提供一种校色的方法和装置, 用以解决现有技术中对计算 机图像校色处理速度较低, 无法满足快速输出设备需要的问题。
本发明实施例通过如下技术方案实现:
本发明实施例提供了一种校色的方法, 包括:
将输入的图像划分成不少于 1个图像块;
对每个图像块中所有像素之间的各种颜色分量值进行比较, 相同 的成为简单块, 不同的成为复杂块;
对简单块的一个像素进行校色处理, 并将校色处理结果复制到所 述简单块中的其他像素上。
本发明另一个实施例还提供了一种校色的装置, 包括切分单元、 判断单元、 处理单元和存储单元, 其中:
切分单元, 用于将图像切分成图像块, 并把图像块的数据发送给 判断单元和处理单元;
判断单元, 用于判断图像块中所有像素之间的各种颜色分量值是 否相同, 还用于判断复杂块中后一个像素的颜色分量值与存储单元存 储的前一个像素颜色分量值是否相同;
处理单元, 用于对像素进行校色处理, 并把校色结果存储在存储 单元;
存储单元, 用于存储对像素进行校色的校色结果, 并发送给判断 单元。
通过上述技术方案, 本发明通过针对某些具有特殊特征的图像部 分做简化处理来达到提高处理速度的目的, 可以在基本不影响现有校 色效果的情况下提高校色处理速度。 附图说明
图 1为现有技术中图像校色的流程图;
图 2为本发明实施例中对输入的计算机图像进行校色的流程图; 图 3为本发明实施例中校色装置的结构示意图。 具体实施方式
为了提高对计算机图像校色处理的速度, 本发明实施例提出了一 种校色方法, 下面结合说明书附图对本发明实施例的主要实现原理、 具体实施过程及其对应能够达到的有益效果进行详细的阐述。
本发明实施例中, 将计算机图像划分成若干个更小的图像块, 如 果图像块内所有像素的各种颜色分量值相同, 则只需要对一个像素进 行校色处理, 校色处理的结果适用于图像块中的其他像素; 如果不同, 则将前一个像素或者前一个行列像素的颜色分量值和校色处理结果缓 存, 如果后一个像素或者后一个行列像素的颜色分量值与前一个像素 或者前一个行列像素的颜色分量值相同, 则将前一个像素或者前一个 行列像素的校色处理结果适用于后一个像素或者后一个行列像素。
一个实施例中, 对输入的计算机图像进行校色的具体过程如图 1 所示, 包括如下步骤: 步骤 101、对输入的图像虚拟地切分为宽为 m像素, 高为 n像素的 图像块。为了有更好的效果, m和 n可以取相等的值,并且都为 2的幂。 此时可以把多个像素的同一色面取值或者一个像素的不同色面取值合 并成一个大的单元进行比较, 这样可以有效地减少比较的次数。
步骤 102、如果图像块内所有像素的所有颜色分量值都相同, 即由 单一颜色的像素组成, 那么这个图像块就是一个简单块; 否则这个图 像块就不是一个简单块, 我们称之为复杂块, 最后将探测结果记录起 来。
下面以图像数据按色面存储为例, 用伪代码的方式描述整个简单 块探测过程的效果:
II 从高度方向上遍历整个图像, 其中 height指的是整个图像的 高度
II 单位是像素
for ( int i = 0 ; i < (height+n- 1) /n ; i ++ )
II从宽度方向上遍历整个图像, 其中 width指的是整个图像的宽 度
II 单位是像素
for ( int j = 0 ; j < (width+m-1) /m ; j ++ )
{
II signBlock表示当前图像块是否为简单块, 缺省设为简单 块
SignBlock [i] [j] = TRUE ;
〃 w表示图像块的实际宽度, 以像素为单位
int = in ;
〃 h表示图像块的实际高度, 以像素为单位
int h = n ;
II 最右边一列图像块的宽度可能不足 m, 对这种情况进行处理 if ( width- j*m < m ) w = width-j^m ;
II 最下边一行图像块的高度可能不足 m, 对这种情况进行处理 if ( height-i*n < n ) h = height-i*n ; BOOL blsSimpleBlock = TRUE ;
II PC指向输入图像左上角像素的青版数据, p指向第 i行第 j
// 列图像块左上角像素的青版数据。
p = pC + i^width^n + j*m ;
II遍历整个图像块
for ( int y=0 ; y<h ; y++ )
for ( int x=0 ; x<w ; x++ )
II判断图像块的青版数据是否和其左上角青版数据相同 if ( p[0] != p[y*height+x] )
{
II确定肯定不是简单块, 跳出循环不再执行
blsSimpleBlock 二 FALSE ;
break ;
}
II如果已经判断出当前图像块不是简单块, 那么开始探测下一块 if ( blsSimpleBlock == FALSE )
{
SignBlock[i] [j] = FALSE ;
continue ;
II开始考察品色版
II开始考察黄色版
II开始考察黑色版
}
如果图像数据是按照像素存储的, 那么上述的处理流程可能需要 相应的变化。 SignBlock的意义请参见表 1。 其中 TRUE表示指定的图 像块是一个简单块, FALSE表示指定的图像块不是简单块。 表 1 :
Figure imgf000011_0001
为了使本发明拥有更好的效果, 相邻的并且颜色值相同的简单块 可以合并为一个大的简单块。 同样相邻的复杂块也可以合并成一个大 的复杂块, 这样可以减少整个图像的分块数, 提高处理速度。 比如表 1 所显示的图像块可以合并成表 2中的图像块。
表 2:
Figure imgf000011_0002
步骤 103、 对于简单块而言, 背景技术中校色处理过程步骤 1一步 骤 5可以大大简化, 无需逐个像素进行复杂计算, 只需针对某个像素 值进行计算, 当所有处理结束后, 再统一把计算结果复制到简单块的 所有像素上即可。
由于抖动的处理过程会使得简单块不再成为简单块, 因此为了使 本发明拥有更好的效果, 简单块可以不参与抖动操作一即在抖动处理 过程中, 简单块内的所有像素的所有分量取值保持不变。
步骤 104、对于复杂块而言,在校色处理过程中保留对前一个像素 的颜色分量值和处理结果。
步骤 105、 将后一个像素和前一个像素的各种颜色分量值进行比 较。
步骤 106、 如果后一个像素和前一个像素的各种颜色分量值相同, 那么就不需要处理, 而是直接把保存的前一个像素的校色处理结果复 制。
下面以等比例降低颜色分量的总墨量控制处理步骤为例, 用伪代 码的方法说明上述缓冲方法的效果, 其中 prevDot表示前一个像素处 理之前的颜色取值, procDot表示前一个像素处理后的颜色取值, p为 指向当前像素颜色值的指针, 假设它是按照像素存储的。
if (p[0] == prevDot)
II如果当前像素的颜色值和上一个像素处理前的颜色值一致, II那么将缓冲的处理后结果直接赋值;
p[0] = procDot ;
else
{
II记录当前像素的颜色值
prevDot = p[0] ;
int sum 二 p[0]. c + p[0]. in + p[0].y + p[0].k ;
if ( sum > Threshold )
{ - p[0] . c = p [0] . c * Threshold / sum ;
p[0] . m = p[0]. m * Threshold / sum ; p[0] . y = p[0]. y * Threshold / sum ; p[0].k 二 p[0].k * Threshold / sum ;
II记录当前像素处理后的颜色值
procDot = p[0] ; 以上方法是对单个像素实施的缓冲, 因此可以称之为点缓冲。 由 于在图像中相邻像素的相关性很强, 因此点缓冲策略会减少复杂的计 算, 起到很好的加速效果。
作为点缓冲的一种特例, 还可以采取线缓冲方法。 所谓线缓冲方 法指的是在校色处理过程中保留图像前一行或者列像素的颜色分量值 和处理结果, 那么后一行或者列相同位置的像素和前一行或者列相同 位置颜色分量值相同的像素就不需要处理, 而是直接把保存的前一行 或者列像素的校色处理结果处理结果复制到后一行或者列相同位置的 像素即可。
下面以校色处理过程中的色彩空间转换步骤为例, 用伪代码的方 式说明线缓冲方法的效果。其中 prevLine表示前一行或者列像素处理 之前的颜色值, procLine 表示前一行或者列像素处理后的颜色值, P 为指向当前行或者列首像素颜色值的指针, 假设它是按照像素存储的, w为当前图像的宽度。
int index = 0 ;
for ( int i - 0 ; i < w ; i ++ )
{
II同位置的像素值与前一行或者列相同, 直接复制处理后的 颜色值
if ( p [i] == prevLine [i] )
p [i] = procLine [i] ;
else
{
II 记录当前像素值 (处理之前)
prevLine [i] = p [i] ;
II同位置的像素值与前一行或者列不同, 那么记录位置到 pos中
II 并且把当前像素的颜色值复制到临时缓冲区 six pos [index] = i ;
src [index] = p [i] ; index ++ ;
}
II 执行 ICC转换, 请注意 index永远不会大于 w
ICC一 Convert ( srcICC, desICC, src, src, index ) ;
II 将转换后的结果转移到输入图像行或者列和 procLine 的相同 位置中
for ( i = 0 ; i < index ; i ++ )
{
p [pos [i] ] = src [i] ;
}
II记录当前行或者列处理后的位置, 等到处理下一行或者列时使 用
procLine = p ;
进一步地, 假如在相邻两行或者两列的比较过程中发现相关性很 小, 那么可以放弃比较, 直接对当前行或者列像素进行处理, 但是要 保留好环境 (prevLine和 procLine) , 留待再下一行或者列像素处理 时使用。 假如有三行图像数据, 第一行和第二行图像数据的相关性很 小, 但是第二行和第三行图像数据的相关性很大 (这是图像数据经常 发生的状况) 。 那么我们的处理过程是这样的, 在察觉了第一行和第 二行图像数据的相关性很小以后, 不再对第二行数据执行优化的校色 过程, 此时 prevLine很可能没有发生变化 (指向第一行图像数据) , 但是必须在处理第三行图像之前, 把 prevLine指向第二行图像数据, 这样在处理第三行图像数据时, 就可以利用第二行和第三行图像数据 的相关性了。 见下面的示意代码-
CopyMemory (prevLine, p, sizeof (prevLine) );
II 执行 ICC转换
ICC— Convert ( srcICC, desICC, p, p, w) ;
procLine = p ;
和点缓冲方法一样, 线缓冲也能够有效地利用图像中的相邻像素 的强相关性, 达成减少计算量的目的。
为了使本发明实施例拥有更好的效果, 在简单块探测步骤之后, 如果输入的图像数据不是按像素存储的, 那么重新把图像组织为按像 素存储。 之所以安排在简单块探测之后, 原因在于: 对于简单块无需 按像素进行存储。 换句话说图像重新组织工作仅对复杂块进行。 本方 法的效果请参见下面的伪代码:
II 首先判断当前图像块(第 i行第 j列) 是否为复杂块
if ( SignBlock [i] [j] != TRUE )
{
〃 和 h分别当前图像块的宽度和高度
for ( int x = 0 ; x < h ; x ++ )
for ( int y = 0 ; y < w ; y ++ )
{
II pC,pM,pY,pK分别是指向当前图像块各个色版 (CMYK) II 左上角像素的指针, width表示整个图像的宽度
pNew[x] [y] . c = pC [x*width+y];
pNe [x] [y] . m = pM[x*width+y];
pNe [x] [y] . y = pY [x*width+y];
pNew[x] [y] . k = pK [x*width+y];
}
}
pNew为指向处理后得到的按像素存储的图像块数据的指针。
通过把图像重新组织, 图像校色处理过程中的某些步骤, 特别是 "色彩空间转换"步骤对按照像素组织存储的图像数据处理速度要比 按色面组织存储的图像数据快得多。
本发明的另一个实施例还提供了一种图像校色装置, 如图 3所示, 包括切分单元 201、 判断单元 202、 处理单元 203和存储单元 204, 其 中切分单元 201用于将图像切分成图像块, 并把图像块的数据发送给 判断单元 202和处理单元 203,还用于将相邻的图像块进行合并, 形成 新的图像块。 判断单元 202用于判断图像块中所有像素之间的各种颜 色分量值是否相同, 还用于判断复杂块中后一个像素的颜色分量值与 存储单元 204存储的前一个像素颜色分量值是否相同。 处理单元 203 用于对像素进行校色处理, 并把校色结果存储在存储单元 204。存储单 元 204用于存储对像素进行校色的校色结果, 并发送给判断单元 202。
通过这种校色装置可以针对某些具有特殊特征的图像部分做简化 处理来达到提高处理速度的目的, 在基本不影响现有校色效果的情况 下提高校色处理速度。
显然, 本领域的技术人员可以对本发明进行各种改动和变型而不 脱离本发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于 本发明权利要求及其等同技术的范围之内, 则本发明也意图包含这些 改动和变型在内。

Claims

权 利 要 求 书
1、 一种校色的方法, 其特征在于, 包括:
将输入的图像划分成不少于 1个图像块;
对每个图像块中所有像素之间的各种颜色分量值进行比较, 相同 的成为简单块, 不同的成为复杂块;
对简单块的一个像素进行校色处理, 并将校色处理结果复制到所 述简单块中的其他像素上。
2、 如权利要求 1所述的方法, 其特征在于, 还包括:
将复杂块中的前一个像素与后一个像素的各种颜色分量值进行比 较, 如果相同, 将对所述前一个像素的校色处理结果复制到所述后一 个像素上。
3、 如权利要求 1所述的方法, 其特征在于, 还包括:
如果所述图像复杂块的颜色分量值是按照色面组织存储的, 将所 述图像复杂块的颜色分量值按照像素组织存储。
4、 如权利要求 1所述的方法, 其特征在于, 所述图像块的长与宽 相同, 为 2的幂个像素。
5、 如权利要求 1或者 4所述的方法, 其特征在于, 相邻的并且颜 色分量值相同的简单块进行合并成新的简单块, 相邻的复杂块合并成 新的复杂块。
6、 如权利要求 1所述的方法, 其特征在于, 进一步包括: 所述复杂块中的前一个像素完成校色处理后, 将颜色分量值和校 色处理结果进行存储;
将后一个像素的颜色分量值与存储的前一个像素颜色分量值进行 比较;
如果相同, 将存储的前一个像素校色处理结果复制到后一个像素 上。
7、 如权利要求 1所述的方法, 其特征在于, 进一步包括: 所述复杂块中的前一行所有像素完成校色处理后, 将所有像素的 颜色分量值和校色处理结果进行存储; 将前一行所有像素与后一行对应位置的像素的各种颜色分量值进 行比较;
如果相同, 将存储的前一行所有对应位置的像素的校色处理结果 复制到后一行对应位置的像素上。
8、 如权利要求 1所述的方法, 其特征在于, 进一步包括: 所述复杂块中的前一列所有像素完成校色处理后, 将所有像素的 颜色分量值和校色处理结果进行存储;
将前一列所有像素与后一列对应位置的像素的各种颜色分量值进 行比较;
如果相同, 将存储的前一列所有对应位置的像素的校色处理结果 复制到后一列对应位置的像素上。
9、 一种校色的装置, 其特征在于, 包括切分单元、 判断单元、 处 理单元和存储单元, 其中:
切分单元, 用于将图像切分成图像块, 并把图像块的数据发送给 判断单元和处理单元;
判断单元, 用于判断图像块中所有像素之间的各种颜色分量值是 否相同, 还用于判断复杂块中后一个像素的颜色分量值与存储单元存 储的前一个像素颜色分量值是否相同;
处理单元, 用于对像素进行校色处理, 并把校色结果存储在存储 单元;
存储单元, 用于存储对像素进行校色的校色结果, 并发送给判断 单元。
10、 如权利要求 9所述的装置, 其特征在于, 切分单元还用于将 相邻的图像块进行合并, 形成新的图像块。
PCT/CN2010/000303 2009-03-12 2010-03-12 一种校色的方法和装置 WO2010102519A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2011553261A JP5710507B2 (ja) 2009-03-12 2010-03-12 色補正のための方法及びデバイス
US13/255,954 US8538146B2 (en) 2009-03-12 2010-03-12 Method and device for color correction
EP10750315.3A EP2408188B1 (en) 2009-03-12 2010-03-12 Method and device for color correction

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2009100798364A CN101527779B (zh) 2009-03-12 2009-03-12 一种校色的方法和装置
CN200910079836.4 2009-03-12

Publications (1)

Publication Number Publication Date
WO2010102519A1 true WO2010102519A1 (zh) 2010-09-16

Family

ID=41095455

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/000303 WO2010102519A1 (zh) 2009-03-12 2010-03-12 一种校色的方法和装置

Country Status (5)

Country Link
US (1) US8538146B2 (zh)
EP (1) EP2408188B1 (zh)
JP (1) JP5710507B2 (zh)
CN (1) CN101527779B (zh)
WO (1) WO2010102519A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115205710A (zh) * 2022-09-16 2022-10-18 北京理工大学 一种结合色彩校正的双时相遥感图像变化检测方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101527779B (zh) * 2009-03-12 2012-06-27 北京大学 一种校色的方法和装置
CN101729912B (zh) * 2009-11-26 2013-02-20 大地辰星科技发展(北京)有限公司 图像序列色彩空间转换的方法
CN102848747B (zh) * 2011-06-28 2015-02-25 北大方正集团有限公司 用于喷墨打印设备的再校准方法和装置
CN103903283B (zh) * 2012-12-28 2017-12-19 北京大学 一种基于颜色的数字图像内容增强提取方法
CN110837351B (zh) * 2019-11-27 2023-09-08 深圳市汉森软件有限公司 基于icc处理的纯色处理方法、装置、设备及存储介质
CN110942481B (zh) * 2019-12-13 2022-05-20 西南石油大学 一种基于图像处理的纵跳检测方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1964431A (zh) * 2005-11-07 2007-05-16 川崎微电子股份有限公司 图像数据处理装置和用于处理图像数据的方法
CN101035190A (zh) * 2006-03-09 2007-09-12 恩益禧电子股份有限公司 用于色彩校正的装置、方法和程序产品
CN101365043A (zh) * 2008-09-26 2009-02-11 北大方正集团有限公司 点阵级像素点校色方法及装置
CN101527779A (zh) * 2009-03-12 2009-09-09 北京大学 一种校色的方法和装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3176132B2 (ja) * 1992-07-28 2001-06-11 キヤノン株式会社 画像処理装置及び画像処理方法
JP2001145107A (ja) * 1999-11-12 2001-05-25 Seiko Epson Corp Dctを用いた信号処理装置及画像圧縮装置
JP3689620B2 (ja) * 2000-08-31 2005-08-31 キヤノン株式会社 画像処理装置およびその方法
JP2002218261A (ja) * 2001-01-23 2002-08-02 Minolta Co Ltd 画像情報伝送方法、画像情報作成装置、画像情報出力装置、画像情報作成プログラム、画像情報出力プログラム、これらのプログラムを記録した記録媒体及び画像情報伝送システム
US7860339B2 (en) * 2003-09-11 2010-12-28 Panasonic Corporation Visual processing device, visual processing method, visual processing program, intergrated circuit, display device, image-capturing device, and portable information terminal
JP2005173926A (ja) * 2003-12-10 2005-06-30 Canon Inc 画像処理装置、方法、プログラム及び記憶媒体
US7343046B2 (en) * 2004-02-12 2008-03-11 Xerox Corporation Systems and methods for organizing image data into regions
TWI240067B (en) * 2004-04-06 2005-09-21 Sunplus Technology Co Ltd Rapid color recognition method
JP4623301B2 (ja) * 2005-12-17 2011-02-02 富士ゼロックス株式会社 画像処理装置、画像処理プログラム
JP4197346B2 (ja) * 2006-04-18 2008-12-17 シャープ株式会社 画像処理装置、画像処理方法、画像形成装置、画像処理プログラムおよび記録媒体
JP4761566B2 (ja) * 2006-12-13 2011-08-31 キヤノン株式会社 画像処理装置及びその方法とプログラム及び媒体

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1964431A (zh) * 2005-11-07 2007-05-16 川崎微电子股份有限公司 图像数据处理装置和用于处理图像数据的方法
CN101035190A (zh) * 2006-03-09 2007-09-12 恩益禧电子股份有限公司 用于色彩校正的装置、方法和程序产品
CN101365043A (zh) * 2008-09-26 2009-02-11 北大方正集团有限公司 点阵级像素点校色方法及装置
CN101527779A (zh) * 2009-03-12 2009-09-09 北京大学 一种校色的方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115205710A (zh) * 2022-09-16 2022-10-18 北京理工大学 一种结合色彩校正的双时相遥感图像变化检测方法
CN115205710B (zh) * 2022-09-16 2022-12-09 北京理工大学 一种结合色彩校正的双时相遥感图像变化检测方法

Also Published As

Publication number Publication date
CN101527779A (zh) 2009-09-09
US20120099789A1 (en) 2012-04-26
EP2408188A1 (en) 2012-01-18
EP2408188A4 (en) 2012-11-28
JP2012520038A (ja) 2012-08-30
US8538146B2 (en) 2013-09-17
CN101527779B (zh) 2012-06-27
EP2408188B1 (en) 2015-09-30
JP5710507B2 (ja) 2015-04-30

Similar Documents

Publication Publication Date Title
WO2010102519A1 (zh) 一种校色的方法和装置
US9001383B2 (en) Image processing apparatus which performs image processing for correcting misregistration, control method of image processing apparatus, and storage medium
US9773319B2 (en) Image processing apparatus, method, and medium
JP2003283854A (ja) 補正テーブルを用いたカラー画像データの補正方法
JP4945361B2 (ja) 画像処理方法及びその装置、並びにcpu読取可能な記録媒体
US8570627B2 (en) Image processing apparatus for data compression, control method, and computer-readable medium
US20070223043A1 (en) Image data processing device and image data processing method
JP4078132B2 (ja) 画像処理装置及びその方法
JP3762267B2 (ja) 画像処理装置及びその方法
JP2010035112A (ja) 画像処理装置および画像処理方法
JP2011025658A (ja) 画像形成装置及び画像形成方法
US20120236337A1 (en) Image processing apparatus
US8264730B2 (en) Image processing apparatus and image forming apparatus
JP6821418B2 (ja) 画像処理装置、画像処理方法、及びプログラム
JP2006211351A (ja) 画像処理方法および画像処理装置
US9396418B2 (en) Information processing apparatus, information processing method, and storage medium for processing an image and a pattern included in an XOR-and-XOR rendering command set
US10277781B2 (en) Image processing apparatus, image forming apparatus, and non-transitory computer readable medium
JP3700453B2 (ja) 画像処理装置、及び画像処理方法
JP4581775B2 (ja) 印刷装置
US20120121201A1 (en) Image processing apparatus and image processing method
JP6896413B2 (ja) 画像処理装置、画像処理方法、及びプログラム
JP2011101207A (ja) 色変換方法、及び色変換装置
JP4961310B2 (ja) 画像処理装置及び画像形成装置
JP2006100997A (ja) 画像処理装置及び方法
JP2007124230A (ja) 画像形成装置、色変換装置、及び色変換ルックアップテーブルの作成方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10750315

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2011553261

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 2010750315

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 13255954

Country of ref document: US