JP2017073673A - Image forming apparatus and program - Google Patents

Image forming apparatus and program Download PDF

Info

Publication number
JP2017073673A
JP2017073673A JP2015199674A JP2015199674A JP2017073673A JP 2017073673 A JP2017073673 A JP 2017073673A JP 2015199674 A JP2015199674 A JP 2015199674A JP 2015199674 A JP2015199674 A JP 2015199674A JP 2017073673 A JP2017073673 A JP 2017073673A
Authority
JP
Japan
Prior art keywords
image data
image
threshold value
forming apparatus
master
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.)
Pending
Application number
JP2015199674A
Other languages
Japanese (ja)
Inventor
将樹 中村
Masaki Nakamura
将樹 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2015199674A priority Critical patent/JP2017073673A/en
Publication of JP2017073673A publication Critical patent/JP2017073673A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image forming apparatus and a program with which a binarized threshold can be detected capable of removing unnecessary objects, such as wrinkles and dust from an image obtained by reading a slip or a document and leaving a form and characters unchanged.SOLUTION: An image forming apparatus according to the present invention comprises: image reading means that reads image data; master image storage means that stores a master image; binarization means that binarizes the image data on the basis of a first threshold to create binarized image data; creation means that creates background image data in which character strings are removed from the binarized image data; and determination means that, when the degree of match between the background image data and mater image is equal to or larger than a second threshold, determines that the first threshold is a threshold to binarize the image data.SELECTED DRAWING: Figure 1

Description

本発明は、画像形成装置、及びプログラムに関する。   The present invention relates to an image forming apparatus and a program.

伝票や帳票などの薄く、柔らかい原稿をコピーやスキャンすると皺になりやすく、読み込んだ画像に皺が写り込んでしまうことが多々ある。皺を目立たなくするようにするため、読み取った画像を2値化画像に変換する方法が知られている。画像の2値化手法としては、読み取り画像の輝度ヒストグラムから最適な2値化しきい値を検出し、その2値化しきい値に基づいて2値化する手法である。   When thin or soft documents such as slips or forms are copied or scanned, they tend to become wrinkled, and the wrinkles often appear in the read image. A method of converting a read image into a binarized image is known in order to make the wrinkle inconspicuous. As an image binarization method, an optimum binarization threshold value is detected from a luminance histogram of a read image, and binarization is performed based on the binarization threshold value.

しかし、今までの輝度ヒストグラムによる2値化手法では、原稿の読み取り画像の皺やゴミの部分がフォームと同じ輝度分布側に含まれてしまい、フォーム(文字)と皺やゴミとを識別することが困難であり、読み取り画像から皺やゴミだけを除去し、フォームや文字を残すような最適な2値化しきい値を検出することができないことが課題であった。   However, with the conventional binarization method using the luminance histogram, the wrinkles and dust portions of the read image of the document are included on the same luminance distribution side as the form, and the form (characters) and wrinkles and dust are identified. The problem is that it is impossible to detect an optimal binarization threshold value that removes only wrinkles and dust from a read image and leaves a form and characters.

特許文献1には、複数枚の原稿を印刷する際に白紙ページと白紙でないページとを識別し、更に白紙ページでも印刷すべき白紙ページと印刷するべきではない白紙ページとを識別し、印刷ジョブを制御する技術が公開されている。   Patent Document 1 identifies a blank page and a non-blank page when printing a plurality of originals, and further identifies a blank page that should be printed and a blank page that should not be printed even for a blank page, and a print job. The technology to control is released.

特許文献2には、原稿をコピーやスキャナなどで読み取る際に、文字列と読取ガラスなどに付着しているゴミなどの不要物を識別することでゴミなどの不要物をノイズと判定し、ガラスにゴミなどの不要物がどの位置に付着しているかをユーザに通知する技術が公開されている。   In Patent Document 2, when an original is read with a copy or a scanner, the unnecessary character such as dust attached to the character string and the reading glass is identified to determine the unnecessary material such as dust as noise. A technique for notifying a user of where an unnecessary object such as dust is attached is disclosed.

特許文献3には、蓄積された複数の見本画像より、見本画像の特徴を抽出し、見本画像と同一種類の画像を出力する技術が公開されている。   Patent Document 3 discloses a technique for extracting features of a sample image from a plurality of accumulated sample images and outputting an image of the same type as the sample image.

特許文献1、2、3で公開されている技術において、読み取った画像からゴミや不要物等のノイズを検出できることができるが、原稿の読み取り画像の皺やゴミ等の不要物を除去すると同時に除去してはいけないフォームや文字列などを除去してしまうことがあるため完全とはいえない。   The techniques disclosed in Patent Documents 1, 2, and 3 can detect noise such as dust and unnecessary objects from the read image, but remove unnecessary objects such as wrinkles and dust from the read image of the document at the same time. It may not be complete because it may remove forms and strings that should not be done.

そこで、本発明は、上記課題点に鑑みてなされたもので、その目的とするところは、
伝票や帳票などを読み取った画像から皺やゴミなどの不要物を除去し、フォームや文字を残すことができる2値化しきい値を検出することである。
Therefore, the present invention has been made in view of the above-mentioned problems, and the object is as follows.
This is to detect a binarization threshold that can remove unnecessary objects such as wrinkles and dust from an image obtained by reading a slip or a form and leave a form or a character.

係る目的を達成するために、本発明は、以下の特徴を有することとする。   In order to achieve the object, the present invention has the following features.

本発明に係る画像形成装置は、画像データを読み取る画像読み取り手段と、マスター画像を記憶するマスター画像記憶手段と、画像データを第1のしきい値に基づいて2値化し、2値化画像データを生成する2値化手段と、2値化画像データから文字列を除去した背景画像データを生成する生成手段と、背景画像データとマスター画像の一致の度合が第2のしきい値以上であったとき、第1のしきい値が、画像データを2値化すべきしきい値であると判断する判断手段と、を備えることを特徴とする。   An image forming apparatus according to the present invention binarizes image data based on a first threshold value, an image reading unit that reads image data, a master image storage unit that stores a master image, and binarized image data Binarizing means for generating image data, generating means for generating background image data obtained by removing character strings from the binarized image data, and the degree of matching between the background image data and the master image is equal to or greater than the second threshold value. And determining means for determining that the first threshold value is a threshold value for binarizing the image data.

本発明に係る画像形成装置を実行するためのプログラムは、画像データを読み取る手段と、マスター画像を記憶する手段と、画像データを第1のしきい値に基づいて2値化し、2値化画像データを生成する手段と、2値化画像データから文字列を除去した背景画像データを生成する手段と、背景画像データとマスター画像の一致の度合が第2のしきい値以上であったとき、第1のしきい値が、画像データを2値化すべきしきい値であると判断する手段と、を含むことを特徴とする。   A program for executing the image forming apparatus according to the present invention includes: a means for reading image data; a means for storing a master image; and binarizing image data based on a first threshold value. Means for generating data, means for generating background image data obtained by removing character strings from the binarized image data, and when the degree of matching between the background image data and the master image is equal to or greater than the second threshold value, Means for determining that the first threshold value is a threshold value for binarizing the image data.

本発明によれば、伝票や帳票などを読み取る際に、皺やゴミなどの不要物を除去し、フォームや文字を残した画像データを生成することができる2値化しきい値を検出することができる。   According to the present invention, when reading a slip, a form, or the like, a binarized threshold value that can generate image data that removes unnecessary items such as bags and dust and leaves a form and characters can be detected. it can.

本実施形態における機能ブロックを示す図である。It is a figure which shows the functional block in this embodiment. 本実施形態におけるハードウェア構成を示す図である。It is a figure which shows the hardware constitutions in this embodiment. 本実施形態における画像形成装置へ読み込んだ画像データと画像一致率が最大となるマスター画像を抽出するフォローチャートである。6 is a follow chart for extracting a master image having a maximum image matching rate with image data read into the image forming apparatus according to the present exemplary embodiment. 本実施形態における画像形成装置へ読み込んだ画像データを2値化すべきしきい値を抽出するフローチャートである。6 is a flowchart for extracting a threshold value for binarizing image data read into the image forming apparatus according to the present exemplary embodiment. 本実施形態における読み込んだ画像データの背景画像と文字画像の分離における背景画像を生成の1例である。It is an example of generating a background image in the separation of a background image of read image data and a character image in the present embodiment.

本発明を実施するための形態について図面を参照して説明する。図1は本実施形態の画像形成装置の機能ブロックを示すものである。本実施形態で用いる画像形成装置1は、画像読み取り手段10、マスター画像記憶手段11、2値化手段12、生成手段13、判断手段14から構成されている。   DESCRIPTION OF EMBODIMENTS Embodiments for carrying out the present invention will be described with reference to the drawings. FIG. 1 shows functional blocks of the image forming apparatus of this embodiment. The image forming apparatus 1 used in this embodiment includes an image reading unit 10, a master image storage unit 11, a binarization unit 12, a generation unit 13, and a determination unit 14.

画像読み取り手段10は、コピーやスキャナ機能などを用いて、画像の画像データを読み取る。画像データの色彩はモノクロ、カラーのどちらでも読み取ることが可能であり、画像の読み取り方法として、イメージスキャナ、CTスキャナなど従来で利用されている機器などを用いて行える方法であればどのような方法でもよい。   The image reading unit 10 reads image data of an image using a copy, a scanner function, or the like. The color of the image data can be read in either monochrome or color, and any method can be used as long as the image can be read using a conventionally used device such as an image scanner or a CT scanner. But you can.

マスター画像記憶手段11は、複数の電子データとしてのマスター画像を画像形成装置の内部に記憶する。記憶する電子データとしては、例えば商取引などで用いる様々な契約書などの書類フォーマットや伝票などであるが、機器に電子データとして記憶しておけるようなものであればどのようなものでも構わない。記憶させる方法としては、機器に備えつけてあるスキャナやコピーなどの機能を用いて画像データとして読み込んで記憶させたり、外部I/Fなどを用いてデータを機器に転送して記憶させるなど、電子データとして記憶させることができればどのような記憶方法でもよい。   The master image storage unit 11 stores a master image as a plurality of electronic data in the image forming apparatus. The electronic data to be stored are, for example, document formats such as various contracts used in commercial transactions, slips, etc., but any data can be stored as long as it can be stored as electronic data in the device. Electronic data can be stored by reading and storing it as image data using a scanner or copy function provided in the device, or by transferring data to the device using an external I / F or the like. Any storage method can be used as long as it can be stored.

2値化手段12は、画像読み取り手段10により読み込まれた画像データを所定の2値化しきい値に基づいて2値化して、2値化画像データを生成する処理を行う。所定の2値化しきい値は予め設定されていることを前提とするが、読み込んだ画像データごとに設定できるよう表示装置などに設定画面を出力してもよい。   The binarization unit 12 performs a process of binarizing the image data read by the image reading unit 10 based on a predetermined binarization threshold value to generate binarized image data. Although it is assumed that the predetermined binarization threshold is set in advance, a setting screen may be output to a display device or the like so that it can be set for each read image data.

生成手段13は、画像データを所定のしきい値に基づいて2値化し、画像データから文字列を除去した背景画像データを生成する。ここで所定のしきい値とは、2値化の際の黒と白を判断する画素数の条件である。一例として、読み込んだ画像データをデジタル変換し、各位置の画素値を検出し、「画素数が128以下の画素は全て白、画素数が128より大きい画素は黒にする」、または「画素値が0以外のものは全て黒にする」など2値化のしきい値の設定は様々である。この2値化の所定のしきい値は予め定められているが、ユーザの設定により任意に変更するような構成も可能である。また、文字列を除去した背景画像データと文字列のみで構成される文字列画像データを別途生成することもできる。   The generation unit 13 binarizes the image data based on a predetermined threshold value, and generates background image data obtained by removing the character string from the image data. Here, the predetermined threshold is a condition for the number of pixels for judging black and white in binarization. As an example, the read image data is digitally converted and the pixel value at each position is detected, and “all pixels with 128 or less pixels are set to white and pixels with more than 128 pixels are set to black” or “pixel value There are various settings for the binarization threshold, such as black for all other than 0. The predetermined threshold value for binarization is determined in advance, but a configuration in which it is arbitrarily changed according to user settings is also possible. In addition, it is possible to separately generate character string image data including only background image data and character strings from which character strings have been removed.

生成手段13により生成された背景画像データと、記憶されているマスター画像と、の一致の度合を比較するが、一致の度合を比較する方法としては、位置の画素数の照らし合わせての比較、および位置の画素数の差分による比較、またはその他の方法でもかまわない。尚、一致の度合の比較は、全てのマスター画像に対して行うことも構成上可能であるが、読み込んだ画像データと類似性の高いマスター画像、つまり画像一致率が最も高いマスター画像を予め抽出しておくことが好ましい。抽出方法としては、例えば画像データをデジタル変換して、各位置の画素数を照らし合わせて比較を行ったり、画素数の差分により比較を行ってもよく、その他の方法でもかまわない。更に画像データを読み込む際に、用紙が傾いていたりして記憶されているマスター画像との位置が合わないことを想定して、用紙を回転させて位置を合わせる機能を持たせておくことが好ましい。   The degree of coincidence between the background image data generated by the generation unit 13 and the stored master image is compared. As a method of comparing the degree of coincidence, comparison by comparing the number of pixels at the position, Also, a comparison based on the difference in the number of pixels at the position or other methods may be used. The comparison of the degree of coincidence can be performed for all master images, but a master image having a high similarity with the read image data, that is, a master image having the highest image coincidence rate is extracted in advance. It is preferable to keep it. As an extraction method, for example, image data may be digitally converted and compared by comparing the number of pixels at each position, or may be compared by a difference in the number of pixels, or other methods may be used. Further, when reading the image data, it is preferable to have a function of rotating the paper to align the position, assuming that the paper is tilted and does not align with the stored master image. .

判断手段14は、生成手段13により生成された背景画像データと記憶されているマスター画像の一致の度合が所定のしきい値以上であったとき、生成手段13で用いた2値化のしきい値が、画像データを2値化すべきしきい値であると判断する。背景画像データは文字列を全て除去しており、比較結果として完全に画像データが一致することはないので、ここで用いるしきい値はある程度低めに設定される。更に、画像の一致の度合の判断により、2値化しきい値を変更し、変更した2値化のしきい値に基づいて生成された背景画像データとマスター画像を比較することを繰り返し行うような構成が必要とされる。最終的に画像データを読み込む際に写り込んでしまう皺やゴミを除去した2値化画像を生成するため、最適な2値化しきい値を抽出するには、予め定められて2値化しきい値を少なくとも1回以上変更することが必要となるケースが多い。   When the degree of coincidence between the background image data generated by the generation unit 13 and the stored master image is equal to or greater than a predetermined threshold value, the determination unit 14 uses the binarization threshold used by the generation unit 13. It is determined that the value is a threshold value for binarizing the image data. Since all the character strings are removed from the background image data and the image data does not completely match as a comparison result, the threshold value used here is set somewhat lower. Further, the binarization threshold value is changed based on the determination of the degree of matching of the images, and the background image data generated based on the changed binarization threshold value and the master image are repeatedly compared. Configuration is required. In order to generate a binarized image from which wrinkles and dust that are captured when the image data is finally read is generated, an optimal binarization threshold value is extracted in advance. In many cases, it is necessary to change at least once.

次に本実施形態の画像形成装置のハードウェア構成について図2を用いて説明する。尚、画像形成装置の構成は、図2に示したものと必ずしも同じ構成である必要はなく、本実施形態を実現できるハードウェアを備えていればそれで十分である。   Next, a hardware configuration of the image forming apparatus according to the present exemplary embodiment will be described with reference to FIG. Note that the configuration of the image forming apparatus is not necessarily the same as that shown in FIG. 2, and it is sufficient if it has hardware capable of realizing the present embodiment.

画像形成装置1は、所定のプログラムを実行することにより、画像形成装置1の全体の制御を実現するためのCPU101と、画像形成装置1の電源が投入されたときにCPU101が読出すプログラムを記憶する読出専用メモリ(Read Only Memory(ROM))102と、CPU101が作業用メモリとして使用するランダム・アクセス・メモリ(Random Access Memory(RAM))103と、画像形成装置1の電源が切断されたときに種々のデータの記録を保持することが可能なHDD104と、マウスや入力キーで構成される入力装置105と、液晶、および有機ELなどのパネルを用いたディスプレイを備えた表示装置106と、を備えている。尚、本実施例で用いる所定のしきい値などの情報はROM102、およびRAM103などに格納されている。   The image forming apparatus 1 executes a predetermined program to store a CPU 101 for realizing overall control of the image forming apparatus 1 and a program read by the CPU 101 when the image forming apparatus 1 is powered on. When the image forming apparatus 1 is powered off, the read-only memory (Read Only Memory (ROM)) 102, the random access memory (RAM) 103 used as the work memory by the CPU 101, and the image forming apparatus 1 are turned off. An HDD 104 capable of storing various data records, an input device 105 including a mouse and input keys, and a display device 106 including a display using a panel such as a liquid crystal display and an organic EL display. I have. Information such as a predetermined threshold value used in this embodiment is stored in the ROM 102, the RAM 103, and the like.

また、画像形成装置1は、他の専有機能として、画像処理部107と、スキャナ部108と、コピー部109と、通信I/F110と、画像比較部111と、を備えている。尚、これらの専有機能はCPU101からの指令に基づいて連動して動作する。   In addition, the image forming apparatus 1 includes an image processing unit 107, a scanner unit 108, a copy unit 109, a communication I / F 110, and an image comparison unit 111 as other exclusive functions. These exclusive functions operate in conjunction with each other based on a command from the CPU 101.

画像処理部107は、スキャナ部108部などによって読み込まれ画像データの各種処理を実施する。各種処理とは、画像の明暗や色彩補正、また画像の回転処理などを含めた画像処理に関わる一連の処理が行われる。また読み込んだ画像データの文字列を除去する処理も行われる。各種処理された画像データは記録媒体であるHDD104などに記憶される。   The image processing unit 107 is read by the scanner unit 108 or the like and performs various processes on the image data. Various processes include a series of processes related to image processing including image brightness and color correction, image rotation processing, and the like. Also, a process for removing the character string of the read image data is performed. Various processed image data is stored in the HDD 104 or the like as a recording medium.

スキャナ部108は、画像データから図示しない光学機器を利用して、画像データを読み取る。スキャナ方法としては、イメージスキャナやCTスキャナなど従来の技術を用いられており、画像データを読み取れればどのような方法でもよい。   The scanner unit 108 reads image data from the image data using an optical device (not shown). As the scanner method, a conventional technique such as an image scanner or a CT scanner is used, and any method can be used as long as image data can be read.

コピー部109は、原稿から他の印刷用紙などに画像データを複写する。コピーの手法においては、感光体を用いた転写式のものなど、画像データを転写できるようなものであればどのような手法でもかまわない。   The copy unit 109 copies image data from a document to another printing paper. As a copying method, any method can be used as long as it can transfer image data, such as a transfer type using a photoconductor.

通信I/F110は、外部の機器やコンピュータ等の電子機器との間で各種情報を入出力するためのインターフェースである。画像データなどを通信I/F110を介して入出力を行う。通信I/F110は、例えばUSBポートやLANポート、無線LANポートなどがあり、外部の機器とデータの送受信が行えればどのようなものでも構わない。   The communication I / F 110 is an interface for inputting / outputting various information to / from an external device or an electronic device such as a computer. Input / output image data and the like via the communication I / F 110. The communication I / F 110 includes, for example, a USB port, a LAN port, a wireless LAN port, and the like. Any communication I / F 110 may be used as long as data can be transmitted / received to / from an external device.

画像比較部111は、読み込まれた画像データと、記憶してあるマスター画像と、読み出し、両画像の比較を行う。本実施形態では、2値化処理を行うことになるが、2値化処理も画像比較部111で行わせることが可能であるが、勿論、画像処理部107で行わせるような構成も可能である。   The image comparison unit 111 reads out the read image data and the stored master image, and compares both images. In the present embodiment, binarization processing is performed. The binarization processing can also be performed by the image comparison unit 111. Of course, a configuration in which the image processing unit 107 performs the binarization processing is also possible. is there.

実施例:(画像一致率が最大となるマスター画像の抽出)
次に本実施形態の手順をフローチャートに従って説明する。図3は本実施形態における画像形成装置へ読み込んだ画像データと画像一致率が最大となるマスター画像を抽出するフローチャートである。尚、ここでは読み込んだ画像データと類似性の高いマスター画像を予め抽出する方法の1例であり、この方法に限定されず他の抽出方法でもよく、予め類似性の高いマスター画像を抽出しないような構成も可能である。
Example: (Extraction of master image with maximum image matching rate)
Next, the procedure of this embodiment will be described with reference to a flowchart. FIG. 3 is a flowchart for extracting the master image having the maximum image matching rate with the image data read into the image forming apparatus according to this embodiment. Here, it is an example of a method for extracting in advance a master image having a high similarity with the read image data, and is not limited to this method, and other extraction methods may be used so that a master image having a high similarity is not extracted in advance. A simple configuration is also possible.

まず、画像の画像データを、スキャナ等を用いて読み込む(ステップ1)。スキャナ方法としては、イメージスキャナやCTスキャナなど、従来技術で画像を読み込めればよい。次に記憶媒体などに記憶されているマスター画像を抽出する(ステップ2)。   First, image data of an image is read using a scanner or the like (step 1). As a scanner method, an image may be read by a conventional technique such as an image scanner or a CT scanner. Next, a master image stored in a storage medium or the like is extracted (step 2).

読み込まれた画像データの位置合わせを行うため、画像データの傾きを補正する(ステップ3)。本実施例では、画像データを一定の回転角度を定め、その回転角度に基づいて画像を少しずつ回転させて、マスター画像の上下左右の方向、傾きを合わせるような補正を行う。画像データの位置を合わせる補正方法においては、これに限定されない。   In order to align the read image data, the inclination of the image data is corrected (step 3). In this embodiment, a fixed rotation angle is set for the image data, and the image is rotated little by little based on the rotation angle, and correction is performed so as to match the vertical and horizontal directions and inclination of the master image. The correction method for aligning the position of the image data is not limited to this.

画像データの位置合わせの補正が完了したら(ステップ4)、画像データとマスター画像の画像一致率を算出する(ステップ5)。ここで画像一致率の算出方法としては、画像データをデジタル変換して、位置の画素数を照らし合わせて比較を行ったり、位置の画素数の差分により比較を行ってもよく、その他の方法でもかまわない。また画像データをデジタル変換せず、色彩や画像の輝度などから比較を行うといった方法もある。   When the correction of the image data alignment is completed (step 4), the image matching rate between the image data and the master image is calculated (step 5). Here, as a method for calculating the image coincidence rate, image data may be digitally converted and compared by comparing the number of pixels at the position, or may be compared by the difference in the number of pixels at the position. It doesn't matter. There is also a method in which image data is not digitally converted but compared based on color, image brightness, or the like.

実施例:(画像データの最適な2値化しきい値の抽出)
次に、画像データと抽出したマスター画像基に、画像データの最適な2値化しきい値を抽出する手順をフローチャートに従って説明する。図4は、本実施形態における画像形成装置へ読み込んだ画像データの最適な2値化しきい値を抽出するフローチャートである。
Example: (Extraction of optimum binarization threshold of image data)
Next, a procedure for extracting an optimum binarization threshold value of image data based on the image data and the extracted master image will be described with reference to a flowchart. FIG. 4 is a flowchart for extracting the optimum binarization threshold value of the image data read into the image forming apparatus according to the present embodiment.

まず、読み込んだ画像データを所定のしきい値に基づいて2値化する(ステップ8)。ここで所定のしきい値とは、2値化の際の黒と白を決定する画素数の条件である。一例として、読み込んだ画像データをデジタル変換し、各位置の画素値を検出し、「画素数が128以下の画素は全て白、画素数が128より大きい画素は黒にする」、または「画素値が0以外のものは全て黒にする」など2値化のしきい値の設定は様々であるが、勿論、他の条件として設定することも可能である。   First, the read image data is binarized based on a predetermined threshold value (step 8). Here, the predetermined threshold value is a condition of the number of pixels for determining black and white at the time of binarization. As an example, the read image data is digitally converted and the pixel value at each position is detected, and “all pixels with 128 or less pixels are set to white and pixels with more than 128 pixels are set to black” or “pixel value There are various threshold values for binarization, such as “all other than 0 are black”. Of course, other conditions can be set.

次に、2値化した画像データから文字列を除去した背景画像を生成する(ステップ9)。文字列を除去する方法としては、図5のように文字列と図形を識別し、文字列のみの画像と図形のみの画像に分離するといった手法がある。その他の手法として画像データより文字列を識別し、識別した文字列の位置に該当する箇所の画素を白にするという手法もあるが、いずれにしても、文字列を除去した背景画像が生成できればどのような手法でもかまわない。   Next, a background image is generated by removing the character string from the binarized image data (step 9). As a method of removing a character string, there is a method of identifying a character string and a graphic as shown in FIG. 5 and separating them into an image of only a character string and an image of only a graphic. As another method, there is a method of identifying a character string from image data and whitening a pixel corresponding to the position of the identified character string, but in any case, if a background image from which the character string is removed can be generated Any method is acceptable.

次に、生成された背景画像と、マスター画像の一致の度合を算出する(ステップ10)。一致の度合を比較する方法としては、位置の画素数の照らし合わせての比較、および位置の画素数の差分による比較、またはその他の方法でもかまわない。本実施例での比較対象であるマスター画像は、特定の手法によって画像一致率を算出し、画像一致率が最も高いマスターを予め抽出しているが、全てのマスター画像と一致の度合を算出してもよい。また、背景画像データは文字列を全て除去しているため、比較結果として完全に画像データが一致することはない。   Next, the degree of matching between the generated background image and the master image is calculated (step 10). As a method of comparing the degree of coincidence, a comparison by comparing the number of pixels at a position, a comparison by a difference in the number of pixels at a position, or other methods may be used. The master image, which is the comparison target in this embodiment, calculates the image matching rate by a specific method, and the master having the highest image matching rate is extracted in advance, but the degree of matching with all the master images is calculated. May be. In addition, since all the character strings are removed from the background image data, the image data does not completely match as a comparison result.

次に、算出された一致の度合が所定のしきい値よりも大きいか小さいか判定する(ステップ11)。ここで用いるしきい値はある程度低めに設定される。算出された一致の度合が所定のしきい値よりも大きいとき、そのときの2値化しきい値をこの画像データを2値化すべきしきい値であると判断する(ステップ12)。   Next, it is determined whether the calculated degree of matching is larger or smaller than a predetermined threshold (step 11). The threshold used here is set somewhat lower. When the calculated degree of coincidence is larger than a predetermined threshold value, it is determined that the binarization threshold value at that time is a threshold value for binarizing this image data (step 12).

算出された一致の度合が所定のしきい値以下であるとき、このときの画像データの2値化しきい値に所定の値を加えて2値化しきい値を変更する(ステップ13)。ここで2値化しきい値を変更する際には、黒領域を減少させるしきい値のアップによるものではなく、黒領域を増加させるしきい値のダウンによる変更でもよく、2値化しきい値は加算、減算などで変更することが可能である。   When the calculated degree of coincidence is equal to or less than a predetermined threshold value, a predetermined value is added to the binarization threshold value of the image data at this time to change the binarization threshold value (step 13). Here, when changing the binarization threshold value, the threshold value may be changed not by increasing the threshold value for decreasing the black area but by decreasing the threshold value for increasing the black area. It can be changed by addition or subtraction.

新たに設定された2値化しきい値に基づいて、ステップ8〜ステップ10までの手順を繰り返し、生成された背景画像とマスター画像の一致の度合を算出し、算出された一致の度合が所定のしきい値よりも大きいか小さいか判定する(ステップ14)。算出された一致の度合が所定のしきい値よりも大きいとき、そのときの2値化しきい値がこの画像データに最適なものであると判断する(ステップ12)。   Based on the newly set binarization threshold value, the procedure from Step 8 to Step 10 is repeated, the degree of matching between the generated background image and the master image is calculated, and the calculated degree of matching is a predetermined level. It is determined whether it is larger or smaller than the threshold value (step 14). When the calculated degree of coincidence is larger than a predetermined threshold value, it is determined that the binarization threshold value at that time is optimum for this image data (step 12).

算出された一致の度合が所定のしきい値以下であるとき、ステップ13からの処理を繰り返す。一定の回数の処理を繰り返しても一致の度合が所定のしきい値よりも大きくならないときは、一致の度合の所定のしきい値に最も近い一致の度合であったときの2値化しきい値をこの画像データに最適なものであると判断する(ステップ15)。尚、2値化しきい値変更の処理において回数の規定はしていないが、処理を繰り返す回数を規定してもよい。例えば、繰り返す処理は5回までと定め、5回の処理を行っても一致の度合が所定のしきい値に満たない場合は、その5回のデータの中で最も所定のしきい値に近い一致の度合による2値化しきい値を2値化すべきしきい値として検出する。   When the calculated degree of coincidence is equal to or less than a predetermined threshold value, the processing from step 13 is repeated. If the degree of matching does not become larger than the predetermined threshold even after repeating a certain number of processes, the binarization threshold when the degree of matching is closest to the predetermined threshold of the degree of matching Is determined to be optimal for this image data (step 15). Although the number of times is not specified in the binarization threshold value changing process, the number of times the process is repeated may be specified. For example, if the number of times of matching is less than a predetermined threshold even if the processing is repeated up to five times and the processing is performed five times, it is the closest to the predetermined threshold among the five times of data. A binarization threshold value based on the degree of coincidence is detected as a threshold value to be binarized.

ステップ12、およびステップ15で判断された2値化しきい値に基づいて、画像データを2値化する(ステップ16)。生成させる2値化画像では、皺やゴミなどが写り込んでいないマスター画像と比較を行っており、更にマスター画像と最も一致の度合が高いと判断された2値化画像であるため、皺やゴミなどの不要物が除去された画像データとなっており、印刷を行った際も、皺やゴミなどの不要物が付着することはない。   The image data is binarized based on the binarization threshold value determined in step 12 and step 15 (step 16). Since the binarized image to be generated is a binarized image that has been compared with a master image in which no wrinkles, dust, etc. are reflected, and has been determined to have the highest degree of coincidence with the master image, It is image data from which unnecessary items such as dust are removed, and even when printing is performed, unnecessary items such as soot and dust are not attached.

以上、本実施を好適な形態で行う実施例を説明した。ここでは特定の具体例を示して説明を行ったが、特許請求の範囲の趣旨及び範囲から逸脱しない範囲で、本具体例の様々な修正、および形態変更などが可能である。   In the above, the Example which performs this embodiment with a suitable form was described. Although a specific specific example has been shown and described here, various modifications and form changes of the specific example can be made without departing from the spirit and scope of the claims.

本発明により、伝票や帳票などをコピーやスキャンなどで画像データとして保存しておく際に、皺やゴミなどの不要物を除去し、フォームや文字を残した画像データを生成することができる2値化しきい値を検出することが可能となることを確信する。   According to the present invention, when a slip or a form is stored as image data by copying or scanning, unnecessary data such as a bag or dust can be removed to generate image data that leaves a form or characters. I am confident that it will be possible to detect the threshold value.

本願発明を実現できるような構成であれば、用いる装置の具備する内容、および装置の数量などは本実施例に限定されない。   As long as the present invention can be realized, the contents of the apparatus used, the number of apparatuses, and the like are not limited to the present embodiment.

10 画像読み取り手段
11 マスター画像記憶手段
12 2値化手段
13 生成手段
14 判断手段
DESCRIPTION OF SYMBOLS 10 Image reading means 11 Master image storage means 12 Binarization means 13 Generation means 14 Judgment means

特開平08−335009号公報JP 08-335209 A 特開2011−130267号公報JP 2011-130267 A 特開平04−348475号公報Japanese Patent Laid-Open No. 04-348475

Claims (7)

画像データを読み取る画像読み取り手段と、
マスター画像を記憶するマスター画像記憶手段と、
前記画像データを第1のしきい値に基づいて2値化し、2値化画像データを生成する2値化手段と、
前記2値化画像データから文字列を除去した背景画像データを生成する生成手段と、
前記背景画像データと前記マスター画像の一致の度合が第2のしきい値以上であったとき、前記第1のしきい値が、前記画像データを2値化すべきしきい値であると判断する判断手段と、
を備える画像形成装置。
Image reading means for reading image data;
Master image storage means for storing a master image;
Binarization means for binarizing the image data based on a first threshold value to generate binarized image data;
Generating means for generating background image data obtained by removing character strings from the binarized image data;
When the degree of coincidence between the background image data and the master image is equal to or greater than a second threshold value, the first threshold value is determined to be a threshold value for binarizing the image data. Judgment means,
An image forming apparatus comprising:
前記画像データと前記マスター画像と、を比較する比較手段と、
前記比較手段により、前記画像データと一致の度合が最大であるマスター画像を抽出するマスター画像抽出手段と、
を更に備え
前記判断手段は、前記背景画像データと、前記画像データとの一致の度合が最大であるマスター画像と、の一致の度合を判断する、
ことを特徴とする請求項1に記載の画像形成装置。
A comparison means for comparing the image data with the master image;
A master image extracting means for extracting a master image having a maximum degree of coincidence with the image data by the comparing means;
The determination means determines the degree of coincidence between the background image data and the master image having the largest degree of coincidence with the image data.
The image forming apparatus according to claim 1.
前記比較手段は、前記画像データを所定の回転角度に基づいて回転させ、前記画像データと前記マスター画像と、の各位置の画素値の比較により一致の度合を比較する、
ことを特徴とする請求項2に記載の画像形成装置。
The comparison means rotates the image data based on a predetermined rotation angle, and compares the degree of coincidence by comparing pixel values at each position of the image data and the master image.
The image forming apparatus according to claim 2.
前記判断手段が、前記背景画像データと前記マスター画像の一致の度合が前記第2のしきい値より小さいと判断したとき、
前記2値化手段は、前記画像データを前記第1のしきい値に所定の値を加算、または減算して変更した第3のしきい値に基づいて2値化する、
ことを特徴とする請求項1から3のいずれか1項に記載の画像形成装置。
When the determination unit determines that the degree of matching between the background image data and the master image is smaller than the second threshold value,
The binarization means binarizes the image data based on a third threshold value that is changed by adding or subtracting a predetermined value to or from the first threshold value.
The image forming apparatus according to claim 1, wherein the image forming apparatus is an image forming apparatus.
前記判断手段は、前記第1のしきい値、および前記第3のしきい値に基づいて2値化して生成した前記背景画像と前記マスター画像と、の一致の度合が前記第2のしきい値よりも小さかったとき、一致の度合が最大であった2値化しきい値を、前記画像データに最適な2値化しきい値であると判断する、
ことを特徴とする請求項4に記載の画像形成装置。
The determination means determines whether the degree of coincidence between the background image generated by binarization based on the first threshold value and the third threshold value and the master image is the second threshold value. When it is smaller than the value, it is determined that the binarization threshold value having the maximum degree of coincidence is the optimum binarization threshold value for the image data.
The image forming apparatus according to claim 4.
前記判断手段により判断された2値化しきい値に基づいて、前記画像データを2値化する、
ことを特徴とする請求項1から5のいずれか1項に記載の画像形成装置。
Binarizing the image data based on the binarization threshold value determined by the determination means;
The image forming apparatus according to claim 1, wherein the image forming apparatus is an image forming apparatus.
画像データを読み取る手段と、
マスター画像を記憶する手段と、
前記画像データを第1のしきい値に基づいて2値化し、2値化画像データを生成する手段と、
前記2値化画像データから文字列を除去した背景画像データを生成する手段と、
前記背景画像データと前記マスター画像の一致の度合が第2のしきい値以上であったとき、前記第1のしきい値が、前記画像データを2値化すべきしきい値であると判断する手段と、
を実行させるためのプログラム。
Means for reading image data;
Means for storing a master image;
Means for binarizing the image data based on a first threshold value to generate binarized image data;
Means for generating background image data obtained by removing character strings from the binarized image data;
When the degree of coincidence between the background image data and the master image is equal to or greater than a second threshold value, the first threshold value is determined to be a threshold value for binarizing the image data. Means,
A program for running
JP2015199674A 2015-10-07 2015-10-07 Image forming apparatus and program Pending JP2017073673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015199674A JP2017073673A (en) 2015-10-07 2015-10-07 Image forming apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015199674A JP2017073673A (en) 2015-10-07 2015-10-07 Image forming apparatus and program

Publications (1)

Publication Number Publication Date
JP2017073673A true JP2017073673A (en) 2017-04-13

Family

ID=58537521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015199674A Pending JP2017073673A (en) 2015-10-07 2015-10-07 Image forming apparatus and program

Country Status (1)

Country Link
JP (1) JP2017073673A (en)

Similar Documents

Publication Publication Date Title
JP3809404B2 (en) Image processing method, apparatus and system
JP5934174B2 (en) Method and program for authenticating a printed document
JP6288521B2 (en) Image processing device
JP2011008549A (en) Image processor, image reader, multifunctional machine, image processing method, program, and recording medium
JP2007004621A (en) Document management supporting device, and document management supporting method and program
AU2011200831B2 (en) Dynamic thresholds for document tamper detection
US20080050016A1 (en) Image processing apparatus, image processing method, computer readable medium, and computer data signal
JP2010191952A (en) Apparatus and method for performing shading correction
US8830487B2 (en) System and method for separating image and text in a document
US20140293353A1 (en) Document file output apparatus, document file output method, and computer program
JP2009246967A (en) Method of generating high quality scanned image of document
US9348541B2 (en) Image processing apparatus and method, and non-transitory computer readable medium
JP2009152901A (en) Image processing device, and image processing method
JP2011077580A (en) Image processor, image processing method, and program
JP2017073673A (en) Image forming apparatus and program
JP4396710B2 (en) Image processing apparatus, image processing apparatus control method, and image processing apparatus control program
JP5521449B2 (en) Image discrimination device
JP2021128488A (en) Image processing system and image processing program
JP7520605B2 (en) Image processing device, image processing method, and program
JP2012238051A (en) Image processing device, image processing method, and program
JP4783317B2 (en) Image forming apparatus, image processing method, program for causing computer to execute the method, and recording medium
JP2007328652A (en) Image processing device and image processing program
JP2004104662A (en) Image forming device
JP2010286917A (en) Image processor, image scanner, multifunction apparatus, image processing method, program, and recording medium
JP6973267B2 (en) Image processing equipment and image processing program