JP2016197362A - Range specification program, range specification method, and range specification device - Google Patents

Range specification program, range specification method, and range specification device Download PDF

Info

Publication number
JP2016197362A
JP2016197362A JP2015077524A JP2015077524A JP2016197362A JP 2016197362 A JP2016197362 A JP 2016197362A JP 2015077524 A JP2015077524 A JP 2015077524A JP 2015077524 A JP2015077524 A JP 2015077524A JP 2016197362 A JP2016197362 A JP 2016197362A
Authority
JP
Japan
Prior art keywords
character candidate
character
colors
candidate area
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015077524A
Other languages
Japanese (ja)
Other versions
JP6503850B2 (en
Inventor
田中 宏
Hiroshi Tanaka
宏 田中
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2015077524A priority Critical patent/JP6503850B2/en
Publication of JP2016197362A publication Critical patent/JP2016197362A/en
Application granted granted Critical
Publication of JP6503850B2 publication Critical patent/JP6503850B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Character Input (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce, when selecting character strings from a document image, selection of a part other than characters as characters by mistake.SOLUTION: A range specification device 101 receives specification of a position in a document image 110, and extracts character candidate areas from the document image 110. The range specification device 101 extracts, from the extracted character candidate areas, the number of colors in a character candidate area close to a position designated by a user. The range specification device 101 specifies, from character candidate areas continuing from the character candidate area corresponding to the designated position, a character candidate area having the number of colors equal to or less than the extracted number of colors. The range specification device 101 determines the character candidate area corresponding to the designated position and the specified character candidate area as a selection range.SELECTED DRAWING: Figure 1

Description

本発明は、範囲指定プログラム、範囲指定方法および範囲指定装置に関する。   The present invention relates to a range specification program, a range specification method, and a range specification device.

従来、PC(パーソナル・コンピュータ)、タブレット端末や、スマートフォンに表示される文章の中に調べたい文字列があった場合など、画面に表示された文字列をコピーして利用したい場合がある。このため、表示された文字列を選択する技術がある。   Conventionally, there are cases where it is desired to copy and use a character string displayed on a screen, such as when there is a character string to be examined in a text displayed on a PC (personal computer), a tablet terminal, or a smartphone. For this reason, there is a technique for selecting a displayed character string.

先行技術としては、例えば、ユーザが文書データの位置を指定すると、指定位置を含む文字属性を獲得し、獲得した文字属性と同じ属性の文字を選択範囲とする技術がある。   As a prior art, for example, when a user designates a position of document data, a character attribute including the designated position is acquired, and a character having the same attribute as the acquired character attribute is selected.

特開平08−137867号公報Japanese Patent Laid-Open No. 08-137867

しかしながら、従来技術では、文書画像から文字列を選択する際、文字以外の部分を文字と誤って選択する場合がある。例えば、文書が写った画像である文書画像の場合、文書画像中の文書中の文字は、文字属性を有しないため、文字属性に基づいて文字を選択することはできない。一方、ユーザが指定した位置の領域と同じ大きさの領域を文字と選択すると、アイコンなどの大きさが文字と近似する領域も文字と誤って選択される。   However, in the prior art, when a character string is selected from a document image, a part other than a character may be erroneously selected as a character. For example, in the case of a document image that is an image of a document, since characters in the document in the document image do not have a character attribute, it is not possible to select a character based on the character attribute. On the other hand, when an area having the same size as the area specified by the user is selected as a character, an area such as an icon whose size approximates that of a character is also erroneously selected as a character.

一つの側面では、本発明は、文書画像から文字列を選択する際、文字以外の部分を文字と誤って選択することを軽減する範囲指定プログラム、範囲指定方法および範囲指定装置を提供することを目的とする。   In one aspect, the present invention provides a range designating program, a range designating method, and a range designating device that reduce the erroneous selection of a part other than a character when selecting a character string from a document image. Objective.

本発明の一側面によれば、文書画像内の位置の指定を受け付け、文書画像から、文字候補領域を抽出し、抽出した文字候補領域のうち、指定を受け付けた位置に対応する文字候補領域の色数を抽出し、指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した色数以下の文字候補領域を特定し、指定を受け付けた位置に対応する文字候補領域と、特定した文字候補領域と、を選択範囲にする範囲指定プログラム、範囲指定方法および範囲指定装置が提案される。   According to one aspect of the present invention, designation of a position in a document image is accepted, a character candidate area is extracted from the document image, and among the extracted character candidate areas, a character candidate area corresponding to the position where designation is accepted is extracted. The number of colors is extracted, and from among the character candidate areas connected to the character candidate area corresponding to the position where the designation is accepted, the character candidate area whose number of colors in the character candidate area is equal to or smaller than the extracted color number is identified and the designation is accepted. A range designating program, a range designating method, and a range designating device for selecting a character candidate region corresponding to a position and a specified character candidate region are proposed.

本発明の一態様によれば、文書画像から文字列を選択する際、文字以外の部分を文字と誤って選択することを軽減するという効果を奏する。   According to an aspect of the present invention, when selecting a character string from a document image, there is an effect of reducing erroneous selection of a portion other than a character as a character.

図1は、実施の形態にかかる範囲指定方法の一実施例を示す説明図である。FIG. 1 is an explanatory diagram of an example of a range specifying method according to the embodiment. 図2は、画像による色数の違いを示す説明図である。FIG. 2 is an explanatory diagram showing the difference in the number of colors depending on the image. 図3は、範囲指定装置101のハードウェア構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a hardware configuration example of the range specifying device 101. 図4は、範囲指定装置101の機能的構成例を示すブロック図である。FIG. 4 is a block diagram illustrating a functional configuration example of the range specifying device 101. 図5は、範囲指定装置101の範囲指定処理手順の一例を示すフローチャートである。FIG. 5 is a flowchart illustrating an example of a range specifying process procedure of the range specifying apparatus 101. 図6は、範囲指定装置101の文字候補領域抽出処理手順の一例を示すフローチャートである。FIG. 6 is a flowchart illustrating an example of a character candidate region extraction processing procedure of the range specifying device 101. 図7は、範囲指定装置101の文字画像色数抽出処理手順の一例を示すフローチャートである。FIG. 7 is a flowchart illustrating an example of the character image color number extraction processing procedure of the range specifying device 101. 図8は、範囲指定装置101の文字領域探索処理手順の一例を示すフローチャートである。FIG. 8 is a flowchart illustrating an example of a character area search processing procedure of the range specifying device 101. 図9は、文字画像の線幅を示す説明図である。FIG. 9 is an explanatory diagram showing the line width of a character image. 図10は、文字候補領域の探索を示す説明図である。FIG. 10 is an explanatory diagram showing a search for a character candidate area. 図11は、文字列領域の座標生成を示す説明図である。FIG. 11 is an explanatory diagram showing coordinate generation of a character string area. 図12は、連結成分の近接領域の統合を示す説明図である。FIG. 12 is an explanatory diagram illustrating the integration of adjacent regions of connected components. 図13は、文字候補領域の位置関係を示す説明図である。FIG. 13 is an explanatory diagram showing a positional relationship between character candidate areas.

以下に図面を参照して、本発明にかかる範囲指定プログラム、範囲指定方法および範囲指定装置の実施の形態を詳細に説明する。   Exemplary embodiments of a range specifying program, a range specifying method, and a range specifying apparatus according to the present invention will be described below in detail with reference to the drawings.

(実施の形態)
図1は、実施の形態にかかる範囲指定方法の一実施例を示す説明図である。図1の範囲指定装置101は、文書画像内の位置の指定を受け付けると、指定を受け付けた位置に対応する文字を含む文字領域を選択する装置である。具体的に、範囲指定装置101は、PC、タブレット端末等のコンピュータである。
(Embodiment)
FIG. 1 is an explanatory diagram of an example of a range specifying method according to the embodiment. 1 receives a designation of a position in a document image, and selects a character area including a character corresponding to the position where the designation is accepted. Specifically, the range specifying device 101 is a computer such as a PC or a tablet terminal.

ここで、文書画像とは、文書が写った画像である。例えば、文書画像は、PDF(Portable Document Format)等のPCの画面上に表示された電子文書、スキャナで取得した紙文書の画像、またはデジタルカメラで撮影された文書を含む写真である。また、位置の指定とは、文書画像内の一点を決めることである。例えば、範囲指定装置101は、文書画像に座標軸を設定し、座標により位置を指定することができる。また、文字領域とは、文書の中で文字が連なった領域である。具体的には、例えば、文字領域は、文字が並んだ文字列の領域のことである。   Here, the document image is an image showing a document. For example, the document image is a photograph including an electronic document displayed on a PC screen such as PDF (Portable Document Format), a paper document image obtained by a scanner, or a document photographed by a digital camera. The designation of the position is to determine one point in the document image. For example, the range designation device 101 can set a coordinate axis for a document image and designate a position by coordinates. The character area is an area where characters are continuous in the document. Specifically, for example, the character area is an area of a character string in which characters are arranged.

従来、PC、タブレット端末や、スマートフォンに表示される文字列の中に調べたい単語があった場合など、画面に表示した文字列をコピーして利用したい場合がある。このため、表示される文字列を選択する技術がある。   Conventionally, there are cases where it is desired to copy and use a character string displayed on a screen, such as when there is a word to be examined in a character string displayed on a PC, tablet terminal, or smartphone. For this reason, there is a technique for selecting a character string to be displayed.

例えば、表示している文書が、文書中に文字コードが格納されている電子文書であれば、目的とする単語の始点にカーソルを合わせてマウスでドラッグし、単語の文字列をコピーすることができる。   For example, if the displayed document is an electronic document in which a character code is stored in the document, the character string of the word can be copied by placing the cursor on the start point of the target word and dragging with the mouse. it can.

一方、文書画像に表示される文書や、文字コードのコピーを許さないアプリケーションの画面に表示される文書の場合には、文字コードを利用することができない。このため、例えば、ユーザは、文字列を囲む領域の頂点を2箇所指定することで、選択したい文字列を含む領域を画像に基づいて選択することができる。この場合、ユーザは、領域の頂点を2箇所指定するため、ユーザ操作が煩雑になる。また、スマートフォン等の小さな画面を指で操作する場合、ユーザが文字列を囲む領域の2頂点を指定するという操作は困難である。   On the other hand, in the case of a document displayed on a document image or a document displayed on the screen of an application that does not permit copying of the character code, the character code cannot be used. For this reason, for example, the user can select the area | region containing the character string to select based on an image by designating two vertexes of the area | region surrounding a character string. In this case, since the user designates two vertices of the area, the user operation becomes complicated. Further, when a small screen such as a smartphone is operated with a finger, it is difficult for the user to specify two vertices of an area surrounding a character string.

このため、2頂点を指定するのではなく、ユーザが指定した文書データの位置の属性を獲得して、獲得した文字の属性と同じ属性の文字を選択範囲とする技術がある。ここで、文字の属性とは、文字に、文字の性質や設定などを示す付加的な情報である。例えば、文字の属性は、ゴシック体や明朝体等の文字のフォントの属性、アンダーライン等の文字の設定などがある。   For this reason, there is a technique in which the attribute of the position of the document data specified by the user is acquired instead of specifying the two vertices, and the character having the same attribute as the acquired character attribute is selected. Here, the attribute of the character is additional information indicating the character or setting of the character. For example, the character attributes include font properties of characters such as Gothic and Mincho, and character settings such as underline.

しかしながら、文書画像の場合、文字属性は存在しないため、文字属性で文字を判断することができない。このため、例えば、文字の領域を、ユーザが指定した領域と近似する大きさの領域と判断することができる。しかし、この場合、アイコンが同じような大きさであると、アイコンなどの文字以外の領域も文字として誤って認識されてしまう。   However, in the case of a document image, since there is no character attribute, it is not possible to determine a character using the character attribute. For this reason, for example, the character region can be determined as a region having a size approximate to the region specified by the user. However, in this case, if the icons have the same size, an area other than a character such as an icon is erroneously recognized as a character.

そこで、実施の形態では、範囲指定装置101は、文書画像から文字領域を選択する際、指定された文字候補領域に連なり、当該文字候補領域の色数以下の文字候補領域を選択する。これにより、範囲指定装置101は、文書画像から文字を選択する際、文字以外の部分を文字と誤って選択することを軽減することができる。このため、文字コードを含まない、また、文字の属性を抽出することができない場合でも、ユーザは、文書画像内の1点を指定することで、文字領域を選択することができる。   Therefore, in the embodiment, when selecting a character area from a document image, the range specifying device 101 selects a character candidate area that is connected to the specified character candidate area and is equal to or less than the number of colors of the character candidate area. Thereby, the range specifying device 101 can reduce erroneous selection of portions other than characters as characters when selecting characters from a document image. For this reason, even when the character code is not included and the character attribute cannot be extracted, the user can select the character region by designating one point in the document image.

以下、実施の形態にかかる範囲指定装置101の一実施例について説明する。図1の例では、範囲指定装置101は、文書画像110の文字列「file1」の範囲を指定する例である。   Hereinafter, an example of the range specifying device 101 according to the embodiment will be described. In the example of FIG. 1, the range specifying device 101 is an example of specifying the range of the character string “file1” of the document image 110.

(1)範囲指定装置101は、文書画像110内の位置の指定を受け付ける。例えば、範囲指定装置101は、ユーザが文書画像110の一点を、指でタッチクリックする操作で、位置の指定を受け付ける。   (1) The range designating device 101 accepts designation of a position in the document image 110. For example, the range designation device 101 accepts designation of a position by an operation in which the user touches and clicks a point on the document image 110 with a finger.

図1の例では、アイコンと文字列「file1」が文書画像110に表示され、範囲指定装置101は、文書画像110内の「l」が表示されている領域と最も距離が短い位置の指定を受け付ける。   In the example of FIG. 1, an icon and a character string “file1” are displayed on the document image 110, and the range specifying device 101 specifies a position having the shortest distance from the area where “l” is displayed in the document image 110. Accept.

(2)範囲指定装置101は、文書画像110から、文字候補領域を抽出する。ここで、文字候補領域とは、文書画像110の中で文字が存在する可能性のある領域のことである。例えば、範囲指定装置101は、文書画像110の画素の連結成分を生成し、近接する連結成分を統合した領域の大きさに基づいて、文字候補領域を抽出する。   (2) The range specifying device 101 extracts a character candidate area from the document image 110. Here, the character candidate area is an area in the document image 110 where a character may exist. For example, the range specifying device 101 generates a connected component of the pixels of the document image 110 and extracts a character candidate region based on the size of the region obtained by integrating adjacent connected components.

図1の例では、範囲指定装置101は、文書画像110から、文字候補領域111〜文字候補領域116を抽出する。ここでは、範囲指定装置101は、アイコンの領域の大きさが文字の領域と近似するため、アイコンの領域も文字候補領域111として抽出する。   In the example of FIG. 1, the range specifying device 101 extracts character candidate areas 111 to character candidate areas 116 from the document image 110. Here, the range designating apparatus 101 extracts the icon area as the character candidate area 111 because the size of the icon area approximates that of the character area.

(3)範囲指定装置101は、文字候補領域のうち、指定を受け付けた位置に対応する文字候補領域の色数を抽出する。   (3) The range designating device 101 extracts the number of colors of the character candidate area corresponding to the position where the designation is accepted from the character candidate areas.

図1の例では、範囲指定装置101は、文字候補領域111〜文字候補領域116とユーザから指定された位置との距離を算出して、距離が最も短い文字候補領域114を特定し、文字候補領域114の色数を抽出する。図1では、ハッチングで文字候補領域114が特定されたことを示す。ここで、文字候補領域114は、白画素と黒画素から構成されているため、文字候補領域114の色数として2を抽出する。   In the example of FIG. 1, the range specifying device 101 calculates the distance between the character candidate area 111 to the character candidate area 116 and the position specified by the user, specifies the character candidate area 114 with the shortest distance, and sets the character candidate. The number of colors in the area 114 is extracted. FIG. 1 shows that the character candidate area 114 is specified by hatching. Here, since the character candidate area 114 is composed of white pixels and black pixels, 2 is extracted as the number of colors of the character candidate area 114.

(4)範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した前記色数以下の文字候補領域を特定する。ここで、指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域とは、指定を受け付けた位置に対応する文字候補領域から近接して続いている文字候補領域のことである。   (4) The range designating device 101 identifies a character candidate area in which the number of colors of the character candidate area is equal to or less than the extracted number of colors among the character candidate areas connected to the character candidate area corresponding to the position where the designation is accepted. Here, the character candidate area connected to the character candidate area corresponding to the position where the designation is accepted is a character candidate area which continues adjacent to the character candidate area corresponding to the position where the designation is accepted.

ここで、範囲指定装置101は、文字候補領域に文字がある場合と、文字候補領域に文字がない場合とでは、色数が異なることを利用して、文字候補領域に文字があるか否かを判断する。   Here, the range specifying device 101 uses the fact that the number of colors is different between the case where there is a character in the character candidate region and the case where there is no character in the character candidate region, and whether or not there is a character in the character candidate region. Judging.

図2は、画像による色数の違いを示す説明図である。図2(a)は、外接矩形領域で囲まれた二色の画素で構成される文字画像である。ここで、外接矩形領域とは、文字画像を囲む矩形の領域である。また、文字画像とは、文書画像の文書に含まれる文字を含む画像のことである。文字画像は、文字本体を表す前景画素と背景を表す背景画素とを有する。前景画素は単一色であることが多い。また、背景画素に様々な色が使われていると文字が読みづらいため、背景画素も単一色であることが多い。このため、文字画像は、二色の画素を有することが多い。   FIG. 2 is an explanatory diagram showing the difference in the number of colors depending on the image. FIG. 2A shows a character image composed of two-color pixels surrounded by a circumscribed rectangular area. Here, the circumscribed rectangular area is a rectangular area surrounding the character image. The character image is an image including characters included in the document image. The character image has foreground pixels representing the character body and background pixels representing the background. Foreground pixels are often a single color. In addition, when various colors are used for the background pixels, it is difficult to read the characters, so the background pixels are often of a single color. For this reason, a character image often has two-color pixels.

図2(b)は、外接矩形領域で囲まれた三色の画素を有する文字画像である。ここで、文字には影などの飾り表現が用いられることがある。このため、文字が影を含む二色の画素を有する場合がある。図2(b)において、第一前景画素は通常の文字画素であり、第二前景画素が影を表す画素を示す。この場合、文字画像には、背景画素も含めると三色の画素が用いられている。   FIG. 2B is a character image having three color pixels surrounded by a circumscribed rectangular area. Here, a decorative expression such as a shadow may be used for the character. For this reason, the character may have two-color pixels including a shadow. In FIG. 2B, the first foreground pixel is a normal character pixel, and the second foreground pixel indicates a pixel representing a shadow. In this case, three-color pixels are used in the character image including background pixels.

これに対して、文字画像以外の画像は、文字画像の色数よりも多くの色数が用いられていることが多い。例えば、図2(c)は、ファイル名の前に置かれたアイコンを拡大した図である。アイコンは、ユーザが文字と区別できるように多色で目立つようになっている。例えば、図2(c)に示すように、背景画素にグラデーションがかかっているため、背景画素は、濃い領域と薄い領域に分かれている。このため、背景画素は、複数の色が用いられている。   On the other hand, images other than character images often use more colors than character images. For example, FIG. 2C is an enlarged view of an icon placed in front of the file name. The icons are conspicuous in multiple colors so that the user can distinguish them from characters. For example, as shown in FIG. 2C, since the background pixel has gradation, the background pixel is divided into a dark region and a thin region. For this reason, the background pixel uses a plurality of colors.

以上のように、特殊なデザインの文字を除けば、文字画像は、黒文字、赤文字、青文字のように、文字は一色で表現される。さらに影付きの場合でも文字は二色で表現される。このように、文字画像は背景を含めて二色または三色で表現される。   As described above, with the exception of specially designed characters, character images are represented by a single color, such as black characters, red characters, and blue characters. In addition, even when there is a shadow, the characters are expressed in two colors. Thus, the character image is expressed in two colors or three colors including the background.

一方、アイコンなどの文字ではない画像は、一色で表現されることは少なく、文字画像より多くの色数が使われることが多い。これは、画像が例えば、色彩成分の無いグレイ画像である場合でも同様である。文字画像では二種類または三種類の明度値が使われるのに対して、文字でない画像では複数の明度値の画素が使われるという点で、カラー画像と同様である。   On the other hand, images that are not characters, such as icons, are rarely expressed in one color, and more colors are often used than character images. This is the same even when the image is, for example, a gray image having no color component. A character image is similar to a color image in that two or three kinds of brightness values are used, whereas a non-character image uses pixels of a plurality of brightness values.

ここで、図1に戻ると、図1の例では、範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域114に連なる文字候補領域111〜113、115、116の色数を求める。ここで、文字候補領域111は、アイコンであり背景にグラデーションが使用されているため、色数は二色より多くなる。一方、文字候補領域112、113、115、116は、文字であるため、色数は2である。このため、範囲指定装置101は、文字候補領域114の色数以下の文字候補領域112、113、115、116を特定する。図1では、ハッチングで文字候補領域112、113、115、116が特定されたことを示す。   Returning to FIG. 1, in the example of FIG. 1, the range specifying device 101 obtains the number of colors of the character candidate areas 111 to 113, 115, and 116 that are connected to the character candidate area 114 corresponding to the position where the specification is accepted. . Here, since the character candidate area 111 is an icon and gradation is used for the background, the number of colors is larger than two colors. On the other hand, since the character candidate areas 112, 113, 115, and 116 are characters, the number of colors is two. For this reason, the range designating apparatus 101 identifies character candidate areas 112, 113, 115, and 116 that are not more than the number of colors in the character candidate area 114. FIG. 1 shows that the character candidate areas 112, 113, 115, and 116 are specified by hatching.

(5)範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域と、特定した文字候補領域とを選択範囲にする。また、範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域と、特定した文字候補領域とを含む領域を選択範囲にすることができる。   (5) The range specifying device 101 sets the character candidate region corresponding to the position where the specification is received and the identified character candidate region as the selection range. Further, the range designating device 101 can select a region including the character candidate region corresponding to the position where the designation is received and the identified character candidate region as the selection range.

図1の例では、範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域114と、特定した文字候補領域112、113、115、116を含む領域117を選択範囲とする。   In the example of FIG. 1, the range specifying device 101 selects a character candidate region 114 corresponding to the position where the specification is received and a region 117 including the specified character candidate regions 112, 113, 115, and 116 as the selection range.

以上説明したように、範囲指定装置101は、文書画像110内の位置の指定を受け付け、文書画像110から、文字候補領域111〜116を抽出し、文字候補領域111〜116のうち、指定を受け付けた位置に対応する文字候補領域114の色数を抽出する。この後、範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域114に連なる文字候補領域111〜113、115、116のうち、文字候補領域の色数が、抽出した色数以下の文字候補領域112、113、115、116を特定する。最後に、範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域114と、特定した文字候補領域112、113、115、116と、を選択範囲にする。   As described above, the range designating apparatus 101 accepts designation of a position in the document image 110, extracts character candidate areas 111 to 116 from the document image 110, and accepts designation from the character candidate areas 111 to 116. The number of colors of the character candidate area 114 corresponding to the position is extracted. Thereafter, the range designating apparatus 101 has the number of colors in the character candidate area of the character candidate areas 111 to 113, 115, 116 connected to the character candidate area 114 corresponding to the position where the designation is received being equal to or less than the extracted number of colors. Character candidate areas 112, 113, 115, and 116 are specified. Finally, the range designating apparatus 101 sets the character candidate area 114 corresponding to the position where the designation is accepted and the identified character candidate areas 112, 113, 115, and 116 as the selection range.

これにより、範囲指定装置101は、文書画像中の文字列をマウスや指などによる指定によって簡単に選択することができ、従来と比較して文字ではない領域を誤って選択することによる不適切な領域選択を軽減することができる。   As a result, the range specifying device 101 can easily select a character string in a document image by specifying with a mouse or a finger, which is inappropriate due to erroneous selection of a region that is not a character compared to the conventional case. Area selection can be reduced.

このため、ユーザは、文書画像内の1点を指定することで、文字領域を選択することができる。ユーザは、スマートフォン等の小さな画面を指で操作する場合でも、文字領域を選択することが容易になる。   Therefore, the user can select a character area by designating one point in the document image. Even when the user operates a small screen such as a smartphone with a finger, it is easy to select a character area.

(範囲指定装置101のハードウェア構成例)
図3は、範囲指定装置101のハードウェア構成例を示すブロック図である。図3において、範囲指定装置101は、CPU(Central Processing Unit)301と、メモリ302と、I/F(Interface)303と、ディスクドライブ304と、ディスク305と、ディスプレイ306と、入力装置307と、を有する。また、各構成部は、バス300によってそれぞれ接続される。
(Hardware configuration example of range specification device 101)
FIG. 3 is a block diagram illustrating a hardware configuration example of the range specifying device 101. In FIG. 3, a range specifying device 101 includes a CPU (Central Processing Unit) 301, a memory 302, an I / F (Interface) 303, a disk drive 304, a disk 305, a display 306, an input device 307, Have Each component is connected by a bus 300.

ここで、CPU301は、範囲指定装置101の全体の制御を司る。メモリ302は、例えば、ROM(Read Only Memory)、RAM(Random Access Memory)およびフラッシュROMなどを有する。具体的には、例えば、フラッシュROMやROMが各種プログラムを記憶し、RAMは記憶部としてCPU301のワークエリアとして使用される。メモリ302に記憶されるプログラムは、CPU301にロードされることで、コーディングされている処理をCPU301に実行させる。   Here, the CPU 301 governs overall control of the range specifying device 101. The memory 302 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), and a flash ROM. Specifically, for example, a flash ROM or ROM stores various programs, and the RAM is used as a work area of the CPU 301 as a storage unit. The program stored in the memory 302 is loaded into the CPU 301 to cause the CPU 301 to execute the coded process.

I/F303は、通信回線を通じてLAN、WAN、インターネットなどのネットワーク310に接続され、ネットワーク310を介して他のコンピュータに接続される。そして、I/F303は、ネットワーク310と内部のインターフェースを司り、他のコンピュータからのデータの入出力を制御する。I/F303には、例えば、モデムやLANアダプタなどを採用することができる。   The I / F 303 is connected to a network 310 such as a LAN, a WAN, or the Internet through a communication line, and is connected to another computer via the network 310. The I / F 303 controls an internal interface with the network 310 and controls input / output of data from other computers. For example, a modem or a LAN adapter may be employed as the I / F 303.

ディスクドライブ304は、CPU301の制御に従ってディスク305に対するデータのリード/ライトを制御する。ディスク305は、ディスクドライブ304の制御で書き込まれたデータを記憶する。ディスク305としては、例えば、磁気ディスク、光ディスクなどが挙げられる。   The disk drive 304 controls reading / writing of data with respect to the disk 305 according to the control of the CPU 301. The disk 305 stores data written under the control of the disk drive 304. Examples of the disk 305 include a magnetic disk and an optical disk.

ディスプレイ306は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。ディスプレイ306は、例えば、液晶ディスプレイ、有機EL(Electroluminescence)ディスプレイなどを採用することができる。   A display 306 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box. As the display 306, for example, a liquid crystal display, an organic EL (Electroluminescence) display, or the like can be adopted.

入力装置307は、文字、数字、各種指示などの入力のためのキーを有し、データの入力を行う。入力装置307は、キーボードやマウスなどであってもよく、また、タッチパネル式の入力パッドやテンキーなどであってもよい。   The input device 307 has keys for inputting characters, numbers, various instructions, and the like, and inputs data. The input device 307 may be a keyboard or a mouse, or may be a touch panel type input pad or a numeric keypad.

なお、範囲指定装置101は、上述した構成部のうち、例えば、ディスクドライブ304、ディスク305などを有さないことにしてもよい。また、範囲指定装置101は、上述した構成部のほか、例えば、SSD(Solid State Drive)、スキャナ、プリンタなどを有することにしてもよい。   Note that the range specifying device 101 may not include the disk drive 304, the disk 305, and the like among the components described above. The range specifying device 101 may include, for example, an SSD (Solid State Drive), a scanner, and a printer in addition to the above-described components.

(範囲指定装置101の機能的構成例)
図4は、範囲指定装置101の機能的構成例を示すブロック図である。図4において範囲指定装置101は、抽出部401と、属性抽出部402と、特定部403と、生成部404と、を含む構成である。抽出部401と、属性抽出部402と、特定部403と、生成部404と、を含む制御部は、具体的には、例えば、図3に示したメモリ302などの記憶装置に記憶されたプログラムをCPU301に実行させることにより、その機能を実現する。各機能部の処理結果は、例えば、図3に示したメモリ302などの記憶装置に記憶される。
(Functional configuration example of range specification device 101)
FIG. 4 is a block diagram illustrating a functional configuration example of the range specifying device 101. In FIG. 4, the range specifying device 101 includes an extraction unit 401, an attribute extraction unit 402, a specification unit 403, and a generation unit 404. Specifically, the control unit including the extraction unit 401, the attribute extraction unit 402, the specifying unit 403, and the generation unit 404 is, for example, a program stored in a storage device such as the memory 302 illustrated in FIG. Is executed by causing the CPU 301 to execute the function. The processing result of each functional unit is stored in, for example, a storage device such as the memory 302 illustrated in FIG.

抽出部401は、入力された画像から文字候補領域を抽出する機能を有する。例えば、抽出部401は、入力装置307から文書画像を入力し、ディスプレイ306に表示し、入力装置307から座標の指定を受け付ける。また、抽出部401は、I/F303を介してネットワーク310から文書画像を入力することも可能である。抽出部401は、画像から文字候補領域を抽出する。ここで、抽出部401は、文書画像内に部分領域を設定して、部分領域から文字候補領域を抽出することもできる。また、範囲指定装置101が入力して処理する画像は、文書画像であるため、これ以降の記載では文書画像を画像と略することもある。   The extraction unit 401 has a function of extracting a character candidate area from the input image. For example, the extraction unit 401 inputs a document image from the input device 307, displays the document image on the display 306, and receives coordinate designation from the input device 307. The extraction unit 401 can also input a document image from the network 310 via the I / F 303. The extraction unit 401 extracts a character candidate area from the image. Here, the extraction unit 401 can also set a partial area in the document image and extract a character candidate area from the partial area. Further, since the image input and processed by the range specifying device 101 is a document image, the document image may be abbreviated as an image in the following description.

例えば、抽出部401は、画像を二値化して、連結成分を生成し、連結成分の画像属性を抽出する。抽出部401は、画像属性により、連結成分が文字部分領域であるか否かの判定を行い、文字部分領域である連結成分の近接領域を統合する。ここで、文字部分領域とは、文字の部分が存在する可能性のある領域のことである。また、近接領域について、図12を用いて詳しく後述する。   For example, the extraction unit 401 binarizes an image, generates a connected component, and extracts an image attribute of the connected component. The extraction unit 401 determines whether or not the connected component is a character partial region based on the image attribute, and integrates adjacent regions of the connected component that is the character partial region. Here, the character partial area is an area in which a character part may exist. The proximity region will be described later in detail with reference to FIG.

例えば、抽出部401は、統合した領域が文字候補領域であるか否かを判断し、文字候補領域であると判断した統合した領域を抽出する。   For example, the extraction unit 401 determines whether or not the integrated region is a character candidate region, and extracts the integrated region that is determined to be a character candidate region.

属性抽出部402は、抽出部401が抽出した文字候補領域から文字候補領域に含まれる画像の属性を抽出する機能を有する。例えば、属性抽出部402は、代表の文字候補領域を選択し、選択した文字候補領域から属性を抽出する。また、例えば、属性抽出部402は、属性として、文字候補領域の色数、文字サイズ、黒画素濃度、線幅または複雑度を抽出する。ここで、属性抽出部402は、抽出部401が画像を二値化する処理を行う前の画像を用いて、属性を抽出する。   The attribute extraction unit 402 has a function of extracting an attribute of an image included in the character candidate region from the character candidate region extracted by the extraction unit 401. For example, the attribute extraction unit 402 selects a representative character candidate area, and extracts attributes from the selected character candidate area. Further, for example, the attribute extraction unit 402 extracts the number of colors, the character size, the black pixel density, the line width, or the complexity of the character candidate area as the attribute. Here, the attribute extraction unit 402 extracts attributes using the image before the extraction unit 401 performs the process of binarizing the image.

属性抽出部402は、抽出した画像の属性のなかで、入力装置307から受け付ける座標の位置に対応する文字候補領域に含まれる画像の属性を代表属性とする。ここで、例えば、属性抽出部402は、入力装置307から受け付ける座標の位置に最も近い文字候補領域に含まれる画像の属性を代表属性とする。   The attribute extraction unit 402 uses the attribute of the image included in the character candidate area corresponding to the position of the coordinate received from the input device 307 as the representative attribute among the extracted image attributes. Here, for example, the attribute extraction unit 402 sets the attribute of the image included in the character candidate area closest to the coordinate position received from the input device 307 as the representative attribute.

例えば、属性抽出部402は、文字候補領域内の文字画像を切り出し、切り出した文字画像内の画素を色クラスタリングによって分類し、文字画像のノイズを除去して、色数をカウントする。   For example, the attribute extraction unit 402 cuts out a character image in the character candidate region, classifies pixels in the cut out character image by color clustering, removes noise from the character image, and counts the number of colors.

特定部403は、属性抽出部402が抽出した属性に基づいて、文字候補領域が文字領域であるか否かを決定する機能を有する。ここで、文字領域とは、文字を含む文字候補領域である。   The specifying unit 403 has a function of determining whether the character candidate area is a character area based on the attribute extracted by the attribute extracting unit 402. Here, the character region is a character candidate region including characters.

例えば、特定部403は、文字候補領域の相対的な位置関係に基づいて隣接する文字候補領域を順に探索し、文字列を構成する文字領域を特定する。また、特定部403は、文字列が縦書きか横書きかを判定して、検索方向を決定する。特定部403は、文字列が縦書きの場合、上方向および下方向に探索し、横書きの場合、右方向および左方向に探索する。   For example, the specifying unit 403 sequentially searches for adjacent character candidate areas based on the relative positional relationship between the character candidate areas, and specifies the character areas constituting the character string. Also, the specifying unit 403 determines whether the character string is vertical writing or horizontal writing and determines the search direction. The identifying unit 403 searches upward and downward when the character string is vertically written, and searches rightward and leftward when horizontally written.

また、例えば、特定部403は、探索で隣接領域が検索された場合、隣接領域に含まれる画像が文字であるか文字でないかの判定を行う。ここで、隣接領域とは、所定の隣接条件を満たす領域のことである。具体的には、隣接領域は、同一の文字列に属する可能性のある文字を含む領域である。   For example, when the adjacent area is searched by the search, the specifying unit 403 determines whether an image included in the adjacent area is a character or a character. Here, the adjacent region is a region that satisfies a predetermined adjacent condition. Specifically, the adjacent region is a region including characters that may belong to the same character string.

例えば、特定部403は、隣接領域の属性と代表属性とを比較することにより、隣接領域に含まれる画像が文字であるか文字でないかの判定を行う。ここで、属性が色数である場合、特定部403は、隣接領域の色数が代表属性の色数以下である場合、隣接領域に含まれる画像が文字であると判定する。   For example, the specifying unit 403 determines whether an image included in the adjacent area is a character or a character by comparing the attribute of the adjacent area with the representative attribute. Here, when the attribute is the number of colors, the specifying unit 403 determines that the image included in the adjacent area is a character when the number of colors of the adjacent area is equal to or less than the number of colors of the representative attribute.

また、例えば、特定部403は、代表属性の色数が二色であった場合は、隣接領域の色数が三色である場合、隣接領域に含まれる画像が文字であると判定することもできる。   For example, when the number of colors of the representative attribute is two, the specifying unit 403 may determine that the image included in the adjacent area is a character when the number of colors of the adjacent area is three. it can.

また、例えば、特定部403は、文字と判定された文字候補領域を文字領域と特定する。この後、特定部403は、文字と判定された文字候補領域の属性を用いて、代表属性を更新することもできる。   For example, the specifying unit 403 specifies a character candidate area determined to be a character as a character area. Thereafter, the specifying unit 403 can also update the representative attribute using the attribute of the character candidate area determined to be a character.

生成部404は、特定部403が決定した文字領域から文字列座標を生成する機能を有する。例えば、生成部404は、特定された文字候補領域の外接矩形を全て囲む矩形領域を生成し、矩形領域の左上の座標と右下の座標を生成する。   The generation unit 404 has a function of generating character string coordinates from the character area determined by the specifying unit 403. For example, the generation unit 404 generates a rectangular area that encloses all circumscribed rectangles of the specified character candidate area, and generates upper left coordinates and lower right coordinates of the rectangular area.

(範囲指定処理手順の一例)
図5は、範囲指定装置101の範囲指定処理手順の一例を示すフローチャートである。図5において、まず、範囲指定装置101は、画像を入力し、表示する(ステップS501)。例えば、範囲指定装置101は、スキャナでスキャンした画像や、デジタルカメラで撮影した画像を入力装置307またはI/F303から入力し、ディスプレイ306に表示する。
(Example of range specification processing procedure)
FIG. 5 is a flowchart illustrating an example of a range specifying process procedure of the range specifying apparatus 101. In FIG. 5, first, the range designation device 101 inputs and displays an image (step S501). For example, the range specifying device 101 inputs an image scanned by a scanner or an image captured by a digital camera from the input device 307 or the I / F 303 and displays the image on the display 306.

次に、範囲指定装置101は、画像内の座標を受け付ける(ステップS502)。例えば、範囲指定装置101は、入力装置307から画像内の座標を受け付ける。具体的には、入力装置307がマウス等のポインティングデバイスである場合、範囲指定装置101は、表示した画像内の1点をユーザがクリックする操作で画像内の座標を受け付ける。また、入力装置307がディスプレイ306と一体となったタッチパネルである場合、範囲指定装置101は、表示した画像内の1点をユーザがタッチクリックする操作で画像内の座標を受け付ける。   Next, the range specifying device 101 receives the coordinates in the image (step S502). For example, the range specifying device 101 receives the coordinates in the image from the input device 307. Specifically, when the input device 307 is a pointing device such as a mouse, the range specifying device 101 receives coordinates in the image by an operation in which the user clicks one point in the displayed image. When the input device 307 is a touch panel integrated with the display 306, the range specifying device 101 receives the coordinates in the image by an operation in which the user touch-clicks one point in the displayed image.

次に、範囲指定装置101は、文字候補領域を抽出する(ステップS503)。ここで、範囲指定装置101による文字候補領域抽出処理手順については、図6を用いて後述する。   Next, the range specifying device 101 extracts a character candidate area (step S503). Here, the character candidate region extraction processing procedure by the range specifying device 101 will be described later with reference to FIG.

また、範囲指定装置101は、文字候補領域を抽出する前に部分領域を設定することもできる。ここで、部分領域とは、画像内の事前に設定した範囲内の領域である。例えば、画像内で、受け付けた座標から所定の距離内にある領域を部分領域とすることができる。この場合、例えば、範囲指定装置101は、これ以降の処理を部分領域内で行うため、範囲指定処理を高速に行うことができる。   The range specifying device 101 can also set a partial area before extracting a character candidate area. Here, the partial area is an area within a preset range in the image. For example, an area within a predetermined distance from the received coordinates in the image can be set as a partial area. In this case, for example, since the range specifying apparatus 101 performs the subsequent processing in the partial area, the range specifying processing can be performed at high speed.

次に、範囲指定装置101は、文字画像の属性を抽出する(ステップS504)。ここで、文字画像とは、抽出した文字候補領域に含まれる文字を含む画像のことである。また、範囲指定装置101は、ステップS503の中で行われる画像を二値化する処理を行う前の画像を用いて、属性を抽出する。また、範囲指定装置101による文字画像の属性として色数を抽出する処理は、図7を用いて後述する。   Next, the range specifying device 101 extracts the attribute of the character image (step S504). Here, the character image is an image including characters included in the extracted character candidate area. In addition, the range specifying apparatus 101 extracts attributes using the image before performing the process of binarizing the image performed in step S503. The process of extracting the number of colors as the attribute of the character image by the range specifying device 101 will be described later with reference to FIG.

さらに、範囲指定装置101は、文字画像の属性として、文字サイズ、黒画素濃度、線幅および複雑度をさらに、抽出することもできる。例えば、範囲指定装置101は、文字サイズを文字候補領域の縦横のサイズから算出することができる。また、例えば、範囲指定装置101は、黒画素濃度を、文字候補領域の二値画像の白画素と黒画素の数を数えることで算出することができる。   Furthermore, the range specifying device 101 can further extract character size, black pixel density, line width, and complexity as attributes of the character image. For example, the range designation device 101 can calculate the character size from the vertical and horizontal sizes of the character candidate area. Further, for example, the range specifying device 101 can calculate the black pixel density by counting the number of white pixels and black pixels of the binary image in the character candidate area.

また、例えば、範囲指定装置101は、文字候補領域の二値画像を縦横にスキャンして、黒画素が連続する長さ(run length)の平均値を求めることで、線幅を求めることができる。これは、太字と細字の文字は線幅に応じて異なった値を示すので、線幅は、文字か否かを判定するための情報とすることができる。   Further, for example, the range designating device 101 can obtain the line width by scanning the binary image of the character candidate area vertically and horizontally and obtaining the average value of the lengths of continuous black pixels (run length). . Since bold and thin characters indicate different values depending on the line width, the line width can be used as information for determining whether or not the character is a character.

図9は、文字画像の線幅を示す説明図である。図9(a)は、横方向に二値画像をスキャンして、黒画素が連続する長さを求める例であり、図9(b)は、縦方向に二値画像をスキャンして、黒画素が連続する長さを求める例である。ここで、線幅の詳細は、下記参考文献1に記載されている。
(参考文献1:電子情報通信学会論文誌 Vol.J96−D No.4 pp1029−1038)
FIG. 9 is an explanatory diagram showing the line width of a character image. FIG. 9A shows an example in which a binary image is scanned in the horizontal direction to obtain a length of continuous black pixels. FIG. 9B shows a black image obtained by scanning the binary image in the vertical direction. It is an example which calculates | requires the length with which a pixel continues. Here, details of the line width are described in Reference Document 1 below.
(Reference 1: IEICE Transactions Vol. J96-D No. 4 pp1029-1038)

また、例えば、範囲指定装置101は、文字候補領域の二値画像を縦横にスキャンして、黒画素から白画素に変化する回数および白画素から黒画素に変化する回数に基づいて、文字候補領域の複雑度を求めることができる。   Further, for example, the range specifying device 101 scans a binary image of a character candidate area vertically and horizontally, and based on the number of times of changing from a black pixel to a white pixel and the number of times of changing from a white pixel to a black pixel, The complexity of can be obtained.

次に、範囲指定装置101は、代表属性を抽出する(ステップS505)。例えば、範囲指定装置101は、ユーザから受け付けた座標から最も近い文字候補領域から得られた文字画像属性を代表属性とする。ここで、ユーザから受け付けた座標を(xr,yr)として、一つの文字候補領域の矩形座標を左上角と右下角の座標で表して(x1,y1)−(x2,y2)とする。   Next, the range specifying device 101 extracts representative attributes (step S505). For example, the range designating device 101 sets the character image attribute obtained from the character candidate area closest to the coordinates received from the user as the representative attribute. Here, the coordinates received from the user are (xr, yr), and the rectangular coordinates of one character candidate area are represented by the coordinates of the upper left corner and the lower right corner (x1, y1) − (x2, y2).

この場合、範囲指定装置101は、矩形の中心座標(xc,yc)を、
xc=(x1+x2)/2,yc=(y1+y2)/2
で求めることができる。範囲指定装置101は、受け付けた座標と文字候補領域との距離dを
d=√((xc−xr)2+(yc−yr)2
から算出して、距離dが最も小さい文字候補領域の文字画像属性を代表属性とすることができる。
In this case, the range specifying device 101 determines the center coordinates (xc, yc) of the rectangle as
xc = (x1 + x2) / 2, yc = (y1 + y2) / 2
Can be obtained. The range specifying device 101 sets the distance d between the received coordinates and the character candidate area as d = √ ((xc−xr) 2 + (yc−yr) 2 ).
The character image attribute of the character candidate area having the smallest distance d can be used as the representative attribute.

次に、範囲指定装置101は、文字領域を探索する(ステップS506)。ここで、文字領域の探索は、範囲指定装置101が文字候補領域の相対的な位置関係に基づいて隣接する文字候補領域を順に探索し、文字列を構成する文字領域を特定する処理である。例えば、範囲指定装置101は、文字列が縦書きか横書きかを判定して、検索方向を決定することができる。ここで、文字列が縦書きか横書きかを判定する方法の詳細は、下記参考文献2に記載されている。
(参考文献2:特開平06−089330号公報)
Next, the range specifying device 101 searches for a character area (step S506). Here, the search of the character area is a process in which the range designating device 101 sequentially searches for adjacent character candidate areas based on the relative positional relationship of the character candidate areas, and specifies the character areas constituting the character string. For example, the range specifying device 101 can determine whether the character string is vertical writing or horizontal writing and determine the search direction. Here, details of a method for determining whether a character string is written vertically or horizontally are described in Reference Document 2 below.
(Reference 2: Japanese Patent Laid-Open No. 06-089330)

図10は、文字候補領域の探索を示す説明図である。図10(a)に示すように、範囲指定装置101は、最初、文字候補領域の指定を受け付ける。次に、図10(b)に示すように、範囲指定装置101は、最初、右方向に文字候補領域を探索する。ここで、図10(b)の一番左の文字候補領域は、図13で後述する隣接領域でないため、範囲指定装置101は探索を行わない。図10(b)では、文字候補領域と探索された領域は、太い線の四角で表されている。次に、図10(c)に示すように、範囲指定装置101は、左方向に文字候補領域を探索する。ここで、範囲指定装置101は、最初右から探索を行ったが、最初に左から行ってもよい。   FIG. 10 is an explanatory diagram showing a search for a character candidate area. As shown in FIG. 10A, the range designating device 101 first accepts designation of a character candidate area. Next, as shown in FIG. 10B, the range specifying device 101 first searches for a character candidate region in the right direction. Here, since the leftmost character candidate region in FIG. 10B is not an adjacent region which will be described later with reference to FIG. 13, the range specifying device 101 does not perform a search. In FIG. 10B, the character candidate area and the searched area are represented by a thick line square. Next, as shown in FIG. 10C, the range specifying device 101 searches for a character candidate region in the left direction. Here, the range specifying apparatus 101 searches from the right at the beginning, but may first search from the left.

範囲指定装置101による文字候補を右方向に探索する処理は、図8を用いて後述する。ここで、図8では、文字候補を右方向に探索する処理を説明しているが、文字候補を左方向、上方向および下方向に探索する処理は、右方向に探索する処理と同様に行うことができる。   The process of searching for character candidates in the right direction by the range specifying device 101 will be described later with reference to FIG. Here, FIG. 8 illustrates the process of searching for a character candidate in the right direction, but the process of searching for a character candidate in the left direction, the upward direction, and the downward direction is performed in the same manner as the process of searching in the right direction. be able to.

最後に、範囲指定装置101は、文字列領域の座標を生成する(ステップS507)。例えば、範囲指定装置101は、特定された文字領域の外接矩形の座標を生成する。また、例えば、範囲指定装置101は、特定された文字領域の外接矩形を全て囲む矩形領域の座標を生成する。例えば、範囲指定装置101は、矩形領域の左上の座標と右下の座標を生成する。   Finally, the range specifying device 101 generates the coordinates of the character string area (step S507). For example, the range specifying device 101 generates the coordinates of the circumscribed rectangle of the specified character area. For example, the range specifying device 101 generates the coordinates of a rectangular area that encloses all circumscribed rectangles of the specified character area. For example, the range specifying device 101 generates upper left coordinates and lower right coordinates of the rectangular area.

図11は、文字列領域の座標生成を示す説明図である。ここで、四角で表される領域が、文字候補領域であり、太い線の四角が特定された文字候補領域である。範囲指定装置101は、太い線の四角を含む点線の矩形領域の座標を生成する。   FIG. 11 is an explanatory diagram showing coordinate generation of a character string area. Here, an area represented by a square is a character candidate area, and a thick line square is a specified character candidate area. The range specifying device 101 generates coordinates of a dotted rectangular area including a thick square.

これにより、本フローチャートにおける一連の処理は終了する。本フローチャートを実行することで、範囲指定装置101は、受け付けた座標に対応する文字列領域の座標を生成することができる。   Thereby, a series of processing in this flowchart is completed. By executing this flowchart, the range specifying device 101 can generate the coordinates of the character string area corresponding to the received coordinates.

(文字候補領域抽出処理手順の一例)
図6は、範囲指定装置101の文字候補領域抽出処理手順の一例を示すフローチャートである。まず、範囲指定装置101は、画像を二値化する(ステップS601)。具体的には、範囲指定装置101は、画像内の画素を白画素と黒画素のいずれかに分類する。ここで、画像に部分領域が設定されている場合、範囲指定装置101は、画像内の部分領域を二値化することができる。
(Example of character candidate area extraction processing procedure)
FIG. 6 is a flowchart illustrating an example of a character candidate region extraction processing procedure of the range specifying device 101. First, the range specifying device 101 binarizes an image (step S601). Specifically, the range specifying device 101 classifies the pixels in the image as either white pixels or black pixels. Here, when a partial region is set in the image, the range specifying device 101 can binarize the partial region in the image.

次に、範囲指定装置101は、連結成分を生成する(ステップS602)。具体的には、範囲指定装置101は、黒画素が4近傍(上下左右)で隣接しているものを連結成分としてグループ化する。   Next, the range specifying device 101 generates a connected component (step S602). Specifically, the range designating apparatus 101 groups black pixels adjacent in four neighborhoods (up, down, left, and right) as connected components.

次に、範囲指定装置101は、連結成分の画像属性を抽出する(ステップS603)。例えば、範囲指定装置101は、連結成分の外接矩形領域において、矩形サイズや黒画素の濃度などの画像属性を求める。ここで、外接矩形領域とは、例えば、連結成分を含む最小の矩形の領域である。また、矩形サイズは、外接矩形領域の高さおよび幅の大きさである。   Next, the range specifying device 101 extracts the image attribute of the connected component (step S603). For example, the range designating device 101 obtains image attributes such as the rectangular size and the density of black pixels in the circumscribed rectangular area of the connected component. Here, the circumscribed rectangular area is, for example, a minimum rectangular area including a connected component. The rectangular size is the height and width of the circumscribed rectangular area.

次に、範囲指定装置101は、すべての連結成分に対して、文字部分領域であるか否か判定する(ステップS604)。例えば、範囲指定装置101は、連結成分の画像属性が一定の範囲内にあるものを文字または文字の一部を構成する要素として、文字部分領域であると判断する。   Next, the range designating apparatus 101 determines whether or not all connected components are character partial areas (step S604). For example, the range designating apparatus 101 determines that the image component attribute of the connected component is within a certain range as a character partial area as an element constituting a character or a part of the character.

次に、範囲指定装置101は、文字部分領域であると判定した連結成分の近接領域を統合する(ステップS605)。例えば、範囲指定装置101は、外接矩形領域が重なっているものや近接しているものを統合する。   Next, the range specifying device 101 integrates the adjacent regions of the connected components determined to be character partial regions (step S605). For example, the range specifying device 101 integrates the circumscribed rectangular areas that overlap or those that are close to each other.

図12は、連結成分の近接領域の統合を示す説明図である。図12の例では、図12(a)は、外接矩形領域が近接しているものを統合した例であり、図12(b)は、外接矩形領域が重なっているものを統合した例である。   FIG. 12 is an explanatory diagram illustrating the integration of adjacent regions of connected components. In the example of FIG. 12, FIG. 12A is an example in which circumscribed rectangular areas are close to each other, and FIG. 12B is an example in which circumscribed rectangular areas are overlapped. .

次に、範囲指定装置101は、統合した領域が文字候補領域であるか否かを判断する(ステップS606)。例えば、範囲指定装置101は、統合した領域の大きさで文字候補領域であるか否かを判定する。具体的には、範囲指定装置101は、文字サイズを縦がH画素、横がW画素のように事前に決めておき、「高さ=0.2×H〜2×H画素」、「幅=0.1×W〜2×W画素」の両方の条件に合致したものを文字候補領域と判定する。ここで、文字サイズとは、矩形の縦横の画素数のことである。   Next, the range specifying device 101 determines whether or not the merged area is a character candidate area (step S606). For example, the range specifying device 101 determines whether or not it is a character candidate area based on the size of the integrated area. Specifically, the range specifying apparatus 101 determines the character size in advance such that the vertical size is H pixels and the horizontal size is W pixels, and “height = 0.2 × H to 2 × H pixels”, “width” = 0.1 × W to 2 × W pixels ”is determined as a character candidate region. Here, the character size is the number of vertical and horizontal pixels of a rectangle.

統合した領域が文字候補領域であると判定した場合(ステップS606:Yes)、範囲指定装置101は、統合した領域を文字候補領域として抽出する(ステップS607)。統合した領域が文字候補領域でないと判定した場合(ステップS606:No)、範囲指定装置101の処理は、ステップS608に進む。   When it determines with the integrated area | region being a character candidate area | region (step S606: Yes), the range designation | designated apparatus 101 extracts an integrated area | region as a character candidate area | region (step S607). When it determines with the integrated area | region not being a character candidate area | region (step S606: No), the process of the range designation | designated apparatus 101 progresses to step S608.

次に、範囲指定装置101は、統合した領域すべてに対して判定が終了したか否かを判断する(ステップS608)。統合した領域すべてに対して判定が終了しない場合(ステップS608:No)、範囲指定装置101の処理は、ステップS606に戻る。統合した領域すべてに対して判定が終了した場合(ステップS608:Yes)、範囲指定装置101の処理は、終了する。   Next, the range specifying device 101 determines whether or not the determination has been completed for all the integrated regions (step S608). If the determination is not completed for all the integrated regions (step S608: No), the process of the range specifying device 101 returns to step S606. When the determination is completed for all the integrated areas (step S608: Yes), the process of the range specifying device 101 ends.

これにより、本フローチャートにおける一連の処理は終了する。本フローチャートを実行することで、範囲指定装置101は、画像から文字候補領域を抽出する。ここで、文字候補領域抽出処理の詳細は、上述した参考文献2に記載されている。   Thereby, a series of processing in this flowchart is completed. By executing this flowchart, the range specifying device 101 extracts a character candidate region from the image. Here, the details of the character candidate area extraction processing are described in Reference Document 2 described above.

(文字画像色数抽出処理手順の一例)
図7は、範囲指定装置101の文字画像色数抽出処理手順の一例を示すフローチャートである。まず、範囲指定装置101は、文字候補領域内の文字画像を切り出す(ステップS701)。
(Example of character image color number extraction processing procedure)
FIG. 7 is a flowchart illustrating an example of the character image color number extraction processing procedure of the range specifying device 101. First, the range specifying device 101 cuts out a character image in the character candidate area (step S701).

次に、範囲指定装置101は、切り出した文字画像内の画素を色クラスタリングによって分類する(ステップS702)。例えば、範囲指定装置101は、文字画像内で同一色とみなすことができる色のグループを作成する。   Next, the range specifying device 101 classifies the pixels in the cut out character image by color clustering (step S702). For example, the range specifying device 101 creates a group of colors that can be regarded as the same color in a character image.

次に、範囲指定装置101は、文字画像のノイズを除去する(ステップS703)。例えば、範囲指定装置101は、色のグループごとに属する画素数をカウントし、一定の画素数に満たないグループを削除することによってノイズを除去する。ここで、一定の画素数は、例えば総画素数の5%とすることができる。これにより、範囲指定装置101は、文字画像のボケや色ズレなどによる局所的な変動によるノイズを削除することができる。   Next, the range specifying device 101 removes noise from the character image (step S703). For example, the range designating device 101 counts the number of pixels belonging to each color group and removes noise by deleting groups that do not satisfy a certain number of pixels. Here, the fixed number of pixels can be, for example, 5% of the total number of pixels. As a result, the range specifying device 101 can remove noise due to local fluctuations due to blurring or color misalignment of the character image.

次に、範囲指定装置101は、文字画像の色数をカウントする(ステップS704)。例えば、範囲指定装置101は、ノイズを除去した後に残った色のグループの数を、文字画像の色数としてカウントする。   Next, the range specifying device 101 counts the number of colors of the character image (step S704). For example, the range specifying device 101 counts the number of color groups remaining after removing noise as the number of colors of the character image.

次に、範囲指定装置101は、すべての文字候補領域の色数を抽出したか否かを判断する(ステップS705)。すべての文字候補領域の色数を抽出しない場合(ステップS705:No)、範囲指定装置101の処理は、ステップS701に戻る。すべての文字候補領域の色数を抽出した場合(ステップS705:Yes)、範囲指定装置101の処理は、終了する。   Next, the range specifying device 101 determines whether or not the number of colors of all the character candidate areas has been extracted (step S705). When the number of colors of all the character candidate areas is not extracted (step S705: No), the process of the range specifying device 101 returns to step S701. When the number of colors of all the character candidate areas has been extracted (step S705: Yes), the process of the range specifying device 101 ends.

これにより、本フローチャートにおける一連の処理は終了する。本フローチャートを実行することで、範囲指定装置101は、文字候補領域内の文字画像の色数を抽出する。ここで、画素を色クラスタリングによって分類する方法の詳細は、下記参考文献3に記載されている。
(参考文献3:特開2002−042055号公報)
Thereby, a series of processing in this flowchart is completed. By executing this flowchart, the range specifying device 101 extracts the number of colors of the character image in the character candidate area. Here, details of a method of classifying pixels by color clustering are described in Reference Document 3 below.
(Reference 3: JP-A-2002-042055)

(文字領域探索処理手順の一例)
図8は、範囲指定装置101の文字領域探索処理手順の一例を示すフローチャートである。まず、範囲指定装置101は、現在文字領域を設定する(ステップS801)。例えば、範囲指定装置101は、現在文字領域として、代表属性を抽出した文字候補領域を設定する。
(Example of character area search processing procedure)
FIG. 8 is a flowchart illustrating an example of a character area search processing procedure of the range specifying device 101. First, the range specifying device 101 sets a current character area (step S801). For example, the range specifying device 101 sets a character candidate area from which representative attributes are extracted as the current character area.

次に、範囲指定装置101は、右方向に隣接領域を探索する(ステップS802)。ここで、隣接領域とは、同一の文字列に属する可能性のある文字を含む領域である。具体的には、隣接領域は、現在文字領域と、以下に説明する隣接条件を満たす文字候補領域である。   Next, the range specifying device 101 searches for an adjacent region in the right direction (step S802). Here, the adjacent region is a region including characters that may belong to the same character string. Specifically, the adjacent area is a character candidate area that satisfies the current character area and the adjacent condition described below.

図13は、文字候補領域の位置関係を示す説明図である。図13を用いて、隣接条件を説明する。図13において、dを文字候補領域間の間隔、vを文字候補領域の重なり範囲の長さ、h1を左側の文字候補領域の高さ、h2を右側の文字候補領域の高さとし、hを2つの文字候補領域の高さの平均(h=(h1+h2)/2)とする。この場合、現在文字領域と隣接条件を満たす文字候補領域とは、d<hかつv>h/2を満たす文字候補領域である。   FIG. 13 is an explanatory diagram showing a positional relationship between character candidate areas. The adjacent condition will be described with reference to FIG. In FIG. 13, d is the distance between the character candidate areas, v is the length of the overlapping area of the character candidate areas, h1 is the height of the left character candidate area, h2 is the height of the right character candidate area, and h is 2. The average height of two character candidate areas (h = (h1 + h2) / 2). In this case, the character candidate area that satisfies the adjacent condition with the current character area is a character candidate area that satisfies d <h and v> h / 2.

次に、範囲指定装置101は、隣接領域が探索されたか否かを判断する(ステップS803)。隣接領域が探索されない場合(ステップS803:No)、範囲指定装置101の処理は、終了する。   Next, the range specifying device 101 determines whether an adjacent area has been searched (step S803). When the adjacent area is not searched (step S803: No), the process of the range specifying device 101 ends.

隣接領域が探索された場合(ステップS803:Yes)、範囲指定装置101は、文字非文字の判定を行う(ステップS804)。ここで、範囲指定装置101は、探索された隣接領域に含まれる画像が文字であるか文字でないかの判定を行う。   When the adjacent area is searched (step S803: Yes), the range designating apparatus 101 determines the character non-character (step S804). Here, the range specifying device 101 determines whether the image included in the searched adjacent area is a character or not.

例えば、範囲指定装置101は、隣接領域の属性と代表属性とを比較することにより、隣接領域に含まれる画像が文字であるか文字でないかの判定を行う。例えば、属性が色数である場合、範囲指定装置101は、隣接領域の色数が代表属性の色数以下である場合、隣接領域に含まれる画像が文字であると判定する。   For example, the range specifying device 101 determines whether an image included in the adjacent region is a character or a character by comparing the attribute of the adjacent region with the representative attribute. For example, when the attribute is the number of colors, the range specifying device 101 determines that the image included in the adjacent area is a character when the number of colors in the adjacent area is equal to or less than the number of colors of the representative attribute.

また、例えば、範囲指定装置101は、代表属性の色数が二色であった場合は、隣接領域の色数が二色または三色である場合、隣接領域に含まれる画像が文字であると判定することもできる。これは、代表属性の色数が二色であった場合は、文字の影による色数も考慮して、範囲指定装置101は、二色または三色の文字候補領域を文字だと判定する。また、代表属性の色数が三色であった場合は、同様にして、範囲指定装置101は、二色または三色の文字候補領域を文字だと判定する。また、代表属性の色数が四色以上の場合、範囲指定装置101は、代表属性の色数以下の文字候補領域を文字だと判定することができる。   Further, for example, when the number of colors of the representative attribute is two colors, the range specifying device 101 determines that the image included in the adjacent area is a character when the number of colors of the adjacent area is two colors or three colors. It can also be determined. When the number of colors of the representative attribute is two colors, the range specifying device 101 determines that the two-color or three-color character candidate area is a character in consideration of the number of colors due to the shadow of the character. If the number of representative attribute colors is three, similarly, the range designating apparatus 101 determines that the two-color or three-color character candidate area is a character. When the number of colors of the representative attribute is four or more, the range specifying device 101 can determine that the character candidate area having the number of colors of the representative attribute or less is a character.

これをまとめると、下記のようになる。
代表属性の色数:二色→文字と判定する色数:二色〜三色
代表属性の色数:三色→文字と判定する色数:二色〜三色
代表属性の色数:N色→文字と判定する色数:二色〜N色
This is summarized as follows.
Number of representative attribute colors: Two colors → Number of colors determined as characters: Two to three colors Number of representative attribute colors: Three colors → Number of colors determined as characters: Two colors to three colors Number of representative attributes: N colors → Number of colors to be determined as characters: 2 to N colors

また、例えば、範囲指定装置101は、色数の条件を満たす隣接領域に含まれる画像に対して、文字サイズ、黒画素濃度、線幅および複雑度等の属性を使用して、さらに、隣接領域に含まれる画像が文字であるか文字でないかの判定を行うこともできる。   Further, for example, the range designating device 101 further uses the attributes such as the character size, black pixel density, line width, and complexity for the image included in the adjacent area that satisfies the condition of the number of colors, It is also possible to determine whether an image included in is a character or not.

非文字の判定が行われた場合(ステップS804:非文字)、範囲指定装置101の処理はステップS802に戻る。文字の判定が行われた場合(ステップS804:文字)、範囲指定装置101は、隣接領域を文字領域として特定する(ステップS805)。   When the non-character determination is made (step S804: non-character), the process of the range specifying device 101 returns to step S802. When the character is determined (step S804: character), the range designating apparatus 101 identifies the adjacent region as the character region (step S805).

次に、範囲指定装置101は、現在文字領域を更新する(ステップS806)。例えば、範囲指定装置101は、ステップS805で特定された文字領域を現在文字領域にする。   Next, the range specifying device 101 updates the current character area (step S806). For example, the range specifying device 101 sets the character area specified in step S805 as the current character area.

次に、範囲指定装置101は、代表属性を更新する(ステップS807)。例えば、範囲指定装置101は、特定した文字候補領域の属性値の平均や中央値を求め、平均や中央値で代表属性を更新する。この場合、最初に受け付けた文字候補領域の属性が特殊なものであった場合でも、文字列探索を行うにつれて、適正な代表属性へと次第に近づくことができる。この後、範囲指定装置101の処理は、ステップS802に戻り、隣接領域が探索されなくなると、範囲指定装置101の処理は、終了する。   Next, the range specifying device 101 updates the representative attribute (step S807). For example, the range specifying device 101 obtains the average or median attribute value of the identified character candidate area, and updates the representative attribute with the average or median value. In this case, even if the attribute of the character candidate area received first is special, it can gradually approach an appropriate representative attribute as the character string search is performed. Thereafter, the processing of the range specifying device 101 returns to step S802, and when the adjacent area is not searched, the processing of the range specifying device 101 ends.

これにより、本フローチャートにおける一連の処理は終了する。本フローチャートを実行することで、範囲指定装置101は、画像の文字候補領域を探索して、文字領域を特定することができる。   Thereby, a series of processing in this flowchart is completed. By executing this flowchart, the range specifying device 101 can search for a character candidate area of an image and specify a character area.

以上説明したように、範囲指定装置101は、文書画像内の位置の指定を受け付け、文書画像から、文字候補領域を抽出し、文字候補領域のうち、指定を受け付けた位置に対応する文字候補領域の色数を抽出する。この後、範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した色数以下の文字候補領域を特定する。最後に、範囲指定装置101は、指定を受け付けた位置に対応する文字候補領域と、特定した文字候補領域と、を選択範囲にする。   As described above, the range specifying device 101 accepts designation of a position in a document image, extracts a character candidate area from the document image, and among the character candidate areas, a character candidate area corresponding to the position where designation is accepted. Extract the number of colors. Thereafter, the range designating device 101 identifies a character candidate area in which the number of colors of the character candidate area is equal to or less than the extracted number of colors among the character candidate areas connected to the character candidate area corresponding to the position where the designation is accepted. Finally, the range designating apparatus 101 sets the character candidate area corresponding to the position where the designation is accepted and the identified character candidate area as the selection range.

これにより、範囲指定装置101は、文書画像中の文字列をマウスや指などによる指定によって簡単に選択することができ、従来と比較して文字ではない領域を誤って選択することによる不適切な領域選択を軽減することができる。   As a result, the range specifying device 101 can easily select a character string in a document image by specifying with a mouse or a finger, which is inappropriate due to erroneous selection of a region that is not a character compared to the conventional case. Area selection can be reduced.

このため、範囲指定装置101は、ユーザがPCやスマートフォンなどの画面に表示された文字列を簡単な操作で選択する機能を実現できる。また、範囲指定装置101は、色数の比較だけで、文字を選択できるため、範囲指定装置101の負荷を上げることなく、文字の選択を行うことができる。ここで、範囲指定装置101が選択した文字列は、文字認識機能によってテキストに変換することが容易にできるので、例えば、調べたい単語をカメラで撮影してワンタッチで認識とWeb検索を実行することができる。さらに、範囲指定装置101により、外国人旅行者がガイドブックや看板、メニューなどの文字列の意味や発音を簡単に知ることができ実世界の文字画像情報の有効活用が可能になる。   For this reason, the range specification apparatus 101 can implement | achieve the function in which a user selects the character string displayed on screens, such as PC and a smart phone, by simple operation. In addition, since the range designating device 101 can select a character only by comparing the number of colors, the character can be selected without increasing the load on the range designating device 101. Here, the character string selected by the range specifying device 101 can be easily converted into text by the character recognition function. For example, a word to be examined is photographed with a camera, and recognition and Web search are executed with one touch. Can do. Furthermore, the range designation device 101 allows foreign travelers to easily know the meaning and pronunciation of character strings such as guidebooks, signboards, menus, etc., and enables effective use of real-world character image information.

ここで、範囲指定装置101は、最初に文字候補領域を抽出し、当該文字候補領域の色数を、指定を受け付けた位置に対応する文字候補領域から抽出した色数と比較する。このため、指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のなかにノイズがあって、抽出した色数を超える文字候補領域があったとしても、その先の文字候補領域を文字として選択することができる。   Here, the range specifying device 101 first extracts a character candidate area, and compares the number of colors of the character candidate area with the number of colors extracted from the character candidate area corresponding to the position where the designation is accepted. For this reason, even if there is a noise in the character candidate area connected to the character candidate area corresponding to the position where the designation is received and there is a character candidate area exceeding the number of extracted colors, the character candidate area ahead of the character candidate area Can be selected.

また、範囲指定装置101は、色数以下の文字候補領域を特定したことに応じて、抽出した色数を、特定した文字候補領域の色数に基づいて更新することもできる。   In addition, the range designating device 101 can also update the extracted number of colors based on the number of colors of the specified character candidate area in response to specifying the number of character candidate areas equal to or less than the number of colors.

これにより、最初に受け付けた文字候補領域の色数が特殊なものであった場合でも、範囲指定装置101は、文字列探索を行うにつれて、色数を適正な代表属性の色数へと次第に近づけることができる。   Thereby, even when the number of colors of the character candidate area received first is special, the range designation device 101 gradually approaches the number of colors to the number of colors of the appropriate representative attribute as the character string search is performed. be able to.

また、範囲指定装置101は、文字候補領域の色数が、抽出した色数以下であり、かつ、文字候補領域の複雑度または文字候補領域内の線の線幅が所定の条件を満たす文字候補領域を特定することができる。   Further, the range designating device 101 has a character candidate in which the number of colors in the character candidate area is equal to or less than the extracted number of colors, and the complexity of the character candidate area or the line width in the character candidate area satisfies a predetermined condition. An area can be specified.

これにより、範囲指定装置101は、複雑度または線幅を用いることで、文字候補領域が、文字領域であるか否かを、より正確に判断することができる。   Thereby, the range designation | designated apparatus 101 can determine more correctly whether a character candidate area | region is a character area by using complexity or a line | wire width.

また、範囲指定装置101は、抽出した色数が2である場合、色数が3以下の文字候補領域を特定することができる。   In addition, when the number of extracted colors is 2, the range designating device 101 can specify a character candidate area with the number of colors of 3 or less.

これにより、範囲指定装置101は、最初に受け付けた文字候補領域の色数が2であっても、影等の装飾があり、色数が3以上の文字を特定することができる。   Thereby, even if the number of colors of the character candidate area received first is 2, the range specifying device 101 can specify a character having decorations such as a shadow and having a color number of 3 or more.

なお、本実施の形態で説明した範囲指定方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本範囲指定プログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また、本範囲指定プログラムは、インターネット等のネットワークを介して配布してもよい。   The range specifying method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. The range specifying program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. Further, the range specifying program may be distributed via a network such as the Internet.

上述した実施の形態に関し、さらに以下の付記を開示する。   The following additional notes are disclosed with respect to the embodiment described above.

(付記1)文書画像内の位置の指定を受け付け、
前記文書画像から、文字候補領域を抽出し、
抽出した前記文字候補領域のうち、前記指定を受け付けた位置に対応する文字候補領域の色数を抽出し、
前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した前記色数以下の文字候補領域を特定し、
前記指定を受け付けた位置に対応する文字候補領域と、前記特定した文字候補領域と、を選択範囲にする、
処理をコンピュータに実行させることを特徴とする範囲指定プログラム。
(Appendix 1) Accepting the designation of the position in the document image,
Extracting a character candidate area from the document image,
Among the extracted character candidate regions, extract the number of colors of the character candidate region corresponding to the position where the designation is received,
Among the character candidate areas connected to the character candidate area corresponding to the position where the designation has been received, the number of colors of the character candidate area is specified to be equal to or less than the extracted number of colors,
The selected character candidate area corresponding to the position where the designation is received and the identified character candidate area are selected.
A range specification program for causing a computer to execute processing.

(付記2)前記特定する処理は、前記色数以下の文字候補領域を特定したことに応じて、前記色数を、特定した前記文字候補領域の色数に基づいて更新し、更新した前記色数以下の文字候補領域を特定することを特徴とする付記1に記載の範囲指定プログラム。 (Additional remark 2) According to having specified the character candidate area | region below the number of colors, the process to specify updates the color number based on the color number of the specified character candidate area | region, and updated the color The range designation program according to appendix 1, wherein character candidate areas of a number equal to or less are specified.

(付記3)前記特定する処理は、前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、前記色数以下であり、かつ、文字候補領域の複雑度または文字候補領域内の線の線幅が所定の条件を満たす文字候補領域を特定することを特徴とする付記1または2に記載の範囲指定プログラム。 (Additional remark 3) The said process to specify is that the number of colors of a character candidate area is below the said number of colors among the character candidate area | regions connected to the character candidate area | region corresponding to the position which received the said specification, and a character candidate area | region The range designation program according to appendix 1 or 2, wherein a character candidate region that satisfies a predetermined condition of a complexity of the line or a line width of a line in the character candidate region is specified.

(付記4)前記特定する処理は、前記色数が2である場合、色数が3以下の文字候補領域を特定することを特徴とする付記1〜3のいずれか一項に記載の範囲指定プログラム。 (Supplementary note 4) When the number of colors is two, the specifying process specifies a character candidate area having a number of colors of three or less. The range designation according to any one of Supplementary notes 1 to 3 program.

(付記5)文書画像内の位置の指定を受け付け、
前記文書画像から、文字候補領域を抽出し、
抽出した前記文字候補領域のうち、前記指定を受け付けた位置に対応する文字候補領域の色数を抽出し、
前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した前記色数以下の文字候補領域を特定し、
前記指定を受け付けた位置に対応する文字候補領域と、前記特定した文字候補領域と、を選択範囲にする、
処理をコンピュータに実行させる範囲指定プログラムを記録したことを特徴とする前記コンピュータに読み取り可能な記録媒体。
(Appendix 5) Accepting designation of position in document image,
Extracting a character candidate area from the document image,
Among the extracted character candidate regions, extract the number of colors of the character candidate region corresponding to the position where the designation is received,
Among the character candidate areas connected to the character candidate area corresponding to the position where the designation has been received, the number of colors of the character candidate area is specified to be equal to or less than the extracted number of colors,
The selected character candidate area corresponding to the position where the designation is received and the identified character candidate area are selected.
A computer-readable recording medium in which a range specifying program for causing a computer to execute processing is recorded.

(付記6)文書画像内の位置の指定を受け付け、
前記文書画像から、文字候補領域を抽出し、
抽出した前記文字候補領域のうち、前記指定を受け付けた位置に対応する文字候補領域の色数を抽出し、
前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した前記色数以下の文字候補領域を特定し、
前記指定を受け付けた位置に対応する文字候補領域と、前記特定した文字候補領域と、を選択範囲にする、
処理をコンピュータが実行することを特徴とする範囲指定方法。
(Appendix 6) Accepting designation of position in document image,
Extracting a character candidate area from the document image,
Among the extracted character candidate regions, extract the number of colors of the character candidate region corresponding to the position where the designation is received,
Among the character candidate areas connected to the character candidate area corresponding to the position where the designation has been received, the number of colors of the character candidate area is specified to be equal to or less than the extracted number of colors,
The selected character candidate area corresponding to the position where the designation is received and the identified character candidate area are selected.
A range specifying method, wherein the computer executes the processing.

(付記7)文書画像内の位置の指定を受け付け、
前記文書画像から、文字候補領域を抽出し、
抽出した前記文字候補領域のうち、前記指定を受け付けた位置に対応する文字候補領域の色数を抽出し、
前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した前記色数以下の文字候補領域を特定し、
前記指定を受け付けた位置に対応する文字候補領域と、前記特定した文字候補領域と、を選択範囲にする、
処理部を有することを特徴とする範囲指定装置。
(Appendix 7) Accepting designation of position in document image,
Extracting a character candidate area from the document image,
Among the extracted character candidate regions, extract the number of colors of the character candidate region corresponding to the position where the designation is received,
Among the character candidate areas connected to the character candidate area corresponding to the position where the designation has been received, the number of colors of the character candidate area is specified to be equal to or less than the extracted number of colors,
The selected character candidate area corresponding to the position where the designation is received and the identified character candidate area are selected.
A range designating device comprising a processing unit.

101 範囲指定装置
401 抽出部
402 属性抽出部
403 特定部
404 生成部
101 range designation device 401 extraction unit 402 attribute extraction unit 403 identification unit 404 generation unit

Claims (6)

文書画像内の位置の指定を受け付け、
前記文書画像から、文字候補領域を抽出し、
抽出した前記文字候補領域のうち、前記指定を受け付けた位置に対応する文字候補領域の色数を抽出し、
前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した前記色数以下の文字候補領域を特定し、
前記指定を受け付けた位置に対応する文字候補領域と、前記特定した文字候補領域と、を選択範囲にする、
処理をコンピュータに実行させることを特徴とする範囲指定プログラム。
Accepts the specification of the position in the document image,
Extracting a character candidate area from the document image,
Among the extracted character candidate regions, extract the number of colors of the character candidate region corresponding to the position where the designation is received,
Among the character candidate areas connected to the character candidate area corresponding to the position where the designation has been received, the number of colors of the character candidate area is specified to be equal to or less than the extracted number of colors,
The selected character candidate area corresponding to the position where the designation is received and the identified character candidate area are selected.
A range specification program for causing a computer to execute processing.
前記特定する処理は、前記色数以下の文字候補領域を特定したことに応じて、前記色数を、特定した前記文字候補領域の色数に基づいて更新し、更新した前記色数以下の文字候補領域を特定することを特徴とする請求項1に記載の範囲指定プログラム。   The specifying process updates the number of colors based on the specified number of colors of the character candidate area in response to specifying the number of character candidate areas equal to or less than the number of colors, and updates the number of characters equal to or less than the updated number of colors. The range designation program according to claim 1, wherein a candidate area is specified. 前記特定する処理は、前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、前記色数以下であり、かつ、文字候補領域の複雑度または文字候補領域内の線の線幅が所定の条件を満たす文字候補領域を特定することを特徴とする請求項1または2に記載の範囲指定プログラム。   In the process of specifying, the number of colors of the character candidate area is equal to or less than the number of colors among the character candidate areas connected to the character candidate area corresponding to the position where the designation is received, and the complexity of the character candidate area or The range designation program according to claim 1 or 2, wherein a character candidate region in which a line width of a line in the character candidate region satisfies a predetermined condition is specified. 前記特定する処理は、前記色数が2である場合、色数が3以下の文字候補領域を特定することを特徴とする請求項1〜3のいずれか一項に記載の範囲指定プログラム。   The range specifying program according to any one of claims 1 to 3, wherein when the number of colors is 2, the specifying process specifies a character candidate area having a color number of 3 or less. 文書画像内の位置の指定を受け付け、
前記文書画像から、文字候補領域を抽出し、
抽出した前記文字候補領域のうち、前記指定を受け付けた位置に対応する文字候補領域の色数を抽出し、
前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した前記色数以下の文字候補領域を特定し、
前記指定を受け付けた位置に対応する文字候補領域と、前記特定した文字候補領域と、を選択範囲にする、
処理をコンピュータが実行することを特徴とする範囲指定方法。
Accepts the specification of the position in the document image,
Extracting a character candidate area from the document image,
Among the extracted character candidate regions, extract the number of colors of the character candidate region corresponding to the position where the designation is received,
Among the character candidate areas connected to the character candidate area corresponding to the position where the designation has been received, the number of colors of the character candidate area is specified to be equal to or less than the extracted number of colors,
The selected character candidate area corresponding to the position where the designation is received and the identified character candidate area are selected.
A range specifying method, wherein the computer executes the processing.
文書画像内の位置の指定を受け付け、
前記文書画像から、文字候補領域を抽出し、
抽出した前記文字候補領域のうち、前記指定を受け付けた位置に対応する文字候補領域の色数を抽出し、
前記指定を受け付けた位置に対応する文字候補領域に連なる文字候補領域のうち、文字候補領域の色数が、抽出した前記色数以下の文字候補領域を特定し、
前記指定を受け付けた位置に対応する文字候補領域と、前記特定した文字候補領域と、を選択範囲にする、
処理部を有することを特徴とする範囲指定装置。
Accepts the specification of the position in the document image,
Extracting a character candidate area from the document image,
Among the extracted character candidate regions, extract the number of colors of the character candidate region corresponding to the position where the designation is received,
Among the character candidate areas connected to the character candidate area corresponding to the position where the designation has been received, the number of colors of the character candidate area is specified to be equal to or less than the extracted number of colors,
The selected character candidate area corresponding to the position where the designation is received and the identified character candidate area are selected.
A range designating device comprising a processing unit.
JP2015077524A 2015-04-06 2015-04-06 Range specification program, range specification method and range specification apparatus Active JP6503850B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015077524A JP6503850B2 (en) 2015-04-06 2015-04-06 Range specification program, range specification method and range specification apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015077524A JP6503850B2 (en) 2015-04-06 2015-04-06 Range specification program, range specification method and range specification apparatus

Publications (2)

Publication Number Publication Date
JP2016197362A true JP2016197362A (en) 2016-11-24
JP6503850B2 JP6503850B2 (en) 2019-04-24

Family

ID=57358569

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015077524A Active JP6503850B2 (en) 2015-04-06 2015-04-06 Range specification program, range specification method and range specification apparatus

Country Status (1)

Country Link
JP (1) JP6503850B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020059529A1 (en) * 2018-09-20 2020-03-26 富士フイルム株式会社 Image processing device, image processing method, program, and mobile terminal device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0689330A (en) * 1992-09-07 1994-03-29 Toshiba Corp Image filing system
JPH09251511A (en) * 1996-03-15 1997-09-22 Sanyo Electric Co Ltd Method and device for recognizing character
JP2012212231A (en) * 2011-03-30 2012-11-01 Toshiba Corp Electronic apparatus, program, and character string recognition method
JP2012216956A (en) * 2011-03-31 2012-11-08 Nanao Corp Thin line or character detection method and apparatus
JP2013210785A (en) * 2012-03-30 2013-10-10 Brother Ind Ltd Image processing device and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0689330A (en) * 1992-09-07 1994-03-29 Toshiba Corp Image filing system
JPH09251511A (en) * 1996-03-15 1997-09-22 Sanyo Electric Co Ltd Method and device for recognizing character
JP2012212231A (en) * 2011-03-30 2012-11-01 Toshiba Corp Electronic apparatus, program, and character string recognition method
JP2012216956A (en) * 2011-03-31 2012-11-08 Nanao Corp Thin line or character detection method and apparatus
JP2013210785A (en) * 2012-03-30 2013-10-10 Brother Ind Ltd Image processing device and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020059529A1 (en) * 2018-09-20 2020-03-26 富士フイルム株式会社 Image processing device, image processing method, program, and mobile terminal device
US11983877B2 (en) 2018-09-20 2024-05-14 Fujifilm Corporation Image processing device, image processing method, program, and portable terminal device

Also Published As

Publication number Publication date
JP6503850B2 (en) 2019-04-24

Similar Documents

Publication Publication Date Title
JP4970714B2 (en) Extract metadata from a specified document area
US8532388B2 (en) Image processing apparatus, image processing method, and computer program
JP6122814B2 (en) Information processing apparatus, program, and digital plate inspection method
JP4294348B2 (en) Display system
US8412705B2 (en) Image processing apparatus, image processing method, and computer-readable storage medium
JP2012203458A (en) Image processor and program
JP2003298837A (en) Graphical input and display system for creating and manipulating electronic image, method for editing source electronic image inputted to display device to meaningful image object, and product including computer usable medium with computer readable program code incorporated
CN107133615B (en) Information processing apparatus, information processing method, and computer program
JP2009146064A (en) Image processor, image processing method, and program and storage medium thereof
JP2018128996A (en) Information processing device, control method, and program
JP7262993B2 (en) Image processing system, image processing method, image processing apparatus
US11568623B2 (en) Image processing apparatus, image processing method, and storage medium
US9569146B2 (en) Information processor and automatic page replacement method
JP2021043478A (en) Information processing device, control method thereof and program
JP2019016350A (en) Identification of emphasized text in electronic documents
JP6503850B2 (en) Range specification program, range specification method and range specification apparatus
KR101651842B1 (en) Method and device for generating layout of electronic document
JP2022090469A (en) Format defining device, format defining method, and program
JP7383882B2 (en) Information processing device and information processing program
US20200272688A1 (en) Information processing apparatus and non-transitory computer readable medium
JP2011018311A (en) Device and program for retrieving image, and recording medium
JP7497620B2 (en) Document data generation device, image forming device, and document data generation program
JP2021034778A (en) Information processing device and information processing program
JP2020099031A (en) Information processing apparatus and information processing method
JP7342518B2 (en) Image processing device and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190110

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190311

R150 Certificate of patent or registration of utility model

Ref document number: 6503850

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150