JP2010119006A - Image processing apparatus,and image processing method - Google Patents
Image processing apparatus,and image processing method Download PDFInfo
- Publication number
- JP2010119006A JP2010119006A JP2008292117A JP2008292117A JP2010119006A JP 2010119006 A JP2010119006 A JP 2010119006A JP 2008292117 A JP2008292117 A JP 2008292117A JP 2008292117 A JP2008292117 A JP 2008292117A JP 2010119006 A JP2010119006 A JP 2010119006A
- Authority
- JP
- Japan
- Prior art keywords
- color
- image processing
- input image
- pixel
- image
- 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
Links
Images
Abstract
Description
本発明は、画像処理装置および画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method.
従来、原稿をスキャナで読み取って取得された入力画像から背景色を除去する画像処理方法として、入力画像を構成する画素群の明度ヒストグラムから最多度数の明度を背景色除去レベルとして決定し、入力画像を構成する画素群のうち背景色除去レベル以上の明度を有する画素を背景色として除去するといった方法がある。 Conventionally, as an image processing method for removing a background color from an input image obtained by reading a document with a scanner, the most frequent lightness is determined as a background color removal level from a lightness histogram of a pixel group constituting the input image, and the input image There is a method of removing, as a background color, a pixel having a lightness equal to or higher than a background color removal level from the pixel group constituting the pixel group.
一方、入力画像をカラー画像であるかモノクロ画像であるかを判別する従来の方法として、入力画像を構成する画素群のうち有彩画素と判別された画素群(領域)に対して明度ヒストグラムを生成し、有彩画素が背景色を構成する画素であるか否かについて前記明度ヒストグラムの形状等を解析して判断し、有彩画素が背景色を構成する画素であると判断されれば、その入力画像はモノクロ画像であると判別する方法がある(たとえば、特許文献1参照)。
しかしながら、従来技術では、入力画像から背景色を除去する画像処理を行う場合、明度ヒストグラム上で最多度数の明度を背景色除去レベルとして決定していたので、入力画像の非背景に同じ明度を有する複数の色の画素がある場合、その明度が最多度数の明度として選ばれてしまうおそれがあるという問題があった。 However, in the prior art, when performing image processing for removing the background color from the input image, the most frequent lightness is determined as the background color removal level on the lightness histogram, so the non-background of the input image has the same lightness. When there are pixels of a plurality of colors, there is a problem that the brightness may be selected as the most frequent brightness.
さらに、明度ヒストグラムで背景除去レベルを決定する方法では、前記特許文献1の方法で、入力画像がカラー画像であると判別された場合、入力画像から背景色を除去するため、有彩画素についてのヒストグラムとは別に、新たに入力画像全体で明度ヒストグラムを作成する必要も生じてしまうことも問題となる。
Furthermore, in the method of determining the background removal level using the brightness histogram, when the input image is determined to be a color image according to the method of
特許文献1では、有彩画素が背景色を構成し、モノクロと判別された場合には再度ヒストグラムの生成は不要であるが、原稿がモノクロ(無彩色で構成されている場合)であり、モノクロと判別された場合、また有彩画素が背景色ではなくカラーと判別された場合には、背景除去処理を行う際に、再度ヒストグラムの生成が必要になる。また、このような有彩画素が背景色を構成し、モノクロと判別される画像は、通常の画像としては稀であり、多くの画像では、背景、地色、裏写り等の除去したいものは、無彩色に近い色であることもある。そのため、背景除去処理を行う際に、再度ヒストグラムの生成が必要になり、問題となる。
In
そこで、本発明は、上記問題点を解決し、入力画像の背景の色を考慮して、入力画像から背景色を除去することができる新しい画像処理装置および画像処理方法を提供することを目的とする。 SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a new image processing apparatus and image processing method that can solve the above-described problems and can remove a background color from an input image in consideration of the background color of the input image. To do.
また、背景除去レベルを決定するためのヒストグラムの作成の回数を減らし、カラー/モノクロ判別を行なうこともできる。 In addition, the number of histograms for determining the background removal level can be reduced, and color / monochrome discrimination can be performed.
本発明の画像処理装置は、入力画像を構成する各画素の3次元色空間における色情報に基づいて3次元ヒストグラムを作成する作成手段と、前記3次元ヒストグラムにおいて閾値以上の度数を有する色の明度情報を用いて、前記入力画像の背景色の色範囲を算出する算出手段と、を有する。 An image processing apparatus according to the present invention includes a creating unit that creates a three-dimensional histogram based on color information in a three-dimensional color space of each pixel constituting an input image, and the brightness of a color having a frequency equal to or higher than a threshold in the three-dimensional histogram. Calculating means for calculating a color range of the background color of the input image using the information.
また、本発明の画像処理装置は、前記3次元ヒストグラムにおいて前記背景色の色範囲以外に含まれる有彩色の度数に基づいて、前記入力画像がカラ−画像であるかモノクロ画像であるかを判別する判別手段を有してもよい。 The image processing apparatus according to the present invention determines whether the input image is a color image or a monochrome image based on a frequency of a chromatic color included outside the color range of the background color in the three-dimensional histogram. There may be a discriminating means.
さらに、本発明の画像処理装置は、前記算出手段が、前記3次元ヒストグラムにおいて最多度数を有する色を決定し、該色に対応する明度を求め、該求めた明度以上の明度を有する色の範囲を前記背景色の色範囲として決定してもよい。 Furthermore, in the image processing apparatus of the present invention, the calculation means determines a color having the highest frequency in the three-dimensional histogram, determines a lightness corresponding to the color, and a range of colors having a lightness equal to or higher than the determined lightness. May be determined as the color range of the background color.
さらに、本発明の画像処理装置は、前記入力画像を構成する各画素について、前記背景色の色範囲に含まれる色を所定の色に変更する変更手段を有してもよい。 Furthermore, the image processing apparatus of the present invention may include a changing unit that changes a color included in the color range of the background color to a predetermined color for each pixel constituting the input image.
さらに、本発明の画像処理装置は、前記判別手段が、特定の有彩色の度数が所定値以下である場合に、前記入力画像がモノクロ画像で判別することができる。 Furthermore, in the image processing apparatus of the present invention, when the frequency of a specific chromatic color is equal to or less than a predetermined value, the determination unit can determine the input image as a monochrome image.
さらに、本発明の画像処理装置は、前記作成手段が、前記入力画像を構成する各画素に対して、該画素の周辺画素情報に基づいて前記入力画像内におけるエッジ部に相当する画素であるか否かを判定し、該エッジ部に相当する画素と判定され、特定色の色情報を有する画素の近くに配置される画素を補正対象画素として選択する選択手段と、前記補正対象画素の3次元色空間における色情報を特定色の色情報に近づけるように補正する補正手段と、を有し、前記対象画素の色情報を補正した後、前記入力画像を構成する各画素の3次元色空間における色情報に基づいて3次元ヒストグラムを作成することができる。 Furthermore, in the image processing apparatus according to the present invention, whether the creation unit is a pixel corresponding to an edge portion in the input image based on peripheral pixel information of the pixel for each pixel constituting the input image. Determining means for determining whether or not the pixel corresponds to the edge portion, and selecting a pixel disposed near a pixel having color information of a specific color as a correction target pixel, and the three-dimensional correction target pixel Correction means for correcting the color information in the color space so as to approximate the color information of the specific color, and after correcting the color information of the target pixel, in the three-dimensional color space of each pixel constituting the input image A three-dimensional histogram can be created based on the color information.
本発明の画像処理方法は、入力画像を構成する各画素の3次元色空間における色情報に基づいて3次元ヒストグラムを作成する作成段階と、前記3次元ヒストグラムにおいて閾値以上の度数を有する色の明度情報を用いて、前記入力画像の背景色の色範囲を算出する算出段階と、を有する。 The image processing method of the present invention includes a creation step of creating a three-dimensional histogram based on color information in a three-dimensional color space of each pixel constituting an input image, and the brightness of a color having a frequency equal to or higher than a threshold in the three-dimensional histogram. And calculating a background color range of the input image using the information.
本発明のプログラムは、本発明の画像処理方法の各工程をコンピュータ上で実行させることを特徴とする。本発明のプログラムは、CD−ROM、磁気ディスク、半導体メモリなどの各種の記録媒体を通じてコンピュータにインストールまたはロードすることができる。 The program of the present invention is characterized in that each step of the image processing method of the present invention is executed on a computer. The program of the present invention can be installed or loaded on a computer through various recording media such as a CD-ROM, a magnetic disk, and a semiconductor memory.
以上のように構成された本発明に係る画像処理装置および画像処理方法によれば、色空間の3次元ヒストグラムから入力画像の背景色の色範囲を算出しているので、入力画像の非背景に同じ明度を有する複数の色の画素がある場合でも、正しく背景色を判定でき、その結果、精度良く入力画像から背景色を除去することができる。 According to the image processing apparatus and the image processing method according to the present invention configured as described above, the color range of the background color of the input image is calculated from the three-dimensional histogram of the color space. Even when there are a plurality of color pixels having the same brightness, the background color can be correctly determined, and as a result, the background color can be accurately removed from the input image.
また、背景除去レベルを決定するためのヒストグラムの作成の回数を減らし、簡易な処理を実現できる。また、背景除去レベルを決定するためのヒストグラムの作成の回数を減らし、カラー/モノクロ判別を行なうこともできる。 In addition, the number of histograms for determining the background removal level can be reduced, and simple processing can be realized. In addition, the number of histograms for determining the background removal level can be reduced, and color / monochrome discrimination can be performed.
以下、本発明を実施するための好適な実施形態を、図面を参照しながら説明する。
<第1の実施形態>
図1は、本発明の第1実施形態に係る画像処理装置10を備える画像処理システム1の概略構成を示すブロック図である。
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments for carrying out the invention will be described with reference to the drawings.
<First Embodiment>
FIG. 1 is a block diagram showing a schematic configuration of an
画像処理システム1は、図1に示すように、画像処理装置10、スキャナ装置20、およびプリンタ装置30を含んで構成される。
As shown in FIG. 1, the
スキャナ装置20は、原稿を読み取って入力画像データ(以下、「入力画像」と称する)を、RGB(R(赤)、G(緑)、B(青))データとして取得する装置である。なお、スキャナ装置20の構成自体は、従来のスキャナ装置と同様であるので詳しい説明は省略するが、たとえば、スキャナ光源、レンズ、走査用モータ、およびCCDセンサなどの構成部品から構成され、スキャナ光源から照射された光を原稿に当てながら走査し、その反射光をR(赤)、G(緑)、B(青)のフィルタをかけたCCDセンサに導く処理を実行し、CCDセンサが読み取った原稿の反射光を画素ごとに、RGBそれぞれについての明度の情報をデジタル信号化して出力する。
The
プリンタ装置30は、スキャナ装置20で取得した入力画像(RGBデータ)を画像処理装置10で所定の処理を施した後、処理された画像データ(R'G'B'データ)を印刷用のインクに対応した印刷データ(CMYK信号:C(シアン)、M(マゼンタ)、Y(イエロー)、K(黒))に変換し、印刷を実行する装置である。なお、プリンタ装置30の構成自体は、従来のプリンタ装置と同様であるので詳しい説明は省略するが、たとえば、HDDなどの記憶装置に予め記憶された色変換の組み合わせを記録した色変換テーブルを参照して、画像データを印刷データに変換し、該印刷データに基づいて、CMYKそれぞれのインクを吐出して普通紙などの印刷媒体に印刷する。
The
画像処理装置10は、スキャナ装置20で読み取った原稿がカラー原稿であるかモノクロ原稿であるかを入力画像(RGBデータ)に基づいて判別し、また、原稿の背景である地色(背景色)を除去するように入力画像(RGBデータ)を適宜、画像処理する装置である。
The
画像処理装置10は、ハードウェアとして、図2に例示するように、各種演算を行うCPU(中央演算処理装置)101、CPU101が実行するプログラムまたは画像データを一時的に記憶するRAM102、各種データや各種プログラム等をあらかじめ格納するROM103、HDDなどの外部記憶装置104、画面などを表示するLCDなどの表示部105、各種のキーボタンを有した操作パネルなどの入力部106、および外部機器と通信可能に接続するためのインタフェース107などの構成要素を備えている。
As illustrated in FIG. 2, the
画像処理装置10は、機能的には、図1に示すように、入力画像取得部11と、3次元ヒストグラム作成部12と、背景色色範囲算出部13と、平滑化・エッジ強調処理部14と、色変換・背景色除去部15と、カラー/モノクロ判別部16と、画像データ出力部17とを備える。これらの各部は、主に、CPU101がRAM102やROM103に格納されるプログラムを実行し、各ハードウェアを制御することにより、実現される。
As shown in FIG. 1, the
入力画像取得部11は、スキャナ装置20が原稿を読み取って取得した入力画像(RGBデータ)を取得するものである。入力画像を取得するタイミングは、たとえば、スキャナ装置20が原稿を読み取って入力画像を取得したタイミングとすることができる。この場合、スキャナ装置20は、入力画像を取得する度に、該入力画像を入力画像取得部11に送信し、その結果、入力画像取得部11は、入力画像(RGBデータ)を自動的に取得することができる。
The input
3次元ヒストグラム作成部12は、入力画像を構成する各画素の3次元色空間における色情報に基づいて3次元ヒストグラムを作成する作成手段として機能する。本実施形態では、各画素の3次元色空間における色情報として、RGBの各要素色を複数階調(たとえば、0−255の256階調)で表現したRGB値を用いる。1つの画素のRGB値は、たとえば、(255、255、0)と表現することができる。3次元ヒストグラム作成部12は、具体的には、入力画像を構成する複数の画素それぞれのRGB値を、RGBをそれぞれ軸とした3次元色空間上にプロットし計数することによって3次元ヒストグラムを作成する。なお、3次元ヒストグラムにおいて、RGBの各軸におけるプロット幅を階調に合わせて作成すると、プログラム上において256×256×256の配列数を必要とし、メモリ使用量が増大する。そこで、プログラム上における配列数を少なくするために、RGBの各軸を、たとえば10階調ごとに区分して計数してもよい。この場合、各RGB値の3次元ヒストグラムは、たとえば、図3に示すような配列として表現でき、後述するように、度数(カウント数)が閾値以上にある配列値のRGB値を背景色として判定することができる。
The three-dimensional
背景色色範囲算出部13は、3次元ヒストグラムにおいて閾値以上の度数を有する色の明度情報を用いて、入力画像の背景色の色範囲を算出する算出手段として機能する。すなわち、背景色を構成する画素のRGB値は同一または近似するため、3次元ヒストグラムにおいて度数が閾値以上にある領域を背景色として判定することができる。そして、前記背景色として判定された領域のRGB値に応じた明度(L1)を求めて、該明度情報以上の明度を有する画素を背景色の色範囲として算出する。なお、前記閾値は、入力画像内の背景色の占める割合によって設定されるものであって、入力画像の種類など種々の条件に合わせて設定することができ、たとえば、3次元ヒストグラムにおける全度数のうち50%の度数を閾値と設定することができる。
The background color color
平滑化・エッジ強調処理部14は、入力画像の特性に応じて、写真画像や網点画像に対しては、モアレの発生等を防止すべく平滑化処理を施し、また、文字画像に対しては、鮮明なエッジを形成すべくエッジ強調処理をする平滑化・エッジ強調処理手段として機能する。この平滑化・エッジ強調処理部14は、たとえば、ある着目画素を中心とする周囲9画素に基づいてそのRGB値が平均化するように平均化処理をしたり、エッジ強調化処理をするものであって、この処理自体は従来の方法と同様であるので詳しい説明は省略する。なお、平滑化・エッジ強調処理部14は、本実施形態の画像処理装置10において、必要に応じて省略することもできる。
The smoothing / edge
色変換・背景色除去部15は、RGBデータをLabデータに、またLabデータをRGBデータに変換する色変換手段として、また、入力画像から背景色を除去するために、背景色の色範囲に含まれる色を所定の色に変更する変更手段(背景色除去手段)として機能する。具体的には、図4に示すように、入力画像としてのRGBデータをLabデータに変換する処理、Labデータを背景色除去してL'a'b'データに変更する処理、L'a'b'データをプリンタ30で出力するためのR'G'B'データに変換する処理を実行する。なお、色変換の処理自体は従来の方法と同様であって詳しい説明は省略するが、たとえば、画像処理装置10の外部記憶装置104に予め保存されている色変換テーブルを読み出し、その色変換テーブルを参照して、各種データの変換処理をする。また、背景色除去の処理は、たとえば、背景色色範囲算出部13で求めた明度(L1)以上の明度を有するLabデータを、L'=100(最大値),a=b=0(無彩色)とし、L1未満の明度LについてはL'=L×100/L1と変更することで、背景色を除去したL'a'b'データを得ることができる。
The color conversion / background
カラー/モノクロ判別部16は、3次元ヒストグラムにおいて背景色の色範囲以外に含まれる有彩色の度数に基づいて、入力画像がカラ−画像であるかモノクロ画像であるかを判別する判別手段として機能する。すなわち、3次元ヒストグラムにおいて背景色色範囲算出部13で算出した背景色の色範囲以外であって、かつ、無彩色範囲以外に一定以上の度数を有するときに、カラー画像と判別し、または、特定色(たとえば、肌色)の有彩色範囲を予め定めて、背景色の色範囲以外であって、かつ、前記定めた有彩色範囲に一定以上の度数を有するときに、カラー画像と判別することができる。なお、無彩色範囲は、入力画像に合わせて任意に設定することができ、たとえば、3次元ヒストグラムにおいてR=G=Bの軸から一定の範囲(たとえば、RGB値それぞれ±10)とすることができる。
The color / monochrome discriminating unit 16 functions as a discriminating unit that discriminates whether the input image is a color image or a monochrome image based on the frequency of chromatic colors included outside the color range of the background color in the three-dimensional histogram. To do. That is, when it is outside the color range of the background color calculated by the background color color
画像データ出力部17は、プリンタ30において印刷させるための画像データ(R'G'B'データ)を、プリンタ30に向けて出力するデータ出力手段として機能する。具体的には、色変換・背景色除去部15で変換されたR'G'B'データ、およびカラー/モノクロ判別部16での判別結果を出力する。
The image
以下、図5に示すフローチャートを参照して、画像処理装置10を用いて実施される画像処理方法を説明する。以下の処理は、CPU101が主として実行する。なお、各工程(符号が付与されていない部分的な工程を含む)は処理内容に矛盾を生じない範囲で任意に順番を変更して又は並列に実行することができる。また、CPU101は、種々の機能を備えるが、画像処理に直接関係しない機能については説明を省略する。
Hereinafter, an image processing method implemented using the
まず、入力画像取得部11が、スキャナ装置20が原稿を読み取って取得した入力画像(RGBデータ)を取得する(ステップS100)。なお、入力画像を取得するタイミングは、たとえば、スキャナ装置20が原稿を読み取って入力画像を取得するごとにスキャナ装置20から入力画像が送られる都度とすることができる。
First, the input
次いで、3次元ヒストグラム作成部12が、入力画像を構成する各画素の3次元色空間における色情報に基づいて3次元ヒストグラムを作成する(ステップS101)。具体的には、入力画像を構成する複数の画素それぞれのRGB値を、RGBをそれぞれ軸とした3次元色空間上にプロットし計数することによって3次元ヒストグラムを作成する。
Next, the three-dimensional
次いで、背景色色範囲算出部13は、3次元ヒストグラムにおいて閾値以上の度数を有する色の明度情報を用いて、入力画像の背景色の色範囲を算出する(ステップS102)。すなわち、3次元ヒストグラムにおいて度数が閾値以上にある領域を背景色として判定し、前記背景色として判定された領域のRGB値に応じた明度(L1)を求めて、該明度情報以上の明度を有する画素を背景色の色範囲として算出する。なお、前記閾値は、入力画像内の背景色の占める割合によって設定されるものであって、入力画像の種類など種々の条件に合わせて設定することができ、たとえば、3次元ヒストグラムにおける全度数のうち50%の度数を閾値と設定することができる。
Next, the background color
次いで、平滑化・エッジ強調処理部14が、入力画像の特性に応じて、写真画像や網点画像に対しては、モアレの発生等を防止すべく平滑化処理を施し、また、文字画像に対しては、鮮明なエッジを形成すべくエッジ強調処理をする(ステップS103)。なお、本実施形態において、これら処理は、一方の処理を省略してもよく、また、両方の処理を省略してもよい。
Next, the smoothing / edge
次いで、色変換・背景色除去部15が、入力画像としてのRGBデータをLabデータに変換する(ステップS104)。なお、RGBデータからLabデータへの変換は、従来の色変換処理と同様に、色変換テーブルに基づいて各種データの変換処理をする。
Next, the color conversion / background
次いで、色変換・背景色除去部15が、Labデータを背景色除去してL'a'b'データに変更する(ステップS105)。具体的には、たとえば、背景色色範囲算出部13で求めた明度(L1)以上の明度を有するLabデータを、L'=100(最大値),a=b=0(無彩色)とし、L1未満の明度LについてはL'=L×100/L1と変更することで、背景色を除去したL'a'b'データを得ることができる。
Next, the color conversion / background
次いで、色変換・背景色除去部15が、L'a'b'データをプリンタ30で出力するためのR'G'B'データに変換する(ステップS106)。この色変換処理は、従来の色変換処理と同様に、色変換テーブルに基づいて各種データの変換処理をする。
Next, the color conversion / background
ここで、上記ステップS102の処理の後、ステップS103〜S106の処理とは別に、カラー/モノクロ判別部16が、3次元ヒストグラムにおいて背景色の色範囲以外に含まれる有彩色の度数に基づいて、入力画像がカラ−画像であるかモノクロ画像であるかを判別する(ステップS107)。なお、3次元ヒストグラムにおいて背景色色範囲算出部13で算出した背景色の色範囲以外であって、かつ、無彩色範囲以外に一定以上の度数を有するときにカラー画像と判別し、または、特定色(たとえば、肌色)の有彩色範囲を予め定めて、背景色の色範囲以外であて、かつ、前記定めた有彩色範囲に一定以上の度数を有するときにカラー画像と判別することができる。
Here, after the process of step S102, separately from the processes of steps S103 to S106, the color / monochrome determination unit 16 performs the chromatic color frequency included outside the color range of the background color in the three-dimensional histogram. It is determined whether the input image is a color image or a monochrome image (step S107). In the three-dimensional histogram, it is determined that the image is a color image when it is outside the background color range calculated by the background color
次いで、上記ステップS106およびステップS107の処理後に、画像データ出力部17が、プリンタ30において印刷させるための画像データ(R'G'B'データ)を、プリンタ30に向けて出力する(ステップS108)。具体的には、色変換・背景色除去部15で変換されたR'G'B'データ、およびカラー/モノクロ判別部16での判別結果を出力する。
Next, after the processing of step S106 and step S107, the image
以上のように、本実施形態の画像処理装置および画像処理方法によれば、色空間の3次元ヒストグラムから入力画像の背景色の色範囲を算出しているので、入力画像の非背景に同じ明度を有する複数の色の画素がある場合でも、正しく背景色を判定することができる。 As described above, according to the image processing apparatus and the image processing method of the present embodiment, since the color range of the background color of the input image is calculated from the three-dimensional histogram of the color space, the same brightness as the non-background of the input image Even when there are pixels of a plurality of colors having the background color, the background color can be correctly determined.
また、3次元ヒストグラムを1種作成するのみで、入力画像から背景色を除去することができるとともに、入力画像がカラ−画像であるかモノクロ画像であるかを判別することもできるので、処理量やメモリ使用量を軽減することができる。 In addition, it is possible to remove the background color from the input image by creating only one type of three-dimensional histogram, and to determine whether the input image is a color image or a monochrome image. And memory usage can be reduced.
さらに、入力画像の背景色がカラーであったとしても、その背景色を除いた上でカラー/モノクロ判別することで、背景色に依らずに入力画像をモノクロ判別することができる。
<第2の実施形態>
図5は、本発明の第2実施形態に係る画像処理装置10'を備える画像処理システム1'の概略構成を示すブロック図である。
Furthermore, even if the background color of the input image is a color, the input image can be determined monochrome regardless of the background color by performing color / monochrome determination after removing the background color.
<Second Embodiment>
FIG. 5 is a block diagram showing a schematic configuration of an
第2実施形態の画像処理装置10'は、第1実施形態の画像処理装置10と3次元ヒストグラムを作成する方法が異なり、入力画像を構成する各画素のうち、特定の条件を満たす画素の3次元色空間における色情報を補正してから、ヒストグラムを作成する点に特徴を有する。
The
第2の実施形態の画像処理装置10'は、図5に示すとおり、3次元ヒストグラム作成手段12'以外は、第1の実施形態と同一の構成要素であるので、その説明は省略する。
As shown in FIG. 5, the
3次元ヒストグラム作成部12'は、選択部121および補正部122を含んで構成される。
The three-dimensional
選択部121は、入力画像を構成する各画素に対して、該画素の周辺画素情報に基づいて入力画像内におけるエッジ部に相当する画素であるか否かを判定し、該エッジ部に相当する画素と判定され、かつ、特定色の色情報を有する画素の近くに配置される画素を補正対象画素として選択する選択手段として機能する。なお、エッジ部に相当する画素を検出する処理は、注目画素に対して周辺画素情報をもとにエッジ強度が一定以上のものをエッジ部として検出するといった従来のエッジ検出処理と同様であるので、詳しい説明は省略する。また、特定色の色情報を有する画素であるか否かは、たとえば、特定色の色情報を予め設定しておき、そのRGB値と比較することで行うことができる。よって、選択部121は、エッジ部に相当する画素であって、特定色の色情報を有する画素の近くに配置される画素を補正対象画素として選択することができる。なお、本実施形態において、特定色は、たとえば、黒などの無彩色とすることができる。
The
補正部122は、前記補正対象画素の3次元色空間における色情報を無彩色に近づけるように補正するものであって、補正部として機能する。すなわち、3次元ヒストグラムにおいてR=G=Bの軸(無彩色軸)に近づけるように補正するものであって、たとえば、色空間において、補正対象画素のRGB値の点から無彩色軸に垂線を下ろし、その垂線上を軸の方へ移動させる。たとえば、スキャナでの読み取り時に特定色の文字領域の境界画素が背景領域の影響で背景色に近づいてしまう場合がある。本実施形態では、このような場合でも、背景色に近づいてしまう境界画素を補正部122によって本来の特定色に戻すことができる。
The
そして、3次元ヒストグラム作成部12'は、前記補正対象画素の色情報を補正した後、前記入力画像を構成する各画素の3次元色空間における色情報に基づいて3次元ヒストグラムを作成する。
Then, the three-dimensional
以下、図6に示すフローチャートを参照して、画像処理装置10'を用いて実施される画像処理方法を説明する。以下の処理は、CPU101が主として実行する。なお、各工程(符号が付与されていない部分的な工程を含む)は処理内容に矛盾を生じない範囲で任意に順番を変更して又は並列に実行することができる。
Hereinafter, an image processing method implemented using the
まず、上記ステップS101と同様に、入力画像取得部11が、スキャナ装置20が原稿を読み取って取得した入力画像(RGBデータ)を取得する(ステップS200)。
First, as in step S101, the input
次いで、3次元ヒストグラム作成部12'が、入力画像を構成する各画素に対して、該画素の周辺画素情報に基づいて入力画像内におけるエッジ部に相当する画素であるか否かを判定し、該エッジ部に相当する画素と判定され、かつ、特定色の色情報を有する画素の近くに配置される画素を補正対象画素として選択する(ステップS201)。なお、エッジ部に相当する画素を検出する処理は、注目画素に対して周辺画素情報をもとにエッジ強度が一定以上のものをエッジ部として検出するといった従来のエッジ検出処理と同様であるので、詳しい説明は省略する。また、特定色の色情報を有する画素であるか否かは、たとえば、特定色の色情報を予め設定しておき、そのRGB値と比較することで行うことができる。なお、本実施形態において、特定色は、たとえば、黒などの無彩色とすることができる。
Next, the three-dimensional
次いで、3次元ヒストグラム作成部12'が、補正対象画素の3次元色空間における特定色の色範囲に近づけるように補正する(ステップS202)。3次元ヒストグラムにおいてR=G=Bの軸(無彩色軸)に近づけるように補正するものであって、たとえば、色空間において、補正対象画素のRGB値の点から無彩色軸に垂線を下ろし、その垂線上を軸の方へ移動させる。具体例を挙げれば、ある補正対象画素のRGB値が(150、130、150)であれば、その画素のRGB値を(150、150、150)になるように補正する。
Next, the three-dimensional
次いで、3次元ヒストグラム作成部12'が、前記補正対象画素の色情報を補正した後、前記入力画像を構成する各画素の3次元色空間における色情報に基づいて3次元ヒストグラムを作成する(ステップS203)。
Next, the three-dimensional
次いで、上記第1の実施形態におけるステップS102〜S108の処理と同様に、ステップS204〜S209の処理を行う。なお、ステップS204〜S210の処理は、ステップS102〜S107の処理と同様とすることができるので、ここでは詳しい説明を省略する。 Next, similarly to the processes in steps S102 to S108 in the first embodiment, the processes in steps S204 to S209 are performed. In addition, since the process of step S204-S210 can be made to be the same as the process of step S102-S107, detailed description is abbreviate | omitted here.
本実施形態の画像処理装置10'によれば、入力画像から背景色を精度よく抽出することができる。すなわち、本来、無彩色と判定すべきであるが、エッジなどの特定色にひっぱられて有彩色になったものを救済することができるので、判定精度を上げることができる。
<変形例>
以上のように本発明の好適な実施形態について説明したが、本発明は、以上の実施形態に限定されるべきものではなく、特許請求の範囲に表現された思想および範囲を逸脱することなく、種々の変形、追加、および省略が当業者によって可能である。
According to the
<Modification>
The preferred embodiments of the present invention have been described above. However, the present invention should not be limited to the above embodiments, and does not depart from the spirit and scope expressed in the claims. Various modifications, additions, and omissions can be made by those skilled in the art.
たとえば、上記実施形態では、入力画像がカラー画像であるかモノクロ画像であるかを、背景色除去する処理とともに実施しているが、これに限らず、たとえば、背景色除去する処理のみを実施してもよいことはもちろんである。 For example, in the above embodiment, whether the input image is a color image or a monochrome image is performed together with the process of removing the background color. However, the present invention is not limited to this. For example, only the process of removing the background color is performed. Of course, you may.
また、上記実施形態では、スキャナ装置20から原稿を読み取って取得した画像データ(RGBデータ)を画像処理する場合を説明したが、これに限られず、たとえば、画像処理装置20に通信ネットワークを介して接続されたコンピュータから画像データを適宜画像処理することもできる。
In the above-described embodiment, the case has been described in which image data (RGB data) obtained by reading a document from the
さらに、上記実施形態では、画像処理装置10と、スキャナ装置20と、プリンタ装置30とを分離して説明したが、これに限られず、たとえば、スキャナ装置20またはプリンタ装置30内に上記画像処理装置10の機能を備えてもよい。この場合、スキャナ装置またはプリンタ装置の制御部が画像処理装置10の各機能を実現することができる。さらに、画像処理装置10、スキャナ装置20、プリンタ装置30のそれぞれの機能を一個の筐体に収めたMFPによって実現することができることはもちろんであって、この場合、MFPの制御部が画像処理装置10の各機能を実現する。
Furthermore, in the above-described embodiment, the
さらに、上記実施他形態では、入力画像であるRGBデータに基づいて3次元ヒストグラムを作成したが、これに限られず、Labデータに基づいて3次元ヒストグラムを作成することもできる。ただし、RGBデータからLabデータへの変換する変換テーブルによって、そのヒストグラムの精度が影響を受けるため、RGBデータで3次元ヒストグラムを作成する方が望ましい。 Furthermore, in the above-described embodiment and the like, a three-dimensional histogram is created based on RGB data that is an input image. However, the present invention is not limited to this, and a three-dimensional histogram can be created based on Lab data. However, since the accuracy of the histogram is affected by the conversion table for converting RGB data to Lab data, it is desirable to create a three-dimensional histogram with RGB data.
1 画像処理システム、
10 画像処理装置、
11 入力画像取得部、
12 3次元ヒストグラム作成部、
13 背景色色範囲算出部、
14 平滑化・エッジ強調処理部、
15 色変換・背景色除去部、
16 カラー・モノクロ判別部、
17 画像データ出力部、
20 スキャナ装置、
30 プリンタ装置。
1 image processing system,
10 image processing apparatus,
11 Input image acquisition unit,
12 3D histogram generator,
13 background color color range calculation unit,
14 Smoothing / edge enhancement processing unit,
15 color conversion / background color removal unit,
16 color / monochrome discriminator,
17 Image data output unit,
20 Scanner device,
30 Printer device.
Claims (8)
前記3次元ヒストグラムにおいて閾値以上の度数を有する色の明度情報を用いて、前記入力画像の背景色の色範囲を算出する算出手段と、
を有することを特徴とする画像処理装置。 Creating means for creating a three-dimensional histogram based on color information in a three-dimensional color space of each pixel constituting the input image;
Calculating means for calculating a color range of a background color of the input image using lightness information of a color having a frequency equal to or higher than a threshold in the three-dimensional histogram;
An image processing apparatus comprising:
前記入力画像を構成する各画素に対して、該画素の周辺画素情報に基づいて前記入力画像内におけるエッジ部に相当する画素であるか否かを判定し、該エッジ部に相当する画素と判定され、特定色の色情報を有する画素の近くに配置される画素を補正対象画素として選択する選択手段と、
前記補正対象画素の3次元色空間における色情報を前記特定色の色情報に近づけるように補正する補正手段と、を有し、
前記補正対象画素の色情報を補正した後、前記入力画像を構成する各画素の3次元色空間における色情報に基づいて3次元ヒストグラムを作成することを特徴とする請求項1〜5に記載の画像処理装置。 The creating means includes
It is determined whether each pixel constituting the input image is a pixel corresponding to an edge portion in the input image based on peripheral pixel information of the pixel, and is determined to be a pixel corresponding to the edge portion Selection means for selecting, as a correction target pixel, a pixel arranged near a pixel having color information of a specific color;
Correcting means for correcting the color information in the three-dimensional color space of the correction target pixel so as to approach the color information of the specific color;
6. The three-dimensional histogram is created based on color information in a three-dimensional color space of each pixel constituting the input image after correcting the color information of the correction target pixel. Image processing device.
前記3次元ヒストグラムにおいて閾値以上の度数を有する色の明度情報を用いて、前記入力画像の背景色の色範囲を算出する算出段階と、
を有することを特徴とする画像処理方法。 Creating a three-dimensional histogram based on color information in the three-dimensional color space of each pixel constituting the input image;
A calculation step of calculating a color range of a background color of the input image using lightness information of a color having a frequency equal to or higher than a threshold in the three-dimensional histogram;
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008292117A JP2010119006A (en) | 2008-11-14 | 2008-11-14 | Image processing apparatus,and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008292117A JP2010119006A (en) | 2008-11-14 | 2008-11-14 | Image processing apparatus,and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010119006A true JP2010119006A (en) | 2010-05-27 |
Family
ID=42306349
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008292117A Pending JP2010119006A (en) | 2008-11-14 | 2008-11-14 | Image processing apparatus,and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010119006A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012054642A (en) * | 2010-08-31 | 2012-03-15 | Kyocera Mita Corp | Image processing device |
JP2014192552A (en) * | 2013-03-26 | 2014-10-06 | Brother Ind Ltd | Image processing device and image processing program |
US9467596B2 (en) | 2014-10-31 | 2016-10-11 | Pfu Limited | Image-processing apparatus, image-processing method, and computer program product |
CN112202981A (en) * | 2019-07-08 | 2021-01-08 | 柯尼卡美能达株式会社 | Voice operation system, control device, recording medium, and processing device |
-
2008
- 2008-11-14 JP JP2008292117A patent/JP2010119006A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012054642A (en) * | 2010-08-31 | 2012-03-15 | Kyocera Mita Corp | Image processing device |
JP2014192552A (en) * | 2013-03-26 | 2014-10-06 | Brother Ind Ltd | Image processing device and image processing program |
US9467596B2 (en) | 2014-10-31 | 2016-10-11 | Pfu Limited | Image-processing apparatus, image-processing method, and computer program product |
CN112202981A (en) * | 2019-07-08 | 2021-01-08 | 柯尼卡美能达株式会社 | Voice operation system, control device, recording medium, and processing device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4926568B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US7903872B2 (en) | Image-processing apparatus and method, computer program, and storage medium | |
KR100994644B1 (en) | Image processing apparatus and method thereof | |
JP4170353B2 (en) | Image processing method, image processing apparatus, image reading apparatus, image forming apparatus, program, and recording medium | |
US7889917B2 (en) | Device and method for image color determination | |
US20070236707A1 (en) | Image processing apparatus, image processing method and image processing program | |
JP2009038537A (en) | Image processor, image formation device, image processing program, and recording medium for recording image processing program therein | |
JP2006115425A (en) | Image processing apparatus, image forming apparatus, image processing method, computer program and recording medium | |
JPH0722330B2 (en) | Image region identification method for image processing apparatus | |
KR102072887B1 (en) | Image processing apparatus, image processing method, and storage medium | |
JP4402090B2 (en) | Image forming apparatus, image forming method, program, and recording medium | |
KR20080088266A (en) | Image forming apparatus and control method thereof | |
JP2011082746A (en) | Image processing apparatus | |
JP4105539B2 (en) | Image processing apparatus, image forming apparatus including the same, image processing method, image processing program, and recording medium | |
JP2010119006A (en) | Image processing apparatus,and image processing method | |
JP4140519B2 (en) | Image processing apparatus, program, and recording medium | |
JP2007053439A (en) | Isolated point discrimination apparatus, image processing apparatus, image reading apparatus, image forming apparatus, isolated point discrimination method, isolated point discrimination program, image processing program, and computer-readable recording medium | |
JP4453979B2 (en) | Image reproducing apparatus, image reproducing method, program, and recording medium | |
JP2005117504A (en) | Image processor and image processing method | |
JP2007088741A (en) | Image processing apparatus and image processing method | |
JP2010120290A (en) | Image processing apparatus and image processing method | |
JP6474315B2 (en) | Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium therefor | |
JP2007067908A (en) | Image processor, image forming apparatus, image processing method, and image processing program | |
JP5549836B2 (en) | Image processing apparatus and image processing method | |
JP4080252B2 (en) | Image processing apparatus, image forming apparatus, image processing method, program, and recording medium |