JP4143232B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP4143232B2
JP4143232B2 JP26626599A JP26626599A JP4143232B2 JP 4143232 B2 JP4143232 B2 JP 4143232B2 JP 26626599 A JP26626599 A JP 26626599A JP 26626599 A JP26626599 A JP 26626599A JP 4143232 B2 JP4143232 B2 JP 4143232B2
Authority
JP
Japan
Prior art keywords
pixels
counting
input image
histogram
group
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
Application number
JP26626599A
Other languages
Japanese (ja)
Other versions
JP2001094805A5 (en
JP2001094805A (en
Inventor
慶喜 落合
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP26626599A priority Critical patent/JP4143232B2/en
Publication of JP2001094805A publication Critical patent/JP2001094805A/en
Publication of JP2001094805A5 publication Critical patent/JP2001094805A5/ja
Application granted granted Critical
Publication of JP4143232B2 publication Critical patent/JP4143232B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
本発明は、画像処理装置及び画像処理方法に関する。
【0002】
【従来の技術】
画像情報が記録された透過原稿より読み取ったRGB信号から原稿画像の平均濃度を求め、エバンスの定理に基づいて、R(レッド)、G(グリーン)、B(ブルー)毎の平均濃度を所定の濃度に調整することにより出力画像の明るさ及びカラーバランスを調整する方法が知られている。
【0003】
【発明が解決しようとする課題】
しかしながら、エバンスの定理に基づき原稿画像の平均濃度を所定の濃度に調整する方法は、原稿画像がほぼ統計的に色の偏りのないものであることを前提としている。よって、原稿画像中に特定の色成分を示す画素が多く存在する場合は、出力画像が色かぶりを起こすことがある。また、夜間のストロボ撮影や逆光撮影等のように、主被写体と背景の明るさに大きな差のあるシーンを撮影した場合は、画像全体の平均濃度を参照する方法では主被写体の明るさが良好に再現されないことがある。
【0004】
本発明は、上記の背景に鑑みてなされたものであり、例えば、原稿画像等の入力画像に色(例えば、色相、明度、彩度)の偏りのある場合であっても良好な色を再現することを目的とする。
【0005】
【課題を解決するための手段】
本発明の第1の側面に係る画像処理装置は、画像処理装置に係り、該画像処理装置は、入力画像中の注目画素の値と前記注目画素を除く他の全ての画素の値との差を算出する算出手段と、前記他の全ての画素のうち前記算出手段によって算出された差が所定値未満の画素をグループ化し、グループ化した画素の個数を計数する計数手段と、前記計数手段による計数結果が設定された数を超えている場合に、前記入力画像を構成する画素から前記グループ化した画素の一部または全部を除去した画像のヒストグラムを生成する生成手段と、前記生成手段により生成されたヒストグラムに基づいて階調変換曲線を作成する作成手段と、前記階調変換曲線に従って前記入力画像の階調を変換する変換手段とを備える。
【0006】
本発明の第2の側面は、画像処理装置に係り、該画像処理装置は、入力画像中の全ての画素の値と予め決定された色の画素の値との差を算出する算出手段と、前記他の全ての画素のうち前記算出手段によって算出された差が所定値未満の画素をグループ化し、グループ化した画素の個数を計数する計数手段と、前記計数手段による計数結果が設定された数を超えている場合に、前記入力画像を構成する画素から前記グループ化した画素の一部または全部を除去した画像のヒストグラムを生成する生成手段と、前記生成手段により生成されたヒストグラムに基づいて階調変換曲線を作成する作成手段と、前記階調変換曲線に従って前記入力画像の階調を変換する変換手段とを備える。
【0007】
本発明の第3の側面は、画像処理装置に係り、該画像処理装置は、各画素がRGBのそれぞれの色の信号により構成される入力画像中の全ての画素のうちRGBのそれぞれの色の信号の値の差が第1所定値以上の画素を第1グループとしてグループ化し、第2所定値以下の画素を第2グループとしてグループ化し、前記第1グループの画素の個数および前記第2グループの画素の個数をそれぞれ計数する計数手段と、前記計数手段によって計数された前記第1グループの画素の個数および前記第2グループの画素の個数がそれぞれ設定された数を超えている場合に、前記入力画像を構成する画素から前記第1グループの画素の一部または全部および前記第2グループの画素の一部または全部を除去した画像のヒストグラムを生成する生成手段と、前記生成手段により生成されたヒストグラムに基づいて階調変換曲線を作成する作成手段と、前記階調変換曲線に従って前記入力画像の階調を変換する変換手段とを備える。
【0008】
本発明の第4の側面は、画像処理方法に係り、該画像処理方法は、入力画像中の注目画素の値と前記注目画素を除く他の全ての画素の値との差を算出する算出工程と、前記他の全ての画素のうち前記算出工程において算出された差が所定値未満の画素をグループ化し、グループ化した画素の個数を計数する計数工程と、前記計数工程における計数結果が設定された数を超えている場合に、前記入力画像を構成する画素から前記グループ化した画素の一部または全部を除去した画像のヒストグラムを生成する生成工程と、前記生成工程において生成されたヒストグラムに基づいて階調変換曲線を作成する作成工程と、前記階調変換曲線に従って前記入力画像の階調を変換する変換工程とを含む。
【0009】
本発明の第5の側面は、画像処理方法に係り、該画像処理方法は、入力画像中の全ての画素の値と予め決定された色の画素の値との差を算出する算出工程と、前記他の全ての画素のうち前記算出工程において算出された差が所定値未満の画素をグループ化し、グループ化した画素の個数を計数する計数工程と、前記計数工程における計数結果が設定された数を超えている場合に、前記入力画像を構成する画素から前記グループ化した画素の一部または全部を除去した画像のヒストグラムを生成する生成工程と、前記生成工程において生成されたヒストグラムに基づいて階調変換曲線を作成する作成工程と、前記階調変換曲線に従って前記入力画像の階調を変換する変換工程と、を含むことを特徴とする。
【0010】
本発明の第6の側面は、画像処理方法に係り、前記画像処理方法は、各画素がRGBのそれぞれの色の信号により構成される入力画像中の全ての画素のうちRGBのそれぞれの色の信号の値の差が第1所定値以上の画素を第1グループとしてグループ化し、第2所定値以下の画素を第2グループとしてグループ化し、前記第1グループの画素の個数および前記第2グループの画素の個数をそれぞれ計数する計数工程と、前記計数工程において計数された前記第1グループの画素の個数および前記第2グループの画素の個数がそれぞれ設定された数を超えている場合に、前記入力画像を構成する画素から前記第1グループの画素の一部または全部および前記第2グループの画素の一部または全部を除去した画像のヒストグラムを生成する生成工程と、前記生成工程において生成されたヒストグラムに基づいて階調変換曲線を作成する作成工程と、前記階調変換曲線に従って前記入力画像の階調を変換する変換工程とを含む。
【0011】
本発明の第1の側面に係る画像処理装置において、例えば、前記計数手段は、予め設定された色と近い色の画素を計数することが好ましい。
【0012】
本発明の第1の側面に係る画像処理装置において、例えば、前記入力画像は、RGB信号により構成されており、前記計数手段は、RGBの各色の信号の値の差に基づいて、計数の対象となる画素を決定することが好ましい。
【0013】
本発明の第1の側面に係る画像処理装置において、例えば、前記入力画像は、RGB信号により構成されており、前記計数手段は、RGBの各色の信号の値の差に基づいて注目画素を決定し、該注目画素の色と近い色の画素を計数することが好ましい。
【0014】
本発明の第1の側面に係る画像処理装置において、例えば、前記計数手段は、RGBの各色の信号の差が所定値を越える画素を注目画素とすることにより、前記入力画像中の彩度の高い画素を計数することが好ましい。
【0015】
本発明の第1の側面に係る画像処理装置において、例えば、前記計数手段は、RGBの各色の信号の差が所定値未満である画素を注目画素とすることにより、前記入力画像中の彩度の低い画素を計数することが好ましい。
【0016】
本発明の第1の側面に係る画像処理装置において、例えば、前記計数手段は、RGB信号の各色の差が第1基準値を越える画素を第1注目画素とすると共に、第2基準値未満である画素を第2注目画素とすることにより、前記入力画像中の彩度が高い画素及び低い画素を計数することが好ましい。
【0017】
本発明の第1の側面に係る画像処理装置において、例えば、画像を撮像して前記入力画像とする撮像手段を更に備えることが好ましい。
【0018】
本発明の第1の側面に係る画像処理装置において、例えば、前記撮像手段は、撮像面に形成された像を読み取る撮像素子を有することが好ましい。
【0019】
本発明の第1の側面に係る画像処理装置において、例えば、前記撮像手段は、前記撮像面に像を結像させる光学系を更に有することが好ましい。
【0020】
本発明の第1の側面に係る画像処理装置において、例えば、前記撮像手段は、前記光学系は、前記撮像面に透過原稿の像を結像させることが好ましい。
【0021】
本発明の第1の側面に係る画像処理装置において、例えば、前記透過原稿は、フィルムであることが好ましい。
【0022】
本発明の第2の側面に係る画像処理方法は、入力画像中の互いに近い色の画素を計数する計数工程と、前記入力画像を構成する画素の値のヒストグラムを前記計数工程における計数結果に応じて適宜修正したヒストグラムを生成する生成工程と、前記生成工程で生成されたヒストグラムに基づいて前記入力画像を処理する処理工程とを含むことを特徴とする。
【0023】
本発明の第3の側面に係るメモリ媒体は、画像処理装置を制御するための画像処理プログラムを格納したメモリ媒体であって、該画像処理プログラムは、入力画像中の互いに近い色の画素を計数する計数工程と、前記入力画像を構成する画素の値のヒストグラムを前記計数工程における計数結果に応じて適宜修正したヒストグラムを生成する生成工程と、前記生成工程で生成されたヒストグラムに基づいて前記入力画像を処理する処理工程とを含むことを特徴とする。
【0024】
【発明の実施の形態】
本発明は、例えば、フィルムスキャナ、デジタルカメラ、コンピュータ等の画像処理装置に適用することができる。以下では、本発明の好適な実施の形態として、本発明をフィルムスキャナに適用した例を説明する。
【0025】
図1は、本発明の好適な実施の形態に係るフィルムスキャナの構成を示す図である。101は、フィルムを照明する照明光源、102は、フィルムを保持するフィルムフォルダであり、例えば、フィルムの非画像部(例えば、パーフォレーション部等)を裏表から挟み込むことによりフィルムを保持し、矢印A方向に駆動される。
【0026】
103は、照明光源101により照射されたフィルム(透過原稿)を透過した光をCCDリニアイメージセンサ(以下、単にCCDという)104の撮像面上に結像させる結像レンズ(光学系)である。105は、結像レンズ103とCCD104を含む光学部品群(例えば、ミラー等を含んでもよい)からなる光学ユニットである。CCD104は、その長手方向がZ方向に一致するように配置されている。この位置関係によりCCD104の長手方向である主走査方向と、フィルムフォルダ102の移動方向である副走査方向とは直角の関係になる。光学ユニット105は、焦点調整を行なう場合に、レンズ光軸方向(B方向)に駆動される。
【0027】
106は、CCD104から出力されたアナログ画像信号のゲイン設定やクランプ処理を行なうアナログ画像処理回路であり、107は、アナログ信号をデジタル信号に変換するA/D変換器である。
【0028】
108は、デジタル画像処理回路であり、デジタル入力信号からヒストグラムを作成するヒストグラム作成部109と、該入力信号をネガポジ変換し、階調を変換するための階調変換曲線を作成する階調変換曲線作成部110とを有する。デジタル画像処理回路108は、更に、ガンマ変換部、各種フィルタ処理部、CCD駆動パルスの生成部等を有する。デジタル画像処理部108は、例えばゲートアレイで構成され得る。
【0029】
111は、画像データを一時的に記憶するラインバッファであり、112は、例えばパーソナルコンピュータ等の外部機器113と接続のための外部インターフェース部である。
【0030】
115は、所定のソフトウェアに基づいてフィルムスキャナ100の全体的な動作を制御するシステムコントローラとしてのCPUであり、114は、CPU115と、画像処理部108、ラインバッファ111及びインターフェース部112とを接続するCPUバスであり、アドレスバス、データバス、コントロールバスによって構成されている。
【0031】
121は、フィルムフォルダ102を副走査方向(矢印A方向)に移動させるための副走査モータであり、例えばステッピングモータである。118は、システムコントローラ115からの命令に従って副走査モータ121を駆動するための副走査モータドライバである。
【0032】
116は、光学ユニット105をレンズ光軸方向(矢印B方向)に移動させるためのフォーカスモータであり、例えばステッピングモータである。117は、システムコントローラ115からの命令に従ってフォーカスモータ116を駆動するためのフォーカスモータドライバである。
【0033】
このような構成において、システムコントローラ115内のソフトウェア(ファームソフト)と、外部機器113からフィルムスキャナを操作するためのソフト(ドライバソフト)との通信によって、フィルムスキャナ100から外部機器200にフィルムの読取画像が転送される。
【0034】
なお、例えば、被写体像をCCD104の撮像面上に結像させるように光学系ユニット105を変更することにより、このフィルムスキャナ100に適用された発明をデジタルカメラに適用することもできる。また、例えば、画像処理部108をデジタルカメラやコンピュータに組み込むこともできる。
【0035】
以下、フィルムスキャナ100のデジタル画像処理部108における処理を説明する。図2は、デジタル画像処理部108における処理の流れを示すフローチャートである。なお、デジタル画像処理部108は、例えば、CPUと不揮発性メモリとを含み、例えば外部機器200から該メモリにインストールされたソフトウェアに従って該CPUによって制御される。このソフトウェアは、例えば、流通可能なメモリ媒体(例えば、フロッピーディスク、CD−ROM等)に格納されて外部機器200に提供され得る。
【0036】
ステップS201では、デジタル画像処理部108は、A/D変換部107からA/D変換された各画素毎のRGB信号を取り込む。ステップS202では、各画素毎のRGB信号値からRGBの各色毎に信号値の階級と頻度からなるヒストグラムを作成する。ステップS203では、各色毎のヒストグラムに基づいて、RGBの各色毎に信号値の平均値、最大値、最小値を算出する。ここで、最小値は、頻度が所定の割合(例えば1%)以上で、最も小さい信号値、最大値は、頻度が所定の割合(例えば99%)以内で、最も大きい信号値とすることができるが、頻度の割合に限定はない。
【0037】
ステップS204では、ステップS203で算出した平均値、最大値、最小値を用いてRGBの各色毎にゲインを算出する。ここで、ゲインとは、エバンスの定理に基づいて適正な明るさの出力画像(所定の濃度の出力画像)を再現するために入力信号を増幅する際の増幅率である。
【0038】
ステップS205では、予めRGBの各色用に設定されている基準階調変換曲線に各色毎のゲインを各々重畳して原稿画像(フィルムの画像)に適合したRGBの各色用の第2階調変換曲線を作成する。図3の301は、基準階調変換曲線の一例、302は第2階調変換曲線の一例である。
【0039】
ステップS206では、ステップS205で作成した各色用の第2階調変換曲線を利用して入力RGB信号に対してネガポジ変換処理を施す。
【0040】
ステップS207では、ネガポジ変換後のRGB信号より、信号値の階級と頻度からなるヒストグラムを作成する。なお、ポジフィルムの画像を読み取る場合には、例えば、ステップS203〜S207の処理は不要である。
【0041】
ステップS208では、ステップS203と同様の方法で、ポジのRGB信号のヒストグラムに基づいて信号値の最大値及び最小値を算出する。ステップS209では、ステップS208で算出した最大値及び最小値に基づいて、シャドウ基準信号値及びハイライト基準信号値を決定する。ステップS210では、シャドウ基準信号値及びハイライト基準信号値を結ぶ線形部を有する第3階調変換曲線を作成する。図4の401は、第3階調変換曲線の一例である。
【0042】
ステップS211では、第3階調変換曲線を利用して、ステップS206で生成されたポジのRGB信号に対して階調変換処理を施して、ラインバッファ111及びインターフェース112を介して外部機器200に転送する。
【0043】
図5は、ステップS202のヒストグラムの作成処理の具体例を示すフローチャートである。
【0044】
まず、ステップS501では、原稿画像を構成する全画素を対象として、RGBの各色毎に、信号値の階級と頻度からなる第1ヒストグラムを作成する。ここで、R、G、Bについての第1ヒストグラムを夫々第1Rヒストグラム、第1Gヒストグラム、第1Bヒストグラムとする。、
ステップS502では、原稿画像中の複数の注目画像候補から選択された画素を注目画素として、R、G、Bの各信号値TR、TG、TBを記憶する。ステップS503では、原稿画像を構成する他の画素のRGB信号値OR、OG、OBと、TR、TG、TBとの差分|TR−OR|、|TG−OG|、|TB−OB|を各色毎に算出する。そして、|TR−OR|、|TG−OG|、|TB−OB|が各々所定の値V1R、V1G、V1B未満であるか否か、即ち、|TR−OR|<V1R、かつ、|TG−OG|<V1G、かつ、|TB−OB|<V1Bであるか否かを判定し、判定結果がYESであればステップS505に進み、判定結果がNOであればステップS511に進む。ここで、判定結果がYESであることは、当該画素の画素値が注目画素の画素値と近いこと、即ち、当該画素の色(色相、明度、彩度)が注目画素の色と近いことを意味する。
【0045】
ステップS505では、当該画素(即ち、注目画素と色が近い画素)のアドレスを注目画素と関連付けて記憶することにより、注目画素と色が近い画素のグループ化を行う。
【0046】
ステップS506では、全画素についてステップS503〜S505の処理を実行したか否かを判定し、全画素について該処理が終了した場合はステップS507に進み、未処理の画素が残っている場合はステップS511に進み、比較対照の画素を他の未処理の画素に切り換えて、ステップS503〜S506を実行する。
【0047】
ステップS507では、注目画素と色が近い画素の個数、即ち注目画素と関連付けてグループ化された画素の個数をカウントし、そのカウント数が所定の値(V2)より大きいか否かを判定する。ここで、カウント値がV2より大きいことは、注目画素と色が近い画素がV2よりも多く存在すること、即ち、原稿画像中に色の偏りがあることを意味する。一方、カウント値がV2以下であることは、注目画素と色が近い画素がV2以下であること、即ち、原稿画像が注目画素に近い色に偏っていないことを意味する。
【0048】
ステップS507で、カウント値がV2より大きくないと判定した場合、即ち、原稿画像が注目画素に近い色に偏っていないと判定した場合は、ステップS508において、全注目画素候補について上記の処理が終了したか否かを判定し、未処理の注目画素候補が残っている場合はステップS512に進んで未処理の注目画素候補を注目画素として、ステップS502〜S507及びS511の処理を繰り返す。
【0049】
ここで、全画素を注目画素候補とすることもできるが、この場合、計算時間が膨大になるため、例えば、原稿画像の全面に均等に略分散されるように、好ましくは数個〜数百程度、より好ましくは数十程度の注目画素候補を決定することが好ましい。図6は、注目画素候補の一例を示す図である。
【0050】
ステップS507で、カウント値がV2より大きいと判定した場合、即ち、原稿画像が注目画素に近い色に偏っていると判定した場合には、ステップS509に進む。ステップS509では、注目画素に関連付けてグループ化された画素の信号値の階級と頻度からなる第2ヒストグラムをRGBの各色毎に作成する。ここで、R、G、Bについての第2ヒストグラムを夫々第2Rヒストグラム、第2Gヒストグラム、第2Bヒストグラムとする。、
ステップS510では、ステップS501で作成した第1ヒストグラムをステップS507で作成した第2ヒストグラムに基づいて修正して第3ヒストグラムを作成する。具体的には、この実施の形態では、信号値の各階級について、第1ヒストグラムの頻度から、第2ヒストグラムの頻度を所定数(V3)で割った値を減じて、第3のヒストグラムの頻度とする。
【0051】
より具体的には、R、G、Bについての第3ヒストグラムを夫々第3Rヒストグラム、第3Gヒストグラム、第3Bヒストグラムとすると、第3Rヒストグラム、第3Gヒストグラム、第3Bヒストグラムの各階級の頻度は、次式で与えられる。
【0052】
第3Rヒストグラムの頻度=第1Rヒストグラムの頻度−第2Rヒストグラムの頻度/V3
第3Gヒストグラムの頻度=第1Gヒストグラムの頻度−第2Gヒストグラムの頻度/V3
第3Bヒストグラムの頻度=第1Bヒストグラムの頻度−第2Bヒストグラムの頻度/V3
このようにして作成された第3ヒストグラムは、原稿画像中の色(色相、明度、彩度)の偏りを構成する画素の一部又は全部を除去した画像のヒストグラムと等価である。従って、このようにして作成された第3ヒストグラムから平均値、最大値、最小値を算出し、これらに基づいて階調変換曲線(例えば、ネガフィルムの場合は第2階調変換曲線、ポジフィルムの場合は第3階調変換曲線)を作成し、この階調変換曲線に従って階調変換処理を実行することにより、原稿画像中の色の偏りによる色再現性の低下を防止することができる。
【0053】
ここで、V3の値は、任意の固定値としてもよいし、例えばグループ化された画素の個数等に応じて変化させてもよい。
【0054】
また、注目画素(注目画素候補)は、原稿画像中のおける位置に従って決定するのではなく、例えば画素値(信号値)に従って決定してもよい。
【0055】
また、注目画素として、例えば、|TB−TG|、|TG−TB|、|TB−TR|が所定の値(V4)以上の画素を選択してもよく、この場合、原稿画像中の彩度の高い色偏り部が色再現性に与える影響を低減することができる。
【0056】
また、注目画素として、例えば、|TB−TG|、|TG−TB|、|TB−TR|が所定の値(V5)以下の画素を選択してもよく、この場合、ストロボ撮影や逆光撮影に係る背景等の彩度の低い色偏り部が色再現性に与える影響を低減することができる。
【0057】
また、上記の実施の形態では、原稿画像中に実際に存在する画素(注目画素)の色(画素値)に基づいて、該画素に近い色を有する画素をグループ化するが、任意に決定した色(画素値)に近い色(画素値)を有する画素をグループ化してもよい。
【0058】
また、上記の実施の形態では、1つの注目画素に関連付けてグループ化された1つのグループに属する画素について第2ヒストグラムを作成するが、2以上のグループを参照して第2ヒストグラムを作成してもよい。例えば、複数のグループの少なくとも1つに属する画素について第2ヒストグラムを作成する如きである。より具体的な例は、以下の通りである。
【0059】
即ち、|TB−TG|、|TG−TB|、|TB−TR|が所定の値(V4)以上の画素を第1グループとしてグループ化すると共に、|TB−TG|、|TG−TB|、|TB−TR|が所定の値(V5)以下の画素を第2グループとしてグループ化し、第1グループ又は第2グループに属する画素について第2ヒストグラムを作成する。これにより、彩度の高い色偏り部が色再現性に与える影響と彩度の低い色偏り部が色再現性に与える影響の双方を低減し、良好な色再現性を有する出力画像を生成することができる。
【0060】
なお、本発明は、複数の機器(例えば、コンピュータ、インタフェイス、フィルムスキャナ等)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、デジタルカメラ)に適用してもよい。
【0061】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0062】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0063】
【発明の効果】
本発明によれば、例えば、原稿画像等の入力画像に色(例えば、色相、明度、彩度)の偏りのある場合であっても良好な色を再現することができる。
【図面の簡単な説明】
【図1】本発明の好適な実施の形態に係るフィルムスキャナの構成を示す図である。
【図2】デジタル画像処理部108における処理の流れを示すフローチャートである。
【図3】基準階調変換曲線及び第2階調変換曲線の例を示す図である。
【図4】第3階調変換曲線の例を示す図である。
【図5】図2のステップS202のヒストグラムの作成処理の具体例を示すフローチャートである。
【図6】注目画素候補の一例を示す図である。
[0001]
The present invention relates to an image processing apparatus and an image processing method.
[0002]
[Prior art]
The average density of the original image is obtained from the RGB signal read from the transparent original on which the image information is recorded, and the average density for each of R (red), G (green), and B (blue) is determined based on Evans' theorem. A method for adjusting the brightness and color balance of an output image by adjusting the density is known.
[0003]
[Problems to be solved by the invention]
However, the method of adjusting the average density of the original image to a predetermined density based on Evans' theorem assumes that the original image is substantially statistically free of color deviation. Therefore, when there are many pixels indicating a specific color component in the document image, the output image may cause a color cast. Also, when shooting a scene with a large difference in brightness between the main subject and the background, such as nighttime flash photography or backlighting, the main subject brightness is good when the average density of the entire image is referenced. May not be reproduced.
[0004]
The present invention has been made in view of the above-described background. For example, an input image such as a document image reproduces a good color even when the color (for example, hue, brightness, saturation) is uneven. The purpose is to do.
[0005]
[Means for Solving the Problems]
An image processing apparatus according to a first aspect of the present invention relates to an image processing apparatus, and the image processing apparatus includes a difference between a value of a target pixel in an input image and values of all other pixels excluding the target pixel. A calculation unit that calculates the difference, a counting unit that groups pixels whose difference calculated by the calculation unit is less than a predetermined value among all the other pixels, and counts the number of grouped pixels, and the counting unit. Generating means for generating a histogram of an image obtained by removing some or all of the grouped pixels from the pixels constituting the input image when the counting result exceeds a set number; and generating by the generating means A creating means for creating a gradation conversion curve based on the histogram, and a converting means for converting the gradation of the input image according to the gradation conversion curve.
[0006]
A second aspect of the present invention relates to an image processing apparatus, which calculates a difference between all pixel values in an input image and a pixel value of a predetermined color; Among all the other pixels, a pixel whose difference calculated by the calculation unit is less than a predetermined value is grouped, a counting unit that counts the number of grouped pixels, and a count number set by the counting unit And generating means for generating a histogram of an image obtained by removing some or all of the grouped pixels from pixels constituting the input image, and generating a histogram based on the histogram generated by the generating means. Creating means for creating a tone conversion curve; and converting means for converting the gradation of the input image according to the gradation conversion curve.
[0007]
According to a third aspect of the present invention, there is provided an image processing apparatus, wherein the image processing apparatus is configured for each of RGB colors among all the pixels in an input image in which each pixel is configured by RGB color signals. Pixels having a signal value difference equal to or greater than a first predetermined value are grouped as a first group, pixels having a second predetermined value or less are grouped as a second group, and the number of pixels in the first group and the second group A counting means for counting the number of pixels, and the input when the number of pixels in the first group and the number of pixels in the second group counted by the counting means exceed a set number, respectively. Generation means for generating a histogram of an image obtained by removing part or all of the first group of pixels and part or all of the second group of pixels from pixels constituting the image Comprises a generating means for generating gradation conversion curve based on the histogram generated by the generation unit, and a converting means for converting the gray level of the input image according to the gradation conversion curve.
[0008]
A fourth aspect of the present invention relates to an image processing method, and the image processing method calculates a difference between a value of a target pixel in an input image and values of all other pixels excluding the target pixel. And a counting step for grouping pixels whose difference calculated in the calculation step is less than a predetermined value among all the other pixels and counting the number of grouped pixels, and a counting result in the counting step is set. A generation step of generating a histogram of an image obtained by removing some or all of the grouped pixels from the pixels constituting the input image when the number exceeds the number, and based on the histogram generated in the generation step And a conversion step of converting the gradation of the input image according to the gradation conversion curve.
[0009]
A fifth aspect of the present invention relates to an image processing method, and the image processing method calculates a difference between the values of all pixels in the input image and the values of pixels of a predetermined color; A counting step for grouping pixels whose difference calculated in the calculation step is less than a predetermined value among all the other pixels and counting the number of the grouped pixels, and a number in which the counting result in the counting step is set A generation step of generating a histogram of an image obtained by removing some or all of the grouped pixels from the pixels constituting the input image, and a step based on the histogram generated in the generation step. The method includes a creation step of creating a tone conversion curve, and a conversion step of converting the gradation of the input image according to the gradation conversion curve.
[0010]
According to a sixth aspect of the present invention, there is provided an image processing method, wherein the image processing method is configured for each of RGB colors among all the pixels in an input image in which each pixel is composed of RGB color signals. Pixels having a signal value difference equal to or greater than a first predetermined value are grouped as a first group, pixels having a second predetermined value or less are grouped as a second group, and the number of pixels in the first group and the second group A counting step for counting the number of pixels, and the input when the number of pixels in the first group and the number of pixels in the second group counted in the counting step exceed a set number, respectively. Generating process for generating a histogram of an image obtained by removing a part or all of the first group of pixels and a part or all of the second group of pixels from pixels constituting the image If, comprising a creation step of creating a tone conversion curve based on the histogram generated in the generating step, a conversion step of converting the gradation of the input image according to the gradation conversion curve.
[0011]
In the image processing apparatus according to the first aspect of the present invention, for example, the counting unit preferably counts pixels having a color close to a preset color.
[0012]
In the image processing apparatus according to the first aspect of the present invention, for example, the input image is composed of RGB signals, and the counting means counts based on a difference in signal values of each color of RGB. It is preferable to determine the pixel to be.
[0013]
In the image processing apparatus according to the first aspect of the present invention, for example, the input image is composed of RGB signals, and the counting unit determines a pixel of interest based on a difference between RGB signal values. It is preferable to count pixels having a color close to the color of the target pixel.
[0014]
In the image processing device according to the first aspect of the present invention, for example, the counting means sets a pixel of saturation in the input image as a pixel of interest by setting a pixel whose difference between RGB signals exceeds a predetermined value as a target pixel. It is preferable to count high pixels.
[0015]
In the image processing device according to the first aspect of the present invention, for example, the counting means sets a pixel in which the difference between RGB signals is less than a predetermined value as a pixel of interest, and thereby saturation in the input image. It is preferable to count low pixels.
[0016]
In the image processing apparatus according to the first aspect of the present invention, for example, the counting means sets a pixel whose color difference of RGB signals exceeds a first reference value as a first target pixel, and is less than a second reference value. It is preferable to count pixels with high and low saturation in the input image by setting a certain pixel as the second pixel of interest.
[0017]
In the image processing apparatus according to the first aspect of the present invention, it is preferable that the image processing apparatus further includes, for example, an imaging unit that captures an image and uses the input image.
[0018]
In the image processing apparatus according to the first aspect of the present invention, for example, the imaging unit preferably includes an imaging element that reads an image formed on the imaging surface.
[0019]
In the image processing apparatus according to the first aspect of the present invention, for example, the imaging unit preferably further includes an optical system that forms an image on the imaging surface.
[0020]
In the image processing apparatus according to the first aspect of the present invention, it is preferable that, for example, in the imaging unit, the optical system forms an image of a transmission original on the imaging surface.
[0021]
In the image processing apparatus according to the first aspect of the present invention, for example, the transparent original is preferably a film.
[0022]
The image processing method according to the second aspect of the present invention includes a counting step of counting pixels having colors close to each other in an input image, and a histogram of pixel values constituting the input image according to a counting result in the counting step. And generating a histogram appropriately modified, and a processing step of processing the input image based on the histogram generated in the generation step.
[0023]
A memory medium according to a third aspect of the present invention is a memory medium storing an image processing program for controlling an image processing apparatus, and the image processing program counts pixels having colors close to each other in an input image. A generating step for generating a histogram in which a histogram of pixel values constituting the input image is appropriately modified according to a counting result in the counting step, and the input based on the histogram generated in the generating step. And a processing step of processing the image.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
The present invention can be applied to an image processing apparatus such as a film scanner, a digital camera, or a computer. Hereinafter, an example in which the present invention is applied to a film scanner will be described as a preferred embodiment of the present invention.
[0025]
FIG. 1 is a diagram showing a configuration of a film scanner according to a preferred embodiment of the present invention. 101 is an illumination light source that illuminates the film, and 102 is a film folder that holds the film. For example, the film is held by sandwiching a non-image part (for example, perforation part) of the film from the front and back, and the direction of arrow A Driven by.
[0026]
Reference numeral 103 denotes an imaging lens (optical system) that forms an image on the imaging surface of a CCD linear image sensor (hereinafter simply referred to as CCD) 104 through light transmitted through a film (transmission original) irradiated by the illumination light source 101. An optical unit 105 includes an optical component group including an imaging lens 103 and a CCD 104 (for example, a mirror or the like may be included). The CCD 104 is arranged so that its longitudinal direction coincides with the Z direction. Due to this positional relationship, the main scanning direction which is the longitudinal direction of the CCD 104 and the sub-scanning direction which is the moving direction of the film folder 102 are perpendicular to each other. The optical unit 105 is driven in the lens optical axis direction (B direction) when performing focus adjustment.
[0027]
Reference numeral 106 denotes an analog image processing circuit that performs gain setting and clamping processing of the analog image signal output from the CCD 104, and reference numeral 107 denotes an A / D converter that converts the analog signal into a digital signal.
[0028]
Reference numeral 108 denotes a digital image processing circuit, which includes a histogram creation unit 109 that creates a histogram from a digital input signal, and a tone conversion curve that creates a tone conversion curve for converting the input signal by negative / positive conversion and tone conversion. And a creation unit 110. The digital image processing circuit 108 further includes a gamma conversion unit, various filter processing units, a CCD drive pulse generation unit, and the like. The digital image processing unit 108 can be configured by a gate array, for example.
[0029]
Reference numeral 111 denotes a line buffer for temporarily storing image data, and reference numeral 112 denotes an external interface unit for connection with an external device 113 such as a personal computer.
[0030]
Reference numeral 115 denotes a CPU as a system controller that controls the overall operation of the film scanner 100 based on predetermined software, and reference numeral 114 connects the CPU 115 to the image processing unit 108, the line buffer 111, and the interface unit 112. The CPU bus is composed of an address bus, a data bus, and a control bus.
[0031]
Reference numeral 121 denotes a sub-scanning motor for moving the film folder 102 in the sub-scanning direction (arrow A direction), for example, a stepping motor. Reference numeral 118 denotes a sub-scanning motor driver for driving the sub-scanning motor 121 in accordance with a command from the system controller 115.
[0032]
Reference numeral 116 denotes a focus motor for moving the optical unit 105 in the lens optical axis direction (arrow B direction), for example, a stepping motor. Reference numeral 117 denotes a focus motor driver for driving the focus motor 116 in accordance with a command from the system controller 115.
[0033]
In such a configuration, the film scanner 100 reads the film from the film scanner 100 to the external device 200 by communication between the software (firmware software) in the system controller 115 and software (driver software) for operating the film scanner from the external device 113. The image is transferred.
[0034]
For example, the invention applied to the film scanner 100 can be applied to a digital camera by changing the optical system unit 105 so that a subject image is formed on the imaging surface of the CCD 104. For example, the image processing unit 108 can be incorporated in a digital camera or a computer.
[0035]
Hereinafter, processing in the digital image processing unit 108 of the film scanner 100 will be described. FIG. 2 is a flowchart showing the flow of processing in the digital image processing unit 108. The digital image processing unit 108 includes, for example, a CPU and a nonvolatile memory, and is controlled by the CPU according to software installed in the memory from the external device 200, for example. This software can be provided to the external device 200 by being stored in, for example, a distributable memory medium (for example, a floppy disk, a CD-ROM, etc.).
[0036]
In step S <b> 201, the digital image processing unit 108 takes in the RGB signal for each pixel that has been A / D converted from the A / D conversion unit 107. In step S202, a histogram including the class and frequency of the signal value for each RGB color is created from the RGB signal value for each pixel. In step S203, the average value, the maximum value, and the minimum value of the signal values are calculated for each color of RGB based on the histogram for each color. Here, the minimum value may be the smallest signal value with a frequency of a predetermined ratio (for example, 1%) or more, and the maximum value may be the largest signal value with the frequency within a predetermined ratio (for example, 99%). Yes, but there is no limit to the rate of frequency.
[0037]
In step S204, a gain is calculated for each color of RGB using the average value, maximum value, and minimum value calculated in step S203. Here, the gain is an amplification factor when an input signal is amplified in order to reproduce an output image having an appropriate brightness (an output image having a predetermined density) based on Evans' theorem.
[0038]
In step S205, the second tone conversion curve for each color of RGB that is adapted to the original image (film image) by superimposing the gain for each color on the reference tone conversion curve set in advance for each color of RGB. Create In FIG. 3, 301 is an example of a reference gradation conversion curve, and 302 is an example of a second gradation conversion curve.
[0039]
In step S206, a negative / positive conversion process is performed on the input RGB signal using the second gradation conversion curve for each color created in step S205.
[0040]
In step S207, a histogram including the class and frequency of signal values is created from the RGB signals after negative / positive conversion. In addition, when reading the image of a positive film, the process of step S203-S207 is unnecessary, for example.
[0041]
In step S208, the maximum value and the minimum value of the signal value are calculated based on the histogram of the positive RGB signal by the same method as in step S203. In step S209, the shadow reference signal value and the highlight reference signal value are determined based on the maximum value and the minimum value calculated in step S208. In step S210, a third gradation conversion curve having a linear portion connecting the shadow reference signal value and the highlight reference signal value is created. 401 in FIG. 4 is an example of a third gradation conversion curve.
[0042]
In step S211, using the third tone conversion curve, tone conversion processing is performed on the positive RGB signal generated in step S206 and transferred to the external device 200 via the line buffer 111 and the interface 112. To do.
[0043]
FIG. 5 is a flowchart showing a specific example of the histogram creation processing in step S202.
[0044]
First, in step S501, a first histogram including a class of signal values and a frequency is generated for each color of RGB for all pixels constituting the document image. Here, the first histograms for R, G, and B are referred to as a first R histogram, a first G histogram, and a first B histogram, respectively. ,
In step S502, R, G, and B signal values TR, TG, and TB are stored with a pixel selected from a plurality of target image candidates in the document image as a target pixel. In step S503, the differences | TR-OR |, | TG-OG |, | TB-OB | of the RGB signal values OR, OG, OB of other pixels constituting the original image and TR, TG, TB are set to the respective colors. Calculate every time. Whether or not | TR-OR |, | TG-OG |, | TB-OB | are less than predetermined values V1R, V1G, and V1B, that is, | TR-OR | <V1R and | TG It is determined whether −OG | <V1G and | TB−OB | <V1B. If the determination result is YES, the process proceeds to step S505, and if the determination result is NO, the process proceeds to step S511. Here, the determination result is YES that the pixel value of the pixel is close to the pixel value of the target pixel, that is, the color (hue, lightness, saturation) of the pixel is close to the color of the target pixel. means.
[0045]
In step S505, an address of the pixel (that is, a pixel having a color close to the target pixel) is stored in association with the target pixel, thereby grouping pixels having a color close to the target pixel.
[0046]
In step S506, it is determined whether or not the processing in steps S503 to S505 has been executed for all the pixels. If the processing has been completed for all the pixels, the process proceeds to step S507. If unprocessed pixels remain, step S511 is performed. Then, the comparison pixel is switched to another unprocessed pixel, and steps S503 to S506 are executed.
[0047]
In step S507, the number of pixels whose color is close to that of the target pixel, that is, the number of pixels grouped in association with the target pixel is counted, and it is determined whether or not the count number is greater than a predetermined value (V2). Here, that the count value is larger than V2 means that there are more pixels whose color is close to that of the target pixel than V2, that is, there is a color deviation in the document image. On the other hand, a count value of V2 or less means that a pixel whose color is close to that of the target pixel is V2 or less, that is, the document image is not biased to a color close to the target pixel.
[0048]
If it is determined in step S507 that the count value is not greater than V2, that is, if it is determined that the document image is not biased to a color close to the target pixel, the above processing ends for all target pixel candidates in step S508. If there is any unprocessed target pixel candidate remaining, the process proceeds to step S512, and the processes of steps S502 to S507 and S511 are repeated with the unprocessed target pixel candidate as the target pixel.
[0049]
Here, all the pixels can be set as the target pixel candidates. However, in this case, since the calculation time is enormous, for example, it is preferably several to several hundreds so as to be approximately uniformly distributed over the entire surface of the original image. It is preferable to determine a target pixel candidate of about several degrees, more preferably about several tens. FIG. 6 is a diagram illustrating an example of a target pixel candidate.
[0050]
If it is determined in step S507 that the count value is greater than V2, that is, if it is determined that the document image is biased to a color close to the target pixel, the process proceeds to step S509. In step S509, a second histogram including the class and frequency of the signal values of the pixels grouped in association with the target pixel is created for each color of RGB. Here, the second histogram for R, G, and B is a second R histogram, a second G histogram, and a second B histogram, respectively. ,
In step S510, the first histogram created in step S501 is modified based on the second histogram created in step S507 to create a third histogram. Specifically, in this embodiment, for each class of signal values, the frequency of the third histogram is subtracted from the frequency of the first histogram by subtracting the value obtained by dividing the frequency of the second histogram by a predetermined number (V3). And
[0051]
More specifically, if the third histograms for R, G, and B are the 3R histogram, the 3G histogram, and the 3B histogram, respectively, the frequencies of the classes of the 3R histogram, the 3G histogram, and the 3B histogram are as follows: It is given by
[0052]
Frequency of third R histogram = frequency of first R histogram−frequency of second R histogram / V3
Frequency of 3G histogram = frequency of 1G histogram−frequency of 2G histogram / V3
Frequency of 3B histogram = frequency of 1B histogram−frequency of 2B histogram / V3
The third histogram created in this way is equivalent to a histogram of an image from which some or all of the pixels constituting the color (hue, lightness, saturation) in the original image are removed. Therefore, an average value, a maximum value, and a minimum value are calculated from the third histogram created in this way, and a gradation conversion curve (for example, in the case of a negative film, a second gradation conversion curve, a positive film) is calculated based on these values. In this case, a third gradation conversion curve) is created, and gradation conversion processing is executed according to this gradation conversion curve, so that it is possible to prevent a decrease in color reproducibility due to color deviation in the document image.
[0053]
Here, the value of V3 may be an arbitrary fixed value, or may be changed according to, for example, the number of grouped pixels.
[0054]
Further, the target pixel (target pixel candidate) may be determined according to the pixel value (signal value), for example, instead of being determined according to the position in the document image.
[0055]
Further, for example, a pixel having | TB-TG |, | TG-TB |, | TB-TR | of a predetermined value (V4) or more may be selected as the target pixel. It is possible to reduce the influence of the high color deviation portion on the color reproducibility.
[0056]
Further, as the target pixel, for example, a pixel having | TB-TG |, | TG-TB |, | TB-TR | may be a predetermined value (V5) or less may be selected. The influence of the low color saturation portion such as the background on the color reproducibility can be reduced.
[0057]
In the above embodiment, pixels having colors close to the pixel are grouped on the basis of the color (pixel value) of the pixel actually present in the document image (target pixel). Pixels having a color (pixel value) close to the color (pixel value) may be grouped.
[0058]
In the above embodiment, the second histogram is created for pixels belonging to one group grouped in association with one target pixel. However, the second histogram is created by referring to two or more groups. Also good. For example, a second histogram is created for pixels belonging to at least one of a plurality of groups. A more specific example is as follows.
[0059]
That is, | TB-TG |, | TG-TB |, | TB-TR | are grouped as pixels having a predetermined value (V4) or more as a first group, and | TB-TG |, | TG-TB | , | TB-TR | is grouped as a second group of pixels having a predetermined value (V5) or less, and a second histogram is created for the pixels belonging to the first group or the second group. As a result, both the influence of the highly saturated color deviation portion on the color reproducibility and the influence of the low saturation color deviation portion on the color reproducibility are reduced, and an output image having good color reproducibility is generated. be able to.
[0060]
The present invention may be applied to a system constituted by a plurality of devices (for example, a computer, an interface, a film scanner, etc.) or an apparatus (for example, a digital camera) composed of a single device. .
[0061]
Another object of the present invention is to supply a storage medium (or recording medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (or CPU or CPU) of the system or apparatus. Needless to say, this can also be achieved by the MPU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0062]
Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is determined based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0063]
【The invention's effect】
According to the present invention, for example, even when an input image such as a document image has a color (for example, hue, brightness, saturation) deviation, a good color can be reproduced.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a film scanner according to a preferred embodiment of the present invention.
FIG. 2 is a flowchart showing a flow of processing in the digital image processing unit.
FIG. 3 is a diagram illustrating an example of a reference gradation conversion curve and a second gradation conversion curve.
FIG. 4 is a diagram illustrating an example of a third gradation conversion curve.
FIG. 5 is a flowchart showing a specific example of histogram creation processing in step S202 of FIG.
FIG. 6 is a diagram illustrating an example of a target pixel candidate.

Claims (7)

入力画像中の注目画素の値と前記注目画素を除く他の全ての画素の値との差を算出する算出手段と、
前記他の全ての画素のうち前記算出手段によって算出された差が所定値未満の画素をグループ化し、グループ化した画素の個数を計数する計数手段と、
前記計数手段による計数結果が設定された数を超えている場合に、前記入力画像を構成する画素から前記グループ化した画素の一部または全部を除去した画像のヒストグラムを生成する生成手段と、
前記生成手段により生成されたヒストグラムに基づいて階調変換曲線を作成する作成手段と、
前記階調変換曲線に従って前記入力画像の階調を変換する変換手段と、を備えることを特徴とする画像処理装置。
Calculating means for calculating a difference between a value of a target pixel in the input image and values of all other pixels excluding the target pixel;
Counting means for grouping pixels whose difference calculated by the calculating means is less than a predetermined value among all the other pixels, and counting the number of grouped pixels ;
Generating means for generating a histogram of an image obtained by removing a part or all of the grouped pixels from the pixels constituting the input image when the counting result by the counting means exceeds a set number ;
Creating means for creating a gradation conversion curve based on the histogram generated by the generating means ;
An image processing apparatus comprising: conversion means for converting the gradation of the input image according to the gradation conversion curve .
前記入力画像は、RGB信号により構成されており、前記注目画素は、RGBのそれぞれの色の信号値の差に基づいて決定されることを特徴とする請求項1に記載の画像処理装置。The input image is composed of RGB signals, the pixel of interest, the image processing apparatus according to claim 1, characterized in Rukoto is determined based on the difference in the respective color signal value of RGB. 入力画像中の全ての画素の値と予め決定された色の画素の値との差を算出する算出手段と、Calculation means for calculating a difference between the values of all pixels in the input image and the values of pixels of a predetermined color;
前記他の全ての画素のうち前記算出手段によって算出された差が所定値未満の画素をグループ化し、グループ化した画素の個数を計数する計数手段と、Counting means for grouping pixels whose difference calculated by the calculating means is less than a predetermined value among all the other pixels, and counting the number of grouped pixels;
前記計数手段による計数結果が設定された数を超えている場合に、前記入力画像を構成する画素から前記グループ化した画素の一部または全部を除去した画像のヒストグラムを生成する生成手段と、Generating means for generating a histogram of an image obtained by removing a part or all of the grouped pixels from pixels constituting the input image when the counting result by the counting means exceeds a set number;
前記生成手段により生成されたヒストグラムに基づいて階調変換曲線を作成する作成手段と、Creating means for creating a gradation conversion curve based on the histogram generated by the generating means;
前記階調変換曲線に従って前記入力画像の階調を変換する変換手段と、を備えることを特徴とする画像処理装置。An image processing apparatus comprising: conversion means for converting the gradation of the input image according to the gradation conversion curve.
各画素がRGBのそれぞれの色の信号により構成される入力画像中の全ての画素のうちRGBのそれぞれの色の信号の値の差が第1所定値以上の画素を第1グループとしてグループ化し、第2所定値以下の画素を第2グループとしてグループ化し、前記第1グループの画素の個数および前記第2グループの画素の個数をそれぞれ計数する計数手段と、
前記計数手段によって計数された前記第1グループの画素の個数および前記第2グループの画素の個数がそれぞれ設定された数を超えている場合に、前記入力画像を構成する画素から前記第1グループの画素の一部または全部および前記第2グループの画素の一部または全部を除去した画像のヒストグラムを生成する生成手段と、
前記生成手段により生成されたヒストグラムに基づいて階調変換曲線を作成する作成手段と、
前記階調変換曲線に従って前記入力画像の階調を変換する変換手段と、を備えることを特徴とする画像処理装置。
Grouping, as a first group, pixels in which the difference in signal value of each RGB color is greater than or equal to a first predetermined value among all the pixels in the input image in which each pixel is composed of RGB color signals, Counting means for grouping pixels having a second predetermined value or less as a second group and counting the number of pixels of the first group and the number of pixels of the second group;
When the number of pixels of the first group and the number of pixels of the second group counted by the counting unit exceed a set number, the pixels of the input image Generating means for generating a histogram of an image from which part or all of the pixels and part or all of the pixels of the second group are removed;
Creating means for creating a gradation conversion curve based on the histogram generated by the generating means;
An image processing apparatus comprising: conversion means for converting the gradation of the input image according to the gradation conversion curve.
入力画像中の注目画素の値と前記注目画素を除く他の全ての画素の値との差を算出する算出工程と、
前記他の全ての画素のうち前記算出工程において算出された差が所定値未満の画素をグループ化し、グループ化した画素の個数を計数する計数工程と、
前記計数工程における計数結果が設定された数を超えている場合に、前記入力画像を構成する画素から前記グループ化した画素の一部または全部を除去した画像のヒストグラムを生成する生成工程と、
前記生成工程において生成されたヒストグラムに基づいて階調変換曲線を作成する作成工程と、
前記階調変換曲線に従って前記入力画像の階調を変換する変換工程と、を含むことを特徴とする画像処理方法。
A calculation step of calculating a difference between the value of the target pixel in the input image and the values of all other pixels excluding the target pixel;
A counting step of grouping pixels whose difference calculated in the calculation step is less than a predetermined value among all the other pixels and counting the number of grouped pixels;
A generating step of generating a histogram of an image obtained by removing a part or all of the grouped pixels from the pixels constituting the input image when the counting result in the counting step exceeds a set number;
A creation step of creating a gradation conversion curve based on the histogram generated in the generation step;
A conversion step of converting the gradation of the input image according to the gradation conversion curve.
入力画像中の全ての画素の値と予め決定された色の画素の値との差を算出する算出工程と、
前記他の全ての画素のうち前記算出工程において算出された差が所定値未満の画素をグループ化し、グループ化した画素の個数を計数する計数工程と、
前記計数工程における計数結果が設定された数を超えている場合に、前記入力画像を構成する画素から前記グループ化した画素の一部または全部を除去した画像のヒストグラムを生成する生成工程と、
前記生成工程において生成されたヒストグラムに基づいて階調変換曲線を作成する作成工程と、
前記階調変換曲線に従って前記入力画像の階調を変換する変換工程と、を含むことを特徴とする画像処理方法。
A calculation step of calculating a difference between values of all pixels in the input image and values of pixels of a predetermined color;
A counting step of grouping pixels whose difference calculated in the calculation step is less than a predetermined value among all the other pixels and counting the number of grouped pixels;
A generating step of generating a histogram of an image obtained by removing a part or all of the grouped pixels from the pixels constituting the input image when the counting result in the counting step exceeds a set number;
A creation step of creating a gradation conversion curve based on the histogram generated in the generation step;
A conversion step of converting the gradation of the input image according to the gradation conversion curve.
各画素がRGBのそれぞれの色の信号により構成される入力画像中の全ての画素のうちRGBのそれぞれの色の信号の値の差が第1所定値以上の画素を第1グループとしてグループ化し、第2所定値以下の画素を第2グループとしてグループ化し、前記第1グループの画素の個数および前記第2グループの画素の個数をそれぞれ計数する計数工程と、
前記計数工程において計数された前記第1グループの画素の個数および前記第2グループの画素の個数がそれぞれ設定された数を超えている場合に、前記入力画像を構成する画素から前記第1グループの画素の一部または全部および前記第2グループの画素の一部または全部を除去した画像のヒストグラムを生成する生成工程と、
前記生成工程において生成されたヒストグラムに基づいて階調変換曲線を作成する作成工程と、
前記階調変換曲線に従って前記入力画像の階調を変換する変換工程と、を含むことを特徴とする画像処理方法。
Grouping, as a first group, pixels in which the difference in signal value of each RGB color is greater than or equal to a first predetermined value among all the pixels in the input image in which each pixel is composed of RGB color signals, A counting step of grouping pixels having a second predetermined value or less as a second group, and counting the number of pixels of the first group and the number of pixels of the second group, respectively;
When the number of pixels of the first group and the number of pixels of the second group counted in the counting step exceed a set number, the pixels of the input image Generating a histogram of an image in which part or all of the pixels and part or all of the pixels of the second group are removed;
A creation step of creating a gradation conversion curve based on the histogram generated in the generation step;
A conversion step of converting the gradation of the input image according to the gradation conversion curve.
JP26626599A 1999-09-20 1999-09-20 Image processing apparatus and image processing method Expired - Fee Related JP4143232B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26626599A JP4143232B2 (en) 1999-09-20 1999-09-20 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26626599A JP4143232B2 (en) 1999-09-20 1999-09-20 Image processing apparatus and image processing method

Publications (3)

Publication Number Publication Date
JP2001094805A JP2001094805A (en) 2001-04-06
JP2001094805A5 JP2001094805A5 (en) 2006-11-02
JP4143232B2 true JP4143232B2 (en) 2008-09-03

Family

ID=17428583

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26626599A Expired - Fee Related JP4143232B2 (en) 1999-09-20 1999-09-20 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP4143232B2 (en)

Also Published As

Publication number Publication date
JP2001094805A (en) 2001-04-06

Similar Documents

Publication Publication Date Title
JP4466261B2 (en) Imaging apparatus, brightness correction method, and program
JP4955235B2 (en) Digital camera and gain calculation method
WO2017101451A1 (en) Imaging method, imaging device, and electronic device
JP2003533917A (en) Scanner with paperless scaling mode
US20060164525A1 (en) History adding device for generating history-added image file, electronic camera, and image processing program for processing history-added image file
JP4433883B2 (en) White balance correction device, white balance correction method, program, and electronic camera device
US20030179949A1 (en) Method, apparatus and program for image processing
JP4143232B2 (en) Image processing apparatus and image processing method
JP2004023737A (en) Image processing apparatus and method thereof
JP3501960B2 (en) Image display control apparatus and method
JP3222803B2 (en) Image reading device
JP3064948B2 (en) An electronic camera that can change the compression ratio of image information
JP2006203571A (en) Imaging apparatus, image processing apparatus, and image recording apparatus
JP4347181B2 (en) Solid-state imaging device
JP4154102B2 (en) Image processing apparatus and image processing method
JPH10210355A (en) Digital camera
JPH11266370A (en) Method and device for adjusting white balance
KR100338073B1 (en) Color Image Scanning Method Using Mono Image Sensor
JP3411791B2 (en) Image reading device
JPS616978A (en) Digital picture processor
JP2003533918A (en) Scanner with prepress mode
JP2002176584A (en) Method and device for automatic exposure correction
JP2004040379A (en) Image processing apparatus, image processing program, and digital camera
JP2004222162A (en) Image composition method and digital camera
JP2000242777A (en) Image processor, image processing method, and computer readable storage medium

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060914

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060914

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20060914

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080305

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080314

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080513

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080616

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110620

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

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120620

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130620

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees