JP2011142471A - Image processing apparatus, control method, and program - Google Patents

Image processing apparatus, control method, and program Download PDF

Info

Publication number
JP2011142471A
JP2011142471A JP2010001569A JP2010001569A JP2011142471A JP 2011142471 A JP2011142471 A JP 2011142471A JP 2010001569 A JP2010001569 A JP 2010001569A JP 2010001569 A JP2010001569 A JP 2010001569A JP 2011142471 A JP2011142471 A JP 2011142471A
Authority
JP
Japan
Prior art keywords
color
tile
class
representative color
representative
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2010001569A
Other languages
Japanese (ja)
Other versions
JP5337060B2 (en
Inventor
Taeko Yamazaki
妙子 山▲崎▼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2010001569A priority Critical patent/JP5337060B2/en
Publication of JP2011142471A publication Critical patent/JP2011142471A/en
Application granted granted Critical
Publication of JP5337060B2 publication Critical patent/JP5337060B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To obtain high accuracy with simple processing concerning, especially, representative color determination in color reduction processing by tile unit in a color image including a halftone dot area. <P>SOLUTION: An image processing apparatus includes: a tile dividing means for dividing input image data into a regulated size of tiles; a color frequency distribution generating means for generating the color frequency distributions of pixels included in the divided tiles by each divided tile; a position information imparting means for imparting position information of the pixels in the tiles to each class of the generated color frequency distributions; a representative color selecting means for selecting representative colors in the tiles; and a color replacing means for replacing the color information of the pixels of the tiles with the representative colors selected by the representative color selecting means. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像処理装置、制御方法、及びプログラムに関する。特に、カラー画像の減色画像処理方法に関する。   The present invention relates to an image processing apparatus, a control method, and a program. In particular, the present invention relates to a color-reduced color image processing method.

近年、情報の電子化が進み、紙文書をそのまま保存するのではなく、スキャナ等によりスキャンして電子化して保存したり、その電子データを他装置に送信するシステムが普及している。また、文書データそのものに使われる色も白黒2値からカラー化(多値化)が進んでいる。電子文書データには可読性向上や高圧縮性を実現させるために文字部は鮮明であり、背景部は均一な色が求められている。   In recent years, the digitization of information has progressed, and a system that scans with a scanner or the like for digitization and stores the data, or transmits the electronic data to another apparatus has been widespread, instead of storing a paper document as it is. Also, the color used for the document data itself has been changed from black and white to color (multi-value). Electronic document data is required to have a clear character portion and a uniform color in the background portion in order to achieve improved readability and high compressibility.

しかし、実際に紙文書を電子化する際には各種のノイズやにじみ、むらが発生する。特に網点で構成されたカラー文書では、網点の構成点そのものの色に起因したむらやにじみが発生し、可読性や画質に影響を及ぼす。このため、画像中から代表色を選定し、減色する処理が行われている。   However, when a paper document is actually digitized, various noises, blurs, and unevenness occur. In particular, in a color document composed of halftone dots, unevenness and blurring due to the colors of the halftone dots themselves occur, which affects readability and image quality. For this reason, a process of selecting a representative color from the image and reducing the color is performed.

スキャン画像の減色処理は一般的にスキャナや複合機などの機器に組み込み、リアルタイムで稼働させることが想定される。よって、減色処理には高精度もさることながら、省メモリ化が求められる。このため、特許文献1には、入力画像を複数のブロックに分割し、ブロック単位で色置換を行う技術が開示されている。特許文献2では、タイル単位で濃度ヒストグラムを算出し、分散が小さい場合は1色ブロックと判定する。そうでないならば、前景色側と後景色側の分散比が最大となるように閾値を設定し、前景色背景色を分ける。それぞれの分散値が小さければ2色ブロック、そうでなければ多色ブロックと判定してそれぞれに合った符号化処理を行っている。   In general, it is assumed that the color reduction processing of a scanned image is incorporated in a device such as a scanner or a multifunction peripheral and is operated in real time. Therefore, memory saving is required for the color reduction processing as well as high accuracy. For this reason, Patent Document 1 discloses a technique for dividing an input image into a plurality of blocks and performing color replacement in units of blocks. In Patent Document 2, a density histogram is calculated for each tile, and when the variance is small, it is determined as a one-color block. Otherwise, a threshold is set so that the variance ratio between the foreground color side and the foreground color side is maximized, and the foreground color and background color are separated. If each variance value is small, it is determined that the block is a two-color block, and if not, a multi-color block is determined.

国際公開WO2006/066325号公報International Publication No. WO2006 / 066325 特開2004−336211号公報JP 2004-336221 A

入力画像をタイル分割すると、文字などの一部がタイル端でちぎれてしまい、タイル内でごく小さく存在する例が多い。特許文献1では、ヒストグラムを生成、色量子化処理をし、量子化領域の形状や発生位置を見てノイズか残すべき色かを判定し、再度ヒストグラムを作って量子化処理を行う。つまり、計算量の多いヒストグラム計算を2回行うため、計算コストが高くなってしまう。   When an input image is divided into tiles, there are many examples in which a part of characters or the like is torn off at the edge of the tile and exists very small in the tile. In Patent Document 1, a histogram is generated, color quantization processing is performed, the shape of the quantization area and the generation position are determined to determine whether noise or a color should be left, and a histogram is generated again to perform quantization processing. That is, since the histogram calculation with a large calculation amount is performed twice, the calculation cost becomes high.

また、文字端が存在するヒストグラムは図3(C)のように、分散が小さい可能性が高く、特許文献2では1色ブロックに分類され、残すべき文字領域の色を残すことができない。タイル単位の減色処理は、ページ全体から見れば同じ色領域であっても、網点の構成点のばらつきや領域境界の滲みの色によって、タイルの代表色がタイル間で微妙に色が異なるケースがある(図3(B))。   In addition, as shown in FIG. 3C, a histogram having character ends is highly likely to have a small variance, and is classified as one color block in Patent Document 2, and cannot leave the color of the character region to be left. The color reduction processing for each tile is a case where the representative color of the tiles is slightly different between tiles due to variations in the composition points of the halftone dots and the blurring color of the boundary of the area even if the color area is the same as viewed from the entire page. (FIG. 3B).

特許文献1では、タイル間の色むらを低減するために、処理対象の近隣にあるタイルの代表色を参照している。しかし、本形態は組み込み機器を想定しているため、該当タイルに隣接するタイルの色情報やページ全体の背景情報はメモリの制限で参照できない可能性が高い。よって、本発明は網点領域を含むカラー画像の減色処理、特に代表色決定において、高精度と省メモリ化の両立の実現を目的とする。   In Patent Document 1, in order to reduce color unevenness between tiles, the representative colors of tiles in the vicinity of the processing target are referred to. However, since this embodiment assumes an embedded device, there is a high possibility that the color information of the tile adjacent to the tile and the background information of the entire page cannot be referred to due to memory limitations. Accordingly, an object of the present invention is to realize both high accuracy and memory saving in color reduction processing of a color image including a halftone dot region, particularly in representative color determination.

上記課題を解決するため、本発明は、以下の構成を有する。入力画像データを規定の大きさのタイルに分割するタイル分割手段と、前記分割したタイルごとに当該分割したタイルに含まれる画素の色頻度分布を生成する色頻度分布生成手段と、前記生成された色頻度分布の各階級に対し、当該各階級に属する当該タイルにおける画素の位置情報を付与する位置情報付与手段と、当該タイルにおける代表色を選定する代表色選定手段と、前記代表色選定手段で選定された代表色により、当該タイルの画素の色情報を置換する色置換手段とを有し、前記代表色選定手段は、前記色頻度分布の階級における前記位置情報を用いて当該画素が有する色情報の中から代表色候補を判定する必要極小領域色判定手段と、前記色頻度分布の階級における前記位置情報を用いて前記代表色候補である階級の色情報を統合し当該代表色を決定する階級色情報統合手段とを有する。   In order to solve the above problems, the present invention has the following configuration. A tile dividing unit that divides input image data into tiles of a predetermined size, a color frequency distribution generating unit that generates a color frequency distribution of pixels included in the divided tiles for each of the divided tiles, and the generated For each class of the color frequency distribution, a position information providing unit that provides pixel position information in the tile belonging to each class, a representative color selecting unit that selects a representative color in the tile, and the representative color selecting unit Color replacement means for replacing the color information of the pixel of the tile by the selected representative color, and the representative color selection means uses the position information in the class of the color frequency distribution and the color of the pixel Necessary minimum area color determination means for determining representative color candidates from the information and the color information of the class that is the representative color candidate are integrated using the position information in the color frequency distribution class And a class color information integrating means for determining the representative color.

また、本発明の画像処理装置は、入力画像データを規定の大きさのタイルに分割するタイル分割手段と、前記分割したタイルごとに当該分割したタイルに含まれる画素の色頻度分布を生成する色頻度分布生成手段と、前記生成された色頻度分布の各階級に対し、当該各階級に属する当該タイルにおける画素の位置情報を付与する位置情報付与手段と、前記生成された色頻度分布と前記付与された位置情報とに基づいて、当該タイルにおける代表色を選定する代表色選定手段と、前記代表色選定手段で選定された代表色により、当該タイルの画素の色情報を置換する色置換手段とを有する。   The image processing apparatus of the present invention also includes a tile dividing unit that divides input image data into tiles of a predetermined size, and a color that generates a color frequency distribution of pixels included in the divided tiles for each of the divided tiles. A frequency distribution generating unit; a position information adding unit that adds position information of a pixel in the tile belonging to each class to each class of the generated color frequency distribution; the generated color frequency distribution and the adding A representative color selecting means for selecting a representative color in the tile based on the position information, and a color replacing means for replacing the color information of the pixel of the tile with the representative color selected by the representative color selecting means; Have

本発明によれば、本発明は網点領域を含むカラー画像の減色処理、特に代表色決定において、高精度と省メモリ化が両立できる。具体的には、ヒストグラム上では頻度が低い色であっても代表色にすべき色かの判定を簡単に精度よく実現できる。また、減色後のタイル間の色むらを低減させることが可能になる。   According to the present invention, the present invention can achieve both high accuracy and memory saving in color-reduction processing of a color image including a halftone dot region, particularly in representative color determination. Specifically, even if the frequency is low on the histogram, it can be easily and accurately determined whether the color should be the representative color. In addition, it is possible to reduce color unevenness between tiles after color reduction.

本発明に係るシステムの装置構成の例図。The example figure of the apparatus configuration of the system concerning the present invention. 本実施形態に係る画像処理装置の機能構成を示すブロック図。1 is a block diagram showing a functional configuration of an image processing apparatus according to the present embodiment. 本実施形態に係る画像データを説明するための図。The figure for demonstrating the image data which concern on this embodiment. 本実施形態に係る色量子化部の機能構成を示すブロック図。FIG. 3 is a block diagram showing a functional configuration of a color quantization unit according to the present embodiment. 本実施形態に係るヒストグラム生成部のフローチャートの図。The figure of the flowchart of the histogram generation part which concerns on this embodiment. 本実施形態に係るヒストグラム生成部で扱うデータ構造の一例を示す図。The figure which shows an example of the data structure handled by the histogram production | generation part which concerns on this embodiment. 本実施形態に係る色空間分割を説明するための例図。FIG. 4 is an exemplary diagram for explaining color space division according to the embodiment. 本実施形態に係るヒストグラムを説明するための図式例。The example of a figure for explaining the histogram concerning this embodiment. 本実施形態に係るエリアコードを説明するための図。The figure for demonstrating the area code which concerns on this embodiment. 本実施形態に係る代表色選定部のフローチャートの図。The figure of the flowchart of the representative color selection part which concerns on this embodiment. 本実施形態に係る代表色候補階級決定の一手法(method3)のフローチャートの図。The figure of the flowchart of one method (method3) of representative color candidate class determination concerning this embodiment. 本実施形態に係る代表色情報決定のフローチャートの図。The figure of the flowchart of representative color information determination concerning this embodiment.

<第一の実施形態>
図1は、本発明の第一の実施形態に係るシステムの装置構成図である。画像処理装置100は本発明を実現するための構成を有する。画像処理装置100は、読み取った文書の紙面情報を画像データに変換するスキャナ101と、画像データに本発明の処理を施すためのプログラムを実行するCPU102とを有する。また、画像処理装置100は、プログラムを実行する際のワークメモリやデータの一時保存等に利用されるメモリ103と、プログラムやデータを格納するハードディスク104と、外部装置とデータの入出力を行うためのネットワークI/F105とを有する。パーソナルコンピュータ(以下、PCと言う)120は、画像処理装置100とLAN110等のネットワークで接続され、画像処理装置100から送信されたデータを受信する。
<First embodiment>
FIG. 1 is an apparatus configuration diagram of a system according to the first embodiment of the present invention. The image processing apparatus 100 has a configuration for realizing the present invention. The image processing apparatus 100 includes a scanner 101 that converts page information of a read document into image data, and a CPU 102 that executes a program for performing processing of the present invention on the image data. In addition, the image processing apparatus 100 inputs and outputs data to and from a work memory when executing a program, a memory 103 used for temporary storage of data, a hard disk 104 that stores programs and data, and an external device. Network I / F 105. A personal computer (hereinafter referred to as a PC) 120 is connected to the image processing apparatus 100 via a network such as a LAN 110 and receives data transmitted from the image processing apparatus 100.

図2は、第一の実施形態に係る画像処理装置100の機能的構成を示すブロック図である。なお、ここで示す各処理は、CPU102で電子ドキュメント生成プログラムを実行することによって実現されるものとするが、その一部又は全部を電気回路で構成し制御するようにしても構わない。画像201はスキャナ101により入力される。本実施形態では図3(A)の(1)で示すような画像が入力されたものとして説明を続ける。色量子化部202は画像201からスキャンノイズや網点をなくすために減色処理を施す。解析部203は減色した画像を解析し、文字や背景などその後の処理に必要な属性を付与する。解析結果204は203解析部の出力物である。解析結果204はその後、CPU102上、もしくはPC120上で引き続き実行される電子ドキュメント生成プログラムによって電子ファイル化される。   FIG. 2 is a block diagram illustrating a functional configuration of the image processing apparatus 100 according to the first embodiment. Each process shown here is realized by executing an electronic document generation program by the CPU 102, but a part or all of it may be configured and controlled by an electric circuit. The image 201 is input by the scanner 101. In this embodiment, the description will be continued assuming that an image as shown in (1) of FIG. The color quantization unit 202 performs a color reduction process to eliminate scan noise and halftone dots from the image 201. The analysis unit 203 analyzes the reduced color image and assigns attributes necessary for subsequent processing such as characters and background. The analysis result 204 is an output product of the 203 analysis unit. The analysis result 204 is then converted into an electronic file by an electronic document generation program that is continuously executed on the CPU 102 or the PC 120.

本発明の主たる構成となる色量子化部202の詳細な説明を続ける。図4は色量子化部202の機能構成を示すブロック図である。タイル分割部401は入力画像データを規定のサイズの画像(タイル)に分割し、タイル402はタイル分割部401の出力物である。例えば、入力された文書画像データを、タイル状に、32画素×32画素サイズ毎の画像(タイル)に分割していく。色量子化部202では、タイル分割部401で分割されたタイル402をひとつづつ処理していく。例えば、図3(A)の(1)で示す背景部が網点領域で前景に文字がある入力画像があった場合、タイル分割部401において図3(A)の(2)のタイル301〜304のように分割され、それぞれのタイルごとにその後の処理に遷移する。平滑化部403は、タイル分割部401で分割された入力画像データのタイル402に対し平滑化処理を行い、平滑化する。平滑化の目的は、代表色選定に網点構成点そのものの色の影響を低減させるためであり、本発明の構成において必須の処理ではない。そのため、網点構成点をつぶす手法であればなんでもよく、公知の平滑化フィルタのいずれかを用いることができる。本実施形態では平均化フィルタを使って、低解像度変換を行うものとする。低解像度変換をすると、ヒストグラム生成対象のタイルの画素数を減らせるため、結果的にヒストグラム生成処理の負荷が軽くなる効果もある。例えば、32×32画素サイズのタイルを低解像度変換することで平滑化し、16×16画素サイズの平滑化タイルを生成する。   The detailed description of the color quantization unit 202 which is the main configuration of the present invention will be continued. FIG. 4 is a block diagram showing a functional configuration of the color quantization unit 202. A tile division unit 401 divides input image data into images (tiles) of a prescribed size, and a tile 402 is an output product of the tile division unit 401. For example, the input document image data is divided into images (tiles) each having a size of 32 pixels × 32 pixels in a tile shape. The color quantization unit 202 processes the tiles 402 divided by the tile dividing unit 401 one by one. For example, when there is an input image in which the background portion indicated by (1) in FIG. 3A is a halftone dot region and characters are in the foreground, the tile dividing unit 401 uses tiles 301 to (2) in FIG. It divides like 304, and it changes to subsequent processing for every tile. The smoothing unit 403 performs a smoothing process on the tiles 402 of the input image data divided by the tile dividing unit 401 to perform smoothing. The purpose of smoothing is to reduce the influence of the color of the halftone dot composing point itself on the representative color selection, and is not an essential process in the configuration of the present invention. Therefore, any method for crushing halftone dot composing points may be used, and any of known smoothing filters can be used. In this embodiment, it is assumed that low resolution conversion is performed using an averaging filter. When the low-resolution conversion is performed, the number of pixels of the tile for which the histogram is to be generated can be reduced, resulting in an effect of reducing the load of the histogram generation process. For example, a 32 × 32 pixel size tile is smoothed by low-resolution conversion to generate a 16 × 16 pixel size smoothed tile.

ヒストグラム生成部408は、平滑化タイル404を入力とし、ヒストグラムを生成する。ヒストグラム生成部408は、色空間分割部405、色頻度分布生成部406、位置情報付与部407から構成される。ヒストグラム生成部408の詳細は後ほど説明する。代表色選定部409は、先に生成したヒストグラムからタイル内の代表色の数、および代表色の色情報を決定する。代表色選定部409の詳細は後ほど説明する。代表色情報410についても後ほど説明する。   The histogram generation unit 408 receives the smoothing tile 404 as an input and generates a histogram. The histogram generation unit 408 includes a color space division unit 405, a color frequency distribution generation unit 406, and a position information addition unit 407. Details of the histogram generation unit 408 will be described later. The representative color selection unit 409 determines the number of representative colors in the tile and the color information of the representative colors from the previously generated histogram. Details of the representative color selection unit 409 will be described later. The representative color information 410 will be described later.

色置換部411は、入力されたタイル402の画素単位の色情報と代表色選定部409で求めた代表色情報410との色間距離を求め、入力画像データと最も距離が近い代表色に色を置換する量子化処理を行う。この結果、量子化タイル412が生成される。なお、色置換の対象に平滑化前の入力タイルを用いるのは、小さい文字の欠けやつぶれを防ぐためである。本発明では、注目画素と代表色のRGB空間のユークリッド距離を計算しているが、色空間、距離算出方法はこれに限られるものではない。また、のちに詳細を説明する階級の位置情報を用いてもよい。   The color replacement unit 411 obtains an inter-color distance between the input color information of the tile 402 in units of pixels and the representative color information 410 obtained by the representative color selection unit 409, and changes the color to the representative color closest to the input image data. Quantization processing for replacing. As a result, a quantized tile 412 is generated. The reason why the input tile before smoothing is used for color replacement is to prevent small characters from being lost or crushed. In the present invention, the Euclidean distance between the pixel of interest and the RGB space of the representative color is calculated, but the color space and the distance calculation method are not limited to this. Further, class position information that will be described in detail later may be used.

本発明で解決される代表色選定方法では、タイル端の微小領域の色情報が代表色として選択が可能になるが、タイル中の代表色同士の色の差があまり大きくない場合が想定される。そこで、置換する画素の位置と代表色の位置情報を参照し、置換対象となる画素位置が包含されている領域の代表色と置換することで、色の置き換えエラーの低減が可能となる。以上、色量子化部202の機能構成を説明した。   In the representative color selection method solved by the present invention, the color information of the minute area at the edge of the tile can be selected as the representative color, but it is assumed that the color difference between the representative colors in the tile is not so large. . Therefore, by referring to the position information of the pixel to be replaced and the position information of the representative color and replacing the representative color in the area including the pixel position to be replaced, the color replacement error can be reduced. The functional configuration of the color quantization unit 202 has been described above.

続いて、本発明の特徴となる、ヒストグラム生成部408および、代表色選定部409について詳細を説明する。はじめに、ヒストグラム生成部408について詳細を説明する。図5はヒストグラム生成部408のフローチャートである。なお、図5における色空間分割部405に該当するステップは、S4081となる。同じく、色頻度分布生成部406に該当するステップはS4082〜S4086,S4088,S4089であり、位置情報付与部407に該当するステップはS4087となる。   Next, details of the histogram generation unit 408 and the representative color selection unit 409, which are features of the present invention, will be described. First, details of the histogram generation unit 408 will be described. FIG. 5 is a flowchart of the histogram generation unit 408. Note that the step corresponding to the color space dividing unit 405 in FIG. 5 is S4081. Similarly, steps corresponding to the color frequency distribution generation unit 406 are S4082 to S4086, S4088, and S4089, and a step corresponding to the position information addition unit 407 is S4087.

図6はヒストグラム生成部408で扱うデータ構造の例である。図6(A)はヒストグラム中の階級のデータ構造例である。階級には画素数、平均色情報、位置情報がそれぞれ格納される。図6(B)はヒストグラムのデータ構造例である。ヒストグラムは先に述べた階級の配列構造となっている。配列の数は色空間分割部405で分割された数の分だけ存在する。以下、ヒストグラム生成部408について、図5を用いてフローチャートの処理順に説明する。S4081で、各ヒストグラムの階級のレベルを設定する。これは色空間分割部405の機能に該当する。本実施形態では一般的なカラー画像を入力と想定し、色空間分割および色頻度分布生成を行った場合について説明するが、入力はグレー画像でもよい。つまり、本実施形態で説明する色が意図する意味は、RGB値に相当するものの他に、グレースケールにも対応することを明示しておく。本実施形態では、YUV色空間の輝度YとHSV色空間の色相Hを用いたY/HS色空間を分割してヒストグラムの各階級に対応する色情報のレベルを設定する。なお、本実施形態では、Y/HS色空間を分割して複数の階級を設定するが、使用する色空間はY/HS色空間に限定するものではない。   FIG. 6 shows an example of the data structure handled by the histogram generation unit 408. FIG. 6A shows an example of a class data structure in the histogram. The number of pixels, average color information, and position information are stored in each class. FIG. 6B shows an example of the data structure of the histogram. The histogram has the above-mentioned class arrangement structure. There are as many arrays as the number divided by the color space dividing unit 405. Hereinafter, the histogram generation unit 408 will be described with reference to FIG. In step S4081, the class level of each histogram is set. This corresponds to the function of the color space dividing unit 405. In this embodiment, a case where a general color image is assumed to be input and color space division and color frequency distribution generation are performed will be described. However, the input may be a gray image. In other words, it is clearly stated that the meanings intended by the colors described in this embodiment correspond to gray scales in addition to those corresponding to RGB values. In this embodiment, the Y / HS color space using the luminance Y in the YUV color space and the hue H in the HSV color space is divided to set the level of color information corresponding to each class of the histogram. In the present embodiment, the Y / HS color space is divided to set a plurality of classes, but the color space to be used is not limited to the Y / HS color space.

まず、色相Hのレベル設定について説明する。HSV色空間は図7のような円錐形をしている。半径方向は、彩度Sであり、円柱の原点に近いほうが無彩色に近く、遠い方が有彩色になる。円柱の外周角は色相を表しており、赤、マゼンタ、青、シアン、緑、黄色、橙のように0〜360度の値で色を示す。明度Vは上底から下底へ向かう方向で色が暗くなる。色相方向は、色相環における中心部H0を無彩色部と、色相環上を任意の角度で分割した領域を有彩色部(H1〜H4)の分割したレベルを設定する。   First, the setting of the hue H level will be described. The HSV color space has a conical shape as shown in FIG. The radial direction is saturation S, and the closer to the origin of the cylinder, the closer to the achromatic color, and the farther, the chromatic color. The outer peripheral angle of the cylinder represents a hue, and indicates a color with a value of 0 to 360 degrees such as red, magenta, blue, cyan, green, yellow, and orange. The brightness V becomes darker in the direction from the upper base to the lower base. The hue direction is set to a level obtained by dividing the central portion H0 in the hue circle by the achromatic color portion and a region obtained by dividing the hue circle at an arbitrary angle by the chromatic color portions (H1 to H4).

次に、輝度Yのレベル設定について説明する。輝度値Yは一次元の線形であるため、単純に画素の輝度値を規定した分割数で割ればよい。本実施形態では輝度方向を8分割している。なお、HSV色空間の明度Vより、YUV色空間の輝度Yの方がより人間の目から見た場合の明るさに近い。このため、色の明るさの情報についてはYUV色空間のYを用いた。よって、以下で述べる図8のヒストグラムでは、色相Hと輝度Yとの関係となっている。   Next, the level setting of the luminance Y will be described. Since the luminance value Y is one-dimensional linear, it is sufficient to simply divide the luminance value of the pixel by the prescribed number of divisions. In this embodiment, the luminance direction is divided into eight. Note that the luminance Y in the YUV color space is closer to the brightness when viewed from the human eye than the brightness V in the HSV color space. For this reason, Y in the YUV color space is used for information on color brightness. Therefore, in the histogram of FIG. 8 described below, there is a relationship between the hue H and the luminance Y.

図8はS4081で設定されるヒストグラムの構造を可視化したものである。このようなヒストグラムをタイル毎に生成し、次工程である代表色選定部409へ遷移する。S4082は後に述べるS4083〜S4087の処理を平滑化タイル内のすべての画素分繰り返すことを意味している。S4083で、平滑化タイルから1画素(以下P_dsと呼ぶ)を取得する。S4084で、P_dsの色情報を取得し、輝度値と色相から、色空間分割部405で分割した色空間中の輝度レベルおよび色相レベルのどこに対応するか、つまり、色頻度分布上ではどの階級に加算すべきかを判定する。S4085で、S4084で判定した輝度レベルおよび色相レベルに該当する色頻度分布の階級を呼び出し、この階級に格納されている画素数を1加算する。   FIG. 8 is a visualization of the histogram structure set in S4081. Such a histogram is generated for each tile, and the process proceeds to the representative color selection unit 409, which is the next process. S4082 means that the processing of S4083 to S4087 described later is repeated for all the pixels in the smoothing tile. In S4083, one pixel (hereinafter referred to as P_ds) is acquired from the smoothed tile. In S4084, P_ds color information is acquired, and from the luminance value and hue, the luminance level and hue level in the color space divided by the color space dividing unit 405 correspond to, that is, in which class on the color frequency distribution. Determine whether to add. In S4085, the class of the color frequency distribution corresponding to the luminance level and hue level determined in S4084 is called, and 1 is added to the number of pixels stored in this class.

S4086で、該当する階級の色情報にP_dsの色情報を加算する。S4087で、P_dsの画素位置をもとに該当する階級の位置情報を更新する。画素位置の座標情報をそのまま階級の位置情報として保持させると、メモリサイズが大きくなってしまう。そのため、本実施形態において、位置情報は16ビットのエリアコードで表す。これは、図8にて可視化したヒストグラムにおいては、Locationの情報に保持される。   In S4086, the color information of P_ds is added to the color information of the corresponding class. In S4087, the position information of the corresponding class is updated based on the pixel position of P_ds. If the coordinate information of the pixel position is retained as the position information of the class as it is, the memory size becomes large. Therefore, in this embodiment, the position information is represented by a 16-bit area code. This is stored in the location information in the histogram visualized in FIG.

エリアコードの詳細について、図9を用いて説明する。図9(A)はタイル上でのエリアコードの設定範囲を図示したものである。Nは平滑化タイルの一辺の画素数を表し、それぞれ図示したようにタイルを分割してある(エリア901〜916)。本実施形態では、ヒストグラムの処理対象タイルのサイズをNとすると、タイル境界部をタイル端からN/8に設定し、さらにタイル中央部を4等分した16の領域を設定している。つまり、ここではタイル境界部とはエリア901〜905、908、909、912〜916であり、タイル中央部とはエリア906〜911である。例えば、16×16画素サイズの平滑化タイルを対象にした場合、縦方向と横方向それぞれを2:6:6:2の画素比率で分割したエリアが設定される。   Details of the area code will be described with reference to FIG. FIG. 9A illustrates the area code setting range on the tile. N represents the number of pixels on one side of the smoothing tile, and each tile is divided as shown in the figure (areas 901 to 916). In the present embodiment, assuming that the size of the processing target tile of the histogram is N, the tile boundary portion is set to N / 8 from the tile end, and 16 regions obtained by dividing the tile central portion into four equal portions are set. That is, here, the tile boundary portions are the areas 901 to 905, 908, 909, and 912 to 916, and the tile central portion is the areas 906 to 911. For example, when a smoothing tile having a size of 16 × 16 pixels is targeted, an area obtained by dividing the vertical direction and the horizontal direction at a pixel ratio of 2: 6: 6: 2 is set.

なお各エリアのサイズが異なっているのは、文字などの一部がタイル分割で分断されタイル内でごく小さく存在する極小領域に対する扱いを考慮するためである。そのため少なくとも、タイル境界部とタイル中央部が定義されればよく、分割する領域の範囲(サイズ)はこれに限らない。例えばタイルを均等に16分割したうちのタイル境界線に接する部分をタイル境界部、それ以外をタイル中央部と設定してもよい。同じく、図9(A)ではタイル境界部とタイル中央部は複数の領域から構成されているが、分割する領域の数はこれに限定されるわけではなく、例えばタイル境界部とタイル中央部がそれぞれ1つの領域(計2つの領域)として定義してもいい。   Note that the size of each area is different in order to consider the handling of a very small area in which a part of a character or the like is divided by tile division and exists very small in the tile. Therefore, at least the tile boundary and the tile center need only be defined, and the range (size) of the area to be divided is not limited to this. For example, a portion in contact with a tile boundary line among 16 equally divided tiles may be set as a tile boundary portion, and the other portion may be set as a tile central portion. Similarly, in FIG. 9A, the tile boundary part and the tile center part are composed of a plurality of areas, but the number of areas to be divided is not limited to this, for example, the tile boundary part and the tile center part are Each may be defined as one area (two areas in total).

図9(B)にて示したように図9(A)にて定義したエリアそれぞれに対応したLocation情報を16ビットのエリアコードにて定義する。ここでは、16ビットのうちそれぞれ4ビットごとに、MIDDLE AREA、TOP/BOTTOM ENDS、RIGHT/LEFT ENDS、CORNERと定義する。そして、MIDDLE AREAは図9(A)におけるエリア906、907、910、911にそれぞれ対応する。同様にTOP/BOTTOM ENDSはエリア902、903、914、915と、RIGHT/LEFT ENDSは905、908、909、912と、CORNERは901、904、913、916とそれぞれ対応する。   As shown in FIG. 9B, the location information corresponding to each area defined in FIG. 9A is defined by a 16-bit area code. Here, every 4 bits out of 16 bits are defined as MIDDLE AREA, TOP / BOTTOM ENDS, RIGHT / LEFT ENDS, and CORNER. MIDDLE AREA corresponds to areas 906, 907, 910, and 911 in FIG. 9A, respectively. Similarly, TOP / BOTTOM ENDS corresponds to areas 902, 903, 914, and 915, RIGHT / LEFT ENDS corresponds to 905, 908, 909, and 912, and CORNER corresponds to 901, 904, 913, and 916, respectively.

S4087では、P_dsの画素位置を参照し、図9(A)で示したエリア901〜916のうち、どのエリアに入るかを判定し、該当するエリアコードのビットを0から1に更新する。例えば、ある階級に計上されたP_dsの画素位置がエリアコード設定範囲においてエリア901に該当した場合、図9(C)のようにエリア901に対応する右から4ビット目を0から1に更新する。S4083からS4087までの処理を平滑化タイルの画素分繰り返すと(S4082)、ある階級の位置情報はたとえば図9(D)のようになる。これは、この階級に計上された画素はエリアコード設定範囲におけるエリア909,910,913,914に存在していたことを意味している。   In S4087, the pixel position of P_ds is referred to, it is determined which of the areas 901 to 916 shown in FIG. 9A enters, and the bit of the corresponding area code is updated from 0 to 1. For example, when the pixel position of P_ds recorded in a certain class corresponds to the area 901 in the area code setting range, the fourth bit from the right corresponding to the area 901 is updated from 0 to 1 as shown in FIG. . When the processing from S4083 to S4087 is repeated for the pixels of the smoothed tile (S4082), the position information of a certain class is as shown in FIG. 9D, for example. This means that the pixels included in this class existed in the areas 909, 910, 913, and 914 in the area code setting range.

S4088はS4089の処理を階級数分繰り返すことを意味している。S4089では、色頻度分布の階級にカウントされた画素の色情報の平均を求めている。具体的にはS4086で各階級に加算された色情報の総和を、各階級の画素数で除算している。本処理をすべての階級分実施する。以上の処理により、平滑化タイルから、色頻度分布(ヒストグラム)の各階級における平均色の情報、および色頻度分布の各階級毎の位置情報(エリアコード)を生成する。   S4088 means that the process of S4089 is repeated for the number of classes. In S4089, the average of the color information of the pixels counted in the color frequency distribution class is obtained. Specifically, the sum of the color information added to each class in S4086 is divided by the number of pixels of each class. Implement this process for all classes. Through the above processing, the average color information for each class of the color frequency distribution (histogram) and the position information (area code) for each class of the color frequency distribution are generated from the smoothed tile.

次に、代表色選定部409について詳細を説明する。図10は代表色選定部409のフローチャートである。S4091では、代表色を決める手法を選択する。ここでは、ヒストグラムの分布形状から、代表色の決定方法を選択する。例えば、ヒストグラムのある一階級にタイル中の画素のすべて計上されている場合はタイルを1色化する処理に遷移する(method1、第一の代表色処理手段)。また、ある一階級にタイル中の画素のうち所定の数以上(例えば、90%以上)が計上され、残りの画素も近接する階級に計上されているヒストグラムであれば、タイルの代表色は1色である可能性が高いので、タイルを1色化する処理に遷移する(method1)。   Next, details of the representative color selection unit 409 will be described. FIG. 10 is a flowchart of the representative color selection unit 409. In S4091, a method for determining a representative color is selected. Here, the representative color determination method is selected from the distribution shape of the histogram. For example, when all of the pixels in the tile are included in a certain class in the histogram, the process shifts to a process for making the tile one color (method 1, first representative color processing means). Further, if the histogram includes a predetermined number or more (for example, 90% or more) of pixels in a tile in a certain class and the remaining pixels are also recorded in a nearby class, the representative color of the tile is 1 Since there is a high possibility of being a color, the process shifts to a process for making a tile one color (method 1).

同一色相レベルのみに画素が存在するが、輝度レベル方向に極大点が複数あるヒストグラムや、異なる色相レベルの階級に画素が存在するヒストグラムは、タイル中に2色以上の色が存在している可能性が高い。よって、タイルから2色以上の複数色を代表色として選定する処理に遷移する(method2、第二の代表色処理手段)。   Pixels that exist only at the same hue level, but histograms with multiple local maxima in the luminance level direction and histograms with pixels in different hue level classes may have two or more colors in the tile. High nature. Therefore, the process shifts to processing for selecting two or more colors as representative colors from the tile (method2, second representative color processing means).

また、同一色相レベルにあるが、輝度レベル方向の分布の幅が狭い(すなわち、当該ブロック内の画素が有する輝度がいずれも近似している)ヒストグラムの場合、網点領域の色むら、もしくは残すべき極小領域の色情報が混ざっている可能性がある。よって、タイルから1〜2色の代表色を選定する処理に遷移する(method3、第三の代表色処理手段)。なお、ここでは3つの方法に分岐しているが、ヒストグラムや他の特徴量を見て、さらに適した減色手法を用意して選択してもよい。   Further, in the case of a histogram having the same hue level but a narrow distribution width in the luminance level direction (that is, the luminances of the pixels in the block are all approximated), the color unevenness of the halftone dot region is left or left. There is a possibility that the color information of the minimal region should be mixed. Therefore, the process shifts to a process of selecting one or two representative colors from the tile (method 3, third representative color processing means). Here, the method branches to three methods, but a more suitable color reduction method may be prepared and selected by looking at the histogram and other feature amounts.

S4092では、代表色候補階級を決定する。ここでは、S4091で選ばれた代表色の決定方法に対応してそれぞれ分岐する。method1では、代表色を1色に決める処理であるので、最も画素数の多い階級を代表色候補階級とする。method2では、代表色を2色以上に決める処理である。ここでは色頻度の極大点となる階級を代表色候補階級とする。なお、ここで説明した代表色候補階級決定方法はこれに限られるものではなく、一般的なヒストグラムや他の特徴量を用いた画像処理の手法であれば他の方法を用いてもよい。method3では、代表色を1色、もしくは、2色に決める処理である。処理対象のタイルが、網点領域だけ存在するのか、タイル端で切れた極小領域をもつものなのかの判定には、周辺タイルの情報を用いるのが一般的である。しかし、該当タイル以外の隣接するタイルの色情報やページ全体の背景情報はメモリサイズの関係上参照できない可能性が高い。よって、method3は処理対象タイルのヒストグラムの情報のみで代表色を1色、もしくは、2色に決める。   In S4092, the representative color candidate class is determined. Here, the branching is performed corresponding to the representative color determination method selected in S4091. Since method 1 is a process for determining one representative color, the class having the largest number of pixels is set as the representative color candidate class. Method 2 is a process for determining two or more representative colors. Here, the class having the maximum color frequency is set as the representative color candidate class. Note that the representative color candidate class determination method described here is not limited to this, and other methods may be used as long as they are image processing methods using a general histogram or other feature amounts. In method 3, the representative color is determined to be one color or two colors. In order to determine whether a tile to be processed has only a halftone dot area or a minimal area cut off at the end of the tile, information on peripheral tiles is generally used. However, there is a high possibility that the color information of adjacent tiles other than the corresponding tile and the background information of the entire page cannot be referred due to the memory size. Therefore, method 3 determines the representative color to be one color or two colors only with the histogram information of the processing target tile.

[代表色決定方法(method3)]
上記に示したmethod3の代表色決定方法の詳細について図11を用いて説明する。S40921では、ヒストグラム中最も画素数の多い階級を代表色の“候補1”とする。S40922では、画素が計数されている階級のうち、候補1の階級から輝度レベル方向で最も離れている階級を代表色の“候補2”とする。背景色と文字などの前景の色は、人の眼に見やすいように輝度差をつける傾向にある特徴を利用している。S40923では、候補2の階級の画素数が十分大きいかを判定する。ここで画素数に対する判定基準となる閾値については、予め定義しておくものとし、経験的に決定してもよいし、任意の算出式により導いてもよい。画素数が十分大きいと判定された場合はS40925へ、そうでないならばS40924へ遷移する。S40924では、候補2が残すべき色情報か否かを判定する(必要極小領域色判定)。具体的には、候補2の階級が有する位置情報を参照し、エリアコードがタイル境界部のみか否かを判定する。
[Representative color determination method (method 3)]
Details of the method 3 for determining the representative color of method 3 described above will be described with reference to FIG. In S40921, the class having the largest number of pixels in the histogram is set as “candidate 1” as the representative color. In S40922, among the classes in which the pixels are counted, the class farthest from the candidate 1 class in the luminance level direction is set as the “candidate 2” representative color. The background color and the foreground color such as characters use a feature that tends to make a difference in brightness so that it can be easily seen by human eyes. In S40923, it is determined whether the number of pixels of the candidate 2 class is sufficiently large. Here, a threshold value that is a criterion for the number of pixels is defined in advance, may be determined empirically, or may be derived from an arbitrary calculation formula. If it is determined that the number of pixels is sufficiently large, the process proceeds to S40925; otherwise, the process proceeds to S40924. In S40924, it is determined whether or not candidate 2 is color information to be left (necessary minimum region color determination). Specifically, it is determined whether or not the area code is only a tile boundary by referring to the position information of the candidate 2 class.

ここで、タイル境界部とは、図9(A)でいうと、エリア901〜905,908,909,912〜916を意味する。タイル分割で隣のタイルから一部ちぎれてしまった小さな文字領域はタイル境界部のみに存在する可能性がある。つまり、候補2の階級のエリアコードがタイル境界部のみであれば、この階級は残すべき極小領域の色とみなせる。従って、S40924でYesと判定されれば、S40925へ遷移し、候補2の階級を採用する。これに対し、画素数が小さく、エリアコードがタイル中央部のエリア906,907,910,911のいずれかに該当する場合、候補2の階級の色は網点の構成点の一部であり、残してはならない色(ノイズ)とみなせる。従って、S40924でNoと判定されれば、S40926へ遷移し、候補2の階級は代表色から却下される。以上、method1〜3により代表色候補階級が決定され、次の処理(図10、S4093)へ遷移する。   Here, the tile boundary portion means areas 901 to 905, 908, 909, and 912 to 916 in FIG. 9A. There is a possibility that a small character area partially broken from an adjacent tile by tile division exists only at the tile boundary. That is, if the area code of the candidate 2 class is only the tile boundary, this class can be regarded as the color of the minimal area to be left. Therefore, if it is determined Yes in S40924, the process proceeds to S40925, and the candidate 2 class is adopted. On the other hand, when the number of pixels is small and the area code corresponds to any of the areas 906, 907, 910, and 911 in the center of the tile, the color of the candidate 2 class is a part of the halftone dot composition point, It can be regarded as a color (noise) that should not be left behind. Therefore, if it is determined No in S40924, the process proceeds to S40926, where the candidate 2 class is rejected from the representative color. As described above, the representative color candidate classes are determined by methods 1 to 3, and the process proceeds to the next process (FIG. 10, S4093).

S4093では代表色の色情報を決定する。詳細について図12を用いて説明する。S40931はS40932〜S40934の処理を代表色候補階級分繰り返すことを意味している。S40932では、候補階級の色情報をそのまま使うか、近接する階級の色情報と統合するかを判定する(階級色情報統合判定)。具体的には、候補階級と、この階級と隣接している非候補階級とを参照し、これらの階級の位置情報が一致するかを判定する。網点の構成点の色情報は単一の階級に納まらず、近接する階級にも分布している場合がある。となると、S4092で決めた候補階級(ヒストグラムにおける最頻度階級、もしくは極大点となる階級)がタイルごとにずれを生じ、階級が有する平均色情報をそのままタイルの代表色とするとタイル間での色差が大きくなる可能性がある。   In S4093, the color information of the representative color is determined. Details will be described with reference to FIG. S40931 means that the processing of S40932 to S40934 is repeated for the representative color candidate classes. In S40932, it is determined whether the color information of the candidate class is used as it is or is integrated with the color information of the adjacent class (class color information integration determination). Specifically, the candidate class and the non-candidate class adjacent to this class are referred to, and it is determined whether the position information of these classes matches. In some cases, the color information of halftone dots is not distributed in a single class but is distributed in adjacent classes. Then, the candidate class determined in S4092 (the most frequent class in the histogram, or the class that becomes the maximum point) is shifted for each tile, and if the average color information of the class is used as the representative color of the tile as it is, the color difference between the tiles May become large.

一般的には周辺タイルやページ全体の背景の色情報を参照し、タイル間の色差を小さくする補正を行うが、本実施形態では、該当タイルのヒストグラムの情報のみで解決する。つまり、ヒストグラムから同一網点領域に存在する網点の構成点の色情報を有する階級を捜し、候補階級の色情報と統合を行う。網点の構成点の色情報を有する階級か否かを判定するには、候補階級と同じ領域にある画素が加算されたか否かを判定基準とすればよい。つまり、階級のエリアコードが同じかどうかで判定できる。従って、S40932にてエリアコードが一致する場合(Yesの場合)は、S40933へ遷移し、互いの階級の色情報を統合した色を再計算し、この色情報を代表色に採用する。統合色の算出方法は互いの階級におけるRGB値の単純平均でもよく、その階級に加算された画素数を重みとした加重平均を取ってもよい。これに対しS40932にてNo、すなわち近接する階級のエリアコードが一致しないと判定されれば、S40934へ遷移し、候補階級の色情報そのものを代表色に採用する。以上の処理により代表色情報410(図4)が決定され、次の処理の色置換部411(図4)へ遷移する。   In general, correction is performed to reduce the color difference between the tiles by referring to the color information of the background of the surrounding tiles and the entire page, but in this embodiment, the problem is solved only by the histogram information of the corresponding tiles. That is, the class having the color information of the constituent points of the halftone dots existing in the same halftone dot area is searched from the histogram, and is integrated with the color information of the candidate class. In order to determine whether or not the class has color information of the constituent points of the halftone dots, whether or not pixels in the same area as the candidate class are added may be used as a determination criterion. That is, it can be determined whether the class area codes are the same. Therefore, when the area codes match in S40932 (in the case of Yes), the process proceeds to S40933, where a color obtained by integrating the color information of each class is recalculated, and this color information is adopted as the representative color. The calculation method of the integrated color may be a simple average of RGB values in each class, or a weighted average with the number of pixels added to the class as a weight. On the other hand, if it is determined No in S40932, that is, if the area codes of the adjacent classes do not match, the process proceeds to S40934, and the color information of the candidate class itself is adopted as the representative color. The representative color information 410 (FIG. 4) is determined by the above processing, and the process proceeds to the color replacement unit 411 (FIG. 4) of the next processing.

以上、説明したように本実施形態ではヒストグラム生成時に、ヒストグラムの各階級の位置情報を付与し、代表色選定時にヒストグラムの位置情報を用いる。これにより、処理対象タイルのヒストグラム情報だけで、代表色候補となる階級が1色か2色かを的確に判定できる。同様に、処理対象タイルのヒストグラム情報だけでより正確に網点領域の代表色を決定でき、タイル間の色差を低減させることが可能となる。   As described above, in the present embodiment, the position information of each class of the histogram is given when generating the histogram, and the position information of the histogram is used when selecting the representative color. Thereby, it is possible to accurately determine whether the representative color candidate class is one color or two colors only with the histogram information of the processing target tile. Similarly, the representative color of the halftone dot region can be determined more accurately only with the histogram information of the processing target tile, and the color difference between the tiles can be reduced.

<第二の実施形態>
第一の実施形態では、ヒストグラムの位置情報をmethod3(網点領域のタイルもしくは極小領域を含むタイルから代表色を1ないし2色選定する)において使用していた。しかし、ヒストグラムの位置情報はタイルの代表色を2色以上に決めるmethod2においても有効である。例えば、ヒストグラム中から候補となる階級を算出したのち、その候補階級が残すべき色か否かの判定に位置情報を用いる。エリアコードがタイル境界部のみであれば、代表色候補階級に採用し、そうでなければ却下する。
<Second Embodiment>
In the first embodiment, the position information of the histogram is used in method 3 (one or two representative colors are selected from tiles in a halftone dot area or tiles including a minimal area). However, the position information of the histogram is also effective in method 2 that determines the representative color of the tile to be two or more. For example, after calculating a candidate class from the histogram, position information is used to determine whether the candidate class is a color to be left. If the area code is only the tile boundary, it is adopted for the representative color candidate class, otherwise it is rejected.

以上により、代表色が2色以上存在するタイルにおいても、処理対象タイルのヒストグラム情報だけで、候補にあがった色を残すべきか否かを的確に判定できる。   As described above, even in a tile having two or more representative colors, it is possible to accurately determine whether or not a candidate color should be left based only on the histogram information of the processing target tile.

<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (10)

入力画像データを規定の大きさのタイルに分割するタイル分割手段と、
前記分割したタイルごとに当該分割したタイルに含まれる画素の色頻度分布を生成する色頻度分布生成手段と、
前記生成された色頻度分布の各階級に対し、当該各階級に属する当該タイルにおける画素の位置情報を付与する位置情報付与手段と、
当該タイルにおける代表色を選定する代表色選定手段と、
前記代表色選定手段で選定された代表色により、当該タイルの画素の色情報を置換する色置換手段と
を有し、
前記代表色選定手段は、
前記色頻度分布の階級における前記位置情報を用いて当該画素が有する色情報の中から代表色候補を判定する必要極小領域色判定手段と、
前記色頻度分布の階級における前記位置情報を用いて前記代表色候補である階級の色情報を統合し当該代表色を決定する階級色情報統合手段と
を有することを特徴とする画像処理装置。
Tile dividing means for dividing the input image data into tiles of a prescribed size;
Color frequency distribution generating means for generating a color frequency distribution of pixels included in the divided tile for each of the divided tiles;
Position information giving means for giving position information of pixels in the tile belonging to each class to each class of the generated color frequency distribution;
Representative color selection means for selecting a representative color in the tile;
Color replacement means for replacing color information of pixels of the tile with the representative color selected by the representative color selection means;
The representative color selection means is:
Necessary minimum area color determination means for determining a representative color candidate from color information of the pixel using the position information in the color frequency distribution class;
An image processing apparatus comprising: class color information integration means for integrating the color information of the class that is the representative color candidate using the position information in the class of the color frequency distribution and determining the representative color.
前記色頻度分布は、前記タイルに含まれる画素の色相と輝度の関係により算出される情報であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the color frequency distribution is information calculated based on a relationship between a hue and a luminance of a pixel included in the tile. 前記位置情報付与手段で付与される前記位置情報は、前記タイルを規定の数で分割した領域の位置を示すエリアコードとして定義されることを特徴とする請求項1または2に記載の記載の画像処理装置。   3. The image according to claim 1, wherein the position information provided by the position information adding unit is defined as an area code indicating a position of an area obtained by dividing the tile by a specified number. 4. Processing equipment. 前記代表色選定手段は、前記代表色候補を決定する手段として、
前記代表色候補を1色として決定する第一の代表色処理手段と、
前記代表色候補を複数色として決定する第二の代表色処理手段と、
前記代表色候補を1または2色として決定する第三の代表色処理手段と
を更に有し、
前記第一の代表色処理手段は、前記色頻度分布において当該タイルに含まれる全ての画素が同一の階級に位置する、もしくは所定の数以上の画素が同一の階級に位置しかつ当該階級の近接する階級に残りの画素が位置する場合に選択され、
前記第二の代表色処理手段は、前記色頻度分布において当該タイルに含まれる全ての画素が同一の色相を有しかつ輝度が同一の画素が複数ある、もしくは当該タイルに含まれる画素がそれぞれ異なる色相を有する場合に選択され、
前記第三の代表色処理手段は、前記色頻度分布において当該タイルに含まれる全ての画素が同一の色相を有しかつそれぞれの輝度が近似している場合に選択される
ことを特徴とする請求項1乃至3のいずれか一項に記載の画像処理装置。
The representative color selection means is a means for determining the representative color candidates.
First representative color processing means for determining the representative color candidate as one color;
Second representative color processing means for determining the representative color candidates as a plurality of colors;
And third representative color processing means for determining the representative color candidate as one or two colors,
In the color frequency distribution, the first representative color processing means is configured such that all pixels included in the tile are located in the same class, or a predetermined number or more of pixels are located in the same class and are close to the class. Selected when the remaining pixels are in the class
In the second representative color processing means, in the color frequency distribution, all the pixels included in the tile have the same hue and a plurality of pixels having the same luminance, or the pixels included in the tile are different. Selected if it has a hue,
The third representative color processing means is selected when all the pixels included in the tile in the color frequency distribution have the same hue and the respective luminances are approximate. Item 4. The image processing device according to any one of Items 1 to 3.
前記タイル分割手段で分割されたタイルを平滑化処理することにより平滑化タイルを生成する平滑化手段を更に有し、
前記色頻度分布生成手段と前記位置情報付与手段と前記代表色選定手段とにおいて用いたタイルは、前記平滑化手段で生成した平滑化タイルであり、
前記色置換手段で用いたタイルは、前記平滑化処理する前のタイルであることを特徴とする請求項1乃至4のいずれか一項に記載の画像処理装置。
Smoothing means for generating a smoothed tile by smoothing the tile divided by the tile dividing means;
The tile used in the color frequency distribution generation means, the position information giving means, and the representative color selection means is a smoothing tile generated by the smoothing means,
The image processing apparatus according to claim 1, wherein the tile used in the color replacement unit is a tile before the smoothing process.
画像処理装置のタイル分割手段が、入力画像データを規定の大きさのタイルに分割するタイル分割工程と、
前記画像処理装置の色頻度分布生成手段が、前記分割したタイルごとに当該分割したタイルに含まれる画素の色頻度分布を生成する色頻度分布生成工程と、
前記画像処理装置の位置情報付与手段が、前記生成された色頻度分布の各階級に対し、当該各階級に属する当該タイルにおける画素の位置情報を付与する位置情報付与工程と、
前記画像処理装置の代表色選定手段が、当該タイルにおける代表色を選定する代表色選定工程と、
前記画像処理装置の色置換手段が、前記代表色選定工程で選定された代表色により、当該タイルの画素の色情報を置換する色置換工程と
を有し、
前記代表色選定工程は、
前記画像処理装置の必要極小領域色判定手段が、前記色頻度分布の階級における前記位置情報を用いて当該画素が有する色情報の中から代表色候補を判定する必要極小領域色判定工程と、
前記画像処理装置の階級色情報統合手段が、前記色頻度分布の階級における前記位置情報を用いて前記代表色候補である階級の色情報を統合し当該代表色を決定する階級色情報統合工程と
を有することを特徴とする制御方法。
A tile dividing step in which the tile dividing means of the image processing apparatus divides the input image data into tiles of a prescribed size;
A color frequency distribution generating step of generating a color frequency distribution of pixels included in the divided tile for each of the divided tiles;
A position information providing step in which the position information providing unit of the image processing apparatus assigns the position information of the pixels in the tile belonging to each class to each class of the generated color frequency distribution;
A representative color selection unit of the image processing apparatus selects a representative color in the tile;
A color replacement step of replacing the color information of the pixels of the tile by the representative color selected in the representative color selection step;
The representative color selection process includes
A necessary minimum area color determining unit of the image processing apparatus, which uses the position information in the color frequency distribution class to determine a representative color candidate from color information of the pixel;
A class color information integration step in which the class color information integration unit of the image processing apparatus integrates the color information of the class that is the representative color candidate using the position information in the class of the color frequency distribution and determines the representative color; A control method characterized by comprising:
コンピュータを、
入力画像データを規定の大きさのタイルに分割するタイル分割手段と、
前記分割したタイルごとに当該分割したタイルに含まれる画素の色頻度分布を生成する色頻度分布生成手段と、
前記生成された色頻度分布の各階級に対し、当該各階級に属する当該タイルにおける画素の位置情報を付与する位置情報付与手段と、
当該タイルにおける代表色を選定する代表色選定手段と、
前記代表色選定手段で選定された代表色により、当該タイルの画素の色情報を置換する色置換手段と
して機能させ、
前記代表色選定手段は、
前記色頻度分布の階級における前記位置情報を用いて当該画素が有する色情報の中から代表色候補を判定する必要極小領域色判定手段と、
前記色頻度分布の階級における前記位置情報を用いて前記代表色候補である階級の色情報を統合し当該代表色を決定する階級色情報統合手段と
して機能することを特徴とするプログラム。
Computer
Tile dividing means for dividing the input image data into tiles of a prescribed size;
Color frequency distribution generating means for generating a color frequency distribution of pixels included in the divided tile for each of the divided tiles;
Position information giving means for giving position information of pixels in the tile belonging to each class to each class of the generated color frequency distribution;
Representative color selection means for selecting a representative color in the tile;
The representative color selected by the representative color selection means functions as a color replacement means for replacing the color information of the pixel of the tile,
The representative color selection means is:
Necessary minimum area color determination means for determining a representative color candidate from color information of the pixel using the position information in the color frequency distribution class;
A program that functions as a class color information integration unit that integrates color information of a class that is a representative color candidate using the position information in the class of the color frequency distribution and determines the representative color.
入力画像データを規定の大きさのタイルに分割するタイル分割手段と、
前記分割したタイルごとに当該分割したタイルに含まれる画素の色頻度分布を生成する色頻度分布生成手段と、
前記生成された色頻度分布の各階級に対し、当該各階級に属する当該タイルにおける画素の位置情報を付与する位置情報付与手段と、
前記生成された色頻度分布と前記付与された位置情報とに基づいて、当該タイルにおける代表色を選定する代表色選定手段と、
前記代表色選定手段で選定された代表色により、当該タイルの画素の色情報を置換する色置換手段と
を有することを特徴とする画像処理装置。
Tile dividing means for dividing the input image data into tiles of a prescribed size;
Color frequency distribution generating means for generating a color frequency distribution of pixels included in the divided tile for each of the divided tiles;
Position information giving means for giving position information of pixels in the tile belonging to each class to each class of the generated color frequency distribution;
Representative color selecting means for selecting a representative color in the tile based on the generated color frequency distribution and the given position information;
An image processing apparatus comprising: a color replacement unit that replaces color information of pixels of the tile with the representative color selected by the representative color selection unit.
前記代表色選定手段は、前記色頻度分布と、代表色候補である階級に付与されている前記位置情報が前記タイルの境界部であるか否かとに基づいて、当該タイルにおける代表色を選定することを特徴とする請求項8に記載の画像処理装置。   The representative color selection means selects a representative color in the tile based on the color frequency distribution and whether the position information given to the class that is a representative color candidate is a boundary portion of the tile. The image processing apparatus according to claim 8. 前記代表色選定手段は、代表色候補である階級に付与されている前記位置情報と、当該代表色候補である階級に隣接する階級に付与されている前記位置情報とが同じ位置情報を含む場合、当該代表色候補である階級とその隣接する階級の色情報を統合して前記代表色を決定することを特徴とする請求項8または9に記載の画像処理装置。   In the case where the representative color selecting means includes the same position information as the position information given to a class that is a representative color candidate and the position information given to a class adjacent to the class that is the representative color candidate. The image processing apparatus according to claim 8, wherein the representative color is determined by integrating the color information of the class that is the representative color candidate and the class adjacent thereto.
JP2010001569A 2010-01-06 2010-01-06 Image processing apparatus, control method, and program Expired - Fee Related JP5337060B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010001569A JP5337060B2 (en) 2010-01-06 2010-01-06 Image processing apparatus, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010001569A JP5337060B2 (en) 2010-01-06 2010-01-06 Image processing apparatus, control method, and program

Publications (2)

Publication Number Publication Date
JP2011142471A true JP2011142471A (en) 2011-07-21
JP5337060B2 JP5337060B2 (en) 2013-11-06

Family

ID=44458024

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010001569A Expired - Fee Related JP5337060B2 (en) 2010-01-06 2010-01-06 Image processing apparatus, control method, and program

Country Status (1)

Country Link
JP (1) JP5337060B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113808120A (en) * 2021-09-24 2021-12-17 维沃移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10341347A (en) * 1997-06-09 1998-12-22 Fujitsu Ltd Device for processing color image transfer and processing color image restoration, method therefor and color image transfer system
JP2004336282A (en) * 2003-05-06 2004-11-25 Ricoh Co Ltd Image processor, image processing program and recording medium recorded with relevant program
JP2008113446A (en) * 2002-09-05 2008-05-15 Ricoh Co Ltd Image processing device, image processing program and recording medium
JP2009228229A (en) * 2008-03-19 2009-10-08 Miwa Lock Co Ltd Connecting structure of inner and outer mounting seats for door

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10341347A (en) * 1997-06-09 1998-12-22 Fujitsu Ltd Device for processing color image transfer and processing color image restoration, method therefor and color image transfer system
JP2008113446A (en) * 2002-09-05 2008-05-15 Ricoh Co Ltd Image processing device, image processing program and recording medium
JP2004336282A (en) * 2003-05-06 2004-11-25 Ricoh Co Ltd Image processor, image processing program and recording medium recorded with relevant program
JP2009228229A (en) * 2008-03-19 2009-10-08 Miwa Lock Co Ltd Connecting structure of inner and outer mounting seats for door

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113808120A (en) * 2021-09-24 2021-12-17 维沃移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium
WO2023045857A1 (en) * 2021-09-24 2023-03-30 维沃移动通信有限公司 Image processing method and apparatus, electronic device and storage medium

Also Published As

Publication number Publication date
JP5337060B2 (en) 2013-11-06

Similar Documents

Publication Publication Date Title
JP2009225422A (en) Image encoding apparatus, image processing apparatus, and control method thereof
US8335373B2 (en) Image processing apparatus and control method thereof
JP5511468B2 (en) Image processing apparatus, control method therefor, and program
US9253368B2 (en) Image processing device setting binary value without using dither matrix when prescribed condition is satisfied
US7953296B2 (en) Image resolution conversion with error detection
US8620081B2 (en) Image processing apparatus, method, and storage medium for determining attributes
US8285036B2 (en) Image processing method, image processing apparatus, and computer-readable storage medium for computer program
JP2015216455A (en) Image processing device, image processing method and program
JP2006115500A (en) High-speed low memory paper color suppression algorithm
JP5151708B2 (en) Image processing apparatus and image processing program
JP6370080B2 (en) Image processing apparatus, image processing method, and program.
EP3096294B1 (en) Computer program, image processing apparatus, and method for improving quality of image data
JP5337060B2 (en) Image processing apparatus, control method, and program
JP2004199622A (en) Apparatus and method for image processing, recording media, and program
JP2013102300A (en) Image processor and image processing method
JP6486082B2 (en) Image processing apparatus, image processing method, and program
JP5337059B2 (en) Image processing apparatus, control method, and program
JP2013102299A (en) Image processor and image processing method
JP6765103B2 (en) Image processing device, image processing program and image processing method
JP5457853B2 (en) Image encoding apparatus, image encoding method, program, and storage medium
JP5915410B2 (en) Image processing apparatus and program
JP2003116014A (en) Image processing equipment and method therefor, computer program and computer readable storage medium
CN103856685A (en) Image Processing Apparatus and Image Processing Method
JP5915411B2 (en) Image processing apparatus and program
JP2012105065A (en) Image processing system and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130701

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130705

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130802

R151 Written notification of patent or utility model registration

Ref document number: 5337060

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees