JP7358841B2 - Image processing device and image processing program - Google Patents

Image processing device and image processing program Download PDF

Info

Publication number
JP7358841B2
JP7358841B2 JP2019152615A JP2019152615A JP7358841B2 JP 7358841 B2 JP7358841 B2 JP 7358841B2 JP 2019152615 A JP2019152615 A JP 2019152615A JP 2019152615 A JP2019152615 A JP 2019152615A JP 7358841 B2 JP7358841 B2 JP 7358841B2
Authority
JP
Japan
Prior art keywords
page
image
punch hole
punch
similar
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.)
Active
Application number
JP2019152615A
Other languages
Japanese (ja)
Other versions
JP2021034855A (en
Inventor
裕士郎 田中
聖二 白木
清 宇根
長政 三須
亮佑 辻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2019152615A priority Critical patent/JP7358841B2/en
Publication of JP2021034855A publication Critical patent/JP2021034855A/en
Application granted granted Critical
Publication of JP7358841B2 publication Critical patent/JP7358841B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

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

特許文献1には、パンチ穴が存在する原稿を入力した際に、パンチ穴のみを精度良く除去することが可能な画像処理装置を提供することを課題とし、パンチ穴探索範囲決定手段では、画像入力手段により得られた入力画像から、パンチ穴を探索する探索範囲を決定し、パンチ穴候補抽出手段では、パンチ穴探索範囲決定手段より得られた探索範囲を対象にパンチ穴の候補矩形を抽出し、パンチ穴検出手段では、パンチ穴候補抽出手段により得られたパンチ穴候補矩形の情報からパンチ穴を特定し、パンチ穴除去手段では、パンチ穴検出手段により得られたパンチ穴を除去することが開示されている。 Patent Document 1 has an object to provide an image processing device that can accurately remove only the punch holes when a document with punch holes is input, and the punch hole search range determining means A search range for punch holes is determined from the input image obtained by the input means, and the punch hole candidate extraction means extracts candidate rectangles for punch holes within the search range obtained by the punch hole search range determination means. The punch hole detection means identifies the punch hole from information on the punch hole candidate rectangle obtained by the punch hole candidate extraction means, and the punch hole removal means removes the punch hole obtained by the punch hole detection means. is disclosed.

特許文献2には、原稿の表面、裏面の画像情報を読み取る1または複数の画像読み取り手段と、画像記憶部と、前記画像読み取り手段で読み取った読取画像の解像度を変換する解像度変換手段と、前記解像度変換手段を用いて、表面、裏面の低解像度の画像をそれぞれ作成し、それらの画像に基づいて原稿の穴を検出する原稿穴検出手段と、前記原稿穴検出手段で検出された原稿の穴に基づいて、前記読取画像から穴画像を消去する原稿穴消去手段と、を備え、前記原稿穴検出手段は、前記表面の低解像度の画素情報から抽出された原稿の穴を検出するための特徴量と、前記裏面の低解像度の画素情報から抽出された原稿の穴を検出するための特徴量との一致の度合に基づいて原稿の穴を検出することを特徴とする画像処理装置について開示されている。 Patent Document 2 discloses: one or more image reading means for reading image information on the front and back sides of a document; an image storage section; a resolution conversion means for converting the resolution of the read image read by the image reading means; A document hole detection means that uses a resolution conversion means to create low-resolution images of the front and back sides, respectively, and detects holes in the document based on those images; and a hole in the document detected by the document hole detection means. document hole erasing means for erasing hole images from the read image based on the above, and the document hole detection means has a feature for detecting holes in the document extracted from low resolution pixel information on the surface. An image processing apparatus is disclosed that detects a hole in a document based on the degree of coincidence between the amount of the hole in the document and a feature amount for detecting the hole in the document extracted from the low-resolution pixel information on the back side. ing.

特開2004-080341号公報Japanese Patent Application Publication No. 2004-080341 特許第4219333号公報Patent No. 4219333

パンチ穴があけられたページの画像から、パンチ穴を除去する場合に、予め定められた形状をパンチ穴として検知して、該ページの画像から除去する構成では、予め定められた形状以外のパンチ穴は、除去することができない。
一方、パンチ穴があけられた複数ページからなる文書の場合、パンチ穴でファイルされ、ファイルからの該文書の出し入れ等によって、文書のパンチ穴に破れや歪み等が発生することがある。このような場合、予め定められた形状をパンチ穴として検知する技術では、破れや歪みをもったパンチ穴は、パンチ穴として検知されない恐れがある。
本発明は、パンチ穴があけられた、複数ページからなる文書を読み込んで、該文書のパンチ穴を除去する場合において、形状が崩れたパンチ穴を除去することができる画像処理装置及び画像処理プログラムを提供することを目的としている。
When removing punch holes from an image of a page with punch holes, in a configuration in which a predetermined shape is detected as a punch hole and removed from the image of the page, punches of a shape other than the predetermined shape are removed. Holes cannot be removed.
On the other hand, in the case of a document consisting of a plurality of pages with punch holes, the document is filed with the punch holes, and as the document is taken in and out of the file, the punch holes in the document may be torn or distorted. In such a case, with a technique that detects a predetermined shape as a punch hole, a punch hole with a tear or distortion may not be detected as a punch hole.
The present invention provides an image processing device and an image processing program that can remove punched holes that are out of shape when reading a document consisting of multiple pages with punched holes and removing the punched holes from the document. is intended to provide.

かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。なお、以下の「請求項」とあるのは、出願当初の請求項である。
請求項1の発明は、プロセッサを備え、前記プロセッサは、読込手段によって読み込まれた、複数ページからなる文書の第1ページからパンチ穴に類似する類似画像を検知した際に、前記文書の該第1ページとは異なる第2ページでパンチ穴が検知された場合に、前記類似画像を除去することを特徴とする画像処理装置である。
The gist of the present invention to achieve this object resides in the following inventions. The "claims" below are the claims originally filed.
The invention according to claim 1 includes a processor, and when the processor detects a similar image resembling a punch hole from a first page of a document consisting of a plurality of pages read by a reading means, the processor detects the first page of the document. The image processing apparatus is characterized in that when a punch hole is detected on a second page different from the first page, the similar image is removed.

請求項2の発明は、前記プロセッサが行う除去処理では、前記類似画像の除去する領域の大きさは、前記パンチ穴の除去する領域の大きさとは異なる、請求項1に記載の画像処理装置である。 The invention according to claim 2 is the image processing apparatus according to claim 1, wherein in the removal process performed by the processor, the size of the area to be removed of the similar image is different from the size of the area to be removed of the punch hole. be.

請求項3の発明は、前記プロセッサが行う除去処理では、前記類似画像の除去の面積は、前記パンチ穴の除去の面積よりも大きい、請求項2に記載の画像処理装置である。 A third aspect of the present invention is the image processing apparatus according to the second aspect, wherein in the removal process performed by the processor, an area of the similar image to be removed is larger than an area of the punch hole to be removed.

請求項4の発明は、前記プロセッサが行う除去処理では、前記類似画像を除去する領域は、類似画像からページの端までである、請求項3に記載の画像処理装置である。 A fourth aspect of the present invention is the image processing apparatus according to the third aspect, wherein in the removal process performed by the processor, an area from which the similar image is removed is from the similar image to the end of the page.

請求項5の発明は、前記プロセッサが行う除去処理では、前記第1ページが、前記文書の先頭ページ又は最終ページである場合と、途中ページである場合とで、前記類似画像の除去方法が異なる、請求項1に記載の画像処理装置である。 In the invention of claim 5, in the removal process performed by the processor, the similar image removal method is different depending on whether the first page is a first page or a last page of the document or an intermediate page. , an image processing apparatus according to claim 1.

請求項6の発明は、前記プロセッサは、前記第1ページが先頭ページ又は最終ページである場合は、警告せずに前記類似画像の除去を行う、請求項5に記載の画像処理装置である。 A sixth aspect of the present invention is the image processing apparatus according to the fifth aspect, wherein the processor removes the similar image without warning when the first page is a first page or a last page.

請求項7の発明は、前記プロセッサは、前記第1ページが途中ページである場合は、警告を行い、ユーザーの判断にしたがって除去を行う、請求項5に記載の画像処理装置である。 A seventh aspect of the present invention is the image processing apparatus according to the fifth aspect, wherein when the first page is an intermediate page, the processor issues a warning and performs removal according to the user's judgment.

請求項8の発明は、前記プロセッサは、パンチ穴として検知するための第1閾値とパンチ穴ではないと検知するための第2閾値を用い、対象としている画像が該第1閾値と該第2閾値の間にある場合は、パンチ穴に類似する類似画像であると検知する、請求項1に記載の画像処理装置である。 According to an eighth aspect of the invention, the processor uses a first threshold value for detecting a punch hole and a second threshold value for detecting a non-punch hole, and the target image has a difference between the first threshold value and the second threshold value. The image processing apparatus according to claim 1, wherein if the image is between the threshold values, the image is detected to be similar to a punch hole.

請求項9の発明は、前記プロセッサは、前記第1ページ中の前記類似画像の位置が、前記第2ページ中の前記パンチ穴と同じ位置又は対称の位置にある場合、前記類似画像を除去する、請求項1に記載の画像処理装置である。 In the invention according to claim 9, the processor removes the similar image when the position of the similar image in the first page is the same or symmetrical to the punch hole in the second page. , an image processing apparatus according to claim 1.

請求項10の発明は、コンピュータを、読込手段によって読み込まれた、複数ページからなる文書の第1ページからパンチ穴に類似する類似画像を検知した際に、前記文書の該第1ページとは異なる第2ページでパンチ穴が検知された場合に、前記類似画像を除去する除去手段として機能させるための画像処理プログラムである。 According to the tenth aspect of the invention, when a computer detects a similar image resembling a punch hole from the first page of a multi-page document read by the reading means, the computer detects a similar image that is different from the first page of the document. This is an image processing program for functioning as a removal means for removing the similar image when a punch hole is detected on the second page.

請求項1の画像処理装置によれば、パンチ穴があけられた、複数ページからなる文書を読み込んで、該文書のパンチ穴を除去する場合において、形状が崩れたパンチ穴を除去することができる。 According to the image processing device of claim 1, when a document consisting of multiple pages with punched holes is read and the punched holes in the document are removed, punched holes that are out of shape can be removed. .

請求項2の画像処理装置によれば、類似画像の除去する領域の大きさと、パンチ穴の除去する領域の大きさとを異ならせることができる。 According to the image processing device of the second aspect, the size of the region from which similar images are removed can be made different from the size of the region from which punch holes are removed.

請求項3の画像処理装置によれば、類似画像の除去の面積を、パンチ穴の除去の面積よりも大きくすることができる。 According to the image processing device of the third aspect, the area from which similar images are removed can be made larger than the area from which punch holes are removed.

請求項4の画像処理装置によれば、類似画像を除去する領域は、類似画像からページの端までとすることができる。 According to the image processing device of the fourth aspect, the area from which similar images are removed can extend from the similar images to the edge of the page.

請求項5の画像処理装置によれば、文書の先頭ページ又は最終ページである場合と、途中ページである場合とで、類似画像の除去方法を異ならせることができる。 According to the image processing apparatus of the fifth aspect, the similar image removal method can be different depending on whether the first page or the last page of the document is the first page or the middle page of the document.

請求項6の画像処理装置によれば、先頭ページ又は最終ページを対象とする場合は、警告せずに類似画像の除去を行うことができる。 According to the image processing apparatus of the sixth aspect, when the first page or the last page is targeted, similar images can be removed without warning.

請求項7の画像処理装置によれば、途中ページを対象とする場合は、ユーザーの判断にしたがって除去を行うことができる。 According to the image processing apparatus of the seventh aspect, when an intermediate page is targeted, removal can be performed according to the user's judgment.

請求項8の画像処理装置によれば、対象としている画像が第1閾値と第2閾値の間にある場合は、パンチ穴に類似する類似画像であると検知することができる。 According to the image processing device of the eighth aspect, when the target image is between the first threshold value and the second threshold value, it is possible to detect that the target image is a similar image similar to a punched hole.

請求項9の画像処理装置によれば、第1ページ中の類似画像の位置が、第2ページ中のパンチ穴と同じ位置又は対称の位置にある場合、類似画像を除去することができる。 According to the image processing apparatus of the ninth aspect, when the position of the similar image in the first page is at the same position or symmetrical position to the punch hole in the second page, the similar image can be removed.

請求項10の画像処理プログラムによれば、パンチ穴があけられた、複数ページからなる文書を読み込んで、該文書のパンチ穴を除去する場合において、形状が崩れたパンチ穴を除去することができる。 According to the image processing program of claim 10, when a document consisting of multiple pages with punched holes is read and the punched holes in the document are removed, punched holes that are out of shape can be removed. .

本実施の形態の構成例についての概念的なモジュール構成図である。FIG. 2 is a conceptual module configuration diagram regarding a configuration example of the present embodiment. 本実施の形態を利用したシステム構成例を示す説明図である。FIG. 1 is an explanatory diagram showing an example of a system configuration using this embodiment. パンチ穴の例についての説明図である。It is an explanatory view about the example of a punch hole. パンチ穴の例についての説明図である。It is an explanatory view about the example of a punch hole. パンチ穴の例についての説明図である。It is an explanatory view about the example of a punch hole. パンチ穴情報テーブルのデータ構造例を示す説明図である。FIG. 2 is an explanatory diagram showing an example data structure of a punch hole information table. 本実施の形態による処理例を示すフローチャートである。3 is a flowchart illustrating an example of processing according to the present embodiment. 本実施の形態による処理例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of processing according to the present embodiment. 閾値判断方法テーブルのデータ構造例を示す説明図である。FIG. 3 is an explanatory diagram showing an example data structure of a threshold value determination method table. 本実施の形態による処理例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of processing according to the present embodiment. 埋め領域情報テーブルのデータ構造例を示す説明図である。FIG. 3 is an explanatory diagram showing an example data structure of a filling area information table. 本実施の形態による処理例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of processing according to the present embodiment. 本実施の形態による処理例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of processing according to the present embodiment. 本実施の形態による処理例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of processing according to the present embodiment. 本実施の形態による処理例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of processing according to the present embodiment. 本実施の形態による処理例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of processing according to the present embodiment. 本実施の形態による処理例を示すフローチャートである。3 is a flowchart illustrating an example of processing according to the present embodiment. 本実施の形態による処理例を示すフローチャートである。3 is a flowchart illustrating an example of processing according to the present embodiment. 本実施の形態による処理例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of processing according to the present embodiment.

以下、図面に基づき本発明を実現するにあたっての好適な一実施の形態の例を説明する。
図1は、本実施の形態の構成例についての概念的なモジュール構成図を示している。
なお、モジュールとは、一般的に論理的に分離可能なソフトウェア(「ソフトウェア」の解釈として、コンピュータ・プログラムを含む)、ハードウェア等の部品を指す。したがって、本実施の形態におけるモジュールはコンピュータ・プログラムにおけるモジュールのことだけでなく、ハードウェア構成におけるモジュールも指す。それゆえ、本実施の形態は、それらのモジュールとして機能させるためのコンピュータ・プログラム(例えば、コンピュータにそれぞれの手順を実行させるためのプログラム、コンピュータをそれぞれの手段として機能させるためのプログラム、コンピュータにそれぞれの機能を実現させるためのプログラム)、システム及び方法の説明をも兼ねている。ただし、説明の都合上、「記憶する」、「記憶させる」、これらと同等の文言を用いるが、これらの文言は、実施の形態がコンピュータ・プログラムの場合は、記憶装置に記憶させる、又は記憶装置に記憶させるように制御するという意味である。また、モジュールは機能に一対一に対応していてもよいが、実装においては、1モジュールを1プログラムで構成してもよいし、複数モジュールを1プログラムで構成してもよく、逆に1モジュールを複数プログラムで構成してもよい。また、複数モジュールは1コンピュータによって実行されてもよいし、分散又は並列環境におけるコンピュータによって1モジュールが複数コンピュータで実行されてもよい。なお、1つのモジュールに他のモジュールが含まれていてもよい。また、以下、「接続」とは物理的な接続の他、論理的な接続(例えば、データの授受、指示、データ間の参照関係、ログイン等)の場合にも用いる。「予め定められた」とは、対象としている処理の前に定まっていることをいい、本実施の形態による処理が始まる前はもちろんのこと、本実施の形態による処理が始まった後であっても、対象としている処理の前であれば、そのときの状況・状態にしたがって、又はそれまでの状況・状態にしたがって定まることの意を含めて用いる。「予め定められた値」が複数ある場合は、それぞれ異なった値であってもよいし、2以上の値(「2以上の値」には、もちろんのことながら、全ての値も含む)が同じであってもよい。また、「Aである場合、Bをする」という記載は、「Aであるか否かを判断し、Aであると判断した場合はBをする」の意味で用いる。ただし、Aであるか否かの判断が不要である場合を除く。また、「A、B、C」等のように事物を列挙した場合は、断りがない限り例示列挙であり、その1つのみを選んでいる場合(例えば、Aのみ)を含む。
また、システム又は装置とは、複数のコンピュータ、ハードウェア、装置等がネットワーク(「ネットワーク」には、一対一対応の通信接続を含む)等の通信手段で接続されて構成されるほか、1つのコンピュータ、ハードウェア、装置等によって実現される場合も含まれる。「装置」と「システム」とは、互いに同義の用語として用いる。もちろんのことながら、「システム」には、人為的な取り決めである社会的な「仕組み」(つまり、社会システム)にすぎないものは含まない。
また、各モジュールによる処理毎に又はモジュール内で複数の処理を行う場合はその処理毎に、対象となる情報を記憶装置から読み込み、その処理を行った後に、処理結果を記憶装置に書き出すものである。したがって、処理前の記憶装置からの読み込み、処理後の記憶装置への書き出しについては、説明を省略する場合がある。なお、ここでの記憶装置としては、ハードディスクドライブ、RAM(Random Access Memoryの略)、外部記憶媒体、通信回線を介した記憶装置、CPU(Central Processing Unitの略)内のレジスタ等を含んでいてもよい。
Hereinafter, an example of a preferred embodiment for realizing the present invention will be described based on the drawings.
FIG. 1 shows a conceptual module configuration diagram of a configuration example of this embodiment.
Note that a module generally refers to logically separable components such as software (computer programs are included in the interpretation of "software"), hardware, and the like. Therefore, the module in this embodiment refers not only to a module in a computer program but also to a module in a hardware configuration. Therefore, this embodiment provides a computer program for making the computer function as those modules (for example, a program for making the computer execute each procedure, a program for making the computer function as each means, a program for making the computer It also serves as an explanation of programs, systems, and methods for realizing the functions of However, for convenience of explanation, words such as "storing", "storing", and equivalent words are used; however, when the embodiment is a computer program, these words mean "storing in a storage device" or "storing". This means controlling the device so that it stores information. In addition, modules may have one-to-one correspondence with functions, but in implementation, one module may be composed of one program, multiple modules may be composed of one program, or conversely, one module may be composed of one program. may be composed of multiple programs. Also, multiple modules may be executed by one computer, or one module may be executed by multiple computers by computers in a distributed or parallel environment. Note that one module may include other modules. Further, hereinafter, the term "connection" is used not only for physical connection but also for logical connection (for example, data exchange, instructions, reference relationships between data, login, etc.). "Predetermined" refers to something that has been determined before the target process, not only before the process according to this embodiment starts, but also after the process according to this embodiment starts. Also, before the target process, it is used to include the meaning that it is determined according to the situation/state at that time or according to the situation/state up to that point. If there are multiple "predetermined values", they may be different values, or two or more values ("two or more values" includes all values, of course). They may be the same. Furthermore, the statement "If A, do B" is used to mean "determine whether A is the case, and if it is A, do B." However, this excludes cases where it is not necessary to determine whether or not it is A. Furthermore, when things are listed like "A, B, C", etc., unless otherwise specified, this is an exemplary list, and includes cases where only one of them is selected (for example, only A).
In addition, a system or device is composed of multiple computers, hardware, devices, etc. connected by communication means such as a network (a "network" includes a one-to-one communication connection), or a This also includes cases where it is realized by a computer, hardware, device, etc. The terms "device" and "system" are used interchangeably. Of course, the term "system" does not include anything that is nothing more than a social "mechanism" (in other words, a social system) that is an artificial arrangement.
In addition, for each process performed by each module, or for each process performed within a module, the target information is read from the storage device, and after the processing is performed, the processing results are written to the storage device. be. Therefore, a description of reading from the storage device before processing and writing to the storage device after processing may be omitted. Note that storage devices here include hard disk drives, RAM (abbreviation for Random Access Memory), external storage media, storage devices via communication lines, registers in CPU (abbreviation for Central Processing Unit), etc. Good too.

本実施の形態である画像処理装置100は、文書を読み込んだ画像から、パンチ穴を除去する画像処理機能を有しており、図1の例に示すように、読込モジュール105、パンチ穴検知モジュール110、パンチ穴除去モジュール130、画像記憶モジュール135、出力モジュール140を有している。
パンチ穴とは、書類等の紙を穿孔した(穴を開けた)ことによって生じる穴をいう。例えば、ファイル、クリップボード、綴り紐等を用いて書類を綴じるために穿孔された丸い穴をいう。なお、パンチ穴には、パンチ穴がある書類を複写したものを含む。
画像処理装置100は、パンチ穴がある書類を読み込んだ画像から、パンチ穴の画像を検出し、そのパンチ穴の画像を除去する。
The image processing apparatus 100 according to the present embodiment has an image processing function of removing punch holes from an image read from a document, and as shown in the example of FIG. 110, a punch hole removal module 130, an image storage module 135, and an output module 140.
A punch hole is a hole created by punching a hole in paper such as a document. For example, a round hole punched to bind documents using files, clipboards, strings, etc. Note that punch holes include copies of documents with punch holes.
The image processing apparatus 100 detects an image of a punch hole from a read image of a document having punch holes, and removes the image of the punch hole.

読込モジュール105は、パンチ穴検知モジュール110と接続されている。読込モジュール105は、文書の画像を読み込み、その画像をパンチ穴検知モジュール110に渡す。例えば、スキャナ、カメラ等で紙の文書を読み込むこと、ファックス等で通信回線を介して外部機器から画像を受信すること、記憶装置(コンピュータに内蔵されているハードディスク等の他に、ネットワークを介して接続されているサーバー等を含む)に記憶されている画像を読み出すこと等が含まれる。画像は、2値画像、多値画像(多値画像には、カラー画像を含む)であってもよい。受け付ける画像は、複数ページからなる画像である。また、画像の内容として、ビジネスに用いられる文書、広告宣伝用のパンフレット等であってもよい。なお、読み込んだ画像には、パンチ穴の画像が含まれている可能性があればよく、全ての画像にパンチ穴の画像が含まれていてもよく、パンチ穴のない画像が混在していてもよい。そして、パンチ穴がある画像は、従来の技術で検知できる程度のパンチ穴の画像があるページと、崩れた形状のパンチ穴の画像があるページが混在していてもよい。 The reading module 105 is connected to the punch hole detection module 110. The reading module 105 reads an image of the document and passes the image to the punch hole detection module 110 . For example, reading paper documents with a scanner or camera, receiving images from an external device via a communication line such as by fax, or using a storage device (such as a hard disk built into a computer, or via a network) This includes reading out images stored in a connected server (including a connected server, etc.). The image may be a binary image or a multivalued image (multivalued images include color images). The accepted image is an image consisting of multiple pages. Furthermore, the content of the image may be a document used for business, a pamphlet for advertising, or the like. Note that it is only necessary that the loaded images include images with punch holes, all images may include images with punch holes, and images without punch holes may be mixed. Good too. Images with punch holes may be a mixture of pages with punch holes that can be detected by conventional techniques and pages with punch holes that are distorted in shape.

パンチ穴検知モジュール110は、第1段階検知モジュール115、第2段階検知モジュール120、パンチ穴情報記憶モジュール125を有しており、読込モジュール105、パンチ穴除去モジュール130と接続されている。パンチ穴検知モジュール110は、読込モジュール105によって読み込まれた画像からパンチ穴の画像、パンチ穴に類似する類似画像を検知する。 The punch hole detection module 110 includes a first stage detection module 115, a second stage detection module 120, and a punch hole information storage module 125, and is connected to the reading module 105 and the punch hole removal module 130. The punch hole detection module 110 detects an image of a punch hole and a similar image similar to the punch hole from the image read by the reading module 105.

第1段階検知モジュール115は、読込モジュール105によって読み込まれた画像からパンチ穴の画像を検知する。第1段階検知モジュール115は、パンチ穴の画像であると確実に認識できるものを検知する。例えば、第1閾値と比較することによって、パンチ穴の画像であるか否かを判断してもよい。第1閾値は、パンチ穴として検知するための閾値である。第1閾値と比較するのは、画像の特徴量であってもよいし、特徴量空間において、正式なパンチ穴の画像と対象としている画像との距離であってもよいし、後述するパンチ穴確度であってもよい。また、予め用意したパンチ穴の画像とのテンプレートマッチングによって、パンチ穴の画像を検知するようにしてもよい。 The first stage detection module 115 detects an image of a punched hole from the image read by the reading module 105. The first stage detection module 115 detects what can be reliably recognized as an image of a punched hole. For example, it may be determined whether the image is a punch hole image by comparing it with a first threshold value. The first threshold is a threshold for detecting a punched hole. The comparison with the first threshold may be the feature quantity of the image, the distance between the formal punch hole image and the target image in the feature space, or the punch hole It may be accuracy. Alternatively, the punch hole image may be detected by template matching with a punch hole image prepared in advance.

第2段階検知モジュール120は、パンチ穴として検知するための第1閾値とパンチ穴ではないと検知するための第2閾値を用い、対象としている画像がその第1閾値とその第2閾値の間にある場合は、パンチ穴に類似する類似画像であると検知する。
なお、第1閾値又は第2閾値と比較するのは、画像の特徴量であってもよいし、特徴量空間において、正式なパンチ穴の画像と対象としている画像との距離であってもよいし、後述するパンチ穴確度であってもよい。
ここで「パンチ穴に類似する類似画像」は、本来はパンチ穴であったが、文書の取り扱い等によって、そのパンチ穴が広がってしまい、第1段階検知モジュール115ではパンチ穴とは検知できなかった画像である。詳細については、図3、図4、図5の例を用いて後述する。
The second stage detection module 120 uses a first threshold value for detecting a punch hole and a second threshold value for detecting a non-punch hole, and the target image is between the first threshold value and the second threshold value. , it is detected that the image is similar to a punch hole.
Note that the comparison with the first threshold value or the second threshold value may be the feature amount of the image, or may be the distance between the official punch hole image and the target image in the feature amount space. However, it may also be punch hole accuracy, which will be described later.
Here, the "similar image similar to a punched hole" was originally a punched hole, but the punched hole expanded due to handling of the document, etc., and the first stage detection module 115 could not detect it as a punched hole. This is an image. Details will be described later using examples shown in FIGS. 3, 4, and 5.

パンチ穴情報記憶モジュール125は、第1段階検知モジュール115又は第2段階検知モジュール120による処理結果であるパンチ穴に関する情報を記憶する。例えば、パンチ穴情報テーブル600を記憶している。図6は、パンチ穴情報テーブル600のデータ構造例を示す説明図である。パンチ穴情報テーブル600は、文書ID欄605、ページID欄610、パンチ穴並び方向欄615、パンチ穴数欄620、位置欄625、大きさ欄630、形状欄635を有している。なお、図6の説明においては、パンチ穴には、第1段階検知モジュール115によって検知されたパンチ穴と第2段階検知モジュール120によって検知されたパンチ穴に類似する類似画像の両方を含む。文書ID欄605は、本実施の形態において、文書を一意に識別するための情報(具体的には、文書ID:IDentificationの略)を記憶している。ページID欄610は、本実施の形態において、ページを一意に識別するための情報(具体的には、ページID)を記憶している。パンチ穴並び方向欄615は、そのページにおけるパンチ穴の並び方向を記憶している。例えば、縦方向、横方向等がある。パンチ穴数欄620は、そのページにおけるパンチ穴の数を記憶している。例えば、1、2、3等がある。なお、パンチ穴数欄620内の数だけ、以下の位置欄625~形状欄635の組がパンチ穴数欄620の後に続く。位置欄625は、そのパンチ穴がある位置を記憶している。例えば、中心位置の座標であってもよいし、パンチ穴の外接矩形の各角の位置等であってもよい。大きさ欄630は、そのパンチ穴の大きさを記憶している。例えば、直径であってもよいし、縦と幅であってもよいし、面積等であってもよい。形状欄635は、そのパンチ穴の形状を記憶している。例えば、第1段階検知モジュール115で検知された場合は円、第2段階検知モジュール120によって検知された場合は楕円形、弓形、四角形の一辺を円弧にした形状等がある。 The punch hole information storage module 125 stores information regarding punch holes, which is a processing result by the first stage detection module 115 or the second stage detection module 120. For example, a punch hole information table 600 is stored. FIG. 6 is an explanatory diagram showing an example data structure of the punch hole information table 600. The punch hole information table 600 has a document ID column 605, a page ID column 610, a punch hole arrangement direction column 615, a punch hole number column 620, a position column 625, a size column 630, and a shape column 635. Note that in the description of FIG. 6, the punched hole includes both a punched hole detected by the first-stage detection module 115 and a similar image similar to the punched hole detected by the second-stage detection module 120. In this embodiment, the document ID column 605 stores information for uniquely identifying a document (specifically, document ID: an abbreviation for IDentification). In this embodiment, the page ID field 610 stores information for uniquely identifying a page (specifically, a page ID). The punch hole alignment direction field 615 stores the punch hole alignment direction on the page. For example, there are vertical direction, horizontal direction, etc. The punch hole number column 620 stores the number of punch holes on that page. For example, there are 1, 2, 3, etc. Note that the following pairs of position fields 625 to shape fields 635 follow the punch hole number field 620 by the number in the punch hole number field 620. The position field 625 stores the position of the punched hole. For example, it may be the coordinates of the center position, or the positions of each corner of the circumscribed rectangle of the punch hole. The size column 630 stores the size of the punched hole. For example, it may be a diameter, length and width, area, etc. The shape column 635 stores the shape of the punched hole. For example, when detected by the first-stage detection module 115, the shape is a circle, and when detected by the second-stage detection module 120, the shape is an ellipse, a bow, or a rectangle with one side of an arc.

パンチ穴除去モジュール130は、パンチ穴検知モジュール110、画像記憶モジュール135、出力モジュール140と接続されている。
パンチ穴除去モジュール130は、第1段階検知モジュール115によって検知されたパンチ穴、第2段階検知モジュール120によって検知されたパンチ穴に類似する類似画像を除去する。除去する方法として、例えば、そのパンチ又は類似画像の周囲と同色の色を埋め込むようにしてもよい。
なお、第1段階検知モジュール115によって検知されたパンチ穴の除去は、その第1段階検知モジュール115によって検知されたパンチ穴の領域を除去対象とする。
パンチ穴除去モジュール130は、読込モジュール105によって読み込まれた、複数ページからなる文書の第1ページからパンチ穴に類似する類似画像をパンチ穴検知モジュール110によって検知した際に、文書のその第1ページとは異なる第2ページでパンチ穴が検知された場合に、類似画像を除去する。
「第1ページとは異なる第2ページ」は、同一文書内のページであって、第1ページではないページであればよい。また、第1ページではないページであって、予め定められたページであってもよい。例えば、第1ページの直前のページであってもよいし、第1ページの直後のページであってもよい。また、第1ページ以外の複数のページにおけるパンチ穴の統計的値を用いるようにしてもよい。ここで統計的値として、例えば、平均値、最頻値、中央値等がある。
なお、パンチ穴除去モジュール130による処理は、ページ順に行うのが一般的である。その場合、第2ページは、第1ページより前にある。また、第1ページ以降のページを第2ページとして用いる場合は、文書の全てのページを読み込んだ後に、最終のページから最初のページに向かって処理を行えばよい。つまり、第2ページは、読み込んだ順番において第1ページよりも前に読み込んだページだけでなく、第1ページよりも後に読み込んだページを対象としてもよい。
The punch hole removal module 130 is connected to the punch hole detection module 110, the image storage module 135, and the output module 140.
The punch hole removal module 130 removes similar images similar to the punch holes detected by the first stage detection module 115 and the punch holes detected by the second stage detection module 120. As a method for removing it, for example, it may be possible to embed a color that is the same as the surrounding area of the punch or similar image.
Note that when removing the punch hole detected by the first stage detection module 115, the region of the punch hole detected by the first stage detection module 115 is targeted for removal.
When the punch hole detection module 110 detects a similar image similar to a punch hole from the first page of a multi-page document read by the reading module 105, the punch hole removal module 130 removes the first page of the document from the first page of the document. If a punch hole is detected on a second page different from the second page, the similar image is removed.
The "second page different from the first page" may be any page within the same document that is not the first page. Alternatively, the page may be a predetermined page other than the first page. For example, the page may be the page immediately before the first page, or the page immediately after the first page. Further, statistical values of punch holes in a plurality of pages other than the first page may be used. Here, the statistical values include, for example, an average value, a mode value, a median value, and the like.
Note that the processing by the punch hole removal module 130 is generally performed in page order. In that case, the second page is before the first page. Furthermore, if the pages after the first page are used as the second page, it is sufficient to read all the pages of the document and then process from the last page to the first page. In other words, the second page may be a page read after the first page as well as a page read before the first page in the order of reading.

また、パンチ穴除去モジュール130は、類似画像の除去する領域の大きさとして、パンチ穴の除去する領域の大きさとは異なるようにしてもよい。
例えば、類似画像の除去の面積は、パンチ穴の除去の面積よりも大きくしてもよい。
Further, the punch hole removal module 130 may set the size of the area to be removed of the similar image to be different from the size of the area to be removed of punch holes.
For example, the area for removing similar images may be larger than the area for removing punch holes.

また、パンチ穴除去モジュール130は、第1ページが、文書の先頭ページ又は最終ページである場合と、途中ページである場合とで、類似画像の除去方法を異なるようにしてもよい。
例えば、パンチ穴除去モジュール130は、第1ページが先頭ページ又は最終ページである場合は、警告せずに類似画像の除去を行うようにしてもよい。
例えば、パンチ穴除去モジュール130は、第1ページが途中ページである場合は、ユーザーに警告を行い、そのユーザーの判断にしたがって除去を行うようにしてもよい。途中ページとは、先頭ページかつ最終ページではないページである。
Further, the punch hole removal module 130 may use a different method for removing similar images depending on whether the first page is the first page or the last page of the document or if it is an intermediate page.
For example, if the first page is the first page or the last page, the punch hole removal module 130 may remove similar images without warning.
For example, if the first page is an intermediate page, the punch hole removal module 130 may warn the user and perform removal according to the user's judgment. An intermediate page is a page that is the first page but not the last page.

また、パンチ穴除去モジュール130は、第1ページ中の類似画像の位置が、第2ページ中のパンチ穴と同じ位置又は対称の位置にある場合、類似画像を除去するようにしてもよい。第1ページと第2ページは、同じパンチ穴が開けられている可能性が高いので、第1ページ中の類似画像の位置が、第2ページ中のパンチ穴と同じ位置にあることを条件として、類似画像を除去するようにしている。なお、「対称の位置」もあるのは、対象としているページが天地逆、裏返し等になっている場合に対応するためである。対称として、点対称、ページの中心線を軸とした線対称等がある。 Further, the punch hole removal module 130 may remove the similar image if the position of the similar image in the first page is the same or symmetrical to the punch hole in the second page. The first and second pages are likely to have the same punched holes, so the condition is that the position of the similar image on the first page is the same as the punched hole on the second page. , similar images are removed. Note that the reason why there is also a "symmetrical position" is to cope with cases where the target page is upside down, upside down, etc. Examples of symmetry include point symmetry and line symmetry about the center line of the page.

画像記憶モジュール135は、パンチ穴除去モジュール130と接続されている。画像記憶モジュール135は、読込モジュール105によって読み込まれた画像、パンチ穴除去モジュール130によって処理された画像を記憶する。パンチ穴除去モジュール130は、パンチ穴検知モジュール110による処理結果を用いて、画像記憶モジュール135内の画像を対象として、パンチ穴の画像とパンチ穴に類似する類似画像を除去し、その除去結果を画像記憶モジュール135に記憶させる。 Image storage module 135 is connected to punch hole removal module 130 . The image storage module 135 stores the image read by the reading module 105 and the image processed by the punch hole removal module 130. The punch hole removal module 130 uses the processing results from the punch hole detection module 110 to remove punch hole images and similar images similar to the punch holes from the images in the image storage module 135, and uses the removal results to remove the punch hole images and similar images similar to the punch holes. The image is stored in the image storage module 135.

出力モジュール140は、パンチ穴除去モジュール130と接続されている。出力モジュール140は、パンチ穴除去モジュール130によってパンチ穴の画像とパンチ穴に類似する類似画像が除去された画像を受け取り、その画像を出力する。画像を出力するとは、例えば、プリンタ等の印刷装置で印刷すること、ディスプレイ等の表示装置に表示すること、FAX等の画像送信装置で画像を送信すること、画像データベース等の画像記憶装置へ画像を書き込むこと、メモリーカード等の記憶媒体に記憶すること、他の情報処理装置へ渡すこと等が含まれる。 The output module 140 is connected to the punch hole removal module 130. The output module 140 receives the image of the punch hole and the image from which the similar image similar to the punch hole has been removed by the punch hole removal module 130, and outputs the image. Outputting an image means, for example, printing it with a printing device such as a printer, displaying it on a display device such as a display, transmitting the image with an image transmission device such as a fax, or transmitting the image to an image storage device such as an image database. This includes writing the information, storing it in a storage medium such as a memory card, and passing it to another information processing device.

図2は、本実施の形態を利用したシステム構成例を示す説明図である。また、本実施の形態を実現するコンピュータのハードウェア構成例を示すブロック図でもある。
画像処理装置200は、画像入力モジュール205、画像処理モジュール210、画像出力モジュール240、メモリ250、CPU255、ROM260、通信モジュール265、操作パネル270を有している。画像入力モジュール205は読込モジュール105の一例であり、検知モジュール215はパンチ穴検知モジュール110の一例であり、画像形成モジュール230はパンチ穴除去モジュール130の一例であり、画像出力モジュール240は出力モジュール140の一例である。
FIG. 2 is an explanatory diagram showing an example of a system configuration using this embodiment. It is also a block diagram showing an example of the hardware configuration of a computer that implements this embodiment.
The image processing device 200 includes an image input module 205, an image processing module 210, an image output module 240, a memory 250, a CPU 255, a ROM 260, a communication module 265, and an operation panel 270. The image input module 205 is an example of the reading module 105, the detection module 215 is an example of the punch hole detection module 110, the image forming module 230 is an example of the punch hole removal module 130, and the image output module 240 is an example of the output module 140. This is an example.

画像入力モジュール205は、画像処理モジュール210の検知モジュール215、CPU255と接続されている。画像入力モジュール205として、例えば、スキャナ等がある。
画像処理モジュール210は、検知モジュール215、画像形成モジュール230を有しており、CPU255と接続されている。画像処理モジュール210は、画像入力モジュール205で入力された画像、又は、メモリ250に記憶されている画像に対して、パンチ穴の画像の除去等の処理を行い、その除去後の画像を画像出力モジュール240に渡す。
検知モジュール215は、画像入力モジュール205、メモリ250と接続されている。検知モジュール215は、パンチ穴の画像の検知、パンチ穴に類似する類似画像の検知を行う。
画像形成モジュール230は、画像出力モジュール240、メモリ250と接続されている。画像形成モジュール230は、対象としているページ画像から、パンチ穴の画像、パンチ穴に類似する類似画像を除去する。
画像出力モジュール240は、画像処理モジュール210の画像形成モジュール230、CPU255と接続されている。画像出力モジュール240として、例えば、プリンタ等がある。
The image input module 205 is connected to the detection module 215 and CPU 255 of the image processing module 210. The image input module 205 includes, for example, a scanner.
The image processing module 210 includes a detection module 215 and an image forming module 230, and is connected to the CPU 255. The image processing module 210 performs processing such as removing punch hole images on the image input by the image input module 205 or the image stored in the memory 250, and outputs the image after the removal. Pass to module 240.
The detection module 215 is connected to the image input module 205 and memory 250. The detection module 215 detects images of punched holes and similar images similar to punched holes.
The image forming module 230 is connected to an image output module 240 and a memory 250. The image forming module 230 removes punch hole images and similar images similar to punch holes from the target page image.
The image output module 240 is connected to the image forming module 230 and CPU 255 of the image processing module 210. Examples of the image output module 240 include a printer and the like.

メモリ250は、画像処理モジュール210の検知モジュール215と画像形成モジュール230、CPU255と接続されている。メモリ250として、例えば、RAM、ハードディスク、フラッシュ・メモリ等がある。
CPU255は、画像入力モジュール205、画像処理モジュール210、画像出力モジュール240、メモリ250、ROM260、通信モジュール265、操作パネル270と接続されている。CPU255は、本実施の形態において説明した各種のモジュール、すなわち、第1段階検知モジュール115、第2段階検知モジュール120、パンチ穴除去モジュール130等の各モジュールの実行シーケンスを記述したコンピュータ・プログラムにしたがった処理を実行する制御部である。
ROM260は、CPU255と接続されている。ROM260は、CPU255が使用するプログラムや演算パラメータ等を格納する。
通信モジュール265は、CPU255と接続されている。通信モジュール265は、通信回線に接続され、外部とのデータ通信処理を実行する。
操作パネル270は、CPU255と接続されている。操作パネル270は、操作者により操作されるデバイスである。操作パネル270は、液晶表示装置又は有機ELディスプレイ等があり、各種情報をテキストやイメージ情報として表示する。また、ポインティングデバイスとディスプレイの両方の機能を備えているタッチスクリーン等であってもよい。その場合、キーボードの機能の実現について、タッチスクリーン上にソフトウェアでキーボード(いわゆるソフトウェアキーボード、スクリーンキーボード等ともいわれる)を描画して、キーボードの機能を実現するようにしてもよい。
The memory 250 is connected to the detection module 215 of the image processing module 210, the image forming module 230, and the CPU 255. Examples of the memory 250 include a RAM, a hard disk, and a flash memory.
The CPU 255 is connected to the image input module 205, image processing module 210, image output module 240, memory 250, ROM 260, communication module 265, and operation panel 270. The CPU 255 follows a computer program that describes the execution sequence of the various modules described in this embodiment, that is, the first stage detection module 115, the second stage detection module 120, the punch hole removal module 130, etc. This is a control unit that executes the specified processing.
ROM260 is connected to CPU255. The ROM 260 stores programs used by the CPU 255, calculation parameters, and the like.
Communication module 265 is connected to CPU 255. The communication module 265 is connected to a communication line and executes data communication processing with the outside.
Operation panel 270 is connected to CPU 255. Operation panel 270 is a device operated by an operator. The operation panel 270 includes a liquid crystal display device, an organic EL display, or the like, and displays various information as text or image information. Alternatively, it may be a touch screen or the like that functions as both a pointing device and a display. In this case, the functions of the keyboard may be realized by drawing a keyboard (also referred to as a so-called software keyboard, screen keyboard, etc.) on the touch screen using software.

コンピュータ・プログラムによるものについては、本ハードウェア構成のシステムにソフトウェアであるコンピュータ・プログラムを読み込ませ、ソフトウェアとハードウェア資源とが協働して、本実施の形態が実現される。
なお、図2に示す画像処理装置100のハードウェア構成は、1つの構成例を示すものであり、本実施の形態は、図2に示す構成に限らず、本実施の形態において説明したモジュールを実行可能な構成であればよい。例えば、プロセッサとして、GPU(Graphics Processing Unitの略、GPGPU(General-Purpose computing on Graphics Processing Unitsの略)を含む)を用いてもよいし、一部のモジュールを専用のハードウェア(例えば特定用途向け集積回路(具体例として、ASIC(Application Specific Integrated Circuitの略)等がある)や再構成可能な集積回路(具体例として、FPGA(Field-Programmable Gate Arrayの略)等がある)で構成してもよく、一部のモジュールは外部のシステム内にあり通信回線で接続している形態でもよく、さらに図2に示すシステムが複数互いに通信回線によって接続されていて互いに協調動作するようにしてもよい。また、特に、パーソナルコンピュータの他、携帯情報通信機器(携帯情報通信機器として、携帯電話、スマートフォン、モバイル機器、ウェアラブルコンピュータ等を含む)、情報家電、ロボット、複写機、ファックス、スキャナ、プリンタ、複合機(複合機とは、スキャナ、プリンタ、複写機、ファックス等のいずれか2つ以上の機能を有している画像処理装置)等に組み込まれていてもよい。
Regarding the computer program, the computer program, which is software, is loaded into the system with this hardware configuration, and the software and hardware resources cooperate to realize this embodiment.
Note that the hardware configuration of image processing apparatus 100 shown in FIG. 2 shows one example of the configuration, and this embodiment is not limited to the configuration shown in FIG. Any configuration that is executable is sufficient. For example, as a processor, a GPU (abbreviation for Graphics Processing Unit, including GPGPU (abbreviation for General-Purpose computing on Graphics Processing Units)) may be used, or some modules may be configured as dedicated hardware (for example, for a specific purpose). It consists of integrated circuits (specific examples include ASICs (application specific integrated circuits)) and reconfigurable integrated circuits (specific examples include FPGAs (field-programmable gate arrays)). Alternatively, some of the modules may be located in an external system and connected via communication lines, or a plurality of the systems shown in FIG. 2 may be connected to each other via communication lines and operate cooperatively with each other. In addition to personal computers, in particular, mobile information communication equipment (mobile information communication equipment includes mobile phones, smartphones, mobile devices, wearable computers, etc.), information appliances, robots, copiers, faxes, scanners, printers, It may be incorporated into a multifunction device (a multifunction device is an image processing device having two or more functions such as a scanner, a printer, a copying machine, and a fax).

図3は、パンチ穴の例についての説明図である。
複数ページからなる文書の場合、パンチ穴を用いてファイルされることから、そのパンチ穴に破れ等が発生することがある。例えば、ファイルされた文書をチェックしたり、そのファイルからページを取り出したりしていると、パンチ穴の部分が破れてしまったりする。
例えば、図3に示すように、複数ページからなる文書300を、バインダー350にセットするために、文書300の各ページにはパンチ穴がある。つまり、文書300は、バインダー350のリング、綴じひも等によって複数枚綴じられている。そして、nページ目(表)310を見るために、ページをめくり、(n-1)ページ目(裏)305に対して、外側に引っ張る力390が加わることになる。すると、(n-1)ページ目(裏)305のパンチ穴が崩れ、その形状が円でなくなることとなる。したがって、予め定められた大きさの円の画像を検出するだけでは、パンチ穴を検出できない場合が発生する。
FIG. 3 is an explanatory diagram of an example of punched holes.
In the case of a document consisting of multiple pages, since it is filed using punch holes, tears may occur in the punch holes. For example, when checking a filed document or extracting a page from the file, the punched holes may tear.
For example, as shown in FIG. 3, in order to set a document 300 consisting of multiple pages in a binder 350, each page of the document 300 has punch holes. In other words, a plurality of documents 300 are bound together using rings of the binder 350, binding strings, and the like. Then, in order to view the nth page (front) 310, the page is turned over, and an outward pulling force 390 is applied to the (n-1)th page (back) 305. As a result, the punch hole on the (n-1)th page (back side) 305 collapses and its shape is no longer a circle. Therefore, there may be cases where punch holes cannot be detected simply by detecting an image of a circle of a predetermined size.

図4は、パンチ穴の例についての説明図である。図3の例に示した文書300の各ページのパンチ穴の例を示したものである。
各ページ(画像401、画像40n、画像40n1等)には、2つのパンチ穴が開けられている。
FIG. 4 is an explanatory diagram of an example of punched holes. This figure shows an example of punch holes on each page of the document 300 shown in the example of FIG. 3 .
Each page (image 401, image 40n, image 40n1, etc.) has two punch holes.

画像401、画像40nは、パンチ穴が崩れていない状態の例を示すものである。
例えば、画像40nは、nページ目の表面の画像を表しており、パンチ穴410n、パンチ穴420nがあり、そのパンチ穴の画像を除去するために、パンチ穴埋め領域412n、パンチ穴埋め領域422nを対象としている。具体的には、図4(a)の例に示すように、パンチ穴420nの周囲を含むように、パンチ穴埋め領域422nを設定して、そのパンチ穴埋め領域422を除去対象としている。
Image 401 and image 40n show examples of punched holes that are intact.
For example, the image 40n represents the image of the surface of the n-th page, and there are punch holes 410n and 420n, and in order to remove the image of the punch holes, the punch hole filling area 412n and the punch hole filling area 422n are targeted. It is said that Specifically, as shown in the example of FIG. 4A, a punch hole filling region 422n is set to include the periphery of the punch hole 420n, and the punch hole filling region 422 is targeted for removal.

画像40n1は、パンチ穴が崩れている状態の例を示すものである。
例えば、画像40n1は、(n+1)ページ目の表面の画像を表しており、パンチ穴410n1、類似パンチ穴420n1があり、その崩れたパンチ穴の画像を除去するために、パンチ穴埋め領域412n1、類似パンチ穴埋め領域422n1を対象としている。具体的には、図4(b)の例に示すように、類似パンチ穴420n1の周囲を含み、さらに、埋め領域形状拡張方向440に拡張して類似パンチ穴埋め領域422n1を設定して、その類似パンチ穴埋め領域422n1を除去対象としている。なお、「埋め領域形状拡張方向440に拡張」として、図4(b)の例では右方向と左方向の2つの方向があるが、埋め領域形状拡張方向440の画像40n1の端であって、近い方の端への方向を採用すればよい。図4(b)の例では、左方向に拡張している。なお、埋め領域形状拡張方向440は、複数のパンチ穴の中心を通る直線であるパンチ穴の並び方向430と垂直に交わる直線であり、類似パンチ穴420n1の中心を通る。
類似パンチ穴埋め領域422n1の面積(類似パンチ穴埋め領域422n1の面積は、「類似画像の除去の面積」の一例)は、パンチ穴埋め領域422nの面積(パンチ穴埋め領域422nの面積は、「パンチ穴の除去する面積」の一例)よりも大きくしている。
The image 40n1 shows an example of a state where the punch hole is collapsed.
For example, the image 40n1 represents an image of the surface of the (n+1)th page, and includes a punch hole 410n1 and a similar punch hole 420n1. The punch hole filling area 422n1 is targeted. Specifically, as shown in the example of FIG. 4(b), a similar punch hole filling region 422n1 is set including the surroundings of the similar punch hole 420n1 and further expanded in the filling region shape expansion direction 440, and The punch hole filling region 422n1 is targeted for removal. In addition, in the example of FIG. 4B, there are two directions, the right direction and the left direction, as "expansion in the filling region shape expansion direction 440", but the end of the image 40n1 in the filling region shape expansion direction 440, The direction to the nearest end may be adopted. In the example of FIG. 4(b), it is expanded to the left. Note that the filling region shape expansion direction 440 is a straight line that intersects perpendicularly with the punch hole arrangement direction 430, which is a straight line passing through the centers of the plurality of punch holes, and passes through the centers of the similar punch holes 420n1.
The area of the similar punch hole filling region 422n1 (the area of the similar punch hole filling region 422n1 is an example of the "area for removing similar images") is the area of the punch hole filling region 422n (the area of the punch hole filling region 422n is an example of the "area for punch hole removal"). (Example)

図5は、パンチ穴の例についての説明図である。崩れたパンチ穴の具体例を示すものである。
図5(a)の例に示す画像501には、パンチ穴領域510、パンチ穴領域520がある。そして、パンチ穴領域510を拡大した図5(b)の例に示すように、パンチ穴515は崩れている。具体的には、円であるパンチ穴が、左方向に大きくなっている。図3の例で示した外側に引っ張る力390が働くためである。2つのパンチ穴の中心を通る直線と垂直に交わる方向(図5の例では水平方向)であって、画像501の端に近い方向(図5の例では左方向)に、パンチ穴が大きくなっている。したがって、パンチ穴埋め領域も同じように拡張すればよい。
FIG. 5 is an explanatory diagram of an example of punched holes. This shows a specific example of a collapsed punch hole.
The image 501 shown in the example of FIG. 5A includes a punch hole area 510 and a punch hole area 520. As shown in the example of FIG. 5B, which is an enlarged view of the punch hole area 510, the punch hole 515 is collapsed. Specifically, the circular punch hole becomes larger toward the left. This is because the outward pulling force 390 shown in the example of FIG. 3 acts. The punch holes become larger in the direction perpendicular to the straight line passing through the center of the two punch holes (horizontal direction in the example of FIG. 5) and in the direction closer to the edge of the image 501 (to the left in the example of FIG. 5). ing. Therefore, the punch hole filling area may also be expanded in the same way.

本実施の形態では、パンチ穴の形状が崩れている場合であっても、その形状が崩れたパンチ穴の除去を行う。
形状が崩れたパンチ穴は、第1段階検知モジュール115では検知することができない。そこで、対象としているページ以外のページにおけるパンチ穴に関する情報を用いて、形状が崩れたパンチ穴であってもパンチ穴として除去の対象としている。
そして、形状が崩れたパンチ穴については、パンチ穴を埋める領域の形状をパンチ穴の並びとは垂直であって、ページの近い端に向かう方向に領域を拡張している。
In this embodiment, even if the shape of the punch hole is distorted, the punch hole whose shape is distorted is removed.
A punched hole whose shape is distorted cannot be detected by the first stage detection module 115. Therefore, by using information regarding punch holes in pages other than the target page, even punch holes whose shapes are distorted are treated as punch holes to be removed.
For punched holes whose shape has been distorted, the shape of the region to be filled with the punched hole is perpendicular to the row of punched holes, and the region is expanded in the direction toward the near edge of the page.

図7は、本実施の形態による処理例を示すフローチャートである。文書を読み込んだ順に処理を行う例を示している。
1ページ目から最終ページまでの全ページについて、その順にステップS702からステップS722までの処理を繰り返す。
ステップS704では、iページ目をスキャンする。つまり、iページ目の画像を読み込む。
ステップS706では、パンチ穴の検知をする。
ステップS708では、「Ac≧th1」であるか否かを判断し、「Ac≧th1」の場合はステップS718へ進み、それ以外の場合はステップS710へ進む。つまり、パンチ穴としての確からしさを示すパンチ穴確度であるAcが、第1閾値であるth1以上である場合は、パンチ穴であると判断する。
FIG. 7 is a flowchart showing an example of processing according to this embodiment. An example is shown in which documents are processed in the order they are read.
The processes from step S702 to step S722 are repeated in that order for all pages from the first page to the last page.
In step S704, the i-th page is scanned. In other words, the i-th page image is read.
In step S706, punch holes are detected.
In step S708, it is determined whether or not "Ac i ≧th1". If "Ac i ≧th1", the process advances to step S718; otherwise, the process advances to step S710. In other words, if the punch hole accuracy A i indicating the probability that the hole is a punch hole is greater than or equal to the first threshold value th1, it is determined that the punch hole is a punch hole.

ステップS710では、「th1>Ac≧th2」であるか否かを判断し、「th1>Ac≧th2」の場合はステップS712へ進み、それ以外の場合はステップS722へ進む。つまり、パンチ穴に類似する類似画像を検知した場合は、ステップS712へ進むことになる。そして、パンチ穴に類似する類似画像でもない場合は、ステップS722へ進むことになる。 In step S710, it is determined whether "th1>Ac i ≧th2", and if "th1>Ac i ≧th2", the process proceeds to step S712; otherwise, the process proceeds to step S722. That is, if a similar image similar to a punched hole is detected, the process advances to step S712. If the image is not a similar image similar to a punch hole, the process advances to step S722.

ステップS712では、登録された埋め領域情報を取り出す。例えば、i-1ページにおける埋め領域情報テーブル1100を取り出す。
ステップS714では、i-1ページの同位置にパンチ穴があるか否かを判断し、ある場合はステップS716へ進み、それ以外の場合はステップS722へ進む。つまり、前のページのパンチ穴の位置と同じ位置に、対象ページのパンチ穴に類似する類似画像がある場合は、穴が連続しているとみなし、ステップS716以降の穴埋め処理を実施する。なお、i-1ページ(前のページ)を用いているが、対象としているページ(iページ)以外のページであればよい。
ステップS716では、埋め領域を拡張する。具体的には、パンチ穴の並び(複数のパンチ穴の中心を通る直線)とは垂直であって、ページ画像の端のうち近い方の端の方向へ領域を拡張する。図4の例に示した類似パンチ穴埋め領域422n1を生成する。
In step S712, the registered filling area information is extracted. For example, the fill area information table 1100 on page i-1 is extracted.
In step S714, it is determined whether there is a punch hole at the same position on page i-1. If there is, the process advances to step S716; otherwise, the process advances to step S722. That is, if there is a similar image similar to the punch hole in the target page at the same position as the punch hole in the previous page, it is assumed that the holes are continuous, and the hole filling process from step S716 onwards is performed. Although page i-1 (previous page) is used, any page other than the target page (i-page) may be used.
In step S716, the filling area is expanded. Specifically, the area is expanded in the direction of the edge of the page image that is perpendicular to the row of punch holes (a straight line passing through the centers of the plurality of punch holes) and is closer to the edge of the page image. A similar punch hole filling region 422n1 shown in the example of FIG. 4 is generated.

ステップS718では、埋め領域情報を登録する。具体的には、パンチ穴情報テーブル600を生成する。
ステップS720では、穴埋め処理を行う。具体的には、パンチ穴の周辺の画像を用いて、図4の例に示したパンチ穴埋め領域422n、又は、類似パンチ穴埋め領域422n1内を塗りつぶす。
ステップS722では、全ページ終了までステップS702からの処理を繰り返し、全ページ終了したらステップS724へ進む。
In step S718, fill area information is registered. Specifically, a punch hole information table 600 is generated.
In step S720, hole filling processing is performed. Specifically, the punch hole filling area 422n shown in the example of FIG. 4 or the similar punch hole filling area 422n1 is filled using the image around the punch hole.
In step S722, the process from step S702 is repeated until all pages are completed, and when all pages are completed, the process advances to step S724.

ステップS724では、「th1>Ac≧th2」であるか否かを判断し、「th1>Ac≧th2」の場合はステップS726へ進み、それ以外の場合は処理を終了(ステップS799)する。つまり、1ページ目のAcについて、ステップS710と同等の処理を行う。本フローチャートによる処理の場合は、1ページ目で、ステップS710でYesとなった場合であっても、ステップS714では前ページがないため、ステップS716以降の処理ができないこととなる。そこで、ステップS724の処理を行う。ただし、対象としている文書内にパンチ穴がなかった場合は、ステップS724を行わないようにしてもよい。
ステップS726では、1ページ目の穴埋め処理をする、又は、ユーザーに警告を通知する。なお、「1ページ目の穴埋め処理」は、ステップS716、S718、S720の処理を含む。また、「警告を通知」として、操作パネル270に警告を表示するようにしてもよいし、ユーザー宛に電子メール、SNSにおけるメッセージ等を用いて警告を送信するようにしてもよい。
In step S724, it is determined whether "th1>Ac 1 ≧th2", and if "th1>Ac 1 ≧th2", the process proceeds to step S726; otherwise, the process ends (step S799). . That is, for Ac 1 of the first page, the same process as step S710 is performed. In the case of the process according to this flowchart, even if the result in step S710 is Yes on the first page, there is no previous page in step S714, so the processes from step S716 onward cannot be performed. Therefore, the process of step S724 is performed. However, if there is no punch hole in the target document, step S724 may not be performed.
In step S726, the blanks on the first page are filled in or a warning is notified to the user. Note that the "first page fill-in process" includes the processes of steps S716, S718, and S720. Further, as a "notify warning", a warning may be displayed on the operation panel 270, or the warning may be sent to the user using an e-mail, a message on SNS, or the like.

図8は、本実施の形態による処理例を示す説明図である。第1段階検知モジュール115、第2段階検知モジュール120によるパンチ穴の検知方法、又は、図7に示すフローチャートのステップS708、S710、S712の処理の一例について説明する。
具体的には、パンチ穴確度(前述のAc)を用いる。パンチ穴確度は、パンチ穴の検知時に算出される、穴としての確からしさ情報を用いるものである。以下、図8(a)の例に示す画像801を用いて説明する。この画像801には、崩れたパンチ穴がある。
FIG. 8 is an explanatory diagram showing an example of processing according to this embodiment. An example of the punch hole detection method by the first stage detection module 115 and the second stage detection module 120, or the processing of steps S708, S710, and S712 in the flowchart shown in FIG. 7 will be described.
Specifically, punch hole accuracy (ac) is used. The punch hole accuracy uses information about the probability that the punch hole is a hole, which is calculated when the punch hole is detected. A description will be given below using an image 801 shown in the example of FIG. 8(a). This image 801 has a collapsed punch hole.

1.画像内のエッジを検出し、2値化する。図8(a)の例に示す画像801に対して、エッジを検出し、2値化した場合、図8(b)の例に示す処理画像811のようになる。エッジの検出方法、2値化方法は、従来の技術を用いればよい。例えば、エッジの検出方法として、エッジ検出用のフィルターを用いてもよいし、微分エッジ検出法を用いてもよい。 1. Edges in the image are detected and binarized. When edges are detected and binarized for the image 801 shown in the example of FIG. 8(a), a processed image 811 shown in the example of FIG. 8(b) is obtained. Conventional techniques may be used as the edge detection method and the binarization method. For example, as an edge detection method, an edge detection filter may be used, or a differential edge detection method may be used.

2.ハフ変換等を用いて、画像内の円を探索し、規定の円領域に所属する画素をカウントする。図8(b)の例に示す処理画像811に対して、ハフ変換を用いて、処理画像811内の円を検出した結果を図8(c)に示す。図8(c)には、処理画像821内に、2つの円である検出円830、検出円832が検出されたことを示している。この検出円830内の画素数を円領域内の画素数としてカウントする。そして、検出円830と検出円832との間にある黒画素数とそれに接続している黒画素数を円周長としてカウントする。
3.円領域内の画素数[pixel]/領域の円周長[pixel]を計算し、パンチ穴確度を算出する。
2. A circle in the image is searched for using Hough transform or the like, and pixels belonging to a specified circular area are counted. FIG. 8C shows the results of detecting circles in the processed image 811 shown in the example of FIG. 8B using Hough transform. FIG. 8C shows that two circles, a detection circle 830 and a detection circle 832, are detected in the processed image 821. The number of pixels within this detection circle 830 is counted as the number of pixels within the circular area. Then, the number of black pixels between the detection circle 830 and the detection circle 832 and the number of black pixels connected thereto are counted as the circumference length.
3. The number of pixels in the circular area [pixel]/the circumference length of the area [pixel] is calculated, and the punch hole accuracy is calculated.

4.パンチ穴確度と、第1の閾値(以下Th1)又は第2の閾値(以下Th2)とを比較することによって、穴検知結果を決定する。例えば、閾値判断方法テーブル900を用いて判断する。図9は、閾値判断方法テーブル900のデータ構造例を示す説明図である。閾値判断方法テーブル900は、判断欄910、判断欄920、判断欄930を有している。なお、th1>th2とする。
判断欄910では、「Ac≧th1」の場合に、「パンチ穴と決定する」と判断する。
判断欄920では、「th1>Ac≧th2」の場合に、「決定困難」と判断する。
判断欄930では、「th2>Ac」の場合に、「パンチ穴ではないと決定する」と判断する。
つまり、円に近い画像である場合、つまり、崩れていないパンチ穴である場合は、パンチ穴確度は予め定められた閾値Th1以上であって、パンチ穴とは認められない場合は、パンチ穴確度は、予め定められた閾値Th2未満となる。そして、パンチ穴確度は閾値Th1より大であって、閾値Th2以上となる場合は、パンチ穴に類似する画像、つまり、崩れているパンチ穴であると判断する。
円領域の大きさは、一般的なパンチ穴サイズをカバーするように定めればよい。具体的には、2穴パンチ穴の場合、ISO838に直径5.5mm~6.5mmと規定されているため、この近辺とすればよい。これらの値によって、閾値Th1、閾値Th2を定めればよい。
パンチ穴確度は、パンチ穴の検知手法によって適切に定めるものとすればよい。例えば、パンチ穴の検知手法として、テンプレートマッチングを用いる場合は、累積二乗誤差の逆数をパンチ穴確度とすればよい。つまり、閾値を2つ用意し、一方の閾値との比較によってパンチ穴であると判断し、他方の閾値との比較によってパンチ穴ではないと判断し、両方の閾値の間にある場合は、パンチ穴に類似する画像であると判断するように、閾値、特徴量であるパンチ穴確度を設定すればよい。前述の例の他に、検出円830と検出円832の間にある黒画素数と本来のパンチ穴である場合の黒画素数との比率をパンチ穴確度としてもよい。
4. A hole detection result is determined by comparing the punch hole accuracy with a first threshold value (hereinafter referred to as Th1) or a second threshold value (hereinafter referred to as Th2). For example, the determination is made using the threshold value determination method table 900. FIG. 9 is an explanatory diagram showing an example of the data structure of the threshold value determination method table 900. The threshold value judgment method table 900 has a judgment column 910, a judgment column 920, and a judgment column 930. Note that th1>th2.
In the judgment column 910, in the case of “Ac i ≧th1”, it is determined that “a punch hole is determined”.
In the determination column 920, it is determined that "determination is difficult" if "th1>Ac i ≧th2".
In the determination column 930, if "th2> Aci ", it is determined that "it is determined that it is not a punched hole".
In other words, if the image is close to a circle, that is, if the punch hole is not collapsed, the punch hole accuracy is greater than or equal to the predetermined threshold Th1, and if it is not recognized as a punch hole, the punch hole accuracy is is less than a predetermined threshold Th2. If the punch hole accuracy is greater than the threshold Th1 and equal to or greater than the threshold Th2, it is determined that the image is similar to a punch hole, that is, a collapsed punch hole.
The size of the circular area may be determined to cover a general punch hole size. Specifically, in the case of a two-hole punch hole, ISO838 specifies a diameter of 5.5 mm to 6.5 mm, so the diameter may be around this range. The threshold Th1 and the threshold Th2 may be determined based on these values.
Punch hole accuracy may be appropriately determined by a punch hole detection method. For example, when template matching is used as a punch hole detection method, the reciprocal of the cumulative squared error may be used as the punch hole accuracy. In other words, two thresholds are prepared, and a comparison with one threshold determines that it is a punch hole, a comparison with the other threshold determines that it is not a punch hole, and if it is between both thresholds, the punch hole is determined to be a punch hole. A threshold value and a punch hole accuracy, which is a feature amount, may be set so that the image is determined to be similar to a hole. In addition to the above example, the punch hole accuracy may be the ratio of the number of black pixels between the detection circle 830 and the detection circle 832 to the number of black pixels in the case of an original punch hole.

図10、図12は、本実施の形態による処理例を示す説明図である。パンチ穴除去モジュール130によるパンチ穴の除去方法、又は、図7に示すフローチャートのステップS716、S718、S720の処理の一例について説明する。
パンチ穴の崩れ方として、紙端までやぶれが発生しているケースがあるため、パンチ穴か否かの決定が困難である。閾値判断方法テーブル900の判断欄920に該当する場合である。
そこで、対象としているページとは異なる他のページ(図7に示すフローチャートでは、対象としているページの前ページ)の同じ位置、又は、その近辺に、パンチ穴が存在する場合は、他ページにおける埋め領域情報テーブル1100を用いて、パンチ穴の並び方向と垂直に、ページの紙端まで埋め領域形状を拡張する。
10 and 12 are explanatory diagrams showing processing examples according to this embodiment. An example of the punch hole removal method by the punch hole removal module 130 or the processing of steps S716, S718, and S720 in the flowchart shown in FIG. 7 will be described.
In some cases, the punched hole collapses to the edge of the paper, making it difficult to determine whether it is a punched hole or not. This is a case corresponding to the judgment column 920 of the threshold judgment method table 900.
Therefore, if there is a punch hole at the same position or in the vicinity of another page different from the target page (in the flowchart shown in Figure 7, the previous page of the target page), it is necessary to fill it in the other page. Using the area information table 1100, the filling area shape is extended to the edge of the page perpendicular to the direction in which the punch holes are arranged.

(1)Ac≧Th1の場合(つまり、崩れていないパンチ穴の場合)
図10(a)の例に示すように、画像1001からパンチ穴を検知し、その埋め領域形状1010として「円」、埋め領域位置1015として「パンチ穴の中心位置の座標、そして、半径に予め定められた値を加えた値」を抽出し、また、他のパンチ穴との関係からパンチ穴の並び方向1005として「複数のパンチ穴の中心を通る縦線」を抽出する。これらの情報から埋め領域情報テーブル1100を生成する。図11は、埋め領域情報テーブル1100のデータ構造例を示す説明図である。埋め領域情報テーブル1100は、パンチ穴並び方向欄1105、埋め領域形状欄1110、埋め領域位置欄1115を有している。パンチ穴並び方向欄1105は、前述のパンチ穴の並び方向1005を記憶している。埋め領域形状欄1110は、前述の埋め領域形状1010を記憶している。埋め領域位置欄1115は、前述の埋め領域位置1015を記憶している。
そして、図10(b)の例に示す穴埋め処理後画像1031のように、パンチ穴を除去する。具体的には、そのパンチ穴の埋め領域位置1015を周囲の色で埋めればよい。
(1) When Ac≧Th1 (that is, when the punch hole is not collapsed)
As shown in the example of FIG. 10(a), a punch hole is detected from an image 1001, the filling area shape 1010 is a "circle", the filling area position 1015 is "coordinates of the center position of the punch hole, and the radius is set in advance. A value obtained by adding a predetermined value is extracted, and a "vertical line passing through the centers of a plurality of punch holes" is extracted as the punch hole arrangement direction 1005 from the relationship with other punch holes. A filling area information table 1100 is generated from this information. FIG. 11 is an explanatory diagram showing an example of the data structure of the filling area information table 1100. The filling area information table 1100 has a punch hole arrangement direction column 1105, a filling area shape column 1110, and a filling area position column 1115. The punch hole arrangement direction column 1105 stores the above-mentioned punch hole arrangement direction 1005. The filling area shape column 1110 stores the aforementioned filling area shape 1010. The filling area position column 1115 stores the above-mentioned filling area position 1015.
Then, the punch holes are removed, as shown in the image 1031 after hole filling processing shown in the example of FIG. 10(b). Specifically, the filling area position 1015 of the punch hole may be filled with the surrounding color.

(2)Th1>Ac≧Th2の場合(つまり、崩れているパンチ穴の場合)
図12(a)の例に示すように、画像1201には、やぶれのあるパンチ穴1202がある。他のページにおける埋め領域情報テーブル1100を利用する。もしも、他のページの同じ位置に埋め領域情報テーブル1100の情報がなければ(つまり、他のページの同じ位置にパンチ穴がない場合)、パンチ穴除去モジュール130による処理は行わない。図7の例に示すフローチャートでは、ステップS714の「No」の判断が行われた場合は、ステップS716、S718、S720の処理は行われない。なお、図7の例に示すフローチャートにおける「i-1ページ(前ページ)」が「他のページ」の一例である。
図12(b)の例に示すように、他のページの埋め領域情報テーブル1100の情報を用いて、パンチ穴並び方向1205、埋め領域形状1210を決定し、さらに、パンチ穴並び方向1205と垂直方向に、埋め領域形状1210を紙端まで拡張して、埋め領域1225を生成する。前述したように、拡張する方向は、ページの端が近い方向である。図12(b)の例では左方向である。
そして、図12(c)の例に示す穴埋め処理後画像1231のように、崩れているパンチ穴を除去する。具体的には、その崩れているパンチ穴の埋め領域1225を周囲の色で埋めればよい。
(2) In the case of Th1>Ac≧Th2 (in other words, in the case of a collapsed punch hole)
As shown in the example of FIG. 12(a), an image 1201 includes a punched hole 1202 that is torn. The filling area information table 1100 in other pages is used. If there is no information in the fill area information table 1100 at the same position on another page (that is, there is no punch hole at the same position on another page), no processing is performed by the punch hole removal module 130. In the flowchart shown in the example of FIG. 7, if the determination in step S714 is "No", the processes in steps S716, S718, and S720 are not performed. Note that "page i-1 (previous page)" in the flowchart shown in the example of FIG. 7 is an example of "other pages".
As shown in the example of FIG. 12(b), the punch hole alignment direction 1205 and the fill area shape 1210 are determined using the information in the fill area information table 1100 of other pages, and furthermore, the punch hole alignment direction 1205 and the fill area shape 1210 are determined. In the direction, the filling area shape 1210 is expanded to the edge of the paper to generate a filling area 1225. As described above, the direction of expansion is the direction closer to the edge of the page. In the example of FIG. 12(b), it is the left direction.
Then, as in the image 1231 after hole filling processing shown in the example of FIG. 12(c), the punched holes that are collapsed are removed. Specifically, the filling area 1225 of the collapsed punch hole may be filled with the surrounding color.

図13は、本実施の形態による処理例を示す説明図である。図13は、パンチ穴の崩れがない場合の処理例を示している。
図13(a1)の例に示す1ページ目おもて面画像1301a、図13(a2)の例に示す2ページ目おもて面画像1302a、図13(a3)の例に示す3ページ目おもて面画像1303a、図13(a4)の例に示す4ページ目おもて面画像1304a、図13(a5)の例に示す5ページ目おもて面画像1305aのように、2つのパンチ穴(例えば、パンチ穴1311a、パンチ穴1321a等)がある場合、それぞれのパンチ穴確度は、0.95であり、閾値Th1は0.90であるので、図7の例に示すフローチャートではステップS708で「Yes」の判断となる。そして、各ページにおける埋め領域情報テーブル1100は、1つ目のパンチ穴では、パンチ穴並び方向欄1105は90度(縦線)、埋め領域形状欄1110は円、埋め領域位置欄1115は(中心座標が(x1、x2)、半径がx3)となり、2つ目のパンチ穴では、パンチ穴並び方向欄1105は90度(縦線)、埋め領域形状欄1110は円、埋め領域位置欄1115は(中心座標が(x4、x5)、半径がx6)となる。
そして、各ページに対して、図13(c1)の例に示す1ページ目おもて面画像1301b、図13(c2)の例に示す2ページ目おもて面画像1302b、図13(c3)の例に示す3ページ目おもて面画像1303b、図13(c4)の例に示す4ページ目おもて面画像1304b、図13(c5)の例に示す5ページ目おもて面画像1305bのように、パンチ穴を除去する処理を行う。例えば、図13(c1)に示す1ページ目おもて面画像1301bでは、パンチ穴1311aを囲む埋め領域1311c内、パンチ穴1321aを囲む埋め領域1321c内を、それぞれの周囲の色で埋めることを行う。
FIG. 13 is an explanatory diagram showing an example of processing according to this embodiment. FIG. 13 shows an example of processing when the punch hole does not collapse.
1st page front image 1301a shown in the example of FIG. 13(a1), 2nd page front image 1302a shown in the example of FIG. 13(a2), and 3rd page shown in the example of FIG. 13(a3) Two images, such as a front image 1303a, a 4th page front image 1304a shown in the example of FIG. 13(a4), and a 5th page front image 1305a shown in the example of FIG. 13(a5), When there are punched holes (for example, punched holes 1311a, punched holes 1321a, etc.), the accuracy of each punched hole is 0.95 and the threshold Th1 is 0.90, so in the flowchart shown in the example of FIG. The determination in S708 is "Yes". In the filling area information table 1100 for each page, for the first punch hole, the punch hole arrangement direction field 1105 is 90 degrees (vertical line), the filling area shape field 1110 is a circle, and the filling area position field 1115 is (center The coordinates are (x1, x2), the radius is x3), and for the second punch hole, the punch hole arrangement direction column 1105 is 90 degrees (vertical line), the fill area shape column 1110 is a circle, and the fill area position column 1115 is 90 degrees (vertical line). (The center coordinates are (x4, x5) and the radius is x6).
Then, for each page, a first page front image 1301b shown in the example of FIG. 13(c1), a second page front image 1302b shown in the example of FIG. ), the 3rd page front image 1303b shown in the example of FIG. 13(c4), the 4th page front image 1304b shown in the example of FIG. As shown in image 1305b, processing is performed to remove punch holes. For example, in the first page front image 1301b shown in FIG. 13(c1), the filling area 1311c surrounding the punch hole 1311a and the filling area 1321c surrounding the punch hole 1321a are filled with the respective surrounding colors. conduct.

図14は、本実施の形態による処理例を示す説明図である。図14は、崩れたパンチ穴が、途中のページである4ページ目にある場合の処理例を示している。なお、他のページである1~3ページ目、5ページ目は、パンチ穴の崩れがない。 FIG. 14 is an explanatory diagram showing an example of processing according to this embodiment. FIG. 14 shows an example of processing when the collapsed punch hole is on the fourth page, which is an intermediate page. Note that the punch holes on the other pages, 1st to 3rd pages, and 5th page, do not collapse.

1~3ページ目は、図13の例と同様の処理を行う。
図14(a4)の例に示す4ページ目おもて面画像1404aでは、崩れたパンチ穴1414a、パンチ穴1424aがある。この場合、パンチ穴確度は0.80となり、閾値Th1(0.90)より小であり、閾値Th2(0.70)以上であるので、閾値判断方法テーブル900の判断欄920に該当する。
そこで、4ページ目おもて面画像1404aのパンチ穴1414aとパンチ穴1424aの位置と同じ位置にパンチ穴がある、前ページである3ページ目における埋め領域情報テーブル1100を利用して、埋め領域を決定する。具体的には、3ページ目おもて面画像1403bでの埋め領域1413c、埋め領域1423cを拡張して、埋め領域1414c、埋め領域1424cを生成する。より具体的には、埋め領域1413c、埋め領域1423cの中心を通る直線(パンチ穴並び方向、図14(c3)の例では縦線)に垂直であって、4ページ目おもて面画像1404bの端のうち近い方の端(図14(c4)の例では左方向)に向かって、埋め領域1413c、埋め領域1423cを拡張して、埋め領域1414c、埋め領域1424cを生成する。
その埋め領域1414c、埋め領域1424cを対象として、パンチ穴の除去処理を行う。
For the first to third pages, the same processing as in the example of FIG. 13 is performed.
In the fourth page front image 1404a shown in the example of FIG. 14(a4), there are collapsed punch holes 1414a and punch holes 1424a. In this case, the punch hole accuracy is 0.80, which is smaller than the threshold Th1 (0.90) and greater than the threshold Th2 (0.70), so it corresponds to the judgment column 920 of the threshold judgment method table 900.
Therefore, by using the filling area information table 1100 for the third page, which is the previous page, which has punch holes at the same positions as the punch holes 1414a and punch holes 1424a of the fourth page front image 1404a, Determine. Specifically, the filling area 1413c and filling area 1423c in the third page front image 1403b are expanded to generate a filling area 1414c and a filling area 1424c. More specifically, the fourth page front image 1404b is perpendicular to a straight line passing through the centers of the filling area 1413c and the filling area 1423c (the punch hole arrangement direction, a vertical line in the example of FIG. 14(c3)). The filling area 1413c and the filling area 1423c are expanded toward the nearer end (leftward in the example of FIG. 14(c4)) to generate a filling area 1414c and a filling area 1424c.
Punch hole removal processing is performed on the filled region 1414c and the filled region 1424c.

図15は、本実施の形態による処理例を示す説明図である。図15は、1~4ページ目にはパンチ穴がなく、5ページ目にはパンチ穴がある場合の処理例を示している。なお、パンチ穴に類似した文字が、途中のページである4ページ目にある。具体的には、4ページ目おもて面画像1504aの左端に文字「a」が印字されている。この部分のパンチ穴確度が0.72となり、閾値判断方法テーブル900の判断欄920に該当する。
しかし、この場合、図7の例に示すフローチャートにしたがうと、前ページである3ページ目おもて面画像1503aではパンチ穴がないと判断されているので、ステップS714で「No」となり、4ページ目おもて面画像1504aでも、パンチ穴がないと判断されることになる。
なお、前述したように、参照するページを前ページに限らず、他のページである後のページ、例えば5ページ目おもて面画像1505aとした場合は、5ページ目おもて面画像1505aにはパンチ穴があるので、4ページ目おもて面画像1504aに対してもパンチ穴の除去処理を行うことになる。
FIG. 15 is an explanatory diagram showing an example of processing according to this embodiment. FIG. 15 shows an example of processing when there are no punch holes on the first to fourth pages and there are punch holes on the fifth page. Note that characters similar to punch holes are on the fourth page, which is an intermediate page. Specifically, the character "a" is printed on the left end of the fourth page front image 1504a. The punch hole accuracy of this part is 0.72, which corresponds to the judgment column 920 of the threshold judgment method table 900.
However, in this case, if the flowchart shown in the example of FIG. 7 is followed, it is determined that there is no punch hole in the front image 1503a of the third page, which is the previous page, so the answer is "No" in step S714, and the result is "No" in step S714. It is determined that there is no punch hole in the page number front image 1504a as well.
Note that, as described above, if the page to be referred to is not limited to the previous page but also another subsequent page, for example, the 5th page front image 1505a, the 5th page front image 1505a Since there is a punch hole, punch hole removal processing is also performed on the fourth page front image 1504a.

図16は、本実施の形態による処理例を示す説明図である。図16は、1ページ目には崩れたパンチ穴があり、2~5ページ目には崩れていないパンチ穴がある場合の処理例を示している。
1ページ目おもて面画像1601aでは、1ページ目であるため前ページにおける埋め領域情報テーブル1100がないため、図7の例に示すフローチャートのステップS714で「No」となる。
2~5ページ目は、図13の例と同様の処理を行う。
そして、最終ページの処理が終了した時点で、図7の例に示すフローチャートのステップS724を行い、「Yes」となるので、図16の例では、ユーザーに「1ページ目に対しても穴埋め処理を行うか否か」の表示を行う警告処理を行う。
なお、前述したように、対象としている文書の他のページにおいてパンチ穴の穴埋め処理が行われていない場合は、ステップS724を行わないようにしてもよい。つまり、そのような処理にした場合は、1ページ目にパンチ穴に類似した画像があったとしても、他のページでパンチ穴の穴埋め処理が行われていない場合は、1ページ目に対しても、パンチ穴の穴埋め処理は行わない。
FIG. 16 is an explanatory diagram showing an example of processing according to this embodiment. FIG. 16 shows an example of processing when the first page has a collapsed punch hole, and the second to fifth pages have punch holes that have not collapsed.
Since the first page front image 1601a is the first page, there is no fill area information table 1100 for the previous page, so the answer is "No" in step S714 of the flowchart shown in the example of FIG.
For the second to fifth pages, the same processing as in the example of FIG. 13 is performed.
Then, when the processing of the final page is completed, step S724 of the flowchart shown in the example of FIG. 7 is performed, and the answer is "Yes". Therefore, in the example of FIG. A warning process is performed to display whether or not to perform the process.
Note that, as described above, if the punch hole filling process has not been performed on other pages of the target document, step S724 may not be performed. In other words, if such processing is used, even if there is an image similar to a punch hole on the first page, if the hole filling process has not been performed on other pages, the image will be changed to the first page. However, no punch hole filling process is performed.

図17は、本実施の形態による処理例を示すフローチャートである。図7の例に示したフローチャートに対して、ステップS1718の処理を加えたものである。つまり、パンチ穴の除去処理を行わないページがある場合は、警告処理を行うようにしている。
さらに、警告処理を行った結果、ユーザーによって、パンチ穴の除去処理を行うとの操作が行われた場合は、他のページにおける埋め領域情報テーブル1100を用いてパンチ穴の除去処理を行うようにしてもよい。例えば、ここでの他のページとして、対象ページの前ページとしてもよい。
FIG. 17 is a flowchart showing an example of processing according to this embodiment. This is the flowchart shown in the example of FIG. 7 with the processing of step S1718 added. In other words, if there is a page for which punch hole removal processing is not performed, a warning processing is performed.
Furthermore, as a result of the warning process, if the user performs an operation to perform punch hole removal processing, the punch hole removal process is performed using the fill area information table 1100 on another page. It's okay. For example, the other page here may be the previous page of the target page.

1ページ目から最終ページまでの全ページについて、その順にステップS1702からステップS1724までの処理を繰り返す。
ステップS1704では、iページ目をスキャンする。
ステップS1706では、パンチ穴を検知する。
ステップS1708では、「Ac≧th1」であるか否かを判断し、「Ac≧th1」の場合はステップS1720へ進み、それ以外の場合はステップS1710へ進む。
The processes from step S1702 to step S1724 are repeated for all pages from the first page to the last page in that order.
In step S1704, the i-th page is scanned.
In step S1706, punch holes are detected.
In step S1708, it is determined whether or not "Ac i ≧th1". If "Ac i ≧th1", the process advances to step S1720; otherwise, the process advances to step S1710.

ステップS1710では、「th1>Ac≧th2」であるか否かを判断し、「th1>Ac≧th2」の場合はステップS1712へ進み、それ以外の場合はステップS1718へ進む。
ステップS1712では、登録された埋め領域情報を取り出す。
ステップS1714では、i-1ページの同位置にパンチ穴があるか否かを判断し、ある場合はステップS1716へ進み、それ以外の場合はステップS1718へ進む。
ステップS1716では、埋め領域を拡張し、ステップS1720へ進む。
ステップS1718では、警告を通知し、ステップS1724へ進む。
ステップS1720では、埋め領域情報を登録する。
ステップS1722では、穴埋め処理を行う。
ステップS1724では、全ページ終了までステップS1702からの処理を繰り返し、全ページ終了したらステップS1726へ進む。
In step S1710, it is determined whether "th1>Ac i ≧th2", and if "th1>Ac i ≧th2", the process advances to step S1712; otherwise, the process advances to step S1718.
In step S1712, the registered filling area information is extracted.
In step S1714, it is determined whether there is a punch hole at the same position on page i-1. If there is, the process advances to step S1716; otherwise, the process advances to step S1718.
In step S1716, the filling area is expanded, and the process advances to step S1720.
In step S1718, a warning is notified, and the process advances to step S1724.
In step S1720, fill area information is registered.
In step S1722, blank filling processing is performed.
In step S1724, the process from step S1702 is repeated until all pages are completed, and when all pages are completed, the process advances to step S1726.

ステップS1726では、「th1>Ac≧th2」であるか否かを判断し、「th1>Ac≧th2」の場合はステップS1728へ進み、それ以外の場合は処理を終了(ステップS1799)する。
ステップS1728では、1ページ目の穴埋め処理をする、又は、ユーザーに警告を通知する。
In step S1726, it is determined whether "th1>Ac 1 ≧th2", and if "th1>Ac 1 ≧th2", the process proceeds to step S1728; otherwise, the process ends (step S1799). .
In step S1728, the blanks on the first page are filled in or a warning is notified to the user.

図18は、本実施の形態による処理例を示すフローチャートである。図7の例に示したフローチャートに対して、ステップS1818、S1820、S1822の処理を加えたものである。つまり、ステップS1814で「No」と判断された場合であっても、ページの天地逆等に対応できるようにしたものである。そして、パンチ穴の除去処理を行わないページがある場合は、警告処理を行うようにしている。 FIG. 18 is a flowchart showing an example of processing according to this embodiment. This is an example in which steps S1818, S1820, and S1822 are added to the flowchart shown in the example of FIG. In other words, even if the determination in step S1814 is "No", it is possible to cope with the case where the page is upside down. If there is a page for which punch hole removal processing is not performed, a warning processing is performed.

1ページ目から最終ページまでの全ページについて、その順にステップS1802からステップS1828までの処理を繰り返す。
ステップS1804では、iページ目をスキャンする。
ステップS1806では、パンチ穴を検知する。
ステップS1808では、「Ac≧th1」であるか否かを判断し、「Ac≧th1」の場合はステップS1824へ進み、それ以外の場合はステップS1810へ進む。
The processes from step S1802 to step S1828 are repeated in that order for all pages from the first page to the last page.
In step S1804, the i-th page is scanned.
In step S1806, punch holes are detected.
In step S1808, it is determined whether or not "Ac i ≧th1". If "Ac i ≧th1", the process advances to step S1824; otherwise, the process advances to step S1810.

ステップS1810では、「th1>Ac≧th2」であるか否かを判断し、「th1>Ac≧th2」の場合はステップS1812へ進み、それ以外の場合はステップS1818へ進む。
ステップS1812では、登録された埋め領域情報を取り出す。
ステップS1814では、i-1ページの同位置にパンチ穴があるか否かを判断し、ある場合はステップS1816へ進み、それ以外の場合はステップS1818へ進む。
ステップS1816では、埋め領域を拡張し、ステップS1824へ進む。
In step S1810, it is determined whether "th1>Ac i ≧th2", and if "th1>Ac i ≧th2", the process advances to step S1812; otherwise, the process advances to step S1818.
In step S1812, the registered filling area information is extracted.
In step S1814, it is determined whether there is a punch hole at the same position on page i-1. If there is, the process advances to step S1816; otherwise, the process advances to step S1818.
In step S1816, the filling area is expanded, and the process advances to step S1824.

ステップS1818では、i-1ページの対称の位置にパンチ穴があるか否かを判断し、ある場合はステップS1820へ進み、それ以外の場合はステップS1822へ進む。ページの天地逆等に対応するために、前のページのパンチ穴の位置と対称となる位置に、対象ページのパンチ穴に類似する類似画像がある場合は、穴が連続しているとみなし、ステップS1820以降の穴埋め処理を実施する。
ステップS1820では、埋め領域を拡張し、ステップS1824へ進む。もちろんのことながら、i-1ページにおける埋め領域と対称の位置に、対象ページにおける埋め領域を拡張する処理を行う。
ステップS1822では、警告を通知し、ステップS1828へ進む。
In step S1818, it is determined whether there is a punch hole at a symmetrical position on page i-1. If there is, the process advances to step S1820; otherwise, the process advances to step S1822. In order to cope with pages upside down, etc., if there is a similar image similar to a punch hole on the target page in a position that is symmetrical to the position of the punch hole on the previous page, the holes are considered to be continuous. Filling processing from step S1820 onwards is performed.
In step S1820, the filling area is expanded, and the process advances to step S1824. Needless to say, processing is performed to extend the filling area in the target page to a position symmetrical to the filling area in page i-1.
In step S1822, a warning is notified and the process advances to step S1828.

ステップS1824では、埋め領域情報を登録する。
ステップS1826では、穴埋め処理を行う。
ステップS1828では、全ページ終了までステップS1802からの処理を繰り返し、全ページ終了したらステップS1830へ進む。
ステップS1830では、「th1>Ac≧th2」であるか否かを判断し、「th1>Ac≧th2」の場合はステップS1832へ進み、それ以外の場合は処理を終了(ステップS1899)する。
ステップS1832では、1ページ目の穴埋め処理をする、又は、ユーザーに警告を通知する。
In step S1824, fill area information is registered.
In step S1826, hole filling processing is performed.
In step S1828, the process from step S1802 is repeated until all pages are completed, and when all pages are completed, the process advances to step S1830.
In step S1830, it is determined whether "th1>Ac 1 ≧th2", and if "th1>Ac 1 ≧th2", the process proceeds to step S1832; otherwise, the process ends (step S1899). .
In step S1832, the first page is filled in or a warning is notified to the user.

図7、図17、図18の例に示すフローチャートでは、ステップS714、ステップS1714、ステップS1814で「i-1ページ」(「i-1ページ」とは、対象ページの前ページ)としているが、iページ以外であれば、他のページであってもよい。例えば、パンチ穴が検知されたページであって、iページに最も近いページとしてもよい。 In the flowcharts shown in the examples of FIGS. 7, 17, and 18, "i-1 page" ("i-1 page" is the previous page of the target page) in steps S714, S1714, and S1814, It may be any other page other than the i-page. For example, it may be a page in which a punch hole is detected and which is closest to page i.

図19は、本実施の形態による処理例を示す説明図である。図18の例に示したフローチャートによる処理例を示したものである。図19は、崩れたパンチ穴が、途中のページである4ページ目にあって、その4ページ目が他のページとは天地逆になっている場合の処理例を示している。なお、他のページである1~3ページ目、5ページ目は、パンチ穴の崩れがなく、正立のページである。 FIG. 19 is an explanatory diagram showing an example of processing according to this embodiment. 19 shows an example of processing according to the flowchart shown in the example of FIG. 18. FIG. 19 shows an example of processing when the collapsed punch hole is on the fourth page, which is an intermediate page, and the fourth page is upside down from the other pages. Note that the other pages, 1st to 3rd pages and 5th page, have no punch holes and are erect.

1~3ページ目、5ページ目は、図13の例と同様の処理を行う。
図19(a4)の例に示す4ページ目おもて面画像1904aでは、崩れたパンチ穴1914a、パンチ穴1924aがある。この場合、パンチ穴確度は0.80となり、閾値Th1(0.90)より小であり、閾値Th2(0.70)以上であるので、閾値判断方法テーブル900の判断欄920に該当する。
そこで、4ページ目おもて面画像1904aのパンチ穴1914aとパンチ穴1924aの位置と対称の位置にパンチ穴がある、前ページである3ページ目における埋め領域情報テーブル1100を利用して、埋め領域を決定する。具体的には、3ページ目おもて面画像1903bでの埋め領域1913c、埋め領域1923cを拡張して、対称変換を行って、埋め領域1914c、埋め領域1924cを生成する。より具体的には、埋め領域1913c、埋め領域1923cの中心を通る直線(パンチ穴並び方向、図19(c3)の例では縦線)に垂直であって、対称変換を行って、4ページ目おもて面画像1904bの端のうち近い方の端(図19(c4)の例では右方向)に向かって、埋め領域1913c、埋め領域1923cを拡張して、埋め領域1914c、埋め領域1924cを生成する。なお、4ページ目おもて面画像1904bでのパンチ穴1914a、パンチ穴1924aを拡張して、埋め領域1914c、埋め領域1924cを生成するようにしてもよい。
その埋め領域1914c、埋め領域1924cを対象として、パンチ穴の除去処理を行う。
For the 1st to 3rd pages and the 5th page, the same processing as in the example of FIG. 13 is performed.
In the fourth page front image 1904a shown in the example of FIG. 19(a4), there are collapsed punch holes 1914a and punch holes 1924a. In this case, the punch hole accuracy is 0.80, which is smaller than the threshold Th1 (0.90) and greater than the threshold Th2 (0.70), so it corresponds to the judgment column 920 of the threshold judgment method table 900.
Therefore, the filling area information table 1100 for the third page, which is the previous page, which has punch holes at positions symmetrical to the positions of punch holes 1914a and punch holes 1924a of the front image 1904a of the fourth page, is used to fill the area. Determine the area. Specifically, the padding region 1913c and padding region 1923c in the third page front image 1903b are expanded and symmetrical transformation is performed to generate padding region 1914c and padding region 1924c. More specifically, the line that is perpendicular to the straight line passing through the centers of the filling area 1913c and the filling area 1923c (the punch hole arrangement direction, the vertical line in the example of FIG. 19(c3)) is symmetrically transformed, and the fourth page is The filling area 1913c and the filling area 1923c are expanded toward the nearer end of the front image 1904b (rightward in the example of FIG. 19(c4)), and the filling area 1914c and the filling area 1924c are expanded. generate. Note that the punch holes 1914a and punch holes 1924a in the fourth page front image 1904b may be expanded to generate a fill area 1914c and a fill area 1924c.
Punch hole removal processing is performed on the filled region 1914c and the filled region 1924c.

なお、前述の実施の形態の説明内での比較処理において、「以上」、「以下」、「より大きい」、「より小さい(未満)」としたものは、例示であって、その組み合わせに矛盾が生じない限り、それぞれ「より大きい」、「より小さい(未満)」、「以上」、「以下」としてもよい。 In addition, in the comparison process in the description of the above-mentioned embodiment, "more than", "less than or equal to", "greater than", and "less than (less than)" are examples, and the combinations are contradictory. As long as this does not occur, "greater than", "less than", "greater than", and "less than or equal to" may be used, respectively.

なお、上記実施形態において、プロセッサとは広義的なプロセッサを指し、汎用的なプロセッサ(例えば、CPU等)や、専用のプロセッサ(例えばGPU、ASIC、FPGA、プログラマブル論理デバイス、等)を含むものである。
また、上記実施形態におけるプロセッサの動作は、1つのプロセッサによって行われてもよいし、また、1つのプロセッサによって成すのみでなく、物理的に離れた位置に存在する複数のプロセッサが協働して成すものであってもよい。また、プロセッサの各動作の順序は、上記実施形態において記載した順序のみに限定されるものではなく、適宜変更してもよい。
Note that in the above embodiments, the processor refers to a processor in a broad sense, and includes a general-purpose processor (eg, CPU, etc.) and a dedicated processor (eg, GPU, ASIC, FPGA, programmable logic device, etc.).
Further, the operations of the processor in the above embodiments may be performed by one processor, or may be performed not only by one processor, but also by multiple processors located at physically distant locations working together. It may be something that is done. Further, the order of each operation of the processor is not limited to the order described in the above embodiments, and may be changed as appropriate.

なお、説明したプログラムについては、記録媒体に格納して提供してもよく、また、そのプログラムを通信手段によって提供してもよい。その場合、例えば、前記説明したプログラムについて、「プログラムを記録したコンピュータ読み取り可能な記録媒体」の発明として捉えてもよい。
「プログラムを記録したコンピュータ読み取り可能な記録媒体」とは、プログラムのインストール、実行、プログラムの流通等のために用いられる、プログラムが記録されたコンピュータで読み取り可能な記録媒体をいう。
なお、記録媒体としては、例えば、デジタル・バーサタイル・ディスク(DVD)であって、DVDフォーラムで策定された規格である「DVD-R、DVD-RW、DVD-RAM等」、DVD+RWで策定された規格である「DVD+R、DVD+RW等」、コンパクトディスク(CD)であって、読出し専用メモリ(CD-ROM)、CDレコーダブル(CD-R)、CDリライタブル(CD-RW)等、ブルーレイ・ディスク(Blu-ray(登録商標) Disc)、光磁気ディスク(MO)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去及び書換可能な読出し専用メモリ(EEPROM(登録商標))、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)、SD(Secure Digitalの略)メモリーカード等が含まれる。
そして、前記のプログラムの全体又はその一部は、前記記録媒体に記録して保存や流通等させてもよい。また、通信によって、例えば、ローカル・エリア・ネットワーク(LAN)、メトロポリタン・エリア・ネットワーク(MAN)、ワイド・エリア・ネットワーク(WAN)、インターネット、イントラネット、エクストラネット等に用いられる有線ネットワーク、又は無線通信ネットワーク、さらにこれらの組み合わせ等の伝送媒体を用いて伝送させてもよく、また、搬送波に乗せて搬送させてもよい。
さらに、前記のプログラムは、他のプログラムの一部分若しくは全部であってもよく、又は別個のプログラムと共に記録媒体に記録されていてもよい。また、複数の記録媒体に分割して記録されていてもよい。また、圧縮や暗号化等、復元可能であればどのような態様で記録されていてもよい。
Note that the program described above may be provided by being stored in a recording medium, or may be provided by means of communication. In that case, for example, the program described above may be regarded as an invention of "a computer-readable recording medium on which a program is recorded."
A "computer-readable recording medium on which a program is recorded" refers to a computer-readable recording medium on which a program is recorded, which is used for program installation, execution, program distribution, etc.
Examples of recording media include digital versatile discs (DVDs), such as "DVD-R, DVD-RW, DVD-RAM, etc.", which are the standards established by the DVD Forum, and DVD+RW, which is the standard established by the DVD Forum. standard "DVD+R, DVD+RW, etc.", compact disc (CD), read-only memory (CD-ROM), CD recordable (CD-R), CD rewritable (CD-RW), etc., Blu-ray disc ( Blu-ray (registered trademark) Disc), magneto-optical disk (MO), flexible disk (FD), magnetic tape, hard disk, read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM (registered trademark) )), flash memory, random access memory (RAM), SD (abbreviation for Secure Digital) memory card, etc.
The entire program or a portion thereof may be recorded on the recording medium and stored or distributed. Also, by communication, for example, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a wired network used for the Internet, an intranet, an extranet, etc., or wireless communication. It may be transmitted using a transmission medium such as a network or a combination thereof, or it may be carried on a carrier wave.
Further, the above program may be part or all of another program, or may be recorded on a recording medium together with a separate program. Further, the information may be divided and recorded on a plurality of recording media. Further, the data may be recorded in any format, such as compression or encryption, as long as it can be restored.

100…画像処理装置
105…読込モジュール
110…パンチ穴検知モジュール
115…第1段階検知モジュール
120…第2段階検知モジュール
125…パンチ穴情報記憶モジュール
130…パンチ穴除去モジュール
135…画像記憶モジュール
140…出力モジュール
200…画像処理装置
205…画像入力モジュール
210…画像処理モジュール
215…検知モジュール
230…画像形成モジュール
240…画像出力モジュール
250…メモリ
255…CPU
260…ROM
265…通信モジュール
270…操作パネル
100... Image processing device 105... Reading module 110... Punch hole detection module 115... First stage detection module 120... Second stage detection module 125... Punch hole information storage module 130... Punch hole removal module 135... Image storage module 140... Output Module 200... Image processing device 205... Image input module 210... Image processing module 215... Detection module 230... Image forming module 240... Image output module 250... Memory 255... CPU
260...ROM
265...Communication module 270...Operation panel

Claims (3)

プロセッサを備え、
前記プロセッサは、
読込手段によって読み込まれた、複数ページからなる文書の第1ページからパンチ穴に類似する類似画像を検知した際に、前記文書の該第1ページとは異なる第2ページでパンチ穴が検知された場合に、前記類似画像を除去し、
前記第1ページは、前記文書の一つのページを示し、
前記類似画像を検知するのに、パンチ穴として検知するための第1閾値とパンチ穴ではないと検知するための第2閾値を用い、前記第1ページ内の対象としている画像が該第1閾値と該第2閾値の間にある場合は、該対象としている画像はパンチ穴に類似する類似画像であると検知し、
前記パンチ穴を検知するのに、前記第2ページ内の対象としている画像が前記第1閾値以上又はより大である場合は、該対象としている画像はパンチ穴であると検知し、
前記第1閾値又は前記第2閾値との比較するものは、前記対象としている画像の特徴量、特徴量空間において正式なパンチ穴の画像と前記対象としている画像との距離、パンチ穴確度のいずれかであり、
前記除去は、前記類似画像の周囲の色と同色の色を埋め込むことにより行い、
前記プロセッサが行う除去処理では、
前記第1ページが前記文書の先頭ページ又は最終ページである場合は、警告せずに前記類似画像の除去を行い、前記第1ページが途中ページである場合は、警告を行い、ユーザーの操作にしたがって除去を行う、
ことを特徴とする画像処理装置。
Equipped with a processor,
The processor includes:
When a similar image similar to a punch hole is detected from the first page of a multi-page document read by the reading means, the punch hole is detected on a second page of the document that is different from the first page. if the similar image is removed ;
the first page indicates one page of the document;
To detect the similar image, a first threshold value for detecting it as a punch hole and a second threshold value for detecting it as not a punch hole are used, and the target image in the first page is set to the first threshold value. and the second threshold, the target image is detected to be a similar image similar to a punch hole,
When detecting the punch hole, if the target image in the second page is equal to or larger than the first threshold value, detecting the target image as a punch hole;
What is compared with the first threshold value or the second threshold value is any of the feature amount of the target image, the distance between the official punch hole image and the target image in the feature space, and the punch hole accuracy. It is
The removal is performed by embedding a color that is the same as the surrounding color of the similar image,
In the removal process performed by the processor,
If the first page is the first page or the last page of the document, the similar image is removed without a warning, and if the first page is an intermediate page, a warning is issued and the user's operation is Therefore, remove
An image processing device characterized by:
前記プロセッサは、
前記第1ページ中の前記類似画像の位置が、前記第2ページ中の前記パンチ穴と同じ位置又は対称の位置にある場合、前記類似画像を除去する、
請求項1に記載の画像処理装置。
The processor includes:
If the position of the similar image in the first page is at the same position or symmetrical position to the punch hole in the second page, removing the similar image;
The image processing device according to claim 1.
コンピュータを、
読込手段によって読み込まれた、複数ページからなる文書の第1ページからパンチ穴に類似する類似画像を検知した際に、前記文書の該第1ページとは異なる第2ページでパンチ穴が検知された場合に、前記類似画像を除去する除去手段
として機能させ、
前記第1ページは、前記文書の一つのページを示し、
前記類似画像を検知するのに、パンチ穴として検知するための第1閾値とパンチ穴ではないと検知するための第2閾値を用い、前記第1ページ内の対象としている画像が該第1閾値と該第2閾値の間にある場合は、該対象としている画像はパンチ穴に類似する類似画像であると検知し、
前記パンチ穴を検知するのに、前記第2ページ内の対象としている画像が前記第1閾値以上又はより大である場合は、該対象としている画像はパンチ穴であると検知し、
前記第1閾値又は前記第2閾値との比較するものは、前記対象としている画像の特徴量、特徴量空間において正式なパンチ穴の画像と前記対象としている画像との距離、パンチ穴確度のいずれかであり、
前記除去は、前記類似画像の周囲の色と同色の色を埋め込むことにより行い、
前記コンピュータが行う除去処理では、
前記第1ページが前記文書の先頭ページ又は最終ページである場合は、警告せずに前記類似画像の除去を行い、前記第1ページが途中ページである場合は、警告を行い、ユーザーの操作にしたがって除去を行う、
画像処理プログラム。
computer,
When a similar image similar to a punch hole is detected from the first page of a multi-page document read by the reading means, the punch hole is detected on a second page of the document that is different from the first page. function as a removal means for removing the similar images in the case of
the first page indicates one page of the document;
To detect the similar image, a first threshold value for detecting it as a punch hole and a second threshold value for detecting it as not a punch hole are used, and the target image in the first page is set to the first threshold value. and the second threshold, the target image is detected to be a similar image similar to a punch hole,
When detecting the punch hole, if the target image in the second page is equal to or larger than the first threshold value, detecting the target image as a punch hole;
What is compared with the first threshold value or the second threshold value is any of the feature amount of the target image, the distance between the official punch hole image and the target image in the feature space, and the punch hole accuracy. It is
The removal is performed by embedding a color that is the same as the surrounding color of the similar image,
In the removal process performed by the computer ,
If the first page is the first page or the last page of the document, the similar image is removed without a warning, and if the first page is an intermediate page, a warning is issued and the user's operation is Therefore, remove
Image processing program.
JP2019152615A 2019-08-23 2019-08-23 Image processing device and image processing program Active JP7358841B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019152615A JP7358841B2 (en) 2019-08-23 2019-08-23 Image processing device and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019152615A JP7358841B2 (en) 2019-08-23 2019-08-23 Image processing device and image processing program

Publications (2)

Publication Number Publication Date
JP2021034855A JP2021034855A (en) 2021-03-01
JP7358841B2 true JP7358841B2 (en) 2023-10-11

Family

ID=74676115

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019152615A Active JP7358841B2 (en) 2019-08-23 2019-08-23 Image processing device and image processing program

Country Status (1)

Country Link
JP (1) JP7358841B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003110835A (en) 2001-09-28 2003-04-11 Kyocera Mita Corp Image forming device
JP2006287625A (en) 2005-03-31 2006-10-19 Ricoh Co Ltd Image processing apparatus, image processing method, program, and information recording medium
JP2012080232A (en) 2010-09-30 2012-04-19 Brother Ind Ltd Image reading device
JP2018152760A (en) 2017-03-14 2018-09-27 セイコーエプソン株式会社 Image processing apparatus, image processing program, and image detecting method of image processing apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003110835A (en) 2001-09-28 2003-04-11 Kyocera Mita Corp Image forming device
JP2006287625A (en) 2005-03-31 2006-10-19 Ricoh Co Ltd Image processing apparatus, image processing method, program, and information recording medium
JP2012080232A (en) 2010-09-30 2012-04-19 Brother Ind Ltd Image reading device
JP2018152760A (en) 2017-03-14 2018-09-27 セイコーエプソン株式会社 Image processing apparatus, image processing program, and image detecting method of image processing apparatus

Also Published As

Publication number Publication date
JP2021034855A (en) 2021-03-01

Similar Documents

Publication Publication Date Title
US8768052B2 (en) Image processing apparatus, image processing method, and non-transitory computer readable medium
JP4600491B2 (en) Image processing apparatus and image processing program
JP4577421B2 (en) Image processing apparatus and image processing program
US8391607B2 (en) Image processor and computer readable medium
CN101609283B (en) Image processing apparatus and image processing method
US20130308862A1 (en) Image processing apparatus, image processing method, and computer readable medium
US9171218B2 (en) Image processing apparatus, image processing method, and computer readable medium that recognize overlapping elements in handwritten input
JP2007221794A (en) Method and apparatus for creating high-fidelity glyph prototype from low-resolution glyph images
US10049097B1 (en) Systems and methods for creating multi-layered optical character recognition (OCR) documents
JP7358841B2 (en) Image processing device and image processing program
US20170091547A1 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
US8749854B2 (en) Image processing apparatus, method for performing image processing and computer readable medium
JP5365440B2 (en) Image processing apparatus and image processing program
JP2018045359A (en) Image processing device and image processing program
JP5867790B2 (en) Image processing device
JP2011248415A (en) Image processing apparatus and image processing program
JP7342518B2 (en) Image processing device and image processing program
JP5206890B1 (en) Image processing apparatus and image processing program
JP2014206836A (en) Bar code position detection device
US8736912B2 (en) Image processing apparatus, image processing method and computer readable medium
US9098768B2 (en) Character detection apparatus, character detection method, and computer-readable storage medium
JP6672762B2 (en) Image processing apparatus and image processing program
JP2010049531A (en) Image processing apparatus and image processing program
JP2007299321A (en) Information processor, information processing method, information processing program and information storage medium
US20130236101A1 (en) Information processing apparatus, non-transitory computer readable medium, and information processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220721

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230313

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230328

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230502

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230801

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230818

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230911

R150 Certificate of patent or registration of utility model

Ref document number: 7358841

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150