JP4101169B2 - Image processing apparatus, image processing method, and computer program - Google Patents
Image processing apparatus, image processing method, and computer program Download PDFInfo
- Publication number
- JP4101169B2 JP4101169B2 JP2003434543A JP2003434543A JP4101169B2 JP 4101169 B2 JP4101169 B2 JP 4101169B2 JP 2003434543 A JP2003434543 A JP 2003434543A JP 2003434543 A JP2003434543 A JP 2003434543A JP 4101169 B2 JP4101169 B2 JP 4101169B2
- Authority
- JP
- Japan
- Prior art keywords
- level
- background
- frequency
- peak
- histogram
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Color, Gradation (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
本発明は、画像処理装置、画像処理方法およびコンピュータプログラムに関し、詳しくは、画像信号に含まれる下地を示す信号レベルを検出し画像から下地を除去する画像処理装置、画像処理方法およびコンピュータプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a computer program. More specifically, the present invention relates to an image processing apparatus, an image processing method, and a computer program that detect a signal level indicating a background included in an image signal and remove the background from an image.
従来、複写機では画像読み取り部のスキャナから読み込まれた画像信号のヒストグラムをとり、それを基に、読み取り原稿の下地(背景)の信号レベルを検出し、その下地レベルを画像信号から減算して、画像から下地を除去する自動下地除去処理が行なわれていた(例えば、特許文献1参照)。
しかしながら、上記のような下地除去処理を行う場合、白い紙に新聞や雑誌等の色の付いた紙の切り抜きを貼ったものを原稿にしたとき、貼り付けた切り抜きの面積によっては、その紙の色が除去されない場合がある。このような使い方をする場合、原稿全体に対する下地色の占める面積比が小さくても、新聞紙等の色は除去したほうが好まれる傾向にある。逆に、デザインとして背景に淡い色が配されている原稿をコピーする際に、背景色が除去されるのは好まれない。 However, when performing the background removal process as described above, when a white paper with a cutout of a colored paper such as a newspaper or magazine is used as a document, depending on the area of the cutout, The color may not be removed. In such a usage, even if the area ratio of the background color to the entire original is small, it tends to be preferred to remove the color of newspapers and the like. On the other hand, when copying a manuscript having a light background color as a design, it is not preferable to remove the background color.
本発明は、原稿全体に対する下地色面積比をユーザが任意に設定することにより、除去したい下地色面積が原稿全体に対して小さい場合でも、下地判定が可能となり高精度に下地レベルを検出する方法を提供することを目的とする。 According to the present invention, a user can arbitrarily set a background color area ratio with respect to the entire document, so that even when the background color area to be removed is smaller than the entire document, the background can be determined and the background level can be detected with high accuracy. The purpose is to provide.
上記課題を達成するために、画像信号に含まれる下地を示すレベルを検出し画像から下地を除去する画像処理装置において、入力画像信号のチャネル毎に各信号レベルの出現頻度を表すヒストグラムを作成するヒストグラム作成手段と、前記ヒストグラム作成手段で作成されたヒストグラム中の最大頻度が白色レベルにある場合、前記最大頻度と前記ヒストグラム中の白色レベルにないピークの頻度差を比較する第1の比較手段と、
前記第1の比較手段によって比較した結果、前記頻度差が第1の閾値よりも小さい場合、前記白色レベルにあるピーク周辺部の頻度和と前記白色レベルにないピーク周辺部の頻度和を比較する第2の比較手段と、前記第2の比較手段によって比較した結果、前記白色レベルにあるピーク周辺部の頻度和から前記白色レベルにないピーク周辺部の頻度和を引いた値が第2の閾値よりも小さい場合、前記ヒストグラム中の複数のピークの中から前記白色レベルにないピークを下地レベル候補とし、前記下地レベル候補の周辺部の頻度を参照し下地レベルを決定する下地レベル決定手段と、前記下地レベル決定手段で決定された下地レベルに基づいて、下地除去処理を行なう下地除去処理手段とを有し、
前記下地レベル決定手段における前記第2の閾値は、操作部から選択される下地除去の判定精度レベルに基づいて決定されることを特徴とする。
In order to achieve the above object, in an image processing apparatus that detects a level indicating a background included in an image signal and removes the background from the image, a histogram representing the appearance frequency of each signal level is created for each channel of the input image signal. And a first comparison unit that compares the maximum frequency and a frequency difference between peaks not in the white level in the histogram when the maximum frequency in the histogram created by the histogram creation unit is at a white level. ,
When the frequency difference is smaller than the first threshold as a result of comparison by the first comparison means, the frequency sum of the peak peripheral portion at the white level is compared with the frequency sum of the peak peripheral portion not at the white level. As a result of comparison between the second comparison unit and the second comparison unit, a value obtained by subtracting the frequency sum of the peak peripheral part not in the white level from the frequency sum of the peak peripheral part in the white level is a second threshold value. Less than the white level among the plurality of peaks in the histogram as a background level candidate, a background level determination means for determining the background level with reference to the frequency of the periphery of the background level candidate, A background removal processing means for performing background removal processing based on the background level determined by the background level determination means;
The second threshold value in the background level determining means is determined based on a background removal determination accuracy level selected from an operation unit .
本発明によれば、入力画像信号のヒストグラムにおいてピークが複数あり、最大頻度が白色レベルにある場合であっても、適切な下地レベルを決定することが可能となります。さらに、下地除去の判定精度レベルをユーザのニーズに応じて設定することにより、除去したい下地色面積が原稿全体に対して小さい原稿に対しても下地判定が可能となり、ユーザの使用目的に適した下地を高精度に検出することができる。 According to the present invention, it is possible to determine an appropriate background level even when there are multiple peaks in the histogram of the input image signal and the maximum frequency is at the white level. Furthermore, by setting the background removal determination accuracy level according to the user's needs, it is possible to perform background determination even for a document whose background color area to be removed is smaller than the entire document, which is suitable for the user's purpose of use. The ground can be detected with high accuracy.
また、保守管理者の設定と一般ユーザの設定から下地レベルが決定されるため、保守管理者が細かな調整をした上で、ユーザがレベルを選択することが可能となり、機器固有の使用形態と使用時毎に異なる使用形態との双方に柔軟に対応できる。 In addition, since the base level is determined from the settings of the maintenance manager and the settings of the general user, it is possible for the maintenance manager to make a fine adjustment and the user to select the level. It is possible to flexibly deal with both different usage patterns for each use.
以下、本発明の好適な実施形態について、添付図面を参照して詳細に説明する。 DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the accompanying drawings.
(第1の実施形態)
本実施形態を適用するのに好適なデジタル複合機の概観図を図1に示す。
(First embodiment)
FIG. 1 shows an overview of a digital multifunction machine suitable for applying this embodiment.
<画像入力部(スキャナ)>
図1において、画像入力デバイスであるスキャナ部200は、原稿となる紙上の画像を照明し、図示しないCCDラインセンサを走査することで、ラスターイメージデータとして電気信号に変換する。原稿用紙は原稿フィーダ201のトレイ202にセットし、ユーザが図5の操作部400から読み取り起動指示することにより、コントローラCPU103がスキャナ200に指示を与え、フィーダ201は原稿用紙を一枚ずつフィードし原稿画像の読み取り動作を行う。
<Image input unit (scanner)>
In FIG. 1, a
<画像出力部(プリンタ)>
図1において、画像出力デバイスであるプリンタ部300はラスターイメージデータを用紙上の画像に変換する部分であり、その方式は感光体ドラムや感光体ベルトを用いた電子写真方式、微少ノズルアレイからインクを吐出して用紙上に直接画像を印字するインクジェット方式等があるが、どの方式でも構わない。プリント動作の起動はコントローラCPU103からの指示によって開始する。プリンタ部300は、異なる用紙サイズまたは異なる用紙向きを選択できるように複数の給紙段を持ち、それに対応した用紙カセット302,303,304,305が装着される。また、排紙トレイ306は印字し終わった用紙を受けるものである。
<Image output unit (printer)>
In FIG. 1, a
<デジタル複合機制御システム構成>
本実施例を適用するのに好適なデジタル複合機の制御システム構成を図2に示す。
<Digital MFP control system configuration>
FIG. 2 shows a control system configuration of a digital multi-function peripheral that is suitable for applying this embodiment.
コントローラユニット100は画像入力装置であるスキャナ200や画像出力装置であるプリンタ300と接続し、一方ではLAN500や電話回線600と接続することで、画像情報やデバイス情報の入出力を行うためのコントローラである。
The
CPU103はデジタル複合機全体を制御するコントローラとして機能する。
The
RAM107はCPU103が動作するためのシステムワークメモリであり、画像データを一時記憶するための画像メモリとしても利用される。
A RAM 107 is a system work memory for the
ROM108はブートROMとして利用され、デジタル複合機のブートプログラムが格納されている。
The
HDD109はハードディスクドライブで、システムソフトウェア、画像データ等を格納する。このHDD109には、ネットワーク(LAN500)に接続されているノードに関する画像出力速度、設置位置などの情報がアドレスごとに保存される場合もある。 An HDD 109 is a hard disk drive and stores system software, image data, and the like. The HDD 109 may store information such as an image output speed and an installation position related to a node connected to the network (LAN 500) for each address.
操作部I/F104は操作部400とのインターフェース部で、操作部400に表示する画像データを操作部400に対して出力する。また、操作部400からユーザが入力した情報をCPU103に伝える役割をする。
The operation unit I /
ネットワークI/F105はLAN500に接続し、情報の入出力を行う。MODEM106は公衆回線600に接続し、データ送受信を行うための変調復調処理を行う。
A network I / F 105 is connected to the LAN 500 and inputs / outputs information. The MODEM 106 is connected to the
以上のデバイスがシステムバス101上に配置される。
The above devices are arranged on the
イメージバスI/F110はシステムバス101と画像データを高速で転送するイメージバス102を接続し、データ構造を変換するバスブリッジである。
The image bus I / F 110 is a bus bridge that connects the
イメージバス102は、PCIバスまたはIEEE1394などの高速バスで構成される。 The image bus 102 is a high-speed bus such as a PCI bus or IEEE1394.
イメージバス102上には以下のデバイスが配置される。ラスターイメージプロセッサ(RIP)111はPDLコードをビットマップイメージに展開する。デバイスI/F部112は、画像入出力デバイスであるスキャナ200やプリンタ300とコントローラ100を接続し、画像データの同期系/非同期系の変換を行う。スキャナ画像処理部700は、入力画像データに対し補正、加工、編集を行う。プリンタ画像処理部800は、プリント出力画像データに対して、プリンタに合わせた補正、解像度変換等を行う。画像圧縮部115は、多値画像データはJPEG、2値画像データはJBIG、MMR、MHの圧縮伸張処理を行う。
The following devices are arranged on the image bus 102. A raster image processor (RIP) 111 expands a PDL code into a bitmap image. The device I /
<スキャナ画像処理部>
スキャナ画像処理部700の構成を図3に示す。
<Scanner image processing unit>
The configuration of the scanner
イメージバスI/Fコントローラ701は、イメージバス102と接続し、そのバスアクセスシーケンスを制御する働きと、スキャナ画像処理部700内の各デバイスの制御及びタイミングを発生させる。テーブル処理部702は、読み取った輝度データである画像データを濃度データに変換するために、テーブル変換を行う。像域分離処理部703は、入力画像から文字部を検出することにより、像域を判定し、その後の画像処理に利用する像域信号を生成する。フィルタ処理部704は、エッジ強調などの目的に従ったデジタル空間フィルタでコンボリューション演算を行う。下地レベル検出部705は、画像1ページ内の画素値の頻度を集計し、背景に薄い色がある原稿を読み取った画像データ等が送られてきた場合に除去すべき下地レベルを検出する。編集部706は、例えば入力画像データからマーカーペンで囲まれた閉領域を認識して、その閉領域内の画像データに対して、影つけ、網掛け、ネガポジ反転等の画像加工処理を行う。
The image bus I /
処理が終了した画像データは、再び画像I/Fバスコントローラ701を介して、イメージバス102上に転送される。
The processed image data is transferred to the image bus 102 via the image I /
<プリンタ画像処理部>
プリンタ画像処理部800の構成を図4に示す。
<Printer image processing unit>
The configuration of the printer
イメージバスI/Fコントローラ801は、イメージバス102と接続し、そのバスアクセスシーケンスを制御する働きと、プリンタ画像処理部800内の各デバイスの制御及びタイミングを発生させる。下地除去処理部802は、上記下地レベル検出部705で検出された下地レベルを基に、背景色を除去する。色変換処理部803は、プリンタの出力特性に合わせた色変換を行う。解像度変換部804は、LAN500あるいは電話回線600から受信した画像データを、プリンタ300の解像度に変換するための解像度変換を行う。スムージング処理部805は、解像度変換後の画像データのジャギーを滑らかにする処理を行う。
The image bus I / F controller 801 is connected to the image bus 102 and controls the bus access sequence and generates control and timing of each device in the printer
<操作部メイン画面>
図5に本実施例を適用するのに好適なデジタル複合機の操作部400を示す。液晶操作パネル401は液晶にタッチパネルを組み合わせたものであり、設定内容の表示、ソフトキーの表示等がなされるものである。スタートキー402はコピー動作等を開始指示するためのハードキーであり、内部に緑色および赤色のLEDが組み込まれており、スタート可能のときに緑色、スタート不可のときに赤色のLEDが点灯する。ストップキー403は動作を停止させるときに使用するハードキーである。その他ハードキーは、テンキー404、リセットキー405、ガイドキー406、ユーザモードキー407、部門IDキー408、クリアキー409が設けられている。
<Operation unit main screen>
FIG. 5 shows an
図6は、液晶操作パネル401に通常のコピー画面が表示されている様子を示している。設定表示部411には、デジタル複合機の現在の動作状況、設定されている倍率、用紙、部数を表示する部分である。倍率ソフトキー群412には、複写時の倍率に関するソフトキーである等倍ボタン、倍率ボタンが設けられる。用紙選択ボタン413は、出力用紙のサイズ、色、マテリアル等を指定するための画面に遷移するときに使用する。ソータボタン414は、出力用紙の処理方法を指定するときに使用する。両面ボタン415は、原稿または出力方法に、両面印刷がかかわる場合に使用する。自動ボタン416は、本実施形態に主要な機能である下地除去を自動的に行うか否かを指定するときに使用する。濃度指定キー群417は、読み取りまたは出力画像の濃度を調整し、設定内容を表示する部分である。原稿タイプ指定ボタン418は、原稿タイプを選択するときに使用するもので、プルダウンメニューから、文字/写真/地図モード、文字モード、印刷写真モード、印画紙写真モード、新聞モードのうちいずれか1つを選択する。応用モードボタン419は、応用モード画面に移るときに使用する。カラー選択ボタン420は、カラーと白黒の指定を行うときに使用するもので、プルダウンメニューから、自動カラー選択、フルカラー、白黒のうちいずれか1つを選択する。
FIG. 6 shows a state where a normal copy screen is displayed on the liquid
<自動下地判定精度設定画面>
本実施形態に係る、新聞モード選択時の自動下地除去の判定精度は、液晶操作パネル401上に表示されるユーザモード画面で設定する。
<Automatic ground detection accuracy setting screen>
The determination accuracy of automatic background removal when the newspaper mode is selected according to the present embodiment is set on the user mode screen displayed on the liquid
ユーザモード表紙画面に遷移するためにはユーザモードキー407を押下する。図7は、液晶操作パネル401に機器の全般的な設定を行うためのユーザモード表紙画面430が表示されている様子を示している。この画面上にある共通仕様設定キー431を押下し、共通仕様設定画面450に遷移する。図8は、共通仕様設定画面450が表示されている様子を示している。この画面上に表示される、新聞モード選択時の自動下地除去の判定精度キー455を押下すると、『新聞モード選択時の自動下地除去の判定精度設定』画面460に遷移する。図9は、『新聞モード選択時の自動下地除去の判定精度設定』画面460が表示されている様子を示している。ここで、ユーザは“弱”キー461または“普通”キー462または“強”キー463のうち1つを選択する。初期設定は“普通”キー462が選択された状態であり、これは、白い紙に、一般的な新聞の文字の多い部分を切り抜いて貼り付けた原稿を考えた場合、原稿面積に対する新聞面積の割合が約55%より大きければ確実に新聞紙の色を除去できることを意味する。“弱”キー461が選択されるとその割合は約70%、“強”キー463が選択されるとその割合は約40%に変化する。なお、本実施形態では強、普通、弱の3種類のキーを選択するが、強弱をさらに細かく調整できる複数種類のキーを設置し、選択してもよい。
In order to change to the user mode cover screen, a
<自動下地除去処理>
本実施例では、説明を簡略化するために、対象とする入力画像はグレースケールで各画素が8ビットで表される値を持つものとする。
<Automatic ground removal processing>
In this embodiment, in order to simplify the description, it is assumed that the target input image has a value represented by 8 bits in grayscale in each pixel.
これは、1チャネルで読み取るスキャナからの各画素8ビットで表される値を持つ入力データであっても良いし、カラースキャナから得られた各画素がR、G、Bの3チャネルそれぞれ8ビット合計24ビットで表される値を持つカラー画像データから、規定の計算式に従って算出した各画素8ビットの情報を持つグレースケール画像データであっても良い。 This may be input data having a value represented by 8 bits for each pixel from a scanner that reads with one channel, or each pixel obtained from a color scanner may have 8 bits for each of R, G, and B channels. It may be grayscale image data having 8-bit information for each pixel calculated from color image data having a value represented by a total of 24 bits according to a prescribed calculation formula.
本実施形態に係る自動下地除去は、操作部400の液晶操作パネル401上に表示される自動ボタン416を有効にしたときに処理が行われる。
The automatic background removal according to the present embodiment is performed when the
図10は自動下地除去処理の処理フローを示している。 FIG. 10 shows a process flow of the automatic background removal process.
ステップS101では、入力画像データの画素値をカウントしたヒストグラム作成を行う。 In step S101, a histogram is created by counting the pixel values of the input image data.
ステップS102では、後述する下地レベル検出処理内で使用するための白地判定係数(W)を決定する。スキャン開始時に、自動ボタン416がONであり、原稿タイプ指定ボタン418で選択されている原稿タイプが文字/写真/地図モード、文字モード、印刷写真モード、印画紙写真モードのうちのいずれかであれば、白地判定係数(W)にはデフォルト値9.8が設定される。自動ボタン416がONであり、原稿タイプ指定ボタン418で選択されている原稿タイプが新聞モードの場合は、ユーザモード内の設定値と図11に示すテーブルに従って白地判定係数(W)を決定する。ユーザモード内の『新聞モード選択時の自動下地除去の判定精度設定』画面460で選択されたキーが“弱”の場合は白地判定係数(W)に−14.8が設定される。同様に“普通”の場合は9.8、“強”の場合は34.4が設定される。
In step S102, a white background determination coefficient (W) for use in a background level detection process described later is determined. At the start of scanning, the
ステップS103ではヒストグラムを基に下地レベル検出処理を行う。ステップS104ではステップS103で検出された下地レベルに従って既知の手法により下地除去処理が行われる。以下、ステップS101のヒストグラム作成処理およびステップS103の下地レベル検出処理について詳細を説明する。 In step S103, background level detection processing is performed based on the histogram. In step S104, background removal processing is performed by a known method according to the background level detected in step S103. Details of the histogram creation process in step S101 and the background level detection process in step S103 will be described below.
図12はS101のヒストグラム作成フローを示している。 FIG. 12 shows the histogram creation flow of S101.
ステップS121で、対象画像をスキャナ200により読み取ることで得られるRGB信号に対し各色成分毎(各チャネル毎)に、画素値の累計を記録する。この場合、0から255までの256レベル毎に累計をとるが、対象画像内全画素を対象としても良いし、規定画素数おきに記録しても良いし、または総サンプル数を制限して制限サンプル数内に収まるように記録対象画素を制限しても良い。図13はステップS121で記録したあるチャネルにおける256レベルの累計例である。ステップS122では、ステップS121で記録した256レベルのデータを8レベルずつ32段階のデータとなるよう集計を行う。図14は、図13で示す累計をステップS122で32段階に集計したヒストグラム例である。
In step S121, the accumulated pixel value is recorded for each color component (each channel) for the RGB signal obtained by reading the target image with the
図15は下地レベル検出フローを示している。 FIG. 15 shows a background level detection flow.
ステップS151では、上記32段階をNo.0からNo.31とし、No.0からNo.31の32段階に集計されたヒストグラムから、カウント数が最大のものを求める。このとき、No.0からNo.11は、背景色とするには濃いレベルであるため、対象から外す。 In step S151, the above 32 steps are changed to No. 0 to No. 31. 0 to No. From the histograms totaled in 31 32 steps, the one with the maximum count is obtained. At this time, no. 0 to No. 11 is excluded from the target because it is a dark level for the background color.
ステップS152では、ステップS151で求めた最大値をとるレベルがNo.12でありかつNo.12のカウント数がNo.11のカウント数以下である場合、画像の大部分を占めると判断できる色のレベルが濃過ぎるため、除去すべき背景色は無いと判断できるため、エラーとし、ステップS157のエラー処理を行う。ステップS152で否と判定されると、ステップS153に進む。ステップS153ではステップS151で求めた最大値が、規定値以下であるか否か、ここでは総サンプル数の2%以下であるか否かを判定する。ここで正と判定された場合は、画像に占める割合が最も高い画素値でも、その割合が十分大きくない、すなわち背景色といえるほどの面積を占めていないとみなし、除去すべき背景色が判定できないことになりエラーとし、エラー処理をステップS157で行う。ステップS153で否と判定された場合は、ステップS154に進み、No.12からNo.31で両隣よりもカウント数が多いレベルを極大点として記録する。図14に示した例では、極大点は、No.14、No.26、No.31の3極大点が記録される。 In step S152, the level at which the maximum value obtained in step S151 is obtained is No. 12 and no. No. 12 count number. When the count number is 11 or less, the level of the color that can be determined to occupy most of the image is too dark, and therefore it can be determined that there is no background color to be removed, so an error is determined and the error processing in step S157 is performed. If it is determined as NO in step S152, the process proceeds to step S153. In step S153, it is determined whether or not the maximum value obtained in step S151 is equal to or less than a specified value, in this case, whether or not it is 2% or less of the total number of samples. If it is determined to be positive, even if the pixel value is the highest in the image, it is considered that the ratio is not sufficiently large, that is, it does not occupy an area that can be said to be the background color, and the background color to be removed is determined. Since it cannot be determined as an error, error processing is performed in step S157. When it is determined NO in step S153, the process proceeds to step S154 and No. 12 to No. At 31, the level having a higher count than both sides is recorded as the maximum point. In the example shown in FIG. 14, no. 26, no. 31 three maximum points are recorded.
ステップS155では、図16に詳細を示す通りの選択処理が行われる。その後、ステップS156で規定のオフセットを減算して下地レベルが決定される。ここで、オフセットは機種ごとに決まっており、本実施例では約5レベルであり、下地位置の代表レベルから減算される。 In step S155, selection processing as shown in detail in FIG. 16 is performed. Thereafter, in step S156, the base level is determined by subtracting the specified offset. Here, the offset is determined for each model and is about 5 levels in this embodiment, and is subtracted from the representative level of the base position.
ステップS157のエラー処理では、背景色として適したレベルが判定できない場合に、規定のレベルを下地レベルとする処理が行われる。ここでは例えば、一般的に使用される上質紙の色が確実に除去されるレベルや、雑誌に使われる紙、新聞紙などの色が除去されるレベル等に予めセットしておくことが多い。 In the error processing in step S157, when a level suitable for the background color cannot be determined, processing for setting the specified level as the background level is performed. Here, for example, it is often set in advance at a level that reliably removes the color of high-quality paper that is generally used, a level that removes the color of paper used in magazines, newspapers, and the like.
図16は、ステップS155での処理の詳細を示している。ここでは説明のため、ステップS154で求めた極大点数をN、i番目の極大点のカウント数をpeak[i]、ステップS151で求めた最大値をMAXと表すこととする。 FIG. 16 shows details of the processing in step S155. Here, for the sake of explanation, the maximum number obtained in step S154 is represented as N, the count number of the i-th maximum point is represented as peak [i], and the maximum value obtained in step S151 is represented as MAX.
この処理では、ステップS154で求めた極大点すなわち下地レベル候補から、適正なものを下地レベルとして選択する処理を行う。 In this processing, processing for selecting an appropriate one as the ground level from the maximum points obtained in step S154, that is, ground level candidates, is performed.
まず、ステップS161で下地レベルの初期値をMAXの位置とし、処理カウンタiを0に初期化する。ここで、選択したピークの中で輝度レベルが一番小さいピークの位置をi=0とし、次に輝度レベルが小さいピークの位置をi=1とし、i<Nという条件を満たしている限りiを一つずつ増やして処理を行なう。 First, in step S161, the initial value of the background level is set to the MAX position, and the processing counter i is initialized to 0. Here, the position of the peak with the lowest luminance level among the selected peaks is set to i = 0, the position of the peak with the next lowest luminance level is set to i = 1, and as long as the condition of i <N is satisfied, i is satisfied. Increase one by one and perform processing.
下地レベルの初期値は、MAXの位置とし、もし下地レベルとしてpeak[i]のいずれも選択されなかった時は、MAXの位置を下地レベルとする。peak[i]が複数ある場合は、iを変化させ処理を行なった結果によって下地レベルは更新されていく。 The initial value of the background level is the position of MAX, and if none of peak [i] is selected as the background level, the position of MAX is set as the background level. When there are a plurality of peaks [i], the background level is updated according to the result of changing i and performing the process.
ステップS162ではMAXの位置、ステップS163では処理対象の注目ピークの位置がそれぞれNo.30またはNo.31であるか否かを判定する。これらのうちどちらかで正と判定されると、画像中に白色が占める割合が高い場合に相当し、ステップS16bの白色画素が多いときの下地レベル判定処理へ進む。この処理の詳細は図17を使用して後述する。ステップS162とステップS163で共に否と判定されると、ステップS164に進み、注目ピークのカウント数とMAXを比較する。ここで、注目ピークとは処理中のピークのことである。ステップS164で正と判定されるとステップS165に進む。ステップS165ではMAXと注目ピークのカウント数を比較し、その差が規定値以下か否かで注目ピークが下地レベルになり得るか否かを判断する。ここでは、MAXから注目ピークのカウント数を引いた値が総サンプル数の1%よりも大きい場合、注目ピークが下地レベルになり得ないと判断し、次のピークの判定へ移るためにステップS169で処理カウンタiを1つ進める。ステップS165でMAXと注目ピークのカウント数を引いた値が総サンプル数の1%の場合は、ステップS166に進み、MAXの位置と注目ピークの位置を比較する。ここでMAXの位置と注目ピークの位置の差が2段階よりも離れている場合には、画像中で異なる2つの色が同程度の面積を占めることを意味し、どちらの色が下地であるかは判断できないために、ステップS157のエラー処理に進む。ステップS166で正と判定されるとステップS167へ進み、注目ピークとMAXに近いほうの隣のカウント数とを比較し、その差が総サンプル数の1%以上であれば注目ピークとMAXとか完全に別の山として分離できる(図22(a)参照)と判断する。その差が総サンプル数の1%以下であれば、注目ピークとMAXは同じ山(図22(b)参照)として判断できる。ここで差が総サンプル数の1%以上と判定された場合は、ステップS157のエラー処理に進む。差が総サンプル数の1%以下と判定された場合はステップS168に進み、注目ピークを下地レベルの位置として記録し、次のピークの判定へ進むためにステップS169で処理カウンタiを1つ進める。ステップS16aでは記録されているピークの判定が全て終わったか否かを判定し、未判定ピークがある場合はステップS162に戻り、全て終わった場合は処理を終了する。 In step S162, the position of the MAX, and in step S163, the position of the target peak to be processed is No. 30 or No. Whether or not 31 is determined. If one of these is determined to be positive, it corresponds to a case where the ratio of white in the image is high, and the process proceeds to the background level determination process when there are many white pixels in step S16b. Details of this processing will be described later with reference to FIG. If it is determined NO in both step S162 and step S163, the process proceeds to step S164, and the peak number of interest is compared with MAX. Here, the peak of interest is a peak being processed. If it determines with positive by step S164, it will progress to step S165. In step S165, the number of counts of MAX and the peak of interest is compared, and it is determined whether or not the peak of interest can reach the background level based on whether or not the difference is equal to or less than a specified value. Here, if the value obtained by subtracting the count number of the peak of interest from MAX is larger than 1% of the total number of samples, it is determined that the peak of interest cannot be the background level, and step S169 is performed to move to the determination of the next peak. The processing counter i is incremented by one. If the value obtained by subtracting the number of MAX and the peak of interest in step S165 is 1% of the total number of samples, the process proceeds to step S166, and the position of MAX and the position of the peak of interest are compared. Here, when the difference between the position of the MAX and the position of the peak of interest is more than two stages, it means that two different colors occupy the same area in the image, and which color is the background. Since it cannot be determined, the process proceeds to an error process in step S157. If it is determined to be positive in step S166, the process proceeds to step S167, where the peak of interest is compared with the count number adjacent to MAX, and if the difference is 1% or more of the total number of samples, the peak of interest and MAX are completely It is determined that it can be separated as another mountain (see FIG. 22A). If the difference is 1% or less of the total number of samples, the peak of interest and MAX can be determined as the same mountain (see FIG. 22B). If it is determined that the difference is 1% or more of the total number of samples, the process proceeds to error processing in step S157. If it is determined that the difference is 1% or less of the total number of samples, the process proceeds to step S168, the peak of interest is recorded as the position of the background level, and the process counter i is incremented by 1 in step S169 to proceed to determination of the next peak. . In step S16a, it is determined whether or not all recorded peaks have been determined. If there are undecided peaks, the process returns to step S162. If all peaks have been determined, the process ends.
次に、白色画素の占める割合が大きいときの下地レベルを判定するステップS16bで行われる処理の詳細を図17を使用して説明する。ここで、本実施例では、輝度レベルNo.30またはNo.31に存在するピークを白色ピークとし、その位置での輝度レベルを白色レベルとする。 Next, details of the processing performed in step S16b for determining the background level when the proportion of white pixels is large will be described with reference to FIG. Here, in this embodiment, the brightness level No. 30 or No. A peak existing at 31 is defined as a white peak, and a luminance level at that position is defined as a white level.
ステップS171では便宜的に、白色を意味するNo.30またはNo.31でない方のピーク位置をNo.x(x:12〜29)とする。ステップS172で、MAXのカウント数とNo.xのカウント数を比較し、その差が総サンプル数の30%よりも小さいか否かを判定する。差が総サンプル数の30%以上である場合はステップS17aで大きいほうのピークの位置を下地レベルとしてこの処理を終了する。ここでは、閾値を総サンプル数の30%としたが、任意に設定することが可能である。ステップS172で差が総サンプル数の30%以下であると判定された場合は、ステップS173へ進む。ステップS173では、その後のステップでの値比較に使用する変数A,Bに値を代入する。変数Aは、白色ピークでない側のピークのカウント数に両隣のカウント数を加算したものであり、変数Bは白色ピークの合計である。それぞれの変数には以下の式で表される値が代入される。
A=No.xの値+No.(x−1)の値+No.(x+1)の値
B=No.31の値+No.30の値
図18はAとBの算出方法をヒストグラム上で表現したものである。
In step S171, for convenience, No. 30 or No. The peak position that is not 31 is set to No. 31. x (x: 12 to 29). In step S172, the MAX count and No. The count numbers of x are compared, and it is determined whether or not the difference is smaller than 30% of the total number of samples. If the difference is 30% or more of the total number of samples, the position of the larger peak is set as the background level in step S17a, and this process is terminated. Here, the threshold value is set to 30% of the total number of samples, but can be arbitrarily set. If it is determined in step S172 that the difference is 30% or less of the total number of samples, the process proceeds to step S173. In step S173, values are substituted into variables A and B used for value comparison in subsequent steps. The variable A is obtained by adding the count numbers of the adjacent peaks to the count number of the peak on the side that is not the white peak, and the variable B is the total of the white peaks. Each variable is assigned a value represented by the following formula.
A = No. x value + No. (X-1) value + No. The value of (x + 1) B = No. 31 value + No. Value of 30 FIG. 18 represents the calculation method of A and B on a histogram.
ステップS174では、B−Aと総サンプル数に対する規定割合である白地判定係数(W)を比較する。ここで、白地判定係数(W)は、ユーザが図9の画面の強、普通、弱のいずれかのキーを選択することにより設定される。B−Aが総サンプル数のW%以上の場合はステップS179でNo.31を下地レベルとし、この処理を終了する。ステップS174で正と判定された場合は、No.x側を下地レベルとするが、No.xに相当する色に近い色も多く含まれる場合があることを想定し、No.xを始点にして輝度の低い方向へ順に除去対象として適切なレベルか否かを判断するための処理を行う。ステップS175ではこの処理内で使用する処理カウンタjを1に初期化する。ステップS176からステップS178で、No.(x−j)の値がAに対して規定割合(本実施形態では20%)よりも小さくなる場所を判定する。この処理は、下地レベル候補周辺の輝度レベルを見ることによって、レベルにばらつきがある背景色がある場合の下地色の検出制度を向上させることができる。ステップS176からステップ178を規定回数内(本実施形態では4回以内)で繰り返し、カウント数がAの20%よりも小さくなった場所を下地レベルとする(ステップS17a)。規定回数繰り返しても十分小さいカウント数にならない場合は、No.x付近は除去すべきレベルとは考えられないと判断し、ステップS157に進んでエラー処理を行う。 In step S174, B-A is compared with a white background determination coefficient (W) that is a specified ratio with respect to the total number of samples. Here, the white background determination coefficient (W) is set by the user selecting one of the strong, normal, and weak keys on the screen of FIG. If B-A is greater than or equal to W% of the total number of samples, No. in step S179. 31 is set as the background level, and this process is terminated. If it is determined to be positive in step S174, No. The x side is the base level. Assuming that there may be many colors close to the color corresponding to x, A process for determining whether or not the level is appropriate as a removal target in order of decreasing luminance starting from x is performed. In step S175, a process counter j used in this process is initialized to 1. In Step S176 to Step S178, No. A place where the value of (x−j) is smaller than a specified ratio (20% in this embodiment) with respect to A is determined. This process can improve the background color detection system when there is a background color that varies in level by looking at the brightness level around the background level candidate. Steps S176 to 178 are repeated within a specified number of times (in the present embodiment, within 4 times), and a place where the count number is smaller than 20% of A is set as the ground level (step S17a). If the count is not small enough even after the specified number of repetitions, It is determined that the vicinity of x is not considered to be a level to be removed, and the process proceeds to step S157 to perform error processing.
なお、本実施形態は新聞モード選択時の白地判定係数を決定する形態であるが、文字/写真/地図モード、文字モード、印刷写真モード、印画紙写真モードに本実施形態を適用してもよい。 In this embodiment, the white background determination coefficient is determined when the newspaper mode is selected. However, the present embodiment may be applied to the character / photo / map mode, the character mode, the print photo mode, and the photographic paper photo mode. .
(第2の実施形態)
図19は、保守管理者専用のサービスモード画面が液晶操作パネル401に表示されている様子を示している。図19では下地除去の判定精度画面470を示している。保守管理者は、設定インジケータ471にて、下地判定精度を設定する。インジケータを右方向へずらすと、白色の多い原稿全体に対して小さな面積の背景色も除去対象として検知しやすくなり、左方向へずらすと検知できる背景色面積比は大きくなる。このインジケータの位置により、内部の白地判定係数(W)は、図20に示すテーブルに従って設定される。例えば、インジケータが最左にある場合は、白地判定係数(W)には−23が設定され、中央なら9.8が、最右なら42.6が設定される。ここで設定された白地判定係数は、第1の実施形態に示したステップS174で使用される。なお、本実施形態では保守管理者が下地判定精度の設定を行なう形態としたが、保守管理者と同等の権限を持つ一般ユーザが設定を行なってもよい。
(Second Embodiment)
FIG. 19 shows a state in which a service mode screen dedicated to the maintenance manager is displayed on the liquid
(第3の実施形態)
白地判定係数(W)の設定方法は、ユーザが設定できるユーザモードの設定値と、保守管理者のみが設定できるサービスモードの設定値とを組み合わせて決定することも可能である。図21はそれらの設定値から白地判定係数(W)を決定するためのテーブルである。例えば、サービスモードでインジケータが最左(−4)に設定されているとき、ユーザモードで“強”が選択されると、白地判定係数(W)は−14.8、“普通”が選択されると、−23、“弱”が選択されると、−31.2が設定される。
(Third embodiment)
The setting method of the white background determination coefficient (W) can be determined by combining a user mode setting value that can be set by the user and a service mode setting value that can be set only by the maintenance manager. FIG. 21 is a table for determining the white background determination coefficient (W) from these set values. For example, when the indicator is set to the leftmost (−4) in the service mode, if “strong” is selected in the user mode, the white background determination coefficient (W) is −14.8 and “normal” is selected. Then, when −23, “weak” is selected, −31.2 is set.
100 コントローラユニット
103 CPU
107 RAM
108 ROM
200 スキャナ
300 プリンタ
400 操作部
700 スキャナ画像処理部
705 下地レベル検出部
800 プリンタ画像処理部
802 下地除去部
100
107 RAM
108 ROM
200
Claims (5)
入力画像信号のチャネル毎に各信号レベルの出現頻度を表すヒストグラムを作成するヒストグラム作成手段と、
前記ヒストグラム作成手段で作成されたヒストグラム中の最大頻度が白色レベルにある場合、前記最大頻度と前記ヒストグラム中の白色レベルにないピークの頻度差を比較する第1の比較手段と、
前記第1の比較手段によって比較した結果、前記頻度差が第1の閾値よりも小さい場合、前記白色レベルにあるピーク周辺部の頻度和と前記白色レベルにないピーク周辺部の頻度和を比較する第2の比較手段と、
前記第2の比較手段によって比較した結果、前記白色レベルにあるピーク周辺部の頻度和から前記白色レベルにないピーク周辺部の頻度和を引いた値が第2の閾値よりも小さい場合、前記ヒストグラム中の複数のピークの中から前記白色レベルにないピークを下地レベル候補とし、前記下地レベル候補の周辺部の頻度を参照し下地レベルを決定する下地レベル決定手段と、
前記下地レベル決定手段で決定された下地レベルに基づいて、下地除去処理を行なう下地除去処理手段とを有し、
前記下地レベル決定手段における前記第2の閾値は、操作部から選択される下地除去の判定精度レベルに基づいて決定される
ことを特徴とする画像処理装置。 In an image processing apparatus that detects a level indicating a background included in an image signal and removes the background from an image,
Histogram creation means for creating a histogram representing the frequency of appearance of each signal level for each channel of the input image signal;
A first comparison unit that compares the maximum frequency and a frequency difference of a peak not in the white level in the histogram when the maximum frequency in the histogram created by the histogram creation unit is at a white level;
When the frequency difference is smaller than the first threshold as a result of comparison by the first comparison means, the frequency sum of the peak peripheral portion at the white level is compared with the frequency sum of the peak peripheral portion not at the white level. A second comparison means;
As a result of the comparison by the second comparison means, when the value obtained by subtracting the frequency sum of the peak peripheral portions not in the white level from the frequency sum of the peak peripheral portions in the white level is smaller than the second threshold, the histogram A background level determination means for determining a background level by referring to a frequency of a peripheral portion of the background level candidate, a peak not in the white level among a plurality of peaks as a background level candidate;
A background removal processing means for performing background removal processing based on the background level determined by the background level determination means;
2. The image processing apparatus according to claim 1, wherein the second threshold value in the background level determination means is determined based on a determination accuracy level of background removal selected from an operation unit .
入力画像信号のチャネル毎に各信号レベルの出現頻度を表すヒストグラムを作成するヒストグラム作成ステップと、
前記ヒストグラム作成ステップで作成されたヒストグラム中の最大頻度が白色レベルにある場合、前記最大頻度と前記ヒストグラム中の白色レベルにないピークの頻度差を比較する第1の比較ステップと、
前記第1の比較ステップによって比較した結果、前記頻度差が第1の閾値よりも小さい場合、前記白色レベルにあるピーク周辺部の頻度和と前記白色レベルにないピーク周辺部の頻度和を比較する第2の比較ステップと、
前記第2の比較ステップによって比較した結果、前記白色レベルにあるピーク周辺部の頻度和から前記白色レベルにないピーク周辺部の頻度和を引いた値が第2の閾値よりも小さい場合、前記ヒストグラム中の複数のピークの中から前記白色レベルにないピークを下地レベル候補とし、前記下地レベル候補の周辺部の頻度を参照し下地レベルを決定する下地レベル決定ステップと、
前記下地レベル決定ステップで決定された下地レベルに基づいて、下地除去処理を行なう下地除去処理ステップとを有し、
前記下地レベル決定ステップにおける前記第2の閾値は、操作部から選択される下地除去の判定精度レベルに基づいて決定される
ことを特徴とする画像処理方法。 In an image processing method for detecting a level indicating a background included in an image signal and removing the background from an image,
A histogram creation step for creating a histogram representing the frequency of appearance of each signal level for each channel of the input image signal;
A first comparison step of comparing the maximum frequency and a frequency difference between peaks not in the white level in the histogram when the maximum frequency in the histogram created in the histogram creation step is at a white level;
If the frequency difference is smaller than the first threshold as a result of the comparison in the first comparison step, the frequency sum of the peak peripheral portion at the white level is compared with the frequency sum of the peak peripheral portion not at the white level. A second comparison step;
As a result of the comparison in the second comparison step, when the value obtained by subtracting the frequency sum of the peak peripheral portions not in the white level from the frequency sum of the peak peripheral portions in the white level is smaller than the second threshold value, the histogram A background level determination step for determining a background level by referring to a frequency of a peripheral portion of the background level candidate as a background level candidate from among a plurality of peaks in the white level,
A background removal processing step for performing background removal processing based on the background level determined in the background level determination step;
The image processing method according to claim 1, wherein the second threshold value in the background level determination step is determined based on a background removal determination accuracy level selected from an operation unit .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003434543A JP4101169B2 (en) | 2003-12-26 | 2003-12-26 | Image processing apparatus, image processing method, and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003434543A JP4101169B2 (en) | 2003-12-26 | 2003-12-26 | Image processing apparatus, image processing method, and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005192153A JP2005192153A (en) | 2005-07-14 |
JP4101169B2 true JP4101169B2 (en) | 2008-06-18 |
Family
ID=34791586
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003434543A Expired - Fee Related JP4101169B2 (en) | 2003-12-26 | 2003-12-26 | Image processing apparatus, image processing method, and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4101169B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4282081B2 (en) | 2005-10-31 | 2009-06-17 | キヤノン株式会社 | Image processing apparatus and method |
JP4533327B2 (en) * | 2006-02-23 | 2010-09-01 | キヤノン株式会社 | Image processing apparatus and method, computer program, and storage medium |
JP5276260B2 (en) | 2006-06-30 | 2013-08-28 | キヤノン電子株式会社 | Image reading device |
JP4814162B2 (en) * | 2007-06-21 | 2011-11-16 | 株式会社リコー | Image processing apparatus and image processing method |
JP6509175B2 (en) * | 2016-09-30 | 2019-05-08 | シャープ株式会社 | Electrical apparatus and input method |
-
2003
- 2003-12-26 JP JP2003434543A patent/JP4101169B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005192153A (en) | 2005-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8184344B2 (en) | Image processing apparatus and image processing method, computer program and storage medium | |
JP4732314B2 (en) | Image processing apparatus and image processing method | |
JP5183587B2 (en) | Image processing apparatus, image processing method, and program for executing image processing method | |
JP2020010163A (en) | Image processing apparatus, image processing method, computer program, and recording medium | |
JP2009075751A (en) | Image processing apparatus, image processing method, program of same, and computer-readable storage medium | |
US8054509B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP4709090B2 (en) | Image processing apparatus, image processing apparatus control method, and program | |
JP4101169B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP4050220B2 (en) | Image processing method, image processing apparatus, image forming apparatus, program, and recording medium | |
US20080266612A1 (en) | Image Processing Device and Image Processing Method | |
JP6373448B2 (en) | Image processing apparatus, image processing method, and program | |
US8913298B2 (en) | Image processing apparatus that sets a spatial frequency of a chromatic foreground image of a watermark to be lower than a spatial frequency of an achromatic foreground image of a comparable watermark, associated image forming apparatus, image processing method and recording medium | |
JP2009017208A (en) | Image processing apparatus, image forming apparatus, image processing method, computer program, and computer readable recording medium | |
JP4101188B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP5023035B2 (en) | Image processing apparatus, image forming apparatus including the image processing apparatus, image processing method, image processing program, and computer-readable recording medium recording the image processing program | |
JP2008141683A (en) | Image processor, method and program, and storage medium | |
JP4267029B2 (en) | Image processing apparatus, image processing method, image processing method program, and storage medium therefor | |
JP2006180343A (en) | Image input-output device | |
US20090103130A1 (en) | Image forming apparatus, image forming apparatus control method, program, and storage medium | |
JP4078268B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP5549836B2 (en) | Image processing apparatus and image processing method | |
JP2006270148A (en) | Image processing method, image processor and image forming apparatus | |
JP2008172677A (en) | Image processor and ground color detection method | |
JP4043982B2 (en) | Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium recording the same | |
JP2019135878A (en) | Image processing apparatus, image forming apparatus, computer program, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060609 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071023 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071211 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080212 |
|
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: 20080311 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080318 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110328 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120328 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130328 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140328 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |