JP5104528B2 - Image processing apparatus and image processing program - Google Patents

Image processing apparatus and image processing program Download PDF

Info

Publication number
JP5104528B2
JP5104528B2 JP2008120966A JP2008120966A JP5104528B2 JP 5104528 B2 JP5104528 B2 JP 5104528B2 JP 2008120966 A JP2008120966 A JP 2008120966A JP 2008120966 A JP2008120966 A JP 2008120966A JP 5104528 B2 JP5104528 B2 JP 5104528B2
Authority
JP
Japan
Prior art keywords
area
image
region
inclusion
image component
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
Application number
JP2008120966A
Other languages
Japanese (ja)
Other versions
JP2009271691A (en
Inventor
晃一 藤井
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2008120966A priority Critical patent/JP5104528B2/en
Publication of JP2009271691A publication Critical patent/JP2009271691A/en
Application granted granted Critical
Publication of JP5104528B2 publication Critical patent/JP5104528B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

本発明は、画像処理装置および画像処理プログラムに関する。   The present invention relates to an image processing apparatus and an image processing program.

画像から画像構成要素(画像オブジェクトとも呼ばれる)の領域を抽出する技術が知られている。   A technique for extracting an area of an image constituent element (also called an image object) from an image is known.

特許文献1には、文書画像の背景色を特定し、当該背景色を用いて当該文書画像から背景領域以外の画素を抽出し、当該画素を統合して連結成分を生成し、当該連結成分を少なくとも形状特徴を用いて所定の領域に分類して、当該文書画像の領域識別の結果を得る方法が記載されている。   In Patent Document 1, a background color of a document image is specified, pixels other than the background region are extracted from the document image using the background color, and the connected components are generated by integrating the pixels. A method is described in which at least a shape feature is used to classify a predetermined region and a result of region identification of the document image is obtained.

特許文献2には、画像内の同色領域を抽出する方法であって、ある一定の大きさの探索ブロックを画像内でラスタスキャンし、当該探索ブロック内の画素の分散を求め、分散がある閾値を下回るときに当該探索ブロックを種ブロックとし、種ブロックを基準に周りの画素が種ブロックと同色領域がどうかを画素単位で判定していき、同色領域を抽出していく方法が記載されている。   Patent Document 2 discloses a method for extracting the same color region in an image by performing a raster scan on a search block having a certain size in the image, obtaining a variance of pixels in the search block, and a threshold having a variance. A method is described in which the search block is used as a seed block when the value is below the threshold, and whether or not surrounding pixels are the same color area as the seed block based on the seed block is determined in pixel units, and the same color area is extracted. .

特許文献3には、入力画像の読み取り情報に基づいて、入力画像の同一とみなす色の範囲を設定し、当該設定された色の範囲の連結画素に同一ラベルを付すことにより、入力画像のラベリングを行う技術が記載されている。ここで、上記入力画像の読み取り情報は、入力画像の色数、読み取り解像度、輝度値、彩度、隣接画素間の色差、色の分散などである。   Japanese Patent Laid-Open No. 2004-228688 sets the color range that is regarded as the same color of the input image based on the read information of the input image, and labels the connected pixels in the set color range, thereby labeling the input image. Techniques for performing are described. Here, the reading information of the input image includes the number of colors of the input image, reading resolution, luminance value, saturation, color difference between adjacent pixels, color dispersion, and the like.

特許文献4には、画像全体を、特徴量の均一性がある部分は領域を大きく、均一性が無い部分は領域を小さくして複数に分割し、当該分割した領域を対象として、その各領域の中で大きな領域を起点領域として選択し、当該起点領域の周辺にある領域でその特徴量が起点領域の特徴量に類似する領域を起点領域に統合して一つの分割領域を形成し、これを未統合の領域を対象として繰り返し行うことで複数の分割領域を形成する方法が記載されている。   In Patent Document 4, the entire image is divided into a plurality of parts with a uniform amount of feature and a large area, and a non-uniform part is reduced into a plurality of areas. A large region is selected as a starting region, and regions that are around the starting region and whose features are similar to those of the starting region are integrated into the starting region to form one divided region. Describes a method of forming a plurality of divided regions by repeatedly performing the above operation on an unintegrated region.

特開2001−297303号公報JP 2001-297303 A 特開2000−132680号公報JP 2000-132680 A 特開2000−172849号公報JP 2000-172849 A 特開2002−032763号公報JP 2002-032763 A

ところで、画像の中から、背景色の領域で区画される各領域を、画像構成要素領域として抽出する場合、1つの領域として扱うべき複数の領域が別々の画像構成要素領域として抽出されることがある。   By the way, when each area divided by the background color area is extracted from the image as an image component area, a plurality of areas to be handled as one area may be extracted as separate image component areas. is there.

本発明は、背景領域で分断されているが1つの領域として扱うべき複数の領域を1つの画像構成要素領域として抽出することが可能な画像処理装置および画像処理プログラムを提供することを目的とする。   An object of the present invention is to provide an image processing apparatus and an image processing program capable of extracting a plurality of areas which are divided by a background area but should be handled as one area as one image component area. .

本発明に係る画像処理装置は、画像を受け付ける画像受付手段と、前記画像の背景色を特定する背景色特定手段と、前記画像の中から、前記背景色の領域で区画される各領域を、画像構成要素領域として抽出する領域抽出手段と、前記抽出された画像構成要素領域のうちの少なくとも2つの画像構成要素領域同士の関係が、1つの画像構成要素領域として扱うべき所定の条件を満たす場合に、前記少なくとも2つの画像構成要素領域を1つの画像構成要素領域に統合する領域統合手段と、を有する。 An image processing apparatus according to the present invention includes an image receiving unit that receives an image, a background color specifying unit that specifies a background color of the image, and each region partitioned by the region of the background color from the image. A region extracting means for extracting as an image component region and a relationship between at least two of the extracted image component regions satisfy a predetermined condition to be treated as one image component region in, that having a, a region integrating means for integrating the at least two image components area in one image component area.

本発明では更に、前記領域統合手段は、前記抽出された画像構成要素領域のうちある画像構成要素領域(以下、「被包含領域」と称す)の外接矩形が他の画像構成要素領域(以下、「包含領域」と称す)の外接矩形に包含され、かつ前記被包含領域が前記包含領域に所定程度以上近接する場合に、前記包含領域と前記被包含領域とを1つの画像構成要素領域に統合する。 In the present invention , the region integration unit may further include a circumscribed rectangle of an image component region (hereinafter referred to as “included region”) among the extracted image component regions as another image component region (hereinafter referred to as “image component region”). The inclusion region and the inclusion region are integrated into one image component region when the inclusion region is included in a circumscribed rectangle of the “inclusion region”) and the inclusion region is close to the inclusion region by a predetermined degree or more. To do.

また、本発明では更に、前記領域統合手段は、前記被包含領域の外接矩形の4辺の各々について、当該辺が前記包含領域と近接するか否かを判定し、所定数の辺が前記包含領域に近接すると判定された場合に、前記被包含領域が前記包含領域に近接すると判定する。 Further , in the present invention , the region integration means determines, for each of the four sides of the circumscribed rectangle of the inclusion region, whether or not the side is close to the inclusion region, and a predetermined number of sides is included in the inclusion region. When it is determined that the area is close to the area, it is determined that the inclusion area is close to the inclusion area.

また、本発明の一態様では、前記領域統合手段は、前記辺上の各画素について、当該辺に垂直な方向について、当該画素と前記包含領域との間隔が所定間隔以下であるか否かを検査し、当該検査結果に基づき、当該辺が前記包含領域に近接するか否かを判定する。   In the aspect of the invention, the region integration unit may determine whether or not the interval between the pixel and the inclusion region is equal to or less than a predetermined interval for each pixel on the side in a direction perpendicular to the side. Inspection is performed, and it is determined based on the inspection result whether the side is close to the inclusion region.

また、本発明の一態様では、前記領域統合手段は、前記辺上の画素のうち前記間隔が所定間隔以下である画素の個数が所定数以上である場合に、当該辺は前記包含領域に近接すると判定する。   In the aspect of the invention, the region integration unit may be configured such that, when the number of pixels having the interval equal to or less than the predetermined interval among the pixels on the side is equal to or greater than the predetermined number, the side is close to the inclusion region. Judge that.

また、本発明の一態様では、前記領域統合手段は、前記辺上の各画素について、当該辺に垂直な方向について、当該画素と前記包含領域との間隔が所定間隔以下であり、かつ当該画素に対向する前記包含領域の幅が所定幅以上であるか否かを検査し、当該検査結果に基づき、当該辺が前記包含領域に近接するか否かを判定する。   In the aspect of the invention, the region integration unit may be configured such that, for each pixel on the side, an interval between the pixel and the inclusion region is equal to or less than a predetermined interval in a direction perpendicular to the side. It is inspected whether the width of the inclusion area opposite to is greater than or equal to a predetermined width, and based on the inspection result, it is determined whether the side is close to the inclusion area.

また、本発明の一態様では、前記領域統合手段は、前記辺上の画素のうち前記間隔が所定間隔以下であり前記幅が所定幅以上である画素の個数が所定数以上である場合に、当該辺は前記包含領域に近接すると判定する。   Also, in one aspect of the present invention, the region integration unit is configured such that, among the pixels on the side, the number of pixels in which the interval is equal to or smaller than a predetermined interval and the width is equal to or greater than a predetermined width It is determined that the side is close to the inclusion area.

また、本発明の一態様では、前記領域統合手段は、前記被包含領域の外接矩形が大きくなるほど前記所定間隔が大きくなるように、前記被包含領域の外接矩形の大きさに応じて前記所定間隔を変化させる。   In the aspect of the invention, the region integration unit may determine the predetermined interval according to a size of the circumscribed rectangle of the included region such that the larger the circumscribed rectangle of the included region, the larger the predetermined interval. To change.

また、本発明の一態様では、前記領域統合手段は、前記被包含領域の外接矩形が大きくなるほど前記所定幅が大きくなるように、前記被包含領域の外接矩形の大きさに応じて前記所定幅を変化させる。   In the aspect of the invention, the region integration unit may be configured such that the predetermined width is increased according to a size of the circumscribed rectangle of the included region so that the predetermined width increases as the circumscribed rectangle of the included region increases. To change.

また、参考例では、前記領域統合手段は、前記抽出された画像構成要素領域のうちの2つの画像構成要素領域の外接矩形が互いに重複し、かつ前記2つの画像構成要素領域の特徴が互いに所定程度以上類似する場合に、前記2つの画像構成要素領域を1つの画像構成要素領域に統合する。 Further, in the reference example , the region integration unit includes a circumscribed rectangle of two image component regions of the extracted image component regions that overlap each other, and features of the two image component regions are predetermined to each other. If they are more or less similar, the two image component regions are integrated into one image component region.

また、参考例では、前記領域統合手段は、前記抽出された画像構成要素領域のうちの2つの画像構成要素領域の外接矩形が互いに所定程度以上近接し、かつ前記2つの画像構成要素領域の特徴が互いに所定程度以上類似する場合に、前記2つの画像構成要素領域を1つの画像構成要素領域に統合する。 Further, in the reference example , the region integration unit is characterized in that circumscribed rectangles of two image component regions of the extracted image component regions are close to each other by a predetermined degree or more, and the characteristics of the two image component regions Are similar to each other by a predetermined degree or more, the two image component regions are integrated into one image component region.

本発明に係る画像処理プログラムは、コンピュータに、画像を受け付ける手順と、前記画像の背景色を特定する手順と、前記画像の中から、前記背景色の領域で区画される各領域を、画像構成要素領域として抽出する手順と、前記抽出された画像構成要素領域のうちの少なくとも2つの画像構成要素領域同士の関係が、1つの画像構成要素領域として扱うべき所定の条件を満たす場合に、前記少なくとも2つの画像構成要素領域を1つの画像構成要素領域に統合する手順と、を実行させる。 An image processing program according to the present invention includes: a procedure for accepting an image to a computer; a procedure for specifying a background color of the image; and each region partitioned by the background color region from the image. When at least two of the extracted image component regions and the relationship between at least two image component regions among the extracted image component regions satisfy a predetermined condition to be treated as one image component region, the at least a step of integrating the two image component area in one image component area, Ru is running.

本発明に係る画像処理プログラムでは更に、前記統合する手順では、前記抽出された画像構成要素領域のうちある画像構成要素領域(以下、「被包含領域」と称す)の外接矩形が他の画像構成要素領域(以下、「包含領域」と称す)の外接矩形に包含され、かつ前記被包含領域が前記包含領域に所定程度以上近接する場合に、前記包含領域と前記被包含領域とを1つの画像構成要素領域に統合すると共に、前記被包含領域の外接矩形の4辺の各々について、当該辺が前記包含領域と近接するか否かを判定し、所定数の辺が前記包含領域に近接すると判定された場合に、前記被包含領域が前記包含領域に近接すると判定するIn the image processing program according to the present invention , in the integration step, a circumscribed rectangle of an image component region (hereinafter referred to as “included region”) among the extracted image component regions is another image configuration. When the element region (hereinafter referred to as “inclusion region”) is included in a circumscribed rectangle and the inclusion region is close to the inclusion region by a predetermined degree or more, the inclusion region and the inclusion region are combined into one image. For each of the four sides of the circumscribed rectangle of the inclusion region, it is determined whether or not the side is close to the inclusion region, and a predetermined number of sides is determined to be close to the inclusion region If it is determined that the inclusion area is close to the inclusion area .

また、参考例では、前記統合する手順では、前記抽出された画像構成要素領域のうちの2つの画像構成要素領域の外接矩形が互いに重複し、かつ前記2つの画像構成要素領域の特徴が互いに所定程度以上類似する場合に、前記2つの画像構成要素領域を1つの画像構成要素領域に統合する。 In the reference example , in the integration step, circumscribed rectangles of two image component regions of the extracted image component regions overlap each other, and characteristics of the two image component regions are predetermined to each other. If they are more or less similar, the two image component regions are integrated into one image component region.

また、参考例では、前記統合する手順では、前記抽出された画像構成要素領域のうちの2つの画像構成要素領域の外接矩形が互いに所定程度以上近接し、かつ前記2つの画像構成要素領域の特徴が互いに所定程度以上類似する場合に、前記2つの画像構成要素領域を1つの画像構成要素領域に統合する。 In the reference example , in the integration step, the circumscribed rectangles of the two image component regions out of the extracted image component regions are close to each other by a predetermined degree and the features of the two image component regions are Are similar to each other by a predetermined degree or more, the two image component regions are integrated into one image component region.

請求項1に記載の発明によれば、背景領域で分断されているが1つの領域として扱うべき複数の領域を1つの画像構成要素領域として抽出することが可能となる。   According to the first aspect of the present invention, it is possible to extract a plurality of areas that are divided by the background area but should be handled as one area as one image component area.

更に請求項に記載の発明によれば、背景領域で分断された互いに近接する外周領域と内部領域とを1つの画像構成要素領域として抽出することが可能となる。 Furthermore , according to the first aspect of the present invention, it is possible to extract an outer peripheral area and an inner area that are separated from each other by a background area as one image component area.

更に請求項に記載の発明によれば、被包含領域の外接矩形の各辺が包含領域に近接するかを判定することにより、被包含領域が包含領域に近接するか否かを簡単に判定することが可能となる。 Further , according to the invention described in claim 1 , it is easily determined whether or not the inclusion area is close to the inclusion area by determining whether or not each side of the circumscribed rectangle of the inclusion area is close to the inclusion area. It becomes possible to do.

請求項に記載の発明によれば、辺上の各画素と包含領域との間隔が所定間隔であるか否かを検査することにより、辺が包含領域に近接するか否かを簡単に判定することが可能となる。 According to the invention described in claim 2 , it is easily determined whether or not the side is close to the inclusion region by checking whether or not the interval between each pixel on the side and the inclusion region is a predetermined interval. It becomes possible to do.

請求項に記載の発明によれば、辺上の画素のうち上記間隔が所定間隔以下である画素の個数に応じて、辺が包含領域に近接するか否かを判定することが可能となる。 According to the third aspect of the present invention, it is possible to determine whether or not the side is close to the inclusion region according to the number of pixels on the side where the interval is equal to or less than the predetermined interval. .

請求項に記載の発明によれば、辺上の各画素と包含領域との間隔と、辺上の各画素に対向する包含領域の幅とを考慮して、辺が包含領域に近接するか否かを判定することが可能となる。 According to the invention of claim 4 , whether the side is close to the inclusion region in consideration of the distance between each pixel on the side and the inclusion region and the width of the inclusion region facing each pixel on the side. It becomes possible to determine whether or not.

請求項に記載の発明によれば、辺上の画素のうち上記間隔が所定間隔以下であり上記幅が所定幅以上である画素の個数に応じて、辺が包含領域に近接するか否かを判定することが可能となる。 According to the fifth aspect of the present invention, whether or not the side is close to the inclusion region according to the number of pixels on the side where the interval is equal to or smaller than the predetermined interval and the width is equal to or larger than the predetermined width. Can be determined.

請求項に記載の発明によれば、被包含領域の大きさに応じた適切な所定間隔を設定することが可能となる。 According to the invention described in claim 6 , it is possible to set an appropriate predetermined interval according to the size of the inclusion region.

請求項に記載の発明によれば、被包含領域の大きさに応じた適切な所定幅を設定することが可能となる。 According to the seventh aspect of the present invention, it is possible to set an appropriate predetermined width according to the size of the inclusion region.

参考例によれば、背景領域で分断された、互いに外接矩形が重複し、かつ互いに特徴が類似する2つの領域を1つの画像構成要素領域として抽出することが可能となる。 According to the reference example , it is possible to extract, as one image component area, two areas that are separated by a background area and that have circumscribed rectangles that overlap each other and that have similar characteristics.

参考例によれば、背景領域で分断された、互いに外接矩形が近接し、かつ互いに特徴が類似する2つの領域を1つの画像構成要素領域として抽出することが可能となる。 According to the reference example , it is possible to extract, as one image component area, two areas that are separated by a background area and that have circumscribed rectangles close to each other and that have similar characteristics.

請求項に記載の発明によれば、背景領域で分断されているが1つの領域として扱うべき複数の領域を1つの画像構成要素領域として抽出することが可能となる。 According to the eighth aspect of the present invention, it is possible to extract a plurality of areas that are divided by the background area but should be handled as one area as one image component area.

更に請求項に記載の発明によれば、背景領域で分断された互いに近接する外周領域と内部領域とを1つの画像構成要素領域として抽出することが可能となると共に被包含領域の外接矩形の各辺が包含領域に近接するかを判定することにより、被包含領域が包含領域に近接するか否かを簡単に判定することが可能となる Furthermore , according to the eighth aspect of the present invention, it is possible to extract an outer peripheral area and an inner area adjacent to each other divided by the background area as one image constituent element area, and a circumscribed rectangle of the inclusion area. By determining whether each side is close to the inclusion region, it is possible to easily determine whether the inclusion region is close to the inclusion region .

参考例によれば、背景領域で分断された、互いに外接矩形が重複し、かつ互いに特徴が類似する2つの領域を1つの画像構成要素領域として抽出することが可能となる。 According to the reference example , it is possible to extract, as one image component area, two areas that are separated by a background area and that have circumscribed rectangles that overlap each other and that have similar characteristics.

参考例によれば、背景領域で分断された、互いに外接矩形が近接し、かつ互いに特徴が類似する2つの領域を1つの画像構成要素領域として抽出することが可能となる。

According to the reference example , it is possible to extract, as one image component area, two areas that are separated by a background area and that have circumscribed rectangles close to each other and that have similar characteristics.

以下、本発明の実施の形態を図面に従って説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本実施の形態に係る画像処理装置10の構成の一例を示すブロック図である。この画像処理装置10は、処理対象の画像の中から画像構成要素の領域(すなわち画像構成要素領域)を抽出する装置である。以下の説明では、画像構成要素を「画像オブジェクト」と称し、画像構成要素領域を「画像オブジェクト領域」と称す。   FIG. 1 is a block diagram illustrating an example of a configuration of an image processing apparatus 10 according to the present embodiment. The image processing apparatus 10 is an apparatus that extracts an image component area (that is, an image component area) from an image to be processed. In the following description, an image component is referred to as an “image object”, and an image component region is referred to as an “image object region”.

画像処理装置10は、一つの態様では、ハードウェア資源とソフトウェアとの協働により実現され、例えばコンピュータである。具体的には、画像処理装置10の機能は、記録媒体に記録された画像処理プログラムがメインメモリに読み出されてCPU(Central Processing Unit)により実行されることによって実現される。上記画像処理プログラムは、CD−ROM等のコンピュータ読み取り可能な記録媒体に記録されて提供されることも可能であるし、データ信号として通信により提供されることも可能である。ただし、画像処理装置10は、ハードウェアのみにより実現されてもよい。また、画像処理装置10は、物理的に1つの装置により実現されてもよいし、複数の装置により実現されてもよい。   In one embodiment, the image processing apparatus 10 is realized by cooperation of hardware resources and software, and is, for example, a computer. Specifically, the functions of the image processing apparatus 10 are realized by reading an image processing program recorded on a recording medium into a main memory and executing it by a CPU (Central Processing Unit). The image processing program can be provided by being recorded on a computer-readable recording medium such as a CD-ROM, or can be provided by communication as a data signal. However, the image processing apparatus 10 may be realized only by hardware. Further, the image processing apparatus 10 may be physically realized by one apparatus or may be realized by a plurality of apparatuses.

図1に示されるように、画像処理装置10は、画像受付部11、背景色特定部12、領域抽出部13、領域統合部14、および画像オブジェクト出力部15を有する。   As illustrated in FIG. 1, the image processing apparatus 10 includes an image receiving unit 11, a background color specifying unit 12, a region extracting unit 13, a region integrating unit 14, and an image object output unit 15.

画像受付部11は、処理対象の画像(以下、「入力画像」と称す)を受け付ける。入力画像は、一つの態様では、複数の色成分を有するカラー画像であり、例えば、赤(R)、緑(G)、青(B)の3つの色成分を含む。また、入力画像は、例えば、水平方向および垂直方向にマトリクス状に複数の画素が配列されてなる画像データであり、各画素は、各色の階調値を有する。具体的な一態様では、入力画像は、RGB各色8ビットのビットマップ画像データである。入力画像は、例えば、原稿の画像を光学的に読み取る画像読取装置により生成された画像データである。ただし、入力画像は、各種の記録媒体に記録された画像データなどであってもよい。   The image receiving unit 11 receives an image to be processed (hereinafter referred to as “input image”). In one aspect, the input image is a color image having a plurality of color components, and includes, for example, three color components of red (R), green (G), and blue (B). The input image is, for example, image data in which a plurality of pixels are arranged in a matrix in the horizontal direction and the vertical direction, and each pixel has a gradation value of each color. In a specific aspect, the input image is bitmap image data of 8 bits for each color of RGB. The input image is, for example, image data generated by an image reading apparatus that optically reads a document image. However, the input image may be image data recorded on various recording media.

背景色特定部12は、画像受付部11により受け付けられた入力画像の背景色を特定する。背景色特定部12は、特定の1つの色を背景色として特定してもよいし、色空間における特定の範囲の色を背景色として特定してもよい。背景色特定部12は、様々な方法により背景色を特定することができるが、例えば、入力画像において出現頻度が最も高い色、または当該色から所定範囲内の色を背景色として特定する。   The background color specifying unit 12 specifies the background color of the input image received by the image receiving unit 11. The background color specifying unit 12 may specify one specific color as the background color, or may specify a specific range of colors in the color space as the background color. The background color specifying unit 12 can specify the background color by various methods. For example, the background color specifying unit 12 specifies a color having the highest appearance frequency in the input image or a color within a predetermined range from the color as the background color.

領域抽出部13は、上記入力画像の中から、上記背景色の領域(すなわち背景領域)で区画される各領域を、画像オブジェクト領域として抽出する。一つの態様では、領域抽出部13は、入力画像の画素を背景色の画素と背景色以外の画素とに分類することにより、入力画像を2値画像に変換する。例えば、領域抽出部13は、背景色の画素の画素値を「0」とし、背景色以外の画素の画素値を「1」として、図2に示されるフルカラーの入力画像から、図3に示される2値画像を生成する。図3では、画素値「0」の領域は白色で表現され、画素値「1」の領域は黒色で表現されている。ついで、領域抽出部13は、上記2値画像中の背景色以外の画素の各連結成分の領域を、画像オブジェクト領域として抽出する。ここで、連結成分とは、2値画像中で、同じ値を持つ画素が互いに連結して一つの塊を形成しているものである。具体的な一態様では、領域抽出部13は、上記2値画像に対してラベリング処理を行って、ラベリング画像を生成する。ここで、ラベリング処理とは、2値画像中の各連結成分の画素に対し、連結成分毎に異なるラベルを割り当てる処理である。例えば、領域抽出部13は、図3の2値画像に対してラベリング処理を行って、図4に示されるラベリング画像を生成する。図4では、各連結成分の画素には、連結成分毎に異なるラベル番号1,2,3,4が割り当てられており、互いに異なるラベル番号が付与された領域は、互いに異なるハッチングで表現されている。同一のラベル番号が割り当てられた画素群の領域が、それぞれ画像オブジェクト領域に対応する。すなわち、図4の例では、ラベル番号1〜4の4つの画像オブジェクト領域が抽出されている。なお、図4において、白抜き文字「D」の外周領域および内部領域は、本来1つの画像オブジェクト領域として扱われるべきであるが、背景領域で分断されてラベル番号3,4の別々の画像オブジェクト領域として抽出されている。このように、領域抽出部13の抽出処理では、白抜き文字の外周領域および内部領域など、背景領域で分断されているが1つの領域として扱うべき領域は、背景色以外の画素が連結しないため、同一領域として抽出されない。   The area extraction unit 13 extracts each area partitioned by the background color area (that is, the background area) from the input image as an image object area. In one aspect, the region extraction unit 13 converts the input image into a binary image by classifying the pixels of the input image into pixels of the background color and pixels other than the background color. For example, the region extraction unit 13 sets the pixel value of the background color pixel to “0” and sets the pixel value of the pixel other than the background color to “1”, and then displays the full color input image shown in FIG. A binary image is generated. In FIG. 3, the region with the pixel value “0” is expressed in white, and the region with the pixel value “1” is expressed in black. Next, the area extraction unit 13 extracts the area of each connected component of pixels other than the background color in the binary image as an image object area. Here, the connected component is a binary image in which pixels having the same value are connected to each other to form one lump. In a specific aspect, the region extraction unit 13 performs a labeling process on the binary image to generate a labeling image. Here, the labeling process is a process of assigning a different label for each connected component to each connected component pixel in the binary image. For example, the region extraction unit 13 performs a labeling process on the binary image in FIG. 3 to generate a labeling image shown in FIG. In FIG. 4, different label numbers 1, 2, 3, and 4 are assigned to the pixels of each connected component, and regions with different label numbers are represented by different hatching. Yes. Each pixel group region to which the same label number is assigned corresponds to an image object region. That is, in the example of FIG. 4, four image object regions with label numbers 1 to 4 are extracted. In FIG. 4, the outer peripheral area and the inner area of the white character “D” should be treated as one image object area originally, but are separated by the background area and separated into separate image objects with label numbers 3 and 4. It is extracted as a region. As described above, in the extraction processing of the area extraction unit 13, pixels other than the background color are not connected to the area that is divided by the background area, such as the outer peripheral area and the inner area of the white character, but should be treated as one area. Are not extracted as the same region.

領域統合部14は、領域抽出部13により抽出された画像オブジェクト領域のうちの少なくとも2つの画像オブジェクト領域同士の関係が、1つの画像オブジェクト領域として扱うべき所定の条件を満たす場合に、上記少なくとも2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。   The region integration unit 14 performs the above-described at least 2 when the relationship between at least two image object regions among the image object regions extracted by the region extraction unit 13 satisfies a predetermined condition to be handled as one image object region. One image object area is integrated into one image object area.

上記所定の条件は、例えば、どのような場合に画像オブジェクト領域を統合すべきかに応じて、また、どのような場合に画像オブジェクト領域を統合すべきでないかに応じて、予め設定される。当該所定の条件は、例えば、画像オブジェクト領域同士の位置関係に関する条件や、画像オブジェクト領域同士の特徴の類似度合いに関する条件などを含む。なお、当該所定の条件の具体例については、後に詳しく説明する。   The predetermined condition is set in advance, for example, depending on when the image object area should be integrated and when the image object area should not be integrated. The predetermined condition includes, for example, a condition related to the positional relationship between the image object areas, a condition related to the degree of similarity of features between the image object areas, and the like. A specific example of the predetermined condition will be described in detail later.

画像オブジェクト領域の統合に関し、一つの態様では、領域統合部14は、少なくとも2つの画像オブジェクト領域を統合する場合、これらの画像オブジェクト領域のラベル番号を共通のラベル番号に統一し、統一後のラベリング画像を処理結果として出力する。例えば、領域統合部14は、図4の白抜き文字「D」の2つの画像オブジェクト領域を統合する場合、ラベル番号4の画素にラベル番号3を振りなおして、図5に示されるラベリング画像を処理結果として出力する。別の態様では、領域統合部14は、少なくとも2つの画像オブジェクト領域を統合する場合、その旨を示す情報を処理結果として出力する。例えば、領域統合部14は、図4の白抜き文字「D」の2つの画像オブジェクト領域を統合する場合、ラベル番号3,4の画像オブジェクト領域を1つの画像オブジェクト領域に統合する旨を示す統合情報を、処理結果として出力する。   Regarding integration of image object areas, in one aspect, when integrating at least two image object areas, the area integration unit 14 unifies the label numbers of these image object areas into a common label number, and performs labeling after the unification. The image is output as the processing result. For example, when integrating the two image object regions of the white character “D” in FIG. 4, the region integration unit 14 reassigns the label number 3 to the pixel with the label number 4 to generate the labeling image shown in FIG. 5. Output as processing result. In another aspect, when integrating at least two image object regions, the region integration unit 14 outputs information indicating that as a processing result. For example, when integrating the two image object regions of the white character “D” in FIG. 4, the region integration unit 14 indicates that the image object regions with the label numbers 3 and 4 are integrated into one image object region. Information is output as a processing result.

画像オブジェクト出力部15は、領域抽出部13および領域統合部14の処理結果に基づき、画像オブジェクトまたは画像オブジェクトを生成するための情報を出力する。   The image object output unit 15 outputs an image object or information for generating an image object based on the processing results of the region extraction unit 13 and the region integration unit 14.

一つの態様では、画像オブジェクト出力部15は、画像オブジェクトを生成するための情報として、画像オブジェクト毎に、マスク画像および切り取り画像を出力する。ここで、マスク画像は、画像オブジェクト領域の外接矩形で区画され、画像オブジェクトの形状を表す2値画像である。例えば、マスク画像は、背景領域の画素に画素値「0」が付与され、画像オブジェクト領域の画素に画素値「1」が付与された画像である。また、切り取り画像は、画像オブジェクト領域の外接矩形で入力画像を切り取って得られる画像である。例えば、画像オブジェクト出力部15は、図5のラベリング画像から、または図4のラベリング画像と統合情報とから、図6に示される3つのマスク画像21〜23を生成し、図2の入力画像と図5のラベリング画像とから図7に示される3つのフルカラーの切り取り画像31〜33を生成する。   In one aspect, the image object output unit 15 outputs a mask image and a cut image for each image object as information for generating an image object. Here, the mask image is a binary image that is partitioned by a circumscribed rectangle of the image object area and represents the shape of the image object. For example, the mask image is an image in which the pixel value “0” is assigned to the pixels in the background area and the pixel value “1” is assigned to the pixels in the image object area. The cut image is an image obtained by cutting the input image with a circumscribed rectangle of the image object area. For example, the image object output unit 15 generates the three mask images 21 to 23 shown in FIG. 6 from the labeling image of FIG. 5 or from the labeling image of FIG. 4 and the integrated information, and the input image of FIG. Three full-color cut-out images 31 to 33 shown in FIG. 7 are generated from the labeling image of FIG.

別の態様では、画像オブジェクト出力部15は、上記マスク画像および切り取り画像に基づき画像オブジェクトを生成して出力する。具体的には、マスク画像と切り取り画像とのアンドをとり、すなわち切り取り画像をマスク画像でマスクして、画像オブジェクトを生成する。例えば、画像オブジェクト出力部15は、図7の3つの切り取り画像31〜33をそれぞれ図6の3つのマスク画像21〜23でマスクして、図8に示される3つのフルカラーの画像オブジェクト41〜43を生成する。   In another aspect, the image object output unit 15 generates and outputs an image object based on the mask image and the cut image. Specifically, an AND of the mask image and the cut image is taken, that is, the cut image is masked with the mask image to generate an image object. For example, the image object output unit 15 masks the three cut images 31 to 33 in FIG. 7 with the three mask images 21 to 23 in FIG. 6, respectively, and three full color image objects 41 to 43 shown in FIG. 8. Is generated.

なお、仮に領域統合部14による統合処理が実施されない場合には、例えば、図4に示されるラベリング画像から図9に示される4つのマスク画像51〜54が生成されることになる。すなわち、白抜き文字「D」の外周と内部とは、別々の画像オブジェクトとして抽出されることになる。   If the integration processing by the region integration unit 14 is not performed, for example, the four mask images 51 to 54 shown in FIG. 9 are generated from the labeling image shown in FIG. That is, the outer periphery and the inside of the outline character “D” are extracted as separate image objects.

図10は、本実施の形態に係る画像処理装置10の動作の一例を示すフローチャートである。以下、図10を参照して、画像処理装置10の動作の一例を説明する。   FIG. 10 is a flowchart showing an example of the operation of the image processing apparatus 10 according to the present embodiment. Hereinafter, an example of the operation of the image processing apparatus 10 will be described with reference to FIG.

画像処理装置10は、入力画像(例えば24ビットフルカラー画像データ)を受け付ける(S1)。   The image processing apparatus 10 receives an input image (for example, 24-bit full color image data) (S1).

ついで、画像処理装置10は、入力画像の背景色を特定する(S2)。   Next, the image processing apparatus 10 specifies the background color of the input image (S2).

ついで、画像処理装置10は、入力画像の中から、背景色の領域で区画される各領域を、画像オブジェクト領域として抽出する(S3)。すなわち、画像処理装置10は、背景上の画像オブジェクト領域を検出する。   Next, the image processing apparatus 10 extracts each area partitioned by the background color area from the input image as an image object area (S3). That is, the image processing apparatus 10 detects an image object area on the background.

ついで、画像処理装置10は、上記抽出された画像オブジェクト領域について、画像オブジェクト領域の統合処理を行う(S4)。すなわち、画像処理装置10は、上記抽出された画像オブジェクト領域のうちの少なくとも2つの画像オブジェクト領域同士の関係が、1つの画像オブジェクト領域として扱うべき所定の条件を満たす場合に、当該少なくとも2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。   Next, the image processing apparatus 10 performs an image object region integration process on the extracted image object region (S4). In other words, the image processing apparatus 10 determines that the at least two images when the relationship between at least two of the extracted image object areas satisfies a predetermined condition to be handled as one image object area. The object area is integrated into one image object area.

そして、画像処理装置10は、ステップS3およびS4の処理結果に基づき、画像オブジェクトまたは画像オブジェクトを生成するための情報を出力する(S5)。   Then, the image processing apparatus 10 outputs an image object or information for generating an image object based on the processing results of steps S3 and S4 (S5).

以下、領域統合部14の処理、すなわち上記ステップS4の統合処理の具体例として、第1〜第3の具体例を示す。   Hereinafter, first to third specific examples will be shown as specific examples of the process of the region integration unit 14, that is, the integration process of step S4.

[第1の具体例]
上述のとおり、白抜き文字の外周領域と内部領域は、領域抽出部13により別々の画像オブジェクト領域として抽出される。しかし、白抜き文字の外周と内部とは両方で1つの画像オブジェクトを構成するので、白抜き文字の外周領域と内部領域は、1つの画像オブジェクト領域として抽出されることが望ましい。ここで、白抜き文字において、内部領域の外接矩形は外周領域の外接矩形に包含され、内部領域と外周領域とは互いに近接する。したがって、ある画像オブジェクト領域の外接矩形が他の画像オブジェクト領域の外接矩形に包含され、かつ当該2つの画像オブジェクト領域が互いに近接している場合には、当該2つの画像オブジェクト領域は白抜き文字を構成する可能性が高い。
[First specific example]
As described above, the outer peripheral area and the inner area of the outline character are extracted as separate image object areas by the area extracting unit 13. However, since the outer periphery and the inner area of the white character constitute one image object, it is desirable that the outer peripheral area and the inner area of the white character are extracted as one image object area. Here, in the outline character, the circumscribed rectangle of the inner region is included in the circumscribed rectangle of the outer peripheral region, and the inner region and the outer peripheral region are close to each other. Therefore, when a circumscribed rectangle of an image object area is included in a circumscribed rectangle of another image object area, and the two image object areas are close to each other, the two image object areas have white characters. There is a high probability of configuring.

上記の事情等に鑑み、本例では、領域統合部14は、領域抽出部13により抽出された画像オブジェクト領域のうちある画像オブジェクト領域(以下、「被包含領域」と称す)の外接矩形が他の画像オブジェクト領域(以下、「包含領域」と称す)の外接矩形に包含され、かつ被包含領域が包含領域に所定程度以上近接する場合に、包含領域と被包含領域とを1つの画像オブジェクト領域に統合する。   In view of the above circumstances and the like, in this example, the region integration unit 14 uses other circumscribed rectangles of an image object region (hereinafter referred to as “included region”) among the image object regions extracted by the region extraction unit 13. Image object area (hereinafter referred to as "inclusion area") is included in a circumscribed rectangle, and the inclusion area and the inclusion area are combined into one image object area when the inclusion area is close to the inclusion area by a predetermined amount or more. To integrate.

具体的には、領域統合部14は、領域抽出部13により抽出された各画像オブジェクト領域の外接矩形を特定し、任意の2つの画像オブジェクト領域の外接矩形の包含関係を調査する。そして、包含関係が成立する場合に、所定の判定基準に従って、当該2つの画像オブジェクト領域同士が近接するか否かを判定し、近接すると判定される場合に、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。   Specifically, the region integration unit 14 specifies a circumscribed rectangle of each image object region extracted by the region extracting unit 13 and investigates an inclusion relationship between circumscribed rectangles of arbitrary two image object regions. When the inclusion relationship is established, it is determined whether or not the two image object regions are close to each other according to a predetermined determination criterion. When it is determined that the two image object regions are close to each other, the two image object regions are Integrate into the image object area.

以下、図11を参照しながら、被包含領域が包含領域に近接するか否かの判定の例を説明する。図11では、白抜き文字「D」の内部領域(被包含領域)51の外接矩形52が、外周領域(包含領域)53の外接矩形54に包囲されている。   Hereinafter, an example of determining whether or not the inclusion region is close to the inclusion region will be described with reference to FIG. In FIG. 11, the circumscribed rectangle 52 of the inner region (included region) 51 of the outline character “D” is surrounded by the circumscribed rectangle 54 of the outer peripheral region (included region) 53.

領域統合部14は、被包含領域51の外接矩形52の4辺の各々について、当該辺が包含領域53と近接するか否かを判定し、所定数の辺が包含領域53に近接すると判定された場合に、被包含領域51が包含領域53に近接すると判定する。   For each of the four sides of the circumscribed rectangle 52 of the inclusion region 51, the region integration unit 14 determines whether the side is close to the inclusion region 53, and determines that a predetermined number of sides are close to the inclusion region 53. In the case where the inclusion area 51 is close to the inclusion area 53.

ここで、上記所定数は、例えば、アルファベット、数字、漢字など、どのような文字の白抜き文字を考慮するか、図12のような白抜き文字の画像端部Eとの接触を考慮するかなどに応じて適宜に設定されればよい。例えば、白抜き文字である可能性が非常に高い場合に限り統合したい場合には「4」が設定され、白抜き文字の画像端部との接触等を考慮する場合には「3」が設定され、漢字の白抜き文字を考慮する場合には「2」が設定され、出来るだけ漏れなく統合したい場合には「1」が設定される。また、例えば図13に示される漢字「田」などの白抜き文字などを考慮して、具体的な一態様では、領域統合部14は、被包含領域の外接矩形の4辺のうち互いに直交する少なくとも2つの辺が包含領域に近接すると判定された場合に、被包含領域が包含領域に近接すると判定する。すなわち、画像の水平方向に平行な2辺のうち少なくとも1辺が包含領域に近接し、かつ画像の垂直方向に平行な2辺のうち少なくとも1辺が包含領域に近接すると判定された場合に、両領域が近接すると判定する。   Here, for the predetermined number, for example, what kind of white character such as alphabet, number, kanji, etc. is considered, or whether contact with the image end E of the white character as shown in FIG. What is necessary is just to set suitably according to etc. For example, “4” is set when it is desired to integrate only when the possibility of being a white character is very high, and “3” is set when the contact of the white character with the image edge is considered. Then, “2” is set when considering white characters of Chinese characters, and “1” is set when integrating without omission as much as possible. Further, for example, in consideration of a white character such as the Chinese character “da” shown in FIG. 13, in one specific aspect, the region integration unit 14 is orthogonal to each other among the four sides of the circumscribed rectangle of the inclusion region. When it is determined that at least two sides are close to the inclusion area, it is determined that the inclusion area is close to the inclusion area. That is, when it is determined that at least one of the two sides parallel to the horizontal direction of the image is close to the inclusion region and at least one of the two sides parallel to the vertical direction of the image is close to the inclusion region, It is determined that both areas are close to each other.

上記被包含領域の外接矩形の各辺が包含領域に近接するか否かの判定は、適宜の方法で行われればよいが、例えば以下のように行われる。   Whether or not each side of the circumscribed rectangle of the inclusion area is close to the inclusion area may be determined by an appropriate method, for example, as follows.

領域統合部14は、外接矩形52の辺上の各画素について、当該辺に垂直な方向について、当該画素と包含領域53との間隔が所定間隔以下であるか否かを検査し、当該検査結果に基づき、当該辺が包含領域53に近接するか否かを判定する。   For each pixel on the side of the circumscribed rectangle 52, the region integration unit 14 inspects whether the interval between the pixel and the inclusion region 53 is equal to or less than a predetermined interval in the direction perpendicular to the side, and the inspection result Based on the above, it is determined whether or not the side is close to the inclusion region 53.

例えば、領域統合部14は、辺上の画素のうち上記間隔が所定間隔以下である画素の個数が所定数以上である場合に、当該辺は包含領域53に近接すると判定する。上記所定数は、辺上の画素の総個数(すなわち辺の長さ)に応じて変化してもよく、例えば、辺上の画素の総個数に所定の割合を乗じて得られる数である。   For example, the region integration unit 14 determines that the side is close to the inclusion region 53 when the number of pixels having the interval equal to or smaller than the predetermined interval among the pixels on the side is equal to or larger than the predetermined number. The predetermined number may vary according to the total number of pixels on the side (that is, the length of the side), and is, for example, a number obtained by multiplying the total number of pixels on the side by a predetermined ratio.

ここで、白抜き文字のサイズが大きいほど、被包含領域51の外接矩形52のサイズは大きくなり、被包含領域51と包含領域53との間隔も大きくなると考えられる。当該事情等を考慮して、一つの態様では、領域統合部14は、被包含領域51の外接矩形52が大きくなるほど上記所定間隔が大きくなるように、被包含領域51の外接矩形52の大きさに応じて上記所定間隔を変化させる。   Here, it is considered that the larger the size of the white character, the larger the size of the circumscribed rectangle 52 of the inclusion area 51 and the gap between the inclusion area 51 and the inclusion area 53. In consideration of such circumstances and the like, in one aspect, the region integration unit 14 determines the size of the circumscribed rectangle 52 of the included region 51 so that the predetermined interval increases as the circumscribed rectangle 52 of the included region 51 increases. The predetermined interval is changed according to the above.

具体的な一態様では、領域統合部14は、図11において破線矢印で示されるように、外接矩形52の辺上の各画素から、当該辺に垂直に被包含領域51から離れる方向に所定画素数分だけ走査し、包含領域53に到達するか否かを検査し、当該検査結果に基づき、当該辺が包含領域53に近接するか否かを判定する。例えば、走査した本数のうち、所定本数(または所定割合)以上が包含領域53に到達した場合に、当該辺が包含領域53に近接すると判定する。領域統合部14は、被包含領域51の外接矩形52の大きさに応じて、上記走査する画素数を変化させる。   In a specific aspect, the region integration unit 14 determines a predetermined pixel from each pixel on the side of the circumscribed rectangle 52 in a direction away from the inclusion region 51 perpendicular to the side, as indicated by a dashed arrow in FIG. It scans for several minutes, it is test | inspected whether it reaches the inclusion area 53, and it is determined based on the said test result whether the said edge adjoins the inclusion area 53. FIG. For example, when a predetermined number (or a predetermined ratio) or more of the scanned number reaches the inclusion area 53, it is determined that the side is close to the inclusion area 53. The region integration unit 14 changes the number of pixels to be scanned according to the size of the circumscribed rectangle 52 of the inclusion region 51.

ところで、入力画像に表が含まれる場合、表の枠と、表の枠内の文字とは、互いに包含関係を有するが、別々の画像オブジェクトとして抽出したい場合がある。すなわち、白抜き文字の外周と内部とは統合したいが、表の枠と枠内の文字とは統合したくない、という要望がある。   By the way, when a table is included in the input image, the table frame and the characters in the table frame have an inclusive relationship with each other, but it may be desired to extract them as separate image objects. That is, there is a demand for integrating the outer periphery and the inside of the outline character, but not integrating the frame of the table and the character in the frame.

上記の事情等を考慮して、一つの態様では、領域統合部14は、外接矩形52の辺上の各画素から包含領域53までの間隔と、外接矩形52の辺上の各画素に対向する包含領域53の幅とに基づいて、当該辺が包含領域53に近接するか否かを判定する。具体的には、領域統合部14は、外接矩形52の辺上の各画素について、当該辺に垂直な方向について、当該画素と包含領域53との間隔が所定間隔以下であり、かつ当該画素に対向する包含領域53の幅が所定幅以上であるか否かを検査し、当該検査結果に基づき、当該辺が包含領域53に近接するか否かを判定する。例えば、領域統合部14は、外接矩形52の辺上の画素のうち上記間隔が所定間隔以下であり上記幅が所定幅以上である画素の個数が所定数以上である場合に、当該辺は包含領域53に近接すると判定する。当該態様においても、上記所定数は、辺上の画素の総個数(すなわち辺の長さ)に応じて変化してよく、例えば、辺上の画素の総個数に所定の割合を乗じて得られる数である。また、当該態様においても、領域統合部14は、被包含領域51の外接矩形52が大きくなるほど上記所定間隔が大きくなるように、被包含領域51の外接矩形52の大きさに応じて上記所定間隔を変化させてもよい。   In consideration of the above-described circumstances and the like, in one aspect, the region integration unit 14 faces the interval from each pixel on the side of the circumscribed rectangle 52 to the inclusion region 53 and each pixel on the side of the circumscribed rectangle 52. Based on the width of the inclusion area 53, it is determined whether or not the side is close to the inclusion area 53. Specifically, for each pixel on the side of the circumscribed rectangle 52, the region integration unit 14 determines that the interval between the pixel and the inclusion region 53 is equal to or less than a predetermined interval in a direction perpendicular to the side. It is inspected whether or not the width of the opposing inclusion area 53 is equal to or larger than a predetermined width, and it is determined whether or not the side is close to the inclusion area 53 based on the inspection result. For example, the region integration unit 14 includes a side when the number of pixels on the sides of the circumscribed rectangle 52 is equal to or smaller than the predetermined interval and the width is equal to or larger than the predetermined width. It is determined that the area 53 is close. Also in this aspect, the predetermined number may change according to the total number of pixels on the side (that is, the length of the side), and is obtained, for example, by multiplying the total number of pixels on the side by a predetermined ratio. Is a number. Also in this aspect, the region integration unit 14 determines the predetermined interval according to the size of the circumscribed rectangle 52 of the included region 51 so that the predetermined interval increases as the circumscribed rectangle 52 of the included region 51 increases. May be changed.

表のサイズが大きいほど、枠内の文字の領域である被包含領域の外接矩形のサイズは大きくなり、表の枠線の幅も大きくなると考えられる。当該事情等を考慮して、一つの態様では、領域統合部14は、被包含領域51の外接矩形52が大きくなるほど上記所定幅が大きくなるように、被包含領域51の外接矩形52の大きさに応じて上記所定幅を変化させる。   It is considered that the larger the size of the table, the larger the size of the circumscribed rectangle of the inclusion area, which is the character area in the frame, and the width of the border of the table. In consideration of the circumstances and the like, in one aspect, the region integration unit 14 determines the size of the circumscribed rectangle 52 of the included region 51 so that the predetermined width increases as the circumscribed rectangle 52 of the included region 51 increases. The predetermined width is changed according to the above.

具体的な一態様では、領域統合部14は、図14に示されるように、外接矩形52の辺上の各画素から、当該辺に垂直に被包含領域51から離れる方向に所定画素数分だけ走査し、包含領域53に到達するか否かを検査する。さらに、領域統合部14は、上記各走査において、包含領域53に到達したあと、図14の実線矢印のように、さらに所定画素数分だけ追加走査し、追加走査が包含領域53から抜け出るか否かを検査し、当該検査結果に基づき、当該辺が包含領域53に近接するか否かを判定する。例えば、走査した本数のうち、所定本数(または所定割合)以上が包含領域53に到達し、かつ追加走査が包含領域53から抜け出なかった場合に、当該辺が包含領域53に近接すると判定する。領域統合部14は、被包含領域51の外接矩形52の大きさに応じて、上記最初に走査する画素数と、上記追加走査する画素数とを変化させる。   In one specific aspect, the region integration unit 14, as shown in FIG. 14, from each pixel on the side of the circumscribed rectangle 52 by a predetermined number of pixels in a direction perpendicular to the side and away from the inclusion region 51. Scan to check if the inclusion area 53 is reached. Furthermore, after reaching the inclusion area 53 in each of the above scans, the area integration unit 14 performs additional scanning for a predetermined number of pixels as indicated by the solid line arrow in FIG. Whether or not the side is close to the inclusion region 53 is determined based on the inspection result. For example, when a predetermined number (or a predetermined ratio) or more of the number of scanned lines reaches the inclusion area 53 and the additional scanning does not exit the inclusion area 53, it is determined that the side is close to the inclusion area 53. The region integration unit 14 changes the number of pixels to be scanned first and the number of pixels to be additionally scanned according to the size of the circumscribed rectangle 52 of the inclusion region 51.

図15は、第1の具体例に係る統合処理の一例を示すフローチャートである。以下、図15を参照して、第1の具体例に係る統合処理の一例を説明する。   FIG. 15 is a flowchart illustrating an example of the integration process according to the first specific example. Hereinafter, an example of the integration process according to the first specific example will be described with reference to FIG.

画像処理装置10は、抽出された各画像オブジェクト領域の外接矩形を特定する(S11)。   The image processing apparatus 10 specifies a circumscribed rectangle of each extracted image object area (S11).

ついで、画像処理装置10は、抽出された画像オブジェクト領域の中から2つの画像オブジェクト領域を選択し、当該2つの画像オブジェクト領域の外接矩形の間に包含関係があるか否かを判定する(S12)。   Next, the image processing apparatus 10 selects two image object areas from the extracted image object areas, and determines whether there is an inclusion relationship between the circumscribed rectangles of the two image object areas (S12). ).

そして、包含関係があると判定された場合(S12:YES)、画像処理装置10は、被包含領域が包含領域と近接するか否かを判定する(S13)。具体的には、画像処理装置10は、被包含領域の外接矩形の各辺上の各画素から水平方向および垂直方向に走査を行い、被包含領域の外接矩形の各辺が包含領域と近接するか否かを判定し、4辺とも包含領域と近接すると判定された場合には、被包含領域が包含領域と近接すると判定し、そうでない場合には近接しないと判定する。   If it is determined that there is an inclusion relationship (S12: YES), the image processing apparatus 10 determines whether the inclusion region is close to the inclusion region (S13). Specifically, the image processing apparatus 10 performs scanning in the horizontal direction and the vertical direction from each pixel on each side of the circumscribed rectangle of the inclusion region, and each side of the circumscribed rectangle of the inclusion region is close to the inclusion region. When it is determined that all four sides are close to the inclusion region, it is determined that the inclusion region is close to the inclusion region, and otherwise, it is determined not to be close.

被包含領域が包含領域と近接すると判定された場合(S13:YES)、画像処理装置10は、被包含領域と包含領域とを1つの画像オブジェクト領域に統合し(S14)、処理をステップS15に進める。   When it is determined that the inclusion area is close to the inclusion area (S13: YES), the image processing apparatus 10 integrates the inclusion area and the inclusion area into one image object area (S14), and the process proceeds to step S15. Proceed.

一方、ステップS12で包含関係がないと判定された場合(S12:NO)、およびステップS13で被包含領域が包含領域と近接しないと判定された場合(S13:NO)、画像所理装置10は、上記統合処理を行うことなく、処理をステップS15に進める。   On the other hand, if it is determined in step S12 that there is no inclusion relationship (S12: NO), and if it is determined in step S13 that the inclusion region is not close to the inclusion region (S13: NO), the image processing apparatus 10 The process proceeds to step S15 without performing the integration process.

ステップS15では、画像処理装置10は、すべての画像オブジェクト領域の組み合わせについて上記ステップS12〜S14の処理が終了したか否かを判断し、終了していない場合には(S15:NO)、処理をステップS12に戻し、終了している場合には(S15:YES)、処理を終了させる。   In step S15, the image processing apparatus 10 determines whether or not the processing in steps S12 to S14 has been completed for all combinations of image object regions. If not (S15: NO), the processing is performed. Returning to step S12, if it has been completed (S15: YES), the process is terminated.

例えば、図11の例では、被包含領域51の外接矩形52は包含領域53の外接矩形54に包含されており、かつ外接矩形52は4方向で包含領域53に近接しているので、上記統合処理により、被包含領域51と包含領域53とは統合される。   For example, in the example of FIG. 11, the circumscribed rectangle 52 of the inclusion area 51 is included in the circumscription rectangle 54 of the inclusion area 53, and the circumscribed rectangle 52 is close to the inclusion area 53 in four directions. By the processing, the inclusion area 51 and the inclusion area 53 are integrated.

一方、図16の例では、円グラフの3つの数値画像の領域の外接矩形61〜63は、円グラフ画像の領域の外接矩形64に包含されているが、外接矩形61〜63は4方向では円グラフ画像の領域に近接していないので、上記統合処理により、3つの数値画像の領域は円グラフ画像の領域に統合されない。   On the other hand, in the example of FIG. 16, circumscribed rectangles 61 to 63 of the three numerical image areas of the pie graph are included in the circumscribed rectangle 64 of the area of the pie chart image, but the circumscribed rectangles 61 to 63 are not in four directions. Since it is not close to the pie chart image area, the three numerical image areas are not integrated into the pie chart image area by the integration process.

[第2の具体例]
図17には、入力画像に含まれる図柄の一例が示されている。図17において、白色の領域は背景領域を表し、白色領域上の35個の灰色の領域は有色領域を表している。当該35個の有色領域は、領域抽出部13により別々の画像オブジェクト領域として抽出される。しかし、図17では、35個の有色領域が集まって1つの画像オブジェクトを構成しているので、当該35個の有色領域は1つの画像オブジェクト領域として抽出されることが望ましい。ここで、図17のような図柄の場合、各領域の外接矩形は隣接する領域の外接矩形と重複し、かつ当該2つの領域の特徴(色など)は互いに類似する。したがって、2つの画像オブジェクト領域の外接矩形が互いに重複し、かつ当該2つの画像オブジェクト領域の特徴が互いに類似する場合には、当該2つの画像オブジェクト領域は1つの画像オブジェクト領域を構成する可能性が高い。
[Second specific example]
FIG. 17 shows an example of symbols included in the input image. In FIG. 17, a white area represents a background area, and 35 gray areas on the white area represent colored areas. The 35 colored areas are extracted as separate image object areas by the area extracting unit 13. However, in FIG. 17, since 35 colored areas are gathered to constitute one image object, it is desirable that the 35 colored areas are extracted as one image object area. Here, in the case of the design as shown in FIG. 17, the circumscribed rectangle of each region overlaps with the circumscribed rectangle of the adjacent region, and the characteristics (colors, etc.) of the two regions are similar to each other. Therefore, when the circumscribed rectangles of the two image object areas overlap with each other and the characteristics of the two image object areas are similar to each other, the two image object areas may constitute one image object area. high.

上記の事情等に鑑み、本例では、領域統合部14は、領域抽出部13により抽出された画像オブジェクト領域のうちの2つの画像オブジェクト領域の外接矩形が互いに重複し、かつ当該2つの画像オブジェクト領域の特徴が互いに所定程度以上類似する場合に、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。   In view of the above circumstances and the like, in this example, the region integration unit 14 overlaps the circumscribed rectangles of the two image object regions of the image object regions extracted by the region extraction unit 13, and the two image objects. When the features of the regions are similar to each other by a predetermined degree or more, the two image object regions are integrated into one image object region.

具体的には、領域統合部14は、領域抽出部13により抽出された各画像オブジェクト領域の外接矩形を特定し、任意の2つの画像オブジェクト領域の外接矩形について重複関係を調査する。そして、重複関係が成立する場合に、当該2つの画像オブジェクト領域の特徴量を求め、当該2つの特徴量を比較し、当該比較の結果に応じて、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。具体的には、領域統合部14は、所定の判定基準に従って、当該2つの特徴量が類似するか否かを判定し、類似すると判定された場合に、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。   Specifically, the region integration unit 14 specifies a circumscribed rectangle of each image object region extracted by the region extracting unit 13, and investigates the overlapping relationship between the circumscribed rectangles of any two image object regions. When the overlapping relationship is established, the feature amounts of the two image object regions are obtained, the two feature amounts are compared, and the two image object regions are converted into one image object according to the comparison result. Integrate into the area. Specifically, the region integration unit 14 determines whether or not the two feature amounts are similar according to a predetermined determination criterion, and when it is determined that they are similar, the two image object regions are converted into one image. Integrate into the object area.

一つの態様では、上記特徴量は、画像オブジェクト領域に係る画像オブジェクトの色情報、画像オブジェクト領域の外接矩形の大きさ、画像オブジェクト領域の形状、画像オブジェクト領域が外接矩形内に占める割合、画像オブジェクト領域に係る画像オブジェクトの属性情報(均一色領域か写真領域かなど)の少なくとも1つである。ただし、特徴量としては、上記以外のものが使用されてもよい。   In one aspect, the feature amount includes the color information of the image object related to the image object region, the size of the circumscribed rectangle of the image object region, the shape of the image object region, the ratio of the image object region in the circumscribed rectangle, the image object This is at least one of attribute information (such as a uniform color area or a photographic area) of the image object related to the area. However, features other than those described above may be used as feature amounts.

図18は、第2の具体例に係る統合処理の一例を示すフローチャートである。以下、図18を参照して、第2の具体例に係る統合処理の一例を説明する。   FIG. 18 is a flowchart illustrating an example of the integration process according to the second specific example. Hereinafter, an example of the integration process according to the second specific example will be described with reference to FIG.

画像処理装置10は、抽出された各画像オブジェクト領域の外接矩形を特定する(S21)。   The image processing apparatus 10 specifies a circumscribed rectangle of each extracted image object area (S21).

ついで、画像処理装置10は、抽出された画像オブジェクト領域の中から2つの画像オブジェクト領域を選択し、当該2つの画像オブジェクト領域の外接矩形の間に重複関係があるか否かを判定する(S22)。   Next, the image processing apparatus 10 selects two image object areas from the extracted image object areas, and determines whether or not there is an overlapping relationship between the circumscribed rectangles of the two image object areas (S22). ).

そして、重複関係があると判定された場合(S22:YES)、画像処理装置10は、当該2つの画像オブジェクト領域の特徴量が互いに類似するか否かを判定する(S23)。   If it is determined that there is an overlapping relationship (S22: YES), the image processing apparatus 10 determines whether or not the feature amounts of the two image object areas are similar to each other (S23).

特徴量が類似すると判定された場合(S23:YES)、画像処理装置10は、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合し(S24)、処理をステップS25に進める。   When it is determined that the feature amounts are similar (S23: YES), the image processing apparatus 10 integrates the two image object areas into one image object area (S24), and the process proceeds to step S25.

一方、ステップS22で重複関係がないと判定された場合(S22:NO)、およびステップS23で特徴量が類似しないと判定された場合(S23:NO)、画像所理装置10は、上記統合処理を行うことなく、処理をステップS25に進める。   On the other hand, when it is determined in step S22 that there is no overlapping relationship (S22: NO), and when it is determined in step S23 that the feature amount is not similar (S23: NO), the image processing apparatus 10 performs the integration process. The process proceeds to step S25 without performing.

ステップS25では、画像処理装置10は、すべての画像オブジェクト領域の組み合わせについて上記ステップS22〜S24の処理が終了したか否かを判断し、終了していない場合には(S25:NO)、処理をステップS22に戻し、終了している場合には(S25:YES)、処理を終了させる。   In step S25, the image processing apparatus 10 determines whether or not the processing in steps S22 to S24 has been completed for all combinations of image object regions. If not (S25: NO), the processing is performed. Returning to step S22, if the process is completed (S25: YES), the process is terminated.

上記処理により、例えば図17の図柄の35個の画像オブジェクト領域は、1つの画像オブジェクト領域に統合される。   By the above processing, for example, 35 image object areas of the design of FIG. 17 are integrated into one image object area.

[第3の具体例]
図19には、入力画像に含まれる図柄の一例が示されている。図19において、白色の領域は背景領域を表し、白色領域上の5個の灰色領域は有色領域を表している。当該5個の有色領域は、領域抽出部13により別々の画像オブジェクト領域として抽出される。しかし、図19では、5個の有色領域が集まって1つの画像オブジェクトを構成しているので、当該5個の有色領域は1つの画像オブジェクト領域として抽出されることが望ましい。ここで、図19のような図柄の場合、各領域の外接矩形は隣接する領域の外接矩形と近接し、かつ当該2つの領域の特徴(色など)は互いに類似する。したがって、2つの画像オブジェクト領域の外接矩形が互いに近接し、かつ当該2つの画像オブジェクト領域の特徴が互いに類似する場合には、当該2つの画像オブジェクト領域は1つの画像オブジェクト領域を構成する可能性が高い。
[Third example]
FIG. 19 shows an example of symbols included in the input image. In FIG. 19, a white area represents a background area, and five gray areas on the white area represent colored areas. The five colored regions are extracted as separate image object regions by the region extracting unit 13. However, in FIG. 19, since five colored areas are collected to form one image object, it is desirable that the five colored areas are extracted as one image object area. Here, in the case of the design as shown in FIG. 19, the circumscribed rectangle of each region is close to the circumscribed rectangle of the adjacent region, and the features (colors, etc.) of the two regions are similar to each other. Therefore, when the circumscribed rectangles of the two image object areas are close to each other and the characteristics of the two image object areas are similar to each other, the two image object areas may constitute one image object area. high.

上記の事情等に鑑み、本例では、領域統合部14は、領域抽出部13により抽出された画像オブジェクト領域のうちの2つの画像オブジェクト領域の外接矩形が互いに所定程度以上近接し、かつ当該2つの画像オブジェクト領域の特徴が互いに所定程度以上類似する場合に、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。   In view of the above circumstances and the like, in this example, the region integration unit 14 is such that the circumscribed rectangles of the two image object regions of the image object regions extracted by the region extraction unit 13 are close to each other by a predetermined degree or more. When the features of two image object areas are similar to each other by a predetermined degree or more, the two image object areas are integrated into one image object area.

一つの態様では、領域統合部14は、領域抽出部13により抽出された各画像オブジェクト領域の外接矩形を特定し、任意の2つの画像オブジェクト領域の外接矩形の近接度合いと、当該2つの画像オブジェクト領域の各々の特徴量とを求め、当該近接度合いと特徴量とに応じて、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。例えば、領域統合部14は、2つの特徴量の類似度合いを求め、外接矩形の近接度合いXが所定値X1以上であり、かつ特徴量の類似度合いYが所定値Y1以上である場合に、2つの画像オブジェクト領域を統合する。この場合、近接度合いXが大きくなるほど所定値Y1が小さくなるように、近接度合いXに応じて所定値Y1を変化させてもよい。また、類似度合いYが大きくなるほど所定値X1が小さくなるように、類似度合いYに応じて所定値X1を変化させてもよい。また、領域統合部14は、近接度合いXと類似度合いYとの積X・Yが所定値K以上である場合に、2つの画像オブジェクト領域を統合するようにしてもよい。上記近接度合いXは、例えば、水平および垂直方向の外接矩形間の距離、水平および垂直方向の外接矩形の重複幅(または重複の度合い)に基づき算出される。   In one aspect, the region integration unit 14 identifies a circumscribed rectangle of each image object region extracted by the region extraction unit 13, and determines the degree of proximity of the circumscribed rectangles of any two image object regions and the two image objects. Each feature amount of the region is obtained, and the two image object regions are integrated into one image object region according to the proximity degree and the feature amount. For example, the region integration unit 14 obtains a similarity degree between two feature amounts, and when the proximity degree X of the circumscribed rectangle is equal to or greater than a predetermined value X1 and the similarity degree Y of the feature amount is equal to or greater than a predetermined value Y1, Merge two image object areas. In this case, the predetermined value Y1 may be changed according to the proximity degree X so that the predetermined value Y1 decreases as the proximity degree X increases. Further, the predetermined value X1 may be changed according to the similarity degree Y so that the predetermined value X1 decreases as the similarity degree Y increases. Further, the region integration unit 14 may integrate two image object regions when the product X · Y of the proximity degree X and the similarity degree Y is equal to or greater than a predetermined value K. The proximity degree X is calculated based on, for example, the distance between the circumscribed rectangles in the horizontal and vertical directions and the overlapping width (or degree of overlap) of the circumscribed rectangles in the horizontal and vertical directions.

別の態様では、領域統合部14は、領域抽出部13により抽出された各画像オブジェクト領域の外接矩形を特定し、任意の2つの画像オブジェクト領域の外接矩形について所定距離内で近接する近接関係を調査する。そして、近接関係が成立する場合に、当該2つの画像オブジェクト領域の特徴量を求め、当該2つの特徴量を比較し、当該比較の結果に応じて、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。具体的には、領域統合部14は、所定の判定基準に従って、当該2つの特徴量が類似するか否かを判定し、類似すると判定された場合に、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合する。当該態様において、領域統合部14は、近接関係が成立する場合に、2つの特徴量を比較するとともに、2つの画像オブジェクト領域の外接矩形の近接度合いを求め、特徴量の比較結果と近接度合いとに応じて、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合してもよい。   In another aspect, the region integration unit 14 specifies a circumscribed rectangle of each image object region extracted by the region extracting unit 13, and establishes a proximity relationship in which a circumscribed rectangle of any two image object regions is close within a predetermined distance. investigate. When the proximity relationship is established, the feature amounts of the two image object regions are obtained, the two feature amounts are compared, and the two image object regions are converted into one image object according to the comparison result. Integrate into the area. Specifically, the region integration unit 14 determines whether or not the two feature amounts are similar according to a predetermined determination criterion, and when it is determined that they are similar, the two image object regions are converted into one image. Integrate into the object area. In this aspect, when the proximity relationship is established, the region integration unit 14 compares the two feature amounts, obtains the proximity degree of the circumscribed rectangle of the two image object regions, and compares the feature amount comparison result and the proximity degree. Accordingly, the two image object areas may be integrated into one image object area.

上記特徴量は、一つの態様では、画像オブジェクト領域に係る画像オブジェクトの色情報、画像オブジェクト領域の外接矩形の大きさ、画像オブジェクト領域の形状、画像オブジェクト領域が外接矩形内に占める割合、画像オブジェクト領域に係る画像オブジェクトの属性情報(均一色領域か写真領域かなど)の少なくとも1つである。ただし、特徴量としては、上記以外のものが使用されてもよい。   In one aspect, the feature amount includes the color information of the image object related to the image object area, the size of the circumscribed rectangle of the image object area, the shape of the image object area, the ratio of the image object area in the circumscribed rectangle, the image object This is at least one of attribute information (such as a uniform color area or a photographic area) of the image object related to the area. However, features other than those described above may be used as feature amounts.

図20は、第3の具体例に係る統合処理の一例を示すフローチャートである。以下、図20を参照して、第3の具体例に係る統合処理の一例を説明する。   FIG. 20 is a flowchart illustrating an example of the integration process according to the third specific example. Hereinafter, an example of the integration process according to the third specific example will be described with reference to FIG.

画像処理装置10は、抽出された各画像オブジェクト領域の外接矩形を特定する(S31)。   The image processing apparatus 10 specifies a circumscribed rectangle of each extracted image object area (S31).

ついで、画像処理装置10は、抽出された画像オブジェクト領域の中から2つの画像オブジェクト領域を選択し、当該2つの画像オブジェクト領域の外接矩形の間に近接関係があるか否かを判定する(S32)。例えば、画像処理装置10は、外接矩形間の距離を算出し、当該距離が所定値以下であるか否かを判定する。   Next, the image processing apparatus 10 selects two image object areas from the extracted image object areas, and determines whether or not there is a proximity relationship between the circumscribed rectangles of the two image object areas (S32). ). For example, the image processing apparatus 10 calculates a distance between circumscribed rectangles and determines whether or not the distance is a predetermined value or less.

そして、近接関係があると判定された場合(S32:YES)、画像処理装置10は、当該2つの画像オブジェクト領域の特徴量を求める(S33)。また、画像処理装置10は、当該2つの画像オブジェクト領域の外接矩形の近接度合いを求める(S34)。   Then, when it is determined that there is a proximity relationship (S32: YES), the image processing apparatus 10 obtains the feature amounts of the two image object regions (S33). Further, the image processing apparatus 10 obtains the degree of proximity of the circumscribed rectangle between the two image object areas (S34).

ついで、画像処理装置10は、上記特徴量と近接度合いとに基づき、当該2つの画像オブジェクト領域を統合すべきか否かを判定する(S35)。例えば、画像処理装置10は、特徴量の類似度合いを算出し、当該類似度合いと近接度合いとの積が所定値以下であるか否かを判定する。   Next, the image processing apparatus 10 determines whether or not the two image object areas should be integrated based on the feature amount and the proximity degree (S35). For example, the image processing apparatus 10 calculates the similarity degree of the feature amount, and determines whether or not the product of the similarity degree and the proximity degree is a predetermined value or less.

そして、統合すべきと判定された場合(S35:YES)、画像処理装置10は、当該2つの画像オブジェクト領域を1つの画像オブジェクト領域に統合し(S36)、処理をステップS37に進める。   If it is determined that they should be integrated (S35: YES), the image processing apparatus 10 integrates the two image object areas into one image object area (S36), and advances the process to step S37.

一方、ステップS32で近接関係がないと判定された場合(S32:NO)、およびステップS35で統合すべきでないと判定された場合(S35:NO)、画像所理装置10は、上記統合処理を行うことなく、処理をステップS37に進める。   On the other hand, if it is determined in step S32 that there is no proximity relationship (S32: NO) and if it is determined in step S35 that it should not be integrated (S35: NO), the image processing apparatus 10 performs the integration process. Without performing this, the process proceeds to step S37.

ステップS37では、画像処理装置10は、すべての画像オブジェクト領域の組み合わせについて上記ステップS32〜S36の処理が終了したか否かを判断し、終了していない場合には(S37:NO)、処理をステップS32に戻し、終了している場合には(S37:YES)、処理を終了させる。   In step S37, the image processing apparatus 10 determines whether or not the processing in steps S32 to S36 has been completed for all combinations of image object regions. If not (S37: NO), the processing is performed. Returning to step S32, if the processing is completed (S37: YES), the processing is ended.

上記処理により、例えば図19の図柄の5個の画像オブジェクト領域は、1つの画像オブジェクト領域に統合される。   By the above processing, for example, five image object areas of the design of FIG. 19 are integrated into one image object area.

なお、本発明は、上記実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内で種々変更することができる。   In addition, this invention is not limited to the said embodiment, It can change variously within the range which does not deviate from the summary of this invention.

実施の形態に係る画像処理装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the image processing apparatus which concerns on embodiment. 入力画像の一例を示す図である。It is a figure which shows an example of an input image. 図2の画像を背景色で2値化して得られる2値画像の一例を示す図である。It is a figure which shows an example of the binary image obtained by binarizing the image of FIG. 2 with a background color. 図3の画像をラベリング処理して得られるラベリング画像の一例を示す図である。It is a figure which shows an example of the labeling image obtained by labeling the image of FIG. 図4の画像に統合処理して得られるラベリング画像の一例を示す図である。FIG. 5 is a diagram illustrating an example of a labeling image obtained by performing integration processing on the image of FIG. 4. マスク画像の一例を示す図である。It is a figure which shows an example of a mask image. 切り取り画像の一例を示す図である。It is a figure which shows an example of a cropped image. 画像オブジェクトの一例を示す図である。It is a figure which shows an example of an image object. 統合処理が実施されない場合におけるマスク画像の一例を示す図である。It is a figure which shows an example of the mask image in case integration processing is not implemented. 実施の形態に係る画像処理装置の動作の一例を示すフローチャートである。6 is a flowchart illustrating an example of an operation of the image processing apparatus according to the embodiment. 被包含領域が包含領域に近接するか否かの判定の例を説明するための図である。It is a figure for demonstrating the example of determination whether a to-be-included area adjoins to an inclusion area. 白抜き文字の画像端部との接触の一例を示す図である。It is a figure which shows an example of a contact with the image edge part of a white character. 漢字「田」の白抜き文字の一例を示す図である。It is a figure which shows an example of the outline character of the Chinese character "da". 包含領域への走査と追加走査とを説明するための図である。It is a figure for demonstrating the scan to an inclusion area | region, and an additional scan. 第1の具体例に係る統合処理の一例を示すフローチャートである。It is a flowchart which shows an example of the integration process which concerns on a 1st specific example. 第1の具体例に係る統合処理を説明するための図である。It is a figure for demonstrating the integration process which concerns on a 1st specific example. 第2の具体例を説明するための、入力画像に含まれる図柄の一例を示す図である。It is a figure which shows an example of the pattern contained in an input image for demonstrating a 2nd specific example. 第2の具体例に係る統合処理の一例を示すフローチャートである。It is a flowchart which shows an example of the integration process which concerns on a 2nd specific example. 第3の具体例を説明するための、入力画像に含まれる図柄の一例を示す図である。It is a figure which shows an example of the pattern contained in an input image for demonstrating a 3rd specific example. 第3の具体例に係る統合処理の一例を示すフローチャートである。It is a flowchart which shows an example of the integration process which concerns on a 3rd specific example.

符号の説明Explanation of symbols

10 画像処理装置、11 画像受付部、12 背景色特定部、13 領域抽出部、14 領域統合部、15 画像オブジェクト出力部。   DESCRIPTION OF SYMBOLS 10 Image processing apparatus, 11 Image reception part, 12 Background color specific part, 13 Area extraction part, 14 Area integration part, 15 Image object output part

Claims (8)

画像を受け付ける画像受付手段と、
前記画像の背景色を特定する背景色特定手段と、
前記画像の中から、前記背景色の領域で区画される各領域を、画像構成要素領域として抽出する領域抽出手段と、
前記抽出された画像構成要素領域のうちの少なくとも2つの画像構成要素領域同士の関係が、1つの画像構成要素領域として扱うべき所定の条件を満たす場合に、前記少なくとも2つの画像構成要素領域を1つの画像構成要素領域に統合する領域統合手段と、
を有し、
前記領域統合手段は、前記抽出された画像構成要素領域のうちある画像構成要素領域(以下、「被包含領域」と称す)の外接矩形が他の画像構成要素領域(以下、「包含領域」と称す)の外接矩形に包含され、かつ前記被包含領域が前記包含領域に所定程度以上近接する場合に、前記包含領域と前記被包含領域とを1つの画像構成要素領域に統合すると共に、前記被包含領域の外接矩形の4辺の各々について、当該辺が前記包含領域と近接するか否かを判定し、所定数の辺が前記包含領域に近接すると判定された場合に、前記被包含領域が前記包含領域に近接すると判定することを特徴とする画像処理装置。
Image receiving means for receiving images;
Background color specifying means for specifying the background color of the image;
An area extracting means for extracting each area partitioned by the background color area from the image as an image component area;
When the relationship between at least two image component regions of the extracted image component regions satisfies a predetermined condition to be treated as one image component region, the at least two image component regions are set to 1 Region integration means for integrating into one image component region;
I have a,
The region integration means is configured such that a circumscribed rectangle of an image component region (hereinafter referred to as “included region”) among the extracted image component regions is defined as another image component region (hereinafter referred to as “include region”). The inclusion area and the inclusion area are integrated into a single image component area, and the inclusion area is included in a single image component area. For each of the four sides of the circumscribed rectangle of the inclusion area, it is determined whether the side is close to the inclusion area, and when it is determined that a predetermined number of sides are close to the inclusion area, the inclusion area is An image processing apparatus that determines to be close to the inclusion area .
請求項に記載の画像処理装置であって、
前記領域統合手段は、前記辺上の各画素について、当該辺に垂直な方向について、当該画素と前記包含領域との間隔が所定間隔以下であるか否かを検査し、当該検査結果に基づき、当該辺が前記包含領域に近接するか否かを判定することを特徴とする画像処理装置。
The image processing apparatus according to claim 1 ,
The region integration means, for each pixel on the side, inspects whether the interval between the pixel and the inclusion region is equal to or less than a predetermined interval in a direction perpendicular to the side, and based on the inspection result, An image processing apparatus that determines whether or not the side is close to the inclusion area.
請求項に記載の画像処理装置であって、
前記領域統合手段は、前記辺上の画素のうち前記間隔が所定間隔以下である画素の個数が所定数以上である場合に、当該辺は前記包含領域に近接すると判定することを特徴とする画像処理装置。
The image processing apparatus according to claim 2 ,
The image is characterized in that the region integration unit determines that the side is close to the inclusion region when the number of pixels having the interval equal to or smaller than the predetermined interval among the pixels on the side is equal to or larger than the predetermined number. Processing equipment.
請求項に記載の画像処理装置であって、
前記領域統合手段は、前記辺上の各画素について、当該辺に垂直な方向について、当該画素と前記包含領域との間隔が所定間隔以下であり、かつ当該画素に対向する前記包含領域の幅が所定幅以上であるか否かを検査し、当該検査結果に基づき、当該辺が前記包含領域に近接するか否かを判定することを特徴とする画像処理装置。
The image processing apparatus according to claim 1 ,
For each pixel on the side, the region integration unit is configured such that, in a direction perpendicular to the side, the interval between the pixel and the inclusion region is equal to or less than a predetermined interval, and the width of the inclusion region facing the pixel is An image processing apparatus that inspects whether or not a width is equal to or greater than a predetermined width and determines whether or not the side is close to the inclusion region based on the inspection result.
請求項に記載の画像処理装置であって、
前記領域統合手段は、前記辺上の画素のうち前記間隔が所定間隔以下であり前記幅が所定幅以上である画素の個数が所定数以上である場合に、当該辺は前記包含領域に近接すると判定することを特徴とする画像処理装置。
The image processing apparatus according to claim 4 ,
The region integration unit may determine that the side is close to the inclusion region when the number of pixels of the pixels on the side is equal to or smaller than the predetermined interval and the width is equal to or larger than the predetermined number. An image processing apparatus characterized by determining.
請求項からのいずれか1項に記載の画像処理装置であって、
前記領域統合手段は、前記被包含領域の外接矩形が大きくなるほど前記所定間隔が大きくなるように、前記被包含領域の外接矩形の大きさに応じて前記所定間隔を変化させることを特徴とする画像処理装置。
An image processing apparatus according to any one of claims 2 to 5 ,
The area integration means changes the predetermined interval according to the size of the circumscribed rectangle of the inclusion region so that the predetermined interval increases as the circumscribed rectangle of the inclusion region increases. Processing equipment.
請求項からのいずれか1項に記載の画像処理装置であって、
前記領域統合手段は、前記被包含領域の外接矩形が大きくなるほど前記所定幅が大きくなるように、前記被包含領域の外接矩形の大きさに応じて前記所定幅を変化させることを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 4 to 6 ,
The area integration unit changes the predetermined width according to the size of the circumscribed rectangle of the inclusion area so that the predetermined width increases as the circumscribed rectangle of the inclusion area increases. Processing equipment.
コンピュータに、
画像を受け付ける手順と、
前記画像の背景色を特定する手順と、
前記画像の中から、前記背景色の領域で区画される各領域を、画像構成要素領域として抽出する手順と、
前記抽出された画像構成要素領域のうちの少なくとも2つの画像構成要素領域同士の関係が、1つの画像構成要素領域として扱うべき所定の条件を満たす場合に、前記少なくとも2つの画像構成要素領域を1つの画像構成要素領域に統合する手順と、
を実行させることを特徴とする画像処理プログラムであって、
前記統合する手順では、前記抽出された画像構成要素領域のうちある画像構成要素領域(以下、「被包含領域」と称す)の外接矩形が他の画像構成要素領域(以下、「包含領域」と称す)の外接矩形に包含され、かつ前記被包含領域が前記包含領域に所定程度以上近接する場合に、前記包含領域と前記被包含領域とを1つの画像構成要素領域に統合すると共に、前記被包含領域の外接矩形の4辺の各々について、当該辺が前記包含領域と近接するか否かを判定し、所定数の辺が前記包含領域に近接すると判定された場合に、前記被包含領域が前記包含領域に近接すると判定することを特徴とする画像処理プログラム。
On the computer,
The procedure for accepting images,
Identifying the background color of the image;
A procedure for extracting each area partitioned by the background color area from the image as an image component area;
When the relationship between at least two image component regions of the extracted image component regions satisfies a predetermined condition to be treated as one image component region, the at least two image component regions are set to 1 The steps to merge into one image component area,
An image processing program for causing the execution,
In the integration procedure, a circumscribed rectangle of an image component region (hereinafter referred to as “included region”) among the extracted image component regions is referred to as another image component region (hereinafter referred to as “include region”). The inclusion area and the inclusion area are integrated into a single image component area, and the inclusion area is included in a single image component area. For each of the four sides of the circumscribed rectangle of the inclusion area, it is determined whether the side is close to the inclusion area, and when it is determined that a predetermined number of sides are close to the inclusion area, the inclusion area is An image processing program that determines to be close to the inclusion area.
JP2008120966A 2008-05-07 2008-05-07 Image processing apparatus and image processing program Expired - Fee Related JP5104528B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008120966A JP5104528B2 (en) 2008-05-07 2008-05-07 Image processing apparatus and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008120966A JP5104528B2 (en) 2008-05-07 2008-05-07 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2009271691A JP2009271691A (en) 2009-11-19
JP5104528B2 true JP5104528B2 (en) 2012-12-19

Family

ID=41438191

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008120966A Expired - Fee Related JP5104528B2 (en) 2008-05-07 2008-05-07 Image processing apparatus and image processing program

Country Status (1)

Country Link
JP (1) JP5104528B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5636674B2 (en) * 2010-01-07 2014-12-10 富士ゼロックス株式会社 Image processing apparatus and image processing program
CN112639816A (en) * 2018-09-14 2021-04-09 三菱电机株式会社 Image information processing apparatus, image information processing method, and image information processing program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3504054B2 (en) * 1995-07-17 2004-03-08 株式会社東芝 Document processing apparatus and document processing method

Also Published As

Publication number Publication date
JP2009271691A (en) 2009-11-19

Similar Documents

Publication Publication Date Title
JP4745297B2 (en) Method and system for identifying regions of uniform color in digital images
JP2005309819A (en) Figure reading method, its device, major color extraction method, and its device
EP2645332B1 (en) Image processing device that separates image into plural regions
US8611658B2 (en) Image processing apparatus and image processing method
JP2007129535A (en) Image processor, image processing method, program thereof, and computer-readable recording medium recorded with same program
US7715624B2 (en) Recognizing or reproducing a character's color
JP5337563B2 (en) Form recognition method and apparatus
JP4423333B2 (en) Background area specifying method, background area specifying system, background color determining method, control program, and recording medium
WO2015002719A1 (en) Method of improving contrast for text extraction and recognition applications
JP2011013898A (en) Image processing apparatus, image processing method, and program
JP5104528B2 (en) Image processing apparatus and image processing program
JP5151708B2 (en) Image processing apparatus and image processing program
JP2004199622A (en) Apparatus and method for image processing, recording media, and program
JP2003087562A (en) Image processor and image processing method
US8660354B2 (en) Image processing apparatus including an obtaining unit, an isolating unit, a classifying unit, information processing apparatus, and image reading apparatus
JP2005175641A (en) Image processor
JP4631371B2 (en) Image processing device
JP2626108B2 (en) Pattern recognition method and apparatus
JP2019153230A (en) Information processor and information processing program
JP4973603B2 (en) Image processing apparatus and image processing program
CN114119427B (en) Picture conversion method, device, equipment and readable storage medium
JP2001143076A (en) Image processor
JP4650958B2 (en) Image processing apparatus, method, and program
JP2005184403A (en) Image processing apparatus
JP2003271973A (en) Method and program for image processing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110421

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120601

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120612

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120813

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: 20120904

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: 20120917

R150 Certificate of patent or registration of utility model

Ref document number: 5104528

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: 20151012

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees