JP5217960B2 - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP5217960B2
JP5217960B2 JP2008301358A JP2008301358A JP5217960B2 JP 5217960 B2 JP5217960 B2 JP 5217960B2 JP 2008301358 A JP2008301358 A JP 2008301358A JP 2008301358 A JP2008301358 A JP 2008301358A JP 5217960 B2 JP5217960 B2 JP 5217960B2
Authority
JP
Japan
Prior art keywords
area
candidate selection
image
region
block
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
JP2008301358A
Other languages
Japanese (ja)
Other versions
JP2010130214A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2008301358A priority Critical patent/JP5217960B2/en
Publication of JP2010130214A publication Critical patent/JP2010130214A/en
Application granted granted Critical
Publication of JP5217960B2 publication Critical patent/JP5217960B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

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

文書画像内の文字、写真、図、表(画像要素又は画像構成要素という)など、操作者が所望する領域を抜き出したい(コピー動作等)場合がある。このように、操作者がマウス等を用いて囲むようにその範囲(領域)を指定する場合、画像要素の四隅を正確に指定して抽出することは一般に困難な作業であるといえる。ゆえに実際には、所望の範囲より領域を大きくとったり小さくとったりして、大まかに抜き出したい領域を指定することが多かった。   There are cases where an operator desires to extract a region desired by an operator, such as a character, a photograph, a figure, or a table (referred to as an image element or an image component) in a document image (copy operation or the like). Thus, when the range (area) is specified so that the operator surrounds it with a mouse or the like, it can be said that it is generally difficult to accurately specify and extract the four corners of the image element. Therefore, in practice, it is often the case that an area to be roughly extracted is designated by taking an area larger or smaller than a desired range.

このような指定領域の切り出しに関して、例えば、図1のように文書画像内から必要な文字領域のみを無駄な領域を含めることなく切り出すよう指定操作できることが理想であるが、現実には、例えば、図2や図3のように余分な部分(領域)が含まれてしまったり、逆に不足する部分が出てきたりしてしまう場合も多い。   Regarding the clipping of the designated area, for example, it is ideal that the designation operation can be performed so as to cut out only the necessary character area from the document image without including the useless area as shown in FIG. In many cases, an extra portion (area) is included as shown in FIG. 2 or FIG. 3, or an insufficient portion appears on the contrary.

ところで、従来より文書画像から領域を抽出して処理する画像処理装置の技術がある。例えば、特許文献1には、一群の線素である連結したランを囲む矩形を生成することにより、文字列を切り出す矩形抽出方法の技術が記載されている。また、特許文献2には、指示された点を含む文書領域の抽出を、文書画像中の文字間隔等に基づいて行う領域指定方法等の技術が記載されている。また特許文献3には、2値化した画像の白画素の連なりである白ランのヒストグラムに基づいて設定した統合閾値により、領域抽出処理を行う文書画像の領域抽出方法の発明が開示されている。
特開平3−144873号公報 特開平3−204781号公報 特開平5−40849号公報
By the way, there is a technology of an image processing apparatus that extracts and processes a region from a document image. For example, Patent Document 1 describes a technique of a rectangle extraction method that cuts out a character string by generating a rectangle surrounding connected runs that are a group of line elements. Further, Patent Document 2 describes a technique such as an area designation method for extracting a document area including an instructed point based on a character interval or the like in a document image. Patent Document 3 discloses an invention of a region extraction method for a document image in which region extraction processing is performed using an integrated threshold set based on a white run histogram that is a series of white pixels in a binarized image. .
JP-A-3-144873 JP-A-3-204781 JP-A-5-40849

しかしながら、上記特許文献1から3に記載の発明では、操作者がマウスやタッチペン等のデバイスによって選択しようとする範囲を指定する場合に、その指定に基づいて、操作者が選択しようとした領域を取得することについては、考慮されていない。   However, in the inventions described in Patent Documents 1 to 3, when an operator designates a range to be selected by a device such as a mouse or a touch pen, an area to be selected by the operator is determined based on the designation. Acquisition is not considered.

即ち、選択しようとする文字領域が矩形の場合に、操作者が入力デバイスによってそのような範囲を正確に指定することは困難であるため、入力される範囲の指定は、切り出したい領域よりも面積が大きかったり小さかったりする矩形や閉多曲線(複数の曲線が接続されて形成される閉じた図形)になることがあるので、切り出された矩形領域には、例えば図3に示されるように、余分な領域や不足する領域が出てきてしまうという問題があった。   In other words, when the character area to be selected is a rectangle, it is difficult for an operator to specify such a range accurately by using an input device. May be a large or small rectangle or a closed multi-curve (closed figure formed by connecting a plurality of curves), for example, as shown in FIG. There was a problem that an extra area or an insufficient area appeared.

また、ヒストグラムに基づいて設定した統合閾値により領域抽出処理を行う場合、指定領域の中に罫線などの線が入っているとこれに引きずられてしまいうまく領域の抽出を行なうことができなかった。   In addition, when the region extraction process is performed using the integrated threshold set based on the histogram, if a line such as a ruled line is included in the designated region, it is dragged by this and the region cannot be extracted successfully.

本発明は、上記の点に鑑みて、これらの問題を解消するために発明されたものであり、操作者の意図に基づいて、文書画像から画像要素を含む領域の選択を行う画像処理装置及び画像処理方法、及びプログラムを提供することを目的としている。   The present invention has been invented in order to solve these problems in view of the above points, and an image processing apparatus that selects an area including an image element from a document image based on an intention of an operator, and An object is to provide an image processing method and a program.

上記目的を達成するために、本発明の画像処理装置は次の如き構成を採用した。   In order to achieve the above object, the image processing apparatus of the present invention employs the following configuration.

本発明の画像処理装置は、処理画像に対して指定された前記処理画像が有する指定領域に基づいて、前記処理画像から選択領域を取得する画像処理装置であって、前記指定領域の範囲を示す指定領域情報を取得する指定領域情報取得手段と、前記指定領域情報に基づいて、前記選択領域となりうる最大の領域である第1候補選択領域を取得する第1候補選択領域取得手段と、前記第1候補選択領域に含まれる画像要素の種別毎に当該候補選択領域を分割し、第2候補選択領域を取得する第2候補選択領域取得手段と、前記第2候補選択領域に含まれる画像要素に基づいて当該画像要素の領域を統合し、前記選択領域を取得する選択領域取得手段とを有することを特徴とする。   The image processing apparatus of the present invention is an image processing apparatus that acquires a selection area from the processed image based on a specified area included in the processed image specified for the processed image, and indicates the range of the specified area Designated area information obtaining means for obtaining designated area information; first candidate selection area obtaining means for obtaining a first candidate selection area that is the largest area that can be the selected area based on the designated area information; A second candidate selection area acquiring unit that divides the candidate selection area for each type of image element included in one candidate selection area and acquires a second candidate selection area; and an image element included in the second candidate selection area. And a selection area acquisition means for acquiring the selection area by integrating the areas of the image elements based on the selection area.

また、前記画像処理装置において、前記第1候補選択領域取得手段は、前記指定領域情報に基づいて、前記指定領域を包含する矩形領域を取得する矩形領域取得手段と、前記矩形領域の上下左右方向に前記選択領域となりうる最大領域範囲を画素の有無に基づき探索し、前記第1候補選択領域を決定する範囲探索手段とを有することを特徴とする。   In the image processing apparatus, the first candidate selection region acquisition unit includes a rectangular region acquisition unit that acquires a rectangular region including the specified region based on the specified region information, and vertical and horizontal directions of the rectangular region. And a range search means for searching for a maximum area range that can be the selection area based on the presence or absence of pixels and determining the first candidate selection area.

また、前記画像処理装置において、前記第2候補選択領域取得手段は、前記第1候補選択領域をブロック領域に分割するブロック領域分割手段と、分割された前記ブロック領域毎に濃度ヒストグラム測定をするヒストグラム測定手段と、測定された前記濃度ヒストグラムに基づいて、ブロック領域毎に含まれる画像要素の種別を判定し、当該ブロックの領域種別を判定するブロック領域種別判定手段と、ブロック毎の前記領域種別に基づいて、同一の領域種別からなる同種ブロック領域を取得する同種ブロック取得手段とを有することを特徴とする。   In the image processing apparatus, the second candidate selection region acquisition unit includes a block region dividing unit that divides the first candidate selection region into block regions, and a histogram that performs density histogram measurement for each of the divided block regions. Based on the measurement means, the measured density histogram, the type of the image element included for each block area, and the block area type determination means for determining the area type of the block, and the area type for each block And a homogeneous block acquisition means for acquiring a homogeneous block area consisting of the same area type.

また、前記画像処理装置において、前記第2候補選択領域取得手段は、同種ブロック領域が複数取得されたとき、前記指定領域に基づいて、複数の同種ブロック領域の中から一の同種ブロック領域を前記2候補選択領域として決定する決定手段とをさらに有することを特徴とする。   Further, in the image processing device, the second candidate selection area acquisition unit, when a plurality of similar block areas are acquired, based on the designated area, the same candidate block area from a plurality of the same block areas And determining means for determining as two candidate selection areas.

また、前記画像処理装置において、前記選択領域取得手段は、前記第2候補選択領域に含まれる画像要素を抽出する抽出手段と、前記画像要素の外接領域を統合する統合手段とを有することを特徴とする。   In the image processing apparatus, the selection area acquisition unit includes an extraction unit that extracts an image element included in the second candidate selection region, and an integration unit that integrates a circumscribed region of the image element. And

なお、上記課題を解決するため、本発明は、さらに、上記画像処理装置が備える各手段の機能を実現するステップを有する画像処理方法、又は、その画像処理方法をコンピュータに実行させるためのコンピュータプログラムとしてもよい。   In order to solve the above-described problem, the present invention further provides an image processing method including steps for realizing the functions of the respective units included in the image processing apparatus, or a computer program for causing a computer to execute the image processing method. It is good.

本発明の画像処理装置によれば、操作者の意図に基づいて、文書画像から画像要素を含む領域の選択を行う画像処理装置及び画像処理方法、及びプログラムを提供することができる。   According to the image processing apparatus of the present invention, it is possible to provide an image processing apparatus, an image processing method, and a program for selecting a region including an image element from a document image based on an intention of an operator.

以下、本発明の実施の形態について図面を参照しつつ説明を行う。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

<画像処理装置の構成例>
図4は、本発明の一実施形態に係る画像処理装置1及びその画像処理装置1に接続された装置等の構成図である。図4の画像処理装置は、CPU101、スキャナ部102、外部記憶部103、入力画像メモリ部104、表示部105、操作パネル部106、領域情報格納部107、画像処理部108、通信制御部109が、バスを介して接続され、画像処理装置1の機能を実現している。
<Configuration example of image processing apparatus>
FIG. 4 is a configuration diagram of the image processing apparatus 1 according to an embodiment of the present invention and apparatuses connected to the image processing apparatus 1. 4 includes a CPU 101, a scanner unit 102, an external storage unit 103, an input image memory unit 104, a display unit 105, an operation panel unit 106, an area information storage unit 107, an image processing unit 108, and a communication control unit 109. The functions of the image processing apparatus 1 are realized through a bus.

CPU101は、全体の制御を行う。スキャナ部102は、画像を読み取る装置を制御し、画像を取得する。外部記憶部103は、記憶媒体111等の記憶媒体のドライブや、ハードディスクドライブ112等の記憶装置が接続され、それらの記憶装置はCPU101によって制御される。画像メモリ部104は、スキャナ部102等から入力される画像のデータを含む画像処理装置1が処理する画像のデータを格納する。   The CPU 101 performs overall control. The scanner unit 102 controls an apparatus that reads an image and acquires an image. The external storage unit 103 is connected to a drive of a storage medium such as the storage medium 111 and a storage device such as the hard disk drive 112, and these storage devices are controlled by the CPU 101. The image memory unit 104 stores image data processed by the image processing apparatus 1 including image data input from the scanner unit 102 or the like.

表示部105は、画像処理装置1の状態等を表示し、さらに、処理画像のプレビュー表示を行う。操作パネル部106は、操作者が処理の指示等の入力を行うデバイスである。操作パネル部106は、また、操作者によって入力された領域の指定を受け付ける。なお、表示部105と操作パネル部106とは、一のオペレーションパネルとして構成されてもよい。   The display unit 105 displays the status of the image processing apparatus 1 and further displays a preview of the processed image. The operation panel unit 106 is a device through which an operator inputs processing instructions and the like. The operation panel unit 106 also accepts designation of an area input by the operator. The display unit 105 and the operation panel unit 106 may be configured as one operation panel.

領域情報格納部107は、操作パネル部106等から入力された領域の指定に係る情報(指定領域情報という)を格納するメモリである。指定領域情報については後述するが、操作者が入力した矩形又は閉曲線等を表現する座標等の情報である。   The area information storage unit 107 is a memory that stores information (designated area information) related to designation of an area input from the operation panel unit 106 or the like. Although the designated area information will be described later, it is information such as coordinates representing a rectangle or a closed curve input by the operator.

画像処理部108は、本発明の一実施の形態に係る画像処理方法を実現する処理を行う。この処理についての詳細は後述するが、指定領域情報に基づいて、余分な部分(領域)を除去したり不足する部分を補完したりして最終的に取得すべき選択領域を取得する処理である。   The image processing unit 108 performs processing for realizing the image processing method according to the embodiment of the present invention. Although details of this process will be described later, this process is a process of acquiring a selection area to be finally acquired by removing an excess part (area) or complementing an insufficient part based on designated area information. .

通信制御部109は、画像処理装置1とネットワーク110を介して接続される他の装置等との通信を制御する。通信制御部109により、他の装置との画像のデータの入出力、又は、他の装置からの領域の指定等の入力が行われる。   The communication control unit 109 controls communication between the image processing apparatus 1 and other devices connected via the network 110. The communication control unit 109 inputs / outputs image data to / from another device or inputs an area designation from another device.

なお、この画像処理装置1は、例えば、パーソナルコンピュータ(PC)、MFP(Multi Function Peripheral)、ファクシミリ(FAX)、デジタルカメラ、携帯電話、カーナビゲーションシステム等で実現されてもよい。   The image processing apparatus 1 may be realized by, for example, a personal computer (PC), an MFP (Multi Function Peripheral), a facsimile (FAX), a digital camera, a mobile phone, a car navigation system, or the like.

<機能>
図5は、本発明の一実施形態に係る画像処理装置1の主要機能を示す機能ブロック図である。画像処理装置1は、主要な機能として本発明に係る機能、即ち、指定領域情報取得部501、矩形領域取得部502、範囲探索部503と、ブロック領域分割部504、ヒストグラム測定部505、ブロック領域種別判定部506、同種ブロック取得部507と、抽出部508、統合部509とを有する。これら各機能部は前述の画像処理部108の行う機能ということもできる。なお、説明の観点で機能的な側面から各機能部のグループ分けを行なうことができる。機能部グループとして、(指定領域情報取得部501)、矩形領域取得部502、及び範囲探索部503を第1の候補選択領域を取得するための機能部グループとする。ブロック領域分割部504、ヒストグラム測定部505、ブロック領域種別判定部506、同種ブロック取得部507を第2の候補選択領域を取得するための機能部グループとする。抽出部508、統合部509を最終的に出力すべき選択領域を取得するための機能部グループとする。以下、各機能部について説明する。
<Function>
FIG. 5 is a functional block diagram showing main functions of the image processing apparatus 1 according to the embodiment of the present invention. The image processing apparatus 1 has functions according to the present invention as main functions, that is, a designated area information acquisition unit 501, a rectangular area acquisition unit 502, a range search unit 503, a block area division unit 504, a histogram measurement unit 505, and a block area. A type determination unit 506, a homogeneous block acquisition unit 507, an extraction unit 508, and an integration unit 509 are included. Each of these functional units can be said to be a function performed by the image processing unit 108 described above. It should be noted that each functional unit can be grouped from a functional aspect in terms of explanation. As the functional unit group, (designated region information acquisition unit 501), rectangular region acquisition unit 502, and range search unit 503 are used as functional unit groups for acquiring the first candidate selection region. The block region dividing unit 504, the histogram measuring unit 505, the block region type determining unit 506, and the same type block acquiring unit 507 are set as a functional unit group for acquiring the second candidate selection region. The extraction unit 508 and the integration unit 509 are function unit groups for acquiring a selection region to be finally output. Hereinafter, each functional unit will be described.

(第1の候補選択領域を取得するための機能部グループ)
指定領域情報取得部501は、指定領域の範囲を示す指定領域情報を取得する機能を有している。指定領域は、処理画像に対してユーザが指定した領域であって取得を所望する領域である。具体的には、図2や図3における入力指定領域がこれに相当する。指定領域情報は、例えば、指定領域に対応する座標情報といった指定領域を示す情報である。
(Function unit group for acquiring the first candidate selection area)
The designated area information acquisition unit 501 has a function of obtaining designated area information indicating the range of the designated area. The designated area is an area designated by the user for the processed image and desired to be acquired. Specifically, the input designation area in FIGS. 2 and 3 corresponds to this. The designated area information is information indicating the designated area, for example, coordinate information corresponding to the designated area.

矩形領域取得部502は、指定領域情報取得部501により取得された指定領域情報に基づいて、指定領域を接するようにして包含する矩形領域を取得する機能を有している。例えば、図3における入力指定領域は、マウスやタッチペン等のデバイスによって指定されており、矩形ではない。従って指定領域を包含する矩形領域を対象にして処理を行うためである。具体的な詳細は後述する。   The rectangular area acquisition unit 502 has a function of acquiring a rectangular area that includes and touches the specified area based on the specified area information acquired by the specified area information acquisition unit 501. For example, the input designation area in FIG. 3 is designated by a device such as a mouse or a touch pen, and is not rectangular. Therefore, the processing is performed on a rectangular area including the designated area. Specific details will be described later.

範囲探索部503は、矩形領域取得部502により取得された矩形領域に基づいて、(最終的に取得すべき)選択領域となりうる可能性のある最大の領域である(第1)候補選択領域を決定する機能を有している。候補選択領域とは、本発明に係る画像処理によって最終的に取得すべき選択領域の候補と暫定的になりうる領域を称している。例えば、図3における入力指定領域は、指定の領域に足りない部分があるため、これを補完すべく選択領域となりうる最大の領域である候補選択領域を取得するためである。具体的な詳細は後述するが、矩形領域の上下左右方向へ画素の有無に基づき選択領域となりうる最大領域範囲を探索する。   Based on the rectangular area acquired by the rectangular area acquisition unit 502, the range search unit 503 selects the (first) candidate selection area that is the maximum area that can be a selection area (to be finally acquired). It has a function to decide. The candidate selection area refers to an area that can be provisionally selected as a selection area candidate to be finally acquired by image processing according to the present invention. For example, the input designation area in FIG. 3 is for obtaining a candidate selection area that is the maximum area that can be a selection area to complement the specified area because there is a portion that is insufficient in the designated area. Although specific details will be described later, the maximum area range that can be the selection area is searched based on the presence or absence of pixels in the vertical and horizontal directions of the rectangular area.

(第2の候補選択領域を取得するための機能部グループ)
ブロック領域分割部504は、範囲探索部503により取得された(第1)候補選択領域をブロック領域に分割する機能を有している。画像処理単位をブロック単位にして扱うためである。
(Function unit group for acquiring the second candidate selection area)
The block area dividing unit 504 has a function of dividing the (first) candidate selection area acquired by the range searching unit 503 into block areas. This is because the image processing unit is handled in units of blocks.

ヒストグラム測定部505は、ブロック領域分割部504により分割されたブロック領域毎に濃度ヒストグラム測定をする機能を有している。ブロック領域の領域種別(属性)を判定するためである。   The histogram measuring unit 505 has a function of performing density histogram measurement for each block area divided by the block area dividing unit 504. This is for determining the area type (attribute) of the block area.

ブロック領域種別判定部506は、ヒストグラム測定部505により測定された濃度ヒストグラムに基づいて、ブロック領域毎に含まれる画像要素の種別を判定し、当該ブロック全体としての領域種別を判定する機能を有している。ブロック領域の領域種別とは、そのブロック領域が、例えば、文字を主に含む領域、図や写真を主に含む領域、表を主に含む領域など、どのような種類の画像(構成)要素を含む領域かの種別である。   The block area type determination unit 506 has a function of determining the type of image element included in each block area based on the density histogram measured by the histogram measurement unit 505 and determining the area type of the entire block. ing. The type of block area refers to what type of image (configuration) element the block area is, for example, an area mainly containing characters, an area mainly containing figures and photos, or an area mainly containing tables. The type of the area to be included.

同種ブロック取得部507は、ブロック領域種別判定部506により判定されたブロック領域毎の領域種別に基づいて、同一の領域種別からなる同種ブロック領域を取得する機能を有している。これにより例えば、文字を主に含む領域、図や写真を主に含む領域、表を主に含む領域など、種別毎に領域を区別できる。   The same type block acquisition unit 507 has a function of acquiring the same type block area composed of the same area type based on the area type for each block area determined by the block area type determination unit 506. Thereby, for example, the area can be distinguished for each type, such as an area mainly including characters, an area mainly including drawings and photographs, and an area mainly including tables.

(選択領域を取得するための機能部グループ)
抽出部508は、第2候補選択領域に含まれる画像要素を抽出する機能を有している。統合処理を行うためである。
(Function group for acquiring selected area)
The extraction unit 508 has a function of extracting image elements included in the second candidate selection area. This is for performing the integration process.

統合部509は、画像要素の領域(外接領域)を統合する機能を有している。詳細は後述するが、指定の領域からはみ出したような不要な領域の除去を目的としている。例えば、図1に示されるような選択領域を最終的に取得するためである。   The integration unit 509 has a function of integrating image element regions (circumscribed regions). Although details will be described later, the purpose is to remove an unnecessary area that protrudes from a specified area. For example, this is for finally acquiring a selection region as shown in FIG.

以上これらの機能は、実際にはCPU101が実行するプログラムにより実現されるものである。   As described above, these functions are actually realized by a program executed by the CPU 101.

<動作>
図6は、画像形成装置1の本発明に係る動作概要を説明するフローチャートである。前述したように、例えば、選択領域を取得する場合、ユーザによる入力指定領域(図3)では、はみ出した領域や余分な領域、またむしろ足りない領域が生じてしまっている。本発明に係る画像形成装置1は、このような問題を解決すべく文書画像内のユーザによる入力指定領域から、無駄な領域を含めない必要な領域(選択領域)のみを切り出す動作を行なうものである。以下、フローチャートに沿って適宜図面を参照しつつ説明を行なう。
<Operation>
FIG. 6 is a flowchart for explaining an outline of the operation of the image forming apparatus 1 according to the present invention. As described above, for example, when the selection area is acquired, in the input designation area (FIG. 3) by the user, a protruding area, an extra area, or rather an insufficient area is generated. The image forming apparatus 1 according to the present invention performs an operation of cutting out only a necessary area (selected area) that does not include a useless area from an input designation area by a user in a document image in order to solve such a problem. is there. Hereinafter, description will be made along the flowchart with reference to the drawings as appropriate.

ステップS601において、ファイルやスキャン、ネットワーク経由で画像データが入力される(画像入力手段)。インターネットから取得したウェブページ等に適用される場合にはこれを画像化するステップを含めることができる。   In step S601, image data is input via a file, scan, or network (image input means). When applied to a web page or the like obtained from the Internet, a step of imaging it can be included.

また、画像データは後述の処理をし易くするため二値化処理(二値化手段)を行うことができる。二値化手段は、入力された処理画像を、所定の閾値によって二値化する手段である。二値化手段は、処理画像の画素値の分布等に基づき、二値化処理を行ってもよく、また、予め定められた所定の閾値によって二値化処理を行ってもよい。   Further, the image data can be subjected to binarization processing (binarization means) in order to facilitate later-described processing. The binarization means is a means for binarizing the input processed image with a predetermined threshold. The binarization means may perform binarization processing based on the distribution of pixel values of the processed image, etc., or may perform binarization processing using a predetermined threshold value.

ステップS602で、指定領域情報取得部501は、指定領域情報を取得する。ユーザがマウスやタッチパネル等で取り出したい領域や画像構成要素を囲むような形で閉じた領域の指定(指定領域)を行なうと、画像形成装置1において指定領域は、例えば座標情報(指定領域情報)として認識され、前述の領域情報格納部107に格納されている。指定領域のそれぞれの座標情報(データ)は、S1(x, y), S2(x, y), … Sn(x, y)と表現できる。なお、この閉じた領域には、例えば、円、楕円、閉曲線、多角形等の形状がある。   In step S602, the designated area information acquisition unit 501 obtains designated area information. When the user designates an area that the user wants to take out with a mouse, a touch panel, or the like, or an area that is closed so as to surround the image components (designated area), the designated area in the image forming apparatus 1 is, for example, coordinate information (designated area information). And stored in the area information storage unit 107 described above. Each coordinate information (data) of the designated area can be expressed as S1 (x, y), S2 (x, y),... Sn (x, y). Note that the closed region includes shapes such as a circle, an ellipse, a closed curve, and a polygon.

ステップS603で、矩形領域取得部502は指定領域の矩形化、即ち指定領域を接する形で包含する矩形領域を取得する。具体的には、複数の指定領域の座標情報のうち、xの座標が最も小さい値(a)、xの座標が最も大きい値(b)、yの座標が最も小さい値(c)、yの座標が最も大きい値(d)を求めて、その値に基づいて矩形の頂点座標情報を取得する。こうして得られた座標情報( a , c )、( a , d )、( b , c )、( b , d ), a,b,c,d> 0 は4つの頂点(角)とする矩形を表し、即ちこれが指定領域を接する形で包含する矩形領域となる。これを図7に示す。図7は、矩形領域を示す図の一例である。なお、指定領域情報が既に矩形を示す場合は、それそのものが上記の矩形領域に等しい。   In step S <b> 603, the rectangular area acquisition unit 502 acquires a rectangular area that includes the specified area as a rectangle, i.e., covers the specified area. Specifically, among coordinate information of a plurality of designated areas, the x coordinate is the smallest value (a), the x coordinate is the largest value (b), the y coordinate is the smallest value (c), A value (d) having the largest coordinate is obtained, and rectangular vertex coordinate information is obtained based on the value. The coordinate information (a, c), (a, d), (b, c), (b, d), a, b, c, d> 0 thus obtained is a rectangle with four vertices (corners). In other words, this is a rectangular area including the specified area in contact with the specified area. This is shown in FIG. FIG. 7 is an example of a diagram illustrating a rectangular area. In addition, when the designated area information already indicates a rectangle, it itself is equal to the rectangular area.

ステップS604で、範囲探索部503は、指定領域を接する形で包含する矩形領域に基づいて、(最終的に取得すべき)選択領域となりうる最大の領域である第1候補選択領域を決定する。なお、「第1」とは後述する「第2」候補選択領域と区別するための便宜上の表現である。具体的には、矩形領域座標データを基点に、選択領域となりうる最大の領域である候補選択領域を決定するため、座標において上下左右方向に探索範囲を決定する。図8は、第1候補選択領域の決定を説明する図である。上下左右方向への探索範囲Hwl(左方向)、Hwr(右方向)、Hht(上方向)、Hhb(下方向)の値は、次のようなヒストグラム測定手順により決定することができる。   In step S604, the range search unit 503 determines a first candidate selection region that is the maximum region that can be a selection region (to be finally acquired) based on a rectangular region that includes the specified region in contact with the region. Note that “first” is a convenient expression for distinguishing from a “second” candidate selection region described later. Specifically, in order to determine a candidate selection area that is the maximum area that can be a selection area based on rectangular area coordinate data, a search range is determined in the vertical and horizontal directions in the coordinates. FIG. 8 is a diagram for explaining determination of the first candidate selection area. The search ranges Hwl (leftward), Hwr (rightward), Hht (upward), and Hhb (downward) in the vertical and horizontal directions can be determined by the following histogram measurement procedure.

(1)上下左右の画素のヒストグラムを求める。
Hwlの場合、x方向を基点にy方向の黒画素の個数を求める。
Hwrの場合、x方向を基点にy方向の黒画素の個数を求める。
Hhtの場合、y方向を基点にx方向の黒画素の個数を求める。
Hhbの場合、y方向を基点にx方向の黒画素の個数を求める。
(1) Obtain histograms of upper, lower, left and right pixels.
In the case of Hwl, the number of black pixels in the y direction from the x direction is obtained.
In the case of Hwr, the number of black pixels in the y direction with respect to the x direction is obtained.
In the case of Hht, the number of black pixels in the x direction from the y direction is obtained.
In the case of Hhb, the number of black pixels in the x direction from the y direction is obtained.

(2)空白間隔Sp(所定閾値)を越えているか否かを判定する。
黒画素の個数が0のとき、その座標より前の座標のヒストグラムが連続して0であり、かつ空白間隔Spより越えている場合、ヒストグラム測定を打ち切る。
(2) It is determined whether or not the blank interval Sp (predetermined threshold) is exceeded.
When the number of black pixels is 0, the histogram measurement is aborted if the histogram of the coordinates before that coordinate is continuously 0 and exceeds the blank space Sp.

図9は、探索範囲が決定された様子を示す図である。即ち、このような手順によって求められた結果を示している。座標情報としては、矩形領域の座標情報に基づいて、第1候補選択領域の座標情報( a-Hwl , c-Hhb )、( a-Hwl , d+Hht )、( b+Hwr , c-Hhb )、( b+Hwl , d+Hht )のように表すことができる。なお、図中、探索範囲Hwlについては黒画素は存在しないので0になっている。   FIG. 9 is a diagram illustrating how the search range is determined. That is, the result obtained by such a procedure is shown. As coordinate information, based on the coordinate information of the rectangular area, the coordinate information (a-Hwl, c-Hhb), (a-Hwl, d + Hht), (b + Hwr, c-Hhb) of the first candidate selection area ), (B + Hwl, d + Hht). In the figure, the search range Hwl is 0 because there is no black pixel.

ステップS605で、ブロック領域分割部504は、範囲探索部503により取得された第1候補選択領域をブロック領域に分割する。図中、大外枠線は、前ステップで範囲探索されて決定、取得された第1候補選択領域の外枠線である。第1候補選択領域を横方向に任意の間隔Nでブロック領域に分割する。任意の間隔Nは概ね15pt程度とするが特にこの値をもって特定されない。これを図10に示す。図10は、ブロック領域分割を示す図の一例である。   In step S605, the block area dividing unit 504 divides the first candidate selection area acquired by the range searching unit 503 into block areas. In the figure, the large outer frame line is the outer frame line of the first candidate selection region that is determined and acquired through a range search in the previous step. The first candidate selection area is divided into block areas at arbitrary intervals N in the horizontal direction. The arbitrary interval N is about 15 pt, but is not specified with this value. This is shown in FIG. FIG. 10 is an example of a diagram illustrating block area division.

ステップS606で、ヒストグラム測定部505は、分割されたブロック領域毎に黒画素(又は白画素)の濃度ヒストグラムを求める。これを図11に示す。図11は、ブロック領域毎に濃度ヒストグラム測定を示す図の一例である。ブロック領域において、文字領域と図形領域の濃度ヒストグラムの一例が示されている。   In step S606, the histogram measurement unit 505 obtains a density histogram of black pixels (or white pixels) for each divided block area. This is shown in FIG. FIG. 11 is an example of a diagram showing density histogram measurement for each block region. In the block area, an example of a density histogram of a character area and a graphic area is shown.

ステップS607で、ブロック領域種別判定部506は、測定された濃度ヒストグラムに基づいて、ブロック領域毎に含まれる画像要素の種別を判定し、当該ブロック領域の領域種別を判定する。前述したようにブロック領域の領域種別とは、そのブロック領域が、例えば、文字を主に含む領域、図や写真を主に含む領域、表を主に含む領域など、どのような種類の画像(構成)要素を含む領域かの種別である。   In step S607, the block region type determination unit 506 determines the type of image element included in each block region based on the measured density histogram, and determines the region type of the block region. As described above, the area type of a block area refers to any type of image (for example, an area mainly including characters, an area mainly including drawings and photographs, an area mainly including tables). Configuration) This is the type of region that contains the element.

ここで、濃度ヒストグラムは、領域種別毎に特有の傾向(特徴)を有している。つまり、文字領域は、濃度ヒストグラムが山の高さに対して十分な深さをもっている谷を複数個有している傾向にあり、図・写真領域では、濃度ヒストグラムが全体的になだらかであるかもしくは極端に変動する山谷を有している傾向にあり、表領域では、濃度ヒストグラムが直線に近い曲線を有している傾向にあるといえる。以下、簡単に具体例を示す。   Here, the density histogram has a unique tendency (feature) for each region type. In other words, the text area tends to have multiple valleys where the density histogram has a sufficient depth relative to the height of the peaks, and whether the density histogram is generally gentle in the figure / photo area. Alternatively, it can be said that the density histogram tends to have a curve close to a straight line in the table region. A specific example will be briefly described below.

図12は、文字画像領域の濃度ヒストグラムを示す図の一例である。(a)は文字画像の一例で、(b)は文字画像の「ソ」部分を拡大表示したもの、(c)は「ソ」部分をy方向の黒画素の個数をヒストグラムで表示したものである。また、図13は、図形(写真)画像領域の濃度ヒストグラムを示す図の一例である。(a)は写真画像の一例で、(b)は写真画像の目部分を拡大表示したもの、(c)は目部分をy方向の黒画素の個数をヒストグラムで表示したものである。また、図14は、表領域の濃度ヒストグラムを示す図の一例である。(a)は表部分の画像の一例で、(b)は表部分の線部分を拡大表示したもの、(c)は線部分をy方向の黒画素の個数をヒストグラムで表示したものである。領域毎の画像要素の種別により前述したような傾向を有していることが分かる。   FIG. 12 is an example of a diagram illustrating a density histogram of a character image region. (A) is an example of a character image, (b) is an enlarged display of the “So” portion of the character image, and (c) is an image of the “So” portion displayed as a histogram of the number of black pixels in the y direction. is there. FIG. 13 is an example of a diagram showing a density histogram of a graphic (photo) image area. (A) is an example of a photographic image, (b) is an enlarged display of the eye portion of the photographic image, and (c) is a histogram of the number of black pixels in the y direction. FIG. 14 is an example of a diagram showing a density histogram of a table area. (A) is an example of an image of the front portion, (b) is an enlarged display of the line portion of the front portion, and (c) is a display of the number of black pixels in the y direction of the line portion as a histogram. It can be seen that there is a tendency as described above depending on the type of image element for each region.

ブロック領域種別判定部506は、濃度ヒストグラムのこれらの傾向を利用して、ブロック領域が文字を主に含む領域(文字領域)、図や写真を主に含む領域(図形領域)、表を主に含む領域(表領域)であるかの判定を行い、当該ブロック領域の領域種別を判定する。図15は、濃度ヒストグラムの変動点を取得する様子を示す図の一例である。変動点のみで線を引いたグラフを取得して前述の傾向に基づいて判定される。   The block area type determination unit 506 uses these tendencies of the density histogram to make the block area an area mainly including characters (character area), an area mainly including figures and photographs (graphic area), and a table. A determination is made as to whether the block area is included (table area), and the area type of the block area is determined. FIG. 15 is an example of a diagram illustrating a state where the variation point of the density histogram is acquired. A graph obtained by drawing a line only at the changing point is acquired, and the determination is made based on the above-described tendency.

なお、判定にあたりさらに平準化処理を行うことができる。濃度ヒストグラムには、数点の変動点を持っており場合によっては誤判断する恐れがある。そこで、数点の変動点を誤差範囲として捉えて濃度ヒストグラムを平準化することにより、領域の種別判定をし易くできるからである。具体的には、黒画素に対する濃度ヒストグラムから、複数個の変動点Dnを求める。ここで変動点は、これまで上昇(下降)していた要素値がある値を堺に要素値が下降(上昇)していく変化点とする。変動点Dnと、次の変動点Dn+1の差を求め、その差を絶対値にしたものを変動点の変遷値Enとする( Dn - Dn+1 = E1 )。具体的に、
D1 - D2 = E1
D2 - D3 = E2
D3 - D4 = E3 ・・・
となる。変遷値Enが指定値(閾値)Gを下回っている場合、この変遷値Enを除外する。指定値Gは少なくとも間隔Nよりも少ない値にする。このようにして濃度ヒストグラムを平準化することができる。図16は、濃度ヒストグラムの平準化の一例を示す図の一例である。変遷値が小さい変動点を除外し、変遷値の大きい変動点のみで線を引いたグラフになっている。残った変遷値Enの個数、分布から、そのブロック領域は、文字領域、図形領域、表領域のいずれかを精度よく判定することができる。
In the determination, further leveling processing can be performed. The density histogram has several fluctuating points, and there is a risk of misjudgment in some cases. This is because it is possible to easily determine the type of the region by leveling the density histogram by taking several fluctuation points as error ranges. Specifically, a plurality of variation points Dn are obtained from the density histogram for black pixels. Here, the change point is a change point where the element value decreases (increases) with a certain value as the element value that has been increased (decreased). The difference between the change point Dn and the next change point Dn + 1 is obtained, and the difference value obtained as an absolute value is defined as the change value En of the change point (D n −D n + 1 = E 1 ). Specifically,
D 1 -D 2 = E 1
D 2 -D 3 = E 2
D 3 -D 4 = E 3 ...
It becomes. When the transition value En is lower than the specified value (threshold value) G, this transition value En is excluded. The designated value G is at least smaller than the interval N. In this way, the density histogram can be leveled. FIG. 16 is an example of a diagram illustrating an example of leveling of the density histogram. It is a graph in which the change points with small transition values are excluded and lines are drawn only at the change points with large transition values. From the number and distribution of the remaining transition values En, the block area can be accurately determined as a character area, a graphic area, or a table area.

ステップS608で、同種ブロック取得部507は、判定されたブロック領域毎の領域種別に基づいて、同一の領域種別からなる同種ブロック領域を取得する。図17は、同種ブロック領域でまとめられて取得された様子を示す図の一例である。各ブロック領域が同種の種別で結合され、文字領域と図形領域との同種ブロック領域とされている。取得された同種ブロック領域を、第2候補選択領域とする。   In step S608, the homogenous block acquisition unit 507 acquires the homogenous block area composed of the same area type based on the determined area type for each block area. FIG. 17 is an example of a diagram illustrating a state in which the blocks are acquired in the same type block area. Each block area is combined with the same type, and the character area and the graphic area are the same block area. The acquired same-type block area is set as a second candidate selection area.

なお、これまでの本実施形態において、同種ブロック領域は、2つ(文字領域と図形領域)取得されたがこのように複数の同種ブロック領域が取得された場合、どちらの同種ブロック領域を保持しておくか、それとも両領域を保持しておくかが問題である。つまり、文字領域を第2候補選択領域とするのか、図形領域を第2候補選択領域とするかである。ここで、図3の入力指定領域を鑑みればユーザが意図する領域は文字領域である。指定領域面積からして文字領域をその大部分を占めているからである。従って、文字領域、図形領域、表領域として判定された各ブロック領域を参照し、指定領域においてはどの種別(属性)が最も多いかを判定し、その種別(属性)のみで構成された同種ブロック領域を最終的に第2候補選択領域と決定しこれを取得する。   In the present embodiment thus far, two homogeneous block areas (character area and graphic area) have been acquired. When a plurality of identical block areas are acquired in this way, which homogeneous block area is retained. The problem is whether or not to keep both areas. That is, whether the character area is the second candidate selection area or the graphic area is the second candidate selection area. Here, in view of the input designation area in FIG. 3, the area intended by the user is a character area. This is because the character area occupies most of the designated area. Therefore, referring to each block area determined as a character area, a graphic area, and a table area, it is determined which type (attribute) is the most in the specified area, and the same type block composed only of that type (attribute) The region is finally determined as the second candidate selection region and acquired.

また、ユーザの意図として文字領域と図形領域の両方を取得したい場合、入力指定領域を参照すれば、指定領域において文字領域と図形領域とが占める割合は近いことになる。このような場合、閾値を設けて所定の占有割合比率である場合、ユーザの意図として文字領域と図形領域の両方を含むと判定し、文字領域と図形領域とを結合した領域を最終的に第2候補選択領域として取得することもできる。文字領域と図形領域とを結合した領域とするのは、後述する統合処理等において、文字領域、図形領域などの区別せずひとかたまりに扱えるようにするためである。   Further, when it is desired to acquire both the character area and the graphic area as the user's intention, the proportion of the character area and the graphic area in the designated area is close by referring to the input designated area. In such a case, if a threshold is provided and the ratio is a predetermined occupancy ratio, it is determined that the user's intention includes both the character area and the graphic area, and the area obtained by combining the character area and the graphic area is finally the first. It can also be acquired as two candidate selection areas. The reason why the character area and the graphic area are combined is to allow the character area and the graphic area to be handled as a single unit in the integration process described later.

なお、本実施形態においては前者、即ち図3の入力指定領域を鑑みればユーザが意図する領域は文字領域であるので、文字領域のみの同種ブロック領域を最終的に第2候補選択領域として取得する。   In the present embodiment, the former, that is, the area intended by the user is a character area in view of the input designation area shown in FIG. 3, and therefore, a homogeneous block area having only the character area is finally acquired as the second candidate selection area. .

以上、これまでの処理により第2候補選択領域が取得される。第2候補選択領域によって、図3に示されるようなユーザのいわばラフな領域指定にも関わらず、外側の範囲探索やブロック領域種別判等により、「希望の領域に足りない部分」は補完されたといえる。しかしながら、第2候補選択領域は「余分な部分は除去」されていない。従って、続く処理によりこの「余分な部分は除去」する処理を施すことにより最終的に取得すべき選択領域を得るものである。   As described above, the second candidate selection region is acquired by the processing so far. With the second candidate selection area, despite the rough area designation of the user as shown in FIG. 3, the “part lacking the desired area” is complemented by the outer area search, block area type determination, etc. It can be said that. However, the second candidate selection area is not “removed”. Accordingly, the selection area to be finally obtained is obtained by performing the process of “removing the excess part” by the subsequent process.

なお、ここでステップS605に戻り、補足説明を行っておく。ステップS605で、第1候補選択領域を横方向に任意の間隔Nでブロック領域に分割した。前提として文字等が横書きであれば前述の通り横方向のみのブロック領域に分割でよいし、逆に前提として文字等が縦書きであれば縦方向のみのブロック領域に分割し(例えば、図18参照)横方向の場合と同様の処理を行えばよい。また、前提として原稿画像において、文字方向が横方向(横書き)、縦方向(縦書き)であるかは明らかでない場合、両方向にブロック領域に分割して両方向のプロック領域について前述の処理を行うことができる。即ち、原稿画像の文字方向が横書き、縦書きに関わらず、まず両方向についてブロック領域化しヒストグラム測定処理を行う。ヒストグラム測定処理の段階で、横方向のヒストグラム測定処理は、x方向の画素の分布を測定し、その結果からx方向の領域を決定する(この処理ではy方向は見ない)。また縦方向のヒストグラム測定処理は、y方向の画素の分布を測定し、その結果からy方向の領域を決定する(この処理ではx方向を見ない)。そして各方向の結果を統合(総合)して図17に示すような同種ブロック領域を取得すればよい。   Here, returning to step S605, a supplementary explanation will be given. In step S605, the first candidate selection area is divided into block areas at arbitrary intervals N in the horizontal direction. Assuming that characters and the like are written horizontally, it may be divided into block regions only in the horizontal direction as described above. Conversely, if characters and the like are written vertically, it is divided into block regions only in the vertical direction (for example, FIG. 18). Reference) The same processing as in the horizontal direction may be performed. Also, as a premise, if it is not clear whether the character direction is horizontal (horizontal writing) or vertical (vertical writing) in the document image, the above processing is performed on the block areas in both directions by dividing into block areas in both directions. Can do. That is, regardless of whether the character direction of the original image is horizontal writing or vertical writing, first, block areas are formed in both directions, and histogram measurement processing is performed. At the stage of the histogram measurement process, the horizontal histogram measurement process measures the distribution of pixels in the x direction and determines the x direction region from the result (this process does not look at the y direction). In the histogram measurement process in the vertical direction, the distribution of pixels in the y direction is measured, and the area in the y direction is determined from the result (this process does not look at the x direction). Then, the result of each direction may be integrated (synthesized) to obtain a similar block area as shown in FIG.

再び図6に戻りステップS609で、抽出部508は、第2候補選択領域に含まれる画像要素を抽出する。外接領域(又は連結領域)を抽出するともいえる。これは即ち、指定の領域からはみ出したような不要な領域の除去が目的として統合処理を行うためである。具体的には、例えば前述の「特許文献1」(特開平3−144873号公報)に代表される矩形抽出方法により複数の外接領域を抽出する。図19は、第2候補選択領域から画像要素(外接領域)を抽出する様子を示す図である。即ち、第2候補選択領域内に含まれる複数の画像要素から、文字又は文字の外接領域を抽出する。外接領域(連結領域)は、文字、線、図形によらず、画素が連結している領域をいう。   Returning to FIG. 6 again, in step S609, the extraction unit 508 extracts image elements included in the second candidate selection region. It can also be said that a circumscribed area (or connected area) is extracted. This is because the integration process is performed for the purpose of removing unnecessary areas that protrude from the designated area. Specifically, for example, a plurality of circumscribed areas are extracted by a rectangular extraction method represented by the above-mentioned “Patent Document 1” (Japanese Patent Laid-Open No. 3-144873). FIG. 19 is a diagram illustrating a state in which an image element (circumscribed region) is extracted from the second candidate selection region. That is, a character or a circumscribed region of a character is extracted from a plurality of image elements included in the second candidate selection region. A circumscribed area (connected area) refers to an area where pixels are connected regardless of characters, lines, and figures.

ステップS610で、統合部509は、画像要素の外接領域を統合し、統合領域を取得する。つまり、前ステップで、複数の外接領域を除外しない、除外する、の選択を行ない、結果残った外接領域が抽出されて、この外接領域の統合処理(マージ)を行なう。この統合処理により、第2候補選択領域から「余分な部分は除去」できる。そして第2候補選択領域から余分な部分を除去したこの統合領域は、最終的に取得すべき選択領域とすることができる。図20は、統合領域を示す図である。   In step S610, the integration unit 509 integrates the circumscribed areas of the image elements, and acquires the integrated area. That is, in the previous step, selection is made so as not to exclude or exclude a plurality of circumscribed areas, and the remaining circumscribed areas are extracted, and integration processing (merging) of the circumscribed areas is performed. By this integration processing, “excess portions can be removed” from the second candidate selection region. Then, this integrated region obtained by removing the excess portion from the second candidate selection region can be a selection region to be finally acquired. FIG. 20 is a diagram illustrating an integrated area.

なお、補足として、本実施形態においては画像データの二値化処理を行う構成としたため、正確には、統合部509によって取得された統合領域に対応する領域を、処理画像(画像データ)から取得する。勿論、二値化処理を実行しない場合には、この処理は行われなくてよく、その場合には、統合部509によって生成、取得された統合領域がまさに最終的に取得すべき選択領域となる。二値化処理を実行しない場合には、前述の各機能部により処理される画像は、二値化されていない入力画像に基づく画像であるため、統合部509から出力される画像は選択領域そのものだからである。   As a supplement, since the present embodiment is configured to perform binarization processing of image data, accurately, an area corresponding to the integrated area acquired by the integrating unit 509 is acquired from the processed image (image data). To do. Of course, if the binarization process is not executed, this process may not be performed. In this case, the integrated area generated and acquired by the integrating unit 509 is the selection area to be finally acquired. . When the binarization process is not executed, the image processed by each of the above-described function units is an image based on the input image that has not been binarized, and thus the image output from the integration unit 509 is the selected region itself. That's why.

また、ステップS609において、外接領域の形状(例えば、正方形或いは細長いものか等)により、次の統合処理において統合しない外接領域(除外する範囲)を考慮することができる。画像要素の領域を統合する際には、例えば、細長い画像要素を含まないようにする場合、含ませたくない場合がある。また、文字列の周り囲むように枠線で囲まれているような場合、枠線を示す細長い傍線を示す外接領域(連結領域)は除外したい場合がある。つまり、指定領域に含まれる画像要素が文字の場合に、統合領域には枠線や罫線を含ませないようにもできる。画像要素の領域が細長いか否かは、図21に示される式を用いて判断される。但し、(width|height)は、画像要素の領域の、横の長さ又は縦の長さのうち、値が大きな長さの値、n及びαは、操作者等によって定められるパラメータである。例えば、画像の性質等に基づいて異なるようにしてもよい。画像要素の領域の、横の長さ又は縦の長さのうち、長辺の長さがl1より大きく、かつ、短辺の長さがl2より小さい場合には、その画像要素は、細長い領域であると判断する。このように、抽出する画像要素をどのようなものとするかについて、ユーザの使用状況等に応じて設定が可能である。   In step S609, a circumscribed area (excluded range) that is not integrated in the next integration process can be considered according to the shape of the circumscribed area (for example, square or elongated). When integrating regions of image elements, for example, when not including elongated image elements, it may not be desired to include them. In the case where the character string is surrounded by a frame line so as to surround the character string, it may be desired to exclude a circumscribed area (connected area) indicating a long and narrow side line indicating the frame line. In other words, when the image element included in the designated area is a character, the integrated area may not include a frame line or a ruled line. Whether or not the area of the image element is elongated is determined using the formula shown in FIG. However, (width | height) is a value having a large value in the horizontal length or vertical length of the region of the image element, and n and α are parameters determined by an operator or the like. For example, it may be different based on the properties of the image. Of the horizontal length or vertical length of the area of the image element, when the length of the long side is larger than l1 and the length of the short side is smaller than l2, the image element is an elongated area. It is judged that. In this way, it is possible to set what kind of image element is to be extracted according to the usage status of the user.

以上、本発明に係る画像処理装置1によれば、文書画像内の入力された指定領域において、不足する領域や余分な領域があっても、不足する領域はその補完を行い、余分な領域は除去するので、文書画像から適切な矩形領域を選択領域として抽出することが可能となる。即ち、操作者の意図に基づいて、文書画像から画像要素を含む領域の選択を行う画像処理装置、画像処理方法、及びプログラムを提供することができる。   As described above, according to the image processing apparatus 1 according to the present invention, even if there is a deficient area or an extra area in the input designated area in the document image, the deficient area is complemented, and the extra area is Since it is removed, an appropriate rectangular area can be extracted from the document image as the selected area. That is, it is possible to provide an image processing apparatus, an image processing method, and a program for selecting a region including an image element from a document image based on the operator's intention.

以上、発明を実施するための最良の形態について説明を行ったが、本発明は、この最良の形態で述べた実施の形態に限定されるものではない。本発明の主旨をそこなわない範囲で変更することが可能である。   Although the best mode for carrying out the invention has been described above, the present invention is not limited to the embodiment described in the best mode. Modifications can be made without departing from the spirit of the present invention.

例えば、本実施形態においては、文字部分を取り出したい場合について説明を行った。しかしながら、原稿画像中の文字だけでなく、図形(図写真)や表の領域も処理対象としているので、例えば、指定領域に係る対象が図形領域であれば、図形領域に対して同様の処理を行える。そして逆に文字領域を除外する処理が行われる。   For example, in the present embodiment, the case where it is desired to extract a character portion has been described. However, since not only the characters in the document image but also the graphic (illustration) and the table area are processed, for example, if the object related to the designated area is a graphic area, the same processing is performed on the graphic area. Yes. On the contrary, processing for excluding the character area is performed.

文書画像内から必要な領域を切り出す様子を示す図の一例である。It is an example of the figure which shows a mode that a required area | region is cut out from the document image. 文書画像内から必要な領域を切り出す様子を示す図の一例である。It is an example of the figure which shows a mode that a required area | region is cut out from the document image. 文書画像内から必要な領域を切り出す様子を示す図の一例である。It is an example of the figure which shows a mode that a required area | region is cut out from the document image. 本発明の一実施形態に係る画像処理装置1及びその画像処理装置1に接続された装置等の構成図である。1 is a configuration diagram of an image processing apparatus 1 and an apparatus connected to the image processing apparatus 1 according to an embodiment of the present invention. 本発明の一実施形態に係る画像処理装置1の主要機能を示す機能ブロック図である。It is a functional block diagram which shows the main functions of the image processing apparatus 1 which concerns on one Embodiment of this invention. 画像形成装置1の本発明に係る動作概要を説明するフローチャートである。3 is a flowchart for explaining an outline of the operation of the image forming apparatus 1 according to the present invention. 矩形領域を示す図の一例である。It is an example of the figure which shows a rectangular area. 第1候補選択領域の決定を説明する図である。It is a figure explaining determination of the 1st candidate selection field. 探索範囲が決定された様子を示す図である。It is a figure which shows a mode that the search range was determined. ブロック領域分割(横)を示す図の一例である。It is an example of the figure which shows block area division | segmentation (horizontal). ブロック領域毎に濃度ヒストグラム測定を示す図の一例である。It is an example of the figure which shows density histogram measurement for every block area. 文字画像領域の濃度ヒストグラムを示す図の一例である。It is an example of the figure which shows the density histogram of a character image area | region. 図形(写真)画像領域の濃度ヒストグラムを示す図の一例である。It is an example of the figure which shows the density histogram of a figure (photograph) image area. 表領域の濃度ヒストグラムを示す図の一例である。It is an example of the figure which shows the density | concentration histogram of a table area. 濃度ヒストグラムの変動点を取得する様子を示す図の一例である。It is an example of the figure which shows a mode that the fluctuation | variation point of a density histogram is acquired. 濃度ヒストグラムの平準化の一例を示す図の一例である。It is an example of the figure which shows an example of leveling of a density histogram. 同種ブロック領域でまとめられて取得された様子を示す図の一例である。It is an example of the figure which shows a mode that it integrated and acquired by the same kind block area | region. ブロック領域分割(縦)を示す図の一例である。It is an example of the figure which shows block area division | segmentation (vertical). 第2候補選択領域から画像要素(外接領域)を抽出する様子を示す図である。It is a figure which shows a mode that an image element (circumscribed area | region) is extracted from a 2nd candidate selection area | region. 統合領域を示す図である。It is a figure which shows an integrated area | region. 画像要素の領域が細長いか否かの判定式の一例を示す図である。It is a figure which shows an example of the determination formula whether the area | region of an image element is elongate.

符号の説明Explanation of symbols

1 画像処理装置
101 CPU
102 スキャナ部
103 外部記憶部
104 画像メモリ部
105 表示部
106 操作パネル部
107 領域情報格納部
108 画像処理部
109 通信制御部
110 ネットワーク
111 記憶媒体
112 ハードディスクドライブ
501 指定領域情報取得部
502 矩形領域取得部
503 範囲探索部
504 ブロック領域分割部
505 ヒストグラム測定部
506 ブロック領域種別判定部
507 同種ブロック取得部
508 抽出部
509 統合部
1 Image processing apparatus 101 CPU
102 Scanner unit 103 External storage unit 104 Image memory unit 105 Display unit 106 Operation panel unit 107 Area information storage unit 108 Image processing unit 109 Communication control unit 110 Network 111 Storage medium 112 Hard disk drive 501 Designated area information acquisition unit 502 Rectangular area acquisition unit 503 Range search unit 504 Block region division unit 505 Histogram measurement unit 506 Block region type determination unit 507 Same block acquisition unit 508 Extraction unit 509 Integration unit

Claims (11)

処理画像に対して指定された前記処理画像が有する指定領域に基づいて、前記処理画像から選択領域を取得する画像処理装置であって、
前記指定領域の範囲を示す指定領域情報を取得する指定領域情報取得手段と、
前記指定領域情報に基づいて、前記選択領域となりうる最大の領域である第1候補選択領域を取得する第1候補選択領域取得手段と、
前記第1候補選択領域に含まれる画像要素の種別毎に当該第1候補選択領域を分割し、画像要素の種別が同一である同種領域を第2候補選択領域として取得する第2候補選択領域取得手段と、
前記第2候補選択領域に含まれる画像要素に基づいて当該画像要素の領域を統合し、前記選択領域を取得する選択領域取得手段と、
を有し、
前記第2候補選択領域取得手段は、前記同種領域が複数取得されたとき、複数の同種領域の中から、前記指定領域と画像要素の種別が同一である同種領域を前記第2候補選択領域として取得すること、
を特徴とする画像処理装置。
An image processing apparatus that acquires a selection area from the processed image based on a specified area of the processed image specified for the processed image,
Designated area information obtaining means for obtaining designated area information indicating a range of the designated area;
First candidate selection area acquisition means for acquiring a first candidate selection area, which is the maximum area that can be the selection area, based on the designated area information;
Second candidate selection area acquisition that divides the first candidate selection area for each type of image element included in the first candidate selection area, and acquires the same type area having the same image element type as the second candidate selection area Means,
Selection area acquisition means for integrating the areas of the image elements based on the image elements included in the second candidate selection area and acquiring the selection area;
Have
The second candidate selection area acquisition means, when a plurality of the same kind of areas are acquired, the same kind area having the same type of image element as the designated area is selected as the second candidate selection area from the plurality of the same kind of areas. To get,
An image processing apparatus.
前記第2候補選択領域取得手段は、前記指定領域に含まれる画像要素の種別が複数ある場合、前記指定領域に最も多く含まれる画像要素の種別と同一の種別である同種領域を前記2候補選択領域として取得すること、When there are a plurality of types of image elements included in the designated region, the second candidate selection region acquisition unit selects the same type region that is the same type as the type of the image element most frequently included in the designated region. Getting as an area,
を特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1.
前記第1候補選択領域取得手段は、
前記指定領域情報に基づいて、前記指定領域を包含する矩形領域を取得する矩形領域取得手段と、
前記矩形領域の上下左右方向に前記選択領域となりうる最大領域範囲を画素の有無に基づき探索し、前記第1候補選択領域を決定する範囲探索手段と、
を有することを特徴とする請求項1又は2に記載の画像処理装置。
The first candidate selection area acquisition means includes
A rectangular area acquisition means for acquiring a rectangular area including the specified area based on the specified area information;
A range search means for searching for a maximum area range that can be the selection area in the vertical and horizontal directions of the rectangular area based on the presence or absence of pixels, and determining the first candidate selection area;
The image processing apparatus according to claim 1 or 2, characterized in that it has a.
前記第2候補選択領域取得手段は、
前記第1候補選択領域をブロック領域に分割するブロック領域分割手段と、
分割された前記ブロック領域毎に濃度ヒストグラム測定をするヒストグラム測定手段と、
測定された前記濃度ヒストグラムに基づいて、ブロック領域毎に含まれる画像要素の種別を判定し、当該ブロックの領域種別を判定するブロック領域種別判定手段と、
ブロック毎の前記領域種別に基づいて、同一の領域種別からなる同種ブロック領域を取得する同種ブロック取得手段と、
を有することを特徴とする請求項1ないし3何れか一項に記載の画像処理装置。
The second candidate selection area acquisition means includes
Block area dividing means for dividing the first candidate selection area into block areas;
A histogram measuring means for measuring a density histogram for each of the divided block areas;
Based on the measured density histogram, a type of image element included in each block region is determined, and a block region type determination unit that determines a region type of the block;
Based on the area type for each block, the same type block acquisition means for acquiring the same type block area consisting of the same area type,
The image processing apparatus according to any one of claims 1 to 3, characterized in that it has a.
前記選択領域取得手段は、
前記第2候補選択領域に含まれる画像要素を抽出する抽出手段と、
前記画像要素の外接領域を統合する統合手段と、
を有することを特徴とする請求項1ないし何れか一項に記載の画像処理装置。
The selection area acquisition means includes
Extraction means for extracting image elements included in the second candidate selection area;
An integration means for integrating a circumscribed area of the image element;
The image processing apparatus according to any one of claims 1 to 4, characterized in that it has a.
処理画像に対して指定された前記処理画像が有する指定領域に基づいて、前記処理画像から選択領域を取得する画像処理装置における画像処理方法であって、
前記指定領域の範囲を示す指定領域情報を取得する指定領域情報取得手順と、
コンピュータが、
前記指定領域情報に基づいて、前記選択領域となりうる最大の領域である第1候補選択領域を取得する第1候補選択領域取得手順と、
前記第1候補選択領域に含まれる画像要素の種別毎に当該第1候補選択領域を分割し、画像要素の種別が同一である同種領域を第2候補選択領域として取得する第2候補選択領域取得手順と、
前記第2候補選択領域に含まれる画像要素に基づいて当該画像要素の領域を統合し、前記選択領域を取得する選択領域取得手順と、
を有し、
前記第2候補選択領域取得手順は、前記同種領域が複数取得されたとき、複数の同種領域の中から、前記指定領域と画像要素の種別が同一である同種領域を前記第2候補選択領域として取得すること、
を有することを特徴とする画像処理方法。
An image processing method in an image processing apparatus for acquiring a selection region from the processed image based on a specified region included in the processed image specified for the processed image,
A designated area information obtaining procedure for obtaining designated area information indicating a range of the designated area;
Computer
A first candidate selection area acquisition procedure for acquiring a first candidate selection area, which is the maximum area that can be the selection area, based on the designated area information;
Second candidate selection area acquisition that divides the first candidate selection area for each type of image element included in the first candidate selection area, and acquires the same type area having the same image element type as the second candidate selection area Procedure and
A selection area acquisition procedure for integrating the areas of the image elements based on image elements included in the second candidate selection area and acquiring the selection area;
Have
In the second candidate selection region acquisition procedure, when a plurality of the same type regions are acquired, the same type region having the same type of image element as the designated region is selected as the second candidate selection region from among the plurality of same type regions. To get,
An image processing method comprising:
前記第2候補選択領域取得手順は、前記指定領域に含まれる画像要素の種別が複数ある場合、前記指定領域に最も多く含まれる画像要素の種別と同一の種別である同種領域を前記2候補選択領域として取得すること、In the second candidate selection area acquisition procedure, when there are a plurality of types of image elements included in the designated area, the same type area that is the same type as the type of image element that is contained most in the designated area is selected as the second candidate selection area. Getting as an area,
を特徴とする請求項6に記載の画像処理方法。The image processing method according to claim 6.
前記第1候補選択領域取得手順は、
前記指定領域情報に基づいて、前記指定領域を包含する矩形領域を取得する矩形領域取得手順と、
前記矩形領域の上下左右方向に前記選択領域となりうる最大領域範囲を画素の有無に基づき探索し、前記第1候補選択領域を決定する範囲探索手順と、
を有することを特徴とする請求項6又は7に記載の画像処理方法。
The first candidate selection area acquisition procedure includes:
Based on the specified area information, a rectangular area acquisition procedure for acquiring a rectangular area including the specified area;
A range search procedure for searching the maximum area range that can be the selection area in the vertical and horizontal directions of the rectangular area based on the presence or absence of pixels, and determining the first candidate selection area;
The image processing method according to claim 6, further comprising :
前記第2候補選択領域取得手順は、
前記第1候補選択領域をブロック領域に分割するブロック領域分割手順と、
分割された前記ブロック領域毎に濃度ヒストグラム測定をするヒストグラム測定手と、
測定された前記濃度ヒストグラムに基づいて、ブロック領域毎に含まれる画像要素の種別を判定し、当該ブロックの領域種別を判定するブロック領域種別判定手順と、
ブロック毎の前記領域種別に基づいて、同一の領域種別からなる同種ブロック領域を取得する同種ブロック取得手順、
を有することを特徴とする請求項6ないし8何れか一項に記載の画像処理方法。
The second candidate selection area acquisition procedure includes:
A block region dividing procedure for dividing the first candidate selection region into block regions;
A histogram measurement procedures for the density histogram measurement for each of the divided said block area,
A block region type determination procedure for determining the type of image element included in each block region based on the measured density histogram and determining the region type of the block;
Based on the area type for each block, the same type block acquisition procedure for acquiring the same type block area consisting of the same area type,
The image processing method according to claim 6, further comprising :
前記選択領域取得手順は、
前記第2候補選択領域に含まれる画像要素を抽出する抽出手順と、
前記画像要素の外接領域を統合する統合手順と、
を有することを特徴とする請求項ないし何れか一項に記載の画像処理方法。
The selection area acquisition procedure includes:
An extraction procedure for extracting image elements included in the second candidate selection region;
An integration procedure for integrating the circumscribed area of the image element;
The image processing method according to any one of claims 6 to 9, characterized in that it has a.
請求項ないし10何れか一項に記載の画像処理方法をコンピュータに実行させるためのプログラム。 A program for causing a computer to execute the image processing method according to any one of claims 6 to 10 .
JP2008301358A 2008-11-26 2008-11-26 Image processing apparatus, image processing method, and program Expired - Fee Related JP5217960B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008301358A JP5217960B2 (en) 2008-11-26 2008-11-26 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008301358A JP5217960B2 (en) 2008-11-26 2008-11-26 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2010130214A JP2010130214A (en) 2010-06-10
JP5217960B2 true JP5217960B2 (en) 2013-06-19

Family

ID=42330300

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008301358A Expired - Fee Related JP5217960B2 (en) 2008-11-26 2008-11-26 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5217960B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5948866B2 (en) * 2011-12-27 2016-07-06 富士ゼロックス株式会社 Image processing apparatus and program
US9690464B2 (en) 2013-03-21 2017-06-27 Ntt Docomo, Inc. Terminal device and method for selecting object
JP6201488B2 (en) 2013-07-29 2017-09-27 富士通株式会社 Selected character identification program, selected character identification method, and selected character identification device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07288679A (en) * 1994-04-15 1995-10-31 Minolta Co Ltd Image processing unit
JP2001043376A (en) * 1999-07-30 2001-02-16 Canon Inc Image extraction method and device and storage medium
JP2004032554A (en) * 2002-06-27 2004-01-29 Fuji Xerox Co Ltd Image processor and method
JP2006340103A (en) * 2005-06-02 2006-12-14 Canon Inc Image processor, image processing method, and program

Also Published As

Publication number Publication date
JP2010130214A (en) 2010-06-10

Similar Documents

Publication Publication Date Title
US9179035B2 (en) Method of editing static digital combined images comprising images of multiple objects
US10432820B2 (en) Image processing apparatus, image processing system, control method for image processing apparatus, and non-transitory computer readable medium
JP5059545B2 (en) Image processing apparatus and image processing method
US20090016605A1 (en) System and method for creating an editable template from a document image
JP6119689B2 (en) Electronic document generation system, electronic document generation apparatus and program
JPH08235349A (en) Page analysis system
US10455163B2 (en) Image processing apparatus that generates a combined image, control method, and storage medium
JP2011129114A (en) Detector, detection method, detection program, and recording medium
KR102090973B1 (en) Information processing apparatus, information processing method, and storage medium
US8538154B2 (en) Image processing method and image processing apparatus for extracting heading region from image of document
JP2010056827A (en) Apparatus and program for processing image
JP4730775B2 (en) Image processing device
JP5217960B2 (en) Image processing apparatus, image processing method, and program
US20080231869A1 (en) Method and apparatus for displaying document image, and computer program product
KR101903617B1 (en) Method for editing static digital combined images comprising images of multiple objects
JP6542230B2 (en) Method and system for correcting projected distortion
US20170091547A1 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
US10789715B2 (en) Image processing device, image processing method, and information storage medium
JP6700705B2 (en) Distribution system, information processing method, and program
JP2014238787A (en) Image processor and program
JP4040905B2 (en) Reduced image display device, method, program, and recording medium recording program
US9400926B2 (en) Image processing apparatus, image processing method, and non-transitory computer readable medium
JP6111796B2 (en) Image processing apparatus and computer program
US20160048729A1 (en) Information processing apparatus, control method, and storage medium storing program
JP4974367B2 (en) Region dividing method and apparatus, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110920

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120530

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120605

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120803

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130218

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160315

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 5217960

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160315

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees