JP4186832B2 - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP4186832B2 JP4186832B2 JP2004027319A JP2004027319A JP4186832B2 JP 4186832 B2 JP4186832 B2 JP 4186832B2 JP 2004027319 A JP2004027319 A JP 2004027319A JP 2004027319 A JP2004027319 A JP 2004027319A JP 4186832 B2 JP4186832 B2 JP 4186832B2
- Authority
- JP
- Japan
- Prior art keywords
- region
- area
- image data
- integrated
- information
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Facsimile Image Signal Circuits (AREA)
- Image Analysis (AREA)
Description
本発明は、画像データから文字部分と絵柄部分とを分離して所定処理を行う画像処理装置に関する。 The present invention relates to an image processing apparatus that separates a character part and a picture part from image data and performs predetermined processing.
ラスタ画像のデータ(以下、区別するべき場合を除いて単に「画像データ」と呼ぶ)には、文字(テキスト)部分や、自然画などの部分(絵柄部分)など、互いに性状の異なる多くの画像要素が含まれ得る。こうした画像要素は、その性状の相違から、例えば圧縮処理において異なる方式での圧縮が適していたりするなど、画像要素ごとに異なる画像処理を行うことが好ましい場合が多い。そこで従来から、いわゆるT/I分離と呼ばれる画像処理が研究・開発され、文字部分と絵柄部分とを分離して、それぞれに適した圧縮処理を行う処理方法が知られている(特許文献1,2)。
しかしながら、上記従来の方式では、有意画素(用紙の色など下地の色と異なる色に設定され、文字や絵柄等の画像を構成する画素)の連続領域(画素塊)を抽出し、その外接矩形を画定して、当該外接矩形に内包される画素塊を文字又は絵柄と分類していたため、内包される画素の殆どが下地の色の画素となっていたり、領域が細分化されすぎていたりして、却って圧縮率を低下させる場合があった。 However, in the conventional method, a continuous area (pixel block) of significant pixels (pixels set to a color different from the background color such as paper color and constituting an image such as a character or a picture) is extracted, and its circumscribed rectangle is extracted. Since the pixel block included in the circumscribed rectangle is classified as a character or a picture, most of the included pixels are pixels of the background color or the area is too fragmented. On the other hand, the compression rate may be lowered.
本発明は上記実情に鑑みて為されたもので、圧縮率を向上できる画像処理装置を提供することをその目的の一つとする。 The present invention has been made in view of the above circumstances, and an object thereof is to provide an image processing apparatus capable of improving the compression rate.
請求項1記載の発明は、画像処理装置であって、処理対象となった画像データに基づき、当該画像データのうち、有意画素の連続領域を内包する領域を画定し、当該領域を表す領域情報を、少なくとも一つ生成する手段と、前記生成された領域情報の各々について、内包する有意画素の重心と、画像データ全体の面積に対する、領域情報の表す領域または領域内の有意画素の面積比を算出し、前記面積比が所定値未満の領域を統合候補として、統合候補のペアであって、ペアに係る領域の重心間の距離が、矩形領域のサイズに応じ大きくなる関数値以下である場合に、当該ペアに係る領域を統合した統合領域を生成する手段と、を含むこととしたものである。 The invention according to
請求項2記載の発明は、請求項1記載の画像処理装置であって、前記統合領域を生成する手段は、さらに、前記ペアに係る領域が交差していて、かつ、当該交差部分の面積が、交差している矩形領域の面積に対して所定比以上となっている場合に、当該ペアに係る領域を統合した統合領域を生成することとしたものである。 The invention according to claim 2 is the image processing apparatus according to
請求項3記載の発明は、請求項1または2記載の画像処理装置であって、前記統合領域の各々について、それぞれが画定する領域ごとに、領域内の有意画素の占める面積の比率が予め定められている値以下であるときに、領域を分割して複数の分割領域を生成する手段、をさらに含むこととしたものである。 The invention according to claim 3 is the image processing apparatus according to
請求項4記載の発明は、画像処理方法であって、コンピュータを用い、処理対象となった画像データに基づき、当該画像データのうち、有意画素の連続領域を内包する領域を画定し、当該領域を表す領域情報を、少なくとも一つ生成させ、前記生成された領域情報の各々について、内包する有意画素の重心と、画像データ全体の面積に対する、領域情報の表す領域または領域内の有意画素の面積比を算出し、前記面積比が所定値未満の領域を統合候補として、統合候補のペアであって、ペアに係る領域の重心間の距離が、矩形領域のサイズに応じ大きくなる関数値以下である場合に、当該ペアに係る領域を統合した統合領域を生成させる、こととしたものである。 The invention according to claim 4 is an image processing method, which uses a computer to define a region including a continuous region of significant pixels in the image data based on the image data to be processed. At least one region information representing the region, and for each of the generated region information, the center of the significant pixels included and the area of the significant pixels in the region represented by the region information with respect to the area of the entire image data A ratio is calculated, and an area whose area ratio is less than a predetermined value is an integration candidate, and is a combination candidate, and the distance between the centers of gravity of the areas related to the pair is less than a function value that increases according to the size of the rectangular area. In some cases, an integrated region in which the regions related to the pair are integrated is generated.
請求項5記載の発明は、画像処理プログラムであって、コンピュータを、処理対象となった画像データに基づき、当該画像データのうち、有意画素の連続領域を内包する領域を画定し、当該領域を表す領域情報を、少なくとも一つ生成する手段と、前記生成された領域情報の各々について、内包する有意画素の重心と、画像データ全体の面積に対する、領域情報の表す領域または領域内の有意画素の面積比を算出し、前記面積比が所定値未満の領域を統合候補として、統合候補のペアであって、ペアに係る領域の重心間の距離が、矩形領域のサイズに応じ大きくなる関数値以下である場合に、当該ペアに係る領域を統合した統合領域を生成する手段と、として機能させることとしたものである。 The invention according to claim 5 is an image processing program, wherein the computer defines a region including a continuous region of significant pixels in the image data based on the image data to be processed. Means for generating at least one region information to be represented; and for each of the generated region information, the center of the significant pixel included and the area of the region represented by the region information with respect to the area of the entire image data An area ratio is calculated, and an area whose area ratio is less than a predetermined value is set as an integration candidate, and is a pair of integration candidates, and the distance between the centers of gravity of the areas related to the pair is less than a function value that increases according to the size of the rectangular area In this case, it is made to function as a means for generating an integrated area obtained by integrating the areas related to the pair.
本発明の実施の形態に係る画像処理装置は、図1に示すように、制御部11と記憶部12と画像入力部13と画像出力部14とを含んで構成されている。制御部11は、記憶部12に格納されているプログラムに従って動作しており、後に説明する各画像処理を遂行する。この画像処理の内容については、後に詳しく述べる。
As shown in FIG. 1, the image processing apparatus according to the embodiment of the present invention includes a
記憶部12は、制御部11によって実行されるプログラムを保持している。またこの記憶部12は、制御部11の処理の過程で生成される各種データ等を格納するワークメモリとしても動作する。具体的にこの記憶部12は、コンピュータ可読な記録媒体と当該記録媒体に対してデータを書き込み、又は当該記録媒体からデータを読み出す装置(例えばハードディスク装置やメモリ装置)として実装できる。
The
画像入力部13は、例えばスキャナであり、原稿を光学的に読み取って得られた画像データを制御部11に出力する。ここではこの画像入力部13が出力する画像データにおいて、各画素の値がRGB(赤、緑、青)の色空間で表現されているとする。画像出力部14は、制御部11から入力される指示に従って画像データを出力するもので、例えば画像形成部(プリンタ等)に出力し、又はネットワークを介して外部の装置に送信する等の処理を行うものである。
The
次に制御部11の処理の内容について説明する。本実施の形態の制御部11は、図2に機能的に示すように、画像入力部13から入力される画像データを処理対象として、この処理対象となった画像データに対して、所定前処理を行う前処理部21と、文字線画を抽出する文字線画抽出処理部23と、絵柄抽出処理部24と、文字線画処理部25と、絵柄部分処理部26と、圧縮処理部27と、フォーマット処理部28とを含んで構成されている。
Next, the content of the process of the
以下、これら各部について具体的に説明する。 Hereinafter, each of these parts will be described in detail.
[前処理部]
この前処理部21では、画像入力部13から入力される画像データ(処理対象画像データ)の各画素の値をRGBからYCbCr(輝度と色差とからなる値)に変換する。具体的には、次の(1)式を用いて変換を行うことができる。なお、ここではRGBの各成分の値は0x00(「0x」は16進数であることを示す)から0xFFまでの値であるとしている。また、この前処理部21では、下地領域の輝度・彩度に基づいて各画素値を階調補正してもよい。尤も、この階調補正の処理は、必ずしも必要なものではない。
[Pre-processing section]
In the preprocessing
[文字線画抽出処理部]
文字線画抽出処理部23は、前処理部21が出力するYCbCr色空間で表現された画像データから文字線画部分を抽出する処理を行う。この処理は、例えば特許文献3に開示されている処理を利用できる。すなわち文字線画抽出処理部23は、前出力部21が出力する画像上に、互いに重複を許しながら複数の処理領域を画定する。そして、各処理領域に含まれる画素の各画素値について移動平均を算出し、当該移動平均と、上記各画素の値と比較によって、当該処理領域内の各画素を白又は黒に決定する。これにより文字線画抽出処理部23は、移動平均によって定めた領域ごとのしきい値に基づいて画像データを二値化する。そしてこの二値化した画像データに含まれる黒画素の連続領域を見いだし、当該連続領域に外接する矩形のサイズが所定フォントサイズ範囲(例えば9ポイントに対応するサイズから24ポイントに対応するサイズまで)にある等の条件に合致する場合に、当該黒画素の連続領域を文字として判断する。また線画についても同様に、黒画素の連続領域の幅の情報などに基づいて抽出する。
[Character line drawing extraction processing section]
The character / line drawing
そして文字線画抽出処理部23は、個々の文字や、線画部分についてそれらを取囲む矩形(文字線画外接矩形)の座標情報を記憶部12に格納する。
The character / line drawing
[絵柄抽出処理部]
絵柄抽出処理部24は、前処理部21が出力するYCbCr色空間で表現された画像データから、文字線画抽出処理部23にて抽出された文字線画部分の有意画素を除去する。なお有意画素は、用紙の色など下地の色と異なる色を表す画素である。具体的には処理対象画像データの四隅近傍の画素値群の最頻値などを用いて下地の色を決定しておき、この下地の色と、画素値の表す色との色空間上の距離が所定しきい値以上となっているような画素を有意画素とする。
[Pattern extraction processing unit]
The pattern
絵柄抽出処理部24は、当該文字線画部分の有意画素を除去した後の画像データを二値化し、この二値化した画像データに含まれる黒画素の連続領域を見いだす。さらにこの連続領域に外接する矩形を生成し、この矩形の座標情報を、絵柄矩形情報として記憶部12に格納する。
The pattern
[文字線画処理]
文字線画処理部25は、記憶部12から文字線画外接矩形の情報を取り出し、前処理部21が出力するYCbCr色空間で表現された画像データから、各文字線画外接矩形内の有意画素を取り出して圧縮処理する。具体的には、各文字線画外接矩形ごとにその内部の有意画素の値から代表画素値を定め、略同一の代表画素値に関係する文字線画外接矩形を互いに関連づける。そして、互いに関連づけられた文字線画外接矩形内部の有意画素をグループ化してグループ化データを生成する。さらにこのグループ化データを二値化して、代表画素値と二値化したグループ化データとのセットを生成する。例えば、赤色の文字を構成する画素は互いに関連づけられてグループ化データとなり、赤色の部分を黒色に設定し、それ以外を白色に設定した二値化データと、「赤色」を表す代表画素値とのセットが生成されることになる。さらに、この二値化データをランレングス圧縮(MMRなどによる圧縮)してもよい。
[Character line drawing processing]
The character / line
[絵柄部分処理部]
絵柄部分処理部26は、絵柄矩形情報を記憶部12から読出す。そして各絵柄矩形情報について、他の絵柄矩形情報と統合できるか否かを判断する。この判断は、予め定められている統合ルールに従って行われる。
[Pattern processing unit]
The pattern part processing unit 26 reads the pattern rectangle information from the
この統合ルールは、絵柄矩形情報で画定される矩形領域の性状(例えばサイズ)や、複数の当該矩形領域間の位置関係に関する条件として定め得る。具体的に絵柄部分処理部26は、図3に示すような統合処理を実行する。 This integration rule can be defined as a condition regarding the property (for example, size) of a rectangular area defined by the design rectangle information and the positional relationship between a plurality of the rectangular areas. Specifically, the pattern part processing unit 26 executes an integration process as shown in FIG.
この統合処理では、まず各絵柄矩形情報ごとに、それによって画定される矩形領域内の有意画素の重心を演算する(S1)。ここで重心の演算方法は広く知られた処理を利用できる。次に、各絵柄矩形情報ごとに対応する矩形領域の面積比を演算する(S2)。ここで面積比とは、当該矩形領域の面積を、処理対象の画像データ全体の面積で除した値である。 In this integration process, first, for each pattern rectangle information, the center of gravity of significant pixels in the rectangular area defined by the information is calculated (S1). Here, a well-known process can be used as the center of gravity calculation method. Next, the area ratio of the corresponding rectangular area is calculated for each picture rectangle information (S2). Here, the area ratio is a value obtained by dividing the area of the rectangular area by the area of the entire image data to be processed.
そして絵柄部分処理部26は、絵柄矩形情報のうち、上記面積比が所定値(例えば0.5)未満のものを統合候補として選択する(S3)。これにより、例えばサイズの大きい絵柄がさらに別の絵柄と統合されることがなくなる。なお、ここでは矩形領域のサイズに基づくものとしているが、当該矩形内に含まれる有意画素の数を、画像データ全体の画素の数で除した値を上記面積比として演算してもよい。 Then, the pattern portion processing unit 26 selects, as the integration candidate, the pattern rectangle information whose area ratio is less than a predetermined value (for example, 0.5) (S3). Thereby, for example, a large-sized picture is not integrated with another picture. Here, although it is based on the size of the rectangular area, a value obtained by dividing the number of significant pixels included in the rectangle by the number of pixels of the entire image data may be calculated as the area ratio.
絵柄部分処理部26は、処理S3にて統合候補として選択された絵柄矩形情報から互いに異なる絵柄矩形情報のペアを選択する(S4)。ここでは、統合候補のうちから2つの絵柄矩形情報を取り出す組み合せのうち未選択の組み合せを一つを選択することになる。そして、このペアに係る各矩形情報のサイズと、その重心の間の距離とに基づき、このペアに係る矩形領域を統合するか否かを判断する(S5)。 The pattern part processing unit 26 selects different pairs of pattern rectangle information from the pattern rectangle information selected as integration candidates in the process S3 (S4). Here, one unselected combination is selected from among the combinations for extracting two pieces of picture rectangle information from the integration candidates. Then, based on the size of each piece of rectangular information relating to this pair and the distance between the centers of gravity, it is determined whether or not the rectangular regions relating to this pair are to be integrated (S5).
具体的には、重心間の距離rが、
具体的に一方の矩形領域が、その左上座標(xlt1,ylt1)と、右下座標(xrb1,yrb1)とで画定され、他方の矩形領域がその左上座標(xlt2,ylt2)と、右下座標(xrb2,yrb2)とを含む場合、統合後の矩形領域は例えば、その左上座標を(min[xlt1,xlt2],min[ylt1,ylt2])、右下座標を(max[xrb1,xrb2],max[yrb1,yrb2])とするものとして画定される。ここで、min[a,b]は、値a,bのうち、いずれか小さい方の値を表す。これにより、比較的小さい領域同士が近接しているときに、当該領域同士が統合される。 Specifically, one rectangular area is defined by its upper left coordinates (xlt1, ylt1) and lower right coordinates (xrb1, yrb1), and the other rectangular area is its upper left coordinates (xlt2, ylt2) and lower right coordinates. When (xrb2, yrb2) is included, the integrated rectangular region has, for example, upper left coordinates (min [xlt1, xlt2], min [ylt1, ylt2]) and lower right coordinates (max [xrb1, xrb2], max [yrb1, yrb2]). Here, min [a, b] represents the smaller one of the values a and b. Thus, when relatively small areas are close to each other, the areas are integrated.
なお、処理S6においては、統合に係る矩形領域に対応する各絵柄矩形情報を、上記新たに演算した座標情報で置換えるとともに、この新たに生成された絵柄矩形情報によって画定される統合後の新たな矩形領域の重心を演算しておく。そして、未選択のペアがあるか否かを調べる(S7)。つまり、統合後の新たな絵柄矩形情報を含めた統合候補内に、当該統合候補から互いに異なる2つの絵柄矩形情報を取り出す組み合せの中に、未だ選択していない組み合せがあるかを調べる。そして未選択のペアがあれば、処理S4に戻り、当該未選択のペアの一つを選択して処理を繰返す。また、未選択のペアがなければ、統合処理を終了する。 In step S6, each piece of the design rectangle information corresponding to the integration-related rectangle area is replaced with the newly calculated coordinate information, and a new post-integration defined by the newly generated design rectangle information. Calculate the center of gravity of a rectangular area. Then, it is checked whether there is an unselected pair (S7). That is, it is checked whether there is a combination that has not yet been selected among combinations that extract two different pattern rectangle information from the integration candidates in the integration candidates including the new pattern rectangle information after integration. If there is an unselected pair, the process returns to step S4 to select one of the unselected pairs and repeat the process. If there is no unselected pair, the integration process is terminated.
一方、処理S5において、統合しないと判断したときには、絵柄部分処理部26は、選択されているペアに係る各矩形領域が互いに交差しているか否かを判断する(S8)。ここで交差とは、図4(a)に示すように、一方の矩形領域内に他方の矩形領域が内包されている場合と、図4(b)に示すように、それぞれの矩形領域が重なり合っている場合とをいう。 On the other hand, when it is determined in the process S5 that they are not integrated, the pattern portion processing unit 26 determines whether or not the rectangular areas related to the selected pair intersect each other (S8). Here, “intersection” refers to the case where one rectangular area is included in one rectangular area as shown in FIG. 4A and the case where each rectangular area overlaps as shown in FIG. 4B. If you are.
処理S8において、互いに交差していると判断されたときは、絵柄部分処理部26は、当該交差部分の面積を算出するとともに、各矩形領域の面積を算出する(S9)。そして、交差部分の面積が、いずれかの矩形領域の面積に対して所定比(例えば50%)以上となっているか否か、つまり、一方の矩形領域のうち、所定の割合以上の部分が、他方の矩形領域に包含されているか否かを調べ(S10)、この条件に合致するときには、選択されている矩形領域のペアを統合するものと判断して、処理S6に移行する。また、処理S10において条件に合致しない場合は、処理S7に移行する。 In the process S8, when it is determined that they intersect each other, the pattern part processing unit 26 calculates the area of the intersecting part and calculates the area of each rectangular area (S9). Then, whether or not the area of the intersecting portion is a predetermined ratio (for example, 50%) or more with respect to the area of any of the rectangular regions, that is, a portion of the one rectangular region more than a predetermined ratio, It is checked whether or not the other rectangular area is included (S10). If this condition is met, it is determined that the pair of the selected rectangular areas is to be integrated, and the process proceeds to S6. If the condition is not met in process S10, the process proceeds to process S7.
また絵柄部分処理部26は、この統合処理後の各矩形領域について、分割できるか否かを判断する。この判断は、予め定められている分割ルールに従って行われる。ここで分割ルールは、例えば、当該矩形領域の性状に基づくもので、具体的には、矩形領域の面積と、当該矩形領域内の有意画素の占める面積との比(有意画素の占める面積の比率)が予め定められている値以下であるときに分割できると判断する。すなわち、有意でない画素が多い場合は、分割できると判断するのである。 Further, the pattern portion processing unit 26 determines whether or not each rectangular area after the integration process can be divided. This determination is made according to a predetermined division rule. Here, the division rule is based on, for example, the property of the rectangular area. Specifically, the ratio between the area of the rectangular area and the area occupied by significant pixels in the rectangular area (ratio of the area occupied by significant pixels) ) Is less than or equal to a predetermined value, it is determined that division is possible. That is, when there are many insignificant pixels, it is determined that the pixels can be divided.
ここで具体的に分割の方法の一例について述べる。絵柄部分処理部26は、分割の対象となった矩形領域について、横方向のラインごとに有意画素数をカウントした結果(横の投影ヒストグラム)と、縦方向のラインごとに有意画素数をカウントした結果(縦の投影ヒストグラム)とを生成する(図5)。そして、各ヒストグラムの多角形の頂点位置のうち、隣接する頂点との変化が所定しきい値より大きいもの(図5のP,Q点)と、隣接する頂点が「0」(有意画素なし)を表しているもの(図5のR,S,T,U点)とをそれぞれ極点として選択する。 Here, an example of the division method will be specifically described. The pattern portion processing unit 26 counted the number of significant pixels for each line in the horizontal direction (horizontal projection histogram) and the number of significant pixels for each line in the vertical direction for the rectangular area to be divided. The result (vertical projection histogram) is generated (FIG. 5). Then, among the vertex positions of the polygons of each histogram, the change between the adjacent vertices is larger than a predetermined threshold (points P and Q in FIG. 5), and the adjacent vertex is “0” (no significant pixel). (Points R, S, T, U in FIG. 5) are respectively selected as pole points.
ここで、例えば縦の投影ヒストグラムの極点位置がx1,x2…xn(但し、x1<x2<…<xn)となり、横の投影ヒストグラムの極点位置がy1,y2…yn(但し、y1<y2<…<yn)となっているときには、分割始点位置座標のx成分として、x1,x2…xn−1を取り出し、同様にy成分としてy1,y2…yn−1を取り出す。 Here, for example, the extreme positions of the vertical projection histogram are x1, x2... Xn (where x1 <x2 <... Xn), and the extreme positions of the horizontal projection histogram are y1, y2. ... <yn), x1, x2 ... xn-1 are extracted as x components of the division start point position coordinates, and y1, y2 ... yn-1 are similarly extracted as y components.
そして取り出した各成分の組み合せを生成する。つまり、(x1,y1),(x1,y2),…(x1,yn−1),(x2,y1)…(xn−1,yn−1)を生成する。この組が分割始点位置座標となる。 Then, a combination of the extracted components is generated. That is, (x1, y1), (x1, y2), ... (x1, yn-1), (x2, y1) ... (xn-1, yn-1) are generated. This set becomes the division start point position coordinates.
次に、生成した組み合せについて、当該組み合せに係る各成分に隣接する極点の座標を用いて、各分割始点位置座標に対応する分割終点位置座標を生成する。つまり、(x1,y1)については各成分に隣接する極点の位置がx2,y2であるので、(x1,y1)に対応する分割終点位置座標は(x2,y2)と定められる。そしてこれら分割始点位置座標と分割終点位置座標との組によって分割後の矩形を画定する座標情報が生成される。 Next, with respect to the generated combination, division end position coordinates corresponding to the division start point position coordinates are generated using the coordinates of the extreme points adjacent to the respective components related to the combination. That is, for (x1, y1), the positions of the extreme points adjacent to each component are x2, y2, and therefore the division end position coordinates corresponding to (x1, y1) are determined as (x2, y2). Then, coordinate information defining a divided rectangle is generated by a set of the division start point position coordinates and the division end point position coordinates.
具体的に図5の例では、座標情報として(x1,y1)−(x2,y2)と、(x1,y2)−(x2,y3)と、(x2,y1)−(x3,y2)と、(x2,y2)−(x3,y3)とが生成される。 Specifically, in the example of FIG. 5, (x1, y1)-(x2, y2), (x1, y2)-(x2, y3), (x2, y1)-(x3, y2) as coordinate information , (X2, y2)-(x3, y3) are generated.
絵柄部分処理部26は、この生成した各座標情報によって画定される矩形内に有意画素が含まれるか否かを判断し、有意画素が含まれない場合は、その座標情報を除去し、有意画素が含まれる座標情報を、新たな絵柄矩形領域として記憶部12に格納する。なお、分割前の絵柄矩形領域の情報は記憶部12から除去しておく。
The pattern part processing unit 26 determines whether or not a significant pixel is included in the rectangle defined by the generated coordinate information. If the significant pixel is not included, the coordinate information is removed and the significant pixel is removed. Is stored in the
これにより縦の投影ヒストグラムの極点から縦方向に引いた線分と、横の投影ヒストグラムの局点から横方向に引いた線分とで有意画素の塊が分割される。具体的に図5の例では、生成された座標情報のうち(x1,y2)−(x2,y3)で画定される矩形内には有意画素がないことから、この座標情報は取除かれ、それ以外の3つの座標情報で画定される各矩形(図5の領域AからC)に分割されることになる。 Thereby, a cluster of significant pixels is divided into a line segment drawn in the vertical direction from the extreme points of the vertical projection histogram and a line segment drawn in the horizontal direction from the local points of the horizontal projection histogram. Specifically, in the example of FIG. 5, since there is no significant pixel in the rectangle defined by (x1, y2) − (x2, y3) among the generated coordinate information, this coordinate information is removed, It is divided into rectangles (regions A to C in FIG. 5) defined by the other three coordinate information.
なお、本実施の形態においては、統合処理と分割処理とを引続いて行うことにより、統合により有意画素の比率が小さくなりすぎた領域を再分割して、より圧縮率の高い領域群に分割できるようになる(図6(a))。また、ここでは統合後に分割処理を行っているが、図6(b)に示すように、分割処理後に引続いて統合処理を行うこととしてもよい。この場合も分割しすぎた領域(図6(b)の領域AとB)を再統合して、より圧縮率の高い領域群を形成できるようになる。 In this embodiment, the integration process and the division process are continuously performed, so that the area where the ratio of significant pixels becomes too small due to the integration is subdivided into areas with higher compression ratios. It will be possible (FIG. 6 (a)). Further, here, the division process is performed after the integration, but as shown in FIG. 6B, the integration process may be performed subsequently after the division process. Also in this case, regions that have been divided too much (regions A and B in FIG. 6B) can be reintegrated to form a region group with a higher compression rate.
さらに、ここでは統合処理と分割処理とを行っているが、いずれか一方のみを行うこととしても構わない。 Furthermore, although the integration process and the division process are performed here, only one of them may be performed.
[下地処理]
さらに絵柄部分処理部26は、こうして分割・統合して調整した後の絵柄矩形情報を用いて、処理対象となっている画像データから当該絵柄矩形情報によって画定された領域内の有意画素を除去し、下地部分を抽出する。そして当該下地部分に含まれる画素の値に基づいて、下地部分の色数を演算する。この色数の演算は、例えば画素値のヒストグラムから、所定の頻度以上となっているピークの数をカウントするなどして得られる。そして、圧縮処理部27は、演算した色数が一色であったか否かを調べ、一色であったならば、下地画像データ内の画素の値から定められる一つの代表色の情報(例えば各画素の値の平均値などでよい)を下地プレーンデータとして生成し、記憶部12に格納する。なお、このとき、当該代表色と、白色との色空間上での距離が所定しきい値未満となっているときには、下地プレーンデータの色を「白」にしてもよい。この場合において、本実施形態の画像処理装置が生成する画像データを復号する側で、指示のない部分を白色で描画することとなっている場合(例えばPDFなどを用いている場合など)は、下地プレーンデータを生成しないこととしてもよい。
[surface treatment]
Further, the pattern portion processing unit 26 uses the pattern rectangle information after the division / integration and adjustment to remove significant pixels in the region defined by the pattern rectangle information from the image data to be processed. Extract the ground part. Then, based on the value of the pixel included in the background portion, the number of colors of the background portion is calculated. This calculation of the number of colors is obtained, for example, by counting the number of peaks having a predetermined frequency or more from a histogram of pixel values. Then, the
[圧縮処理]
圧縮処理部27は、記憶部12に格納されている絵柄矩形情報(統合・分割処理によって調整された絵柄矩形情報)を読み出して、処理対象の画像データのうち、各絵柄矩形情報によって囲まれる領域内の部分画像データをJPEG(Joint Picture Experts Group)などの方法で圧縮処理する。これにより、各絵柄矩形情報に対応して圧縮データが生成される。
[Compression processing]
The
さらに圧縮処理部27は、前処理部21が出力するYCbCr色空間で表現された画像データから、文字線画抽出処理部23にて抽出された文字線画部分の有意画素を除去して得た絵柄画像データや、除去した部分を周辺画素の平均値で置換したような絵柄画像データを、JPEGなどの方法で圧縮処理する。
Further, the
そして、圧縮処理部27は、各絵柄矩形情報に対応して生成される圧縮データのデータサイズの総和と、絵柄画像データをそのまま圧縮して生成したデータのサイズとを比較し、いずれか小さい方を選択する。例えば絵柄画像データをそのまま圧縮して生成したデータのサイズが小さい場合は、絵柄画像データをそのまま圧縮して生成したデータが選択され、絵柄プレーンデータとして記憶部12に格納される。
Then, the
また、各絵柄矩形情報に対応して生成される圧縮データのデータサイズの総和がより小さい場合は、当該各絵柄矩形情報に対応して生成される各圧縮データが絵柄プレーンデータとして記憶部12に格納される。このときには、下地部分が除去されているので、下地プレーンデータ(もし生成されていれば)を絵柄プレーンデータに含めて記憶部12に格納しておく。
If the total data size of the compressed data generated corresponding to each picture rectangle information is smaller, each compressed data generated corresponding to each picture rectangle information is stored in the
なお、ここではそれぞれを実際に圧縮処理してサイズ比較を行っているが、生成されている絵柄矩形情報の数(絵柄部分の分割数)に、圧縮処理において付加されるヘッダ情報のサイズを乗じた値(オーバーヘッド量)と、所定のサイズ判断しきい値とを比較して、サイズ判断しきい値よりオーバーヘッド量が大きい場合は、前処理部21が出力するYCbCr色空間で表現された画像データから、文字線画抽出処理部23にて抽出された文字線画部分の有意画素を除去して得た絵柄画像データをそのままJPEGなどの方法で圧縮処理して絵柄プレーンデータを生成し、記憶部12に格納することとしてもよい。
In this example, the size is compared by actually compressing each of them. However, the number of the generated pattern rectangle information (the number of divisions of the pattern portion) is multiplied by the size of the header information added in the compression process. If the overhead amount is larger than the size determination threshold value by comparing the obtained value (overhead amount) with a predetermined size determination threshold value, the image data expressed in the YCbCr color space output by the preprocessing
なお、サイズ判断しきい値よりオーバーヘッド量が小さい場合は、記憶部12に格納されている絵柄矩形情報(統合・分割処理によって調整された絵柄矩形情報)を読み出して、処理対象の画像データのうち、各絵柄矩形情報によって囲まれる領域内の部分画像データをJPEGなどの方法で圧縮処理し、当該各絵柄矩形情報に対応して生成される各圧縮データと、下地プレーンデータ(もし生成されていれば)とを絵柄プレーンデータとして記憶部12に格納する。
When the amount of overhead is smaller than the size determination threshold value, the design rectangle information stored in the storage unit 12 (design rectangle information adjusted by the integration / division process) is read out, and the image data to be processed The partial image data in the region surrounded by each picture rectangle information is compressed by a method such as JPEG, and each compressed data generated corresponding to each picture rectangle information and the base plane data (if generated) Are stored in the
ここで、ヘッダ情報のサイズは、ヘッダ情報が可変長である場合はその概算でよい。例えばJPEGの場合は、630バイトにサムネイル分を加算した程度であるので、650バイトと見積っておけばよい。 Here, the size of the header information may be approximate when the header information has a variable length. For example, in the case of JPEG, the thumbnail is added to 630 bytes, so it may be estimated that it is 650 bytes.
[フォーマット処理部]
フォーマット処理部28は、記憶部12に格納されている文字線画プレーンデータと、絵柄プレーンデータと、絵柄部分外接矩形の座標情報とを連結して、これらを含む一連のデータを生成する。
[Format processing section]
The
具体的にこの一連のデータとしては、PDF(Portable Document Format)データとすることができる。すなわち、下地プレーンデータ(もし含まれてれば)を伸長してビットマップを生成させる指示と、絵柄プレーンデータを伸長してビットマップを生成させる指示と、文字線画プレーンデータに含まれる各文字や線画の画素を描画させる指示と、これらを合成する指示とを含むPDFデータとする。 Specifically, the series of data can be PDF (Portable Document Format) data. That is, an instruction to decompress the base plane data (if included) to generate a bitmap, an instruction to decompress the design plane data to generate a bitmap, and each character included in the character / line drawing plane data The PDF data includes an instruction to draw the pixels of the line drawing and an instruction to combine them.
ここで文字線画プレーンデータに含まれる各文字や線画を描画させる指示は、二値化され可逆圧縮されたグループ内の画素については、当該圧縮を伸長して描画するとともに、当該グループに関連する代表色の情報に基づき、当該描画後の画素(例えば黒画素)部分を当該代表色に設定する指示である。この場合、白画素部分は画素値の設定されない画素とする。 Here, an instruction to draw each character or line drawing included in the character / line drawing plane data is drawn for the pixels in the binarized and reversibly compressed group by decompressing and drawing, and representatives related to the group. This is an instruction to set the pixel (for example, black pixel) portion after the drawing as the representative color based on the color information. In this case, the white pixel portion is a pixel for which no pixel value is set.
フォーマット処理部28は、この生成したPDFデータを記憶部12に格納し、または画像出力部14にこのPDFデータを出力して、外部の装置に送出させる。
The
なお、こうして生成された画像データから元の画像データを復元する際は次のように処理することになる。すなわち、まず下地プレーンデータを取り出す。そして下地プレーンデータを伸長して下地の画像データを生成する。 Note that when restoring the original image data from the image data generated in this way, the following processing is performed. That is, first, ground plane data is extracted. Then, the base plane data is expanded to generate base image data.
具体的に、下地プレーンデータが下地部分の代表色を含む場合は、元の画像データのサイズの情報に基づいて、この下地部分の代表色によって塗潰された当該サイズの画像データを生成する。 Specifically, when the background plane data includes the representative color of the background portion, image data of the size filled with the representative color of the background portion is generated based on the size information of the original image data.
また、下地プレーンデータが圧縮されたデータを含む場合は、この圧縮を伸長して下地部分の画像データを生成する。この際、当該下地プレーンデータのサイズが縮小されているなどの場合は、そのサイズを元の画像データと同じサイズに拡大する処理を行う。 If the base plane data includes compressed data, the compression is expanded to generate image data of the base portion. At this time, when the size of the ground plane data is reduced, a process of enlarging the size to the same size as the original image data is performed.
次に、絵柄プレーンデータを取り出して伸長し、各絵柄プレーンデータに関する絵柄部分外接矩形の座標情報に応じて、下地の画像データ上の対応する位置に、当該伸長した画像データを上書きした画像データを生成する。 Next, the image plane data is extracted and decompressed, and the image data overwritten with the decompressed image data is displayed at the corresponding position on the background image data in accordance with the coordinate information of the pattern part circumscribed rectangle relating to each pattern plane data. Generate.
そしてさらに、文字線画プレーンデータを取り出して伸長し、文字線画ビットマップを生成する。そして各グループごとの文字線画ビットマップを、この生成した画像データ上で指定された位置に上書きする。 Further, the character / line drawing plane data is extracted and decompressed to generate a character / line drawing bit map. Then, the character line drawing bitmap for each group is overwritten at the designated position on the generated image data.
本実施の形態によると、絵柄部分を圧縮する際に、当該絵柄部分の分割態様を圧縮処理に適した状態に(分割後の領域内の有意画素がなるべく多くなり、かつ過度に分割しすぎないように)調整するので、圧縮率を向上できる。 According to the present embodiment, when compressing a pattern part, the division mode of the pattern part is set to a state suitable for compression processing (the number of significant pixels in the divided area is increased as much as possible and is not excessively divided). So that the compression rate can be improved.
11 制御部、12 記憶部、13 画像入力部、14 画像出力部、21 前処理部、23 文字線画抽出処理部、24 絵柄抽出処理部、25 文字線画処理部、26 絵柄部分処理部、27 圧縮処理部、28 フォーマット処理部。
DESCRIPTION OF
Claims (5)
前記生成された領域情報の各々について、内包する有意画素の重心と、画像データ全体の面積に対する、領域情報の表す領域または領域内の有意画素の面積比を算出し、前記面積比が所定値未満の領域を統合候補として、統合候補のペアであって、ペアに係る領域の重心間の距離が、矩形領域のサイズに応じ大きくなる関数値以下である場合に、当該ペアに係る領域を統合した統合領域を生成する手段と、
を含むことを特徴とする画像処理装置。 A means for demarcating a region including a continuous region of significant pixels in the image data based on the image data to be processed, and generating at least one region information representing the region;
For each of the generated region information, calculate the area ratio of the region represented by the region information or the significant pixels in the region with respect to the center of gravity of the significant pixels included and the area of the entire image data, and the area ratio is less than a predetermined value If the region is the integration candidate, and the distance between the centroids of the integration candidate is less than or equal to a function value that increases according to the size of the rectangular region, the region related to the pair is integrated Means for generating an integrated region;
An image processing apparatus comprising:
をさらに含むことを特徴とする請求項1または2記載の画像処理装置。 For each of the integrated regions , when the ratio of the area occupied by significant pixels in the region is equal to or less than a predetermined value for each region that is defined , the region is divided to generate a plurality of divided regions. means,
The image processing apparatus according to claim 1 , further comprising:
処理対象となった画像データに基づき、当該画像データのうち、有意画素の連続領域を内包する領域を画定し、当該領域を表す領域情報を、少なくとも一つ生成させ、
前記生成された領域情報の各々について、内包する有意画素の重心と、画像データ全体の面積に対する、領域情報の表す領域または領域内の有意画素の面積比を算出し、前記面積比が所定値未満の領域を統合候補として、統合候補のペアであって、ペアに係る領域の重心間の距離が、矩形領域のサイズに応じ大きくなる関数値以下である場合に、当該ペアに係る領域を統合した統合領域を生成させる、
ことを特徴とする画像処理方法。 Using a computer,
Based on the image data to be processed, a region including a continuous region of significant pixels is defined in the image data, and at least one region information representing the region is generated,
For each of the generated region information, calculate the area ratio of the region represented by the region information or the significant pixels in the region with respect to the center of gravity of the significant pixels included and the area of the entire image data, and the area ratio is less than a predetermined value If the region is the integration candidate, and the distance between the centroids of the integration candidate is less than or equal to a function value that increases according to the size of the rectangular region, the region related to the pair is integrated Create an integration area,
An image processing method .
処理対象となった画像データに基づき、当該画像データのうち、有意画素の連続領域を内包する領域を画定し、当該領域を表す領域情報を、少なくとも一つ生成する手段と、 A means for demarcating a region including a continuous region of significant pixels in the image data based on the image data to be processed, and generating at least one region information representing the region;
前記生成された領域情報の各々について、内包する有意画素の重心と、画像データ全体の面積に対する、領域情報の表す領域または領域内の有意画素の面積比を算出し、前記面積比が所定値未満の領域を統合候補として、統合候補のペアであって、ペアに係る領域の重心間の距離が、矩形領域のサイズに応じ大きくなる関数値以下である場合に、当該ペアに係る領域を統合した統合領域を生成する手段と、 For each of the generated region information, calculate the area ratio of the region represented by the region information or the significant pixels in the region with respect to the center of gravity of the significant pixels included and the area of the entire image data, and the area ratio is less than a predetermined value If the region is the integration candidate, and the distance between the centroids of the integration candidate is less than or equal to a function value that increases according to the size of the rectangular region, the region related to the pair is integrated Means for generating an integrated region;
として機能させることを特徴とする画像処理プログラム。 An image processing program that functions as an image processing program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004027319A JP4186832B2 (en) | 2004-02-03 | 2004-02-03 | Image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004027319A JP4186832B2 (en) | 2004-02-03 | 2004-02-03 | Image processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005223455A JP2005223455A (en) | 2005-08-18 |
JP4186832B2 true JP4186832B2 (en) | 2008-11-26 |
Family
ID=34998776
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004027319A Expired - Fee Related JP4186832B2 (en) | 2004-02-03 | 2004-02-03 | Image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4186832B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4089736B2 (en) | 2006-05-26 | 2008-05-28 | コニカミノルタビジネステクノロジーズ株式会社 | Image processing apparatus, image processing method, and image processing program |
JP4854398B2 (en) * | 2006-06-27 | 2012-01-18 | キヤノン株式会社 | Image processing apparatus, image processing method, and program |
JP5515330B2 (en) * | 2009-03-05 | 2014-06-11 | 株式会社リコー | Information processing apparatus, parts catalog generation method, parts catalog generation program |
-
2004
- 2004-02-03 JP JP2004027319A patent/JP4186832B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005223455A (en) | 2005-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5875637B2 (en) | Image processing apparatus and image processing method | |
JP5132530B2 (en) | Image coding apparatus, image processing apparatus, and control method thereof | |
US8411983B2 (en) | Method and apparatus for producing a contrast enhanced image | |
JP4821869B2 (en) | Character recognition device, image reading device, and program | |
JP4582204B2 (en) | Image processing apparatus, image conversion method, and computer program | |
US20100225984A1 (en) | Image processing apparatus and image forming apparatus | |
JP4853560B2 (en) | Image processing method, image processing apparatus, and computer program | |
JP4186832B2 (en) | Image processing device | |
JP2004120092A (en) | Image processing apparatus, image processing system, image processing method, storage medium, and program | |
JP4873554B2 (en) | Image distribution apparatus and image distribution method | |
JP4182891B2 (en) | Image processing device | |
JP4217969B2 (en) | Image processing apparatus and program | |
US20060119897A1 (en) | Output apparatus and program thereof | |
JPH07334648A (en) | Method and device for processing image | |
JP4228905B2 (en) | Image processing apparatus and program | |
JP4259310B2 (en) | Image processing apparatus and program | |
JP2005190010A (en) | Image processor | |
JP4631371B2 (en) | Image processing device | |
JP2006054817A (en) | Document processor | |
JPH09204525A (en) | Image area separation device and method | |
JP2005198157A (en) | Image processor, image processing method, storage medium having computer readable program recorded thereon and program | |
JP6142701B2 (en) | Image processing apparatus and program | |
JP4311183B2 (en) | Image processing apparatus and program | |
JP2005244649A (en) | Image processing apparatus | |
JP4193687B2 (en) | Image processing apparatus and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070119 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20071112 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20071115 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080314 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080422 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080617 |
|
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: 20080819 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080901 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4186832 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110919 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120919 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120919 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130919 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |