JP2009038582A - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP2009038582A JP2009038582A JP2007200916A JP2007200916A JP2009038582A JP 2009038582 A JP2009038582 A JP 2009038582A JP 2007200916 A JP2007200916 A JP 2007200916A JP 2007200916 A JP2007200916 A JP 2007200916A JP 2009038582 A JP2009038582 A JP 2009038582A
- Authority
- JP
- Japan
- Prior art keywords
- processing
- image processing
- image
- correction
- coefficient
- 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
Landscapes
- Processing Of Color Television Signals (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
- Image Processing (AREA)
- Picture Signal Circuits (AREA)
Abstract
Description
本発明は、複数の画像処理を施す画像処理装置および方法に関するものである。 The present invention relates to an image processing apparatus and method for performing a plurality of image processing.
ここ数年におけるパーソナルコンピュータの性能向上により、大容量のファイルでさえも容易にかつ高速に扱えるようになった。一般に容量の大きいとされる写真調の自然画像もより多くの人が取り扱うようになってきている。それに加えデジタルカメラやスキャナに代表される入力機器も普及してきたため、さまざまな画像のデジタル化が行われるようになった。 The performance of personal computers over the last few years has made it easier and faster to handle even large files. More and more people are handling photographic-like natural images, which are generally considered to have a large capacity. In addition, input devices represented by digital cameras and scanners have become widespread, and various images have been digitized.
一口に写真画像といってもその中にはプロの撮影した高画質の画像から、あまり品位の良くない画像まで様々である。ここで言う品位の良くない画像とは露出のオーバーしているものやアンダーしているもの、画像全体に色味のつく色かぶりを起こしている画像等である。一般に悪い画像がつくられる原因として考えられるのは、撮影時の光量が適正でないことや蛍光燈下での撮影といった撮影条件によるものと、デジタルカメラのノイズや特性といったデジタル化処理の際に起こる画像の劣化等が挙げられる。これら品位の悪い画像はデジタル化処理をしてパーソナルコンピュータ等に取り込んだ後、補正を施すことによって画像品位を上げることが可能である。 There are various types of photographic images, from high-quality images taken by professionals to images with poor quality. An image with poor quality referred to here is an image that is overexposed or underexposed, an image that causes a tinted color cast on the entire image, and the like. In general, the possible causes of bad images are due to inadequate light intensity during shooting, shooting conditions such as shooting under fluorescent light, and images generated during digitization such as noise and characteristics of digital cameras. Deterioration, etc. These poor quality images can be improved by digitizing the image and taking it into a personal computer or the like and then performing correction.
こうした補正処理は、画像をレタッチするアプリケーションやプリンタに代表される記録装置のドライバの機能として付属しているのが一般的であった。 Such correction processing is generally attached as a function of an application for retouching an image or a driver of a printing apparatus represented by a printer.
昨今、デジタルカメラとプリンタを直接接続し、記録処理を行うPictBridge(登録商標)の規格策定や、カードスロットを持ったプリンタの登場により、画像をPC経由しないで記録する使い方が、広がってきている。こうした背景から、PCを介さないNonPC環境のプリントにおいても、PCのアプリケーションやプリンタドライバと同様な補正処理の実現が求められているのが現状である。 In recent years, with the development of PictBridge (registered trademark) standards in which a digital camera and a printer are directly connected to perform recording processing, and the appearance of printers with card slots, the usage of recording images without going through a PC has become widespread. . Under such circumstances, even in printing in a non-PC environment without using a PC, it is currently required to realize correction processing similar to that of a PC application or printer driver.
一般にPCのCPU能力やメモリ容量、バススピードなどのシステム環境に比べ、プリンタのそれらは大きく劣るものである。これによるパフォーマンス低下を防ぐために、特許文献4ではプリンタ動作のためのCPUのほか、画像処理専用のプロセッサを使用することにより対処を行っている。このほか、高速アクセス可能なメモリの採用、バススピードの高速化、専用ASICの搭載などによっても、画像処理時間の短縮を図ることが可能である。しかし、これら高速化を行うことはコストがかり、最終的にはユーザーにとっての負担となってしまう。つまり、高速化とコストアップは、トレードオフの関係となっている。 In general, printers are significantly inferior to system environments such as PC CPU capacity, memory capacity, and bus speed. In order to prevent performance degradation due to this, Japanese Patent Application Laid-Open No. 2004-151867 takes measures by using a processor dedicated to image processing in addition to a CPU for printer operation. In addition, it is possible to shorten the image processing time by adopting a memory that can be accessed at high speed, increasing the bus speed, and mounting a dedicated ASIC. However, these speeding-ups are costly and ultimately burden the user. In other words, speeding up and cost increase are in a trade-off relationship.
一方、画像補正については、様々な提案がされているが、一般的にこれら補正処理では、補正を施すための補正量を算出する補正量決定部と、求められた補正量に基づいて補正を実行する補正実行部に分けられる。 On the other hand, various proposals have been made for image correction. Generally, in these correction processes, a correction amount determination unit that calculates a correction amount for performing correction, and correction based on the obtained correction amount. It is divided into correction execution units to be executed.
そのうちの補正量決定部では、処理内容により大きく2つに分類できる。一つは画像の累積データを生成し、それを基に補正量を決定する方法と、画像内の特定部分の特徴量を抽出し、その値により補正を行う処理である。 Among them, the correction amount determination unit can be roughly classified into two types according to the processing contents. One is a method of generating accumulated data of an image and determining a correction amount based on the generated data, and a process of extracting a feature amount of a specific part in the image and performing correction based on the value.
前者の累積データを使用する補正方法として、特開2000−13624号公報、特開2000−13616号公報が挙げられる。この処理では、ホワイトバランスの設定が不十分であったり露出が最適でなかったりする画像に対して色かぶりおよびレベル補正が実行されている。補正量を求める累積処理としては、画素毎の輝度値を累積しヒストグラムを作成し、それに基づいて補正の必要有無を判定および補正量の決定を行う。図1(a)に示すような生成された輝度ヒストグラムを図1(b)のように修正するような輝度変換処理を実行することにより補正を実行する。図1(a)のHL、SD点に相当する輝度値の平均色相を算出し、それらが無彩色になるような変換係数を求め、それを施すことにより、適切なグレーバランスを実現している。 JP-A 2000-13624 and JP-A 2000-13616 can be cited as correction methods using the former accumulated data. In this process, color cast and level correction are performed on an image for which white balance setting is insufficient or exposure is not optimal. As the accumulation process for obtaining the correction amount, the luminance value for each pixel is accumulated to create a histogram, and based on this, the necessity of correction is determined and the correction amount is determined. Correction is executed by executing a luminance conversion process for correcting the generated luminance histogram as shown in FIG. 1A as shown in FIG. Appropriate gray balance is realized by calculating an average hue of luminance values corresponding to the HL and SD points in FIG. 1A, obtaining conversion coefficients so that they become achromatic colors, and applying them. .
また、さらに画像をより好適にするコントラスト補正、彩度補正も可能である。取得した輝度ヒストグラムの分布から、S字カーブなどの輝度変換量を決定し、コントラスト補正を行ったり、画像の平均彩度から補正係数量を算出し、画像の色差成分に補正係数を乗じたりすることにより、各補正が行われる。 Further, contrast correction and saturation correction that make the image more suitable are also possible. From the acquired luminance histogram distribution, a luminance conversion amount such as an S-shaped curve is determined and contrast correction is performed, or a correction coefficient amount is calculated from the average saturation of the image, and the color difference component of the image is multiplied by the correction coefficient. Thus, each correction is performed.
一方、後者の特定部分の抽出を行う処理としては、主に人肌など画像の主要部分となる検出処理が一般的である。特登録3203946号公報は、テレビのような映像信号の補正であるが、色差信号と輝度信号から肌色平均輝度レベルを検出し、全画像の輝度レベルの関連でガンマ補正回路に制御信号を加えるものである。 On the other hand, the latter process of extracting a specific part is generally a detection process that is mainly a main part of an image such as human skin. Japanese Patent No. 3203946 is a correction of a video signal such as a television, but detects a skin color average luminance level from a color difference signal and a luminance signal, and adds a control signal to a gamma correction circuit in relation to the luminance level of all images. It is.
この特定部分抽出を伴う処理においては、その部位を検出する検出率が非常に重要となる。検出率が悪いと、補正が適用されないばかりか、誤った補正係数が設定されてしまい、かえって画像を悪化させる場合も発生してしまう。特登録3203946の肌色検出では、輝度・色差成分に分解されている信号値のうち、色差信号を利用して、肌色部分を検出している。 In the process involving extraction of the specific part, the detection rate for detecting the part is very important. If the detection rate is low, not only the correction is not applied, but an incorrect correction coefficient is set, and the image may be deteriorated. In the skin color detection of special registration 3203946, a skin color portion is detected by using a color difference signal among signal values decomposed into luminance and color difference components.
また、別の手段として人肌部分を検出する際、色による判定を下記式(4) Moreover, when detecting a human skin part as another means, the determination by a color is represented by following formula (4).
ローバスフィルタの一例としては、一般的な平均値フィルタやメディアンフィルタなどの平滑化フィルタが挙げられる。フィルタサイズとしては、3x3や5x5と言った固定サイズでも構わないし、検出した人肌領域の大きさに応じてダイナミックに変えて行く方法でも構わない。 As an example of the low-pass filter, a smoothing filter such as a general average value filter or a median filter can be given. The filter size may be a fixed size such as 3 × 3 or 5 × 5, or may be a method of changing dynamically according to the size of the detected human skin area.
また、画像全体に平滑化フィルタをかけ、人肌部分での平滑化強度を変えることで、全体のノイズを除去し、さらに人肌も滑らかにする補正も可能である。平滑化の強度を変える方法としては、フィルタの係数を切り替えることで実現出来る。 Further, by applying a smoothing filter to the entire image and changing the smoothing strength in the human skin part, it is possible to correct the noise by removing the entire noise and further smoothing the human skin. A method of changing the smoothing intensity can be realized by switching the coefficient of the filter.
以上、述べたようにNonPCでの印刷するにおいても、単に印字を行うだけでなく、色被り除去、逆光補正などの肌補正、ノイズ除去と言った画像の補正・加工といったデジタルならではの利点を反映するようになっている。 As described above, when printing with NonPC, as well as performing printing, it reflects the benefits of digital technology such as image correction and processing such as color correction, skin correction such as backlight correction, and noise reduction. It is supposed to be.
また、従来の技術として、最近の特徴的な傾向となっているNonPCの例を挙げたが、画像補正については、PCで同様の処理が可能であることは言うまでもない。
上述した従来の技術の中で、特定部分の検出を行って処理を加えるものを記述したが、もともとの画像が色被りを起こしている場合やノイズが多く出ている場合などは、特定部分の検出の際に誤検出を起こしやすい。特に特登録3203946や、上記式(4)などのように、色による判定を行っている検出処理においては、色被りは大きく判定結果をずらし、肌部分を検出しなかったり、誤った箇所を検出したりする。この結果、誤った補正係数を算出してしまい、肌色に対する補正を適切にすることが出来ず、かえって画像を悪化させてしまうことがある。 In the conventional technology described above, the specific part is detected and processed. However, if the original image is colored or has a lot of noise, the specific part Misdetection is likely to occur during detection. In particular, in the detection process in which judgment is performed by color as in the special registration 3203946 or the above formula (4), the color covering greatly shifts the judgment result, and the skin part is not detected or an erroneous part is detected. To do. As a result, an incorrect correction coefficient is calculated, the correction for the skin color cannot be made appropriate, and the image may be deteriorated.
本発明では、上記課題を解決するためになされたものであり、
入力された画像に対して、複数の画像処理手段を施す画像処理装置において、
そのうちの少なくとも一つの画像処理手段は、処理を実行する際に使用する係数を決定する処理係数決定手段を有する第一の画像処理手段であり、
前記処理係数決定手段は、他の第二の画像処理手段を利用して決定する処理係数決定手段であり、
前記処理係数決定手段により決定された処理係数を使用して、前記第一の画像処理手段を実行することを特徴とする。
The present invention has been made to solve the above problems,
In an image processing apparatus that applies a plurality of image processing means to an input image,
At least one of the image processing means is a first image processing means having a processing coefficient determining means for determining a coefficient to be used when executing the processing,
The processing coefficient determination means is a processing coefficient determination means that determines using another second image processing means,
The first image processing means is executed using the processing coefficient determined by the processing coefficient determination means.
以上、説明と実施例を挙げたとおり、本発明によれば、複数の画像処理を有し、その一つが画像の中から特定部分を検出する処理である場合に、予め検出処理に用いるデータに補正処理を行うことで、より検出精度の高い検出処理が実現出来る。 As described above, according to the present invention, according to the present invention, when there are a plurality of image processes, and one of them is a process for detecting a specific portion from an image, the data used for the detection process in advance is used. By performing correction processing, detection processing with higher detection accuracy can be realized.
以下、図面を参照して本発明の実施形態を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[実施形態1]
以下、添付図面を参照して本発明の好適な実施の形態を詳細に説明する。尚、本実施の形態では、通常のPCから印字出来るプリンタだけでなく、PCカードスロットを有し、PCカードに記録されたデジタルカメラで撮影した画像もプリンタ可能である。記録方法としてインクジェット方式を採用している記録装置(フォトダイレクトプリンタ装置)を例に挙げて説明する。
[Embodiment 1]
Preferred embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In the present embodiment, not only a printer capable of printing from a normal PC but also an image taken with a digital camera having a PC card slot and recorded on the PC card can be printed. A recording apparatus (photo direct printer apparatus) that employs an inkjet method as a recording method will be described as an example.
以下、添付図面を参照して本発明の好適な実施の形態を詳細に説明する。 Preferred embodiments of the present invention will be described below in detail with reference to the accompanying drawings.
図2は、本発明の実施の形態に係るフォトダイレクトプリンタ装置1000の概観斜視図である。このフォトダイレクトプリンタは、ホストコンピュータ(PC)からデータを受信して印刷する、通常のPCプリンタとしての機能と、メモリカードなどの記憶媒体に記憶されている画像データを直接読取って印刷したり、或いはデジタルカメラからの画像データを直接受信して印刷する機能を備えている。
FIG. 2 is a schematic perspective view of the photo
図2において、本実施の形態に係るフォトダイレクトプリンタ装置1000の外殻をなす本体は、下ケース1001、上ケース1002、アクセスカバー1003及び排出トレイ1004の外装部材を有している。また、下ケース1001は、装置1000の略下半部を、上ケース1002は本体の略上半部をそれぞれ形成しており、両ケースの組合せによって内部に後述の各機構を収納する収納空間を有する中空体構造をなし、その上面部及び前面部にはそれぞれ開口部が形成されている。さらに、排出トレイ1004は、その一端部が下ケース1001に回動自在に保持され、その回動によって下ケース1001の前面部に形成される開口部を開閉させ得るようになっている。このため、記録動作を実行させる際には、排出トレイ1004を前面側へと回動させて開口部を開成させることにより、ここから記録シートが排出可能となると共に、排出された記録シートを順次積載し得るようになっている。また、排紙トレイ1004には、2枚の補助トレイ1004a,1004bが収納されており、必要に応じて各トレイを手前に引き出すことにより、用紙の支持面積を3段階に拡大、縮小させ得るようになっている。
In FIG. 2, the main body that forms the outer shell of the photo
アクセスカバー1003は、その一端部が上ケース1002に回転自在に保持され、上面に形成される開口部を開閉し得るようになっており、このアクセスカバー1003を開くことによって本体内部に収納されている記録ヘッドカートリッジ(図示せず)あるいはインクタンク(図示せず)等の交換が可能となる。なお、ここでは特に図示しないが、アクセスカバー1003を開閉させると、その裏面に形成された突起がカバー開閉レバーを回転させるようになっており、そのレバーの回転位置をマイクロスイッチなどで検出することにより、アクセスカバーの開閉状態を検出し得るようになっている。
One end of the
また、上ケース1002の上面には、電源キー1005が押下可能に設けられている。また、上ケース1002の右側には、液晶表示部1006や各種キースイッチ等を備える操作パネル1010が設けられている。この操作パネル1010の構造は、図3を参照して詳しく後述する。1007は自動給送部で、記録シートを装置本体内へと自動的に給送する。1008は紙間選択レバーで、記録ヘッドと記録シートとの間隔を調整するためのレバーである。1009はカードスロットで、ここにメモリカードを装着可能なアダプタが挿入され、このアダプタを介してメモリカードに記憶されている画像データを直接取り込んで印刷することができる。1011はビューワ(液晶表示部)で、この装置本体に着脱可能であり、PCカードに記憶されている画像の中からプリントしたい画像を検索する場合などに、1コマ毎の画像やインデックス画像などを表示するのに使用される。1012は後述するデジタルカメラを接続するための端子、1013は、パーソナルコンピュータ(PC)を接続するためのUSBバスコネクタを示す。
A
図3は、本実施の形態に係る操作パネル1010の概観図である。
FIG. 3 is a schematic view of
図において、液晶表示部1006には、その左右に印刷されている項目に関するデータを各種設定するためのメニュー項目が表示される。ここに表示される項目としては、印刷したい範囲の先頭写真番号、指定コマ番号(開始/−指定)、印刷を終了したい範囲の最後の写真番号(終了)、印刷部数(部数)、印刷に使用する用紙(記録シート)の種類(用紙種類)、1枚の用紙に印刷する写真の枚数設定(レイアウト)、印刷の品位の指定(品位)、撮影した日付を印刷するかどうかの指定(日付印刷)、写真を補正して印刷するかどうかの指定(画像補正)、印刷に必要な用紙枚数の表示(用紙枚数)等がある。これら各項目は、カーソルキー2001を用いて選択、或いは指定される。従来例で述べた補正処理は、この画像補正の項目で選択される。例えば、カーソルキーにより
In the figure, the liquid
2002はモードキーで、このキー2002を押下する毎に、印刷の種類(インデックス印刷、全コマ印刷、1コマ印刷等)を切り替えることができ、これに応じてLED2003の対応するLEDが点灯される。2004はメンテナンスキーで、記録ヘッド1301のクリーニング等、プリンタのメンテナンスや印刷領域指定モードに入るためのキーである。2005は印刷開始キーで、印刷の開始を指示する時、或いはメンテナンスの設定を確立する際に押下される。2006は印刷中止キーで、印刷を中止させる時や、メンテナンスの中止を指示する際に押下される。
2002 is a mode key, and each time the key 2002 is pressed, the type of printing (index printing, full-frame printing, single-frame printing, etc.) can be switched, and the corresponding LED of the
次に図4を参照して、本実施の形態に係るフォトダイレクトプリンタ装置1000の制御に係る主要部の構成を説明する。3000は制御部(制御基板)を示している。3001はASIC(専用カスタムLSI)、3002はDSP(デジタル信号処理プロセッサ)で、内部にCPUを有し、後述する画像処理等を担当している。3003はメモリで、DSP3002のCPUの制御プログラムを記憶するプログラムメモリ3003a、及び実行時のプログラムを記憶するRAMエリア,画像データなどを記憶するワークメモリとして機能するメモリエリアを有している。3004はプリンタエンジンで、ここでは、複数色のカラーインクを用いてカラー画像を印刷するインクジェットプリンタのプリンタエンジンが搭載されている。3005はデジタルカメラ3012を接続するためのポートとしてのUSBバスコネクタである。3006はビューワ1011を接続するためのコネクタである。3008はUSBバスハブ(USB HUB)で、このプリンタ装置1000がPC3010からの画像データに基づいて印刷を行う際には、PC3010からのデータをそのままスルーし、USBバス3021を介してプリンタエンジン3004に出力する。これにより、接続されているPC3010は、プリンタエンジン3004と直接、データや信号のやり取りを行って印刷を実行することが出来る(一般的なPCプリンタとして機能する)。3009は電源コネクタで、電源3013により、商用ACから変換された直流電圧を入力している。PC3010は一般的なパーソナルコンピュータ、3011は前述したメモリカード(PCカード)、3012はデジタルカメラである。尚、この制御部3000とプリンタエンジン3004との間の信号のやり取りは、前述したUSBバス3021又はIEEE1284バス3022を介して行われる。
Next, with reference to FIG. 4, the configuration of the main part relating to the control of the photo
図5に、本実施系における画像処理ブロック図を示す。メモリカードから画像を取得し、プリンタが出力可能なデータの形式にするまでのブロックとなっている。各ブロックにおける処理内容を説明する。 FIG. 5 shows a block diagram of image processing in the present embodiment. It is a block from acquiring an image from a memory card to a data format that can be output by a printer. Processing contents in each block will be described.
(JPEG復号化処理部)
デジタルカメラで最も利用されている画像フォーマットは、JPEG(Joint Photographic Experts Group)形式である。本実施例では、メモリカード内にJPEG画像があることを想定する。本出願では、そのデコード方法の詳細は本質ではないので割愛するが、主要な処理として、エントロピー符号の展開(復号化)処理、逆量子化処理、逆DCT変換処理となる。
(JPEG decoding processing unit)
The most used image format in digital cameras is the JPEG (Joint Photographic Experts Group) format. In this embodiment, it is assumed that there is a JPEG image in the memory card. Although details of the decoding method are not essential in this application, they are omitted, but the main processes are entropy code expansion (decoding) processing, inverse quantization processing, and inverse DCT transformation processing.
(逆光補正係数決定部)
デコードされた画像データは、逆光補正が必要であれば逆光補正係数決定部で、その係数が決定される。逆光補正の処理方法は、幾つかあるが本実施例では、自動で人肌部分を検出し、その輝度値から補正量を算出する方法を挙げる。
(Backlight correction coefficient determination unit)
If the decoded image data requires backlight correction, its coefficient is determined by the backlight correction coefficient determination unit. Although there are several backlight correction processing methods, in this embodiment, a method of automatically detecting a human skin portion and calculating a correction amount from the luminance value is given.
図6に、逆光補正係数決定処理のフロー図を示す。STEP601は人肌判定用データ生成部である。色判定用と周波数判定用の2つデータが生成される。色判定用データとしては、上述のデコード処理により画像の展開が実行され、輝度Y色差CbCr成分の画像データが得られる。これらはSTEP602に送られ、ITU-R BT.601に準拠した下記式によりRGBデータに変換される。
FIG. 6 shows a flowchart of the backlight correction coefficient determination process.
R=Y+1.402(Cr−128)
G=Y−0.34414(Cb−128)−0.71414(Cr−128)
B=Y+1.772(Cb−128)
得られたRGBデータを利用し、STEP603において、色判定処理を実行する。判定条件としては、従来技術で記載した式(4)などが挙げられる。これらの判定処理は、後述するSTEP604での処理を考慮すると、全ての画素について実行する必要はなく、8x8単位での判定で構わない。8x8ブロック内での、RGB各平均値を算出ししての判定でも良いし、予め設定された点、例えば四隅の点による判定を行っても良い。このSTEP603の処理により、色として人肌の条件を満たしているか否かが判定が実行される。
R = Y + 1.402 (Cr-128)
G = Y−0.34414 (Cb−128) −0.71414 (Cr−128)
B = Y + 1.772 (Cb-128)
In
一方、STEP601は人肌判定用データ生成部では、逆量子化後の逆DCT変換処理を実行する前のJPEGの8x8のMCU単位で格納されている輝度Yに関する周波数データをメモリに格納する。図7は、JPEGにおける8x8のMCUを表した図である。左上のDC成分のほか、AC成分のDCT係数が格納されている。左上が低周波成分を表し、右下に行くにつれ高周波成分となっている。STEP604では、このAC成分のDCT係数と予め準備されたパラメータとの比較により、肌に適した周波数か否かの判定を行う。パラメータとしては、高周波成分がある一定以上含まれている場合は、肌に適さないと判定するように設定される。低周波成分についても、極端に強すぎる場合は、肌でないと判定するよう設定することも可能である。また、AC成分のDCT係数63個全てについてのパラメータを用意し、比較すると処理時間を多く要したり、パラメータ数が多くなってしまったりするので、ある決められたポイント点での比較としても良い。また、一定区間の平均値を求め、その比較としても構わない。図8に、AC成分を7分割した場合を示す。各区間での平均値と予め設定された値との比較となり、この場合、7回の比較処理で人肌周波の判定が実行される。このSTEP604の処理により、周波数として人肌の条件を満たしているかの判定が実行される。
On the other hand, in
STEP605では、STEP603および604で判定された結果を受け取り、共に人肌の条件を満たしていると判定した場合は、その8x8ブロックが人肌との認定をする。
In
STEP606で画像全体に対して人肌判定がされたかを判定し、もしされていない場合は、SETP601からSTEP606を繰り返す。
In
画像全てに対し判定処理が実行された場合は、STEP607へと進み、補正係数を決定する。本実施例では、補正係数として輝度変換テーブルを作成する。これは例えば、輝度Y成分に対し、どのような値にすればよいかを示した対応が格納されたテーブルである。入力が8ビットであればエントリが256のテーブルとなる。出力結果は0〜255の8ビットでも構わないが、階調損失を考慮すると、8ビットよりも多い出力の方が望ましい。 If the determination process has been executed for all the images, the process proceeds to STEP 607 and a correction coefficient is determined. In this embodiment, a brightness conversion table is created as a correction coefficient. This is, for example, a table storing correspondence indicating what value should be set for the luminance Y component. If the input is 8 bits, the entry is a table of 256. The output result may be 8 bits from 0 to 255, but in consideration of gradation loss, an output with more than 8 bits is desirable.
決定方法は、STEP5で人肌と判定されたブロックの輝度値を利用する。人肌ブロックの輝度平均Y人肌を算出することにより、画像中の人肌部分の明るさの指標を取得出来る。その値を予め設定されたあるターゲット輝度YTARGET、例えば輝度を10%アップする
YTARGET=Y人肌×k
(k=1.1)
となるような、テーブルを生成することにより、人肌部分を明るくする係数が求められる。より適切な係数を求めるために、人肌の輝度値に応じてターゲット輝度へのアップ率を変化させたり、画像全体の輝度値Y全体輝度を考慮し、それによりターゲット輝度を変化させたりすることも可能である。
The determination method uses the luminance value of the block determined as human skin in STEP5. By calculating the luminance average Y human skin of the human skin block, the brightness index of the human skin portion in the image can be acquired. The target brightness Y TARGET that is set in advance is set, for example, the brightness is increased by 10%. Y TARGET = Y human skin × k
(K = 1.1)
A coefficient that brightens the human skin portion is obtained by generating a table such that In order to obtain a more appropriate coefficient, the increase rate to the target luminance is changed according to the luminance value of the human skin, or the target luminance is changed by considering the luminance value Y overall luminance of the entire image. Is also possible.
YTARGET=Y人肌×k(Y全体輝度)
求められたターゲット輝度から図9に示すような変換テーブルLUTY(逆光)を作成する。作成方法としては、直線で繋ぐ方法、またはそれにスムージング処理を行う方法、近似曲線を求める方法など、階調の急激な飛びがない作成方法が挙げられる。
Y TARGET = Y human skin x k (Y overall brightness )
A conversion table LUT Y (backlight) as shown in FIG. 9 is created from the obtained target luminance. Examples of the creation method include a creation method that does not cause a sharp jump in gradation, such as a method of connecting with a straight line, a method of performing smoothing thereto, or a method of obtaining an approximate curve.
YNEW=LUTY(逆光)[YORG]
また、輝度アップに伴い、彩度低下が発生するので、それを補正する必要がある。これは、輝度の増加率により変化し、
S(逆光)=f(YNEW−YORG)
により、算出される、元々の色差成分CbORG、CrORGに対して、下記記のように適用され、CbNEW、CrNEWが、求められる。
Y NEW = LUT Y (backlight) [Y ORG ]
Further, as the luminance increases, the saturation decreases, and it is necessary to correct it. This varies with the rate of increase in brightness,
S (backlight) = f (Y NEW -Y ORG )
Is applied to the original color difference components Cb ORG and Cr ORG calculated as follows , and Cb NEW and Cr NEW are obtained.
CbNEW=CbORG×S(逆光)
CrNEW=CrORG×S(逆光)
(色かぶり補正係数決定部)
色かぶり補正の係数決定は、従来技術で述べたように、輝度ヒストグラムから移動量を求め、その移動を実現する係数の決定となる。
Cb NEW = Cb ORG × S (backlight)
Cr NEW = Cr ORG × S (Backlight)
(Color cast correction coefficient determination unit)
As described in the prior art, the determination of the color fog correction coefficient is to determine the coefficient for obtaining the movement amount from the luminance histogram and realizing the movement.
まず、画像のデコード処理を行い、JPEG画像を展開する。展開されたYCbCrについて、Y成分のみの累積を行い、輝度ヒストグラムを生成する。ここで画像全体のデコード処理を行うと、ヒストグラム作成までに、時間を要することになるほか、多くのメモリを消費するので、画像をMCU単位間引きながら展開することも可能である。また、JPEGのDC成分のみを利用し、逆DCT変換を行うことを省略する方法も考えられる。 First, an image decoding process is performed to develop a JPEG image. For the developed YCbCr, only the Y component is accumulated to generate a luminance histogram. If the decoding process for the entire image is performed here, it takes time to create the histogram, and a lot of memory is consumed. Therefore, it is possible to develop the image while thinning out the MCU units. Another possible method is to use only the DC component of JPEG and omit performing inverse DCT conversion.
図1(a)は、色かぶりと露出がアンダーになっている画像の輝度ヒストグラムの一例である。この輝度ヒストグラムでは本来白であるべき点が白でないことを表している。そこで、全画素数の上から数パーセントに当たる輝度をハイライトポイント(YHL)、下から数パーセントに当たる輝度をシャドーポイント(YSD)と決定する。一般的にハイライトポイント、シャドーポイントは、それぞれ上(Y=255)および下(Y=0)から全画素数の0〜5%程度である。そして、この輝度YHLが白 、輝度YSDが黒となるように変換を行う。 FIG. 1A shows an example of a luminance histogram of an image in which the color cast and the exposure are under. In this luminance histogram, the point that should be white is not white. Therefore, the luminance corresponding to several percent from the top of the total number of pixels is determined as the highlight point (Y HL ), and the luminance corresponding to several percent from the bottom is determined as the shadow point (Y SD ). Generally, the highlight point and the shadow point are about 0 to 5% of the total number of pixels from the top (Y = 255) and the bottom (Y = 0), respectively. Then, the conversion is performed so that the luminance YHL is white and the luminance YSD is black.
YHL=255
YSD=0
また、上式のように変換を行った場合、輝度0〜YSD、YHL〜255間の階調が失われる恐れがあるので、下式に示すようにYHLを255よりもわずかに低い値Y255′、YSDを0よりもわずかに高い値Y0′に設定することにより階調損失を防ぐことが出来る。
Y HL = 255
Y SD = 0
Further, when it was converted to the above equation, the luminance 0 to Y SD, since gradation between Y HL to 255 is likely to be lost, slightly lower than the 255 Y HL as shown in the following formula value Y255 ', the Y SD slightly higher value Y0 than 0' it is possible to prevent a tone loss by setting.
YHL=Y255′ (但し、Y255′≒255)
YSD=Y0′ (但し、Y0′≒0)
このようなハイライトポイントおよびシャドーポイントの輝度を設定する変換を画像全体に施すことにより、露出がアンダーやオーバーしている画像は改善される。
Y HL = Y 255 ′ (Y 255 ′ ≈255)
Y SD = Y 0 ′ (however, Y 0 ′ ≈0)
By performing conversion for setting the brightness of the highlight point and the shadow point on the entire image, an image with underexposed or overexposed images is improved.
さらに画像の色差信号Cb、Crに色かぶりの補正を行う。白であるための条件は
Cb=Cr=0 かつ Y=255
である。同様にシャドーポイントの画素は黒となるべきであり、その条件は
Cb=Cr=0 かつ Y=0
となる。ハイライトポイントおよびシャドーポイントの輝度となる画素の色差信号の平均をそれぞれ(CbHL,CrHL)、(CbSD,CrSD)とすると、色かぶりのしている画像の場合
CbHL≠0 または CrHL≠0
CbSD≠0 または CrSD≠0
となってしまっている。そこで、色かぶりを補正するためには、(CbHL,CrHL)、(CbSD,CrSD)をそれぞれ本来の白、黒の値に変換する。その方法の一例としては図10に示すようなハイライトポイントとシャドーポイントを通る色立体の線を考え、その線が輝度軸とに重なるようにすればよい。それは、下記式により実現出来る。
Further, color fog correction is performed on the color difference signals Cb and Cr of the image. The condition for white is Cb = Cr = 0 and Y = 255
It is. Similarly, the shadow point pixel should be black, and the condition is Cb = Cr = 0 and Y = 0.
It becomes. If the average of the color difference signals of the pixels having the luminance at the highlight point and the shadow point is (Cb HL , Cr HL ) and (Cb SD , Cr SD ), respectively, Cb HL ≠ 0 or Cr HL ≠ 0
Cb SD ≠ 0 or Cr SD ≠ 0
It has become. Therefore, in order to correct the color cast, (Cb HL , Cr HL ) and (Cb SD , Cr SD ) are converted into original white and black values, respectively. As an example of the method, a color solid line passing through a highlight point and a shadow point as shown in FIG. 10 may be considered, and the line may be overlapped with the luminance axis. It can be realized by the following formula.
また、本実施例では、色かぶり補正が選択された場合、同時にコントラスト補正および彩度強調することにより、補正をより効果的にする。そのために、輝度ヒストグラムの分布から、コントラスト強調度を求め、コントラストを強める場合には、変換テーブルLUTY(コントラスト)を作成し、
YNEW=LUTY(コントラスト)[YORG]
の補正を実行する。彩度補正については、画像全体の平均彩度を算出し、彩度強調係数S(強調)を求め、
CbNEW=CbORG×S(強調)
CrNEW=CrORG×S(強調)
により彩度強調を実現する。
In this embodiment, when color cast correction is selected, the correction is made more effective by simultaneously performing contrast correction and saturation enhancement. Therefore, when the contrast enhancement degree is obtained from the distribution of the luminance histogram and the contrast is strengthened, a conversion table LUT Y (contrast) is created,
Y NEW = LUT Y (contrast) [Y ORG ]
Perform the correction. For saturation correction, the average saturation of the entire image is calculated, the saturation enhancement coefficient S (emphasis) is obtained,
Cb NEW = Cb ORG × S (emphasis)
Cr NEW = Cr ORG × S (emphasis)
To achieve saturation enhancement.
(補正処理部)
補正処理部においては、上記で求められた、逆光補正に関する補正係数LUTY(逆光)、
彩度補正係数S(逆光)、色かぶり補正やコントラスト補正、彩度強調の補正係数、3x3マトリクス、LUTY(コントラスト)、S(強調)、などを画像に適用する。
(Correction processor)
In the correction processing unit, the correction coefficient LUT Y (backlight) relating to the backlight correction obtained above,
Saturation correction coefficient S (backlight) , color cast correction, contrast correction, saturation enhancement correction coefficient, 3 × 3 matrix, LUT Y (contrast) , S (enhancement) , etc. are applied to the image.
この際、逆光補正、色かぶり補正(コントラスト補正および彩度強調を含む)が同時に選択された場合、それぞれの処理を適宜施していると処理時間が多くかかってしまう。そこで、輝度および彩度に関する補正においては、処理を開始する前に、下記色によりテーブルを結合させることが可能である。 At this time, if backlight correction and color cast correction (including contrast correction and saturation enhancement) are selected at the same time, it takes a lot of processing time if the respective processes are appropriately performed. Therefore, in the correction relating to luminance and saturation, it is possible to combine tables with the following colors before starting the processing.
Y(逆光+コントラスト)=LUTY(逆光)[YORG]×LUTY(コントラスト)[YORG]
S(逆光+強調)=S(逆光)×S(強調)
求められた、Y(逆光+コントラスト)、S(逆光+強調)でのみ処理を施すことにより、各々の処理を施す場合と同等の効果が実現出来る。
Y (backlight + contrast) = LUT Y (backlight) [Y ORG ] × LUT Y (contrast) [Y ORG ]
S (backlight + enhancement) = S (backlight) x S (emphasis)
By performing the processing only with the obtained Y (backlight + contrast) and S (backlight + enhancement) , it is possible to achieve the same effect as when each processing is performed.
(変倍処理部)
選択された画像のピクセル数、選択された用紙サイズから、拡大・縮小の変倍率が決定される。変倍方法については、単純拡大・縮小やバイリニア法、バイキュービック法など幾つか方法が挙げられる。そのどれを選択するかは、そのシステム環境および求められる処理速度により、決定される。上述の各変倍手段については、本提案の本質とはならないので割愛する。
(Scaling processing unit)
The scaling factor for enlargement / reduction is determined from the number of pixels of the selected image and the selected paper size. As the scaling method, there are several methods such as simple enlargement / reduction, bilinear method, and bicubic method. Which one to select is determined by the system environment and the required processing speed. The above-described scaling means will be omitted because they are not the essence of this proposal.
(色変換処理部)
色変換処理部では、入力された信号YCbCr乃至RGBのデータに対し、プリンタのデバイス色への色変換を行う。例えば、6種類のインクを積載したプリンタであれば、シアン(C)、マゼンタ(M)、イエロー(Y)、ブラック(K)、淡いシアン(LC)、淡いマゼンタ(LM)の信号に変換する。入力をRGB信号値とすると、(R,G,B)→(C,M,Y,K,LC,LM)の変換となる。
(Color conversion processor)
The color conversion processing unit converts the input signals YCbCr through RGB data into a printer device color. For example, in the case of a printer loaded with six types of ink, the signals are converted into cyan (C), magenta (M), yellow (Y), black (K), light cyan (LC), and light magenta (LM) signals. . If the input is an RGB signal value, the conversion is (R, G, B) → (C, M, Y, K, LC, LM).
変換方法としては、いくつかの方法があるが、ここではルックアップテーブル(以下、LUT)と補間処理を用いた方法を一例として挙げる。 There are several conversion methods, but here, a method using a look-up table (hereinafter referred to as LUT) and interpolation processing is taken as an example.
事前に用意しておくLUTは、図11に示すようなRGB値をそれぞれ16レベルずつに16分割した4913点に対応するC,M,Y,K,LC,LM信号値が記述されており、入力R,G,Bの値に応じたC,M,Y,K,LC,LM値が参照される。R,G,Bの値が16分割した間にある場合は、補間処理によって求める。 The LUT prepared in advance describes C, M, Y, K, LC, and LM signal values corresponding to 4913 points obtained by dividing the RGB values as shown in FIG. 11 into 16 levels each. The C, M, Y, K, LC, and LM values corresponding to the values of the inputs R, G, and B are referred to. When the values of R, G, and B are between 16 divisions, they are obtained by interpolation processing.
補間方法の例として、四面体補間法を挙げる。四面体補間法とは、3次元空間の分割単位を四面体として、4つの格子点を用いる線形補間である。その手順として、まず図12(a)に示すように四面体への分割を行う。そして、ターゲットとなる点pが分割されたどの四面体に属するかを決定する。その四面体の4頂点をp0、p1、p2、p3とし、図12(b)に示すようにさらに細かい小四面体に分割される。また、拡張点の変換値をそれぞれf(p0)、f(p1)、f(p2)、f(p3)とすると、 An example of the interpolation method is a tetrahedral interpolation method. The tetrahedral interpolation method is linear interpolation using four grid points with a unit of three-dimensional space as a tetrahedron. As the procedure, first, as shown in FIG. Then, the tetrahedron to which the target point p belongs is determined. The four vertices of the tetrahedron are defined as p0, p1, p2, and p3, and are divided into smaller tetrahedrons as shown in FIG. Also, if the conversion values of the extension points are f (p0), f (p1), f (p2), and f (p3), respectively,
(量子化処理部)
インク色に変換されたデータは、量子化処理が施される。これは、多ビットのデータを記録装置で記録可能なビット数に変換するものである。本実施例では、記録(1)/非記録(0)の1ビット2値であるインクジェットプリンターの場合を考える。ここで、量子化方法としては、写真画像の量子化に最適となる誤差拡散法とする。また、入力信号は8ビットの0〜255とする。
(Quantization processing unit)
The data converted into the ink color is subjected to quantization processing. This converts multi-bit data into the number of bits that can be recorded by a recording apparatus. In the present embodiment, a case of an inkjet printer having 1 bit / binary of recording (1) / non-recording (0) is considered. Here, the quantization method is an error diffusion method that is optimal for the quantization of photographic images. The input signal is 8 bits from 0 to 255.
図13は誤差拡散法における、誤差分配方法を示す図である。ターゲットピクセルの信号値をL(0≦L≦255)とした時、しきい値THと比較を行う。その大小により、
L>TH ・・・・・・ 1(記録)
L≦TH ・・・・・・ 0(非記録)
と判定される。その時に発生する誤差E(=L−TH)は、図13の分配係数に従い周囲のピクセルに分配される。この処理をすべてのピクセル、すべてのインク色色C,M,Y,K,LC,LMに対して行うことで、1ビットの画像データ色C',M',Y',K',LC',LM'に量子化される。
FIG. 13 is a diagram showing an error distribution method in the error diffusion method. When the signal value of the target pixel is L (0 ≦ L ≦ 255), it is compared with the threshold value TH. Depending on its size,
L> TH ・ ・ ・ ・ ・ ・ 1 (Recording)
L ≦ TH ・ ・ ・ ・ ・ ・ 0 (not recorded)
It is determined. The error E (= L−TH) generated at that time is distributed to surrounding pixels according to the distribution coefficient shown in FIG. By performing this processing for all pixels and all ink color colors C, M, Y, K, LC, and LM, 1-bit image data colors C ′, M ′, Y ′, K ′, LC ′, Quantized to LM ′.
次に各処理ブロックがどのように実行されるかを図14に示す処理フローを使用して説明する。 Next, how each processing block is executed will be described using the processing flow shown in FIG.
(補正が選択されていない場合)
最初にSTEP1401およびにおいて、ユーザーにより、色かぶり補正または逆光補正が選択されていないかを判別する。ここで、いずれも選択されていない場合は、補正処理は一切行われない通常のフローとなる。STEP1402へと進み、JPEGのデコード処理を行った後、STEP1403の補正処理へと送られる。補正係数は、初期化処理(図示せず)において、何も施されていない値
3x3マトリクス:
(When no correction is selected)
First, in
S:1.00
が記述されているので、STEP1403が行われてもデータは不変である。処理負荷を減らしたいのであれば、STEP1401の判定の結果により、STEP1403をスキップすることも可能である。その後、STEP1404の変倍処理が実行され、STEP1405の色変換処理、続いてSTEP1406の量子化処理が実行される。量子化後のデータ、プリンタに送信され、プリンタはこのデータに基づいて記録を行う(図示せず)。STEP1413において、全ての画素が終了したかの判定を行い、もしそうでなければSTEP1402へと戻る。これを全ての画素について行い、終了となる。
Therefore, even if
(色かぶり補正のみが選択されている場合)
同様に図14を使用し、パネル操作で色かぶり補正のみが選択された場合のフローについて説明する。
(When only color cast correction is selected)
Similarly, a flow when only color cast correction is selected by panel operation will be described with reference to FIG.
STEP1401の判定により、色かぶり補正が選択されているので、STEP1407へと進む。
Since color cast correction is selected according to the determination in
STEP1407では、上述したようにデコード処理を行い、色かぶり補正係数の3x3マトリクスおよびコントラスト補正係数LUTY(コントラスト)、彩度強調係数S(強調)を求める。
In
STEP1408で、逆行補正の選択有無の判定を行い、本ケースであれば、STEP1402のJPEGデコード処理へと進む。ここから先は、[補正が選択されていない場合]と同等の処理になる。但し、STEP1403においての補正係数は、STEP1407で求められた係数が使用される。これにより、色かぶり補正を実現し、さらにコントラスト補正、彩度強調処理を行う。
In
(逆光補正のみが選択されている場合)
同様に図14を使用し、パネル操作で逆光補正のみが選択された場合のフローについて説明する。
(When only backlight compensation is selected)
Similarly, FIG. 14 will be used to explain the flow when only backlight correction is selected by panel operation.
STEP1401の判定により、逆光補正が選択されているので、STEP1407へと進む。 As the backlight correction is selected based on the determination in STEP1401, the process proceeds to STEP1407.
STEP1407では、上述したようにデコード処理を行い、色かぶり補正係数の3x3マトリクスおよびコントラスト補正係数LUTY(コントラスト)、彩度強調係数S(強調)を求める。
In
STEP1408で、逆行補正の選択有無の判定を行い、本ケースであれば、STEP1409へと進む。ここでは、逆光補正用の人肌判定に用いる色判定用データおよび周波数判定データを生成する。色判定用データについては、メモリ上に8x8ブロックを表すRGBデータが出力される。これらのデータは、ITU-R BT.601に準拠した下記式によりYCbCr変換される。
In
Y=0.900×R+0.587×G+0.114×B
Cb=(−0.299×R−0.587×G+0.886×B)
×0.564+128
Cr=(0.701×R−0.587×G−0.114×B)
×0.713+128
変換されたYCbCrデータに対し、STEP1407で生成した色かぶり補正係数の3x3マトリクスおよびコントラスト補正係数LUTY(コントラスト)、彩度強調係数S(強調)を施し、再度、
R=Y+1.402(Cr−128)
G=Y−0.34414(Cb−128)−0.71414(Cr−128)
B=Y+1.772(Cb−128)
により、RGB信号値に戻される。
Y = 0.900 × R + 0.587 × G + 0.114 × B
Cb = (− 0.299 × R−0.587 × G + 0.886 × B)
× 0.564 + 128
Cr = (0.701 × R−0.587 × G−0.114 × B)
× 0.713 + 128
The converted YCbCr data is subjected to the 3 × 3 matrix of the color fog correction coefficient generated in
R = Y + 1.402 (Cr-128)
G = Y−0.34414 (Cb−128) −0.71414 (Cr−128)
B = Y + 1.772 (Cb-128)
Thus, the RGB signal value is restored.
STEP1410では、上記変換されたRGBデータを利用することにより、色かぶりを補正した画像に対し色判定を行い、同時に周波数成分の判定を実行する。これにより、求められた人肌輝度値から、適性に明るくする補正係数を決定する。
In
その後、STEP1411で、色かぶり補正の判定を行い、本ケースではSTEP1412へと進む。STEP1412では、色かぶり補正が実際には実行はしないように、3x3マトリクスについてはデフォルト値(単位行列)へと戻す処理が行われる。
Thereafter, in
この後、STEP1402へと進み、ここから先は、[補正が選択されていない場合]と同等の処理になる。但し、本ケースの場合、STEP1403においての補正係数は、色かぶり補正に関する係数についてはデフォルトの何もしないもの、輝度を変換する逆光補正に関する係数については、STEP1410で求められた値が使用される。これにより、色かぶりなどを起こしている画像に対しての的確な逆光補正が実現される。
Thereafter, the process proceeds to STEP 1402 and the processing from here is the same as [when correction is not selected]. However, in this case, as the correction coefficient in
(色かぶり補正および逆光補正が両方選択されている場合)
同様に図14を使用し、パネル操作で色かぶり補正および逆光補正が選択された場合のフローについて説明する。
(When color cast correction and backlight correction are both selected)
Similarly, FIG. 14 will be used to explain the flow when color cast correction and backlight correction are selected by panel operation.
STEP1401の判定により、色かぶり補正、逆光補正が共に選択されているので、STEP1407へと進む。
Since both color fog correction and backlight correction are selected according to the determination in
STEP1407では、上述したようにデコード処理を行い、色かぶり補正係数の3x3マトリクスおよびコントラスト補正係数LUTY(コントラスト)、彩度強調係数S(強調)を求める。
In
STEP1408で、逆行補正の選択有無の判定を行い、本ケースであれば、STEP1409のへと進む。ここでは、逆光補正用の人肌判定に用いる色判定用データおよび周波数判定データを生成する。色判定用データについては、メモリ上に8x8ブロックを表すRGBデータが出力される。これらのデータは、逆光補正のみが選択されている場合で上述のITU-R BT.601に準拠した式によりYCbCr変換される。変換されたYCbCrデータに対し、STEP1407で生成した色かぶり補正係数の3x3マトリクスおよびコントラスト補正係数LUTY(コントラスト)、彩度強調係数S(強調)を施し、再度、上述の変換式によりRGB信号値に戻される。
In
STEP1410では、上記変換されたRGBデータを利用することにより、色かぶりを補正した画像に対し色判定を行い、同時に周波数成分の判定を実行する。これにより、求められた人肌輝度値から、適性に明るくする補正係数を決定する。
In
その後、STEP1411で、色かぶり補正有無の判定を行い、本ケースでは色かぶり補正が選択されているので、STEP1402へと進む。
Thereafter, in
STEP1402以降は、[補正が選択されていない場合]と同等の処理になる。但し、STEP1403においての補正係数は、STEP1407で求められた係数が使用される。これにより、色かぶりおよび逆光補正などが実現される。
In
以上、述べたように、本発明の第一の実施形態では、PCカードからのダイレクト印刷が可能なプリンタにおいて、パネルにより色かぶり補正と逆光補正が、ユーザーにより選択される場合を示した。第一の実施例の手段を行うことで、適切な人肌検出が可能となり、より適切な補正を施すことが実現出来る。 As described above, in the first embodiment of the present invention, in the printer capable of direct printing from the PC card, the case where the user selects the color fog correction and the backlight correction by the panel is shown. By performing the means of the first embodiment, it is possible to detect human skin appropriately and to perform more appropriate correction.
[実施形態2]
本発明の第二の実施形態として、上述の第一の実施形態に対し、ノイズ除去処理が加わった場合を示す。尚、記録装置としては、第一の実施形態と同様、PCカードに記録されたデジタルカメラで撮影した画像もプリンタ可能なインクジェット記録装置(フォトダイレクトプリンタ装置)とする。よって、記録装置についての詳細な説明は、ここでは省略する。
[Embodiment 2]
As a second embodiment of the present invention, a case where a noise removal process is added to the first embodiment described above will be described. As in the first embodiment, the recording apparatus is an ink jet recording apparatus (photo direct printer apparatus) capable of printing an image taken with a digital camera recorded on a PC card. Therefore, detailed description of the recording apparatus is omitted here.
パネルにより設定を行うが、パネルのキー操作により、 The settings are made using the panel.
図15に、本実施形態における処理のブロック図を示す。第一の実施形態である図5との違いは、JPEG復号化処理部の次に、ノイズ除去処理部が加えられたところである。ノイズ除去処理部について説明する。 FIG. 15 shows a block diagram of processing in the present embodiment. The difference from FIG. 5 which is the first embodiment is that a noise removal processing unit is added after the JPEG decoding processing unit. The noise removal processing unit will be described.
(ノイズ除去処理部)
ノイズ除去の方法としては、様々な方法が提案、実現されているが、ここでは一般的なノイズ除去の一つである平均値フィルタを例に挙げる。図16は、平均値フィルタの一例である。5x5のウィンドウサイズのフィルタであり、中心の*印の画素が、ターゲット画素となる。ターゲット画素の輝度値をYTGTとしたとき、これは下記式で求められる。
(Noise removal processing part)
Various methods have been proposed and implemented as a noise removal method. Here, an average value filter which is one of general noise removal methods will be described as an example. FIG. 16 is an example of the average value filter. This is a 5 × 5 window size filter, and the pixel marked with * in the center is the target pixel. When the luminance value of the target pixel is Y TGT , this is obtained by the following equation.
また、単純な平均値フィルタの場合は、エッジ部分おいても平滑化をして、エッジが鈍り、画像のボケが発生してしまう。それを回避するために、エッジを検出し、エッジと判定された場合は、平滑化フィルタを施さないとして、エッジを確保する。エッジ検出には、PrewittフィルタやSobelフィルタに代表される微分フィルタを利用すればよい。 Further, in the case of a simple average value filter, the edge portion is also smoothed, the edge becomes dull, and the image is blurred. In order to avoid this, an edge is detected, and when the edge is determined, the smoothing filter is not applied and the edge is secured. For edge detection, a differential filter represented by a Prewitt filter or a Sobel filter may be used.
図17に本実施形態におけるフロー図を示す。第一の実施形態である図14との違いは、ノイズ処理に関するSTEP1703、1704、1713が追加されたことである。主要なケースを取り上げ、説明する。
FIG. 17 shows a flowchart in the present embodiment. The difference from FIG. 14, which is the first embodiment, is that
(ノイズ除去のみが選択されている場合)
図17を用いて、ノイズ除去処理のみが選択されている場合を説明する。
(When only noise reduction is selected)
The case where only the noise removal process is selected will be described with reference to FIG.
STEP1701では、ノイズ除去のみのためSTEP1710の方へ判定されず、STEP1702へと進む。STEP1702で、JPEG画像の復号処理が行われた後、STEP1703により、ノイズ除去の判定を行う。ノイズ除去が選択されている場合は、STEP1704により上述のノイズ除去処理を実行する。それ以降、STEP1705〜1709は、実施例1で説明したフローと同じになり詳細は割愛する。STEP1708の量子化処理が終わった後に、STEP1709において全画素について処理が終了したかの判定を行い、もしそうでなければ、STEP1702に戻り、再度処理が繰り返される。
In STEP1701, since it is only noise removal, it does not determine to STEP1710, but progresses to STEP1702. After the decoding processing of the JPEG image is performed in
(逆光補正のみが選択されている場合)
同様に図17を用いて、逆行補正のみが選択されている場合を説明する。
(When only backlight compensation is selected)
Similarly, the case where only the retrograde correction is selected will be described with reference to FIG.
逆光補正が選択されているため、STEP1701からSTEP1710へと進み、JPEGのデコード処理を行い、ヒストグラムから色かぶり補正のパラメータを決定する。STEP1711で逆光補正の有無の判定を行い、本ケースであればSTEP1712へと進む。STEP1712では第一の実施例の図14におけるSTEP1409と同様の処理となり、人肌判定データに対して、STEP1710で作成したパラメータを施し、色かぶりを除去する。さらにSTEP1713で変換された人肌判定用の画像に対し、ノイズ除去処理を実行する。そして、STEP1714では、その画像を使用して逆光補正係数決定の処理が実行される。これによって、人肌の判定処理を行う画像は、色かぶりがなくかつノイズ除去処理によりノイズが除去された画像となり、より精度高く人肌を検出し、その結果、より最適な逆光補正係数が決定される。
Since backlight correction is selected, the process proceeds from
その後、色かぶり補正が選択されていないので、STEP1715において色かぶり係数をデフォルト値に戻し、STEP1702へと進む。
Thereafter, since color cast correction is not selected, the color cast coefficient is returned to the default value in
STEP1703では、ノイズ除去の判定が行われる、本ケースではSTEP1704はスキップされ、STEP1705へと進む。それ以降は、上述のフローと同様である。
In
(色かぶり補正、逆光補正、ノイズ除去すべてが選択されている場合)
同様に図17を用いて、全ての補正処理が選択されている場合を説明する。
(When color cast correction, backlight correction, and noise reduction are all selected)
Similarly, the case where all the correction processes are selected will be described with reference to FIG.
STEP1701において、全ての補正処理が選択されている場合は、STEP1710へと進み、JPEGのデコード処理を行い、ヒストグラムから色かぶり補正のパラメータが決定された後、STEP1711の判定を経て、STEP1712で人肌判定用の画像に対し、STEP1710の係数による色かぶりを除去、STEP1713のノイズ除去処理を実行し、STEP1714では、その画像を使用して逆光補正係数決定の処理が実行される。これは、色かぶりがなく、かつノイズ除去処理により、ノイズが除去された画像に対し、人肌検出されたこととなり、より精度高く検出が実現し、その結果、より最適な逆光補正係数が決定される。
If all the correction processes are selected in
その後、STEP1715の判定からSTEP1702へと戻り、それ以降は上述と同様の処理が実行される。
Thereafter, the process returns from
以上述べたように、第二の実施形態によれば、逆光補正のほか、色かぶり補正とノイズ除去処理が存在する場合に、より検出精度の高い人肌検出処理が実現することを説明した。なお、ノイズ除去処理ではフィルタリング処理を使用したが、その他様々な効果をもつフィルタリング処理との組み合わせにより、検出精度向上が図れることは言うまでもない。 As described above, according to the second embodiment, it has been described that human skin detection processing with higher detection accuracy is realized when color fog correction and noise removal processing exist in addition to backlight correction. Although the filtering process is used in the noise removal process, it goes without saying that the detection accuracy can be improved by combining with a filtering process having various other effects.
[他の実施形態]
なお、本発明の実施形態では、主としてカードからのダイレクトプリントを代表させて記述した。しかし、適用範囲はこれに限定されることなく、通常のPCからプリントも含まれる。また、出力装置だけでなく、スキャナといった入力機器についても、同様の処理が適用でき、効果も得ることが可能である。さらに複数の機器やスキャナ、プリンタから構成されるコピーのような複合されたシステムにおいても適用しても構わない。
[Other Embodiments]
In the embodiment of the present invention, direct printing from a card is representatively described. However, the application range is not limited to this, and printing from a normal PC is also included. Further, not only the output device but also an input device such as a scanner can be applied with the same processing, and an effect can be obtained. Furthermore, the present invention may be applied to a complex system such as a copy composed of a plurality of devices, scanners, and printers.
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 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.
Claims (10)
そのうちの少なくとも一つの画像処理手段は、処理を実行する際に使用する係数を決定する処理係数決定手段を有する第一の画像処理手段であり、
前記処理係数決定手段は、他の第二の画像処理手段を利用して決定する処理係数決定手段であり、
前記処理係数決定手段により決定された処理係数を使用して、前記第一の画像処理手段を実行することを特徴とする画像処理装置。 In an image processing apparatus that applies a plurality of image processing means to an input image,
At least one of the image processing means is a first image processing means having a processing coefficient determining means for determining a coefficient to be used when executing the processing,
The processing coefficient determination means is a processing coefficient determination means that determines using another second image processing means,
An image processing apparatus, wherein the first image processing means is executed using the processing coefficient determined by the processing coefficient determination means.
そのうちの少なくとも一つの画像処理ステップは、処理を実行する際に使用する係数を決定する処理係数決定ステップを有する第一の画像処理ステップであり、
前記処理係数決定ステップは、他の第二の画像処理ステップを利用して決定する処理係数決定ステップであり、
前記処理係数決定ステップにより決定された処理係数を使用して、前記第一の画像処理ステップを実施することを特徴とする画像処理方法。 In an image processing method for performing a plurality of image processing steps on an input image,
At least one of the image processing steps is a first image processing step including a processing coefficient determination step for determining a coefficient to be used when executing the process.
The processing coefficient determination step is a processing coefficient determination step that is determined using another second image processing step,
An image processing method, wherein the first image processing step is performed using the processing coefficient determined by the processing coefficient determination step.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007200916A JP2009038582A (en) | 2007-08-01 | 2007-08-01 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007200916A JP2009038582A (en) | 2007-08-01 | 2007-08-01 | Image processing apparatus and image processing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2009038582A true JP2009038582A (en) | 2009-02-19 |
Family
ID=40440117
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007200916A Pending JP2009038582A (en) | 2007-08-01 | 2007-08-01 | Image processing apparatus and image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2009038582A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012118699A (en) * | 2010-11-30 | 2012-06-21 | Canon Inc | Image processing apparatus and method, and program |
-
2007
- 2007-08-01 JP JP2007200916A patent/JP2009038582A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012118699A (en) * | 2010-11-30 | 2012-06-21 | Canon Inc | Image processing apparatus and method, and program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4323748B2 (en) | Digital camera and control method thereof, image processing apparatus, image processing method, and image processing system | |
| JP4011933B2 (en) | Image processing apparatus and method | |
| JP5594382B2 (en) | Output image adjustment for image files | |
| JP3725454B2 (en) | Output image adjustment for image files | |
| CA2406350C (en) | Image processing method and apparatus, storage medium and program | |
| CN100473172C (en) | Image data output image adjustment device and method | |
| US7924326B2 (en) | Image quality adjustment processing device | |
| JP3964297B2 (en) | Image processing apparatus, image processing method, and program executed by computer | |
| JP4955082B2 (en) | Image processing apparatus, image forming apparatus, and image processing method | |
| WO2002065757A1 (en) | Apparatus and method for adjusting output image from image data | |
| JP4063290B2 (en) | Image processing apparatus, image processing program, and image processing method | |
| JP4226278B2 (en) | Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the same | |
| JP2003219191A (en) | Image processing apparatus and image forming apparatus using the same | |
| JP3667182B2 (en) | Image processing method and image processing apparatus | |
| JP4010306B2 (en) | Output image adjustment for image files | |
| JP2009038582A (en) | Image processing apparatus and image processing method | |
| JP2003060935A (en) | Output image adjustment method for image file | |
| JP2004080737A (en) | Imaging device, imaging method, computer program, and computer-readable recording medium | |
| JP4027117B2 (en) | Image processing apparatus and method | |
| JP4099366B2 (en) | Image processing apparatus, image reading apparatus, image forming apparatus, and image processing method | |
| JP3666439B2 (en) | Output image adjustment for image files | |
| JP5045808B2 (en) | Output image adjustment for image files | |
| JP2002344763A (en) | Image processing device | |
| JP4024735B2 (en) | Image processing method, image processing apparatus, image forming apparatus, imaging apparatus, and computer program | |
| JP3999157B2 (en) | Output image adjustment for image files |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20100201 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20100630 |