JP2011009937A - Image processing apparatus and program - Google Patents

Image processing apparatus and program Download PDF

Info

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
Application number
JP2009149980A
Other languages
Japanese (ja)
Inventor
Yukako Matsumoto
由佳子 松本
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2009149980A priority Critical patent/JP2011009937A/en
Publication of JP2011009937A publication Critical patent/JP2011009937A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To solve the problem that brightness and white balance are largely different when aligning and displaying the images of crop regions which are adjacently positioned in the same image and are different in photographing conditions in a conventional manner.SOLUTION: An image processing apparatus includes an imaging unit for imaging a subject image, a crop region designation unit for designating a plurality of crop regions in the subject image to be imaged by the imaging unit, a distance calculation unit for obtaining a distance between a plurality of crop regions designated by the crop region designation unit, a correction coefficient calculation unit for obtaining image correction coefficients by which the correction is made to obtain the optimum images with respect to the respective whole images in units of crop regions, and a recording unit for associating image data of the crop regions designated by the crop region designation unit, distance information between the crop regions calculated by the distance calculation unit, and the image correction coefficients obtained by the correction coefficient calculation unit and storing the associated data, information, and coefficients in a storage medium.

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).

特開2005−175683号公報JP 2005-175683 A

一般に自動露出調整やオートホワイトバランス調整は、撮影画像全体に対する画像データ(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の構成を示すブロック図である。It is a block diagram which shows the structure of the electronic camera 101 which concerns on this embodiment. クロップ領域の設定とクロップ領域間の画素距離(L)を説明するための補助図である。It is an auxiliary | assistant figure for demonstrating the setting of a crop area | region and the pixel distance (L) between crop areas. クロップ領域間の画素距離(L)と距離補正ゲインGain(L)の関係を表す特性例を示す補助図である。It is an auxiliary | assistant figure which shows the example of a characteristic showing the relationship between the pixel distance (L) between crop areas and the distance correction gain Gain (L). 「クロップ撮影モード」の処理を示すフローチャートである。It is a flowchart which shows the process of "crop photography mode".

以下、本発明に係る画像処理装置および画像処理プログラムに関する実施形態について説明する。尚、本実施形態では、本発明に係る画像処理装置および画像処理プログラムを電子カメラ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 electronic camera 101 will be described. However, the present invention is not limited to a camera, and an apparatus that captures an image such as a scanner or a captured image. The present invention can also be applied to a computer that executes software for processing data, a dedicated image processing apparatus, and the like. In addition, the electronic camera 101 according to the present embodiment cuts out a plurality of designated crop areas from the entire photographed image, performs an optimum image processing for each crop area, and records it (hereinafter referred to as “crop photography mode”). An electronic camera. Hereinafter, the electronic camera 101 will be described in detail.

[電子カメラ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 electronic camera 101. The electronic camera 101 includes an imaging unit 102, an A / D conversion unit 103, a processing buffer 104, an image processing unit 105, a system bus 106, a memory card I / F (interface) 107, a display unit 108, The control unit 109, the operation unit 110, the photometric sensor 111, and the memory 112 are configured. Here, the system bus 106 is a data bus that connects blocks, and inputs and outputs control data, image data, and the like between the blocks.

撮像部102は、撮影光学系、絞りおよびシャッタ機構、撮像素子などで構成され、システムバス106を介して制御部109によって制御される。例えば、制御部109は、撮像部102に対して、撮影光学系のフォーカスレンズの位置調節,絞り値調節,シャッタ速度調節,撮像素子の電子シャッタ速度調節などの露出制御や読み出し領域の制御などを行う。尚、本実施形態は、撮像素子内のクロップ領域毎に電子シャッタ速度を調節してクロップ領域毎の露光量を制御できる撮像素子を用いる場合を含む。   The imaging unit 102 includes an imaging optical system, a diaphragm and shutter mechanism, an imaging device, and the like, and is controlled by the control unit 109 via the system bus 106. For example, the control unit 109 performs exposure control such as position adjustment of the focus lens of the photographing optical system, aperture value adjustment, shutter speed adjustment, electronic shutter speed adjustment of the image pickup device, control of the reading area, and the like for the imaging unit 102. Do. This embodiment includes a case where an image sensor that can control the exposure amount for each crop area by adjusting the electronic shutter speed for each crop area in the image sensor.

A/D変換部103は、撮像部102から出力されるアナログの画像信号をデジタルの画像データ(RGBのRAWデータ)に変換して処理バッファ104に一時的に記憶する。尚、処理バッファ104に記憶された画像データは、画像処理部105が画像処理を行う際のバッファとして使用されると共に、システムバス106を介して制御部109が処理バッファ104に記憶されている画像データを読み出して露出制御を行ったりプレビュー画像として表示部108に表示する。また、制御部109は、画像処理部105が処理後の画像データを処理バッファ104からメモリカードI/F107に装着されているメモリカード107bに記録する。   The A / D conversion unit 103 converts the analog image signal output from the imaging unit 102 into digital image data (RGB RAW data) and temporarily stores the digital image data in the processing buffer 104. Note that the image data stored in the processing buffer 104 is used as a buffer when the image processing unit 105 performs image processing, and the control unit 109 stores the image data stored in the processing buffer 104 via the system bus 106. Data is read and exposure control is performed, or a preview image is displayed on the display unit 108. Further, the control unit 109 records the image data processed by the image processing unit 105 from the processing buffer 104 to the memory card 107b attached to the memory card I / F 107.

画像処理部105は、ホワイトバランス調整部151と、色/階調処理部152と、輪郭強調部153とで構成される。画像処理部105は、制御部109から指定されたクロップ領域を切り出して、切り出したクロップ領域毎に、以下に説明するホワイトバランス調整処理、色/階調処理および輪郭強調処理を行う。   The image processing unit 105 includes a white balance adjustment unit 151, a color / gradation processing unit 152, and an outline enhancement unit 153. The image processing unit 105 cuts out the crop area designated by the control unit 109, and performs white balance adjustment processing, color / gradation processing, and edge enhancement processing described below for each cropped crop area.

ホワイトバランス(WB)調整部151は、撮像部102からA/D変換部103を介して処理バッファ104に取り込まれたRGBの画像データに対して、制御部109が算出したR/GゲインおよびB/Gゲインを乗算してホワイトバランス調整を行う。   The white balance (WB) adjustment unit 151 performs the R / G gain and B calculated by the control unit 109 on the RGB image data taken into the processing buffer 104 from the imaging unit 102 via the A / D conversion unit 103. Multiply / G gain to adjust white balance.

ここで、ホワイトバランス調整について説明する。ホワイトバランス調整は、環境光の特性に依らず無彩色の被写体が無彩色な画像として撮影されるように調整する処理である。一般に、無彩色の被写体に対して、環境光(太陽光、白熱電灯、蛍光灯など)の特性(例えば色温度など)が変化した場合、カメラ撮影された画像データは環境光の特性に応じて変化する。そこで、環境光が変化した場合でも無彩色の被写体は無彩色な画像になるように、画像データの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 processing buffer 104 in the white balance adjustment unit 151 to obtain the white balance. RGB image data after adjustment is obtained. In particular, in the “crop shooting mode” of the electronic camera 101 according to the present embodiment, white balance adjustment is performed for each crop region designated by the control unit 109. Note that image data processed by the white balance adjustment unit 151 is also held in the processing buffer 104. In addition, when “Continuous Shooting Mode” or “Movie Shooting Mode” is selected, the white balance between consecutive images is prevented so that the white balance of images captured continuously in time does not change abruptly. Control is performed by the control unit 109 so that the followability of the balance gain becomes slow.

色/階調処理部152は、処理バッファ104に保持されているホワイトバランス調整後の画像データに対して、制御部109から与えられる色補正係数やガンマ補正ゲインを用いて、色補正処理や階調処理などを行う。例えば、色補正処理ではRGBの画像データに色補正係数(例えばRGBの成分割合を変えるための色変換マトリクス)を乗算するマトリクス演算を行って色相や彩度などを調整したり、階調処理では画像データと出力輝度との関係を表すガンマ特性を調整する。特に本実施形態に係る電子カメラ101の「クロップ撮影モード」では、制御部109から指定されたクロップ領域毎に、ホワイトバランス処理と同様に色補正処理や階調処理などを行う。尚、色/階調処理部152が処理後の画像データも処理バッファ104に保持される。また、ホワイトバランスゲインと同様に、「連写撮影モード」や「動画撮影モード」が選択されている場合には、時間的に連続して撮影される画像の明るさや色が急激に変化しないように、連続する画像間の色補正処理や階調処理の追従性が遅くなるように制御部109によって制御される。   The color / gradation processing unit 152 uses the color correction coefficient and the gamma correction gain given from the control unit 109 for the image data after white balance adjustment held in the processing buffer 104 to perform color correction processing and gradation processing. Perform key processing. For example, in the color correction process, a matrix operation that multiplies RGB image data by a color correction coefficient (for example, a color conversion matrix for changing the RGB component ratio) to adjust the hue and saturation, and in the gradation process, A gamma characteristic representing the relationship between image data and output luminance is adjusted. In particular, in the “crop shooting mode” of the electronic camera 101 according to the present embodiment, color correction processing, gradation processing, and the like are performed for each crop region designated by the control unit 109 in the same manner as white balance processing. Note that image data processed by the color / gradation processing unit 152 is also stored in the processing buffer 104. Similarly to white balance gain, the brightness and color of images shot continuously in time will not change abruptly when “continuous shooting mode” or “movie mode” is selected. In addition, the control unit 109 controls the color correction processing and the gradation processing between successive images so that the follow-up performance is delayed.

輪郭強調部153は、処理バッファ104に保持されている色/階調処理部152が処理後の画像データに対して、制御部109が出力するエッジ強調パラメータを用いて輪郭強調処理(エッジ強調処理)を行う。特に本実施形態に係る電子カメラ101の「クロップ撮影モード」では、制御部109から指定されたクロップ領域毎に、輪郭強調処理を行う。尚、輪郭強調部153が処理後の画像データも処理バッファ104に保持される。   The contour emphasizing unit 153 uses the edge emphasis parameter (edge emphasizing process) output from the control unit 109 for the image data processed by the color / gradation processing unit 152 held in the processing buffer 104. )I do. In particular, in the “crop shooting mode” of the electronic camera 101 according to the present embodiment, contour enhancement processing is performed for each crop region designated by the control unit 109. Note that image data processed by the contour emphasizing unit 153 is also held in the processing buffer 104.

メモリカードI/F(インターフェース)107は、電子カメラ101にメモリカード107bを接続するためのインターフェースで、制御部109はメモリカードIF107を介してメモリカード107bに画像データや設定データなどを書き込んだり、メモリカード107bに保存されている画像データや設定データを読み出す。   A memory card I / F (interface) 107 is an interface for connecting the memory card 107b to the electronic camera 101. The control unit 109 writes image data, setting data, and the like to the memory card 107b via the memory card IF 107, Image data and setting data stored in the memory card 107b are read out.

表示部108は、液晶モニタなどで構成され、メモリカード107bに記憶されている画像データや処理バッファ104に一時的に記憶されている画像データ、或いは制御部109が出力する操作用のメニュー画面などを表示する。   The display unit 108 is configured with a liquid crystal monitor or the like, and includes image data stored in the memory card 107b, image data temporarily stored in the processing buffer 104, an operation menu screen output by the control unit 109, and the like. Is displayed.

制御部109は、内部に予め記憶されているプログラムに従って動作し、電子カメラ101の各部を制御する。尚、制御部109の構成については、後で詳しく説明する。   The control unit 109 operates according to a program stored in advance inside and controls each unit of the electronic camera 101. The configuration of the control unit 109 will be described in detail later.

操作部110は、電源ボタン、レリーズボタン、カーソルボタン、決定ボタン、撮影モード選択ダイヤル(「単写撮影モード」,「連写撮影モード」,「動画撮影モード」,「クロップ撮影モード」などの選択、或いはこれらの複合モード(連写撮影時にクロップ撮影を行うなど)の選択を行うダイヤル)などで構成され、ユーザーはこれらの操作ボタンを用いて電子カメラ101を操作する。操作部110の操作情報(ボタンのオン/オフやダイヤル設定など)は制御部109に出力される。そして、制御部109は、操作部110から入力する操作情報に応じて、電子カメラ101全体の動作を制御する。   The operation unit 110 selects a power button, a release button, a cursor button, an enter button, a shooting mode selection dial (“single shooting mode”, “continuous shooting mode”, “movie shooting mode”, “crop shooting mode”, etc. Or a combination mode (a dial for selecting crop shooting during continuous shooting) or the like, and the user operates the electronic camera 101 using these operation buttons. Operation information of the operation unit 110 (button on / off, dial setting, etc.) is output to the control unit 109. The control unit 109 controls the entire operation of the electronic camera 101 in accordance with operation information input from the operation unit 110.

測光センサ111は、撮像部102で撮像する被写体の明るさを測光するセンサで、測光データはシステムバス106を介して制御部109に出力され、露出制御される。尚、測光センサ111を設けずに、撮影時に構図を確認するためのプレビュー画像を撮像部102から処理バッファ104に取り込む際の画像データから被写体の明るさを検出して、露出制御を行うようにしても構わない。また、本実施形態に係る電子カメラ101の「クロップ撮影モード」において、測光センサ111は、制御部109の指令によって、後述するクロップ領域毎の測光値を制御部109に出力する。特に、先に説明したように、撮像部102を構成する撮像素子内のクロップ領域毎に電子シャッタ速度を調節して指定領域毎の露光量を制御できる場合は、指定されたクロップ領域毎に露出制御を行ってクロップ領域毎に適正な露光量で撮影することができる。   The photometric sensor 111 is a sensor that measures the brightness of the subject imaged by the imaging unit 102, and photometric data is output to the control unit 109 via the system bus 106 and exposure controlled. In addition, without providing the photometric sensor 111, the brightness of the subject is detected from the image data when the preview image for confirming the composition at the time of shooting is taken into the processing buffer 104 from the imaging unit 102, and exposure control is performed. It doesn't matter. In the “crop shooting mode” of the electronic camera 101 according to the present embodiment, the photometric sensor 111 outputs a photometric value for each crop area to be described later to the control unit 109 in response to a command from the control unit 109. In particular, as described above, when the exposure amount for each designated area can be controlled by adjusting the electronic shutter speed for each crop area in the image sensor that constitutes the imaging unit 102, the exposure is performed for each designated crop area. By performing control, it is possible to photograph with an appropriate exposure amount for each crop region.

メモリ112は、制御部109が電子カメラ101の設定や処理に必要なパラメータなどを記憶する不揮発性のメモリである。尚、メモリカード107bの代わりにメモリ112に撮影画像などを記憶するようにしても構わない。
[制御部109の構成]
次に、図1の制御部109の構成について詳しく説明する。制御部109は、領域指定部161と、距離算出部162と、画像補正係数算出部163と、距離補正部164とで構成され、これらの処理ブロックは「クロップ撮影モード」が選択された時に動作する。
The memory 112 is a non-volatile memory in which the control unit 109 stores parameters necessary for setting and processing of the electronic camera 101. Note that a captured image or the like may be stored in the memory 112 instead of the memory card 107b.
[Configuration of Control Unit 109]
Next, the configuration of the control unit 109 in FIG. 1 will be described in detail. The control unit 109 includes an area designation unit 161, a distance calculation unit 162, an image correction coefficient calculation unit 163, and a distance correction unit 164. These processing blocks operate when the “crop shooting mode” is selected. To do.

領域指定部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 crop area 201, a crop area 202, and the like out of the entire captured image captured by the imaging unit 102. Specify multiple crop areas. For example, as shown in the figure, the crop area is specified by displaying a dotted frame superimposed on the subject image displayed on the screen of the display unit 108, and operating the cursor button or the like of the operation unit 110 to display the dotted frame. The cropping area is determined with the enter button of the operation unit 110 according to the target subject by moving up / down / left / right or changing the width. Alternatively, the crop area may be automatically specified using a face recognition function that has already been put to practical use, or the crop area may automatically follow the movement of the subject using the subject tracking function. Absent.

このようにして、領域指定部161は、撮像部102で撮像される画像全体の中から複数のクロップ領域を指定する。尚、ここで指定されたクロップ領域は、一連の撮影が終了するまでメモリ112に保持される。   In this way, the area designating unit 161 designates a plurality of crop areas from the entire image captured by the imaging unit 102. Note that the crop area designated here is held in the memory 112 until a series of photographing is completed.

距離算出部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 imaging unit 102 between the center point of the crop area 201 and the center point of the crop area 202 is obtained. Here, the pixel distance is, for example, when the imaging device of the imaging unit 102 is configured with vertical: 1000 pixels and horizontal: 2000 pixels, the coordinates of the pixels on the imaging surface of the imaging device (vertical pixel number, horizontal pixel number). The imaging surface can be expressed from coordinates (0, 0) to coordinates (1000, 2000). At this time, for example, when the center point of the crop area 201 in FIG. 2A is the coordinate (600, 200) and the center point of the crop area 202 is the coordinate (400, 1800), the center point of the crop area 201 and the crop area The pixel distance L1 between the center point 202 and the center point 202 can be obtained by (Expression 3).

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 coefficient calculation unit 163 calculates an optimal image correction coefficient for each of a plurality of crop areas specified by the area specifying unit 161 and an optimal image correction coefficient for the entire captured image. Here, as described above, the image correction coefficient is a coefficient for correcting an image such as a gamma correction gain, a white balance gain, a color correction coefficient, or an exposure correction value (in the case of electronic shutter control). It is. In particular, in the present embodiment, the image correction coefficient calculation unit 163 obtains an optimal image correction coefficient for each of a plurality of crop areas. Here, the gamma correction gain, the white balance gain, the color correction coefficient, the exposure correction value, and the like including the image correction coefficient Para _ *** are optimal for the crop area 201 in the case of FIG. The correct image correction coefficient can be expressed as Para_Each (201), the optimal image correction coefficient for the crop area 202 can be expressed as Para_Each (202), and the optimal image correction coefficient for the entire image can be expressed as Para_All.

上記の場合、画像補正係数算出部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 coefficient calculation unit 163 obtains an image correction coefficient Para_Each (201), an image correction coefficient Para_Each (202), an image correction coefficient Para_All, and the like. For example, when the crop area 201 and the crop area 202 are respectively cut out from the captured images of FIGS. 2A, 2B, and 2C, the crop area 201 is located in the shaded part, so that the crop area 201 is An image correction coefficient Para_Each (201) that makes the image brighter is obtained, and an image correction coefficient Para_Each (202) that makes the crop region 202 darker is obtained because the crop region 202 is located in the sunlit portion. In each figure of FIG. 2, the part with the oblique line in the whole image shows the shade, and the part without the oblique line shows the sun.

さらに、画像全体に最適な画像補正係数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 crop area 201 in the shaded area is an image of a slightly bluish color with an undertone, and the crop area 202 in the shaded area is an overexposed image. As will be described later, it is not always necessary to obtain the image correction coefficient Para_All that is optimal for the entire image unless the image correction coefficient Para_All is designated as a target “alignment destination area” for distance correction.

このようにして、画像補正係数算出部163は、領域指定部161で指定された複数のクロップ領域毎および画像全体のそれぞれについて最適となる画像補正係数を算出する。   In this way, the image correction coefficient calculation unit 163 calculates the optimal image correction coefficient for each of the plurality of crop areas designated by the area designation unit 161 and for the entire image.

距離補正部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 coefficient calculation unit 163 according to the distance (L) between the plurality of crop areas obtained by the distance calculation unit 162. For example, in the case of FIG. 2A, the pixel distance between the center point of the crop area 201 and the center point of the crop area 202 is L1, but in the case of FIG. 2B, the center point of the crop area 201 is The pixel distance between the center point of the crop area 202 is L2 smaller than L1. Further, in the case of FIG. 2C, the pixel distance between the center point of the crop area 201 and the center point of the crop area 202 is L3 which is smaller than L2.

ここで、画像補正係数算出部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 coefficient calculation unit 163, an optimal image can be obtained in each crop area. However, as shown in FIG. A problem occurs when the area 201 and the crop area 202 are close enough to overlap. For example, since the crop area 201 in FIG. 2C has a lot of shaded areas and the crop area 202 has a lot of sun, when image correction is performed by applying an optimal image correction coefficient to each crop area, The two cropped cropped areas have different brightness and color. In particular, when two cut-out images are viewed side by side, there is a problem that the brightness and color of a portion (such as a ball) that overlaps both images are greatly different, giving the viewer a sense of incongruity.

そこで、距離補正部164は、距離算出部162が求めた複数のクロップ領域間の距離(L)に応じて画像補正係数算出部163が求めた画像補正係数を調整する。   Therefore, the distance correction unit 164 adjusts the image correction coefficient obtained by the image correction coefficient calculation unit 163 according to the distance (L) between the plurality of crop areas obtained by the distance calculation unit 162.

ここで、画像補正係数を調整する方法として、距離に応じて適宜連続して画像補正係数を調整する処理と、距離が閾値より小さい場合だけ画像補正係数を調整する処理とが考えられる。例えば後者の場合は、図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 crop area 201 and the center point of the crop area 202 is larger than a preset threshold, Apply the optimal image correction factor. That is, the image correction coefficient obtained by the image correction coefficient calculation unit 163 is not adjusted. On the contrary, as shown in FIG. 2C, when the pixel distance L3 between the center point of the crop area 201 and the center point of the crop area 202 is smaller than a preset threshold value, the image correction optimum for each crop area is performed. The distance correction unit 164 adjusts the image correction coefficient obtained by the image correction coefficient calculation unit 163 without applying the coefficient as it is. The threshold value may be a value set as a default value when the electronic camera 101 is manufactured, or the user may freely set the electronic camera 101 in the setting menu after purchase.

次に、距離に応じて適宜連続して画像補正係数を調整する処理について詳しく説明する。距離補正部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 coefficient calculation unit 163 according to the distance between crop areas obtained by the distance calculation unit 162: L. Gain: Find Gain. Here, since the distance correction gain Gain is a function of L, it is expressed as a distance correction gain Gain (L). For example, since the pixel distance between the center point of the crop area 201 and the center point of the crop area 202 in FIG. 2A is L1, the distance correction gain at this time is Gain (L1). Similarly, the distance correction gain in the case of FIG. 2B is Gain (L2), and the distance correction gain in the case of FIG. 2C is Gain (L3). In FIG. 3, the conversion characteristic 401 indicating the relationship between the pixel distance L between the two crop areas and the distance correction gain Gain does not have to be a cubic curve, and may be, for example, a straight line 404 or a polygonal line shape. The approximate characteristic 405 may be used.

また、図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 conversion characteristic 401 of FIG. 3, the dotted circle 402 indicates a portion to which the distance correction gain Gain = 1.0 is applied, and the image correction coefficient calculation unit 163 obtains the distance correction gain Gain = 1.0. This means that the image correction coefficient is not adjusted. That is, the optimal image correction coefficient is applied to the crop area obtained by the image correction coefficient calculation unit 163 as it is. On the other hand, the dotted circle 403 indicates a portion to which the distance correction gain Gain = 0.0 is applied, and the distance correction gain Gain = 0.0 indicates the image correction coefficient obtained by the image correction coefficient calculation unit 163 in the crop area. Means not applicable. In this case, an image correction coefficient that is optimal for the reference image region (“alignment destination region”) is applied. For example, the image correction coefficient that is optimal for the entire image is applied with the entire image as the “alignment destination area”. In the case of FIG. 2C, an image correction coefficient that is optimal for the entire image is applied to both the crop area 201 and the crop area 202. As a result, even when the crop area 201 and the crop area 202 are viewed side by side, the brightness and color of the portions shown in both are the same, so there is no sense of incongruity. In the above description, the entire image is referred to as the “alignment destination area”, but the image correction coefficient that is optimal in either the crop area 201 or the crop area 202 is applied to one of the crop areas. It doesn't matter. Alternatively, the average value of the crop area 201 and the crop area 202 may be used as the image correction coefficient of the “alignment destination area”. In any case, since the same image correction coefficient is applied to both the crop area 201 and the crop area 202, there is no sense of incongruity in brightness and color when viewing the crop area 201 and the crop area 202 side by side.

ここで、全体画像の中に複数(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 crop area 201 = 0.3 eV, the optimum exposure of the crop area 202 = −0.3 eV, etc. Become. Alternatively, as an example of the case where the optimum processing amount is an absolute value, in the case of the white balance gain shown in (Expression 1) or (Expression 2), the optimal white balance gain (R / G) of the entire image = 2. 2, the optimum white balance gain (R / G) = 2.1 in the crop area 201, the optimum white balance gain (R / G) = 1.8 in the crop area 202, and the like are optimum processing amounts.

また、目標となる「合わせ込み先領域」の最適処理量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 coefficient calculation unit 163 as described above, and the image correction coefficient (which is obtained by the image correction coefficient calculation unit 163 ( The white balance gain, gamma correction gain, color correction coefficient, exposure correction value (in the case of electronic shutter control) and the like may be not only absolute values but also differential values.

例えば、図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 coefficient calculation unit 163 according to the distance L between the crop areas obtained by the distance calculation unit 162. When there are a plurality of gains and coefficients such as white balance gain, gamma correction gain, color correction coefficient, and exposure correction value, different distance correction may be performed for each gain and coefficient. For example, in FIG. 3, the distance correction of the white balance gain is performed using the characteristic 401, the distance correction of the gamma correction gain is performed using the approximate characteristic 405, and the distance correction of the color correction coefficient is performed using the straight line 404. It does not matter if only one of them is correct.

また、上記で説明した距離補正部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 coefficient calculation unit 163 according to the distance (L) between the crop areas obtained by the distance calculation unit 162. Gain (L) is obtained, and an image correction coefficient adjusted with the obtained distance correction gain Gain (L) is given to the image processing unit 105. Alternatively, when the image correction coefficient is an exposure correction value, the electronic shutter of the imaging unit 102 is controlled to perform exposure correction for each crop area.

このようにして、画像処理部105はクロップ領域間の距離に応じて補正された画像補正係数でホワイトバランス処理,ガンマ補正処理,色補正処理および露出制御などを行うことができる。
[「クロップ撮影モード」の動作]
次に、操作部110の撮影モード選択ダイヤルで「クロップ撮影モード」が選択された場合の制御部109の処理について、図4のフローチャートを用いて詳しく説明する。尚、電子カメラ101の電源は投入されているものとする。
In this manner, the image processing unit 105 can perform white balance processing, gamma correction processing, color correction processing, exposure control, and the like with the image correction coefficient corrected according to the distance between the crop areas.
[Operation of “Crop shooting mode”]
Next, the processing of the control unit 109 when “Crop shooting mode” is selected with the shooting mode selection dial of the operation unit 110 will be described in detail with reference to the flowchart of FIG. It is assumed that the electronic camera 101 is turned on.

(ステップS101)制御部109は、ユーザーが操作部110の撮影モード選択ダイヤルで「クロップ撮影モード」を選択した場合に「クロップ撮影モード」の処理を開始する。この状態では、表示部108には撮影構図を決めるためのプレビュー画像が表示されている。   (Step S <b> 101) The control unit 109 starts the “crop shooting mode” process when the user selects “crop shooting mode” with the shooting mode selection dial of the operation unit 110. In this state, a preview image for determining the shooting composition is displayed on the display unit 108.

(ステップ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 control unit 109 sets a crop area from the subject images displayed on the display unit 108. Here, the setting of the crop area is performed by the area designating unit 161 of the control unit 109 as described above. The user changes the position and size of the frame indicating the crop area displayed on the display unit 108 using the cursor button of the operation unit 110, for example, the crop area 201 and the crop area 202 shown in FIG. Set the crop area as follows. The area designating unit 161 stores the set crop area in the memory 112 as the pixel coordinates of the image sensor of the imaging unit 102. For example, in the case of the crop area 201 in FIG. 2A, the coordinates of the diagonal positions of the lower left coordinates (500, 20) and the upper right coordinates (980, 400) of the area are stored as the coordinates of the crop area.

(ステップS103)制御部109は、操作部110のレリーズボタンが押下されたか否かを判別し、押下されるまで待つ。レリーズボタンが押下された場合はステップS104に進む。   (Step S103) The control unit 109 determines whether or not the release button of the operation unit 110 has been pressed, and waits until it is pressed. If the release button has been pressed, the process proceeds to step S104.

尚、ステップ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 electronic camera 101 changes, a method of automatically tracking the subject using the face recognition function of the electronic camera 101 can be considered. . For example, control is performed so that a region expanded vertically and horizontally from the face region recognized by the face recognition function is set as a crop region. In this case, the size of the crop area is changed in accordance with the size of the recognized face area, and the vertical width of the face area is 0.5 times the vertical width of the face area in the upward direction and the vertical width of the face area in the downward direction. Processing is performed so that the size of the crop area is automatically changed, such as 3.0 times and 1.0 times the left-right width of the face area in the left-right direction. As a result, the size of the crop area decreases when the face of the person set for face recognition decreases, and the size of the crop area increases when the face of the person increases, so the face recognition function automatically tracks the subject while tracking the subject. It is possible to automatically change the position and size of the crop area according to the size. Furthermore, if the direction of the head is determined from the positions of the eyes, nose, mouth, etc. of the recognized face area, the position and size of the crop area can be automatically and appropriately even when a person is shown obliquely or sideways. Can be varied.

(ステップS104)制御部109の距離算出部162は、ステップS102で設定されたクロップ領域が複数ある場合、クロップ領域間の距離(L)を測定する。   (Step S104) The distance calculation unit 162 of the control unit 109 measures the distance (L) between the crop regions when there are a plurality of crop regions set in Step S102.

尚、図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 coefficient calculation unit 163 of the control unit 109 calculates an optimal image correction coefficient for each crop region set in step S102. When the entire image is selected as the “matching area”, an image correction coefficient optimum for the entire image is also obtained. The image correction coefficient calculated in this processing step is a gamma correction gain, a white balance gain, a color correction coefficient, an exposure correction value, or the like as described above.

尚、画像補正係数が露出補正値である場合は、撮像部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 image capturing unit 102 to control the exposure amount for each designated area, and is appropriate for each crop area. Shoot with a good exposure. In this case, the release button is pressed in step S103, but the release button is pressed after step S105. At this time, the processes in steps S104 and S105 are performed during preview display. In addition, when an extremely large brightness adjustment is performed on image data (RAW data) captured in the processing buffer 104 after shooting, whiteout or blackout occurs due to lack of gradation information in the RAW data. Since there is a fear, as described above, it is preferable to control the exposure amount for each crop area by controlling the electronic shutter speed for each crop area during shooting.

(ステップS106)制御部109の距離補正部164は、ステップS105で求めた各クロップ領域に最適な画像補正係数をステップS104で求めたクロップ領域間の距離(L)に応じて補正を行い、距離補正後の画像補正係数を求める。   (Step S106) The distance correction unit 164 of the control unit 109 performs correction according to the distance (L) between the crop areas obtained in step S104, and corrects the optimum image correction coefficient for each crop area obtained in step S105. An image correction coefficient after correction is obtained.

そして、距離補正後の画像補正係数を用いて各クロップ領域の画像補正を画像処理部105で行う。或いは、画像補正係数が露出補正値である場合は撮像部102の電子シャッタを制御してクロップ領域毎の露出補正を行う。   Then, the image processing unit 105 performs image correction of each crop region using the image correction coefficient after distance correction. Alternatively, when the image correction coefficient is an exposure correction value, the electronic shutter of the imaging unit 102 is controlled to perform exposure correction for each crop area.

(ステップS107)制御部109は、ステップS106で画像処理後のクロップ領域毎の画像データをメモリカードI/F107を介してメモリカード107bに保存する。   (Step S107) The control unit 109 stores the image data for each crop area after the image processing in step S106 in the memory card 107b via the memory card I / F 107.

(ステップS108)制御部109は、一連の「クロップ撮影モード」を終了する。   (Step S <b> 108) The control unit 109 ends a series of “crop shooting modes”.

尚、上記のフローチャートでは、ステップ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 memory card 107b, but the image correction after the distance correction in step S106. In step S107, image processing using coefficients is not performed, and image processing is performed using image data before image processing (RAW data) or image correction coefficients that are not subjected to distance correction (image correction coefficients that are optimal for each crop region). You may make it preserve | save the image data which performed it to the memory card 107b. In this case, the image data of each crop area, the distance information obtained in step S104, and the optimum image correction coefficient for each crop area are stored in the memory card 107b in association with each other. For example, distance information and image correction coefficients may be stored as header information of image data of each crop area.

また、上記の説明では、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 electronic camera 101 according to the present embodiment, the followability of the image correction coefficient is set between crop regions. You may make it vary according to distance. For example, if the distance between crop areas is farther than a preset threshold value, the followability of white balance processing, color correction processing, and gradation processing parameters between successive images is slowed, and the distance between crop areas is preset. If it is closer to the threshold value, the control unit 109 may control the image processing unit 105 so as to speed up the follow-up of parameters of white balance processing, color correction processing, and gradation processing between successive images. Alternatively, the followability of the image correction coefficient may be varied continuously in succession according to the distance between the crop areas without providing a threshold value. By performing such control, when the two crop areas are close, it can be quickly converged without being affected by the history of the parameters of the previous captured image, so that it has been described in the previous embodiment. In addition to the effect, differences in image brightness, white balance, etc. between crop areas can be further reduced.

このようにして、本実施形態に係る電子カメラ101は、複数のクロップ領域間の距離に応じて各クロップ領域毎に最適な画像処理を行うことができるので、例えば日向と日陰の境界部分で複数のクロップ領域が近接している場合でも2つのクロップ領域の明るさやホワイトバランスが極端に異なることがなく、これらのクロップ領域の画像を並べて鑑賞する際に不自然な印象を与えない。   In this way, the electronic camera 101 according to the present embodiment can perform optimal image processing for each crop area in accordance with the distance between the plurality of crop areas. Even when the crop areas are close to each other, the brightness and white balance of the two crop areas are not extremely different, and an unnatural impression is not given when viewing images of these crop areas side by side.

尚、本実施形態では、本発明に係る画像処理装置および画像処理プログラムを電子カメラ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 electronic camera 101 has been described. However, when image data that has already been taken is processed by a dedicated image processing apparatus or a personal computer. The processing performed by the control unit 109 of FIG. 1 and the processing performed by the flowchart of FIG. 4 may be executed. In particular, the image data of a plurality of crop areas cut out from the same image photographed by the electronic camera 101 described in the present embodiment, distance information between the plurality of crop areas, and an optimal image for each of the plurality of crop areas. When displaying an image of crop areas at adjacent positions at a distance by providing an input unit (or an input procedure in the case of an image processing program) for inputting a memory card 107b in which image correction coefficients to be corrected are stored However, by performing the distance correction process performed in step S106 of the flowchart of FIG.

以上、本発明に係る画像処理装置および画像処理プログラムについて、実施形態で例を挙げて説明してきたが、その精神またはその主要な特徴から逸脱することなく他の多様な形で実施することができる。そのため、上述した実施形態はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。本発明は、特許請求の範囲によって示されるものであって、本発明は明細書本文にはなんら拘束されない。さらに、特許請求の範囲の均等範囲に属する変形や変更は、全て本発明の範囲内である。   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 SYMBOLS 101 ... Electronic camera 102 ... Imaging part 103 ... A / D conversion part 104 ... Processing buffer 105 ... Image processing part 106 ... System bus 107 ... Memory card I / F 108 Display unit 109 Control unit 110 Operation unit 111 Photometric sensor 112 Memory 151 White balance (WB) adjustment unit 152 Color / tone processing unit 153 ... Outline emphasis part 161 ... Area designation part 162 ... Distance calculation part 163 ... Image correction coefficient calculation part 164 ... Distance correction part

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.
請求項2または3に記載の画像処理装置において、
前記距離補正係数算出部は、画像全体の画像補正係数または前記複数のクロップ領域毎のいずれかの画像補正係数を基準として前記距離補正係数を求めることを特徴とする画像処理装置。
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.
請求項1から4のいずれか一項に記載の画像処理装置において、
前記距離算出部が求める前記複数のクロップ領域間の距離は、前記撮像部の二次元状に配置された複数画素で構成される撮像面上における前記複数のクロップ領域の中心点間の画素距離であることを特徴とする画像処理装置。
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から5のいずれか一項に記載の画像処理装置において、
前記画像補正係数は、ガンマ補正ゲイン,ホワイトバランスゲイン,色補正係数、露出補正値の少なくとも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.
請求項1から5のいずれか一項に記載の画像処理装置において、
前記画像補正係数がガンマ補正ゲイン,ホワイトバランスゲイン,色補正係数、露出補正値のいずれか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
請求項1から7のいずれか一項に記載の画像処理装置において、
時間的に連続して撮像された複数の画像の各画像毎に指定された複数のクロップ領域を切り出す場合、
前記補正係数算出部は、前記時間的に連続する画像間で前記指定された複数のクロップ領域間の距離が近づく場合に、前記時間的に連続する画像間で前記複数のクロップ領域毎の画像補正係数の追従性を高くする
ことを特徴とする画像処理装置。
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.
JP2009149980A 2009-06-24 2009-06-24 Image processing apparatus and program Withdrawn JP2011009937A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (9)

* Cited by examiner, † Cited by third party
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