JP4788394B2 - Image processing apparatus, image processing method, and image processing program - Google Patents

Image processing apparatus, image processing method, and image processing program Download PDF

Info

Publication number
JP4788394B2
JP4788394B2 JP2006047846A JP2006047846A JP4788394B2 JP 4788394 B2 JP4788394 B2 JP 4788394B2 JP 2006047846 A JP2006047846 A JP 2006047846A JP 2006047846 A JP2006047846 A JP 2006047846A JP 4788394 B2 JP4788394 B2 JP 4788394B2
Authority
JP
Japan
Prior art keywords
brightness
color
color area
target
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006047846A
Other languages
Japanese (ja)
Other versions
JP2007228323A (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2006047846A priority Critical patent/JP4788394B2/en
Publication of JP2007228323A publication Critical patent/JP2007228323A/en
Application granted granted Critical
Publication of JP4788394B2 publication Critical patent/JP4788394B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、画像データの明るさを調整する画像処理装置、画像処理方法および画像処理プログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program that adjust the brightness of image data.

デジタルスチルカメラ(digital still camera)等の画像入力装置で作成される画像データは、撮像画像に基づいて作成され、カラー画像を画素毎に複数の要素色、例えばRGB(レッド、グリーン、ブルー)で階調表現したデータとされる。画像入力装置では、撮像画像に基づいて光源を推定する等の推定処理が行われ、適宜、露出調整などの画質調整が自動的に行われている。   Image data created by an image input device such as a digital still camera is created based on a captured image, and a color image is made up of a plurality of element colors for each pixel, for example, RGB (red, green, blue). The data is expressed in gradation. In the image input apparatus, estimation processing such as estimating a light source based on a captured image is performed, and image quality adjustment such as exposure adjustment is automatically performed as appropriate.

また、特許文献1の段落0087には、算出された特定色に対する「好ましい色の目標値」と元画像データの特性値テーブルから得られる特性値に応じて補正する補正量Thを算出し、元画像データに対して補正量だけ色補正を施した補正後画像データを得ることが記載されている。同文献の段落0088−0089に記載されるように、補正量Thは、ΔSSを特定色(肌色)の面積占有率、a,rを0〜1の定数として、0≦ΔSS≦aの場合にa(1−r)×(ΔSSr、a≦ΔSS≦1の場合に1−(1−a)1-r×(1−ΔSSrと、画像データに占める特定色領域(肌色領域)の面積占有率ΔSに応じた補正量とされている。
従って、元画像データの特定色領域(肌色領域)については、背景領域の色に関係なく一律に補正量Thだけ「好ましい色の目標値」へ色補正が施される。
特開2004−192614号公報
Further, in paragraph 0087 of Patent Document 1, a correction amount Th to be corrected is calculated according to the calculated “preferred color target value” and the characteristic value obtained from the characteristic value table of the original image data. It is described that image data after correction is obtained by performing color correction on the image data by a correction amount. As described in paragraphs 0088-0089 of the same document, the correction amount Th is set such that ΔS S is an area occupancy of a specific color (skin color), a and r are constants of 0 to 1, and 0 ≦ ΔS S ≦ a. In this case, a (1-r) × (ΔS S ) r , 1− (1-a) 1−r × (1−ΔS S ) r in the case of a ≦ ΔS S ≦ 1, and a specific color in the image data The correction amount is set in accordance with the area occupation ratio ΔS of the region (skin color region).
Therefore, for the specific color area (skin color area) of the original image data, the color correction is uniformly applied to the “preferred color target value” by the correction amount Th regardless of the color of the background area.
JP 2004-192614 A

画像入力装置で作成される種々の画像データを調べたところ、画像入力装置で適切な露出調整が行われていない場合があることが判った。そこで、画像入力装置で適切な露出調整が行われなかった場合でも、画像入力装置により作成された画像データの露出を適切に調整することが望まれていた。   Examination of various image data created by the image input device revealed that there were cases where appropriate exposure adjustment was not performed by the image input device. Therefore, it has been desired to appropriately adjust the exposure of the image data created by the image input device even when appropriate exposure adjustment is not performed by the image input device.

本発明は、画像入力装置により作成された画像データの明るさを適切に調整することを目的とする。   An object of the present invention is to appropriately adjust the brightness of image data created by an image input device.

課題を解決するための手段および発明の効果Means for Solving the Problems and Effects of the Invention

上記目的を達成するため、本発明は、画像入力装置により作成された画像データから所定の色領域を抽出する領域抽出手段と、抽出した色領域から当該色領域の明るさを取得する領域明るさ取得手段と、前記色領域の明るさを当該色領域について予め設定された目標の明るさにする明るさ補正を前記画像データに対して行う調整手段とを備える画像処理装置であって、背景明るさ取得手段を備え、前記調整手段は、前記目標の明るさよりも暗い第一の明るさより前記色領域の明るさが暗く、かつ、前記目標の明るさよりも暗い第二の明るさより前記背景の明るさが暗いとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする。   In order to achieve the above object, the present invention provides an area extracting means for extracting a predetermined color area from image data created by an image input device, and an area brightness for acquiring the brightness of the color area from the extracted color area. An image processing apparatus comprising: an acquisition unit; and an adjustment unit configured to perform brightness correction on the image data so that the brightness of the color area is set to a target brightness set in advance for the color area. Brightness adjustment means, wherein the adjustment means is such that the brightness of the color region is darker than the first brightness darker than the target brightness and the background brightness is lower than the second brightness darker than the target brightness. When the image is dark, brightness correction is performed on the image data with brightness lower than the target.

上記背景明るさ取得手段では、前記画像データから前記色領域の背景の代表色が抽出される。そして、上記調整手段により、色領域の明るさが第一の明るさより暗く、かつ、背景の明るさが第二の明るさより暗いとき、目標の明るさが下げられて画像データの明るさ補正が行われる。   In the background brightness acquisition means, a representative color of the background of the color region is extracted from the image data. Then, when the brightness of the color area is darker than the first brightness and the brightness of the background is darker than the second brightness, the target brightness is lowered and the brightness correction of the image data is performed by the adjusting means. Done.

画像入力装置で作成される種々の画像データを調べたところ、画像入力装置で適切な明るさ調整が行われない場合として、ストロボの光が十分でない等の理由により全体が非常に暗い画像が作成される場合があった。色領域の明るさを一律に目標の明るさにする明るさ補正を画像に対して行うと、全体に非常に暗い画像では画像にノイズが現れ、画像処理後の画質が意図したように向上しないことがある。特許文献1に記載の技術のように、特定色領域(肌色領域)を背景領域の色に関係なく一律に補正量Thだけ「好ましい色の目標値」へ色補正することでも、全体に非常に暗い画像では画像にノイズが現れてしまう。また、非常に暗い環境で撮像された画像だと、人は暗さに対する不自然感を小さく感じる傾向がある。そこで、全体に非常に暗い画像では明るさ補正の目標を暗い方向へ下げる方が画像の画質を向上させることができる。
本発明では、色領域の明るさが第一の明るさより暗く、かつ、背景の明るさが第二の明るさより暗いとき、目標の明るさが下げられるので、上述した不具合を解消することができる。従って、本発明によれば、画像入力装置で適切な明るさ調整が行われなかった場合でも、画像入力装置により作成された画像データの明るさを適切に調整することが可能になる。
Examining various image data created by the image input device, when the appropriate brightness adjustment is not performed by the image input device, a very dark image is created due to insufficient strobe light, etc. There was a case. If brightness correction is performed on an image to uniformly set the brightness of the color area to the target brightness, noise will appear in the image of an extremely dark image as a whole, and the image quality after image processing will not improve as intended. Sometimes. Even if the specific color area (skin color area) is uniformly color-corrected to the “desired color target value” by the correction amount Th regardless of the color of the background area as in the technique described in Patent Document 1, it is very much overall. Noise appears in the dark image. In addition, when an image is captured in a very dark environment, a person tends to feel less unnaturalness with respect to darkness. Therefore, for a very dark image as a whole, the image quality can be improved by lowering the brightness correction target in the dark direction.
In the present invention, when the brightness of the color area is darker than the first brightness and the brightness of the background is darker than the second brightness, the target brightness is lowered, so that the above-described problems can be solved. . Therefore, according to the present invention, it is possible to appropriately adjust the brightness of the image data created by the image input device even when the appropriate brightness adjustment is not performed by the image input device.

上記画像データは、例えば、カラー画像を画素毎の色成分量で表現した画像データとすることができる。同画素は、画像を表現できる数であればよく、複数画素の構成とすることができ、例えば8×8画素のような小画像を表現するものでもよい。前記色成分量は、例えば、複数の色成分を有する色空間における各色成分の多さを表す値とすることができる。
上記所定の色領域は、顔領域、肌色領域、空色領域、等が考えられ、多くの人に印象付けられる領域、人間が好ましいと感じる色再現に関係する領域、等とすることができる。上記目標の明るさは、人間が好ましいと感じる明るさ、記憶色の明るさ、人間の感覚に依存しない明度、等とすることができ、色領域や背景の明るさに応じて変化する明るさでもよいし、色領域や背景の明るさに関わらない一定の明るさでもよい。上記色領域の背景は、画像全体から前記色領域を除く全ての領域でもよいし、当該領域の一部の領域でもよい。上記明るさは、色座標平面および明度軸からなる色空間の明度、輝度、色成分値の平均、等で表される。色領域や背景の明るさは、色領域や背景の各画素の明るさを表す値の単純平均や重み付け平均、等で表される。上記明るさ補正は、画像データ全体へ一律に行ってもよいし、抽出した色領域のみ行ってもよい。
色座標平面および明るさ軸からなる色空間には、国際照明委員会(CIE)で規定されたCIE L***色空間、CIE L***色空間、等がある。ここで、L*は明度(明るさ)を表す色成分であり、a*,b*,u*,v*は色相および彩度を表す色成分である。以下、「*」を省略して記載する。
なお、明るさを下げることとは、明度を低くする等、暗くすることを意味する。
The image data can be, for example, image data expressing a color image with a color component amount for each pixel. The number of pixels may be any number as long as it can represent an image, and may have a configuration of a plurality of pixels. For example, a small image such as 8 × 8 pixels may be represented. The color component amount can be a value representing the number of each color component in a color space having a plurality of color components, for example.
The predetermined color area may be a face area, a skin color area, a sky blue area, or the like, and may be an area impressed by many people, an area related to color reproduction that humans feel preferable, or the like. The target brightness can be the brightness that humans feel desirable, the brightness of the memory color, the brightness that does not depend on human senses, etc., and the brightness that changes according to the brightness of the color area or background However, the brightness may be constant regardless of the brightness of the color area or the background. The background of the color area may be all areas except the color area from the entire image, or may be a partial area of the area. The brightness is represented by the brightness, brightness, average of color component values, and the like of a color space composed of a color coordinate plane and a brightness axis. The brightness of the color area or background is represented by a simple average or a weighted average of values representing the brightness of each pixel in the color area or background. The brightness correction may be performed uniformly on the entire image data, or only the extracted color region may be performed.
The color space composed of the color coordinate plane and the brightness axis includes a CIE L * a * b * color space and a CIE L * u * v * color space defined by the International Lighting Commission (CIE). Here, L * is a color component representing lightness (brightness), and a * , b * , u * , v * are color components representing hue and saturation. Hereinafter, “ * ” is omitted.
Note that decreasing the brightness means decreasing the brightness, for example, by decreasing the brightness.

前記目標の明るさは、前記背景の明るさと前記色領域の明るさとの差異に応じて変化する明るさとされてもよい。人に感じられる色領域の感覚的な明るさは背景の明るさとの差異により変わってくるので、画像入力装置により作成された画像の明るさをより適切に調整することが可能になる。
前記目標の明るさが前記背景の明るさと前記色領域の明るさとの差異に応じて人に感じられる前記色領域の感覚的な明るさの違いを補償するように決定されると、さらに適切に画像の明るさを調整することが可能になる。
ここで、上記差異は、例えば、背景の明るさを表す値と色領域の明るさを表す値との差、背景の明るさを表す値と色領域の明るさを表す値との比と1との差、等で表される。
The target brightness may be a brightness that changes according to a difference between the brightness of the background and the brightness of the color region. Since the sensory brightness of the color area perceived by a person changes depending on the difference from the brightness of the background, the brightness of the image created by the image input device can be adjusted more appropriately.
More suitably, when the target brightness is determined to compensate for a difference in sensory brightness of the color area perceived by a person according to a difference between the brightness of the background and the brightness of the color area It becomes possible to adjust the brightness of the image.
Here, the difference is, for example, the difference between the value representing the brightness of the background and the value representing the brightness of the color region, the ratio of the value representing the brightness of the background and the value representing the brightness of the color region, and 1 And the difference between

また、前記目標の明度よりも低い第一の明度より前記色領域の明度が低く、かつ、前記目標の明度よりも低い第二の明度より前記背景の明度が低いとき、前記背景の明度から前記色領域の明度を差し引いた明度差ΔLが所定範囲内で大きくなるほど連続的または段階的に大きくなる目標の明度を前記色領域の明るさよりも高い範囲内で低くしてもよい。これによっても、さらに適切に画像の明るさを調整することが可能になる。
なお、明度が離散的な値をとるようにされている場合、目標の明度は上記明度差ΔLが所定範囲内で大きくなるほど離散的な各値の全てをとりうるよう段階的に高くされてもよいし、より大きな間隔で段階的に高くされてもよい。
Further, when the lightness of the color region is lower than the first lightness lower than the target lightness and the lightness of the background is lower than the second lightness lower than the target lightness, the lightness of the background The target brightness that increases continuously or stepwise as the brightness difference ΔL obtained by subtracting the brightness of the color area increases within a predetermined range may be lowered within a range higher than the brightness of the color area. This also makes it possible to adjust the brightness of the image more appropriately.
When the lightness takes discrete values, the target lightness may be increased stepwise so that all of the discrete values can be obtained as the lightness difference ΔL increases within a predetermined range. Alternatively, it may be increased stepwise at larger intervals.

ところで、前記色領域の明るさが前記第一の明るさより暗く、かつ、前記背景の明るさが前記第二の明るさより暗いとき、前記色領域の明るさよりも明るい範囲内で前記色領域の明るさが明るくなるほど連続的または段階的に明るくなるように前記目標の明るさを下げてもよい。また、前記色領域の明るさが前記第一の明るさより暗く、かつ、前記背景の明るさが前記第二の明るさより暗いとき、前記目標の明るさを前記色領域の明るさよりも明るい範囲内で下げるとともに、前記第一の明るさよりも暗い第三の明るさより前記色領域の明るさが明るいときの前記目標の明るさを前記第三の明るさより前記色領域の明るさが暗いときの前記目標の明るさよりも明るくさせてもよい。すると、全体に暗い画像について、ノイズが現れない程度に明るくして適切に画質を向上させることが可能になる。   By the way, when the brightness of the color area is darker than the first brightness and the brightness of the background is darker than the second brightness, the brightness of the color area is within a range brighter than the brightness of the color area. The brightness of the target may be lowered so that the brightness increases continuously or stepwise as the brightness increases. Further, when the brightness of the color area is darker than the first brightness and the brightness of the background is darker than the second brightness, the target brightness is within a range brighter than the brightness of the color area. And the target brightness when the brightness of the color area is brighter than the third brightness that is darker than the first brightness, the target brightness when the brightness of the color area is darker than the third brightness. The brightness may be higher than the target brightness. Then, it becomes possible to brighten the dark image as a whole so that noise does not appear and appropriately improve the image quality.

また、本発明は、上記領域抽出手段と上記領域明るさ取得手段と調整手段とを備える画像処理装置であって、上記背景明るさ取得手段を備え、前記調整手段は、前記背景の明るさが前記色領域の明るさより明るく、前記背景の明るさと前記色領域の明るさとの差異が所定の差異より大きいとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする。
すなわち、上記調整手段により、背景の明るさが色領域の明るさより明るく、背景の明るさと色領域の明るさとの差異が所定の差異より大きいとき、目標の明るさが下げられて画像データの明るさ補正が行われる。
画像入力装置で作成される種々の画像データを調べたところ、画像入力装置で適切な明るさ調整が行われない場合として、逆光の条件で撮像されて画像が作成される場合があった。色領域の明るさを一律に目標の明るさにする明るさ補正を画像に対して行うと逆光条件下で作成された画像では画像にノイズが現れ、画像処理後の画質が意図したように向上しないことがある。特許文献1に記載の技術のように、特定色領域(肌色領域)を背景領域の色に関係なく一律に補正量Thだけ「好ましい色の目標値」へ色補正することでも、逆光条件下で作成された画像では画像にノイズが現れてしまう。そこで、逆光の条件で作成された画像では明るさ補正の目標を暗い方向へ下げる方が画像の画質を向上させることができる。
本発明では、背景の明るさが色領域の明るさより明るく、背景の明るさと色領域の明るさとの差異が所定の差異より大きいとき、目標の明るさが下げられるので、上述した不具合を解消することができる。従って、本発明によれば、画像入力装置で適切な明るさ調整が行われなかった場合でも、画像入力装置により作成された画像データの明るさを適切に調整することが可能になる。
In addition, the present invention is an image processing apparatus that includes the region extraction unit, the region brightness acquisition unit, and an adjustment unit. The image processing apparatus includes the background brightness acquisition unit, and the adjustment unit determines whether the background brightness is high. When the brightness of the color area is brighter and the difference between the brightness of the background and the brightness of the color area is larger than a predetermined difference, brightness correction is performed on the image data with brightness lower than the target. It is characterized by.
That is, when the brightness of the background is brighter than the brightness of the color area and the difference between the brightness of the background and the brightness of the color area is larger than the predetermined difference, the target brightness is lowered and the brightness of the image data is increased. Correction is performed.
When various image data created by the image input device was examined, there was a case where an image was created by taking an image under a backlight condition as a case where appropriate brightness adjustment was not performed by the image input device. When brightness correction is performed on an image to uniformly set the brightness of the color area to the target brightness, noise appears in the image created under backlight conditions, and the image quality after image processing is improved as intended There are things that do not. As in the technique described in Patent Document 1, the specific color area (skin color area) can be uniformly corrected to the “desired color target value” by the correction amount Th regardless of the color of the background area. In the created image, noise appears in the image. Therefore, in an image created under backlight conditions, the image quality can be improved by lowering the brightness correction target in the dark direction.
In the present invention, when the brightness of the background is brighter than the brightness of the color area and the difference between the brightness of the background and the brightness of the color area is larger than a predetermined difference, the target brightness is lowered, so the above-described problems are solved. be able to. Therefore, according to the present invention, it is possible to appropriately adjust the brightness of the image data created by the image input device even when the appropriate brightness adjustment is not performed by the image input device.

ここで、前記背景の明るさが前記色領域の明るさより明るく、前記背景の明るさと前記色領域の明るさとの差異が所定の差異より大きいとき、前記色領域の明るさよりも明るい範囲内で前記背景の明るさと前記色領域の明るさとの差異が大きくなるほど連続的または段階的に前記目標の明るさを下げてもよい。すると、逆光の条件で作成された画像について、ノイズが現れない程度に明るくして適切に画質を向上させることが可能になる。
また、前記背景の明度から前記色領域の明度を差し引いた明度差ΔLが所定の明度差ΔLthより大きいとき、前記色領域の明度よりも高い範囲内で前記明度差ΔLが大きくなるほど連続的または段階的に前記目標の明度を低くしてもよい。これによっても、逆光の条件で作成された画像について、ノイズが現れない程度に明るくして適切に画質を向上させることが可能になる。
Here, when the brightness of the background is brighter than the brightness of the color area, and the difference between the brightness of the background and the brightness of the color area is larger than a predetermined difference, the brightness within the range brighter than the brightness of the color area. The target brightness may be decreased continuously or stepwise as the difference between the brightness of the background and the brightness of the color area increases. Then, the image created under the backlight condition can be brightened to such an extent that noise does not appear, and the image quality can be appropriately improved.
Further, when the lightness difference ΔL obtained by subtracting the lightness of the color area from the lightness of the background is larger than a predetermined lightness difference ΔLth, the lightness difference ΔL increases continuously within a range higher than the lightness of the color area. Alternatively, the lightness of the target may be lowered. This also makes it possible to appropriately improve the image quality by making the image created under backlight conditions bright enough to prevent noise from appearing.

さらに、請求項9に係る発明によれば、さらに適切に画像データの明るさを調整することが可能になる Further, according to the ninth aspect of the present invention, the brightness of the image data can be adjusted more appropriately .

上述した画像処理装置は、ある機器に組み込まれた状態で他の方法とともに実施されることもある等、各種の態様を含む。例えば、画像処理後の画像データを印刷させる制御を行う印刷制御装置や、さらに印刷装置を備える印刷システム、等としても適用可能である。
また、上述した装置の構成に対応した工程を有する制御方法や、上述した装置の構成に対応した機能をコンピュータに実現させるプログラムとしても適用可能であり、画像処理方法や画像処理プログラム等の発明も、同様の作用、効果を奏する。さらに、前記プログラムを記録したコンピュータ読み取り可能な記録媒体としても適用可能である。むろん、請求項2〜9に記載した構成も、前記方法や前記システムや前記プログラムや前記記録媒体に適用可能である。
The above-described image processing apparatus includes various modes such as being implemented together with other methods in a state of being incorporated in a certain device. For example, the present invention can be applied to a print control apparatus that performs control for printing image data after image processing, a printing system that further includes a printing apparatus, and the like.
Further, the present invention can also be applied to a control method having a process corresponding to the configuration of the above-described apparatus and a program that causes a computer to realize a function corresponding to the configuration of the above-described apparatus. Inventions such as an image processing method and an image processing program are also possible. Has the same action and effect. Furthermore, the present invention can also be applied as a computer-readable recording medium that records the program. Of course, configurations described in claims 2 to 9 are also applicable to the method, the system, the program, and the recording medium.

以下、下記の順序に従って本発明の実施形態を説明する。
(1)画像処理装置を含む印刷システムの構成:
(2)画像処理の動作および作用:
(3)変形例:
Hereinafter, embodiments of the present invention will be described in the following order.
(1) Configuration of printing system including image processing apparatus:
(2) Image processing operations and effects:
(3) Modification:

(1)画像処理装置を含む印刷システムの構成:
図1は本発明の一実施形態である画像処理を模式的に示す図、図2は本発明の一実施形態に係る画像処理装置を含む印刷制御装置U0の構成を模式的に示すブロック図、図3は本印刷制御装置U0を含む印刷システムの構成の概略を示すブロック図、図4は色領域とする色範囲R11をab平面にて模式的に示す図、図5は画像データDA2から色領域R1を抽出する様子を模式的に示す図、図6は背景の明度に応じて変化する感覚的な明度Jを補償する様子を模式的に示す図、図7は暗い画像における色領域の明度の補正目標を模式的に示す図、図8と図9は本印刷制御装置U0が行う印刷制御処理を示すフローチャート、図10は画像データの明るさを補正する様子を模式的に示す図、図11はデジタルスチルカメラが行う色調整処理とその変換特性とを模式的に示す図、図12はデジタルスチルカメラの構成を模式的に示すブロック図である。本印刷システムは、本発明の画像処理装置となるパーソナルコンピュータ(PC)10、カラー印刷可能なインクジェットプリンタ(印刷装置)20等から構成されている。むろん、本発明に用いられるコンピュータは、PCに限定されない。
(1) Configuration of printing system including image processing apparatus:
FIG. 1 is a diagram schematically illustrating image processing according to an embodiment of the present invention. FIG. 2 is a block diagram schematically illustrating the configuration of a print control apparatus U0 including an image processing apparatus according to an embodiment of the present invention. 3 is a block diagram showing an outline of the configuration of a printing system including the printing control apparatus U0. FIG. 4 is a diagram schematically showing a color range R11 as a color area on the ab plane. FIG. FIG. 6 is a diagram schematically illustrating how the region R1 is extracted, FIG. 6 is a diagram schematically illustrating how the sensory brightness J that changes according to the brightness of the background is compensated, and FIG. 7 is the brightness of the color region in a dark image. FIG. 8 and FIG. 9 are flowcharts showing print control processing performed by the print control apparatus U0. FIG. 10 is a diagram schematically showing how the brightness of image data is corrected. 11 is a color adjustment process performed by the digital still camera; Diagram schematically showing a conversion characteristic of FIG. 12 is a block diagram schematically showing a configuration of a digital still camera. The printing system includes a personal computer (PC) 10 which is an image processing apparatus of the present invention, an inkjet printer (printing apparatus) 20 capable of color printing, and the like. Of course, the computer used in the present invention is not limited to a PC.

PC10では、CPU11がシステムバス10aを介してPC全体を制御する。同バス10aには、半導体メモリ12,13、各種ドライブ15,16、各種インターフェイス(I/F)17a〜e、等が接続され、ハードディスクドライブを介してハードディスク(磁気ディスク)14も接続されている。本発明の画像処理プログラム14aは、ハードディスク(HD)14に記憶され、CPU11によってRAM13に転送され、実行される。また、HD14は、Lab色空間のような所定の色空間を定義するための情報(色空間情報14b)、顔領域のような色領域を抽出するための情報(色抽出情報14c)、色領域の目標の明るさを表す目標の明るさ情報14d、ストロボ未達条件のような暗い画像であるか否かを判別するための閾値14e,f、逆光条件の画像であるか否かを判別するための閾値14g、明るさを下げた修正目標の明るさ情報14h、色変換LUT(色変換テーブル)、各種閾値、等を記憶(記録)した所定の情報記憶領域(情報記録領域)とされている。RAM13には、一時的に、画像データ13a、当該画像データ上の色領域の範囲を表す色領域情報DA3、当該色領域の明るさを表す領域明るさ情報DA4、当該色領域の背景の明るさを表す背景明るさ情報DA5、等が格納される。
本画像処理プログラムは、プリンタドライバ等のオペレーティングシステム(OS)、アプリケーションプログラム(APL)、OSとAPL、のいずれにより構成してもよい。本プログラムを記録した媒体は、HD以外にも、CD−ROM15a、フレキシブルディスク、半導体メモリ、等でもよい。また、通信I/F17dをインターネット網に接続し、所定のサーバから本発明のプログラムをダウンロードして実行してもよい。
In the PC 10, the CPU 11 controls the entire PC via the system bus 10a. The bus 10a is connected to semiconductor memories 12, 13, various drives 15, 16, various interfaces (I / F) 17a to 17e, etc., and a hard disk (magnetic disk) 14 is also connected via a hard disk drive. . The image processing program 14a of the present invention is stored in the hard disk (HD) 14, transferred to the RAM 13 by the CPU 11, and executed. The HD 14 also includes information for defining a predetermined color space such as a Lab color space (color space information 14b), information for extracting a color area such as a face area (color extraction information 14c), a color area The target brightness information 14d representing the target brightness, threshold values 14e and f for determining whether or not the image is a dark image such as a strobe failure condition, and whether or not the image is in a backlight condition For a predetermined information storage area (information recording area) for storing (recording) threshold value 14g, brightness information 14h for a corrected target with reduced brightness, color conversion LUT (color conversion table), various threshold values, and the like. Yes. The RAM 13 temporarily stores image data 13a, color area information DA3 indicating the range of the color area on the image data, area brightness information DA4 indicating the brightness of the color area, and the brightness of the background of the color area. Is stored.
This image processing program may be configured by any of an operating system (OS) such as a printer driver, an application program (APL), and OS and APL. In addition to the HD, the medium storing this program may be a CD-ROM 15a, a flexible disk, a semiconductor memory, or the like. Further, the communication I / F 17d may be connected to the Internet network, and the program of the present invention may be downloaded from a predetermined server and executed.

周辺機器I/F17a(例えばUSB I/F)には、デジタルスチルカメラ(DSC)50、デジタルビデオカメラ、等の画像入力装置が接続可能である。CRT I/F17bにはカラー画像データに基づいて当該データに対応する画像を表示するディスプレイ18aが接続され、入力I/F17cにはキーボード18bやポインティングデバイス(マウス18c)が操作用入力機器として接続され、プリンタI/F17eには例えばシリアルI/Fケーブルを介してプリンタ20が接続される。   An image input device such as a digital still camera (DSC) 50 or a digital video camera can be connected to the peripheral device I / F 17a (for example, USB I / F). The CRT I / F 17b is connected with a display 18a for displaying an image corresponding to the data based on the color image data, and the input I / F 17c is connected with a keyboard 18b and a pointing device (mouse 18c) as operation input devices. The printer 20 is connected to the printer I / F 17e via, for example, a serial I / F cable.

DSC50は、例えば図12に示すように、光学部52と制御部54から構成される。図示の光学部52では、CPU54cにコントローラ52eが接続され、該コントローラにオートフォーカスコントローラ52dとCCDユニット52fとオートゲインコントローラ(AGC)52hとストロボ52gとが接続され、オートフォーカスコントローラ52dにオートフォーカス機構52bと測距部52cとが接続され、オートフォーカス機構52bにレンズ52aが接続され、バス54aにA/D変換回路52iが接続され、該A/D変換回路にAGC52hが接続され、該AGCにCCDユニット52fが接続されている。制御部54では、バス54aに、CPU54b、ROM54c、RAM54d、LCDパネル54f、操作パネル54e、I/O回路54g,hが接続され、前記I/O回路54gにメモリカード54iが接続され、I/O回路54hにPCのI/F17aが接続される。   For example, as shown in FIG. 12, the DSC 50 includes an optical unit 52 and a control unit 54. In the illustrated optical unit 52, a controller 52e is connected to a CPU 54c, and an autofocus controller 52d, a CCD unit 52f, an auto gain controller (AGC) 52h, and a strobe 52g are connected to the controller 54, and an autofocus mechanism is connected to the autofocus controller 52d. 52b and a distance measuring unit 52c are connected, a lens 52a is connected to the autofocus mechanism 52b, an A / D conversion circuit 52i is connected to the bus 54a, an AGC 52h is connected to the A / D conversion circuit, and the AGC is connected to the AGC. A CCD unit 52f is connected. In the control unit 54, the CPU 54b, ROM 54c, RAM 54d, LCD panel 54f, operation panel 54e, I / O circuits 54g, h are connected to the bus 54a, and a memory card 54i is connected to the I / O circuit 54g. The PC I / F 17a is connected to the O circuit 54h.

被写体を撮像すると、該被写体からの光がレンズ52aを介してCCDユニット52fに入射し、該CCDユニットの各撮像素子にて生成されるアナログ電気信号がAGC52hを介してA/D変換回路52hに入力される。すると、CPU54bの処理により、撮像素子毎のデジタル値がA/D変換回路52hから読み出されて撮像画像を画素毎に複数の要素色(例えばRGB)で階調表現した画像データが生成され、RAM54dのワークエリアに格納される。生成される画像データの各要素色の階調値は、CCDユニットの各撮像素子に入射した光の量に略比例する値とされている。なお、光の量は、各撮像素子の受光面の単位面積当たりに入射する光の輝度と露光時間の積で定義され、Rの階調値であれば光のR成分の輝度と露光時間の積とされる。従って、各要素色の階調値は、光の各要素色の成分についての輝度と露光時間の積に略比例する値とされる。   When the subject is imaged, light from the subject enters the CCD unit 52f via the lens 52a, and an analog electrical signal generated by each imaging element of the CCD unit is sent to the A / D conversion circuit 52h via the AGC 52h. Entered. Then, by the processing of the CPU 54b, a digital value for each image sensor is read from the A / D conversion circuit 52h, and image data in which the captured image is expressed in gradation with a plurality of element colors (for example, RGB) for each pixel is generated. It is stored in the work area of the RAM 54d. The gradation value of each element color of the generated image data is a value that is substantially proportional to the amount of light incident on each image sensor of the CCD unit. The amount of light is defined as the product of the brightness of light incident per unit area of the light receiving surface of each image sensor and the exposure time. If the gradation value is R, the brightness of the R component of the light and the exposure time Product. Therefore, the gradation value of each element color is a value that is substantially proportional to the product of the luminance and the exposure time for each component color component of light.

ここで、人間の目に感じられる光の強さは光の量に比例しないため、DSC50は、人間の目に感じられる光の強さに比例するように各要素色の階調値を変換する。また、DSCは、適宜、撮像画像の画像データに基づいて露出等を調整する処理を行う。
上述した画質調整の処理が行われた画像データは、RAM54dの画像エリアに格納され、適宜、I/O回路54hからPC10へ出力されたり、メモリカード54iに記憶されたりする。
Here, since the intensity of light perceived by the human eye is not proportional to the amount of light, the DSC 50 converts the gradation value of each element color so as to be proportional to the intensity of light perceived by the human eye. . In addition, the DSC appropriately performs a process for adjusting the exposure and the like based on the image data of the captured image.
The image data subjected to the above-described image quality adjustment processing is stored in the image area of the RAM 54d, and is appropriately output from the I / O circuit 54h to the PC 10 or stored in the memory card 54i.

図11の下段のグラフはDSCの色調整処理の特性、すなわち、DSCの変換特性に相当する入出力特性を示している。同図の上段のグラフは、当該色調整処理の特性を4つに分割した入出力特性を示している。各グラフにおいて、横軸は入力値、縦軸は出力値であり、各入力値が実線で示す特性に従ってグラフ上で対応する出力値に変換されることを示している。なお、破線で示す直線は入力値と出力値が等しい場合の特性を示している。グラフ5では、横軸が光の量、縦軸が画像データ15aであり、本実施形態ではRGBの各色成分について同様の入出力特性である。従って、DSCでは、各CCD撮像素子で取得するRGB毎の光の量をグラフ5に示す入出力特性で変換し、画像データにおけるRGB毎の階調値を取得していると考えることができる。ここで、RGB毎の光の量をYと表記し、DSCの変換特性に基づく出力値をF-1(Y)と表記する。このYは、露出時間が一定であれば輝度に相当する。 The lower graph in FIG. 11 shows DSC color adjustment processing characteristics, that is, input / output characteristics corresponding to DSC conversion characteristics. The upper graph in the figure shows input / output characteristics obtained by dividing the characteristics of the color adjustment processing into four. In each graph, the horizontal axis represents an input value and the vertical axis represents an output value, which indicates that each input value is converted into a corresponding output value on the graph according to the characteristics indicated by the solid line. A straight line indicated by a broken line indicates a characteristic when the input value is equal to the output value. In the graph 5, the horizontal axis represents the amount of light and the vertical axis represents the image data 15a. In this embodiment, the input / output characteristics are the same for each of the RGB color components. Therefore, in DSC, it can be considered that the amount of light for each RGB acquired by each CCD image sensor is converted by the input / output characteristics shown in graph 5, and the gradation value for each RGB in the image data is acquired. Here, the amount of light for each RGB is expressed as Y, and the output value based on the conversion characteristics of DSC is expressed as F −1 (Y). This Y corresponds to the luminance if the exposure time is constant.

グラフ1〜4は、DSC独自の色調整処理を抽出するために上記変換特性を分割して得られる入出力特性であり、グラフ1,グラフ3,グラフ4は階調値の表色系を変換する意味合いの調整処理、グラフ2は画像の見栄えを良くするための調整処理である。DSCのメーカーは画像の見栄えを良くするために独自の色調整処理を実施しているが、当該画像の見栄えは、人間の目にとってRGB各色が人間の目にどのように知覚されるのかを考慮しながら決定される。そこで、光の量に応じた信号をsRGB規格の信号に変換する処理の中に人間の目による知覚を評価し易い状態の信号で見栄えを向上させる処理が含まれていると想定し、上記グラフ1〜4のように色調整処理を分解した。すなわち、グラフ1は、光の量に比例した値を人間の目に知覚される明るさに比例した値に変換するための特性である。グラフ2は、人間の目に知覚される明るさに比例した値を画像の見栄えを向上させる値に変換するための特性である。グラフ3とグラフ4は、画像の見栄えを向上させる値をsRGB規格の信号に変換するための特性である。   Graphs 1 to 4 are input / output characteristics obtained by dividing the above conversion characteristics in order to extract DSC-specific color adjustment processing. Graphs 1, 3, and 4 convert the color system of gradation values. Meaning adjustment processing, graph 2 is adjustment processing for improving the appearance of the image. The DSC manufacturer performs its own color adjustment process to improve the appearance of the image, but the appearance of the image takes into account how each RGB color is perceived by the human eye. While determined. Therefore, it is assumed that the process of converting the signal according to the amount of light into the signal of the sRGB standard includes a process of improving the appearance with a signal in a state where it is easy to evaluate the perception by the human eye, and the graph The color adjustment process was disassembled as in 1-4. That is, the graph 1 is a characteristic for converting a value proportional to the amount of light into a value proportional to the brightness perceived by the human eye. Graph 2 is a characteristic for converting a value proportional to the brightness perceived by the human eye into a value that improves the appearance of the image. Graphs 3 and 4 are characteristics for converting values that improve the appearance of the image into signals of the sRGB standard.

具体的には、グラフ1の横軸は光の量Yであり、縦軸は明度L*に相当する値(後述のsL*)である。すなわち、明度L*の値が増加するとその値の変化に比例して人間に知覚される明るさが変化するので、3刺激値の輝度を明度L*に変換するCIE Labの式
*=116Y-1/3−16 …(1)
を利用すれば、光の量Yを明度L*に相当する値へ変換する特性を記述することができる。DSCはRGBの色毎に光の量Yを示す信号を取得するが、RGB各色の光量Yを式(1)に代入すると、人間に知覚される明るさと比例関係にある階調値をRGBの色毎に取得することができる。本実施形態では、この値をsL*と呼ぶ。
Specifically, the horizontal axis of the graph 1 is the amount of light Y, and the vertical axis is a value (sL * described later) corresponding to the lightness L * . That is, when the value of the lightness L * increases, the brightness perceived by humans changes in proportion to the change in the value. Therefore, the CIE Lab formula L * = 116Y for converting the brightness of the tristimulus values into the lightness L * -1/3 -16 (1)
Can be used to describe the characteristic of converting the amount of light Y into a value corresponding to the lightness L * . The DSC acquires a signal indicating the amount of light Y for each RGB color, but if the light amount Y of each RGB color is substituted into Equation (1), a gradation value proportional to the brightness perceived by human beings is converted to RGB. It can be acquired for each color. In the present embodiment, this value is referred to as sL * .

グラフ2の横軸は上記sL*であり、縦軸は画像の見栄えを向上するための変換がなされた値であって、本実施形態ではこの値をpL*と呼ぶ。この入出力特性は、DSCのメーカーが独自に決定するものであるが、本願出願人の解析によれば、メーカー毎にわずかな相違があるものの、各メーカーの入出力特性は略同じ特性で記述できることが判明している。すなわち、グラフ2に示すように、中間調以下では入力値をより小さな出力値に変換し、中間調以上では入力値をより大きな出力値に変換するS字カーブ(pL*=G(sL*))によって入出力特性を記述できる。この入出力特性G(sL*)により、多数のメーカーが独自に決定したはずの色調整処理を記述することができた。すなわち、多数のメーカーの色調整処理をグラフ1〜4のように解析し、グラフ2に相当する入出力特性を抽出すると、概ね、グラフ2に示すような略S字のカーブとなり、階調が50%程度で変化率が概ね1.1〜1.4であった。また、肌色の輝度に相当する階調70%の近辺で変化率が1であった。そこで、グラフ2に示すように入出力特性G(sL*)を決定すれば、多数のメーカーが独自に決定した色調整処理とほぼ同様の特性を記述することができる。 The horizontal axis of the graph 2 is the sL * , and the vertical axis is a value that has been converted to improve the appearance of the image. In the present embodiment, this value is called pL * . This input / output characteristic is determined independently by the DSC manufacturer, but according to the analysis of the applicant of the present application, although there is a slight difference for each manufacturer, the input / output characteristics of each manufacturer are described with substantially the same characteristics. It has been found that it can be done. That is, as shown in the graph 2, an S-curve (pL * = G (sL * )) that converts an input value to a smaller output value below the halftone and converts the input value to a larger output value above the halftone. ) Can describe input / output characteristics. With this input / output characteristic G (sL * ), it was possible to describe a color adjustment process that should be uniquely determined by many manufacturers. That is, when the color adjustment processing of a large number of manufacturers is analyzed as shown in graphs 1 to 4 and the input / output characteristics corresponding to graph 2 are extracted, an approximately S-shaped curve as shown in graph 2 is obtained. The rate of change was approximately 1.1 to 1.4 at about 50%. The rate of change was 1 in the vicinity of a gradation of 70% corresponding to the skin color luminance. Therefore, if the input / output characteristic G (sL * ) is determined as shown in the graph 2, it is possible to describe characteristics that are almost the same as the color adjustment processing that is uniquely determined by many manufacturers.

グラフ3では横軸が上述のpL*、縦軸が光の量に相当する値pYである。グラフ4では、横軸が当該光の量に相当する値pY、縦軸が画像データDA1における階調値である。図11に示す各入出力特性はRGB毎に適用されるため、グラフ4においてもRGB毎に値を取得することができる。ここで、グラフ3とグラフ4は、上記pL*からsRGB規格に従った画像データを取得するための入出力変換である。sRGB規格では、RGBの各データを各色の光の量Yの(1/2.2)乗に比例するデータとして取得する。そこで、グラフ3では、明度に相当する上記pL*から光の量に相当する値をCIE Labの式によって取得する。
pY=((pL*+16)/116)3 …(2)
In graph 3, the horizontal axis represents the above-described pL * , and the vertical axis represents the value pY corresponding to the amount of light. In the graph 4, the horizontal axis represents the value pY corresponding to the amount of light, and the vertical axis represents the gradation value in the image data DA1. Since each input / output characteristic shown in FIG. 11 is applied to each RGB, a value can also be acquired for each RGB in the graph 4. Here, graphs 3 and 4 are input / output conversions for acquiring image data in accordance with the sRGB standard from the pL * . In the sRGB standard, each RGB data is acquired as data proportional to the (1 / 2.2) th power of the amount Y of light of each color. Therefore, in the graph 3, a value corresponding to the amount of light is obtained from the above-described pL * corresponding to lightness by the CIE Lab equation.
pY = ((pL * + 16) / 116) 3 (2)

以上の変換により画像の見栄えを向上するための変換がなされた後の光の量pYを取得することができるので、グラフ4では、この光量pYに対して以下の式に基づいてγ変換を適用する。
RGB=pY1/2.2 …(3)
ここで、RGBはRGB各色のデータである。なお、式(3)においては、光の量Yの(1/2.2)乗に比例するデータを算出できればよく、右辺に係数を乗じるなどしてもよい。
以上の解析により、グラフ1〜グラフ4の入出力特性を重畳した入出力特性のグラフ5を作成することにより、DSCの各メーカーにおける色調整処理とほぼ同様の特性を記述することができる。そこで、グラフ5に示す変換特性F-1(Y)とその逆の正変換特性Y=F(RGB)を示す情報テーブルを変換特性データとしてHD14等に記憶しておく。この結果、正変換特性F(RGB)によって画像データDA1を光の量に比例する値に変換することができるし、変換特性F-1(Y)によって光の量に比例する値を画像データDA1に変換することができる。
Since the light amount pY after the conversion for improving the appearance of the image can be obtained by the above conversion, in the graph 4, the γ conversion is applied to the light amount pY based on the following expression. To do.
RGB = pY 1 / 2.2 (3)
Here, RGB is data of each color of RGB. In Expression (3), it is only necessary to calculate data proportional to the (1 / 2.2) th power of the amount of light Y, and the right side may be multiplied by a coefficient.
By generating the graph 5 of the input / output characteristics in which the input / output characteristics of the graphs 1 to 4 are superimposed by the above analysis, characteristics similar to those of the color adjustment processing in each DSC manufacturer can be described. Therefore, an information table indicating the conversion characteristic F −1 (Y) shown in the graph 5 and the reverse normal conversion characteristic Y = F (RGB) is stored in the HD 14 or the like as conversion characteristic data. As a result, the image data DA1 can be converted to a value proportional to the amount of light by the positive conversion characteristic F (RGB), and the value proportional to the amount of light can be converted by the conversion characteristic F -1 (Y). Can be converted to

本実施形態のプリンタ20は、CMYK(シアン、マゼンタ、イエロー、ブラック)の各色に対応して設けられた各インクカートリッジ28に充填された各インクを印刷ヘッド29a〜dから吐出して印刷媒体にインクのドットを形成して印刷する装置であるものとする。むろん、プリンタ20には、ライトシアン(前記シアンの淡色)、ライトマゼンタ(前記マゼンタの淡色)、ダークイエロー(前記イエローの濃色)、レッド、バイオレット、灰色(前記ブラックの淡色)、淡灰色(前記灰色の淡色)、無着色インク(光沢感改善インク)、等も使用するプリンタ、CMYKのいずれかのインクを使用しないプリンタ、インク通路内に泡を発生させてインクを吐出するバブル方式のプリンタのような各種インク噴射式プリンタ、トナーインクを使用するレーザープリンタ、等も採用可能である。印刷媒体には、光沢紙(例えば写真用紙)等が含まれる塗被紙の印刷媒体、普通紙や再生紙等が含まれる非塗被紙の印刷媒体がある。   The printer 20 according to the present embodiment ejects each ink filled in each ink cartridge 28 provided corresponding to each color of CMYK (cyan, magenta, yellow, black) from the print heads 29a to 29d onto a print medium. It is assumed that the apparatus forms and prints ink dots. Of course, the printer 20 includes light cyan (light cyan), light magenta (light magenta), dark yellow (dark yellow), red, violet, gray (light black), light gray (light above). Printers that use non-colored ink (glossy light ink), etc., printers that do not use any of the CMYK inks, and bubble-type printers that generate bubbles in the ink path and eject ink. Such various ink jet printers, laser printers using toner ink, and the like can also be employed. Examples of the print medium include a coated paper print medium including glossy paper (for example, photographic paper) and a non-coated paper print medium including plain paper and recycled paper.

本プリンタ20では、図示の各部21〜27等がバス20aを介して接続され、CPU21がROM22に書き込まれたプログラムに従って各部を制御する。キャリッジ機構27aにて主走査方向に往復動するキャリッジには、各インクカートリッジ28を装着したカートリッジホルダ32が設けられているとともに、印刷ヘッド29a〜dを備える印刷ヘッドユニット29が搭載されている。ヘッド駆動部26aは、ASIC26からラスタデータ(印刷データ)に対応する印加電圧データを入力してピエゾ素子への印加電圧パターンを生成し、該素子を内蔵する印刷ヘッド29a〜dに4色のインク滴をドット単位で吐出させる。I/F27に接続されたキャリッジ機構27aや紙送り機構27bは、印刷ヘッドユニット29を主走査させたり、適宜改ページ動作を行いながらシート状の印刷媒体を順次送り出して副走査を行ったりする。本プリンタ20は、PCのプリンタI/F17eと接続された通信I/O24を介してPC10から色別の印刷データ(ラスタデータ)を受信し、該印刷データに基づいて、該印刷データに対応する画像を印刷媒体上に形成する。   In the printer 20, the illustrated units 21 to 27 are connected via a bus 20 a, and the CPU 21 controls each unit according to a program written in the ROM 22. The carriage that reciprocates in the main scanning direction by the carriage mechanism 27a is provided with a cartridge holder 32 in which each ink cartridge 28 is mounted, and a print head unit 29 including print heads 29a to 29d. The head drive unit 26a receives the applied voltage data corresponding to the raster data (print data) from the ASIC 26 to generate an applied voltage pattern to the piezo element, and the four color inks are applied to the print heads 29a to 29d including the element. Drop droplets in dots. The carriage mechanism 27a and the paper feed mechanism 27b connected to the I / F 27 cause the print head unit 29 to perform main scanning, or sequentially feed sheet-like print media while performing page break operations as appropriate, and perform sub-scanning. The printer 20 receives color-specific print data (raster data) from the PC 10 via the communication I / O 24 connected to the printer I / F 17e of the PC, and corresponds to the print data based on the print data. An image is formed on the print medium.

図2に示す印刷制御装置U0は、画像処理装置U1〜U5と印刷制御部U6とを備え、画像処理プログラムを含む印刷制御プログラムとPC10のハードウェアとが協働することにより構築される。情報記憶領域(情報記録領域)U5は、HD14に設けられ、上述した各種情報14b〜h等が記憶されている。
領域抽出部(領域抽出手段)U1は、各部U11,U12を備え、画像入力装置50により作成された多階調(例えば256階調)の画像データDA1から所定の色領域を抽出する。画像入力部U11は、画像入力装置で作成された画像データDA1を入力し、カラー画像を画素毎に複数の要素色RGBで階調表現(例えば256階調で表現)したRGBデータDA2(画像データの一種)に変換する。領域取得部U12は、画像データDA1から所定の色領域を抽出し、当該色領域の範囲を表す色領域情報DA3を生成する。
The print control device U0 shown in FIG. 2 includes image processing devices U1 to U5 and a print control unit U6, and is constructed by cooperation of a print control program including an image processing program and hardware of the PC 10. The information storage area (information recording area) U5 is provided in the HD 14, and stores the various information 14b to h described above.
The area extracting unit (area extracting unit) U1 includes units U11 and U12, and extracts a predetermined color area from multi-gradation (for example, 256 gradations) image data DA1 created by the image input device 50. The image input unit U11 inputs image data DA1 created by the image input device, and RGB data DA2 (image data) that represents a color image with a plurality of element colors RGB for each pixel (for example, 256 gradations). Type). The area acquisition unit U12 extracts a predetermined color area from the image data DA1, and generates color area information DA3 representing the range of the color area.

上記色領域としては、人物の顔の領域を表す顔領域、人物の肌の領域を表す肌色領域、空の領域を表す空色領域、夕焼けの領域を表す夕焼け色領域、植物の領域を表す緑色領域、雪の領域を表す雪色領域、海や湖や河川の領域を表す色領域、等がある。画像データDA1が人物画像を含むカラー画像を画素毎に複数の要素色で階調表現したデータである場合、図5に示すように、RGBデータDA2は人物画像を含むカラー画像を画素毎に要素色RGBで階調表現した画像データとされる。このRGBデータDA2は、前記人物画像の顔領域が含まれると想定される。
図5に示す画像データDA2から顔領域R1を抽出する場合、例えば、画像データDA2を構成する各画素P1について顔色として想定される色の範囲内であるか否かを判別し、当該範囲内と判別した画素を顔領域として抽出する。顔色として想定される色の範囲は、例えば、図4に示すように、顔領域の色の目標(Lab色空間の目標点T)を含むLab色空間のab平面の色範囲R11で定義することができる。むろん、顔色として想定される色の範囲は、「人物の肌の色」として一般的に多くの人がイメージとして記憶している色の範囲を彩度Sと色相Hとで定義した範囲、特開2004-192614号公報に記載されるように(財)日本色彩研究所が出版している「スキントーンカラー」の範囲である色相(H)1YR〜9YR;彩度(C)3,4および5、「好ましい肌色」(目標点T)のab平面の座標を(at,bt)とし所定の差をEt(0<Et<100)として{(a−at)2+(b−bt)21/2≦Etを満たすab平面での範囲(a,b)、これらの条件を満たして明度Lが所定範囲内となる範囲、等と定義してもよい。
顔領域以外の色領域を抽出するための色範囲も、図4に示すように、色領域R1の目標点Tを含む所定の色空間の色座標平面の色範囲R11で色領域R1として想定される色の範囲を定義することができる。色範囲R11を表す情報は、色抽出情報14cとして情報記憶領域U5に記憶されている。そして、色抽出情報14cを参照して、図5に示すように画像データDA2を構成する各画素P1について色範囲R11内であるか否かを判別し、当該色範囲内と判別した画素を色領域R1として抽出すればよい。
The color area includes a face area representing a human face area, a skin color area representing a human skin area, a sky blue area representing a sky area, a sunset color area representing a sunset area, and a green area representing a plant area. A snow-colored region representing a snow region, a color region representing a sea, lake, or river region. When the image data DA1 is data in which a color image including a person image is expressed in gradation with a plurality of element colors for each pixel, as shown in FIG. 5, the RGB data DA2 includes a color image including a person image for each pixel. The image data is expressed in gradation by color RGB. This RGB data DA2 is assumed to include the face area of the person image.
When the face area R1 is extracted from the image data DA2 shown in FIG. 5, for example, it is determined whether or not each pixel P1 constituting the image data DA2 is within the range of colors assumed as the face color. The determined pixel is extracted as a face area. For example, as shown in FIG. 4, the color range assumed as the face color is defined by a color range R11 on the ab plane of the Lab color space including the color target of the face area (target point T in the Lab color space). Can do. Of course, the color range assumed as the face color is a range defined by saturation S and hue H as a color range that is generally stored as an image by many people as a “person's skin color”. As described in Japanese Utility Model Publication No. 2004-192614, hue (H) 1YR to 9YR, which is a range of “skin tone colors” published by the Japan Color Research Institute; saturation (C) 3, 4 and 5. The coordinates of the ab plane of “preferred skin color” (target point T) are (at, bt), and a predetermined difference is Et (0 <Et <100). {(A−at) 2 + (b−bt) 2 } A range (a, b) on the ab plane that satisfies 1/2 ≦ Et, a range in which the lightness L falls within a predetermined range by satisfying these conditions, and the like may be defined.
As shown in FIG. 4, a color range for extracting a color region other than the face region is also assumed as the color region R1 in the color range R11 of the color coordinate plane of the predetermined color space including the target point T of the color region R1. A range of colors can be defined. Information representing the color range R11 is stored in the information storage area U5 as color extraction information 14c. Then, referring to the color extraction information 14c, it is determined whether or not each pixel P1 constituting the image data DA2 is within the color range R11 as shown in FIG. What is necessary is just to extract as area | region R1.

領域抽出部を上記構成にすると自動的に色領域が抽出されるので好適であるものの、領域抽出部の構成には、色相や彩度など色範囲を指定する入力をユーザから受け付けて指定された色範囲に含まれる画素を色領域として抽出する構成、画像データに対応する画像を表示して該画像の中から色領域を指定する入力をユーザから受け付けて指定された部分の画素を色領域として抽出する構成、画像データに対応する画像を表示して該画像の中からおおよその画像領域を指定する入力をユーザから受け付けて指定された画像領域を構成する各画素について色範囲R11内であるか否かを判別して当該色範囲内と判別した画素を色領域として抽出する構成、等も考えられる。   Although it is preferable that the color extraction is automatically performed when the area extraction unit is configured as described above, the configuration of the area extraction unit is specified by receiving input from the user for specifying a color range such as hue and saturation. A configuration for extracting pixels included in the color range as a color region, displaying an image corresponding to the image data, and accepting input from the user to specify the color region from the user, and specifying the pixel of the specified portion as the color region The configuration to be extracted, an image corresponding to the image data is displayed, and an input for designating an approximate image area from the image is received from the user, and whether each pixel constituting the designated image area is within the color range R11 A configuration is also conceivable in which pixels that are determined to be in the color range are extracted as color regions.

上記色領域情報DA3は、例えば、図5の下段に示すように、色範囲R11内と判別された画素P2に1以上の整数を格納し、色範囲R11外と判別された画素P2に0を格納したデータとすることができる。この場合、0を格納した画素が色領域の背景領域R2として抽出されていることになる。なお、色領域情報は、色範囲R11内と判別された画素の画像データDA2上の位置を表す情報、等としてもよい。   For example, as shown in the lower part of FIG. 5, the color area information DA3 stores an integer of 1 or more in the pixel P2 determined to be within the color range R11 and 0 to the pixel P2 determined to be outside the color range R11. It can be stored data. In this case, the pixel storing 0 is extracted as the background region R2 of the color region. The color area information may be information indicating the position on the image data DA2 of the pixel determined to be in the color range R11.

領域明るさ取得部(領域明るさ取得手段)U2は、領域抽出部にて抽出された色領域R1から当該色領域の明るさを取得し、領域明るさ情報DA4を生成する。色領域の明るさは、明度、輝度、色成分値の単純平均や重み付け平均、等で表すことができ、色領域内の画素の明度等の平均値や中央値や最頻値などで表される明るさとすることができる。そこで、色領域内の画素の明度等の平均値や中央値や最頻値などを算出して領域明るさ情報DA4とすることにより、色領域の明るさを取得することができる。なお、明度など明るさを表す値(明るさ値)の平均値としては、各画素の明度の相加平均(算術平均)の値、各画素の明度の相乗平均(幾何平均)の値、各画素の明度の調和平均の値、等が考えられ、各画素の重み付けをしない平均値でもよいし、各画素に重み付けをした平均値でもよい。
明るさ値の重み付け平均値を用いる場合、例えば、図5の下段に示すように、色領域R1の中で横方向または縦方向で背景領域R2に接する画素に最も小さい重み付け「1」を付与し、当該画素に横方向または縦方向で接する画素へ次に小さい重み付け「2」を付与し、以下、当該画素に横方向または縦方向で接する画素へ一つずつ大きい重み付けを付与して、色領域R1の内側ほど重み付けが大きくなるようにする。なお、各画素の重み付けの値Ki(iは1〜nの整数、nは色領域の画素数)は、色領域情報DA3としてRAMに記憶しておく。ここで、色領域内の各画素の画素値を(Ri,Gi,Bi)とすると、色領域の画素値の重み付け平均値(AR,AG,AB)は、

Figure 0004788394
となる。そして、平均値(AR,AG,AB)を求めると、RGB色空間の色成分値R,G,BをLab色空間の色成分値L,a,bに変換する公知の式(6)を用いて色成分値AR,AG,ABから明度Lを求めることにより、色領域の明るさ(明度Lpを取得することができる。
Figure 0004788394
ただし、p11〜p33は、変換係数である。
むろん、色領域内の各画素の画素値(Ri,Gi,Bi)を先に明度Liへ変換し、平均値を求めて色領域の明るさ(明度Lpとしてもよい。また、RGB色空間以外の色空間で定義される色成分値を用いて明るさを取得することも可能である。 The area brightness acquisition unit (area brightness acquisition unit) U2 acquires the brightness of the color area from the color area R1 extracted by the area extraction unit, and generates area brightness information DA4. The brightness of the color area can be expressed by brightness, brightness, simple average or weighted average of the color component values, etc., and is expressed by the average value, median value, mode value, etc. of the brightness of the pixels in the color area. Brightness. Therefore, the brightness of the color area can be acquired by calculating the average value, median value, mode value, etc. of the brightness of the pixels in the color area and using the area brightness information DA4. In addition, the average value of brightness values such as brightness (brightness value) includes an arithmetic average (arithmetic average) value of brightness of each pixel, a geometric average value of brightness of each pixel, The value of the harmonic average of the brightness of the pixel is conceivable, and an average value without weighting each pixel may be used, or an average value with each pixel weighted.
When the weighted average value of the brightness values is used, for example, as shown in the lower part of FIG. 5, the smallest weighting “1” is given to the pixel that touches the background region R2 in the horizontal direction or the vertical direction in the color region R1. Next, the pixel having a horizontal or vertical contact with the pixel is assigned the next smallest weighting “2”, and the pixel having the horizontal or vertical contact with the pixel is assigned a large weight one by one. The weighting is increased as the inner side of R1. The weighting value Ki (i is an integer from 1 to n, n is the number of pixels in the color area) of each pixel is stored in the RAM as color area information DA3. Here, when the pixel value of each pixel in the color area is (Ri, Gi, Bi), the weighted average value (AR, AG, AB) of the pixel values in the color area is
Figure 0004788394
It becomes. Then, when the average value (AR, AG, AB) is obtained, a well-known expression (6) for converting the color component values R, G, B in the RGB color space into the color component values L, a, b in the Lab color space is obtained. By obtaining the lightness L from the color component values AR, AG, and AB, the brightness of the color region (lightness Lp ) can be obtained.
Figure 0004788394
However, p 11 ~p 33 is a conversion coefficient.
Of course, the pixel value (Ri, Gi, Bi) of each pixel in the color area may be converted to the lightness Li first, and the average value may be obtained to obtain the brightness of the color area (lightness Lp ) . It is also possible to acquire brightness using color component values defined in a color space other than the RGB color space.

背景明るさ取得部(背景明るさ取得手段)U3は、画像データDA2から色領域R1の背景(背景領域R2)の明るさを取得し、背景明るさ情報DA5を生成する。背景の明るさは、明度、輝度、色成分値の単純平均や重み付け平均、等で表すことができ、背景内の画素の明度等の平均値や中央値や最頻値などで表される色とすることができる。そこで、背景領域内の画素の明るさ値の平均値や中央値や最頻値などを算出して背景明るさ情報DA5とすることにより、背景の明るさを取得することができる。なお、明るさ値の平均値としては、各画素の相加平均(算術平均)の値、各画素の相乗平均(幾何平均)の値、各画素の調和平均の値、等が考えられ、各画素の重み付けをしない平均値でもよいし、各画素に重み付けをした平均値でもよい。本実施形態では、各画素値の重み付けをしない相加平均値を用いるものとする。すなわち、背景領域内の各画素の画素値を(Ri,Gi,Bi)とすると、背景領域の画素値の相加平均値(AR,AG,AB)は、

Figure 0004788394
となる。そして、平均値(AR,AG,AB)を求めると、色成分値R,G,Bを色成分値L,a,bに変換する公知の式(6)を用いて色成分値AR,AG,ABから明度Lを求めることにより、背景の明るさ(明度Lqを取得することができ。むろん、色領域の明るさを取得する場合のように、背景領域内の各画素の画素値(Ri,Gi,Bi)を先に明度Liへ変換し平均値を求めて背景領域の明るさ(明度Lq)としてもよいし、RGB色空間以外の色空間で定義される色成分値を用いて明るさを取得することも可能である。
本実施形態では、画像データDA2のうち色領域R1を除く全ての領域を背景領域R2とし、具体的には、RGBデータDA2のうち顔領域R1を除く領域の全体から顔領域の背景の明るさを取得している。むろん、画像データDA2のうち色領域R1を除く領域の一部のみを背景領域としてもよい。例えば、色領域の周辺のみ(色領域との境界から所定の距離内)を背景領域としたり、色領域との境界から所定の距離を超える領域を背景領域としたり、色領域以外の領域から上記色範囲R11内の画素を除いた部分を背景領域としたりすることができる。 The background brightness acquisition unit (background brightness acquisition means) U3 acquires the brightness of the background of the color region R1 (background region R2) from the image data DA2, and generates background brightness information DA5. The brightness of the background can be represented by a simple average or weighted average of brightness, luminance, color component values, etc., and the color represented by the average value, median value, mode value, etc. of the brightness of the pixels in the background It can be. Therefore, the brightness of the background can be acquired by calculating the average value, the median value, the mode value, and the like of the brightness values of the pixels in the background area and using it as the background brightness information DA5. In addition, as the average value of the brightness value, an arithmetic average (arithmetic average) value of each pixel, a geometric average value of each pixel, a harmonic average value of each pixel, and the like are considered. An average value that does not weight the pixels may be used, or an average value that weights each pixel may be used. In the present embodiment, an arithmetic average value that does not weight each pixel value is used. That is, assuming that the pixel value of each pixel in the background area is (Ri, Gi, Bi), the arithmetic average value (AR, AG, AB) of the pixel values in the background area is
Figure 0004788394
It becomes. Then, when the average values (AR, AG, AB) are obtained, the color component values AR, AG are obtained using a well-known equation (6) for converting the color component values R, G, B into the color component values L, a, b. , AB, the brightness of the background (brightness Lq ) can be obtained. Of course, as in the case of obtaining the brightness of the color area, the pixel value (Ri, Gi, Bi) of each pixel in the background area is first converted to the brightness Li and the average value is obtained to obtain the brightness of the background area ( The brightness L q) may be used, and the brightness may be acquired using a color component value defined in a color space other than the RGB color space.
In the present embodiment, all regions except the color region R1 in the image data DA2 are set as the background region R2, and specifically, the brightness of the background of the face region from the entire region excluding the face region R1 in the RGB data DA2. Is getting. Needless to say, only a part of the image data DA2 excluding the color region R1 may be used as the background region. For example, only the periphery of the color area (within a predetermined distance from the boundary with the color area) is set as the background area, the area exceeding the predetermined distance from the boundary with the color area is set as the background area, or the area other than the color area is A portion excluding pixels in the color range R11 can be used as a background region.

なお、領域明るさ情報DA4を生成するための領域明るさ情報用変数と背景明るさ情報DA5を生成するための背景明るさ情報用変数とを用意して0にリセットしておき、画像データDA2を構成する各画素の中から順次着目画素を設定し、当該着目画素について、領域取得部にて色範囲R11内であるか否かを判別することにより色領域R1であるか否かを判別し、色領域であると判別した場合には領域明るさ取得部にて着目画素の明るさ値を領域明るさ情報用変数に加算し、色領域でないと判別した場合には背景明るさ取得部にて着目画素の明るさ値を背景色領域用変数に加算してもよい。そして、画像データDA2の全画素を設定したとき、領域明るさ取得部にて領域明るさ情報用変数の値を色領域の画素数で除して領域明るさ情報DA4とし、背景明るさ取得部にて背景色領域用変数の値を背景領域の画素数で除して背景明るさ情報DA5としてもよい。   Note that a region brightness information variable for generating the region brightness information DA4 and a background brightness information variable for generating the background brightness information DA5 are prepared and reset to 0, and the image data DA2 is set. The target pixel is sequentially set from among the pixels constituting the pixel, and it is determined whether or not the target pixel is in the color region R1 by determining whether or not the target pixel is in the color range R11. If it is determined that the area is a color area, the area brightness acquisition unit adds the brightness value of the pixel of interest to the area brightness information variable. If it is determined that the area is not a color area, the background brightness acquisition section Thus, the brightness value of the pixel of interest may be added to the background color region variable. When all the pixels of the image data DA2 are set, the area brightness acquisition unit divides the value of the area brightness information variable by the number of pixels in the color area to obtain area brightness information DA4, and the background brightness acquisition unit The background brightness information DA5 may be obtained by dividing the value of the background color area variable by the number of pixels in the background area.

調整部(調整手段)U4は、図1,13に示すように、色領域R1の明るさ(明度Lp)を当該色領域について予め設定された目標の明るさ(明度Ltにする明るさ補正を画像データDA2に対して行う。図1の上段では、背景の明度Lqから色領域の明度Lpを差し引いた明度差ΔL(横軸)に対する目標の明度(縦軸)を示している。図1の下段では、色領域の明度Lp(横軸)と背景の明度Lq(縦軸)とを軸とするLp−Lq平面を示している。
調整部U4は、目標の明るさ(明度Ltよりも暗い第一の明るさ(明度L1より色領域R1の明るさ(明度Lpが暗く、かつ、目標の明るさ(明度Ltよりも暗い第二の明るさ(明度L2より背景の明るさ(明度Lqが暗いとき、前記目標よりも明るさを下げた明るさ補正を画像データDA2に対して行う。また、調整部U4は、背景の明るさ(明度Lqが色領域R1の明るさ(明度Lpより明るく、背景の明るさ(明度Lqと色領域の明るさ(明度Lpとの差異が所定の差異より大きいとき、前記目標よりも明るさを下げた明るさ補正を画像データDA1に対して行う。ここでいう差異は、例えば、背景と色領域の明度をそれぞれLq,Lpとして、差Lq−Lq、比Lq/Lpと1との差(Lq/Lp)−1、Lq2−Lq2、(1/Lp)−(1/Lq)、等で表される。
明るさを調整するための色空間は、機器従属色空間でもよいが、機器独立色空間が好ましく、均等色空間がさらに好ましい。均等色空間には、CIE Lab色空間、CIE Luv色空間、等がある。機器独立色空間には、均等色空間の他、CIE XYZ色空間、NTS CRGB色空間、等がある。明るさを調整するための色空間を表す情報は、色空間情報14cとして情報記憶領域U5に記憶されている。本実施形態では、色相および彩度を表すab平面(色座標平面)並びに明度軸(明るさ軸)からなるLab色空間で明るさを調整するものとする。なお、Luv色空間ではuv平面が色相および彩度を表す色座標平面となり、また、明るさ軸には輝度軸等も考えられる。
As shown in FIGS. 1 and 13 , the adjustment unit (adjustment means) U4 changes the brightness (lightness Lp) of the color area R1 to the target brightness (lightness Lt ) preset for the color area. Is performed on the image data DA2. In the upper part of FIG. 1 shows the brightness difference obtained by subtracting the luminosity L p of the color area from the lightness Lq background ΔL of targets for (horizontal axis) lightness (vertical axis). The lower part of FIG. 1 shows an Lp-Lq plane with the brightness Lp (horizontal axis) of the color region and the brightness Lq (vertical axis) of the background as axes.
Adjustment unit U4 is the brightness of the target (lightness Lt) Dark first brightness than (lightness L1) than the brightness of the color area R1 (lightness Lp) is dark, and from the brightness of the target (lightness Lt) When the background brightness (brightness Lq ) is darker than the dark second brightness (brightness L2 ) , the brightness correction is performed on the image data DA2 with a lower brightness than the target. Further, the adjustment unit U4 has a background brightness (lightness Lq ) brighter than the brightness (lightness Lp ) of the color region R1, and the difference between the background brightness (lightness Lq ) and the brightness of the color region (lightness Lp ). Is greater than a predetermined difference, brightness correction is performed on the image data DA1 with brightness lower than the target. The difference here is, for example, that the brightness of the background and the color region is Lq and Lp, respectively, the difference Lq−Lq, the difference between the ratio Lq / Lp and 1 (Lq / Lp) −1, Lq 2 −Lq 2 , ( 1 / Lp) − (1 / Lq), etc.
The color space for adjusting the brightness may be a device-dependent color space, but a device-independent color space is preferable, and a uniform color space is more preferable. The uniform color space includes a CIE Lab color space, a CIE Luv color space, and the like. In addition to the uniform color space, the device independent color space includes a CIE XYZ color space, an NTS CRGB color space, and the like. Information representing the color space for adjusting the brightness is stored in the information storage area U5 as the color space information 14c. In the present embodiment, brightness is adjusted in a Lab color space including an ab plane (color coordinate plane) representing hue and saturation and a brightness axis (brightness axis). In the Luv color space, the uv plane is a color coordinate plane representing hue and saturation, and a brightness axis can be considered as the brightness axis.

色領域の明るさの目標を表す目標の明るさは、色領域について人間が好ましいと感じる明るさ、色領域について人間が記憶している記憶色の明るさ、ユーザが指定した明るさ、等とすることができ、例えば複数の人に色を見せたときの好みの明るさの中心(好みの明るさ値を平均した値で表される明るさ)とすることができる。目標の明るさは、明度、輝度、色成分値の単純平均や重み付け平均、等で表すことができる。顔領域の目標の明るさについては、例えば、肌色の目標の明るさとすることができ、肌色の嗜好中心(好みの肌色の明るさ値を平均した値で表される「好ましい肌色」の明るさ)とすることができる。目標の明るさを表す情報は、目標の明るさ情報14dとして情報記憶領域U5に記憶されている。
目標の明るさは、色領域や背景の明るさに関わらない一定の明るさでもよいが、背景の明るさ(明度Lqと色領域の明るさ(明度Lpとの差異に応じて変化するようにすると、背景の明るさに応じて人に感じられる色領域の感覚的な明るさを調整することができるので、画像入力装置により作成された画像の明るさをより適切に調整することが可能になる。
The brightness of the target that represents the target of the brightness of the color area is the brightness that the person feels preferable for the color area, the brightness of the memory color stored by the person for the color area, the brightness specified by the user, etc. For example, it can be set as the center of the favorite brightness when the color is shown to a plurality of people (brightness expressed by an average value of the favorite brightness values). The target brightness can be expressed by brightness, brightness, simple average or weighted average of color component values, and the like. The target brightness of the face area can be, for example, the target brightness of the skin color, and the skin tone preference center (the brightness of the “preferred skin color” expressed by the average value of the brightness values of the favorite skin color) ). Information representing the target brightness is stored in the information storage area U5 as target brightness information 14d.
The target brightness may be constant regardless of the brightness of the color area or background, but changes according to the difference between the brightness of the background (lightness Lq ) and the brightness of the color area (lightness Lp ). By doing so, it is possible to adjust the sensuous brightness of the color area perceived by the person according to the brightness of the background, so that the brightness of the image created by the image input device can be adjusted more appropriately. It becomes possible.

図6の上段のグラフは、顔領域の明度がLab色空間における顔領域の目標点Tの明度Loであるときに背景の明度Lqに応じて人に感じられる色領域の感覚的な明度Jを示している。ここで、感覚的な明度Jは、CIE Publicationとして2004年に発行された色の見えモデルであるCIECAM02(Colour Appearance Model 2002)に規定された明度Jである。同図の上段では、横軸が背景の明度Lq、縦軸が感覚的な明度Jである。図の例では、明度Loの顔領域の感覚的な明度Jは、背景の明度Lqが所定範囲内で大きくなるほど低くなっている。
そこで、同図の下段のグラフに示すように、背景の明度Lqと顔領域の明度Lpとの差異に応じて人に感じられる顔領域の感覚的な明るさJの違いを補償するように色領域の目標の明度Ltを決定すると、背景と顔領域の明るさの差異による顔領域の感覚的な明るさの違いが補償されるので、さらに適切に画像データの明るさを調整することが可能になる。なお、同図の下段では、横軸が背景の明度Lq、縦軸が目標の明度Ltである。図の例では、顔領域の目標の明度Ltは、背景の明度Lqが所定範囲内で大きくなるほど高くなっている。
The upper graph in FIG. 6 shows the sensual brightness J of the color area that is perceived by the person according to the brightness Lq of the background when the brightness of the face area is the brightness Lo of the target point T of the face area in the Lab color space. Show. Here, the sensory lightness J is lightness J specified in CIECAM02 (Colour Appearance Model 2002), which is a color appearance model published in 2004 as CIE Publication. In the upper part of the figure, the horizontal axis is the background lightness Lq, and the vertical axis is the sensory lightness J. In the example shown in the figure, the sensory brightness J of the face area having the brightness Lo becomes lower as the background brightness Lq increases within a predetermined range.
Therefore, as shown in the lower graph of the figure, the color is compensated for the difference in the sensuous brightness J of the face area that is perceived by the person according to the difference between the brightness Lq of the background and the brightness Lp of the face area. When the target brightness Lt of the area is determined, the difference in the sensory brightness of the face area due to the difference in brightness between the background and the face area is compensated, so the brightness of the image data can be adjusted more appropriately. become. In the lower part of the figure, the horizontal axis represents the background lightness Lq, and the vertical axis represents the target lightness Lt. In the example of the figure, the target brightness Lt of the face region increases as the background brightness Lq increases within a predetermined range.

以上のことから、本実施形態では、図1に示すように、背景の明度Lqから色領域の明度Lpを差し引いた明度差ΔL=Lq−Lpが所定範囲(例えばΔL1〜ΔL2)内で大きくなるほど連続的または段階的に大きくなるように目標の明度Ltを設定している。ここで、ΔLが大きくなるほど明度Ltが連続的に大きくなる場合には図1に示す線CO1のように連続して単調増加する場合があり、ΔLが大きくなるほど明度Ltが段階的に大きくなる場合には明度Ltが整数とされるときに離散的に増加する場合等がある。なお、明度Ltが整数とされるとき、明度Ltがとりうる全ての整数値をとるように明度Ltが階段状に増加してもよいし、明度Ltがとりうる全ての整数値のうち一部の整数値のみとるように明度Ltが階段状に増加してもよい。   From the above, in this embodiment, as shown in FIG. 1, the lightness difference ΔL = Lq−Lp obtained by subtracting the lightness Lp of the color region from the lightness Lq of the background increases within a predetermined range (for example, ΔL1 to ΔL2). The target brightness Lt is set so as to increase continuously or stepwise. Here, when the lightness Lt continuously increases as ΔL increases, the lightness Lt may increase continuously in a monotonous manner as indicated by the line CO1 shown in FIG. 1, and the lightness Lt increases stepwise as ΔL increases. In some cases, the brightness Lt increases discretely when the lightness Lt is an integer. When the lightness Lt is an integer, the lightness Lt may be increased stepwise so as to take all integer values that the lightness Lt can take, or a part of all the integer values that the lightness Lt can take The brightness Lt may be increased stepwise so that only the integer value of is taken.

そして、目標の明度Ltよりも低い所定の第一の明度(第一の明るさ)をL1、目標の明度Ltよりも低い所定の第二の明度(第二の明るさ)をL2として、調整部U4は、色領域の明度Lpが明度L1より低く、かつ、背景の明度Lqが明度L2より小さいとき、ストロボ光が被写体に到達しなかったストロボ未達条件であるとして、明度差ΔLが所定範囲内で大きくなるほど連続的または段階的に大きくなる目標の明度Ltを色領域の明度Lpよりも高い範囲内で低くした明度補正を画像データに対して行う。図1の下段に示すLp−Lq平面では、Lp<L1かつLq<L2を満たす暗領域をA1で示している。この暗領域A1は、画像が前記ストロボ未達条件を満たすような全体に暗い画像である領域である。L1とL2とは、同じ明度でもよいし、異なる明度でもよい。調整部U4は、画像データDA2が前記ストロボ未達条件を満たす場合、前記目標Ltよりも下げた明度をLcとして、Lp<Lc<Ltが満たされるように図1上段の目標の明度(線CO1)を線CO2の位置まで下げて、画像データDA2の明度補正を行う。 Then, the predetermined first brightness (first brightness) lower than the target brightness Lt is set as L1, and the predetermined second brightness (second brightness) lower than the target brightness Lt is set as L2. In the part U4, when the lightness Lp of the color region is lower than the lightness L1 and the lightness Lq of the background is smaller than the lightness L2, the lightness difference ΔL is determined to be a strobe non-reaching condition in which the strobe light did not reach the subject. performing a continuous or stepwise larger target lightness L t as large within brightness correction was lower in the range higher than the lightness Lp color space for the image data. In the Lp-Lq plane shown in the lower part of FIG. 1, a dark region satisfying Lp <L1 and Lq <L2 is indicated by A1. The dark area A1 is an area that is a dark image as a whole so that the image satisfies the strobe failure condition. L1 and L2 may have the same brightness or different brightness. When the image data DA2 satisfies the strobe failure condition, the adjustment unit U4 sets the brightness lower than the target Lt as Lc, and satisfies the target brightness (line CO1) in the upper part of FIG. 1 so that Lp <Lc <Lt is satisfied. ) Is lowered to the position of the line CO2, and the brightness of the image data DA2 is corrected.

ここで、図7の上段に示す曲線CU1のように、Lp<L1かつLq<L2の条件でLp<Lcとなるよう、色領域の明度Lpのみに応じて修正目標の明度Lcを設定している。なお、横軸がLp、縦軸がLcである。明度Lcは、明度0〜L1の範囲でLpに応じて変化するLpの関数Lc(Lp)とされており、LpとLcとを対応付けた情報が修正目標の明るさ情報14hとして情報記憶領域U5に記憶されている。LpとLcとを対応付けた情報としては、例えば、LpとLcとの対応関係を階調毎に規定した情報を格納した一次元ルックアップテーブル(LUT)形式の情報とすることができる。Lp<Lcを満たすためには、例えば、Lp<L1かつLq<L2のときにLcの最小値がLpより大きくなるように関数Lc(ΔL)を設定すればよい。
修正目標の明度Lcを色領域の明度Lpのみに応じた明度としたのは、画像入力装置で作成された全体に非常に暗い画像では、背景と色領域の明度差ΔLが小さいため、ΔLに応じて修正目標の明度Lcを設定するよりも、背景の明度Lqに関係なく色領域の明度Lpのみに応じて修正目標の明度Lcを設定する方が、適切に画像の明るさを調整することができるためである。一方、修正目標の明度Lcは、感覚的に同じ明るさとされた目標の明度Ltよりも低くされている。これは、以下の理由がある。
1.全体に非常に暗い画像では、色領域の明度Lpと目標の明度Ltとの差が大きく、色領域の明度を目標の明度Ltまで上げる明度補正をすると、画像にノイズが現れ、処理後の画質が意図したように向上しないことがあるためである。
2.非常に暗い環境で撮像された画像だと、人は暗さに対して不自然さを小さく感じる傾向があるためである。
以上より、全体に非常に暗い画像では、明度補正の目標を下げる方が画像処理後の画質を向上させることができるといえる。
Here, as indicated by the curve CU1 shown in the upper part of FIG. 7, the lightness Lc of the correction target is set according to only the lightness Lp of the color region so that Lp <Lc under the conditions of Lp <L1 and Lq <L2. Yes. The horizontal axis is Lp and the vertical axis is Lc. The lightness Lc is a function Lc (Lp) of Lp that changes according to Lp in the lightness range of 0 to L1, and information in which Lp and Lc are associated with each other is information storage area as brightness information 14h of the correction target Stored in U5. As information in which Lp and Lc are associated with each other, for example, information in a one-dimensional lookup table (LUT) format in which information defining the correspondence between Lp and Lc for each gradation can be stored. In order to satisfy Lp <Lc, for example, the function Lc (ΔL) may be set so that the minimum value of Lc is larger than Lp when Lp <L1 and Lq <L2.
The lightness Lc that is the correction target is set to lightness corresponding to only the lightness Lp of the color area because the lightness difference ΔL between the background and the color area is small in the entire image created by the image input device. Rather than setting the correction target brightness Lc accordingly, setting the correction target brightness Lc according to only the color area brightness Lp, regardless of the background brightness Lq, adjusts the image brightness appropriately. It is because it can do. On the other hand, the lightness Lc of the correction target is set lower than the lightness Lt of the target that is sensuously the same brightness. This has the following reason.
1. In a very dark image as a whole, the difference between the lightness Lp of the color area and the target lightness Lt is large, and if lightness correction is performed to increase the lightness of the color area to the target lightness Lt, noise appears in the image and the image quality after processing This is because there is a case where it does not improve as intended.
2. This is because an image captured in a very dark environment tends to make people feel less unnatural than darkness.
From the above, it can be said that the image quality after image processing can be improved by lowering the brightness correction target for an image that is very dark as a whole.

なお、図7の下段に示す曲線CU2のように、0<Lp<L1のときに目標の明度Ltに補正係数を乗じて修正目標の明度Lcを得ることを前提として、Lp<Lcが満たされる補正係数k(0<k<1)を設定してもよい。なお、横軸がLp、縦軸がkである。補正係数kは、明度0〜L1の範囲でLpに応じて変化するLpの関数とされており、Lpとkとを対応付けた情報が修正目標の明るさ情報14hとして情報記憶領域U5に記憶される。Lp<Lcを満たすためには、例えば、k>Lp/L1を満たすようにkを設定すればよい。   Note that Lp <Lc is satisfied on the premise that the corrected lightness Lc is obtained by multiplying the target lightness Lt by the correction coefficient when 0 <Lp <L1 as in the curve CU2 shown in the lower part of FIG. A correction coefficient k (0 <k <1) may be set. The horizontal axis is Lp and the vertical axis is k. The correction coefficient k is a function of Lp that changes according to Lp in the range of brightness 0 to L1, and information in which Lp and k are associated is stored in the information storage area U5 as the brightness information 14h of the correction target. Is done. In order to satisfy Lp <Lc, for example, k may be set so as to satisfy k> Lp / L1.

また、図7に示すように、調整部U4は、Lp<L1かつLq<L2のとき、色領域の明るさ(明度Lpよりも明るい範囲内で色領域の明るさ(明度Lpが明るくなるほど連続的または段階的に明るくなるように目標の明るさを下げた明るさ補正を画像データDA2に対して行う。すなわち、Lc(Lp)は、0<Lx<Ly<L1を満たす任意の明度Lx,Lyを用いて、Lc(Lx)≦Lc(Ly)(ただしLc(Lx)<Lc(Ly)の場合が少なくとも存在)が成立する関数とされている。Lpが大きくなるほど連続的にLcが大きくなる場合、Lc(Lx)<Lc(Ly)となる。
すなわち、全体に暗い画像でも、比較的暗い画像では明るくする度合を大きくすると処理後の画像にノイズが生じやすくなる一方、比較的明るい画像では明るくする度合を大きくしても処理後の画像にノイズが生じにくくなる。従って、全体に非常に暗い画像について、ノイズが現れない程度に明るくなり、適切に画質が向上する。
As shown in FIG. 7, when Lp <L1 and Lq <L2, the adjusting unit U4 has a brighter color area (brightness Lp ) within a range brighter than the brightness of the color area (brightness Lp ). Brightness correction is performed on the image data DA2 by decreasing the target brightness so that it becomes brighter continuously or in steps. In other words, Lc (Lp) is Lc (Lx) ≦ Lc (Ly) (where Lc (Lx) <Lc (Ly)) using any lightness Lx, Ly satisfying 0 <Lx <Ly <L1. It is a function that at least exists. When Lc increases continuously as Lp increases, Lc (Lx) <Lc (Ly).
In other words, even if the overall image is dark, increasing the degree of lightening in a relatively dark image tends to cause noise in the processed image. Is less likely to occur. Accordingly, an image that is very dark as a whole becomes bright enough that no noise appears, and the image quality is appropriately improved.

なお、調整部U4は、Lp<L1かつLq<L2のとき、目標の明度を色領域の明度Lpよりも明るい範囲内で下げるとともに、第一の明度L1よりも暗い所定の第三の明度(第三の明るさ)をL3(0<L3<L1)として、Lp>L3のときの目標の明度をLp<L3のときの目標の明度よりも高くさせた明度補正を画像データDA2に対して行ってもよい。すなわち、Lc(Lp)は、0<Lx<L3<Ly<L1を満たす任意の明度Lx,Lyを用いて、Lc(Lx)<Lc(Ly)が成立する関数とされている。上述したように、全体に暗い画像でも、比較的明るい画像では明るくする度合を大きくしても処理後の画像にノイズが生じにくくなるので、全体に非常に暗い画像について、ノイズが現れない程度に明るくなり、適切に画質が向上する。
第三の明度L3は、0<L3<L1が満たされるように設定されればよく、L3=L1/2等とすればよい。
When Lp <L1 and Lq <L2, the adjustment unit U4 lowers the target brightness within a range brighter than the brightness Lp of the color area, and has a predetermined third brightness (darker than the first brightness L1). 3rd brightness) is set to L3 (0 <L3 <L1), and brightness correction is performed on the image data DA2 so that the target brightness when Lp> L3 is higher than the target brightness when Lp <L3. You may go. That is, Lc (Lp) is a function that satisfies Lc (Lx) <Lc (Ly) using arbitrary brightness Lx and Ly that satisfy 0 <Lx <L3 <Ly <L1. As described above, noise is less likely to occur in the processed image even if it is a dark image as a whole, even if the degree of lightening is increased in a relatively bright image, so that no noise appears in a very dark image as a whole. It becomes brighter and the image quality is appropriately improved.
The third lightness L3 may be set so that 0 <L3 <L1 is satisfied, and L3 = L1 / 2 or the like may be set.

また、図1に示すように、調整部U4は、背景の明度Lqから色領域の明度Lpを差し引いた明度差(差異)Lq−LpをΔL、0よりも大きい所定の明度差をΔLthとして、ΔL>ΔLthのとき、逆光条件であるとして、明度差ΔLに応じて目標の明度Lcを下げた明度補正を画像データDA2に対して行う。図1の下段に示すLp−Lq平面では、Lq−Lp<ΔLthを満たす逆光領域をA2で示している。この逆光領域A2は、画像が前記逆光条件を満たすような領域である。調整部U4は、画像データDA2が前記逆光条件を満たす場合、前記目標Ltよりも下げた明度をLcとして、Lp<Lc<Ltが満たされるように図1上段の目標の明度(線CO1)を線CO3の位置まで下げて、画像データDA2の明度補正を行う。   Further, as shown in FIG. 1, the adjustment unit U4 sets a lightness difference (difference) Lq−Lp obtained by subtracting the lightness Lp of the color region from the lightness Lq of the background as ΔL, and a predetermined lightness difference larger than 0 as ΔLth. When ΔL> ΔLth, it is assumed that the backlight condition is satisfied, and brightness correction is performed on the image data DA2 by reducing the target brightness Lc according to the brightness difference ΔL. In the Lp-Lq plane shown in the lower part of FIG. 1, a backlight region that satisfies Lq-Lp <ΔLth is indicated by A2. This backlight area A2 is an area where the image satisfies the backlight condition. When the image data DA2 satisfies the backlight condition, the adjustment unit U4 sets the brightness lower than the target Lt as Lc, and sets the target brightness (line CO1) in the upper stage of FIG. 1 so that Lp <Lc <Lt is satisfied. The brightness of the image data DA2 is corrected by lowering to the position of the line CO3.

ここで、明度Lcは、明度差ΔLがΔLthより大きい範囲でΔLに応じて変化するΔLの関数Lc(ΔL)とされており、ΔLとLcとを対応付けた情報が修正目標の明るさ情報14hとして情報記憶領域U5に記憶されている。ΔLとLcとを対応付けた情報としては、例えば、ΔLとLcとの対応関係を階調毎に規定した情報を格納した一次元ルックアップテーブル(LUT)形式の情報とすることができる。
修正目標の明度Lcを感覚的に同じ明るさとされた目標の明度Ltよりも低くしたことには、以下の理由がある。
すなわち、画像入力装置で逆光条件下にて作成された画像では、色領域の明度Lpが低い結果、色領域の明度Lpと目標の明度Ltとの差が大きく、色領域の明度を目標の明度Ltまで上げる明度補正をすると、画像にノイズが現れ、処理後の画質が意図したように向上しないことがあるためである。
従って、逆光条件下で作成された画像では、明度補正の目標を下げる方が画像処理後の画質を向上させることができるといえる。
Here, the lightness Lc is a function Lc (ΔL) of ΔL that changes according to ΔL in a range where the lightness difference ΔL is larger than ΔLth, and information in which ΔL and Lc are associated with each other is brightness information of the correction target. 14h is stored in the information storage area U5. The information in which ΔL and Lc are associated with each other can be, for example, information in a one-dimensional lookup table (LUT) format that stores information that defines the correspondence between ΔL and Lc for each gradation.
The reason why the lightness Lc of the correction target is lower than the lightness Lt of the target that is sensuously the same brightness is as follows.
That is, in an image created under backlight conditions by an image input device, the brightness Lp of the color area is low, and as a result, the difference between the brightness Lp of the color area and the target brightness Lt is large, and the brightness of the color area is set to the target brightness. This is because when the brightness correction is increased to Lt, noise appears in the image and the processed image quality may not be improved as intended.
Therefore, in an image created under backlight conditions, it can be said that lowering the brightness correction target can improve the image quality after image processing.

また、図1に示すように、Lq−Lp>ΔLthの条件でLp<Lcとなるよう、明度差ΔLに応じて修正目標の明度Lcを設定している。Lp<Lcを満たすためには、例えば、Lq−Lp>ΔLthのときにLcの最小値がLpより大きくなるように関数Lc(ΔL)を設定すればよい。調整部U4は、ΔL>ΔLthのとき、明度差ΔLが大きくなるほど連続的または段階的に目標の明度Lcを下げた明度補正を画像データDA2に対して行う。すなわち、Lc(ΔL)は、ΔLth<ΔLx<ΔLyを満たす任意の明度差ΔLx,ΔLyを用いて、Lc(ΔLx)≧Lc(ΔLy)(ただしLc(ΔLx)>Lc(ΔLy)の場合が少なくとも存在)が成立する関数とされている。ΔLが大きくなるほど連続的にLcが小さくなる場合、Lc(ΔLx)>Lc(ΔLy)となる。
すなわち、逆光条件で作成された画像でも、比較的逆光の度合が大きい画像では色領域が比較的暗い結果明るくする度合を大きくすると処理後の画像にノイズが生じやすくなる一方、比較的逆光の度合が小さい画像では色領域が比較的明るい結果明るくする度合を大きくしても処理後の画像にノイズが生じにくくなる。従って、逆光条件で作成された画像について、ノイズが現れない程度に明るくなり、適切に画質が向上する。
Further, as shown in FIG. 1, the lightness Lc of the correction target is set according to the lightness difference ΔL so that Lp <Lc under the condition of Lq−Lp> ΔLth. In order to satisfy Lp <Lc, for example, the function Lc (ΔL) may be set so that the minimum value of Lc is larger than Lp when Lq−Lp> ΔLth. When ΔL> ΔLth, the adjustment unit U4 performs brightness correction on the image data DA2 by decreasing the target brightness Lc continuously or stepwise as the brightness difference ΔL increases. That is, Lc (ΔL) is at least Lc (ΔLx) ≧ Lc (ΔLy) (where Lc (ΔLx)> Lc (ΔLy) using an arbitrary brightness difference ΔLx, ΔLy that satisfies ΔLth <ΔLx <ΔLy. Exist)). When Lc decreases continuously as ΔL increases, Lc (ΔLx)> Lc (ΔLy).
That is, even in an image created under backlight conditions, if the degree of brightening is increased as a result of a relatively dark color area in an image with a relatively large degree of backlighting, noise tends to occur in the processed image, while the degree of backlighting is relatively high. In a small image, noise is less likely to occur in the processed image even if the degree of brightening is increased as a result of the relatively bright color area. Therefore, the image created under the backlight condition is brightened to the extent that noise does not appear, and the image quality is appropriately improved.

なお、図1に示すように、調整部U4は、ΔL>ΔLthのとき、目標の明度を色領域の明度Lpよりも明るい範囲内で下げるとともに、上記明度差ΔLthよりも大きい所定の第二の明度差をΔL3(ΔLth<ΔL3<ΔL2)として、ΔL>ΔL3のときの目標の明度をΔL<ΔL3のときの目標の明度よりも低くさせた明度補正を画像データDA2に対して行ってもよい。すなわち、Lc(ΔLp)は、ΔLth<ΔLx<ΔL3<ΔLy<ΔL2を満たす任意の明度差ΔLx,ΔLyを用いて、Lc(ΔLx)>Lc(ΔLy)が成立する関数とされている。上述したように、逆光条件で作成された画像でも、比較的逆光の度合が小さい画像では色領域が比較的明るい結果明るくする度合を大きくしても処理後の画像にノイズが生じにくくなるので、逆光条件で作成された画像について、ノイズが現れない程度に明るくなり、適切に画質が向上する。
第二の明度差ΔL3は、ΔLth<ΔL3<ΔL2が満たされるように設定されればよく、ΔL3=(ΔLth+ΔL2)/2等とすればよい。
As shown in FIG. 1, when ΔL> ΔLth, the adjustment unit U4 lowers the target brightness within a range brighter than the brightness Lp of the color area, and at the same time a predetermined second greater than the brightness difference ΔLth. Lightness correction may be performed on the image data DA2 by setting the lightness difference to ΔL3 (ΔLth <ΔL3 <ΔL2) and setting the target lightness when ΔL> ΔL3 to be lower than the target lightness when ΔL <ΔL3. . That is, Lc (ΔLp) is a function that satisfies Lc (ΔLx)> Lc (ΔLy) using arbitrary brightness differences ΔLx and ΔLy that satisfy ΔLth <ΔLx <ΔL3 <ΔLy <ΔL2. As described above, even in an image created under backlight conditions, noise is less likely to occur in the processed image even if the degree of brightening is increased as a result of the relatively bright color area in an image with relatively small backlighting. The image created under the backlight condition becomes bright enough that no noise appears, and the image quality is appropriately improved.
The second lightness difference ΔL3 may be set so that ΔLth <ΔL3 <ΔL2 is satisfied, and may be ΔL3 = (ΔLth + ΔL2) / 2 or the like.

本実施形態の調整部は、画像データ全体へ一律に明るさ補正を行うが、抽出した色領域のみ明るさ補正を行うものでもよい。後者の場合、RGBデータDA2の画素値の補正特性(後述するε等)を決定したとき、前記色領域を構成する各画素の中から順次着目画素を設定し、前記補正特性を参照して、当該着目画素の画素値を当該補正特性の情報に従って変換することにより、調整後のRGBデータDA6を生成することができる。   The adjustment unit according to the present embodiment performs brightness correction uniformly on the entire image data, but may perform brightness correction only on the extracted color region. In the latter case, when the correction characteristics (e.g., ε described later) of the pixel value of the RGB data DA2 are determined, the target pixel is sequentially set from each pixel constituting the color area, and the correction characteristics are referred to. The converted RGB data DA6 can be generated by converting the pixel value of the pixel of interest according to the correction characteristic information.

Lab色空間における最終的な目標の明度Lp’が決定したら、補正前の色領域の明度Lpと明度Lp’との差異(比)に応じた明度補正を行うことにより、調整後のRGBデータDA6(画像データの一種)を生成する。   When the final target lightness Lp ′ in the Lab color space is determined, the RGB data DA6 after adjustment is performed by performing lightness correction according to the difference (ratio) between the lightness Lp and the lightness Lp ′ of the color area before correction. (A kind of image data) is generated.

以上説明したように、全体に非常に暗い画像では明るさ補正の目標を暗い方向へ下げる方が画像の画質を向上させることができる。本発明では、Lp<L1かつLq<L2のとき、目標の明るさが下げられるので、画像にノイズが入るといった不具合を解消することができる。従って、画像入力装置で適切な明るさ調整が行われなかった場合でも、画像入力装置により作成された画像データの明るさを適切に調整することが可能になる。
また、逆光条件で作成された画像でも明るさ補正の目標を暗い方向へ下げる方が画像の画質を向上させることができる。本発明では、ΔL>ΔLthのとき、目標の明るさが下げられるので、画像にノイズが入るといった不具合を解消することができる。従って、画像入力装置で適切な明るさ調整が行われなかった場合でも、画像入力装置により作成された画像データの明るさを適切に調整することが可能になる。
As described above, for a very dark image as a whole, the image quality can be improved by lowering the brightness correction target in the dark direction. In the present invention, when Lp <L1 and Lq <L2, the target brightness is lowered, so that it is possible to solve the problem of noise in the image. Therefore, even when the appropriate brightness adjustment is not performed in the image input device, it is possible to appropriately adjust the brightness of the image data created by the image input device.
Even in an image created under backlight conditions, the image quality can be improved by lowering the brightness correction target in the dark direction. In the present invention, when ΔL> ΔLth, the target brightness is lowered, so that it is possible to solve the problem of noise in the image. Therefore, even when the appropriate brightness adjustment is not performed in the image input device, it is possible to appropriately adjust the brightness of the image data created by the image input device.

なお、調整部U4では、さらに、色領域R1について予め設定された目標色Ctへ色領域R1の色を近づける色バランス調整を画像データDA2に対して行ってもよい。例えば、領域抽出部U1にて抽出された色領域R1から当該色領域の代表色Cpを抽出し、必要に応じて画像データDA2から色領域R1の背景の代表色Cqを抽出し、目標色Ctと代表色Cpと必要に応じて代表色Cqとに基づいて色領域R1の色を目標色Ctへ近づける色バランス調整を画像データDA2に対して行うと、画像の明るさとともに画像の色バランスも調整される。色領域や背景領域の各画素の画素値(Ri,Gi,Bi)の平均値(AR,AG,AB)を上記式(4)や上記式(6)で求め、上記式(5)でLab色空間の色成分値(AL,Aa,Ab)に変換すると、色領域や背景領域の代表色Cp,Cqが色成分値(AL,Aa,Ab)として抽出される。そこで、抽出結果と目標色Ctの色成分値を用いてab平面で色領域の代表色Cpの位置P(ap,ap)を目標色Ctの位置T(at,bt)に近づけた点P’(ap’,bp’)を求めることができる。例えば、点Pを点Tに近づける割合を補正係数α(0<α≦1)とすると、ap’=ap+α(at−ap)、bp’=bp+α(bt−bp)となる。補正係数αは、背景の代表色Cqの位置に応じて変化させてもよい。Lab色空間での補正後の色成分値(AL,ap’,bp’)が決定したら、Lab色空間の色成分値L,a,bをRGB色空間の色成分値R,G,Bに変換する公知の式(7)を用いて、補正後の色成分値L,a,bを色成分値R,G,Bに変換する。

Figure 0004788394
ただし、q11〜q33は、変換係数である。
そして、調整前のRGBデータの全画素の画素値に対して補正前後の色成分値R,G,Bの差異(比)に応じた補正を行うことにより、色バランス調整後のRGBデータを生成することができる。 Note that the adjustment unit U4 may further perform color balance adjustment on the image data DA2 so that the color of the color region R1 approaches the preset target color Ct for the color region R1. For example, the representative color Cp of the color area is extracted from the color area R1 extracted by the area extraction unit U1, the background representative color Cq of the color area R1 is extracted from the image data DA2 as necessary, and the target color Ct. When the image data DA2 is subjected to a color balance adjustment that brings the color of the color region R1 closer to the target color Ct based on the representative color Cp and, if necessary, the representative color Cq, the color balance of the image as well as the brightness of the image Adjusted. The average value (AR, AG, AB) of the pixel values (Ri, Gi, Bi) of each pixel in the color area and the background area is obtained by the above formula (4) and the above formula (6), and Lab is obtained by the above formula (5). When converted to the color component values (AL, Aa, Ab) of the color space, the representative colors Cp, Cq of the color area and background area are extracted as the color component values (AL, Aa, Ab). Therefore, using the extraction result and the color component value of the target color Ct, the position P (a p , a p ) of the representative color Cp in the color region on the ab plane is brought close to the position T (a t , b t ) of the target color Ct. The point P ′ (a p ′ , b p ′ ) can be obtained. For example, when the correction coefficient a ratio closer the point P to the point T α (0 <α ≦ 1 ), a p '= a p + α (a t -a p), b p' = b p + α (b t - b p ). The correction coefficient α may be changed according to the position of the background representative color Cq. When the color component values (AL, a p ′ , b p ′ ) after correction in the Lab color space are determined, the color component values L, a, b in the Lab color space are converted into the color component values R, G, R, in the RGB color space. The corrected color component values L, a, and b are converted into color component values R, G, and B using a well-known equation (7) that converts the color components into B.
Figure 0004788394
However, q 11 to q 33 is the conversion factor.
Then, the RGB data after the color balance adjustment is generated by performing correction according to the difference (ratio) of the color component values R, G, and B before and after the correction on the pixel values of all the pixels of the RGB data before adjustment. can do.

印刷制御部U6は、画素毎に要素色RGBで階調表現したRGBデータDA6を、画素毎に要素色CMYKで階調表現(例えば256階調で表現)したCMYKデータに色変換し、色変換後のCMYKデータに対して所定のハーフトーン処理を行って階調数をm階調(mは2以上256未満の整数)に減らし、ハーフトーン処理後のCMYKデータに対して所定のラスタライズ処理を行ってラスタデータ(印刷データ)DA7を生成し、当該ラスタデータDA7をプリンタ20に対して出力する処理を行う。この処理は、CMYKデータに基づいて当該CMYKデータに対応するインクのドットをプリンタに対して印刷媒体上に形成させる制御を行う処理である。この処理により、RGBデータDA6に基づき当該RGBデータに対応する画像をプリンタに印刷させる制御が行われる。
すると、プリンタ20は、CMYKデータに対応するインクのドットを印刷媒体M1上に付着させることにより、RGBデータDA6に対応する画像を印刷媒体M1に形成する。これにより、明るさの適切な画像IM1が印刷媒体上に印刷される。
The print control unit U6 performs color conversion on the RGB data DA6 expressed with the element color RGB for each pixel into CMYK data expressed with the element color CMYK for each pixel (for example, expressed with 256 gradations), and the color conversion is performed. A predetermined halftone process is performed on the subsequent CMYK data to reduce the number of gradations to m gradations (m is an integer of 2 or more and less than 256), and a predetermined rasterization process is performed on the CMYK data after the halftone process. Then, raster data (print data) DA7 is generated, and processing for outputting the raster data DA7 to the printer 20 is performed. This process is a process for controlling the printer to form ink dots corresponding to the CMYK data on the print medium based on the CMYK data. By this processing, control for causing the printer to print an image corresponding to the RGB data based on the RGB data DA6 is performed.
Then, the printer 20 forms an image corresponding to the RGB data DA6 on the print medium M1 by attaching ink dots corresponding to the CMYK data on the print medium M1. As a result, an image IM1 with appropriate brightness is printed on the print medium.

(2)画像処理の動作および作用:
図8に示す印刷制御処理を開始すると、画像入力部により、画像入力装置で作成された画像データDA1を入力し、例えば広域RGB色空間で表現されたRGBデータDA2に変換する(ステップS102。以下、「ステップ」の記載を省略)。画像データDA1は、画像入力装置50から直接入力することもできるし、メモリカード用のI/Fを介してDSCのメモリカード54iに記憶された画像データを入力することもできるし、画像入力装置で作成された画像データを記録したCD−ROM15a等から画像データを入力することもできる。画像データを入力する際には、画像データ全てをRAMに格納するのみならず、画像データを分割して分割されたデータを順次RAMに上書きしてもよいし、画像データを格納したバッファ領域を表すデータのみをRAMに格納してもよい。画像データDA1は、画像をドットマトリクス状の多数の画素で階調表現したデータであり、sRGB色空間で定義されるRGBから構成された画像データや、YUV表色系におけるYUVから構成された画像データ、等がある。画像データDA1の各成分も様々な階調数とされているので、sRGBやYUV表色系等の定義に従って、画像データDA1を例えばR,G,B各256階調(0〜255の整数値)のRGBデータDA2に変換する。
(2) Image processing operations and effects:
When the print control process shown in FIG. 8 is started, image data DA1 created by the image input device is input by the image input unit, and converted into, for example, RGB data DA2 expressed in a wide RGB color space (step S102, hereinafter). , “Step” is omitted). The image data DA1 can be input directly from the image input device 50, image data stored in the DSC memory card 54i can be input via the memory card I / F, or the image input device. The image data can also be input from the CD-ROM 15a or the like on which the image data created in step 1 is recorded. When inputting image data, not only the entire image data is stored in the RAM, but the image data is divided and the divided data may be overwritten in the RAM sequentially, or a buffer area storing the image data is stored. Only represented data may be stored in the RAM. The image data DA1 is data in which an image is expressed in gradation by a large number of pixels in a dot matrix, and is image data composed of RGB defined in the sRGB color space or an image composed of YUV in the YUV color system. There are data, etc. Since each component of the image data DA1 has various gradation numbers, the image data DA1 is converted into, for example, 256 gradations of R, G, and B (integer values of 0 to 255) according to the definition of sRGB, YUV color system, etc. ) RGB data DA2.

次に、領域取得部により、RGBデータDA2から所定の顔領域のような色領域R1を抽出する処理を行う(S104)。例えば、色領域情報DA3を作成するための領域をRAM内に確保し、色空間情報14bと色抽出情報14cをHDからRAMへ読み出し、画像データDA2の各画素の中から順次着目画素を設定し、当該着目画素について、色抽出情報14cを参照して色範囲R11内であるか否かを判別し、色領域情報DA3とする領域のうち着目画素に対応する場所に、着目画素が色範囲内と判別した場合には1を格納し、着目画素が色範囲内でないと判別した場合には0を格納する。これにより、色領域の範囲を表す色領域情報DA3が生成される。   Next, the area acquisition unit performs a process of extracting a color area R1 such as a predetermined face area from the RGB data DA2 (S104). For example, an area for creating the color area information DA3 is secured in the RAM, the color space information 14b and the color extraction information 14c are read from the HD to the RAM, and the target pixel is sequentially set from each pixel of the image data DA2. Then, it is determined whether or not the target pixel is within the color range R11 with reference to the color extraction information 14c, and the target pixel is within the color range at a location corresponding to the target pixel in the region to be the color region information DA3. 1 is stored, and when it is determined that the target pixel is not within the color range, 0 is stored. Thereby, color area information DA3 representing the range of the color area is generated.

さらに、領域明るさ取得部により、色領域R1から当該色領域の明度Lpを取得する(S106)。例えば、RGBデータDA2の各画素のうち色領域情報DA3で1以上が格納された場所に対応する画素の画素値(Ri,Gi,Bi)を重み付け無しで相加平均して平均値(AR,AG,AB)を算出し、上記式(5)を用いて色領域の代表色を表す色成分値Lp,ap,bpに変換し、明度Lpを領域明るさ情報DA4とする。あるいは、図5の下段に示したように、色領域R1の内側ほど重み付けKiを大きくした色領域情報DA3を生成する処理を行い、RGBデータDA2の各画素のうち色領域情報DA3で1以上が格納された場所に対応する画素の画素値(Ri,Gi,Bi)に重み付けKiを与えて上記式(4)により相加平均して重み付け平均値(AR,AG,AB)を算出し、色成分値Lp,ap,bpに変換し、明度Lpを領域明るさ情報DA4とする。 Further, the brightness Lp of the color area is acquired from the color area R1 by the area brightness acquisition unit (S106). For example, the pixel values (Ri, Gi, Bi) of the pixels corresponding to the locations where 1 or more are stored in the color area information DA3 among the pixels of the RGB data DA2 are arithmetically averaged without weighting, and the average value (AR, AG, AB) is calculated and converted to color component values L p , a p , b p representing the representative colors of the color area using the above formula (5), and the brightness L p is set as area brightness information DA4. Alternatively, as shown in the lower part of FIG. 5, processing for generating color area information DA3 having a larger weight Ki toward the inner side of the color area R1 is performed, and among the pixels of the RGB data DA2, one or more of the color area information DA3 is one or more. The weighted Ki is given to the pixel value (Ri, Gi, Bi) of the pixel corresponding to the stored location, and the weighted average value (AR, AG, AB) is calculated by arithmetic averaging according to the above equation (4). The component values L p , a p , and b p are converted, and the lightness L p is set as area brightness information DA4.

その後、背景明るさ取得部により、RGBデータDA2から色領域R1の背景の明度Lqを取得する(S108)。例えば、RGBデータDA2の各画素のうち色領域情報DA3で0が格納された場所に対応する画素の画素値(Ri,Gi,Bi)を重み付け無しで上記式(6)により相加平均して平均値(AR,AG,AB)を算出し、上記式(5)を用いて明度ARに変換し、この明度を背景明るさ情報DA5とする。   Thereafter, the background brightness acquisition unit acquires the brightness Lq of the background of the color region R1 from the RGB data DA2 (S108). For example, the pixel value (Ri, Gi, Bi) of the pixel corresponding to the place where 0 is stored in the color area information DA3 among the pixels of the RGB data DA2 is arithmetically averaged by the above formula (6) without weighting. An average value (AR, AG, AB) is calculated, converted to brightness AR using the above equation (5), and this brightness is used as background brightness information DA5.

そして、詳しくは後述するが、調整部により、目標の明るさ情報14dと領域明るさ情報DA4と背景明るさ情報DA5と閾値14e〜fと修正目標の明るさ情報14hとを参照して、色領域の明るさを目標の明るさにする明るさ補正をRGBデータDA2に対して行い、調整後のRGBデータDA6を生成する(S110)。
以上のS102〜S110の処理を行うPC10が画像処理装置を構成する。
As will be described in detail later, the adjustment unit refers to the target brightness information 14d, the area brightness information DA4, the background brightness information DA5, the threshold values 14e to f, and the corrected target brightness information 14h. Brightness correction is performed on the RGB data DA2 to set the brightness of the region to the target brightness, and adjusted RGB data DA6 is generated (S110).
The PC 10 that performs the processes of S102 to S110 constitutes an image processing apparatus.

その後、印刷制御部により、RGBデータDA6の各画素の中で色変換対象の対象画素を順次移動させながら、色変換LUTを参照することにより、対象画素のR,G,Bの階調値をC,M,Y,Kの階調値に変換し、CMYKデータを生成する(S112)。色変換LUTは、色変換前の色を要素色RGB毎の階調値で表現する入力データと、印刷媒体上でCMYKのインクにより色再現される色をCMYK毎の階調値で表現する出力データと、の対応関係を複数の参照点について規定した情報テーブルとされている。CMYKデータは、RGBデータDA6と同じくドットマトリクス状に配置された多数の画素で画像を階調表現した画像データであり、画素毎の階調データはプリンタが印刷ヘッドから吐出する各インクの使用量を表すC,M,Y,K各256階調のデータであるとする。   After that, the print control unit refers to the color conversion LUT while sequentially moving the target pixel to be color-converted among the pixels of the RGB data DA6, thereby determining the R, G, and B gradation values of the target pixel. Conversion to C, M, Y, and K gradation values generates CMYK data (S112). The color conversion LUT is an input data that expresses the color before color conversion with gradation values for each of the element colors RGB, and an output that expresses a color that is reproduced with CMYK ink on the print medium with gradation values for each CMYK. It is an information table that defines a correspondence relationship with data for a plurality of reference points. The CMYK data is image data in which an image is expressed in gradation by a large number of pixels arranged in a dot matrix like the RGB data DA6. The gradation data for each pixel is the usage amount of each ink ejected from the print head by the printer. Suppose that the data is 256 gradations of C, M, Y, and K.

次に、CMYKデータに対して誤差拡散法やディザ法や濃度パターン法といった所定のハーフトーン処理を行って階調数を減らし、CMYK毎の多値データを生成する(S114)。多値データは、ドットの形成状況をドットの形成有無として表すデータであり、例えば階調値「1」をドット形成有り、階調値「0」をドット形成無しに対応させて二値化した2階調の二値データとすることができる。むろん、4階調等のデータとしてもよい。さらに、多値データに対して所定のラスタライズ処理(インターレース処理)を行って画素をプリンタで使用される順番に並べ替え、CMYK毎のラスタデータ(印刷データ)DA7を生成する(S116)。そして、ラスタデータDA7をプリンタ20に対して出力して(S118)、印刷制御処理を終了する。これにより、PCは、多値データに対応するドットをプリンタに形成させて画像を印刷させる制御を行う。
すると、プリンタ20は、ラスタデータDA7を入手し、当該ラスタデータに基づいてCMYKデータに対応するCMYKのインクの各ドットを形成し、色調整後のRGBデータDA6に対応する画像IM1を印刷媒体M1上へ印刷する。
Next, predetermined halftone processing such as an error diffusion method, a dither method, and a density pattern method is performed on the CMYK data to reduce the number of gradations, and multi-value data for each CMYK is generated (S114). The multi-value data is data representing the dot formation status as the presence / absence of dot formation. For example, the gradation value “1” is binarized by corresponding to dot formation and the gradation value “0” corresponding to no dot formation. Two-level binary data can be obtained. Of course, it is good also as data of 4 gradations. Further, predetermined rasterization processing (interlace processing) is performed on the multi-value data to rearrange the pixels in the order used by the printer, and raster data (print data) DA7 for each CMYK is generated (S116). Then, the raster data DA7 is output to the printer 20 (S118), and the print control process is terminated. As a result, the PC controls the printer to form dots corresponding to the multi-value data and print the image.
Then, the printer 20 obtains the raster data DA7, forms each dot of CMYK ink corresponding to the CMYK data based on the raster data, and outputs the image IM1 corresponding to the RGB data DA6 after color adjustment to the print medium M1. Print up.

図9は、S110で行われる調整処理をフローチャートにより示している。処理を開始すると、まず、色領域R1の目標の明度Ltを取得する(S202)。例えば、図1で示した明度差ΔL=Lq−Lpと目標の明度Ltとの対応関係を規定した目標の明るさ情報14dをHDからRAMに読み出し、最終的な目標の明度を格納する変数LLastの領域をRAM内に確保し、明度差ΔLに対応する目標の明度Lt(ΔL)を取得して、このLt(ΔL)の値を前記変数LLastに代入する。むろん、目標の明るさを指定する入力をユーザから受け付け、指定された明るさを表す情報を目標の明るさ情報として取得することにより、目標の明るさを取得してもよい。
次に、色領域の明度Lpが第一の明度L1より小さく、かつ、背景の明度Lqが第二の明度L2より小さいか否かを判断する(S204)。条件成立時、画像データDA2が所定のストロボ未達条件(ストロボ未達モード)を満たすとして、図7で示した明度Lpと明度Lcとの対応関係を規定した修正目標の明るさ情報14hを参照して、色領域の明度Lpのみに応じて目標Ltから下げた修正目標の明度Lc(Lp<Lc<Lt)を設定し(S206)、S212に進む。このLcの値は、変数LLastに代入しておく。なお、逆光条件でなくてLp≧L1またはLq≧L2であれば、背景が極端に明るいということでなく画像が全体にある程度明るいため、色領域の明度を目標の明度Ltにする通常モードの明度補正を行っても画像にノイズが表れない。
FIG. 9 is a flowchart showing the adjustment process performed in S110. When the process is started, first, the target brightness Lt of the color region R1 is acquired (S202). For example, the target brightness information 14d defining the correspondence between the brightness difference ΔL = Lq−Lp and the target brightness Lt shown in FIG. 1 is read from the HD to the RAM, and the variable LLast for storing the final target brightness is stored. Is secured in the RAM, the target brightness Lt (ΔL) corresponding to the brightness difference ΔL is obtained, and the value of this Lt (ΔL) is substituted into the variable LLast. Of course, the target brightness may be acquired by receiving an input specifying the target brightness from the user and acquiring information indicating the specified brightness as the target brightness information.
Next, it is determined whether or not the lightness Lp of the color region is smaller than the first lightness L1 and the lightness Lq of the background is smaller than the second lightness L2 (S204). When the condition is satisfied, assuming that the image data DA2 satisfies a predetermined strobe non-achieving condition (strobe non-achieving mode), refer to the correction target brightness information 14h that defines the correspondence between the lightness Lp and the lightness Lc shown in FIG. Then, the correction target lightness Lc (Lp <Lc <Lt) lowered from the target Lt according to only the lightness Lp of the color region is set (S206), and the process proceeds to S212. The value of Lc is substituted for the variable LLast. Note that if Lp ≧ L1 or Lq ≧ L2 and not the backlight condition, the background is extremely bright and the entire image is bright to some extent, so the lightness of the normal mode that makes the lightness of the color area the target lightness Lt No noise appears in the image even after correction.

S204で条件不成立時、背景の明度Lqから色領域の明度Lpを差し引いた明度差ΔL=Lq−Lpが所定の明度差ΔLthより小さいか否かを判断する(S208)。条件成立時、画像データDA2が所定の逆光条件(逆光モード)を満たすとして、図1で示した明度差ΔLと明度Lcとの対応関係を規定した修正目標の明るさ情報14hを参照して、明度差ΔLに応じて目標Ltから下げた修正目標の明度Lc(Lp<Lc<Lt)を設定し(S210)、S212に進む。このLcの値は、変数LLastに代入しておく。なお、Lp≧L1またはLq≧L2であって逆光条件でなければ、背景が極端に明るい結果として色領域が暗すぎるということはないので、色領域の明度を目標の明度Ltにする通常モードの明度補正を行っても画像にノイズが表れない。
S204およびS208で条件不成立時、上記通常モード(所定の通常撮像条件)であるとして、目標の明度Ltを下げることなく、S212に進む。
When the condition is not satisfied in S204, it is determined whether or not the lightness difference ΔL = Lq−Lp obtained by subtracting the lightness Lp of the color area from the lightness Lq of the background is smaller than a predetermined lightness difference ΔLth (S208). When the condition is satisfied, assuming that the image data DA2 satisfies a predetermined backlight condition (backlight mode), referring to the correction target brightness information 14h that defines the correspondence between the brightness difference ΔL and the brightness Lc shown in FIG. The correction target brightness Lc (Lp <Lc <Lt) lowered from the target Lt according to the brightness difference ΔL is set (S210), and the process proceeds to S212. The value of Lc is substituted for the variable LLast. Note that if Lp ≧ L1 or Lq ≧ L2 and the backlight condition is not met, the color area will not be too dark as a result of the extremely bright background, so the brightness of the color area is set to the target brightness Lt. Noise does not appear in the image even after brightness correction.
When the conditions are not satisfied in S204 and S208, it is determined that the normal mode (predetermined normal imaging conditions) is set, and the process proceeds to S212 without decreasing the target brightness Lt.

S212では、変数LLastの値Lp’と色領域の明度Lpとを用いて、RGBデータDA2の各画素の画素値に対する補正倍率εを決定する。そして、補正倍率εに基づいてRGBデータDA2の画素値を画素毎に補正し、調整後のRGBデータDA6を生成して(S214)、調整処理を終了する。
以上の処理により、色領域の明るさを目標の明るさにする明るさ補正が画像データDA2に対して行われる。
In S212, the correction magnification ε for the pixel value of each pixel of the RGB data DA2 is determined using the value Lp ′ of the variable LLast and the brightness Lp of the color area. Then, the pixel value of the RGB data DA2 is corrected for each pixel based on the correction magnification ε, the adjusted RGB data DA6 is generated (S214), and the adjustment process is terminated.
Through the above processing, brightness correction is performed on the image data DA2 so that the brightness of the color area becomes the target brightness.

図10では、下段のグラフが明るさ補正(露出補正)を行った場合の画質調整特性を示しており、上段のグラフが当該画質調整特性を得るために実施されるべき変換処理の特性を示している。これらのグラフでは、横軸が入力値、縦軸が出力値であり、各入力値が実線で示す特性に従ってグラフ上で対応する出力値に変換されることを示している。破線で示す直線は、入力値と出力値が等しい場合の特性を示している。グラフ6は正変換特性Y=F(RGB)、グラフ8は変換特性F-1(Y)、グラフ7は露出補正の入出力特性である。グラフ6に示す正変換特性によれば、RGBデータDA2の画素値をRGBの色成分毎に光の量Yに変換することができる。露出補正は、光の量を定数倍することによって実施できるので、グラフ7のように光の量Yをε倍して露出補正特性を規定する。ここで、調整前後の色領域の明度をそれぞれLp,Lp’とすると、
ε=Lp’/Lp …(7)
としている。
図10では、露出補正後の光の量をeYとし、横軸を光の量Y、縦軸を露出補正後の光の量eYとして示している。露出補正後の光の量eYをグラフ8のように変換特性F-1で変換すると、露出補正後の画像データをRGBの色成分毎に取得することができる。
In FIG. 10, the lower graph shows the image quality adjustment characteristics when brightness correction (exposure correction) is performed, and the upper graph shows the characteristics of the conversion process to be performed to obtain the image quality adjustment characteristics. ing. In these graphs, the horizontal axis represents an input value and the vertical axis represents an output value, which indicates that each input value is converted into a corresponding output value on the graph according to the characteristics indicated by the solid line. A straight line indicated by a broken line indicates a characteristic when the input value is equal to the output value. Graph 6 is a positive conversion characteristic Y = F (RGB), graph 8 is a conversion characteristic F −1 (Y), and graph 7 is an input / output characteristic for exposure correction. According to the positive conversion characteristic shown in the graph 6, the pixel value of the RGB data DA2 can be converted into the amount of light Y for each RGB color component. Since the exposure correction can be performed by multiplying the amount of light by a constant, the exposure correction characteristic is defined by multiplying the amount of light Y by ε as shown in the graph 7. Here, if the brightness of the color area before and after adjustment is Lp and Lp ′, respectively,
ε = Lp '/ Lp (7)
It is said.
In FIG. 10, the amount of light after exposure correction is represented as eY, the horizontal axis represents the amount of light Y, and the vertical axis represents the amount of light eY after exposure correction. If the light amount eY after exposure correction is converted with the conversion characteristic F −1 as shown in the graph 8, image data after exposure correction can be acquired for each RGB color component.

グラフ9は、グラフ6〜グラフ8の変換特性を重畳した結果であり、上記画質調整特性である。すなわち、横軸は画像データDA2におけるRGBの各色成分値であり、縦軸はRGBの各色成分について露出補正を行った後の画像データDA6である。
そこで、補正倍率εの値に応じて調整前のRGBデータDA2におけるR,G,Bの画素値と調整後のRGBデータDA6におけるR,G,Bの画素値との対応関係を階調毎に規定したLUT(情報テーブル)を補正対応情報としてHD14等に記憶させておき、このLUTを参照して調整前のRGBデータDA2の画素値を要素色RGB毎に変換することにより、調整後のRGBデータDA6を生成することができる。
正変換特性Y=F(RGB)に従った変換と変換特性F-1(Y)に従った変換とを行うと調整後の画像を非常に高画質にすることができる点で好適であるものの、処理を簡素化させるために、Y=F(RGB)とF-1(Y)とに従った変換を行わずにRGBデータDA2のR,G,Bの画素値に補正倍率εを乗じてRGBデータDA6を生成してもよい。また、補正倍率εの値に応じて調整前の画素値と調整後の画素値との対応関係を画素毎に規定したLUTを用意してHD14等に記憶させておき、補正倍率εの値に応じたLUTを参照してRGBデータDA2のR,G,Bの画素値を当該LUTの情報に従って変換してRGBデータDA6を生成してもよい。
A graph 9 is a result of superimposing the conversion characteristics of the graphs 6 to 8 and is the image quality adjustment characteristic. That is, the horizontal axis represents the RGB color component values in the image data DA2, and the vertical axis represents the image data DA6 after exposure correction has been performed for the RGB color components.
Therefore, the correspondence relationship between the R, G, and B pixel values in the RGB data DA2 before adjustment and the R, G, and B pixel values in the adjusted RGB data DA6 according to the value of the correction magnification ε for each gradation. The specified LUT (information table) is stored in the HD 14 or the like as correction correspondence information, and the RGB values DA2 before adjustment are converted for each element color RGB by referring to this LUT, thereby adjusting the adjusted RGB. Data DA6 can be generated.
The conversion according to the positive conversion characteristic Y = F (RGB) and the conversion according to the conversion characteristic F −1 (Y) are preferable in that the image after adjustment can have a very high image quality. In order to simplify the process, the R, G, B pixel values of the RGB data DA2 are multiplied by the correction magnification ε without performing conversion according to Y = F (RGB) and F −1 (Y). The RGB data DA6 may be generated. Also, an LUT that defines the correspondence between the pixel value before adjustment and the pixel value after adjustment according to the value of the correction magnification ε is prepared for each pixel and stored in the HD 14 or the like, and the value of the correction magnification ε is set. The RGB data DA6 may be generated by converting the R, G, and B pixel values of the RGB data DA2 according to the information of the LUT with reference to the corresponding LUT.

なお、明るさ補正後のRGBデータDA6に対して色バランス調整を行ってもよい。上述したように、Lab色空間で色領域の目標点T(Lt,at,bt)、色領域の代表色Cpの点P(Lp,ap,bp)として、補正後の点P’(Lp,ap+α(at−ap),bp+α(bt−bp))を求め、上記式(7)を用いてRGB色空間における色成分値AR’,AG’,AB’に変換し、要素色RGB毎の補正倍率γ,δ,βを決定すると、補正倍率γ,δ,βに基づいてRGBデータDA6の画素値を画素毎に補正することができる。例えば、補正倍率γ,δ,βに応じて調整前の画素値と調整後の画素値との対応関係を画素毎に規定したLUTを用意してHD14等に記憶させておけば、補正倍率γ,δ,βの値に応じたLUTを参照してRGBデータDA6のR,G,Bの画素値を当該LUTの情報に従って変換して色バランス調整後のRGBデータを生成することができる。
むろん、明るさ補正前のRGBデータDA2に対して色バランス調整を行った後、本発明の明るさ補正を行ってもよい。
以上により、画像の色バランスも調整されるので、画質がさらに向上する。
Note that color balance adjustment may be performed on the RGB data DA6 after brightness correction. As described above, in the Lab color space, the target point T (L t , a t , b t ) of the color region and the point P (L p , a p , b p ) of the representative color Cp of the color region are corrected. the point P '(L p, a p + α (a t -a p), b p + α (b t -b p)) of the calculated, the equation (7) color component values AR in the RGB color space using a' By converting to AG ′, AB ′ and determining the correction magnifications γ, δ, β for the element colors RGB, the pixel values of the RGB data DA6 can be corrected for each pixel based on the correction magnifications γ, δ, β. . For example, if a LUT that defines the correspondence between the pixel value before adjustment and the pixel value after adjustment according to the correction magnifications γ, δ, β is prepared for each pixel and stored in the HD 14 or the like, the correction magnification γ R, G, B pixel values of the RGB data DA6 are converted according to the information of the LUT with reference to the LUT corresponding to the values of, δ, β, and the RGB data after color balance adjustment can be generated.
Of course, the brightness correction of the present invention may be performed after the color balance adjustment is performed on the RGB data DA2 before the brightness correction.
As described above, the color balance of the image is also adjusted, so that the image quality is further improved.

調整処理が終了すると、図8のS112〜S118で調整後のRGBデータDA6に対応する画像をプリンタ20に印刷させる制御が行われる。すると、プリンタは、RGBデータDA6に対応して調整された画像IM1を印刷媒体M1上へ印刷する。   When the adjustment process is completed, control is performed to cause the printer 20 to print an image corresponding to the RGB data DA6 after adjustment in S112 to S118 of FIG. Then, the printer prints the image IM1 adjusted corresponding to the RGB data DA6 on the print medium M1.

図13は、色領域と背景とが種々の明るさとされた各画像の明るさ補正を模式的に示している。ここで、横軸は、背景と色領域との明るさの差であり、上述した明度差ΔL=Lq−Lp等で表される。縦軸は、色領域の明るさであり、上述した明度Lp等で表され、露出が表されている。ストロボ未達条件や逆光条件でなければ、通常条件(通常モード)であるとして、顔領域等の色領域が感覚的に同じ明るさとなるように明るさが補正される。すなわち、通常条件では、色領域の明度が線CO1よりも上側にある場合には色領域の明度が線CO1の位置まで下げられ、色領域の明度が線CO1よりも下側にある場合には色領域の明度が線CO1の位置まで上げられる。
ここで、Lp<L1かつLq<L2、すなわち、ストロボ未達条件では、前提として色領域の明度が線CO1よりも下側にあり、当該色領域の明度は、上げられるものの、線CO1の下の明度で止められる。これにより、画像にノイズが生じない程度まで明るくされ、画質を適切に向上させることができる。
また、Lq−Lp>ΔLth、すなわち、逆光条件では、前提として色領域の明度が線CO1よりも下側にあり、当該色領域の明度は、上げられるものの、線CO1の下の明度で止められる。これにより、画像にノイズが生じない程度まで明るくされ、画質を適切に向上させることができる。
FIG. 13 schematically shows brightness correction of each image in which the color region and the background have various brightnesses. Here, the horizontal axis represents the difference in brightness between the background and the color area, and is represented by the above-described brightness difference ΔL = Lq−Lp or the like. The vertical axis represents the brightness of the color area, which is represented by the above-described lightness Lp and the like, and represents the exposure. If it is not a strobe failure condition or a backlight condition, the brightness is corrected so that the color area such as the face area has the same brightness sensuously as the normal condition (normal mode). That is, under normal conditions, when the brightness of the color area is above the line CO1, the brightness of the color area is lowered to the position of the line CO1, and when the brightness of the color area is below the line CO1. The brightness of the color area is increased to the position of line CO1.
Here, under the condition that Lp <L1 and Lq <L2, that is, the strobe failure condition, the lightness of the color area is on the lower side of the line CO1, and the lightness of the color area is raised, but it is below the line CO1. It is stopped at the brightness. Thereby, the image is brightened to the extent that noise does not occur, and the image quality can be improved appropriately.
In addition, under the condition of Lq−Lp> ΔLth, that is, the backlight condition, the lightness of the color region is assumed to be lower than the line CO1, and the lightness of the color region is raised but stopped at the lightness below the line CO1. . Thereby, the image is brightened to the extent that noise does not occur, and the image quality can be improved appropriately.

以上説明したように、本発明によると、被写体にストロボの光がほとんどあるいは全く届かなかったときのように、画像入力装置で全体に非常に暗い画像が作成された場合でも、目標の明るさが適切に下げられるので、画像にノイズが生じるといった画像の破綻を防ぐことができる。また、画像入力装置で逆光条件にて色領域の暗い画像が作成された場合でも、目標の明るさが適切に下げられるので、画像にノイズが生じるといった画像の破綻を防ぐことができる。従って、通常条件とストロボ未達条件と逆光条件とで同時に適切な明るさ補正(露出補正)の可能な画像処理装置を提供することができ、画像入力装置で適切な明るさ調整が行われなかった場合でも、画像入力装置により作成された画像の明るさ適切に調整することが可能になる。
むろん、顔領域以外の色領域を有する画像の明るさを調整する場合にも同様のことがいえる。
As described above, according to the present invention, even when a very dark image is created entirely by the image input device, such as when the strobe light does not reach the subject, the target brightness is reduced. Since it can be lowered appropriately, it is possible to prevent image corruption such as noise in the image. Further, even when an image input device creates an image with a dark color area under backlight conditions, the target brightness can be appropriately lowered, so that it is possible to prevent image corruption such as noise in the image. Therefore, it is possible to provide an image processing apparatus capable of performing appropriate brightness correction (exposure correction) at the same time under the normal condition, the strobe failure condition, and the backlight condition, and the appropriate brightness adjustment cannot be performed by the image input apparatus. Even in such a case, it is possible to appropriately adjust the brightness of the image created by the image input device.
Of course, the same can be said for adjusting the brightness of an image having a color area other than the face area.

(3)変形例:
本発明の画像処理装置を含む印刷システムは、様々な構成が可能である。例えば、印刷装置は、コンピュータと一体化されたもの、単色画像のみ印刷する印刷装置、でもよい。上述したフローについては、一部または全部を印刷装置、専用の画像処理装置、外部のサーバ、等で実行してもよい。印刷装置がハーフトーン処理とラスタライズ処理を実行可能な装置であれば、色変換後の画像データをそのまま同印刷装置に出力すればよい。
明るさ補正対象の画像データは、RGBデータ以外にも、YUV表色系で定義される色成分YUV毎の画素値からなるYUVデータ、色成分Lab毎の画素値からなるLabデータ、要素色CMY毎の画素値からなるCMYデータ、要素色CMYK毎の画素値からなるCMYKデータ、等でもよい。
上記目標の明るさは、上記明度Jのように感覚的な明るさの違いを補償するように設定されると好適であるものの、背景の明るさとは関係なく一定の明るさとされても、ストロボ未達条件や逆光条件で画像にノイズを生じさせず適切に明るさを向上させる効果が得られる。
(3) Modification:
The printing system including the image processing apparatus of the present invention can have various configurations. For example, the printing apparatus may be an apparatus integrated with a computer or a printing apparatus that prints only a single color image. Some or all of the above-described flows may be executed by a printing apparatus, a dedicated image processing apparatus, an external server, or the like. If the printing apparatus is an apparatus that can execute halftone processing and rasterization processing, the image data after color conversion may be output to the printing apparatus as it is.
In addition to RGB data, image data to be corrected for brightness includes YUV data composed of pixel values for each color component YUV defined in the YUV color system, Lab data composed of pixel values for each color component Lab, and element colors CMY. CMY data including pixel values for each pixel, CMYK data including pixel values for each element color CMYK, and the like may be used.
Although it is preferable that the target brightness is set so as to compensate for a difference in sensory brightness such as the brightness J, even if the target brightness is constant regardless of the background brightness, An effect of appropriately improving brightness without causing noise in the image under unreached conditions or backlight conditions can be obtained.

暗領域A1を判別するための第一の明るさ(明度L1)や第二の明るさ(明度L2)は、固定値以外にも、色領域や背景の明るさ(明度Lp,Lq)に応じて変化する変動値でもよい。例えば、L1=k1×Lt(0<k1<1、例えばk1=0.5)、L2=k2×Lt(0<k2<1、例えばk2=0.5)と、L1,L2を目標の明るさ(明度Lt)に応じて変化する明度とすることができる。また、L1=L1’−k3×Lp(0<L1’<Lt、0<k3<1)、L2=L2’−k4×Lq(0<L2’<Lt、0<k4<1)のようにしてもよい。
逆光領域A2を判別するための明るさの所定の差異(明度差ΔLth)は、固定値以外にも、色領域や背景の明るさ(明度Lp,Lq)に応じて変化する変動値でもよい。例えば、ΔLth=ΔLth’+k5×Lp(−1<k5<1)、ΔLth=ΔLth’+k6×Lq(−1<k6<1)、ΔLth=ΔLth’+k7×(Lp+Lq)(−1<k7<1)、と、ΔLthを色領域や背景の明るさ(明度Lp,Lq)に応じて変化する明度とすることができる。
The first brightness (lightness L1) and the second brightness (lightness L2) for determining the dark area A1 depend on the brightness of the color area and the background (lightness Lp, Lq) in addition to the fixed value. It may be a variable value that changes. For example, L1 = k 1 × Lt (0 <k 1 <1, for example, k 1 = 0.5), L2 = k 2 × Lt (0 <k 2 <1, for example, k 2 = 0.5), and target L1 and L2 The brightness can be changed according to the brightness (lightness Lt). Also, L1 = L1′−k 3 × Lp (0 <L1 ′ <Lt, 0 <k 3 <1), L2 = L2′−k 4 × Lq (0 <L2 ′ <Lt, 0 <k 4 <1 ).
The predetermined difference in brightness (lightness difference ΔLth) for determining the backlight region A2 may be a variable value that changes according to the brightness of the color region or the background (lightness Lp, Lq), in addition to a fixed value. For example, ΔLth = ΔLth ′ + k 5 × Lp (−1 <k 5 <1), ΔLth = ΔLth ′ + k 6 × Lq (−1 <k 6 <1), ΔLth = ΔLth ′ + k 7 × (Lp + Lq) (− 1 <k 7 <1), and ΔLth can be set to a lightness that changes in accordance with the brightness of the color region and the background (lightness Lp, Lq).

目標の明度LtがΔL=Lq−Lpに応じた明度とされ、逆光条件での修正目標の明度LcもΔLに応じた明度とされるので、図9のS208〜S210の処理を省略可能である。
図14は、変形例に係る画像処理装置が行う調整処理をフローチャートにより示している。本変形例では、ΔL≦ΔLthの場合に上記目標の明度Lt、ΔL>ΔLthの場合に上記修正目標の明度Lcとなる補正目標の明度LbとΔLとの対応関係を規定した補正目標の明るさ情報を用意してHD14に記憶させる。まず、上記S202の代わりに、色領域R1の補正目標の明度(明るさ)Lbを取得する(S202)。ここで、前記補正目標の明るさ情報を参照して、明度差ΔLに対応する補正目標の明度Lbを取得する。次に、Lp<L1かつLq<L2か否かを判断する(S204)。条件成立時、図7で示した明度Lpと明度Lcとの対応関係を規定した修正目標の明るさ情報14hを参照して、色領域の明度Lpのみに応じて目標Ltから下げた修正目標の明度Lc(Lp<Lc<Lt)を設定し(S206)、S212に進む。一方、条件不成立時には、即座にS212に進む。S212では、変数LLastの値Lp’と色領域の明度Lpとを用いて補正倍率εを決定する(S212)。そして、補正倍率εに基づいてRGBデータDA2から調整後のRGBデータDA6を生成する(S214)。
本処理によっても、ストロボ未達条件と逆光条件とで画像の明るさが適切に調整される。
Since the target brightness Lt is the brightness according to ΔL = Lq−Lp and the correction target brightness Lc under the backlight condition is also the brightness according to ΔL, the processing of S208 to S210 in FIG. 9 can be omitted. .
FIG. 14 is a flowchart showing the adjustment process performed by the image processing apparatus according to the modification. In this modification, the target brightness Lt when ΔL ≦ ΔLth, and the brightness of the correction target that defines the correspondence between the correction target brightness Lb and ΔL that becomes the correction target brightness Lc when ΔL> ΔLth. Information is prepared and stored in the HD 14. First, instead of S202, the correction target brightness (brightness) Lb of the color region R1 is acquired (S202). Here, the brightness Lb of the correction target corresponding to the brightness difference ΔL is obtained with reference to the brightness information of the correction target. Next, it is determined whether Lp <L1 and Lq <L2 are satisfied (S204). When the condition is satisfied, the correction target brightness information 14h defining the correspondence between the lightness Lp and the lightness Lc shown in FIG. 7 is referred to, and the correction target lowered from the target Lt according to only the lightness Lp of the color region The brightness Lc (Lp <Lc <Lt) is set (S206), and the process proceeds to S212. On the other hand, when the condition is not satisfied, the process immediately proceeds to S212. In S212, the correction magnification ε is determined using the value Lp ′ of the variable LLast and the brightness Lp of the color area (S212). Then, the adjusted RGB data DA6 is generated from the RGB data DA2 based on the correction magnification ε (S214).
Also in this process, the brightness of the image is appropriately adjusted under the strobe failure condition and the backlight condition.

また、色領域の明るさが所定範囲内となった場合には「好ましい明るさ」の範囲内であるとして明るさ補正を行わず、色領域の明るさが前記所定範囲外となった場合にのみ明るさ補正を行うように調整部を構成してもよい。
図15は、変形例に係る印刷制御装置が行う印刷制御処理を示すフローチャートである。本処理では、S106とS108の間にS130が挿入されている。すなわち、S106で色領域の明るさ(明度Lp)を取得すると、S130で明度Lpが「好ましい明るさ」の所定範囲LL〜LU内であるか否かを判断する。ただし、0<LL<Lt<LU<100とする。明度Lpが所定範囲の境界LL,LUの場合には、該範囲内と判断してもよいし、該範囲外と判断してもよい。明度Lpが前記範囲外と判断したときにはS108〜S118の処理を行う一方、明度Lpが前記範囲内と判断したときにはS112に進んで調整処理を省略する。これにより、色領域の明るさが「好ましい明るさ」の範囲内であれば画像データの明るさを調整する処理が省略されるので、画像処理を高速化させることが可能になる。
In addition, when the brightness of the color area falls within the predetermined range, brightness correction is not performed assuming that the brightness is within the range of “preferred brightness”, and the brightness of the color area falls outside the predetermined range. The adjustment unit may be configured to perform only brightness correction.
FIG. 15 is a flowchart illustrating print control processing performed by the print control apparatus according to the modification. In this process, S130 is inserted between S106 and S108. That is, when the brightness (lightness Lp) of the color region is acquired in S106, it is determined in S130 whether the lightness Lp is within a predetermined range L L to L U of “preferable brightness”. However, 0 <L L <Lt <L U <100. When the lightness Lp is between the boundaries L L and L U of the predetermined range, it may be determined that it is within the range or may be determined to be outside the range. When it is determined that the lightness Lp is outside the range, the processing of S108 to S118 is performed. On the other hand, when the lightness Lp is determined to be within the range, the process proceeds to S112 and the adjustment processing is omitted. As a result, if the brightness of the color region is within the range of “preferable brightness”, the process of adjusting the brightness of the image data is omitted, so that the image processing can be speeded up.

ところで、図2で示した印刷制御部U6を備えていない画像処理装置でも、本発明の基本的な作用、効果が得られる。また、領域抽出部U1のうち画像入力部U11を備えていない画像処理装置でも、本発明の基本的な作用、効果が得られる。
なお、本発明は、上述した実施例や変形例に限られず、上述した実施例および変形例の中で開示した各構成を相互に置換したり組み合わせを変更したりした構成、公知技術並びに上述した実施例および変形例の中で開示した各構成を相互に置換したり組み合わせを変更したりした構成、等も含まれる。
以上説明したように、本発明によると、種々の態様により、画像入力装置で適切な明るさ補正が行われなかった場合でも、画像入力装置により作成された画像データの明るさを適切に調整することが可能になる。
Incidentally, even the image processing apparatus that does not include the print control unit U6 shown in FIG. 2 can obtain the basic functions and effects of the present invention. Further, even in an image processing apparatus that does not include the image input unit U11 in the region extraction unit U1, the basic operation and effect of the present invention can be obtained.
In addition, this invention is not restricted to the Example and modification which were mentioned above, Each structure disclosed in the Example and modification which were mentioned above mutually replaced, the structure which changed the combination, well-known technique, and the above-mentioned Configurations in which the respective configurations disclosed in the embodiments and the modified examples are mutually replaced or combinations are changed are also included.
As described above, according to the present invention, the brightness of the image data created by the image input device is appropriately adjusted according to various aspects even when the image input device has not performed appropriate brightness correction. It becomes possible.

本発明の一実施形態である画像処理を模式的に示す図。The figure which shows typically the image processing which is one Embodiment of this invention. 画像処理装置を含む印刷制御装置の構成を模式的に示すブロック図。FIG. 2 is a block diagram schematically illustrating a configuration of a print control apparatus including an image processing apparatus. 印刷制御装置を含む印刷システムの構成の概略を示すブロック図。1 is a block diagram showing an outline of a configuration of a printing system including a printing control apparatus. 色領域とする色範囲をab平面にて模式的に示す図。The figure which shows typically the color range made into a color area | region in ab plane. 画像データから色領域を抽出する様子を模式的に示す図。The figure which shows a mode that a color area | region is extracted from image data. 背景の明度に応じて変化する感覚的な明度Jを補償する様子を模式的に示す図。The figure which shows typically a mode that the sensory brightness J which changes according to the brightness of a background is compensated. 暗い画像における色領域の明度の補正目標を模式的に示す図。The figure which shows typically the correction | amendment target of the brightness of the color area in a dark image. 印刷制御装置が行う印刷制御処理を示すフローチャート。6 is a flowchart illustrating print control processing performed by the print control apparatus. 画像処理装置が行う調整処理を示すフローチャート。6 is a flowchart showing adjustment processing performed by the image processing apparatus. 画像データの明るさを補正する様子を模式的に示す図。The figure which shows a mode that the brightness of image data is correct | amended. デジタルスチルカメラが行う色調整処理とその変換特性とを模式的に示す図。The figure which shows typically the color adjustment process which a digital still camera performs, and its conversion characteristic. デジタルスチルカメラの構成を模式的に示すブロック図。The block diagram which shows the structure of a digital still camera typically. 本発明の作用を模式的に示す図。The figure which shows the effect | action of this invention typically. 変形例に係る印刷制御装置が行う調整処理を示すフローチャート。9 is a flowchart illustrating adjustment processing performed by a print control apparatus according to a modification. 変形例に係る印刷制御装置が行う印刷制御処理を示すフローチャート。9 is a flowchart illustrating print control processing performed by a print control apparatus according to a modification.

符号の説明Explanation of symbols

10…パーソナルコンピュータ(PC)、14…ハードディスク(HD)、14b…色空間情報、14c…色抽出情報、14d…目標の明るさ情報、14e…第一の明度(第一の明るさ)、14f…第二の明度(第二の明るさ)、14g…所定の明度差(所定の差異)、14h…明るさを下げた修正目標の明るさ情報、20…インクジェットプリンタ(印刷装置)、50…デジタルスチルカメラ(画像入力装置)、A1…暗領域、A2…逆光領域、DA1,DA2…画像データ、DA3…色領域情報、DA4…領域明るさ情報、DA5…背景明るさ情報、DA6…調整後の画像データ、R1…色領域、R2…背景領域、R11…色範囲、U0…印刷制御装置、U1…領域抽出部(領域抽出手段)、U2…領域明るさ取得部(領域明るさ取得手段)、U3…背景明るさ取得部(背景明るさ取得手段)、U4…調整部(調整手段)、U5…情報記憶領域(情報記録領域)、U6…印刷制御部、U11…画像入力部、U12…領域取得部、 DESCRIPTION OF SYMBOLS 10 ... Personal computer (PC), 14 ... Hard disk (HD), 14b ... Color space information, 14c ... Color extraction information, 14d ... Target brightness information, 14e ... First brightness (first brightness), 14f ... second brightness (second brightness), 14g ... predetermined brightness difference (predetermined difference), 14h ... corrected target brightness information with reduced brightness, 20 ... inkjet printer (printing apparatus), 50 ... Digital still camera (image input device), A1 ... dark area, A2 ... backlight area, DA1, DA2 ... image data, DA3 ... color area information, DA4 ... area brightness information, DA5 ... background brightness information, DA6 ... after adjustment Image data, R1... Color region, R2... Background region, R11... Color range, U0... Print control device, U1... Region extraction unit (region extraction means), U2. ), U3 ... background brightness acquisition unit (background brightness acquisition unit), U4 ... adjustment unit (adjustment unit), U5 ... information storage area (information recording area), U6 ... print control unit, U11 ... image input unit, U12 ... area acquisition unit,

Claims (14)

画像入力装置により作成された画像データから所定の色領域を抽出する領域抽出手段と、抽出した色領域から当該色領域の明るさを取得する領域明るさ取得手段と、前記色領域の明るさを当該色領域について予め設定された目標の明るさにする明るさ補正を前記画像データに対して行う調整手段とを備える画像処理装置であって、
前記画像データから前記色領域の背景の明るさを取得する背景明るさ取得手段を備え、
前記調整手段は、前記目標の明るさよりも暗い第一の明るさより前記色領域の明るさが暗く、かつ、前記目標の明るさよりも暗い第二の明るさより前記背景の明るさが暗いとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする画像処理装置。
Area extracting means for extracting a predetermined color area from image data created by the image input device; area brightness acquiring means for acquiring brightness of the color area from the extracted color area; and brightness of the color area. An image processing apparatus comprising: an adjustment unit that performs brightness correction on the image data so as to obtain a target brightness set in advance for the color region;
Background brightness acquisition means for acquiring the brightness of the background of the color region from the image data;
The adjusting means, when the brightness of the color area is darker than the first brightness darker than the target brightness, and when the background brightness is darker than the second brightness darker than the target brightness, An image processing apparatus that performs brightness correction on the image data with brightness lower than a target.
前記目標の明るさは、前記背景の明るさと前記色領域の明るさとの差異に応じて変化する明るさとされ、
前記調整手段は、前記色領域の明るさが前記第一の明るさより暗く、かつ、前記背景の明るさが前記第二の明るさより暗いとき、前記背景の明るさと前記色領域の明るさとの差異に応じて変化する目標の明るさを前記色領域の明るさよりも明るい範囲内で下げた明るさ補正を前記画像データに対して行うことを特徴とする請求項1に記載の画像処理装置。
The target brightness is a brightness that changes according to the difference between the brightness of the background and the brightness of the color area,
When the brightness of the color area is darker than the first brightness and the brightness of the background is darker than the second brightness, the adjustment means is configured to make a difference between the brightness of the background and the brightness of the color area. The image processing apparatus according to claim 1, wherein brightness correction is performed on the image data by reducing a target brightness that varies according to the brightness within a range brighter than the brightness of the color region.
全ての前記明るさは、明度で表され、
前記目標の明るさは、前記背景の明度から前記色領域の明度を差し引いた明度差ΔLが所定範囲内で大きくなるほど連続的または段階的に大きくなる明度とされ、
前記調整手段は、前記目標の明度よりも低い第一の明度より前記色領域の明度が低く、かつ、前記目標の明度よりも低い第二の明度より前記背景の明度が低いとき、前記明度差ΔLが所定範囲内で大きくなるほど連続的または段階的に大きくなる目標の明度を前記色領域の明るさよりも高い範囲内で低くした明度補正を前記画像データに対して行うことを特徴とする請求項1又は請求項2に記載の画像処理装置。
All the brightness is expressed in brightness,
The target brightness is a brightness that increases continuously or stepwise as the brightness difference ΔL obtained by subtracting the brightness of the color area from the brightness of the background increases within a predetermined range.
When the lightness of the color area is lower than the first lightness lower than the target lightness and the lightness of the background is lower than the second lightness lower than the target lightness, the adjustment means The brightness correction is performed on the image data so that a target brightness that increases continuously or stepwise as ΔL increases within a predetermined range is lowered within a range higher than the brightness of the color region. The image processing apparatus according to claim 1 or 2 .
前記調整手段は、前記色領域の明るさが前記第一の明るさより暗く、かつ、前記背景の明るさが前記第二の明るさより暗いとき、前記色領域の明るさよりも明るい範囲内で前記色領域の明るさが明るくなるほど連続的または段階的に明るくなるように前記目標の明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする請求項1〜請求項3のいずれか一項に記載の画像処理装置。 When the brightness of the color area is darker than the first brightness and the brightness of the background is darker than the second brightness, the adjusting means may adjust the color within a range brighter than the brightness of the color area. any of claims 1 to 3, characterized in that performing the brightness correction for lowering the brightness of the target as the brightness of the region is higher becomes continuously or stepwise bright bright on the image data the image processing apparatus according to an item or. 前記調整手段は、前記色領域の明るさが前記第一の明るさより暗く、かつ、前記背景の明るさが前記第二の明るさより暗いとき、前記目標の明るさを前記色領域の明るさよりも明るい範囲内で下げるとともに、前記第一の明るさよりも暗い第三の明るさより前記色領域の明るさが明るいときの前記目標の明るさを前記第三の明るさより前記色領域の明るさが暗いときの前記目標の明るさよりも明るくさせた明るさ補正を前記画像データに対して行うことを特徴とする請求項1〜請求項3のいずれか一項に記載の画像処理装置。 When the brightness of the color area is darker than the first brightness and the brightness of the background is darker than the second brightness, the adjusting means sets the target brightness to be higher than the brightness of the color area. The target brightness when the brightness of the color area is lower than the third brightness that is darker than the first brightness is reduced within the bright range, and the brightness of the color area is darker than the third brightness 4. The image processing apparatus according to claim 1 , wherein brightness correction that is brighter than the target brightness at the time is performed on the image data. 5. 前記調整手段は、さらに、前記背景の明るさが前記色領域の明るさより明るく、前記背景の明るさと前記色領域の明るさとの差異が所定の差異より大きいとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする請求項1〜請求項5のいずれか一項に記載の画像処理装置。 The adjustment means further reduces the brightness below the target when the brightness of the background is brighter than the brightness of the color area and the difference between the brightness of the background and the brightness of the color area is greater than a predetermined difference. 6. The image processing apparatus according to claim 1 , wherein brightness correction is performed on the image data. 前記調整手段は、前記背景の明るさが前記色領域の明るさより明るく、前記背景の明るさと前記色領域の明るさとの差異が所定の差異より大きいとき、前記色領域の明るさよりも明るい範囲内で前記背景の明るさと前記色領域の明るさとの差異が大きくなるほど連続的または段階的に前記目標の明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする請求項6に記載の画像処理装置。 The adjusting means has a brightness that is brighter than the brightness of the color area when the brightness of the background is brighter than the brightness of the color area and the difference between the brightness of the background and the brightness of the color area is greater than a predetermined difference. in claim and performs the brightness and the difference becomes large enough to continuously or stepwise brightness correction was lowered brightness of the target with the brightness of the color area of the background to the image data 6 An image processing apparatus according to 1. 全ての前記明るさは、明度で表され、
前記目標の明るさは、前記背景の明度から前記色領域の明度を差し引いた明度差ΔLが大きくなるほど連続的または段階的に大きくなる明度とされ、
前記調整手段は、前記ΔLが所定の明度差ΔLth(ΔLth>0)より大きいとき、前記色領域の明度よりも高い範囲内で前記明度差ΔLが大きくなるほど連続的または段階的に前記目標の明度を低くした明度補正を前記画像データに対して行うことを特徴とする請求項7に記載の画像処理装置。
All the brightness is expressed in brightness,
The target brightness is a brightness that increases continuously or stepwise as the brightness difference ΔL obtained by subtracting the brightness of the color area from the brightness of the background increases.
When the ΔL is larger than a predetermined lightness difference ΔLth (ΔLth> 0), the adjustment means continuously or stepwise increases the lightness of the target as the lightness difference ΔL increases within a range higher than the lightness of the color area. The image processing apparatus according to claim 7 , wherein the image data is subjected to brightness correction with a low value.
前記画像データは、人物画像を含むカラー画像を画素毎に複数の要素色で階調表現したデータとされ、
前記所定の色領域は、前記人物画像の顔領域とされ、
前記顔領域について予め設定された目標の明るさは、肌色の目標の明度とされるとともに、前記ΔLが前記ΔLth以下のときに前記明度差ΔLが大きくなるほど連続的または段階的に大きくなる明度とされ、
前記背景明るさ取得手段は、前記画像データのうち前記顔領域を除く領域の全体から前記顔領域の背景の明るさを取得し、
前記調整手段は、前記目標の明度よりも低い第一の明度より前記色領域の明度が低く、かつ、前記目標の明度よりも低い第二の明度より前記背景の明度が低いとき、前記明度差ΔLが大きくなるほど連続的または段階的に大きくなる目標の明度を前記色領域の明度よりも高い範囲内で低くして、前記画像データの明度補正を行うことを特徴とする請求項8に記載の画像処理装置。
The image data is data in which a color image including a human image is expressed in gradation with a plurality of element colors for each pixel,
The predetermined color area is a face area of the person image,
The target brightness set in advance for the face area is the brightness of the skin color target, and the brightness that increases continuously or stepwise as the brightness difference ΔL increases when the ΔL is equal to or less than the ΔLth. And
The background brightness acquisition means acquires the brightness of the background of the face area from the entire area of the image data excluding the face area,
When the lightness of the color area is lower than the first lightness lower than the target lightness and the lightness of the background is lower than the second lightness lower than the target lightness, the adjustment means continuously or stepwise larger target brightness as ΔL increases to lower in a higher range than the brightness of the color area, according to claim 8, wherein the performing brightness correction of the image data Image processing device.
画像入力装置により作成された画像データから所定の色領域を抽出する領域抽出手段と、抽出した色領域から当該色領域の明るさを取得する領域明るさ取得手段と、前記色領域の明るさを当該色領域について予め設定された目標の明るさにする明るさ補正を前記画像データに対して行う調整手段とを備える画像処理装置であって、
前記画像データから前記色領域の背景の明るさを取得する背景明るさ取得手段を備え、
前記調整手段は、前記背景の明るさが前記色領域の明るさより明るく、前記背景の明るさと前記色領域の明るさとの差異が所定の差異より大きいとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする画像処理装置。
Area extracting means for extracting a predetermined color area from image data created by the image input device; area brightness acquiring means for acquiring brightness of the color area from the extracted color area; and brightness of the color area. An image processing apparatus comprising: an adjustment unit that performs brightness correction on the image data so as to obtain a target brightness set in advance for the color region;
Background brightness acquisition means for acquiring the brightness of the background of the color region from the image data;
The adjusting means has a brightness lower than the target when the brightness of the background is brighter than the brightness of the color area and the difference between the brightness of the background and the brightness of the color area is larger than a predetermined difference. An image processing apparatus, wherein the image correction is performed on the image data.
画像入力装置により作成された画像データから所定の色領域を抽出し、抽出した色領域から当該色領域の明るさを取得し、前記色領域の明るさを当該色領域について予め設定された目標の明るさにする明るさ補正を前記画像データに対して行う画像処理方法であって、
前記画像データから前記色領域の背景の明るさを取得し、前記目標の明るさよりも暗い第一の明るさより前記色領域の明るさが暗く、かつ、前記目標の明るさよりも暗い第二の明るさより前記背景の明るさが暗いとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする画像処理方法。
A predetermined color area is extracted from the image data created by the image input device, the brightness of the color area is acquired from the extracted color area, and the brightness of the color area is set to a target value set in advance for the color area. An image processing method for performing brightness correction for brightness on the image data,
The brightness of the background of the color area is acquired from the image data, the brightness of the color area is darker than the first brightness that is darker than the target brightness, and the second brightness is darker than the target brightness. When the brightness of the background is darker, the image processing method is characterized in that brightness correction is performed on the image data with brightness lower than the target.
画像入力装置により作成された画像データから所定の色領域を抽出し、抽出した色領域から当該色領域の明るさを取得し、前記色領域の明るさを当該色領域について予め設定された目標の明るさにする明るさ補正を前記画像データに対して行う画像処理方法であって、
前記画像データから前記色領域の背景の明るさを取得し、前記背景の明るさが前記色領域の明るさより明るく、前記背景の明るさと前記色領域の明るさとの差異が所定の差異より大きいとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行うことを特徴とする画像処理方法。
A predetermined color area is extracted from the image data created by the image input device, the brightness of the color area is acquired from the extracted color area, and the brightness of the color area is set to a target value set in advance for the color area. An image processing method for performing brightness correction for brightness on the image data,
When the brightness of the background of the color area is acquired from the image data, the brightness of the background is brighter than the brightness of the color area, and the difference between the brightness of the background and the brightness of the color area is greater than a predetermined difference An image processing method comprising performing brightness correction on the image data with brightness lower than the target.
画像入力装置により作成された画像データから所定の色領域を抽出し、抽出した色領域から当該色領域の明るさを取得し、前記色領域の明るさを当該色領域について予め設定された目標の明るさにする明るさ補正を前記画像データに対して行う機能をコンピュータに実現させる画像処理プログラムであって、
前記画像データから前記色領域の背景の明るさを取得し、前記目標の明るさよりも暗い第一の明るさより前記色領域の明るさが暗く、かつ、前記目標の明るさよりも暗い第二の明るさより前記背景の明るさが暗いとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行う機能を実現させることを特徴とする画像処理プログラム。
A predetermined color area is extracted from the image data created by the image input device, the brightness of the color area is acquired from the extracted color area, and the brightness of the color area is set to a target value set in advance for the color area. An image processing program for causing a computer to realize a function of performing brightness correction for brightness on the image data,
The brightness of the background of the color area is acquired from the image data, the brightness of the color area is darker than the first brightness that is darker than the target brightness, and the second brightness is darker than the target brightness. An image processing program for realizing a function of performing brightness correction on the image data with brightness lower than the target when the background is dark.
画像入力装置により作成された画像データから所定の色領域を抽出し、抽出した色領域から当該色領域の明るさを取得し、前記色領域の明るさを当該色領域について予め設定された目標の明るさにする明るさ補正を前記画像データに対して行う機能をコンピュータに実現させる画像処理プログラムであって、
前記画像データから前記色領域の背景の明るさを取得し、前記背景の明るさが前記色領域の明るさより明るく、前記背景の明るさと前記色領域の明るさとの差異が所定の差異より大きいとき、前記目標よりも明るさを下げた明るさ補正を前記画像データに対して行う機能を実現させることを特徴とする画像処理プログラム。
A predetermined color area is extracted from the image data created by the image input device, the brightness of the color area is acquired from the extracted color area, and the brightness of the color area is set to a target value set in advance for the color area. An image processing program for causing a computer to realize a function of performing brightness correction for brightness on the image data,
When the brightness of the background of the color area is acquired from the image data, the brightness of the background is brighter than the brightness of the color area, and the difference between the brightness of the background and the brightness of the color area is greater than a predetermined difference An image processing program for realizing a function of performing brightness correction on the image data with brightness lower than the target.
JP2006047846A 2006-02-24 2006-02-24 Image processing apparatus, image processing method, and image processing program Expired - Fee Related JP4788394B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006047846A JP4788394B2 (en) 2006-02-24 2006-02-24 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006047846A JP4788394B2 (en) 2006-02-24 2006-02-24 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2007228323A JP2007228323A (en) 2007-09-06
JP4788394B2 true JP4788394B2 (en) 2011-10-05

Family

ID=38549671

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006047846A Expired - Fee Related JP4788394B2 (en) 2006-02-24 2006-02-24 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP4788394B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009116742A (en) * 2007-11-08 2009-05-28 Aisin Seiki Co Ltd Onboard image processor, image processing method, and program
JP2009290660A (en) 2008-05-30 2009-12-10 Seiko Epson Corp Image processing apparatus, image processing method, image processing program and printer
JP2020098420A (en) * 2018-12-17 2020-06-25 ソニー株式会社 Image processing apparatus, image processing method and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000242775A (en) * 1999-02-19 2000-09-08 Fuji Photo Film Co Ltd Method and device for processing image, and recording medium
JP4307341B2 (en) * 2004-06-30 2009-08-05 キヤノン株式会社 Image processing method and image processing apparatus
JP4262151B2 (en) * 2004-06-30 2009-05-13 キヤノン株式会社 Image processing method, image processing apparatus, computer program, and storage medium

Also Published As

Publication number Publication date
JP2007228323A (en) 2007-09-06

Similar Documents

Publication Publication Date Title
US7864362B2 (en) Color image and monochrome image imaging process
US7940434B2 (en) Image processing apparatus, image forming apparatus, method of image processing, and a computer-readable storage medium storing an image processing program
US7684063B2 (en) Image processing method and apparatus, storage medium and program for achieving concordance between print colors and display colors
JP4878572B2 (en) Image processing apparatus and image processing method
JP4883789B2 (en) Image processing apparatus and image processing method
US8031365B2 (en) Image processor and image processing method for reducing consumption amount of recording material
US20110200267A1 (en) Enhancement of image data
CN112954131B (en) Information processing apparatus, image processing system, and information processing method
JP2005328845A (en) Methods, apparatus and computer for transforming digital colour images
US20100091348A1 (en) Image processing apparatus
JP2005328845A6 (en) Method, apparatus and computer program for converting a digital color image
JP2001298631A (en) Recording medium with image processing control program recorded therein and method and device for image processing
KR101221343B1 (en) Two-dimensional gray component replacement
JP4788393B2 (en) Image processing apparatus, image processing method, and image processing program
JP2006234869A (en) Image quality adjusting method, image quality adjusting apparatus, output control apparatus and program
JP2008103987A (en) Image processor
JP4788394B2 (en) Image processing apparatus, image processing method, and image processing program
JP4581999B2 (en) Image processing apparatus and image processing method
WO2009093294A1 (en) Image signal processing device and image signal processing program
JP4748796B2 (en) Image processing apparatus and image processing method.
JP4112413B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded
US7817303B2 (en) Image processing and image forming with modification of a particular class of colors
JP4635920B2 (en) Image data color correction
JP2006140661A (en) Method of forming lookup table and separation method
JP2020005136A (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101116

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101208

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20101208

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

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

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

Free format text: PAYMENT UNTIL: 20140729

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees