JP2011009937A - Image processing apparatus and program - Google Patents
Image processing apparatus and program Download PDFInfo
- Publication number
- JP2011009937A JP2011009937A JP2009149980A JP2009149980A JP2011009937A JP 2011009937 A JP2011009937 A JP 2011009937A JP 2009149980 A JP2009149980 A JP 2009149980A JP 2009149980 A JP2009149980 A JP 2009149980A JP 2011009937 A JP2011009937 A JP 2011009937A
- Authority
- JP
- Japan
- Prior art keywords
- image
- crop
- correction coefficient
- distance
- unit
- 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.)
- Withdrawn
Links
Images
Landscapes
- Television Signal Processing For Recording (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、画像処理装置および画像処理プログラムに関する。 The present invention relates to an image processing apparatus and an image processing program.
近年、高画素化が進む電子カメラ等の画像撮影装置において、撮影範囲内を部分的にクロップ(切り取り)して記憶する技術が開発されている。撮影範囲内を部分的にクロップして記憶する方法は、メモリ容量の節約だけでなく、様々な用途への展開が可能である。例えば、複数のクロップ領域のそれぞれに対して画像処理を施して保存したり、ターゲットとなる被写体の動きに合わせて1つまたは複数のクロップ領域を移動させるなどの機能が検討されている(例えば、特許文献1参照)。 2. Description of the Related Art In recent years, a technique for partially cropping (cutting out) an image capturing range and storing it in an image capturing apparatus such as an electronic camera with an increasing number of pixels. The method of partially cropping and storing the shooting range not only saves the memory capacity, but can be developed for various uses. For example, functions such as performing image processing on each of a plurality of crop areas and storing them, and moving one or a plurality of crop areas in accordance with the movement of a target subject have been studied (for example, Patent Document 1).
一般に自動露出調整やオートホワイトバランス調整は、撮影画像全体に対する画像データ(RGBデータ)に基づいて行われる。この結果、撮影画像全体に対する明るさやホワイトバランスは最適に調整されるが、撮影画像の一部を切り取ったクロップ領域に対する明るさやホワイトバランスは必ずしも最適に調整されているとは限らないという問題がある。例えば、明るい部分(日向など)が多い撮影画像に対しては全体が明る過ぎないように露出調整が行われるが、その中の暗い部分(日陰など)をクロップ領域として抜き出した場合は、抜き出したクロップ領域はやや青みがかった暗い画像になってしまう。このような問題を防ぐためにクロップ領域毎に適した調整を行う方法が考えられているが、例えば日向と日陰の境界部分で複数のクロップ領域が近接している場合は少しの位置の違いで2つのクロップ領域の明るさやホワイトバランスの調整が大きく異なってしまう。特に、これらのクロップ領域毎に調整した画像を並べて鑑賞する場合、殆ど同じ位置にある画像にも拘わらず明るさやホワイトバランスが大きく異なるのは不自然であるという問題が生じる。 In general, automatic exposure adjustment and auto white balance adjustment are performed based on image data (RGB data) for the entire captured image. As a result, although the brightness and white balance for the entire captured image are optimally adjusted, there is a problem that the brightness and white balance for the crop area obtained by cutting out a part of the captured image is not necessarily optimally adjusted. . For example, the exposure adjustment is performed so that the entire image is not too bright for a photographed image with many bright parts (such as the sun), but if the dark part (such as the shade) is extracted as a crop area, it is extracted. The crop area will be a dark image with a slight bluish tint. In order to prevent such a problem, a method of performing an adjustment suitable for each crop area has been considered. For example, when a plurality of crop areas are close to each other at the boundary between the sun and the shade, there is a slight difference in position. The brightness and white balance adjustments of the two crop areas are greatly different. In particular, when the images adjusted for each crop area are viewed side by side, there is a problem that it is unnatural that the brightness and white balance differ greatly even though the images are almost in the same position.
本発明の目的は、同一画像内から切り取ったクロップ領域の画像に最適な画像処理を行うことができる画像処理装置および画像処理プログラムを提供することである。 An object of the present invention is to provide an image processing apparatus and an image processing program capable of performing optimal image processing on an image in a crop area cut out from the same image.
本発明に係る画像処理装置は、被写体画像を撮像する撮像部と、前記撮像部が撮像する被写体画像内の複数のクロップ領域を指定するクロップ領域指定部と、前記クロップ領域指定部で指定した前記複数のクロップ領域間の距離を求める距離算出部と、前記複数の各クロップ領域毎および画像全体のそれぞれに対して最適な画像に補正する画像補正係数を求める補正係数算出部と、前記クロップ領域指定部が指定した前記複数のクロップ領域の画像データと、前記距離算出部が算出した前記複数のクロップ領域間の距離情報と、前記補正係数算出部が求めた画像補正係数とを関連付けて記憶媒体に記憶する記録部とを有することを特徴とする。 An image processing apparatus according to the present invention includes: an imaging unit that captures a subject image; a crop area designation unit that designates a plurality of crop areas in the subject image captured by the imaging unit; and the crop area designation unit that is designated by the crop area designation unit A distance calculation unit for obtaining a distance between a plurality of crop areas, a correction coefficient calculation unit for obtaining an image correction coefficient for correcting each of the plurality of crop areas and an entire image, and the crop area designation The image data of the plurality of crop areas designated by the section, the distance information between the plurality of crop areas calculated by the distance calculation section, and the image correction coefficient obtained by the correction coefficient calculation section are associated with each other in a storage medium. And a recording unit for storing.
また、本発明に係る画像処理装置は、同一画像内から切り取った複数のクロップ領域の画像データと、前記複数のクロップ領域間の距離情報と、前記複数の各クロップ領域毎に最適な画像に補正する画像補正係数とを入力する入力部と、前記複数のクロップ領域毎の画像補正係数を前記複数のクロップ領域間の距離情報に基づいて調整する距離補正係数を求める距離補正係数算出部と、前記画像補正係数と前記距離補正係数とを用いて前記クロップ領域毎の画像データを補正する補正処理部と、前記補正処理部が処理した前記クロップ領域毎の画像データを記憶媒体に記憶する記録部とを設けたことを特徴とする。 The image processing apparatus according to the present invention corrects image data of a plurality of crop areas cut out from the same image, distance information between the plurality of crop areas, and an optimum image for each of the plurality of crop areas. An input unit for inputting an image correction coefficient to be performed; a distance correction coefficient calculation unit for obtaining a distance correction coefficient for adjusting the image correction coefficient for each of the plurality of crop areas based on distance information between the plurality of crop areas; and A correction processing unit that corrects image data for each crop region using an image correction coefficient and the distance correction coefficient; and a recording unit that stores the image data for each crop region processed by the correction processing unit in a storage medium; Is provided.
また、本発明に係る画像処理装置は、被写体画像を撮像する撮像部と、前記撮像部が撮像する被写体画像内の複数のクロップ領域を指定するクロップ領域指定部と、前記クロップ領域指定部で指定した前記複数のクロップ領域間の距離を求める距離算出部と、前記複数の各クロップ領域毎および画像全体のそれぞれに対して最適な画像に補正する画像補正係数を求める補正係数算出部と、前記複数のクロップ領域毎の画像補正係数を前記複数のクロップ領域間の距離情報に基づいて調整する距離補正係数を求める距離補正係数算出部と、前記画像補正係数と前記距離補正係数とを用いて前記クロップ領域毎の画像データを補正する補正処理部と、前記補正処理部が処理した前記クロップ領域毎の画像データを記憶媒体に記憶する記録部とを設けたことを特徴とする。 The image processing apparatus according to the present invention includes: an imaging unit that captures a subject image; a crop area designation unit that designates a plurality of crop areas in the subject image captured by the imaging unit; and the crop area designation unit A distance calculation unit for obtaining a distance between the plurality of crop areas, a correction coefficient calculation unit for obtaining an image correction coefficient for correcting each of the plurality of crop areas and an entire image, and the plurality A distance correction coefficient calculation unit for obtaining a distance correction coefficient for adjusting an image correction coefficient for each crop area based on distance information between the plurality of crop areas, and the crop correction using the image correction coefficient and the distance correction coefficient. A correction processing unit that corrects image data for each region and a recording unit that stores the image data for each crop region processed by the correction processing unit in a storage medium are provided. Characterized in that was.
また、より好ましくは、前記距離補正係数算出部は、画像全体の画像補正係数または前記複数のクロップ領域毎のいずれかの画像補正係数を基準として前記距離補正係数を求めることを特徴とする。 More preferably, the distance correction coefficient calculation unit obtains the distance correction coefficient based on an image correction coefficient of the entire image or any one of the plurality of crop areas.
また、より好ましくは、前記距離算出部が求める前記複数のクロップ領域間の距離は、前記撮像部の二次元状に配置された複数画素で構成される撮像面上における前記複数のクロップ領域の中心点間の画素距離であることを特徴とする。 More preferably, the distance between the plurality of crop areas determined by the distance calculation unit is a center of the plurality of crop areas on an imaging surface configured by a plurality of pixels arranged in a two-dimensional shape of the imaging unit. It is a pixel distance between points.
また、より好ましくは、前記画像補正係数は、ガンマ補正ゲイン,ホワイトバランスゲイン,色補正係数、露出補正値の少なくとも1つであることを特徴とする。 More preferably, the image correction coefficient is at least one of a gamma correction gain, a white balance gain, a color correction coefficient, and an exposure correction value.
また、より好ましくは、前記画像補正係数がガンマ補正ゲイン,ホワイトバランスゲイン,色補正係数、露出補正値のいずれか2つ以上に対応する場合、前記距離補正係数算出部は前記複数の画像補正係数毎に異なる距離補正係数を求めることを特徴とする。 More preferably, when the image correction coefficient corresponds to any two or more of a gamma correction gain, a white balance gain, a color correction coefficient, and an exposure correction value, the distance correction coefficient calculation unit includes the plurality of image correction coefficients. A different distance correction coefficient is obtained for each.
また、より好ましくは、時間的に連続して撮像された複数の画像の各画像毎に指定された複数のクロップ領域を切り出す場合、前記補正係数算出部は、前記時間的に連続する画像間で前記指定された複数のクロップ領域間の距離が近づく場合に、前記時間的に連続する画像間で前記複数のクロップ領域毎の画像補正係数の追従性を高くすることを特徴とする。 More preferably, when cutting out a plurality of crop areas designated for each image of a plurality of images captured continuously in time, the correction coefficient calculation unit is configured to perform a correction between the images that are temporally continuous. When the distance between the specified plurality of crop areas approaches, the followability of the image correction coefficient for each of the plurality of crop areas is increased between the temporally continuous images.
また、本発明に係る画像処理プログラムは、コンピュータで実行される画像処理プログラムであって、同一画像内から切り取った複数のクロップ領域の画像データと、前記複数のクロップ領域間の距離情報と、前記複数の各クロップ領域毎および画像全体のそれぞれに対して最適な画像に補正する画像補正係数とを入力する入力手順と、前記複数のクロップ領域毎の画像補正係数を前記複数のクロップ領域間の距離情報に基づいて調整する距離補正係数を求める距離補正係数算出手順と、前記画像補正係数と前記距離補正係数とを用いて前記クロップ領域毎の画像データを補正する補正処理手順と、前記補正処理部が処理した前記クロップ領域毎の画像データを記憶媒体に記憶する記録手順とを有することを特徴とする。 An image processing program according to the present invention is an image processing program executed by a computer, and includes image data of a plurality of crop areas cut out from the same image, distance information between the plurality of crop areas, An input procedure for inputting an image correction coefficient to be corrected to an optimum image for each of the plurality of crop areas and the entire image, and a distance between the plurality of crop areas for the image correction coefficient for each of the plurality of crop areas A distance correction coefficient calculation procedure for obtaining a distance correction coefficient to be adjusted based on the information; a correction processing procedure for correcting image data for each crop region using the image correction coefficient and the distance correction coefficient; and the correction processing unit. And a recording procedure for storing the image data for each crop area processed in the storage medium.
本発明に係る画像処理装置および画像処理プログラムは、同一画像内から切り取ったクロップ領域の画像に最適な画像処理を行うことができる。 The image processing apparatus and the image processing program according to the present invention can perform image processing optimum for an image in a crop area cut out from the same image.
以下、本発明に係る画像処理装置および画像処理プログラムに関する実施形態について説明する。尚、本実施形態では、本発明に係る画像処理装置および画像処理プログラムを電子カメラ101に適用した例を挙げて説明するが、カメラに限らずスキャナーなどの画像を撮影する装置や撮影済みの画像データを処理するソフトウェアを実行するコンピュータや専用の画像処理装置などにも適用可能である。また、本実施形態に係る電子カメラ101は、撮影画像全体の中から指定した複数のクロップ領域を切り出し、クロップ領域毎に最適な画像処理を施して記録する撮影モード(以降「クロップ撮影モード」と称す)を有する電子カメラである。以下、電子カメラ101について詳しく説明する。
Embodiments relating to an image processing apparatus and an image processing program according to the present invention will be described below. In the present embodiment, an example in which the image processing apparatus and the image processing program according to the present invention are applied to the
[電子カメラ101の全体構成]
図1は、電子カメラ101の構成を示すブロック図である。電子カメラ101は、撮像部102と、A/D変換部103と、処理バッファ104と、画像処理部105と、システムバス106と、メモリカードI/F(インターフェース)107と、表示部108と、制御部109と、操作部110と、測光センサ111と、メモリ112とで構成される。ここで、システムバス106は各ブロック間を接続するデータバスで、制御データや画像データなどを各ブロック間で入出力する。
[Overall Configuration of Electronic Camera 101]
FIG. 1 is a block diagram illustrating a configuration of the
撮像部102は、撮影光学系、絞りおよびシャッタ機構、撮像素子などで構成され、システムバス106を介して制御部109によって制御される。例えば、制御部109は、撮像部102に対して、撮影光学系のフォーカスレンズの位置調節,絞り値調節,シャッタ速度調節,撮像素子の電子シャッタ速度調節などの露出制御や読み出し領域の制御などを行う。尚、本実施形態は、撮像素子内のクロップ領域毎に電子シャッタ速度を調節してクロップ領域毎の露光量を制御できる撮像素子を用いる場合を含む。
The
A/D変換部103は、撮像部102から出力されるアナログの画像信号をデジタルの画像データ(RGBのRAWデータ)に変換して処理バッファ104に一時的に記憶する。尚、処理バッファ104に記憶された画像データは、画像処理部105が画像処理を行う際のバッファとして使用されると共に、システムバス106を介して制御部109が処理バッファ104に記憶されている画像データを読み出して露出制御を行ったりプレビュー画像として表示部108に表示する。また、制御部109は、画像処理部105が処理後の画像データを処理バッファ104からメモリカードI/F107に装着されているメモリカード107bに記録する。
The A /
画像処理部105は、ホワイトバランス調整部151と、色/階調処理部152と、輪郭強調部153とで構成される。画像処理部105は、制御部109から指定されたクロップ領域を切り出して、切り出したクロップ領域毎に、以下に説明するホワイトバランス調整処理、色/階調処理および輪郭強調処理を行う。
The
ホワイトバランス(WB)調整部151は、撮像部102からA/D変換部103を介して処理バッファ104に取り込まれたRGBの画像データに対して、制御部109が算出したR/GゲインおよびB/Gゲインを乗算してホワイトバランス調整を行う。
The white balance (WB)
ここで、ホワイトバランス調整について説明する。ホワイトバランス調整は、環境光の特性に依らず無彩色の被写体が無彩色な画像として撮影されるように調整する処理である。一般に、無彩色の被写体に対して、環境光(太陽光、白熱電灯、蛍光灯など)の特性(例えば色温度など)が変化した場合、カメラ撮影された画像データは環境光の特性に応じて変化する。そこで、環境光が変化した場合でも無彩色の被写体は無彩色な画像になるように、画像データのRGBの比率を調整しなければならない。これがホワイトバランス調整である。 Here, the white balance adjustment will be described. White balance adjustment is a process of adjusting so that an achromatic subject is photographed as an achromatic image regardless of the characteristics of ambient light. In general, when the characteristics (such as color temperature) of ambient light (such as sunlight, incandescent light, and fluorescent light) change for an achromatic subject, the image data captured by the camera depends on the characteristics of ambient light. Change. Therefore, even when the ambient light changes, the RGB ratio of the image data must be adjusted so that the achromatic subject becomes an achromatic image. This is white balance adjustment.
このホワイトバランス調整は、例えば、R,B各チャンネルに応じて求められたゲイン(gainR,gainB)を画像データに乗算することによって実現される。例えば、無彩色被写体を撮影した画像データの平均値をR,G,Bそれぞれのチャンネルについて算出する。算出した各色の平均値をそれぞれ、Ra、Ga、Baとする。この場合、ホワイトバランスゲインGainRとGainBは(式1)および(式2)のように求めることができる。 This white balance adjustment is realized, for example, by multiplying image data by gains (gainR, gainB) obtained according to the R and B channels. For example, an average value of image data obtained by shooting an achromatic subject is calculated for each of the R, G, and B channels. The calculated average values of the colors are Ra, Ga, and Ba, respectively. In this case, the white balance gains GainR and GainB can be obtained as in (Expression 1) and (Expression 2).
GainR=Ra/Ga …(式1)
GainB=Ba/Ga …(式2)
(式1)および(式2)で求めたホワイトバランスゲインGainRおよびGainBは、ホワイトバランス調整部151において、処理バッファ104に取り込まれた撮影画像のRデータとBデータとにそれぞれ掛け算され、ホワイトバランス調整後のRGBの画像データが得られる。特に本実施形態に係る電子カメラ101の「クロップ撮影モード」では、制御部109から指定されたクロップ領域毎に、ホワイトバランス調整を行う。尚、ホワイトバランス調整部151が処理後の画像データも処理バッファ104に保持される。また、「連写撮影モード」や「動画撮影モード」が選択されている場合には、時間的に連続して撮影される画像のホワイトバランスが急激に変化しないように、連続する画像間のホワイトバランスゲインの追従性が遅くなるように制御部109によって制御される。
GainR = Ra / Ga (Formula 1)
GainB = Ba / Ga (Formula 2)
The white balance gains GainR and GainB obtained in (Equation 1) and (Equation 2) are respectively multiplied by the R data and B data of the captured image captured in the
色/階調処理部152は、処理バッファ104に保持されているホワイトバランス調整後の画像データに対して、制御部109から与えられる色補正係数やガンマ補正ゲインを用いて、色補正処理や階調処理などを行う。例えば、色補正処理ではRGBの画像データに色補正係数(例えばRGBの成分割合を変えるための色変換マトリクス)を乗算するマトリクス演算を行って色相や彩度などを調整したり、階調処理では画像データと出力輝度との関係を表すガンマ特性を調整する。特に本実施形態に係る電子カメラ101の「クロップ撮影モード」では、制御部109から指定されたクロップ領域毎に、ホワイトバランス処理と同様に色補正処理や階調処理などを行う。尚、色/階調処理部152が処理後の画像データも処理バッファ104に保持される。また、ホワイトバランスゲインと同様に、「連写撮影モード」や「動画撮影モード」が選択されている場合には、時間的に連続して撮影される画像の明るさや色が急激に変化しないように、連続する画像間の色補正処理や階調処理の追従性が遅くなるように制御部109によって制御される。
The color /
輪郭強調部153は、処理バッファ104に保持されている色/階調処理部152が処理後の画像データに対して、制御部109が出力するエッジ強調パラメータを用いて輪郭強調処理(エッジ強調処理)を行う。特に本実施形態に係る電子カメラ101の「クロップ撮影モード」では、制御部109から指定されたクロップ領域毎に、輪郭強調処理を行う。尚、輪郭強調部153が処理後の画像データも処理バッファ104に保持される。
The
メモリカードI/F(インターフェース)107は、電子カメラ101にメモリカード107bを接続するためのインターフェースで、制御部109はメモリカードIF107を介してメモリカード107bに画像データや設定データなどを書き込んだり、メモリカード107bに保存されている画像データや設定データを読み出す。
A memory card I / F (interface) 107 is an interface for connecting the
表示部108は、液晶モニタなどで構成され、メモリカード107bに記憶されている画像データや処理バッファ104に一時的に記憶されている画像データ、或いは制御部109が出力する操作用のメニュー画面などを表示する。
The
制御部109は、内部に予め記憶されているプログラムに従って動作し、電子カメラ101の各部を制御する。尚、制御部109の構成については、後で詳しく説明する。
The
操作部110は、電源ボタン、レリーズボタン、カーソルボタン、決定ボタン、撮影モード選択ダイヤル(「単写撮影モード」,「連写撮影モード」,「動画撮影モード」,「クロップ撮影モード」などの選択、或いはこれらの複合モード(連写撮影時にクロップ撮影を行うなど)の選択を行うダイヤル)などで構成され、ユーザーはこれらの操作ボタンを用いて電子カメラ101を操作する。操作部110の操作情報(ボタンのオン/オフやダイヤル設定など)は制御部109に出力される。そして、制御部109は、操作部110から入力する操作情報に応じて、電子カメラ101全体の動作を制御する。
The
測光センサ111は、撮像部102で撮像する被写体の明るさを測光するセンサで、測光データはシステムバス106を介して制御部109に出力され、露出制御される。尚、測光センサ111を設けずに、撮影時に構図を確認するためのプレビュー画像を撮像部102から処理バッファ104に取り込む際の画像データから被写体の明るさを検出して、露出制御を行うようにしても構わない。また、本実施形態に係る電子カメラ101の「クロップ撮影モード」において、測光センサ111は、制御部109の指令によって、後述するクロップ領域毎の測光値を制御部109に出力する。特に、先に説明したように、撮像部102を構成する撮像素子内のクロップ領域毎に電子シャッタ速度を調節して指定領域毎の露光量を制御できる場合は、指定されたクロップ領域毎に露出制御を行ってクロップ領域毎に適正な露光量で撮影することができる。
The
メモリ112は、制御部109が電子カメラ101の設定や処理に必要なパラメータなどを記憶する不揮発性のメモリである。尚、メモリカード107bの代わりにメモリ112に撮影画像などを記憶するようにしても構わない。
[制御部109の構成]
次に、図1の制御部109の構成について詳しく説明する。制御部109は、領域指定部161と、距離算出部162と、画像補正係数算出部163と、距離補正部164とで構成され、これらの処理ブロックは「クロップ撮影モード」が選択された時に動作する。
The
[Configuration of Control Unit 109]
Next, the configuration of the
領域指定部161は、例えば図2(a),図2(b)および図2(c)に示したように、撮像部102が撮影する撮影画像全体の中からクロップ領域201やクロップ領域202など複数のクロップ領域を指定する。クロップ領域の指定は、例えば同図に示したように、表示部108の画面に表示された被写体画像に重畳させて点線枠を表示し、操作部110のカーソルボタンなどを操作して点線枠を上下左右に移動したり、幅を可変してターゲットとなる被写体に合わせて操作部110の決定ボタンでクロップ領域を確定する。或いは、既に実用化されている顔認識機能などを利用して自動的にクロップ領域を指定したり、被写体追尾機能を利用して被写体の動きにクロップ領域が自動的に追従するようにしても構わない。
For example, as shown in FIG. 2A, FIG. 2B, and FIG. 2C, the area specifying unit 161 includes a
このようにして、領域指定部161は、撮像部102で撮像される画像全体の中から複数のクロップ領域を指定する。尚、ここで指定されたクロップ領域は、一連の撮影が終了するまでメモリ112に保持される。
In this way, the area designating unit 161 designates a plurality of crop areas from the entire image captured by the
距離算出部162は、領域指定部161で指定された複数のクロップ領域間の距離(L)を求める。例えば図2(a)の場合は、クロップ領域201の中心点とクロップ領域202の中心点との間の撮像部102の撮像素子の画素距離L1を求める。ここで、画素距離とは、例えば、撮像部102の撮像素子が縦:1000画素、横:2000画素で構成される場合、撮像素子の撮像面の画素を座標(縦画素数,横画素数)で表した時、座標(0,0)から座標(1000,2000)で撮像面を表記できる。この時、例えば図2(a)のクロップ領域201の中心点を座標(600,200)、クロップ領域202の中心点を座標(400,1800)とした場合、クロップ領域201の中心点とクロップ領域202の中心点との間の画素距離L1は、(式3)で求めることができる。
The distance calculation unit 162 obtains the distance (L) between the plurality of crop areas designated by the area designation unit 161. For example, in the case of FIG. 2A, the pixel distance L1 of the image sensor of the
L1=√{(600−400)^2+(1800−200)^2} …(式3)
尚、上記の場合の最大距離Lmaxは、撮像素子の撮像面の対角位置の座標(0,0)と座標(1000,2000)の間の画素距離となるので、最大距離Lmaxは約2250となる。
L1 = √ {(600−400) ^ 2 + (1800−200) ^ 2} (Expression 3)
Note that the maximum distance Lmax in the above case is a pixel distance between the coordinates (0, 0) and the coordinates (1000, 2000) of the diagonal position of the imaging surface of the image sensor, and thus the maximum distance Lmax is about 2250. Become.
このようにして、距離算出部162は、領域指定部161で指定された複数のクロップ領域間の距離(L)を求める。尚、上記の説明では、画素距離としたが複数のクロップ領域間の距離に対応するパラメータであれば画素数を基準にした距離である必要はない。 In this way, the distance calculation unit 162 obtains the distance (L) between the plurality of crop areas designated by the area designation unit 161. In the above description, the pixel distance is used, but if the parameter corresponds to the distance between a plurality of crop areas, the distance need not be based on the number of pixels.
画像補正係数算出部163は、領域指定部161で指定された複数のクロップ領域毎に最適な画像補正係数や撮影画像全体に最適な画像補正係数を算出する。ここで、画像補正係数とは、先に説明したように、ガンマ補正ゲインやホワイトバランスゲイン、或いは色補正係数、露出補正値(電子シャッタ制御の場合)などの画像を補整するための係数のことである。特に、本実施形態では、画像補正係数算出部163は、複数のクロップ領域毎に最適な画像補正係数を求める。ここで、ガンマ補正ゲインやホワイトバランスゲイン、或いは色補正係数、露出補正値などを含めて画像補正係数Para_***のように表記すると、図2(a)の場合は、クロップ領域201に最適な画像補正係数はPara_Each(201)、クロップ領域202に最適な画像補正係数はPara_Each(202)のようにそれぞれ表記でき、画像全体に最適な画像補正係数はPara_Allのように表記できる。
The image correction
上記の場合、画像補正係数算出部163は、画像補正係数Para_Each(201),画像補正係数Para_Each(202),画像補正係数Para_Allなどを求める。例えば、図2(a),図2(b)および図2(c)の撮影画像からクロップ領域201とクロップ領域202をそれぞれ切り出した場合、クロップ領域201は日陰部分に位置するのでクロップ領域201を明るくするような画像補正係数Para_Each(201)が求められ、またクロップ領域202は日向部分に位置するのでクロップ領域202を暗くするような画像補正係数Para_Each(202)が求められる。尚、図2の各図において、全体画像の中の斜線がある部分は日陰を示し、斜線がない部分は日向を示している。
In the above case, the image correction
さらに、画像全体に最適な画像補正係数Para_Allも求められる。画像全体に最適な画像補正係数Para_Allは、通常、画像補正係数Para_Each(201)と画像補正係数Para_Each(202)の平均的な画像補正係数になると考えられるので、画像補正係数Para_Allを適用した場合は日陰部分のクロップ領域201はアンダー気味でやや青みがかった色の画像になり、日向部分のクロップ領域202はオーバー気味の画像になる。尚、後で説明するように、画像全体に最適な画像補正係数Para_Allを距離補正する際の目標となる「合わせ込み先領域」に指定しない場合は必ずしも求める必要はない。
Furthermore, an image correction coefficient Para_All optimal for the entire image is also obtained. The image correction coefficient Para_All that is optimal for the entire image is normally considered to be an average image correction coefficient of the image correction coefficient Para_Each (201) and the image correction coefficient Para_Each (202). Therefore, when the image correction coefficient Para_All is applied, The
このようにして、画像補正係数算出部163は、領域指定部161で指定された複数のクロップ領域毎および画像全体のそれぞれについて最適となる画像補正係数を算出する。
In this way, the image correction
距離補正部164は、距離算出部162が求めた複数のクロップ領域間の距離(L)に応じて画像補正係数算出部163が求めた画像補正係数を調整する。例えば、図2(a)の場合はクロップ領域201の中心点とクロップ領域202の中心点との間の画素距離はL1であるが、図2(b)の場合はクロップ領域201の中心点とクロップ領域202の中心点との間の画素距離はL1より小さいL2となっている。さらに、図2(c)の場合はクロップ領域201の中心点とクロップ領域202の中心点との間の画素距離はL2より小さいL3となっている。
The distance correction unit 164 adjusts the image correction coefficient obtained by the image correction
ここで、画像補正係数算出部163で求めたクロップ領域毎に最適な画像補正係数を適用すれば、各クロップ領域で最適な画像が得られるが、上記の図2(c)のように、クロップ領域201とクロップ領域202が重複するぐらいに接近した位置にある場合に問題が生じる。例えば、図2(c)のクロップ領域201は日陰の部分が多く、クロップ領域202は日向の部分が多いので、それぞれのクロップ領域に最適な画像補正係数を適用して画像補整を行った場合、切り出した2つのクロップ領域の明るさや色が異なった画像になってしまう。特に2つの切り出した画像を並べて鑑賞する場合は両方の画像に重複している部分(ボールなど)の明るさや色が大きく異なるので、鑑賞者に違和感を与えてしまうという問題がある。
Here, if an optimal image correction coefficient is applied to each crop area obtained by the image correction
そこで、距離補正部164は、距離算出部162が求めた複数のクロップ領域間の距離(L)に応じて画像補正係数算出部163が求めた画像補正係数を調整する。
Therefore, the distance correction unit 164 adjusts the image correction coefficient obtained by the image correction
ここで、画像補正係数を調整する方法として、距離に応じて適宜連続して画像補正係数を調整する処理と、距離が閾値より小さい場合だけ画像補正係数を調整する処理とが考えられる。例えば後者の場合は、図2(a)のように、クロップ領域201の中心点とクロップ領域202の中心点との間の画素距離L1が予め設定した閾値より大きい場合は、個々のクロップ領域に最適な画像補正係数を適用する。つまり、画像補正係数算出部163が求めた画像補正係数の調整は行わない。逆に図2(c)のように、クロップ領域201の中心点とクロップ領域202の中心点との間の画素距離L3が予め設定した閾値より小さい場合は、個々のクロップ領域に最適な画像補正係数をそのまま適用せず、距離補正部164は画像補正係数算出部163が求めた画像補正係数の調整を行う。尚、閾値は、電子カメラ101の製造時にデフォルト値として設定された値であっても構わないし、ユーザーが電子カメラ101を購入後に設定メニューで自由に設定できるようにしても構わない。
Here, as a method of adjusting the image correction coefficient, a process of adjusting the image correction coefficient continuously as appropriate according to the distance and a process of adjusting the image correction coefficient only when the distance is smaller than a threshold value can be considered. For example, in the latter case, as shown in FIG. 2A, when the pixel distance L1 between the center point of the
次に、距離に応じて適宜連続して画像補正係数を調整する処理について詳しく説明する。距離補正部164は、例えば図3に示すように、距離算出部162が求めたクロップ領域間の距離:Lに応じて画像補正係数算出部163が求めた画像補正係数を調整するための距離補正ゲイン:Gainを求める。ここで、距離補正ゲインGainはLの関数になるので距離補正ゲインGain(L)と表記する。例えば、図2(a)の場合のクロップ領域201の中心点とクロップ領域202の中心点との間の画素距離はL1なので、この時の距離補正ゲインはGain(L1)となる。同様に、図2(b)の場合の距離補正ゲインはGain(L2)、図2(c)の場合の距離補正ゲインはGain(L3)となる。尚、図3において、2つのクロップ領域間の画素距離Lと距離補正ゲインGainとの関係を示す変換特性401は三次曲線である必要はなく、例えば直線404であっても構わないし、折れ線状の近似特性405であっても構わない。
Next, the process of adjusting the image correction coefficient appropriately and continuously according to the distance will be described in detail. For example, as shown in FIG. 3, the distance correction unit 164 is a distance correction for adjusting the image correction coefficient obtained by the image correction
また、図3の変換特性401において、点線円402の部分は、距離補正ゲインGain=1.0を適用する部分を示し、距離補正ゲインGain=1.0とは画像補正係数算出部163が求めた画像補正係数の調整は行わないことを意味する。つまり、画像補正係数算出部163が求めた当該クロップ領域に最適な画像補正係数をそのまま適用する。一方、点線円403の部分は、距離補正ゲインGain=0.0を適用する部分を示し、距離補正ゲインGain=0.0とは画像補正係数算出部163が求めた画像補正係数を当該クロップ領域に適用しないことを意味する。この場合は、基準となる画像領域(「合わせ込み先領域」)の最適となる画像補正係数を適用する。例えば画像全体を「合わせ込み先領域」として、画像全体で最適となる画像補正係数を適用する。図2(c)の場合では、クロップ領域201およびクロップ領域202の両方に対して、画像全体で最適となる画像補正係数を適用する。この結果、クロップ領域201とクロップ領域202とを並べて鑑賞する場合でも、両方に写っている部分の明るさや色は同じになるので違和感がない。尚、上記の説明では、画像全体を「合わせ込み先領域」としたが、クロップ領域201またはクロップ領域202のいずれか一方の領域で最適となる画像補正係数を片方のクロップ領域に適用するようにしても構わない。或いは、「合わせ込み先領域」の画像補正係数としてクロップ領域201とクロップ領域202の平均値を用いるようにしても構わない。いずれの場合でも、クロップ領域201およびクロップ領域202の両方に対して同じ画像補正係数が適用されるため、クロップ領域201とクロップ領域202とを並べて鑑賞する場合の明るさや色に違和感はない。
In the
ここで、全体画像の中に複数(N個:Nは自然数)のクロップ領域が存在する場合について説明する。尚、1番目のクロップ領域をクロップ領域(1)、n番目のクロップ領域をクロップ領域(n)と表記する(nは1からNまでの自然数)。また、ここでの説明では、先に説明した(最適な)画像補正係数を(最適)処理量と言い換えて表現する。これは、画像補正係数がホワイトバランスゲインなどの絶対値で表現される値だけではなく、露出値など差分値で表現される値も含まれるためで、この点が明確になるように処理量と表現する。 Here, a case where a plurality (N: N is a natural number) of crop areas exist in the entire image will be described. The first crop area is represented as a crop area (1), and the nth crop area is represented as a crop area (n) (n is a natural number from 1 to N). In the description here, the (optimal) image correction coefficient described above is expressed in other words as the (optimal) processing amount. This is because the image correction coefficient includes not only a value expressed by an absolute value such as a white balance gain but also a value expressed by a difference value such as an exposure value. Express.
例えば、距離に応じた補正を行うクロップ領域(n)の最適処理量をPara_Each(n)、「合わせ込み先領域」の最適処理量をPara_target、距離補正後のクロップ領域(n)の処理量をPara_adj(n)とする。尚、最適処理量とは、差分値であっても構わないし、絶対値であっても構わない。例えば最適処理量が差分値である場合は、全体画像の露出に対する差分露出値として、クロップ領域201の最適露出=0.3eV、クロップ領域202の最適露出=−0.3eVなどが最適処理量となる。或いは、最適処理量が絶対値である場合の例として、先に(式1)や(式2)で示したホワイトバランスゲインの場合、全体画像の最適ホワイトバランスゲイン(R/G)=2.2、クロップ領域201の最適ホワイトバランスゲイン(R/G)=2.1、クロップ領域202の最適ホワイトバランスゲイン(R/G)=1.8などが最適処理量となる。
For example, the optimal processing amount of the crop area (n) for correction according to the distance is Para_Each (n), the optimal processing amount of the “matching destination area” is Para_target, and the processing amount of the crop area (n) after the distance correction is Para_adj (n). The optimum processing amount may be a difference value or an absolute value. For example, when the optimum processing amount is a difference value, the optimum exposure amount is the optimum exposure of the
また、目標となる「合わせ込み先領域」の最適処理量Para_targetは、次のいずれの最適処理量を基準にしても構わない。
(1)画像全体の最適処理量
(2)複数のクロップ領域の中の指定されたクロップ領域の最適処理量
(3)複数のクロップ領域の最適処理量の平均値
(4)撮影画像とは別に予め設定した最適処理量
尚、ここで用いる最適処理量は、先に説明したように、画像補正係数算出部163が求める画像補正係数に対応し、画像補正係数算出部163が求める画像補正係数(ホワイトバランスゲイン、ガンマ補正ゲイン、色補正係数、露出補正値(電子シャッタ制御の場合)など)も絶対値だけでなく差分値であっても構わない。
The target optimum processing amount Para_target of the “matching destination area” may be based on any of the following optimum processing amounts.
(1) Optimum processing amount of entire image (2) Optimal processing amount of designated crop area in plural crop areas (3) Average value of optimum processing amount of plural crop areas (4) Separate from captured image Optimum processing amount set in advance Note that the optimum processing amount used here corresponds to the image correction coefficient obtained by the image correction
例えば、図3において、画像全体の最適処理量を「合わせ込み先領域」の最適処理量Para_target、N個の各クロップ領域(n)の最適処理量Para_Each(n)とした場合、距離補正後のN個の各クロップ領域(n)の処理量Para_Adj(n)は(式4)に示すように求めることができる。
Para_Adj(n) = Gain(L) × Para_Each(n) + (1-Gain(L)) × Para_target …(式4)
尚、図2で説明したように、2つのクロップ領域の場合は2つのクロップ領域間の距離をLとするが、3つ以上のクロップ領域がある場合は、基準となるクロップ領域を1つ選択して、当該クロップ領域との距離を求めるようにしても構わない。例えば「合わせ込み先領域」の最適処理量Para_targetとしてn=1のクロップ領域(1)を用いる場合、距離補正後のN個の各クロップ領域(n)の処理量Para_Adj(n)は(式5)に示すように求めることができる。
Para_Adj(n) = Gain(L) × Para_Each(n) + (1-Gain(L)) × Para_Each(1) …(式5)
この時、「合わせ込み先領域」のクロップ領域(1)自身は、(式6)に示すように、距離による補正は行われずに自領域の最適処理量がそのまま適用される。
Para_Each(1) = Gain(L) × Para_Each(1) + (1-Gain(L)) × Para_Each(1)
= Para_Each(1) …(式6)
ここで、図3に示した距離Lが小さくなる(クロップ領域が近くなる)ほど距離補正ゲインGain(L)は小さくなるので、(式4)および(式5)において「合わせ込み先領域」の最適処理量の影響が大きくなり、同じ位置(L=0)の場合は「合わせ込み先領域」の最適処理量がそのまま適用される。逆に、図3に示した距離Lが大きくなる(クロップ領域が遠くなる)ほど距離補正ゲインGain(L)は大きくなるので、(式4)および(式5)において「合わせ込み先領域」の最適処理量の影響が小さくなり、画面の対角距離に近い位置(L=3000)の場合は距離補正ゲインGain(L)=1なので自領域の最適処理量がそのまま適用される。
For example, in FIG. 3, when the optimal processing amount of the entire image is the optimal processing amount Para_target of the “fit destination region” and the optimal processing amount Para_Each (n) of each of the N crop regions (n), The processing amount Para_Adj (n) of each of the N crop areas (n) can be obtained as shown in (Expression 4).
Para_Adj (n) = Gain (L) x Para_Each (n) + (1-Gain (L)) x Para_target ... (Formula 4)
As described in FIG. 2, in the case of two crop areas, the distance between the two crop areas is set to L, but when there are three or more crop areas, one reference crop area is selected. Then, the distance from the crop area may be obtained. For example, when n = 1 crop region (1) is used as the optimum processing amount Para_target of the “matching destination region”, the processing amount Para_Adj (n) of each of the N crop regions (n) after the distance correction is expressed by (Expression 5). ).
Para_Adj (n) = Gain (L) x Para_Each (n) + (1-Gain (L)) x Para_Each (1) ... (Formula 5)
At this time, as shown in (Equation 6), the crop area (1) itself of the “alignment destination area” is not corrected by the distance, and the optimum processing amount of the own area is applied as it is.
Para_Each (1) = Gain (L) × Para_Each (1) + (1-Gain (L)) × Para_Each (1)
= Para_Each (1) (Formula 6)
Here, the distance correction gain Gain (L) decreases as the distance L shown in FIG. 3 becomes smaller (the crop area becomes closer). Therefore, in “Expression 4” and “Expression 5”, The influence of the optimum processing amount becomes large, and in the case of the same position (L = 0), the optimum processing amount of the “alignment destination area” is applied as it is. On the other hand, the distance correction gain Gain (L) increases as the distance L shown in FIG. 3 increases (the crop area becomes far), and therefore, in (Expression 4) and (Expression 5), The influence of the optimum processing amount is reduced, and in the case of a position close to the diagonal distance of the screen (L = 3000), the distance correction gain Gain (L) = 1, so that the optimum processing amount of the own area is applied as it is.
このように、2つのクロップ領域間の距離Lが遠い場合は距離補正ゲインGain(L)が大きくなって自領域に最適な補正が行われが、2つのクロップ領域間の距離Lが近くなる程、距離補正ゲインGain(L)が小さくなって「合わせ込み先領域」に近い補正が行われるので、クロップ領域間の画像の明るさや色が近くなるように補正され、2つのクロップ領域の画像を並べて鑑賞する場合の違和感が解消される。 As described above, when the distance L between the two crop areas is long, the distance correction gain Gain (L) is increased and optimal correction is performed for the own area, but as the distance L between the two crop areas decreases. Since the distance correction gain Gain (L) is reduced and correction close to the “alignment destination area” is performed, the brightness and color of the image between the crop areas are corrected so that the images in the two crop areas are Discomfort when viewing side by side is eliminated.
尚、上記の説明では、距離補正部164は、距離算出部162が求めたクロップ領域間の距離Lに応じて画像補正係数算出部163が求めた画像補正係数を調整すると述べたが、画像補正係数がホワイトバランスゲイン,ガンマ補正ゲイン,色補正係数,露出補正値など複数のゲインや係数がある場合は、それぞれのゲインや係数毎に異なる距離補正を行うようにしても構わない。例えば、図3において、ホワイトバランスゲインの距離補正を特性401を用いて行い、ガンマ補正ゲインの距離補正を近似特性405を用いて行い、色補正係数の距離補正を直線404を用いて行うようにしても構わないし、いずれかのみ異なる距離補正を行っても構わない。
In the above description, the distance correction unit 164 adjusts the image correction coefficient obtained by the image correction
また、上記で説明した距離補正部164は、距離算出部162が求めたクロップ領域間の距離(L)に応じて画像補正係数算出部163が求めた画像補正係数を調整するための距離補正ゲインGain(L)を求め、求めた距離補正ゲインGain(L)で調整した画像補正係数を画像処理部105に与える。或いは、画像補正係数が露出補正値である場合は撮像部102の電子シャッタを制御してクロップ領域毎の露出補正を行う。
The distance correction unit 164 described above is a distance correction gain for adjusting the image correction coefficient obtained by the image correction
このようにして、画像処理部105はクロップ領域間の距離に応じて補正された画像補正係数でホワイトバランス処理,ガンマ補正処理,色補正処理および露出制御などを行うことができる。
[「クロップ撮影モード」の動作]
次に、操作部110の撮影モード選択ダイヤルで「クロップ撮影モード」が選択された場合の制御部109の処理について、図4のフローチャートを用いて詳しく説明する。尚、電子カメラ101の電源は投入されているものとする。
In this manner, the
[Operation of “Crop shooting mode”]
Next, the processing of the
(ステップS101)制御部109は、ユーザーが操作部110の撮影モード選択ダイヤルで「クロップ撮影モード」を選択した場合に「クロップ撮影モード」の処理を開始する。この状態では、表示部108には撮影構図を決めるためのプレビュー画像が表示されている。
(Step S <b> 101) The
(ステップS102)制御部109の領域指定部161は、表示部108に表示されている被写体画像の中からクロップ領域を設定する。ここで、クロップ領域の設定は、先に説明したように、制御部109の領域指定部161が行う。ユーザーは、操作部110のカーソルボタンを用いて表示部108に表示されたクロップ領域を示す枠の位置や大きさを可変させて、例えば図2(a)に示したクロップ領域201やクロップ領域202のようにクロップ領域を設定する。領域指定部161は、設定されたクロップ領域を撮像部102の撮像素子の画素座標としてメモリ112に記憶する。例えば、図2(a)のクロップ領域201の場合は、領域の左下座標(500,20)と右上座標(980,400)の対角位置の座標がクロップ領域の座標として記憶される。
(Step S102) The area designating unit 161 of the
(ステップS103)制御部109は、操作部110のレリーズボタンが押下されたか否かを判別し、押下されるまで待つ。レリーズボタンが押下された場合はステップS104に進む。
(Step S103) The
尚、ステップS102で設定されたクロップ領域のそれぞれについて、固定(位置を動かさない)、可動(連写や動画撮影などに対応して自動追尾を行ってクロップ領域の位置やサイズを可変する)等の設定ができるようにしても構わない。例えば、レリーズボタンが押下されるまでの間に被写体が移動する場合や電子カメラ101の位置が変わる場合には、電子カメラ101の顔認識機能を利用して被写体の自動追尾を行う方法が考えられる。例えば顔認識機能で認識した顔領域の上下左右に広げた領域をクロップ領域に設定するように制御する。この場合、認識した顔領域の大きさに応じてクロップ領域の大きさを変えるようにして、顔領域の上方向に顔領域の上下幅の0.5倍,下方向に顔領域の上下幅の3.0倍,左右方向には顔領域の左右幅の1.0倍などのようにクロップ領域の大きさを自動的に可変するように処理する。これにより、顔認識設定した人物の顔が小さくなるとクロップ領域のサイズが小さくなり、人物の顔が大きくなるとクロップ領域のサイズが大きくなるので、顔認識機能によって被写体を自動的に追尾しながら被写体の大きさに応じてクロップ領域の位置や大きさを自動的に可変することが可能になる。さらに、認識した顔領域の目と鼻と口などの位置から頭の方向を判別するようにすれば、人物が斜めや横に写っている場合でも適切且つ自動的にクロップ領域の位置や大きさを可変することができる。
For each crop area set in step S102, fixed (does not move position), movable (automatic tracking corresponding to continuous shooting, video shooting, etc., changes the position and size of the crop area), etc. It may be possible to set the following. For example, when the subject moves before the release button is pressed or the position of the
(ステップS104)制御部109の距離算出部162は、ステップS102で設定されたクロップ領域が複数ある場合、クロップ領域間の距離(L)を測定する。
(Step S104) The distance calculation unit 162 of the
尚、図2で説明したように、2つのクロップ領域の場合は2つのクロップ領域間の距離をLとするが、3つ以上のクロップ領域がある場合は、先に説明したように基準となるクロップ領域を「合わせ込み領域」として選択して、当該クロップ領域との距離を求めるようにしても構わない。 As described with reference to FIG. 2, in the case of two crop areas, the distance between the two crop areas is set to L. However, when there are three or more crop areas, the reference is as described above. The crop area may be selected as the “matching area” and the distance from the crop area may be obtained.
或いは、3つ以上のクロップ領域がある場合、距離が最も近い2つのクロップ領域を選択して、これを当該クロップ領域の距離(L)としても構わない。この場合、例えばA,B,Cの3つのクロップ領域が設定されている場合、クロップ領域Aとクロップ領域Bの距離を距離(Lab),クロップ領域Bとクロップ領域Cの距離を距離(Lbc),クロップ領域Aとクロップ領域Cの距離を距離(Lac)とする。この時、距離(Lab)と距離(Lbc)と距離(Lac)の関係が、距離(Lab)<距離(Lbc)<距離(Lac)であったとする。この場合は、クロップ領域Aとクロップ領域Bについては距離(Lab)を適用し、クロップ領域Cについては距離(Lbc)を適用する。 Alternatively, when there are three or more crop areas, the two crop areas having the closest distance may be selected and set as the distance (L) between the crop areas. In this case, for example, when three crop areas A, B, and C are set, the distance between the crop area A and the crop area B is a distance (Lab), and the distance between the crop area B and the crop area C is a distance (Lbc). , The distance between the crop area A and the crop area C is a distance (Lac). At this time, it is assumed that the relationship between the distance (Lab), the distance (Lbc), and the distance (Lac) is distance (Lab) <distance (Lbc) <distance (Lac). In this case, the distance (Lab) is applied to the crop area A and the crop area B, and the distance (Lbc) is applied to the crop area C.
(ステップS105)制御部109の画像補正係数算出部163は、ステップS102で設定されたクロップ領域毎に最適な画像補正係数を算出する。尚、「合わせ込み領域」として画像全体が選択されたいる場合は、画像全体に最適な画像補正係数も求める。また、本処理ステップで算出される画像補正係数は、先に説明したようなガンマ補正ゲインやホワイトバランスゲイン、或いは色補正係数および露出補正値などである。
(Step S105) The image correction
尚、画像補正係数が露出補正値である場合は、撮像部102を構成する撮像素子内のクロップ領域毎に電子シャッタ速度を調節して指定領域毎の露光量を制御してクロップ領域毎に適正な露光量で撮影する。この場合は、ステップS103でレリーズボタンの押下を行うようにしたが、ステップS105の後でレリーズボタンの押下を行うようにする。この時、ステップS104とステップS105の処理はプレビュー表示中に行われる。尚、撮影後に処理バッファ104に取り込まれた画像データ(RAWデータ)に対して極端に大きな明るさの調整などを行った場合は、RAWデータの階調情報の欠落によって白飛びや黒潰れが生じる恐れがあるので、上記に説明したように、撮影時にクロップ領域毎に電子シャッタ速度を制御して、クロップ領域毎の露光量を制御するのが好ましい。
When the image correction coefficient is an exposure correction value, the electronic shutter speed is adjusted for each crop area in the image sensor that constitutes the
(ステップS106)制御部109の距離補正部164は、ステップS105で求めた各クロップ領域に最適な画像補正係数をステップS104で求めたクロップ領域間の距離(L)に応じて補正を行い、距離補正後の画像補正係数を求める。
(Step S106) The distance correction unit 164 of the
そして、距離補正後の画像補正係数を用いて各クロップ領域の画像補正を画像処理部105で行う。或いは、画像補正係数が露出補正値である場合は撮像部102の電子シャッタを制御してクロップ領域毎の露出補正を行う。
Then, the
(ステップS107)制御部109は、ステップS106で画像処理後のクロップ領域毎の画像データをメモリカードI/F107を介してメモリカード107bに保存する。
(Step S107) The
(ステップS108)制御部109は、一連の「クロップ撮影モード」を終了する。
(Step S <b> 108) The
尚、上記のフローチャートでは、ステップS106で距離補正後の画像補正係数を用いて画像処理を行った後の画像データをメモリカード107bに保存するようにしたが、ステップS106の距離補正後の画像補正係数を用いた画像処理を行わずに、ステップS107において、画像処理前の画像データ(RAWデータ)または距離補正を行わない画像補正係数(各クロップ領域に最適な画像補正係数)を用いて画像処理を行った画像データをメモリカード107bに保存するようにしても構わない。この場合は、各クロップ領域の画像データとステップS104で求めた距離情報と各クロップ領域に最適な画像補正係数とを対応付けてメモリカード107bに保存する。例えば、距離情報や画像補正係数を各クロップ領域の画像データのヘッダ情報として格納すればよい。
In the above flowchart, the image data after the image processing using the image correction coefficient after the distance correction in step S106 is stored in the
また、上記の説明では、1回の撮影(単写撮影)の場合について説明したが、図2で説明したように、スポーツシーンなどで連写撮影する場合、先に説明したようにクロップ領域を被写体の動きに応じて自動追尾するようにして、図4のフローチャートのステップS104からステップS107までの処理を連写回数分繰り返すようにすれば、単写撮影の場合と同様にクロップ領域間の距離に応じた適切な補正を行った画像を撮影することができる。 In the above description, the case of single shooting (single shooting) has been described. However, as described above with reference to FIG. 2, when continuous shooting is performed in a sports scene or the like, the crop area is set as described above. If the process from step S104 to step S107 in the flowchart of FIG. 4 is repeated as many times as the number of continuous shots so as to automatically track according to the movement of the subject, the distance between the crop areas is the same as in the case of single-shot shooting. It is possible to take an image that has been appropriately corrected according to the above.
尚、ホワイトバランス処理,色補正処理,階調処理および露出制御において、一般に「連写撮影モード」や「動画撮影モード」が選択されている場合は、時間的に連続して撮影される画像の明るさや色が急激に変化しないように、連続する画像間のホワイトバランス処理,色補正処理,階調処理および露出制御のパラメータ(ホワイトバランスゲイン,色補正係数,ガンマ補正ゲイン,露出補正値など)の追従性が遅くなる(更新時の値の変化が小さくなる)ように制御部109によって制御されるが、本実施形態に係る電子カメラ101においては、画像補正係数の追従性をクロップ領域間の距離に応じて可変するようにしても構わない。例えば、クロップ領域間の距離が予め設定された閾値より遠い場合は連続する画像間のホワイトバランス処理,色補正処理および階調処理のパラメータの追従性を遅くし、クロップ領域間の距離が予め設定された閾値より近い場合は連続する画像間のホワイトバランス処理,色補正処理および階調処理のパラメータの追従性を速くするよう制御部109は画像処理部105を制御するようにしても構わない。或いは、閾値を設けずにクロップ領域間の距離に応じて適宜連続して画像補正係数の追従性を可変するようにしても構わない。このような制御を行うことにより、2つのクロップ領域が接近している場合は前の撮影画像のパラメータの履歴の影響を受けることなく迅速に収束させることができるので、先の実施形態で述べた効果に加えてクロップ領域間の画像の明るさやホワイトバランスなどの差をより低減することができる。
In general, when “continuous shooting mode” or “movie shooting mode” is selected in white balance processing, color correction processing, gradation processing, and exposure control, Parameters for white balance processing, color correction processing, gradation processing, and exposure control between consecutive images (white balance gain, color correction coefficient, gamma correction gain, exposure correction value, etc.) so that brightness and color do not change abruptly In the
このようにして、本実施形態に係る電子カメラ101は、複数のクロップ領域間の距離に応じて各クロップ領域毎に最適な画像処理を行うことができるので、例えば日向と日陰の境界部分で複数のクロップ領域が近接している場合でも2つのクロップ領域の明るさやホワイトバランスが極端に異なることがなく、これらのクロップ領域の画像を並べて鑑賞する際に不自然な印象を与えない。
In this way, the
尚、本実施形態では、本発明に係る画像処理装置および画像処理プログラムを電子カメラ101に適用した場合について説明したが、撮影済みの画像データを専用の画像処理装置やパソコンなどで処理する場合は、図1の制御部109で行う処理や図4のフローチャートで行う処理を実行すればよい。特に、本実施形態で説明した電子カメラ101で撮影した同一画像内から切り取った複数のクロップ領域の画像データと、複数のクロップ領域間の距離情報と、複数の各クロップ領域毎に最適な画像に補正する画像補正係数とが記憶されたメモリカード107bを入力する入力部(または画像処理プログラムの場合は入力手順)を設けることによって、距離の隣接した位置にあるクロップ領域の画像を並べて表示する場合でも、図4のフローチャートのステップS106で行った距離補正処理を行うことによって違和感なく画像を鑑賞することができる。
In this embodiment, the case where the image processing apparatus and the image processing program according to the present invention are applied to the
以上、本発明に係る画像処理装置および画像処理プログラムについて、実施形態で例を挙げて説明してきたが、その精神またはその主要な特徴から逸脱することなく他の多様な形で実施することができる。そのため、上述した実施形態はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。本発明は、特許請求の範囲によって示されるものであって、本発明は明細書本文にはなんら拘束されない。さらに、特許請求の範囲の均等範囲に属する変形や変更は、全て本発明の範囲内である。 As described above, the image processing apparatus and the image processing program according to the present invention have been described by way of examples in the embodiment, but can be implemented in various other forms without departing from the spirit or main features thereof. . Therefore, the above-described embodiment is merely an example in all respects and should not be interpreted in a limited manner. The present invention is defined by the claims, and the present invention is not limited to the text of the specification. Further, all modifications and changes belonging to the equivalent scope of the claims are within the scope of the present invention.
101・・・電子カメラ 102・・・撮像部
103・・・A/D変換部 104・・・処理バッファ
105・・・画像処理部 106・・・システムバス
107・・・メモリカードI/F 108・・・表示部
109・・・制御部 110・・・操作部
111・・・測光センサ 112・・・メモリ
151・・・ホワイトバランス(WB)調整部
152・・・色/階調処理部 153・・・輪郭強調部
161・・・領域指定部 162・・・距離算出部
163・・・画像補正係数算出部 164・・・距離補正部
DESCRIPTION OF
Claims (9)
前記撮像部が撮像する被写体画像内の複数のクロップ領域を指定するクロップ領域指定部と、
前記クロップ領域指定部で指定した前記複数のクロップ領域間の距離を求める距離算出部と、
前記複数の各クロップ領域毎および画像全体のそれぞれに対して最適な画像に補正する画像補正係数を求める補正係数算出部と、
前記クロップ領域指定部が指定した前記複数のクロップ領域の画像データと、前記距離算出部が算出した前記複数のクロップ領域間の距離情報と、前記補正係数算出部が求めた画像補正係数とを関連付けて記憶媒体に記憶する記録部と
を有することを特徴とする画像処理装置。 An imaging unit for imaging a subject image;
A crop area designating unit for designating a plurality of crop areas in a subject image captured by the imaging unit;
A distance calculation unit for obtaining a distance between the plurality of crop regions designated by the crop region designation unit;
A correction coefficient calculation unit for obtaining an image correction coefficient for correcting each of the plurality of crop regions and the entire image to an optimum image;
The image data of the plurality of crop areas designated by the crop area designation unit, the distance information between the plurality of crop areas calculated by the distance calculation unit, and the image correction coefficient obtained by the correction coefficient calculation unit are associated with each other. And a recording unit for storing in a storage medium.
前記複数のクロップ領域毎の画像補正係数を前記複数のクロップ領域間の距離情報に基づいて調整する距離補正係数を求める距離補正係数算出部と、
前記画像補正係数と前記距離補正係数とを用いて前記クロップ領域毎の画像データを補正する補正処理部と、
前記補正処理部が処理した前記クロップ領域毎の画像データを記憶媒体に記憶する記録部と
を設けたことを特徴とする画像処理装置。 An input unit for inputting image data of a plurality of crop areas cut out from the same image, distance information between the plurality of crop areas, and an image correction coefficient for correcting the image to an optimum image for each of the plurality of crop areas; ,
A distance correction coefficient calculation unit for obtaining a distance correction coefficient for adjusting the image correction coefficient for each of the plurality of crop areas based on distance information between the plurality of crop areas;
A correction processing unit that corrects the image data for each crop region using the image correction coefficient and the distance correction coefficient;
An image processing apparatus comprising: a recording unit that stores, in a storage medium, image data for each of the crop areas processed by the correction processing unit.
前記撮像部が撮像する被写体画像内の複数のクロップ領域を指定するクロップ領域指定部と、
前記クロップ領域指定部で指定した前記複数のクロップ領域間の距離を求める距離算出部と、
前記複数の各クロップ領域毎および画像全体のそれぞれに対して最適な画像に補正する画像補正係数を求める補正係数算出部と、
前記複数のクロップ領域毎の画像補正係数を前記複数のクロップ領域間の距離情報に基づいて調整する距離補正係数を求める距離補正係数算出部と、
前記画像補正係数と前記距離補正係数とを用いて前記クロップ領域毎の画像データを補正する補正処理部と、
前記補正処理部が処理した前記クロップ領域毎の画像データを記憶媒体に記憶する記録部と
を設けたことを特徴とする画像処理装置。 An imaging unit for imaging a subject image;
A crop area designating unit for designating a plurality of crop areas in a subject image captured by the imaging unit;
A distance calculation unit for obtaining a distance between the plurality of crop regions designated by the crop region designation unit;
A correction coefficient calculation unit for obtaining an image correction coefficient for correcting each of the plurality of crop regions and the entire image to an optimum image;
A distance correction coefficient calculating unit for obtaining a distance correction coefficient for adjusting an image correction coefficient for each of the plurality of crop areas based on distance information between the plurality of crop areas;
A correction processing unit that corrects the image data for each crop region using the image correction coefficient and the distance correction coefficient;
An image processing apparatus comprising: a recording unit that stores image data for each crop area processed by the correction processing unit in a storage medium.
前記距離補正係数算出部は、画像全体の画像補正係数または前記複数のクロップ領域毎のいずれかの画像補正係数を基準として前記距離補正係数を求めることを特徴とする画像処理装置。 The image processing apparatus according to claim 2 or 3,
The distance correction coefficient calculation unit obtains the distance correction coefficient based on an image correction coefficient of the entire image or any one of the plurality of crop areas.
前記距離算出部が求める前記複数のクロップ領域間の距離は、前記撮像部の二次元状に配置された複数画素で構成される撮像面上における前記複数のクロップ領域の中心点間の画素距離であることを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 4,
The distance between the plurality of crop areas determined by the distance calculation unit is a pixel distance between the center points of the plurality of crop areas on an imaging surface configured by a plurality of pixels arranged in a two-dimensional shape of the imaging unit. An image processing apparatus comprising:
前記画像補正係数は、ガンマ補正ゲイン,ホワイトバランスゲイン,色補正係数、露出補正値の少なくとも1つであることを特徴とする画像処理装置。 In the image processing device according to any one of claims 1 to 5,
The image processing apparatus is characterized in that the image correction coefficient is at least one of a gamma correction gain, a white balance gain, a color correction coefficient, and an exposure correction value.
前記画像補正係数がガンマ補正ゲイン,ホワイトバランスゲイン,色補正係数、露出補正値のいずれか2つ以上に対応する場合、前記距離補正係数算出部は前記複数の画像補正係数毎に異なる距離補正係数を求めることを特徴とする画像処理装置。 In the image processing device according to any one of claims 1 to 5,
When the image correction coefficient corresponds to any two or more of a gamma correction gain, a white balance gain, a color correction coefficient, and an exposure correction value, the distance correction coefficient calculator is different for each of the plurality of image correction coefficients. An image processing apparatus characterized in that
時間的に連続して撮像された複数の画像の各画像毎に指定された複数のクロップ領域を切り出す場合、
前記補正係数算出部は、前記時間的に連続する画像間で前記指定された複数のクロップ領域間の距離が近づく場合に、前記時間的に連続する画像間で前記複数のクロップ領域毎の画像補正係数の追従性を高くする
ことを特徴とする画像処理装置。 In the image processing device according to any one of claims 1 to 7,
When cutting out a plurality of crop areas designated for each image of a plurality of images taken continuously in time,
The correction coefficient calculating unit corrects the image for each of the plurality of crop regions between the temporally continuous images when the distance between the specified crop regions is close between the temporally continuous images. An image processing apparatus characterized in that coefficient followability is increased.
同一画像内から切り取った複数のクロップ領域の画像データと、前記複数のクロップ領域間の距離情報と、前記複数の各クロップ領域毎および画像全体のそれぞれに対して最適な画像に補正する画像補正係数とを入力する入力手順と、
前記複数のクロップ領域毎の画像補正係数を前記複数のクロップ領域間の距離情報に基づいて調整する距離補正係数を求める距離補正係数算出手順と、
前記画像補正係数と前記距離補正係数とを用いて前記クロップ領域毎の画像データを補正する補正処理手順と、
前記補正処理部が処理した前記クロップ領域毎の画像データを記憶媒体に記憶する記録手順と
を有することを特徴とする画像処理プログラム。 An image processing program executed on a computer,
Image data for a plurality of crop areas cut out from the same image, distance information between the plurality of crop areas, and an image correction coefficient for correcting each of the plurality of crop areas and the entire image to an optimum image Input procedure to input and
A distance correction coefficient calculation procedure for obtaining a distance correction coefficient for adjusting an image correction coefficient for each of the plurality of crop areas based on distance information between the plurality of crop areas;
A correction processing procedure for correcting the image data for each crop region using the image correction coefficient and the distance correction coefficient;
An image processing program comprising: a recording procedure for storing, in a storage medium, image data for each of the crop areas processed by the correction processing unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009149980A JP2011009937A (en) | 2009-06-24 | 2009-06-24 | Image processing apparatus and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009149980A JP2011009937A (en) | 2009-06-24 | 2009-06-24 | Image processing apparatus and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011009937A true JP2011009937A (en) | 2011-01-13 |
Family
ID=43566104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009149980A Withdrawn JP2011009937A (en) | 2009-06-24 | 2009-06-24 | Image processing apparatus and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011009937A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015185935A (en) * | 2014-03-20 | 2015-10-22 | カシオ計算機株式会社 | image processing apparatus, image processing method and program |
JP2016096409A (en) * | 2014-11-13 | 2016-05-26 | カシオ計算機株式会社 | Image acquisition device and program |
JP5967504B1 (en) * | 2015-05-18 | 2016-08-10 | パナソニックIpマネジメント株式会社 | Omni-directional camera system |
JP2016187093A (en) * | 2015-03-27 | 2016-10-27 | カシオ計算機株式会社 | Image processing apparatus, image processing method and program |
JP2016213781A (en) * | 2015-05-13 | 2016-12-15 | キヤノン株式会社 | Imaging apparatus, control method thereof, and control program |
CN113096018A (en) * | 2021-04-20 | 2021-07-09 | 广东省智能机器人研究院 | Aerial image splicing method and system |
-
2009
- 2009-06-24 JP JP2009149980A patent/JP2011009937A/en not_active Withdrawn
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015185935A (en) * | 2014-03-20 | 2015-10-22 | カシオ計算機株式会社 | image processing apparatus, image processing method and program |
JP2016096409A (en) * | 2014-11-13 | 2016-05-26 | カシオ計算機株式会社 | Image acquisition device and program |
JP2016187093A (en) * | 2015-03-27 | 2016-10-27 | カシオ計算機株式会社 | Image processing apparatus, image processing method and program |
JP2016213781A (en) * | 2015-05-13 | 2016-12-15 | キヤノン株式会社 | Imaging apparatus, control method thereof, and control program |
JP5967504B1 (en) * | 2015-05-18 | 2016-08-10 | パナソニックIpマネジメント株式会社 | Omni-directional camera system |
JP2016219956A (en) * | 2015-05-18 | 2016-12-22 | パナソニックIpマネジメント株式会社 | Omnidirectional camera system |
US10070056B2 (en) | 2015-05-18 | 2018-09-04 | Panasonic Intellectual Property Management Co., Ltd. | Omnidirectional camera system |
CN113096018A (en) * | 2021-04-20 | 2021-07-09 | 广东省智能机器人研究院 | Aerial image splicing method and system |
CN113096018B (en) * | 2021-04-20 | 2022-09-20 | 广东省智能机器人研究院 | Aerial image splicing method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8830348B2 (en) | Imaging device and imaging method | |
JP5321163B2 (en) | Imaging apparatus and imaging method | |
US9148561B2 (en) | Image capturing apparatus, executable autoexposure bracketing and control method thereof | |
US8325268B2 (en) | Image processing apparatus and photographing apparatus | |
US7319483B2 (en) | Digital automatic white balance device | |
US20110019029A1 (en) | Image processing apparatus, image processing method, and storage medium thereof | |
JP2006121612A (en) | Image pickup device | |
JP4894907B2 (en) | Imaging apparatus, imaging processing method, and program | |
JP2011135569A (en) | Image pickup apparatus capable of correcting image quality degradation due to optical member, method of controlling image pickup apparatus, and nonvolatile storage medium | |
KR20150109177A (en) | Photographing apparatus, method for controlling the same, and computer-readable recording medium | |
JP2017022610A (en) | Image processing apparatus and image processing method | |
KR20080030477A (en) | Image correction device, image correction method, and computer readable medium | |
EP2362662B1 (en) | Imaging device, imaging method and computer readable recording medium storing program for performing the imaging method | |
JP2011009937A (en) | Image processing apparatus and program | |
JP4999871B2 (en) | Imaging apparatus and control method thereof | |
JP5256947B2 (en) | IMAGING DEVICE, IMAGING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM RECORDING PROGRAM FOR EXECUTING THE METHOD | |
JP6108680B2 (en) | Imaging apparatus, control method therefor, program, and storage medium | |
JP5948997B2 (en) | Imaging apparatus and imaging method | |
JP5146015B2 (en) | Imaging apparatus and imaging method | |
JP2006333113A (en) | Imaging device | |
JP5335964B2 (en) | Imaging apparatus and control method thereof | |
JP5487942B2 (en) | Image processing apparatus, image processing method, and image input apparatus | |
JP5310331B2 (en) | Imaging apparatus and imaging method | |
KR101750986B1 (en) | An apparatus and a method for processing image, and a computer-readable storage medium | |
EP4138384A2 (en) | Imaging apparatus, imaging method, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20120904 |