JP6494388B2 - Image processing apparatus, image processing method, and program - Google Patents
Image processing apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP6494388B2 JP6494388B2 JP2015083468A JP2015083468A JP6494388B2 JP 6494388 B2 JP6494388 B2 JP 6494388B2 JP 2015083468 A JP2015083468 A JP 2015083468A JP 2015083468 A JP2015083468 A JP 2015083468A JP 6494388 B2 JP6494388 B2 JP 6494388B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- moving body
- frame image
- luminance
- frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、画像処理装置、画像処理方法、及びプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a program.
従来の技術として、異なる露光量で撮影した複数フレームの画像を合成することにより、ハイダイナミックレンジ画像を得る画像合成処理(HDR:High Dynamic Range imaging)技術が知られている。HDR技術では、各フレーム画像のなかで適正露出となっている画像領域をつなぎ合わせるような画像合成を行うことでいわゆる白飛びや黒潰れの無い画像を得ることができる。このHDR技術による画像合成処理は、動画像撮影で得られた時系列順の複数フレーム画像を合成して1フレームの画像を生成するような処理を、それら時系列順の複数フレームごとに繰り返すことにより、動画像に対しても実現可能である。 As a conventional technique, there is known an image synthesis processing (HDR: High Dynamic Range imaging) technique for obtaining a high dynamic range image by synthesizing images of a plurality of frames taken with different exposure amounts. In the HDR technology, an image without so-called whiteout or blackout can be obtained by performing image composition such that image regions that are appropriately exposed in each frame image are connected. In the image synthesis process by the HDR technology, a process of generating one frame image by synthesizing a plurality of frame images in time series obtained by moving image shooting is repeated for each of the plurality of frames in time series. Therefore, it can be realized for moving images.
ただし、動画像に対してHDRによる合成処理を行った場合、複数フレームから1フレームの画像が合成されるため、合成処理後の動画像のフレームレートは、撮像がなされた際のフレームレートよりも低下してしまう。このため、例えば被写体が移動している移動体である場合には、その移動体の画像の動きが滑らかに見えないという問題がある。これに対して、移動体画像を合成して、その被写体画像が移動によりぶれているような状態の画像を生成することにより、移動体画像の動きを滑らかに見せる手法が知られている。しかしながらこの手法では、例えば移動体画像の移動量が大きい場合には不自然な描写になってしまう。 However, when HDR is combined with a moving image, one frame image is combined from a plurality of frames, so the frame rate of the moving image after the combining processing is higher than the frame rate at the time of image capture. It will decline. For this reason, for example, when the subject is a moving body that is moving, there is a problem that the movement of the image of the moving body does not look smooth. On the other hand, there is known a method for smoothly showing the movement of the moving body image by synthesizing the moving body image and generating an image in which the subject image is blurred by the movement. However, with this method, for example, when the moving amount of the moving object image is large, the image becomes unnatural.
このようなことから、特許文献1や特許文献2に記載されているような技術が提案されている。特許文献1には、HDRによる合成処理において、合成される画像の動きベクトルを算出し、動きベクトルがある閾値よりも大きい場合は、その画素の合成を行わないようにする技術が開示されている。特許文献2には、例えば撮影感度が低い場合や、合成画像の数が少ない場合、人物が検出された場合等の条件に当てはまるときには、HDRによる合成処理を行うか否かを決める閾値を小さくする技術が開示されている。
For this reason, techniques as described in Patent Document 1 and
特許文献1に記載の技術では、移動量が小さい移動体画像に対して合成処理を行い、一方、移動量が大きい移動体画像に対しては合成処理を行わないようにしている。このため、移動量の大きい移動体画像が合成処理されることによる不自然な描写の発生は避けられる。しかしながら、移動量が小さいために合成処理されることになった移動体画像が、例えば目立つ画像であるような場合には、合成処理後の移動体画像が不自然な画像として描写されてしまうことがある。また、特許文献2に記載の技術では、様々な条件に応じて合成の仕方を変えるようになされているため、不自然な描写になることは非常に少なくなる。しかしながら、特許文献2の技術の場合も、合成されることになった移動体画像が、例えば目立つ画像であるような場合には、合成処理後の移動体画像が不自然な画像として描写されてしまうことがある。つまり、これらの技術では、合成処理後の移動体画像が不自然な画像として描写されてしまうような画質劣化が発生してしまう虞がある。
In the technique described in Patent Document 1, a composition process is performed on a moving object image with a small amount of movement, while a composition process is not performed on a moving object image with a large amount of movement. For this reason, generation | occurrence | production of the unnatural depiction by the synthetic | combination process of a moving body image with a large movement amount is avoided. However, if the moving body image that is to be combined because of the small amount of movement is a conspicuous image, for example, the moving body image after the combining process may be depicted as an unnatural image. There is. Further, in the technique described in
本発明はこのような問題点に鑑みてなされたものであり、合成処理後の移動体画像が不自然な画像として描写されてしまうような画質劣化を低減可能とする画像処理装置、画像処理方法、及びプログラムを提供することを目的とする。 The present invention has been made in view of such a problem, and an image processing apparatus and an image processing method capable of reducing image quality deterioration such that a moving body image after synthesis processing is depicted as an unnatural image. And to provide a program.
本発明の画像処理装置は、動画撮影による第1のフレーム画像と第2のフレーム画像の少なくとも二つのフレーム画像から、前記第1のフレーム画像の撮影と前記第2のフレーム画像の撮影がなされた間に被写体位置が変化した被写体画像を移動体画像として検出する移動体検出手段と、前記第1のフレーム画像と前記第2のフレーム画像から、前記第1のフレーム画像の撮影と前記第2のフレーム画像の撮影がなされた間の前記移動体画像の移動量を求める移動量検出手段と、前記移動体画像の面積を求める面積検出手段と、前記第1のフレーム画像と前記第2のフレーム画像を合成する合成手段と、前記移動体画像の前記移動量と前記面積に基づいて、前記合成手段により前記第1のフレーム画像と前記第2のフレーム画像が合成される際の、前記第1のフレーム画像の前記移動体画像と前記第2のフレーム画像の前記移動体画像との合成比率を制御する制御手段とを有することを特徴とする。 In the image processing apparatus according to the present invention, the first frame image and the second frame image are captured from at least two frame images of the first frame image and the second frame image obtained by moving image capturing. A moving body detecting unit that detects a subject image whose subject position has changed between them as a moving body image; from the first frame image and the second frame image, photographing the first frame image; and Movement amount detection means for obtaining the movement amount of the moving body image during the shooting of the frame image, area detection means for obtaining the area of the moving body image, the first frame image and the second frame image The first frame image and the second frame image are combined by the combining unit based on the moving amount and the area of the moving object image. Of, and having a control means for controlling the mixing ratio of the moving object image of the first of said moving object image and the second frame image of the frame image.
本発明によれば、移動体画像の合成処理がなされる場合に、合成処理後の移動体画像が不自然な画像として描写されてしまうような画質劣化を低減可能となる。 According to the present invention, it is possible to reduce image quality deterioration that causes a moving body image after combining processing to be depicted as an unnatural image when a moving body image is combined.
本実施形態の画像処理装置は、一例としてデジタルカメラやデジタルビデオカメラであり、特にデジタル化された動画像信号の複数フレームの画像に対し、例えばHDRによる合成処理を行って広いダイナミックレンジの動画像を生成する。本実施形態では、移動している被写体(以下、移動体とする。)に対してHDRの合成処理がなされる場合に、動画像の見え方の滑らかさを維持した上で、HDRの合成処理による広いダイナミックレンジの動画像の生成を可能としている。具体的には、本実施形態では、動画撮影の際に、適正な露出による第1のフレーム(以下、「適フレーム」とする。)画像と、アンダー露出による第2のフレーム(以下、「アンダーフレーム」とする。)画像の、二つのフレーム画像を交互に撮像する。また、本実施形態では、それら交互に撮像された二つのフレーム画像を用いてHDRの画像合成を行う際に、後述するように、移動体画像の移動量と面積と輝度を求める。そして、本実施形態では、移動体画像の移動量と面積と輝度に基づいて、移動体画像の合成比率(以下、移動体合成比率とする。)を制御する。これにより、本実施形態では、例えば移動体画像の移動量が大きい場合や移動体画像の面積が大きい場合のように、移動体画像が特に目立つ画像であったとしても、HDRの合成処理後の移動体画像が不自然な描写になってしまう画質劣化を軽減可能としている。 The image processing apparatus of the present embodiment is a digital camera or a digital video camera as an example, and in particular, a moving image having a wide dynamic range by performing, for example, HDR synthesizing on a plurality of frames of a digitized moving image signal. Is generated. In this embodiment, when HDR composition processing is performed on a moving subject (hereinafter referred to as a moving object), HDR composition processing is performed while maintaining the smoothness of the appearance of a moving image. Enables generation of moving images with a wide dynamic range. Specifically, in the present embodiment, when shooting a moving image, a first frame (hereinafter referred to as “appropriate frame”) with proper exposure and a second frame (hereinafter referred to as “under”) with underexposure. "Frame")) Two frame images of the image are taken alternately. Further, in the present embodiment, when HDR image synthesis is performed using two frame images captured alternately, the movement amount, area, and luminance of the moving body image are obtained as described later. In this embodiment, the composition ratio of the moving object image (hereinafter referred to as the moving object composition ratio) is controlled based on the moving amount, area, and luminance of the moving object image. Thereby, in this embodiment, even if the moving body image is a particularly conspicuous image, for example, when the moving amount of the moving body image is large or the area of the moving body image is large, It is possible to reduce image quality deterioration that causes the moving body image to appear unnatural.
<第1の実施形態>
図1は、第1の実施形態の画像処理装置の一例としてのカメラの構成例を示す図である。図1に示すカメラは、光学系1と、撮像素子2と、信号処理部3と、HDR処理部4と、調整処理部5と、符号化処理部6と、出力部7と、UI部8と、角速度センサ9と、バス10とを有している。
<First Embodiment>
FIG. 1 is a diagram illustrating a configuration example of a camera as an example of an image processing apparatus according to the first embodiment. The camera shown in FIG. 1 includes an optical system 1, an
図1において、アイリスやレンズ等を有する光学系1を通った光は、CMOS又はCCD等で構成される撮像素子2により光電変換される。撮像素子2での光電変換により取得された画像信号は、信号処理部3へ送られる。なお、撮像素子2は、いわゆるベイヤー配列の撮像デバイスである。UI部8は、ユーザインターフェイスのためのキーやスイッチ等と、それらキー等を介したユーザからの指示に基づいてカメラの各部に対する各種設定を行うための設定情報を生成する設定情報生成部とを有している。設定情報生成部は、ユーザの指示に基づいて、例えば動画モード又は静止画モードの選択とその選択されたモードに応じてカメラの各部を制御するための設定情報や、HDRモードの設定とそのHDRモードでカメラの各部を制御するための設定情報を生成する。また、UI部8の設定情報生成部は、ISO感度の設定やシャッタースピード、露光量の設定とそれらの設定に応じて撮影を行うための各種設定情報を生成する。UI部8で生成された各種の設定情報は、バス10を介して、光学系1、撮像素子2、信号処理部3、HDR処理部4、調整処理部5、符号化処理部6、出力部7等へ送られる。
In FIG. 1, light passing through an optical system 1 having an iris, a lens, and the like is photoelectrically converted by an
以下、動画モードとHDRモードに設定されて動画像撮影とHDRによる画像合成が行われる場合の、本実施形態のカメラにおける各処理の概要を説明する。ユーザからの指示により動画モードとHDRモードが選択された場合、UI部8は、適フレームとアンダーフレームの画像を交互に撮影してそれら両フレーム画像から1フレーム画像を合成する処理を行うための各設定情報を生成する。これら各設定情報は、前述のように光学系1や撮像素子2、信号処理部3、HDR処理部4等へ送られる。この場合の光学系1と撮像素子2では、適フレーム画像とアンダーフレーム画像が交互に撮像され、それら適フレームとアンダーフレームの画像信号が信号処理部3へ送られる。
Hereinafter, an overview of each process in the camera of the present embodiment when the moving image mode and the HDR mode are set and moving image shooting and HDR image synthesis are performed will be described. When the moving image mode and the HDR mode are selected according to an instruction from the user, the UI unit 8 performs processing for alternately capturing images of appropriate frames and underframes and synthesizing one frame image from both frame images. Each setting information is generated. These pieces of setting information are sent to the optical system 1, the
信号処理部3は、撮像素子2から供給された適フレームとアンダーフレームの画像信号に対し、A/D変換とゲインコントロール等の各処理を行い、それら処理後の画像データをHDR処理部4へ出力する。また、角速度センサ9は、カメラの角速度を検出し、その検出した角速度値を、バス10を介してHDR処理部4へ出力する。
The signal processing unit 3 performs various processes such as A / D conversion and gain control on the appropriate frame and underframe image signals supplied from the
HDR処理部4は、信号処理部3から供給された適フレームとアンダーフレームの画像データと、角速度センサ9から供給された角速度値のデータとを用いて、後述するようなHDRの画像合成処理を実行する。そして、HDR処理部4は、その合成処理後の画像信号を、調整処理部5へ出力する。なお、HDR処理部4の構成と合成処理については後に詳しく説明する。
The
調整処理部5は、HDR処理部4による合成処理後の画像データに対して、輝度のゲイン調整やリサイズ等の各種調整処理を行い、その調整処理後の画像データを、符号化処理部6へ送る。符号化処理部6は、調整処理部5での調整処理後の画像データを符号化し、その符号化処理後のデータを出力部7へ送る。出力部7は、符号化処理後の画像データを例えばHDMI(高精細度マルチメディアインターフェイス)(HDMIは登録商標)などへ出力、メモリカードなどの記憶メディアへ保存、カメラのいわゆる背面液晶などの表示デバイスへ表示させる等の出力処理を行う。
The adjustment processing unit 5 performs various adjustment processing such as luminance gain adjustment and resizing on the image data after the synthesis processing by the
図2は、図1のカメラのHDR処理部4の構成例を示す図である。図2に示すHDR処理部4は、入力端子401,402,403と、現像部404,405と、輝度合成比率算出部406と、動きベクトル算出部407と、背景分離部408と、位置合わせ部409とを有している。また、HDR処理部4は、面積算出部410と、移動量算出部411と、輝度算出部412と、移動体合成比率算出部413と、合成部414と、出力端子415とを有している。
FIG. 2 is a diagram illustrating a configuration example of the
図2において、入力端子402には信号処理部3から供給された適フレームの画像データが入力され、入力端子403には信号処理部3から供給されたアンダーフレームの画像データが入力される。入力端子402に入力された適フレームの画像データは現像部404へ送られ、入力端子403に入力されたアンダーフレームの画像データは現像部405へ送られる。また、入力端子401には図1の角速度センサ9にて検出された角速度値のデータが入力されて背景分離部408へ送られる。
In FIG. 2, the appropriate frame image data supplied from the signal processing unit 3 is input to the
現像部404は、適フレームの画像データに対する現像処理を行い、その現像処理後の適フレームの画像データを、輝度合成比率算出部406と動きベクトル算出部407へ出力する。なお、現像処理とは、撮像素子2で撮像された生の画像(RAW画像)をデベイヤー処理して輝度と色差から成る信号に変換し、それら輝度と色差の信号に対してノイズ除去や光学的な歪補正、画像の適正化などを行う処理である。現像部405は、アンダーフレームの画像データに対する現像処理を行い、その現像処理後のアンダーフレームの画像データを、輝度合成比率算出部406と動きベクトル算出部407へ出力する。現像部404,405の詳細は後述する。
The
輝度合成比率算出部406は、現像処理後のアンダーフレームの画像の輝度を基に、現像処理後の適フレームと現像処理後のアンダーフレームの二つのフレーム画像間における輝度合成比率を算出する。そして、輝度合成比率算出部406は、算出した輝度合成比率の情報を合成部414へ送る。輝度合成比率算出部406による輝度合成比率の算出処理の詳細は後述する。
The luminance composition
動きベクトル算出部407は、移動体検出手段の一例であり、現像処理後の適フレームの画像を基準として、現像処理後の適フレームと現像処理後のアンダーフレームの二つのフレーム画像間で動きベクトルを算出する。すなわち、動きベクトル算出部407は、適フレーム画像の撮影とアンダーフレーム画像の撮影がなされた間に被写体位置が変化した被写体画像を移動体画像として検出するための動きベクトルを算出する。そして、動きベクトル算出部407は、その動きベクトルの情報と現像処理後の適フレームの画像データと現像処理後のアンダーフレームの画像データを、面積算出部410と移動量算出部411と輝度算出部412と背景分離部408へ送る。動きベクトル算出部407による動きベクトル算出処理の詳細は後述する。
The motion
背景分離部408は、現像処理後の適フレーム及び現像処理後のアンダーフレームの画像データと角速度値と動きベクトルとに基づいて、それら適フレーム画像とアンダーフレーム画像から背景画像と移動体画像とを分離する。そして、背景分離部408は、現像処理後の適フレーム及び現像処理後のアンダーフレームの画像データと、分離した背景画像と移動体画像に対応した動きベクトルの情報とを、位置合わせ部409へ送る。背景分離部408における背景分離処理の詳細は後述する。
Based on the image data, the angular velocity value, and the motion vector of the appropriate frame after the development process and the under frame after the development process, the
位置合わせ部409は、背景画像の動きベクトルに基づいて、現像処理後のアンダーフレーム画像に対して、現像処理後の適フレーム画像の位置を合わせる位置合わせ処理を行う。そして、位置合わせ部409は、現像処理後のアンダーフレームの画像データと位置合わせ処理後の適フレームの画像データと移動体画像の動きベクトルの情報を、面積算出部410と移動量算出部411と輝度算出部412へ送る。また、位置合わせ部409は、位置合わせ処理後の適フレームの画像データと現像処理後のアンダーフレームの画像データを、合成部414へ送る。位置合わせ部409による位置合わせ処理の詳細は後述する。
The
面積算出部410は、面積検出手段の一例であり、現像処理後のアンダーフレームの画像データと位置合わせ処理後の適フレームの画像データと移動体画像の動きベクトルとに基づいて、移動体画像の面積を算出する。そして、面積算出部410は、移動体画像の面積の情報を、移動体合成比率算出部413へ送る。面積算出部410による面積算出処理の詳細は後述する。
The
移動量算出部411は、移動量検出手段の一例であり、現像処理後のアンダーフレームの画像データと位置合わせ処理後の適フレームの画像データと移動体画像の動きベクトルとに基づいて、移動体画像の移動量を算出する。すなわち、移動量算出部411は、適フレーム画像の撮影とアンダー画像の撮影がなされた間の移動体画像の移動量を求める。そして、移動量算出部411は、移動体画像の移動量の情報と現像処理後のアンダーフレームの画像データと位置合わせ処理後の適フレームの画像データとを、移動体合成比率算出部413へ送る。移動量算出部411による移動量算出処理の詳細は後述する。
The movement
輝度算出部412は、輝度検出手段の一例であり、現像処理後のアンダーフレームの画像データと、位置合わせ処理後の適フレームの画像データと、移動体画像の動きベクトルとに基づいて、移動体画像の輝度を算出する。そして、輝度算出部412は、移動体画像の輝度の情報を、移動体合成比率算出部413へ送る。輝度算出部412による輝度算出処理の詳細は後述する。
The
移動体合成比率算出部413は、現像処理後のアンダーフレームの画像データと位置合わせ処理後の適フレームの画像データと移動体画像の面積と移動量と輝度とに基づいて、各移動体画像に対する合成比率(移動体合成比率)を算出する。すなわち、移動体合成比率算出部413は、移動体画像の移動量と面積と輝度に基づいて、適フレーム画像の移動体画像とアンダーのフレーム画像の移動体画像との合成比率を制御する制御手段の一例である。そして、移動体合成比率算出部413は、移動体合成比率の情報を合成部414へ送る。移動体合成比率算出部413による移動体合成比率算出処理の詳細は後述する。
The moving object composition
合成部414は、輝度合成比率と位置合わせ処理後の適フレームの画像データと現像処理後のアンダーフレームの画像データと各移動体合成比率の情報とに基づいて、位置合わせ処理後の適フレームの画像と現像処理後のアンダーフレームの画像とを合成する。そして、合成部414にて合成処理された後のフレーム画像データは、出力端子415を介して図1の調整処理部5へ送られる。合成部414による画像合成処理の詳細は後述する。
Based on the luminance composition ratio, the image data of the appropriate frame after the alignment process, the image data of the underframe after the development process, and the information of each moving object composition ratio, the combining
以下、HDR処理部4における合成処理について、さらに詳しく説明する。入力端子402には、適フレームの画像データが、フレームごとに順次入力される。また、入力端子403には、アンダーフレームの画像データが、フレームごとに順次入力される。すなわちこのときの撮像素子2では、図3に示すように、適フレーム351r,アンダーフレーム351u,適フレーム352r,アンダーフレーム352u,・・・のように、適フレームとアンダーフレームの撮像が交互に行われている。そして、適フレーム351r,352r,353r,354r,・・・の画像データが入力端子402に順次入力され、アンダーフレーム351u,352u,353u,354u,・・・の画像データが入力端子403に順次入力されている。なお、本実施形態では、説明を簡単にするために、適フレーム画像とアンダーフレーム画像の露光量の差を、例えばISO感度の2段分に相当する差とし、適フレームとアンダーフレームの順に撮像がなされているものとしている。もちろん、これら露光量の差等は一例である。また図3では、適フレームとアンダーフレームの組み合わせは、適フレーム351rとアンダーフレーム351u、適フレーム352rとアンダーフレーム352u、・・・のような2フレームずつの組み合わせになっているが、これ以外の組み合わせでもよい。
Hereinafter, the synthesizing process in the
現像部404では適フレームの画像データに対する現像処理が行われ、現像部405ではアンダーフレームの画像データに対する現像処理が行われる。図4(a)には現像部404の構成例を示し、図4(b)には現像部405の構成例を示す。図4(a)に示す現像部404は、ホワイトバランス部4041、NR処理部4042、色補間部4043、マトリクス変換部4044、ガンマ変換部4045、色調整部4046を有している。また、図4(b)に示す現像部405は、ホワイトバランス部4051、NR処理部4052、色補間部4053、マトリクス変換部4054、ガンマ変換部4055、色調整部4056を有している。なお、これら図4(a)の現像部404と図4(b)の現像部405は、殆どの部分が同じ構成となされているため、それら同じ構成については、図4(a)の現像部404の構成例についてのみ説明する。
The developing
ホワイトバランス部4041は、いわゆるホワイトバランスを調整する処理を行う。具体的には、ホワイトバランス部4041は、白くあるべき画像のR,G,Bの各色信号の値が同じ値になるようなゲインを、R,G,Bの各色信号に各々にかけるようなホワイトバランス調整処理を行う。NR処理部4042は、入力された画像内で、被写体や背景の画像等に由来しない、センサ(撮像素子2)等に起因するノイズ等を低減するノイズリダクション処理を行う。色補間部4043は、ベイヤー配列の撮像素子2によるR,G,Bの色モザイク画像を補間することによって、全ての画素においてR,G,Bの色信号が揃ったカラー画像を生成する。色補間部4043で生成されたカラー画像は、マトリクス変換部4044にてR,G,BからY,U,Vへの変換がなされ、さらにガンマ変換部4045にて階調補正が行われて基本的なカラー画像に変換される。その後、色調整部4046は、画像の見栄えを改善するための色調整処理として、例えば、彩度強調、色相補正、エッジ強調といった画像補正を、カラー画像に対して施す。
The
ここで、HDRによる画像合成が行われる場合、異なる露出で撮影した画像データが使用されるため、画像データには予めゲインをかけて輝度レベルを揃えておく必要がある。ゲインの値は、いわゆる白飛びや黒潰れにならない値に設定する必要があるため、一律なゲインの値ではなく、例えば図5に示すようなガンマカーブに対応した値が用いられる。図5において、図中実線で示すガンマカーブ501は、適フレーム用のガンマカーブの一例を示し、図中点線で示すガンマカーブ502は、アンダーフレーム用のガンマカーブの一例を示している。適フレームの画像に対しては、ガンマ変換部4045が図5のガンマカーブ501によるガンマ変換処理を行い、アンダーフレームの画像に対しては、ガンマ変換部4055が図5のガンマカーブ502によるガンマ変換処理を行う。図5に示すガンマ特性をみてわかるように、アンダーフレームの画像に対しては、適フレームの画像よりも大きいゲインがかけられることになるため、現像処理後のアンダーフレームの画像はノイズが増大することが懸念される。そこで、アンダーフレーム用の現像部405のNR処理部4052は、適フレーム用の現像部404のNR処理部4042よりも強いノイズリダクション(NR)処理をかける。これにより、現像処理後の適フレーム画像と現像処理後のアンダーフレーム画像のノイズ量が揃えられる。この処理により、適フレーム画像とアンダーフレーム画像の違いによる、HDRの画像合成処理後のフレーム画像の違和感が低減されることになる。ノイズ低減の具体的な手法としては、適当なカーネルサイズにおける平滑化処理などの一般的なノイズ低減手法や、εフィルタやエッジ保存型のバイラテラルフィルタといった公知のフィルタによるノイズ低減手法など様々な手法が考えられる。それらのノイズ低減手法は公知であるためここではそれらの説明は省略する。それらノイズ低減手法の何れを用いるかについては、カメラの処理速度やメモリといったリソースとのバランスを考慮して適宜適切な手法を選択すればよい。
Here, when image composition by HDR is performed, image data captured at different exposures are used, and thus it is necessary to apply a gain to the image data in advance to make the luminance level uniform. Since the gain value needs to be set to a value that does not cause so-called whiteout or blackout, for example, a value corresponding to a gamma curve as shown in FIG. 5 is used instead of a uniform gain value. In FIG. 5, a
なお、本実施形態では、二つの現像部404,405を有する例を挙げた、各現像部404,405の構成は同じであるため、現像部を一つのみとし、現像に用いるパラメータを、適フレームとアンダーフレームの画像入力に応じて切り替えるようにしてもよい。
In this embodiment, the configuration of each developing
図2に説明を戻し、輝度合成比率算出部406は、アンダーフレーム画像の各画像領域の輝度に応じて、それぞれ画像領域ごとの輝度合成比率を算出する。なお、輝度合成比率算出部406が輝度合成比率を算出する際の各画像領域は、フレーム画像を複数分割した各画像領域であり、例えば動きベクトル検出の際の後述するブロック画像に対応した画像領域でもよいし、それとは異なる画像領域でもよい。本実施形態では、説明を簡略にするために、輝度合成比率算出部406が輝度合成比率を算出する際の各画像領域は、後述するブロック画像に対応した画像領域であるとする。
Returning to FIG. 2, the luminance composition
図6には、輝度合成比率算出部406が、アンダーフレームの画像領域の輝度に応じて輝度合成比率を算出する際に参照する、輝度と輝度合成比率の関係を示すグラフの一例である。本実施形態のようにHDRの合成画像が生成される場合、図6に示すように、輝度合成比率算出部406は、輝度合成閾値Y1より暗い画像領域については適フレームの画像領域を使用する。一方、輝度合成比率算出部406は、輝度合成閾値Y2より明るい画像領域についてはアンダーフレームの画像領域を使用する。また、輝度合成比率算出部406は、輝度合成閾値Y1〜Y2の明るさの画像領域については、その画像領域の輝度に応じて、適フレームの画像領域とアンダーフレームの画像領域の輝度合成比率を徐々に変化させる。すなわち、輝度合成閾値Y1〜Y2の明るさの画像領域に関しては、輝度合成比率算出部406は、画像領域の明るさが輝度合成閾値Y1に近くなるほど、適フレームの画像領域の割合が多くなる輝度合成比率を生成する。逆に、輝度合成比率算出部406は、画像領域の明るさが輝度合成閾値Y2に近くなるほど、アンダーフレームの画像領域の割合が多くなる輝度合成比率を生成する。これにより、輝度合成閾値Y1〜Y2の明るさの画像領域では、適フレームの画像領域とアンダーフレームの画像領域の合成による画像の明るさの切り替わりが滑らかになる。
FIG. 6 is an example of a graph showing the relationship between the luminance and the luminance synthesis ratio, which is referred to when the luminance synthesis
図2の動きベクトル算出部407は、現像処理後の適フレームと現像処理後のアンダーフレームの画像間で、移動体画像の動きベクトルを算出する。動きベクトル算出部407は、先ず、現像処理後の適フレーム画像と現像処理後のアンダーフレーム画像を、それぞれ複数個のブロック画像に分割して、それらブロック画像ごとにエッジ検出処理を行う。エッジ検出の手法としては、例えば、入力画像にローパスフィルタをかけることで暈け量が大きい画像を作成して、入力画像から暈け量の大きい画像を減算することでエッジを検出するような手法を用いることができる。他のエッジ検出の手法としては、例えば、公知の微分フィルタやプリューウィットフィルタなどを用いてエッジを検出する手法を用いてもよい。これらのエッジ検出によれば、センサ起因のノイズではなく、被写体像のエッジのみを検出して動きベクトル検出精度の向上を図ることができる。次に、動きベクトル算出部407は、前述したように現像処理後の適フレーム画像と現像処理後のアンダーフレーム画像のなかでエッジ検出ができたブロック画像に関して動きベクトル検出処理を行う。このように、動きベクトル算出部407は、エッジ検出ができたブロック画像に対してのみ動きベクトル検出を行うことで、動きベクトル検出精度を向上させている。
The motion
以下、図7(a)と図7(b)を参照して、動きベクトル算出部407における動きベクトル検出処理の詳細を説明する。なお、図7(a)と図7(b)中のP1〜P9はそれぞれ画素値を表している。動きベクトル算出部407は、先ず、動きベクトル検出の位置基準画像を、図7(a)に示すような現像処理後の適フレーム画像内でエッジ検出されたブロック画像701とする。また、動きベクトル算出部407は、現像処理後のアンダーフレーム画像のなかでエッジ検出された複数のブロック画像を含む画像部分を、位置基準画像(ブロック画像701)に対する動きベクトル検出対象画像702とする。次に、動きベクトル算出部407は、位置基準画像であるブロック画像701のなかの各画素と、動きベクトル検出対象画像702に含まれるブロック画像のなかの各画素との間の差分の絶対値を求め、それら各画素の差分絶対値の総和を求める。動きベクトル算出部407は、位置基準画像のブロック画像701に対して差分絶対値の総和を求める処理を、動きベクトル検出対象画像702内で座標位置を一画素分ごとに順次ずらしながら設定される各ブロック画像に対して行う。そして、動きベクトル算出部407は、動きベクトル検出対象画像702のなかで、前述のように座標位置を一画素分ごとに順次ずらしながら求めた総和が、最も小さくなるブロック画像703を求める。図7(b)は、動きベクトル検出対象画像702の左上端の座標を(x0,y0)とした場合において、前述の総和が最も小さくなるブロック画像703の左上端の座標が(x1,y2)である例が示されている。すなわち、動きベクトル算出部407は、動きベクトル検出対象画像702のなかの座標(x1,y2)に対応したブロック画像703を、図7(a)の位置基準画像のブロック画像701に対応したブロック画像として検出する。そして、動きベクトル算出部407は、適フレーム画像内の位置基準画像のブロック画像701の座標と、アンダーフレーム画像内の動きベクトル検出対象画像702のなかのブロック画像703の座標とから、動きベクトルを求める。すなわち、動きベクトル算出部407は、適フレーム画像内のブロック画像701の座標に対する、アンダーフレーム画像内のブロック画像703の座標の差分で表される方向と距離を、動きベクトルとして算出する。
Hereinafter, the details of the motion vector detection process in the motion
図2の背景分離部408は、前述のようにして動きベクトル算出部407で算出された動きベクトルの情報と、入力端子401を介して角速度センサ9から供給された角速度の情報とに基づいて、移動体画像と背景画像とを分離する。以下、図8と図9を参照しながら、背景分離部408で行われる分離処理の詳細を説明する。
The
図8は、カメラをカメラ位置1101aからカメラ位置1101bへパンニングしたときに、カメラの撮像素子2の撮像面上で、背景画像がどのように移動するかを模式的に表した図である。なお、撮像素子2は実際にはカメラに内蔵されているが、図8では説明を判り易くするために、カメラと撮像素子2を分けて図示している。図8に示すように、カメラを位置1101aから位置1101bへパンニングして、静止している被写体1103を撮影した場合、撮像素子2の撮像面上に結像される被写体画像は、画像位置1104から画像位置1105まで移動することになる。ここで、静止している被写体1103とはすなわち背景であり、撮像素子2の撮像面上における背景画像の移動量1106は、パンニングによるカメラの移動角度1107と光学系1の焦点距離f(mm)とから算出できる。また、移動角度1107は、角速度センサ9で検出されたカメラの角速度ω(角度/秒)と、フレームレートfps(フレーム/秒)、移動量算出のためにサンプリングするフレーム画像間にある画像数n(フレーム数)を用いて算出することができる。そして、画素ピッチpp(mm/ピクセル数)を用いて、背景画像の移動量1106をピクセル数に換算することにより、撮像素子2の撮像面上で背景画像がどのくらい移動しているかを算出することができる。背景分離部408は、撮像素子2の撮像面上における背景画像の移動量を、式(1)により算出している。
FIG. 8 is a diagram schematically illustrating how the background image moves on the imaging surface of the
図9は、背景分離部408が移動体画像と背景画像を分離する際に、動きベクトルをどのように用いるかを説明するための図である。図9の横軸は動きベクトルの大きさを示し、縦軸は同じ大きさを持つ動きベクトルの数量を示している。図9の横軸は、「0」を境に、動きベクトルの方向を区別している。また、式(1)により算出された背景画像の移動量(図8の移動量1106)は、図9では、移動量1201として示されている。この図9の例では、同じ大きさを持つ動きベクトルの集団として、ベクトル集団1211〜1214があり、ベクトル集団1214が式(1)で算出された背景画像の移動量1201に対応した動きベクトルの集団である。一方、ベクトル集団1211〜1213は、背景画像の移動量1201に対応したベクトル集団1214とは異なる大きさの動きベクトル集団である。すなわち、ベクトル集団1211〜1213の各動きベクトルは、背景画像の移動量1201に対応したベクトル集団1214とは異なる画像部分の動きベクトル、言い換えると、移動体画像の各動きベクトルであると考えられる。したがって、背景分離部408は、動きベクトルと背景画像の移動量との関係から、動きベクトル算出部407から供給された動きベクトルを、移動体画像に対応したグループ1202と背景画像に対応したグループ1203とに分離可能となる。
FIG. 9 is a diagram for explaining how the motion vector is used when the
図2の位置合わせ部409は、背景分離部408により分離された背景画像に対応したグループ1203に含まれる動きベクトルを用いて、いわゆるアフィン係数を算出する。アフィン係数とは、線形変換と平行移動を組み合わせたアフィン変換に用いる行列であり、以下の式(2)で表すことができる。なお、式(2)は公知の式であるため、詳細な説明は省略する。
The
式(2)において、アフィン変換による補正前画像の座標が(x,y)であり、アフィン変換による補正後画像の座標が(x´,y´)であり、この式(2)中の3×3行列がアフィン係数である。位置合わせ部409は、前述の動きベクトル算出部407が各ブロック画像から算出した動きベクトルを用いてアフィン係数を算出する。そして、位置合わせ部409は、補正前画像を現像処理後の適フレーム画像とし、現像処理後のアンダーフレーム画像に対してアフィン係数を算出して、そのアフィン係数を用いて、適フレーム画像のアフィン変換を行う。これにより、位置合わせ部409は、適フレーム画像の背景画像を、アンダーフレーム画像の背景画像に対して位置合わせすることができる。
In equation (2), the coordinates of the image before correction by affine transformation are (x, y), and the coordinates of the image after correction by affine transformation are (x ′, y ′), and 3 in this equation (2) A x3 matrix is an affine coefficient. The
図2の面積算出部410は、移動体に対応したグループ1202の動きベクトルと、背景画像の位置合わせがなされた後の適フレーム画像と、現像処理後のアンダーフレーム画像とを基に、移動体画像の面積を算出する。以下、図10、図11、図12(a)〜図12(d)を参照しながら、面積算出部410で行われる面積算出処理の詳細を説明する。
The
図10は、前述の図9に示した移動被写体に対応したグループ1202に含まれる各動きベクトル集団1211〜1213を示した図である。図10の横軸は動きベクトルの大きさを示し、縦軸は同じ大きさを持つ動きベクトルの数量を示している。ここで、例えば動きベクトル集団1211を例に挙げた場合、この動きベクトル集団1211内のそれぞれ同じ大きさの複数の動きベクトルは、或る移動体画像を構成している複数のブロック画像の各動きベクトルである可能性が高いと考えられる。一方、動きベクトル集団1211内の各動きベクトルは、それらの大きさが同じであったとしても、異なる移動体画像の動きベクトルである可能性もある。したがって、同じ大きさの複数の動きベクトルがある場合、それら各動きベクトルが、同じ移動体画像の動きベクトルであるか否かを判定する必要がある。
FIG. 10 is a diagram showing
図11と図12(a)〜図12(d)は、或るフレーム画像上にそれぞれ異なる移動体画像が存在している場合において、それら移動体画像を構成している各ブロック画像に対応した各動きベクトルの配置例を示している。すなわち、図中の小四角形領域は、それぞれが前述のブロック画像に対応した動きベクトルのブロック(以下、MVブロック1100とする。)を表している。また、図中斜線が描かれた複数のMVブロック1100がそれぞれ纏まったエリア(以下、MVエリア1101,1102,1103とする。)は、それぞれ異なる移動体画像に対応したMVブロックが纏まったエリアであるとする。そして、これら各MVエリア1101〜1103の各MVブロックの動きベクトルは、それぞれが同じ大きさであるとする。すなわち、各MVエリア1101〜1103の各MVブロックの動きベクトルは、それぞれ同じ大きさであるため、前述の図10では例えば一つの動きベクトル集団1211に含まれているとする。
FIGS. 11 and 12 (a) to 12 (d) correspond to each block image constituting the moving body image when different moving body images exist on a certain frame image. An arrangement example of each motion vector is shown. In other words, each small square area in the drawing represents a motion vector block (hereinafter referred to as an MV block 1100) corresponding to the block image. In addition, areas in which a plurality of
図12(a)〜図12(d)は、面積算出部410が、図11に示した各MVブロック1100の動きベクトルを、それぞれの何れかのMVエリア1101,1102,1103に分類する過程を説明するための図である。先ず、面積算出部410は、図12(b)に示すように、或るMVブロックを、何れのMVエリアに含まれるかを判定する際の対象MVブロックA1とする。次に、面積算出部410は、図12(b)に示すように、対象MVブロックA1に隣接する8方向の各MVブロックの動きベクトルが、対象MVブロックA1の動きベクトルと略々同じ(方向と大きさが略々同じ動きベクトル)であるか否かを判定する。なお、8方向とは、図12(b)中の矢印で示すように、対象MVブロックA1に対して上、下、左、右、斜め左上、斜め右上、斜め左下、斜め右下の各方向のことである。面積算出部410は、対象MVブロックA1の動きベクトルと略々同じ動きベクトルの隣接MVブロックがあった場合、その隣接MVブロックは対象MVブロックA1と同じMVエリアに含まれるMVブロックA1であると判定する。さらに、面積算出部410は、前述のように対象MVブロックA1と略々同じ動きベクトルのMVブロックであると判定された隣接MVブロックを、新たな対象MVブロックA1として設定し、図12(c)に示すように前述同様の処理を繰り返す。これにより、面積算出部410は、対象MVブロックA1と略々同じ動きベクトルの各隣接MVブロックからなるMVエリアが、同じ移動体画像に対応していると判定できる。図12(d)は、図12(a)の各MVエリア1101〜1103が、MVブロックA1とMVブロックA2とMVブロックA3の動きベクトルごとに分類された後の例を示している。そして、面積算出部410は、前述のようにしてMVブロックA1,A2,A3の動きベクトルごとに分類された各MVエリア1101,1102,1103において、それぞれMVブロックA1,A2,A3の個数を求める。また、これら各MVエリア1101,1102,1103における各MVブロックA1,A2,A3は、それぞれが前述のブロック画像に対応している。このため、面積算出部410は、各MVブロックA1,A2,A3の個数つまりブロック画像の個数N_A1,N_A2,N_A3から、各MVエリア1101〜1103に対応した移動体画像の面積を求めることができる。
12A to 12D show a process in which the
図2の移動量算出部411は、移動体画像の動きベクトルと、位置合わせ処理後の適フレーム画像と、現像処理後のアンダーフレーム画像とを基に、移動体画像の移動量を算出する。以下、図12(d)に示した各MVエリア1101〜1103の各MVブロックA1〜A3の動きベクトルを例に挙げて説明する。移動量算出部411は、各MVブロックA1の動きベクトルの大きさの平均値M_A1と、各MVブロックA2の動きベクトルの大きさの平均値M_A2と、各MVブロックA3の動きベクトルの大きさの平均値M_A3を算出する。そして、移動量算出部411は、MVブロックA1の動きベクトルの大きさの平均値M_A1を、MVエリア1101に対応した移動体画像の移動量とする。同様に、移動量算出部411は、MVブロックA2の平均値M_A2をMVエリア1102に対応した移動体画像の移動量とし、MVブロックA3の平均値M_A3をMVエリア1103に対応した移動体画像の移動量とする。
The movement
図2の輝度算出部412は、移動体画像の動きベクトルと、位置合わせ処理後の適フレーム画像と、現像処理後のアンダーフレーム画像とを基に、移動体画像の輝度を算出する。以下、図12(d)に示した各MVエリア1101〜1103の各MVブロックA1〜A3に対応したブロック画像の輝度を例に挙げて説明する。輝度算出部412は、各MVブロックA1に対応したブロック画像の輝度の平均値K_A1と、各MVブロックA2に対応したブロック画像の輝度の平均値K_A2と、各MVブロックA3に対応したブロック画像の輝度の平均値K_A3を算出する。そして、輝度算出部412は、各MVブロックA1に対応した各ブロック画像の各輝度の平均値K_A1を、MVエリア1101に対応した移動体画像の輝度とする。また、輝度算出部412は、各MVブロックA2に対応した各ブロック画像の各輝度の平均値K_A2をMVエリア1102に対応した移動体画像の輝度とする。同様に、輝度算出部412は、各MVブロックA3に対応した各ブロック画像の各輝度の平均値K_A3をMVエリア1103に対応した移動体画像の輝度とする。
The
図2の移動体合成比率算出部413は、位置合わせ処理後の適フレーム画像と、現像処理後のアンダーフレーム画像と、移動体画像の面積と移動量と輝度の情報とに基づいて、移動体合成比率を算出する。図13は、移動体画像に対して移動体合成比率を適用する画像上の範囲を示している。図13の例の場合、移動体画像に対して移動体合成比率が適用される画像上の範囲は、図中の網掛けで示された画像範囲1301,1302,1303である。画像範囲1301は、位置合わせ処理後の適フレームの移動体画像の各ブロック画像において、動きベクトルに対応した移動前のブロック画像と移動後のブロック画像、さらにそれら移動前後の両ブロック画像を線形に繋げることで生成される領域からなる。画像範囲1302、1303についても、画像範囲1301と同様にして生成される。移動体合成比率算出部413は、これらの画像範囲1301〜1303を、移動体合成比率が適用される画像上の範囲とする。
The moving body composition
次に、移動体合成比率算出部413は、移動体合成比率を算出するための評価値を算出する。本実施形態において、評価値は、移動体画像の移動量と面積の大きさを評価するための値となっている。前述のMVブロックA1,A2,A3を例に挙げると、移動体合成比率算出部413は、前述の個数N_A1,N_A2,N_A3と平均値M_A2,M_A3,M_A3を用いた式(3)により、それぞれの評価値E_A1,E_A2,E_A3を算出する。
Next, the mobile body composition
E_A1=N_A1×M_A1
E_A2=N_A2×M_A2 ・・・式(3)
E_A3=N_A3×M_A3
E_A1 = N_A1 × M_A1
E_A2 = N_A2 × M_A2 (3)
E_A3 = N_A3 × M_A3
図14は、評価値E_A1,E_A2,E_A3を一般化した評価値を「E」とした場合の、評価値Eと、位置合わせ処理後の適フレーム画像と現像処理後のアンダーフレーム画像の移動体画像における合成量Tとの関係を示す図である。図14のグラフは、横軸が評価値E、縦軸が合成量Tを示しており、第1の評価閾値として「E1」が設定され、第2の評価閾値として[E2]が設定されている。この図14のグラフによれば、評価値Eが「0」から「E1」までの範囲つまり評価値Eが第1の評価閾値以下(E1以下)の場合には合成量Tは第1の合成量である「0.5」で一定となされている。また、評価値Eが「E2」以上つまり第2の評価閾値以上の場合には、合成量Tは「0.5」より小さく「0」より大きい第2の合成量で一定となされている。一方、評価値Eが「E1」から「E2」までの範囲では評価値Eが大きくなるにつれて合成量Tは小さくなる。すなわち、図14の例においては、「E1」から「E2」までの範囲では、評価値Eが大きくなるにつれて適フレーム画像の移動体画像とアンダーフレーム画像の移動体画像における合成量Tが少なくなるように設定されている。ただし、ここで算出した合成量Tの値は、以下のような第1,第2の二通りの合成の割合パターンが考えられる。 FIG. 14 shows a moving body of the evaluation value E, the appropriate frame image after the alignment process, and the underframe image after the development process when the evaluation value obtained by generalizing the evaluation values E_A1, E_A2, and E_A3 is “E”. It is a figure which shows the relationship with the synthetic | combination amount T in an image. In the graph of FIG. 14, the horizontal axis indicates the evaluation value E, and the vertical axis indicates the composite amount T. “E1” is set as the first evaluation threshold, and [E2] is set as the second evaluation threshold. Yes. According to the graph of FIG. 14, when the evaluation value E is in the range from “0” to “E1”, that is, when the evaluation value E is less than or equal to the first evaluation threshold (E1 or less), the composition amount T is the first composition. The quantity is fixed at “0.5”. When the evaluation value E is equal to or greater than “E2”, that is, equal to or greater than the second evaluation threshold, the composite amount T is constant at a second composite amount that is smaller than “0.5” and larger than “0”. On the other hand, when the evaluation value E is in the range from “E1” to “E2”, the composite amount T decreases as the evaluation value E increases. That is, in the example of FIG. 14, in the range from “E1” to “E2”, the amount of synthesis T in the moving body image of the appropriate frame image and the moving body image of the underframe image decreases as the evaluation value E increases. Is set to However, the value of the synthesis amount T calculated here may be the following first and second synthesis ratio patterns.
第1の割合パターン→適フレーム画像:T、アンダーフレーム画像:1−T
第2の割合パターン→適フレーム画像:1−T、アンダーフレーム画像:T
First ratio pattern → appropriate frame image: T, underframe image: 1-T
Second ratio pattern → appropriate frame image: 1-T, underframe image: T
すなわち、適フレーム画像とアンダーフレーム画像の何れを基準にするかにより、第1の割合パターンと第2の割合パターンとで合成量Tの用い方が異なる。本実施形態の場合、移動体合成比率算出部413は、適フレーム画像の移動体画像の輝度とアンダーフレーム画像の移動体画像の輝度に基づいて、適フレーム画像の移動体画像を基準とした移動体合成比率を決定する。具体的には、移動体合成比率算出部413は、適フレーム画像の移動体画像の輝度とアンダーフレーム画像の移動体画像の輝度から、適フレーム画像の使用係数qを求め、その使用係数qと各ブロック画像の合成量Tとを基に最終的な移動体合成比率を算出する。以下、例えばMVブロックA1,A2,A3に対応した合成量T_A1,T_A2,T_A3と、適フレーム画像の使用係数q_A1,q_A2,q_A3を一般化した使用係数qとを用いて説明する。
That is, how to use the composite amount T differs between the first ratio pattern and the second ratio pattern depending on which of the appropriate frame image and the underframe image is used as a reference. In the case of the present embodiment, the moving body composition
図15は、移動体画像のMVブロックA1,A2,A3に対応する各ブロック画像の平均輝度の大きさK_A1,K_A2,K_A3を一般化した平均輝度Kと、適フレーム画像の使用係数qとの関係を示すグラフである。この図15のグラフは、横軸が移動体画像の平均輝度K、縦軸が適フレーム画像の使用係数qを示し、第1の輝度閾値として「K1」、第2の輝度閾値として「K2」が設定されている。この図15のグラフによれば、平均輝度Kが「0」から「K1」の範囲つまり第1の輝度閾値以下(「K1」以下)の場合には、適フレーム画像を基準とする割合が大きくなされる。すなわち、平均輝度Kが「K1」以下の場合には適フレーム画像の使用係数qが「1」となされる。また、平均輝度Kが「K2」以上つまり第2の輝度閾値以上の場合には、アンダーフレーム画像を基準とする割合が大きくなされる。すなわち、平均輝度Kが「K2」以上の場合は適フレーム画像の使用係数qが「0」となされる。一方、平均輝度Kが「K1」から「K2」の範囲では、それら適フレーム画像とアンダーフレーム画像の割合を徐々に変化させるような割合となされる。すなわち、「K1」から「K2」の範囲では、平均輝度Kが高くなるにつれて適フレーム画像の移動体画像の割合を徐々に大きくするような使用係数qが設定される。そして、移動体合成比率算出部413は、この図15のグラフに基づいて使用係数qを求め、その使用係数と合成量Tとを用いた以下の式(4)により、最終的な適フレーム画像の移動体合成比率Dを算出する。
FIG. 15 shows the average luminance K obtained by generalizing the average luminance magnitudes K_A1, K_A2, and K_A3 of the block images corresponding to the MV blocks A1, A2, and A3 of the moving object image, and the use coefficient q of the appropriate frame image. It is a graph which shows a relationship. In the graph of FIG. 15, the horizontal axis indicates the average luminance K of the moving body image, the vertical axis indicates the use coefficient q of the appropriate frame image, “K1” as the first luminance threshold, and “K2” as the second luminance threshold. Is set. According to the graph of FIG. 15, when the average luminance K is in the range of “0” to “K1”, that is, the first luminance threshold or less (“K1” or less), the ratio based on the appropriate frame image is large. Made. That is, when the average luminance K is equal to or lower than “K1”, the use coefficient q of the appropriate frame image is set to “1”. Further, when the average luminance K is “K2” or more, that is, the second luminance threshold or more, the ratio based on the underframe image is increased. That is, when the average luminance K is “K2” or more, the use coefficient q of the appropriate frame image is set to “0”. On the other hand, when the average luminance K is in the range of “K1” to “K2”, the ratio between the appropriate frame image and the underframe image is gradually changed. That is, in the range from “K1” to “K2”, the usage coefficient q is set such that the proportion of the moving body image of the appropriate frame image gradually increases as the average luminance K increases. Then, the moving body composition
D=T×(1−q)+(1−T)×q ・・・式(4) D = T × (1-q) + (1-T) × q (4)
図2の合成部414は、位置合わせ処理後の適フレーム画像と、現像処理後のアンダーフレーム画像に対して、移動体画像については移動体合成比率Dに応じた合成を、一方、背景画像に対しては輝度合成比率に応じた合成を行う。すなわち、輝度合成比率を「J」とした場合、合成部414は、以下の式(5)により、各画素ごとに合成画像の算出を行う。
The combining
背景画像:アンダーフレーム画像×J+適フレーム画像×(1−J)
移動体画像:アンダーフレーム画像×(1−D)+適フレーム画像×D
・・・・式(5)
Background image: Underframe image × J + appropriate frame image × (1-J)
Mobile object image: underframe image × (1-D) + appropriate frame image × D
.... Formula (5)
以上説明したように、本実施形態によれば、動画像に対するHDRの画像合成処理により、移動体画像が合成されてフレームレートが低下することによる動画の滑らかさの劣化を抑えることが実現出来ている。本実施形態ではさらに、移動体画像の面積と移動量と輝度とに基づいて移動体合成比率を制御することにより、不自然な描写の画像合成が行われてしまうことを防ぎ、最適な動画像HDR画像を得ることができる。特に、本実施形態では、例えば移動体画像の移動量が大きい場合や移動体画像の面積が大きい場合のように、移動体画像が目立つ画像である場合に、HDRの合成処理によって移動体画像が不自然な画像として描写されてしまうような画質劣化を低減できる。すなわち、本実施形態によれば、HDRによる画像合成処理の効果を維持しつつ、動画の滑らかさの劣化を抑えるような処理が実現でき、さらに、移動体画像が不自然に見えてしまう描写になるのを防止可能となっている。 As described above, according to the present embodiment, it is possible to suppress the deterioration of the smoothness of the moving image due to the moving body image being combined and the frame rate being lowered by the HDR image combining processing for the moving image. Yes. Further, in the present embodiment, by controlling the moving object composition ratio based on the area, moving amount, and brightness of the moving object image, it is possible to prevent unnatural image composition from being performed, and to optimize the moving image. HDR images can be obtained. In particular, in the present embodiment, when the moving body image is a conspicuous image, for example, when the moving amount of the moving body image is large or the area of the moving body image is large, the moving body image is obtained by the HDR synthesizing process. It is possible to reduce image quality deterioration that is rendered as an unnatural image. That is, according to the present embodiment, it is possible to realize a process that suppresses the deterioration of the smoothness of the moving image while maintaining the effect of the image composition process by HDR, and further, the depiction that the moving body image looks unnatural. Can be prevented.
<第2の実施形態>
次に、第2の実施形態の画像処理装置について以下に説明する。第2の実施形態の画像処理装置は、第1の実施形態と同様に、動画像撮影で交互に撮像された適フレームとアンダーフレームの移動体画像をHDR合成処理する際に、移動体画像の移動量と面積と輝度に基づいて、移動体合成比率を制御する。さらに第2の実施形態では、移動体画像の面積を、それぞれ各移動体画像間で比較し、面積が略々等しい各移動体画像についてはそれぞれ移動体合成比率を近づけるように(略々同じ比率になるように)調整し、その調整後の移動体合成比率で画像合成を行う。第2の実施形態では、面積が同等の移動体画像がそれぞれ近い移動体合成比率による画像合成がなされるため、見た目の違和感が少ないHDR合成画像を生成することが可能となる。
<Second Embodiment>
Next, an image processing apparatus according to the second embodiment will be described below. As in the first embodiment, the image processing apparatus according to the second embodiment performs HDR composition processing on a moving body image of appropriate frames and underframes that are alternately captured by moving image shooting. Based on the moving amount, the area, and the luminance, the moving body synthesis ratio is controlled. Furthermore, in the second embodiment, the areas of the moving body images are compared among the respective moving body images, and the moving body synthesis ratios of the moving body images having substantially the same area are made closer (approximately the same ratio). And adjust the moving object composition ratio after the adjustment. In the second embodiment, since the moving object images having the same area are combined with the moving object combining ratios close to each other, it is possible to generate an HDR combined image with less unnatural appearance.
第2の実施形態の画像処理装置の一例であるカメラの構成は、前述した図1と同じであるため、ここでは説明を省略する。図16には、第2の実施形態におけるHDR処理部4の一構成例を示す。なお、図16に示すHDR処理部4に関しても、大部分は第1の実施形態のHDR処理部4と同じであるため、以下の説明では、第1の実施形態のHDR処理部4とは異なる部分についてのみ説明する。
The configuration of a camera, which is an example of an image processing apparatus according to the second embodiment, is the same as that in FIG. FIG. 16 shows a configuration example of the
図16に示す第2の実施形態のHDR処理部4において、面積算出部410にて算出された移動体画像の面積の情報は、移動体合成比率算出部413と、同一面積補正部416に送られる。同一面積補正部416は、移動体合成比率算出部413の出力である移動体合成比率と、面積算出部410の出力である移動体画像の面積とに基づいて、移動体合成比率を補正し、その補正済移動体合成比率を合成部414へ送る。
In the
以下、同一面積補正部416で行われる移動体合成比率の補正処理について更に詳細に説明する。図17は、フレーム画像内に同じ面積を持つ移動体画像が複数存在する場合の一例を示す図である。図17において、図中の網掛けで示された画像範囲1701,1702,1703は、前述同様に動きベクトルに基づいて求められた移動体画像に対して移動体合成比率が適用される画像範囲を示している。なお、図17には、各移動体画像の動きベクトルに対応したMVブロックを表す「A4,A5,A6」も描かれている。これら画像範囲1701,1702,1703にそれぞれ対応した移動体画像の面積は、画像範囲内のMVブロック数により求められる。ここでは、画像範囲1701の移動体画像におけるMVブロックの個数をN_A4、画像範囲1702の移動体画像におけるMVブロックの個数をN_A5、画像範囲1703の移動体画像におけるMVブロックの個数をN_A5とする。図17の例では、それら各MVブロックの個数N_A4,N_A5,N_A6は、それぞれ同じ数(N_A4=N_A5=N_A6)になっているとする。
Hereinafter, the correction process of the moving body composition ratio performed by the same
またこのとき、同一面積補正部416には、移動体合成比率算出部413がMVブロックA4,A5,A6に対応して算出した適フレームの移動体合成比率D_A4、D_A5、D_A6が供給される。同一面積補正部416は、それらMVブロックの個数N_A4,N_A5,N_A6が閾値Lよりも少なく、且つ、それらの個数が等しい(N_A4=N_A5=N_A6)場合、以下の式(6)により補正済移動体合成比率D2を算出する。すなわち、同一面積補正部416は、適フレームの移動体合成比率D_A4、D_A5、D_A6の平均合成比率を補正済移動体合成比率D2として算出する。
At this time, the same
D2=(D_A4+D_A5+D_A6)/3 ・・・式(6) D2 = (D_A4 + D_A5 + D_A6) / 3 Formula (6)
同一面積補正部416は、以上のような処理により算出した補正済移動体合成比率D2を、合成部414へ送る。合成部414では、画像範囲1701,1702,1703に対応した各移動体画像について、補正済移動体合成比率D2を用いて、前述の第1の実施形態の場合と同様に適フレームとアンダーフレームの移動体画像の合成を行う。
The same
以上説明した第2の実施形態によれば、第1の実施形態の場合と同様な効果を得ることができる。さらに、第2の実施形態においては、移動体画像の面積が閾値Lよりも小さく、且つその面積が略々等しい移動体画像に関しては移動体合成比率が略々同じになるように修正を行うようにしている。これにより、第2の実施形態によれば、面積が同等の移動体画像が、それぞれ近い移動体合成比率により画像合成されるため、見た目の違和感が少ないHDR合成画像を生成することが可能となる。 According to the second embodiment described above, the same effect as that of the first embodiment can be obtained. Furthermore, in the second embodiment, correction is performed so that the moving object composition ratio is approximately the same for moving object images in which the area of the moving object image is smaller than the threshold value L and the area is substantially equal. I have to. As a result, according to the second embodiment, the moving body images having the same area are combined with each other at the moving body combining ratios close to each other, so that it is possible to generate an HDR combined image with less unnatural appearance. .
<第3の実施形態>
次に、第3の実施形態の画像処理装置について以下に説明する。第3の実施形態の画像処理装置は、第1の実施形態と同様に、動画像撮影で交互に撮像された適フレームとアンダーフレームの移動体画像をHDR合成処理する際に、移動体画像の移動量と面積と輝度に基づいて、移動体合成比率を制御する。さらに第3の実施形態では、動きベクトルの情報だけではなく、適フレーム画像とアンダーフレーム画像の差分値に基づいて、移動体合成比率を制御する。すなわち、第3の実施形態では、適フレーム画像とアンダーフレーム画像の移動体画像における画素単位の動きに基づいて、移動体画像に対する移動体合成比率を詳細に算出可能としている。
<Third Embodiment>
Next, an image processing apparatus according to the third embodiment will be described below. As in the first embodiment, the image processing apparatus according to the third embodiment performs HDR composition processing on a moving body image of appropriate frames and underframes alternately captured by moving image shooting. Based on the moving amount, the area, and the luminance, the moving body synthesis ratio is controlled. Furthermore, in the third embodiment, the moving object composition ratio is controlled based on not only the motion vector information but also the difference value between the appropriate frame image and the underframe image. That is, in the third embodiment, it is possible to calculate in detail the moving object composition ratio with respect to the moving object image, based on the movement of the pixel unit in the moving object image of the appropriate frame image and the under frame image.
第3の実施形態の画像処理装置の一例であるカメラの構成は、前述した図1と同じであるため、ここでは説明を省略する。図18には、第3の実施形態におけるHDR処理部4の一構成例を示す。なお、図18に示すHDR処理部4に関しても、大部分は第1の実施形態のHDR処理部4と同じであるため、以下の説明では、第1の実施形態のHDR処理部4とは異なる部分についてのみ説明する。
The configuration of a camera, which is an example of an image processing apparatus according to the third embodiment, is the same as that in FIG. FIG. 18 shows a configuration example of the
図18に示すHDR処理部4において、輝度差合成比率算出部417は、輝度差検出手段の一例であり、位置合わせ部409の出力である位置合わせ処理後の適フレームの画像データと、現像処理後のアンダーフレームの画像データとが入力される。輝度差合成比率算出部417は、位置合わせ処理後の適フレームの画像データと現像処理後のアンダーフレームの画像データに基づいて、輝度差合成比率を算出する。輝度差合成比率算出部417で算出された輝度差合成比率の情報は、移動体合成比率算出部413へ送られる。移動体合成比率算出部413は、輝度差合成比率に基づいて前述の移動体合成比率Dを補正して、補正済移動体合成比率D3を算出する。
In the
以下、第3の実施形態における輝度差合成比率算出部417と移動体合成比率算出部413についてさらに詳しく説明する。輝度差合成比率算出部417は、位置合わせ処理後の適フレーム画像と現像処理後のアンダーフレームの画像の各画素の輝度の差分絶対値Pを算出する。図19は、差分絶対値Pと、輝度差合成比率PKの関係をグラフにしたものである。図19のグラフは、横軸が差分絶対値Pを示し、縦軸が輝度差合成比率PKを示し、第1の差閾値として「P1」、第2の差閾値として「P2」が設定されている。この図19の例によれば、差分絶対値Pが0〜P1の範囲つまり第1の差閾値以下(P1以下)の場合には輝度差合成比率PKは第1の比率であるゼロ(0)パーセントとなされる。また、差分絶対値PがP2以上つまり第2の差閾値以上である場合には輝度差合成比率PKは第2の比率である100パーセントとなされる。一方、差分絶対値PがP1〜P2の範囲のときは、輝度差合成比率PKがゼロパーセントから100パーセントに徐々に増加するようになされている。すなわち、差分絶対値PがP1〜P2の範囲である場合、差分絶対値Pが大きくなるにつれてセロパーセントから100パーセントまで変化するような輝度差合成比率PKが画素単位で設定される。移動体合成比率算出部413は、図19のグラフに基づいて求めた輝度差合成比率PKと、第1の実施形態のように算出された移動体合成比率Dとを用いて、各画素について下記式(7)により補正済移動体合成比率D3を算出する。
Hereinafter, the luminance difference composition
D3=PK×D ・・・式(7) D3 = PK × D (7)
移動体合成比率算出部413は、以上のようにして算出された補正済移動体合成比率D3を合成部414へ送る。合成部414は、補正済移動体合成比率D3を用いて、画素単位で前述の第1の実施形態の場合と同様に適フレームとアンダーフレームの移動体画像の合成を行う。
The mobile body composition
以上説明した第3の実施形態によれば、第1の実施形態の場合と同様な効果を得ることができる。さらに、第3の実施形態においては、画素単位の移動体画像の動きに基づいて、移動体合成比率を詳細に算出しているため、見た目の違和感が非常に少ない自然な合成画像を生成可能となる。 According to the third embodiment described above, the same effect as in the case of the first embodiment can be obtained. Furthermore, in the third embodiment, since the moving object combining ratio is calculated in detail based on the movement of the moving object image in units of pixels, it is possible to generate a natural combined image with very little visual discomfort. Become.
<第4の実施形態>
前述した第1、第2、第3の実施形態における画像処理装置は、パーソナルコンピュータ等の情報処理装置と、その情報処理装置にて実行されるコンピュータプログラムにより実現することも可能である。以下、第4の実施形態として、パーソナルコンピュータがプログラムを実行して前述した画像合成処理等を実現する場合について説明する。
<Fourth Embodiment>
The image processing apparatuses in the first, second, and third embodiments described above can also be realized by an information processing apparatus such as a personal computer and a computer program executed by the information processing apparatus. Hereinafter, as a fourth embodiment, a case where a personal computer executes a program and realizes the above-described image composition processing and the like will be described.
図20は、第4の実施形態における情報処理装置の概略構成を示す図である。図20において、CPU300は、本実施形態の情報処理装置全体の制御、及び種々の処理を行う中央演算装置である。メモリ301は、いわゆるBIOSやブートプログラムを記憶しているROMと、CPU300がワークエリアとして使用するRAMとで構成されている。指示入力部303は、例えばキーボード、マウスなどのポインティングデバイス、及び、各種スイッチ等により構成されている。外部記憶装置304は、例えばハードディスク装置などであり、本実施形態の情報処理装置の各種制御を実行するオペレーティングシステム(OS)や、前述の第1〜第3の実施形態で説明した各種処理を実行するコンピュータプログラムが記憶されている。また、外部記憶装置304は、各種演算に必要な記憶領域としても使用される。記憶装置305は、例えば動画データを記憶する可搬性記憶媒体(例えばBD−ROMやDVD−ROMディスク等)をアクセスするための装置である。バス302は、コンピュータと外部インタフェースとの間で画像データのやり取りが行われるバスである。デジタルカメラ306は、動画像や静止画像を撮像するためのカメラであり、有線若しくは無線により第4の実施形態の情報処理装置と通信する。また、デジタルカメラ306は、図1の光学系1と撮像素子2と角速度センサ9を有しており、撮影した画像データと角速度センサ9が検出した角速度の情報を情報処理装置へ送信する。ディスプレイ307は、動画像や静止画像、本実施形態においてHDRによる合成処理後の画像等を表示するための表示装置である。通信回線309は、例えば、LAN、公衆回線、無線回線、放送電波で構成されている。通信インタフェース308は、通信回線309を介して画像データ等を送受信する。
FIG. 20 is a diagram illustrating a schematic configuration of an information processing apparatus according to the fourth embodiment. In FIG. 20, a
図20に示した情報処理装置について更に詳細に説明する。先ず、指示入力部303を介したユーザからの電源投入指示に応じて電源が供給されると、CPU300は、メモリ301のROMに格納されているブートプログラムに従って、外部記憶装置304のOSをメモリ301(RAM)にロードする。そして、指示入力部303を介したユーザからの指示に従い、CPU300は、外部記憶装置304からアプリケーションプログラムをメモリ301にロードする。これにより、情報処理装置は、前述の各実施形態で説明した画像処理装置の各機能を実行可能となる。
The information processing apparatus shown in FIG. 20 will be described in more detail. First, when power is supplied in response to a power-on instruction from the user via the
図21は、そのアプリケーションプログラムがメモリ301にロードされた際の、メモリ301の記憶エリアの一例を示す図である。すなわち、このときのメモリ301には、記憶エリア2101〜2106が用意される。記憶エリア2101は、CPU300が情報処理装置全体を制御し、また、各種ソフトウェアの実行を制御するためのOS(オペレーティングシステム)が展開されるエリアである。記憶エリア2102は、CPU300がHDRの画像合成処理を実行するための映像処理ソフトウェアプログラムが展開されるエリアである。記憶エリア2103は、CPU300がカメラ306を制御して、適フレームとアンダーフレームの画像を交互に撮像させ、それらのフレーム画像を1フレームずつ入力(キャプチャ)するための画像入力ソフトウェアプログラムが展開されるエリアである。記憶エリア2104は、CPU300がディスプレイ307へ表示させる画像データを生成する処理を実行するための映像表示ソフトウェアプログラムが展開されるエリアである。記憶エリア2105は、画像データが格納される画像エリアである。記憶エリア2106は、例えば各種のパラメータ等が格納されるワーキングエリアである。
FIG. 21 is a diagram illustrating an example of a storage area of the
図22は、CPU300が本実施形態のアプリケーションプログラムを実行して前述した各実施形態の画像処理を行う際のフローチャートである。図22において、CPU300は、先ず、ステップS1の処理として各部の初期化を行う。ステップS1の後、CPU300は、処理をステップS2へ進める。
FIG. 22 is a flowchart when the
ステップS2では、CPU300は、アプリケーションプログラムを終了させるか否かの判定を行う。このステップS2における終了判定は、ユーザが指示入力部303を介して終了指示を入力したか否かに基づいて行われる。すなわちCPU300は、ステップS2において、指示入力部303を介してユーザから終了指示が入力されたと判定した場合にはこのフローチャートの処理を終了する。一方、CPU300は、ステップS2において、指示入力部303を介してユーザから終了指示が入力されていないと判定した場合には処理をステップS3へ進める。
In step S2,
ステップS3では、CPU300は、カメラ306にて撮像されたフレーム単位の画像データを、メモリ301の記憶エリア2105のうちの画像エリアに格納させる。ステップS3の後、CPU300は、処理をステップS4へ進める。ステップS4では、CPU300は、前述の実施形態で説明したようなHDRの画像合成処理等の各種画像処理を実行する。ステップS4の後、CPU300は、処理をステップS2へ戻す。
In step S <b> 3, the
図23には、図22のステップS4の画像処理を更に詳細に示すフローチャートである。CPU300は、先ずステップS401の処理として、記憶装置305に記憶されている画像データのなかの少なくとも時間的に連続した適フレームとアンダーフレームの2フレームの画像データと、角速度等のパラメータを、メモリ301に記憶させる。ステップS401の後、CPU300は、処理をステップS402へ進める。
FIG. 23 is a flowchart showing in more detail the image processing in step S4 of FIG. First, as a process of step S401, the
ステップS402では、CPU300は、メモリ301に記憶された2フレームの画像データを、前述したように、それぞれの明るさに合うように現像処理する。ステップS402の後、CPU300は、処理をステップS403へ進める。ステップS403では、CPU300は、アンダーフレームに対する輝度合成比率を算出する。ステップS403の後、CPU300は、処理をステップS404へ進める。
In step S402, the
ステップS404では、CPU300は、適フレーム画像とアンダーフレーム画像の間の動きベクトルを算出する。ステップS404の後、CPU300は、処理をステップS405へ進める。ステップS405では、CPU300は、動きベクトルと角速度を用いて、移動体画像と背景画像を分離する。ステップS405の後、CPU300は、処理をステップS406へ進める。
In step S404, the
ステップS406では、CPU300は、動きベクトルを用いて適フレームの背景画像をアンダーフレームの背景画像に対して位置合わせする。ステップS406の後、CPU300は、処理をステップS407へ進める。
In step S406, the
ステップS407では、CPU300は、動きベクトルを用いて移動体画像の面積を算出する。ステップS407の後、CPU300は、処理をステップS408へ進める。ステップS408では、CPU300は、動きベクトルを用いて移動体画像の移動量を算出する。ステップS408の後、CPU300は、処理をステップS409へ進める。ステップS409では、CPU300は、動きベクトルを用いて移動体画像の輝度を算出する。ステップS409の後、CPU300は、処理をステップS410へ進める。
In step S407, the
ステップS410では、CPU300は、移動体画像の面積と移動量と輝度とに基づいて、移動体合成比率を算出する。ステップS410の後、CPU300は、処理をステップS411へ進める。ステップS411では、CPU300は、輝度合成比率と移動体合成比率とを用いて、適フレームとアンダーフレームの画像の合成処理を行い、その合成処理後のフレーム画像データをメモリ301に格納させる。
In step S410, the
以上説明したように、第4の実施形態によれば、パーソナルコンピュータ等の情報処理装置において、前述した第1〜第3の各実施形態と同等の画像合成処理を実現できる。なお、コンピュータプログラムは、通常はコンピュータ可読装置に格納されており、これをコンピュータが有する読み取り装置にセットし、内部のメモリ等にコピー若しくはインストールすることで実行可能である。したがって、このようなコンピュータ可読記憶媒体が本実施形態の範疇に入ることは言うまでもない。 As described above, according to the fourth embodiment, in the information processing apparatus such as a personal computer, it is possible to realize an image composition process equivalent to each of the first to third embodiments described above. The computer program is normally stored in a computer readable device, and can be executed by setting it in a reading device of the computer and copying or installing it in an internal memory or the like. Therefore, it goes without saying that such a computer-readable storage medium falls within the category of this embodiment.
また、上述した実施形態の1以上の機能を実現するプログラムは、ネットワーク又は記憶媒体を介してシステム又は装置に供給されてもよい。そして、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーが、プログラムを読出して実行する。その他、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 In addition, a program that realizes one or more functions of the above-described embodiments may be supplied to a system or an apparatus via a network or a storage medium. One or more processors in the computer of the system or apparatus read and execute the program. In addition, it can be realized by a circuit (for example, ASIC) that realizes one or more functions.
上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
前述した実施形態では、HDRによる画像合成処理を例に挙げたが、その他にも、例えば、フォーカス方向の合焦距離を異ならせた複数のフレーム画像の合成処理や、色味を異ならせた複数フレームの合成処理など、様々な画像合成処理にも適用可能である。 In the above-described embodiment, HDR image synthesis processing is taken as an example, but in addition, for example, a plurality of frame images with different focus distances in the focus direction, or a plurality of colors with different colors. The present invention can also be applied to various image composition processing such as frame composition processing.
1 光学系、2 撮像素子、3 信号処理部、4 HDR処理部、5 調整処理部、6 符号化処理部、7 出力部、8 UI部、9 角速度センサ、404,405 現像部、406 輝度合成比率算出部、407 動きベクトル算出部、408 背景分離部、409 位置合わせ部、410 面積算出部、411 移動量算出部、412 輝度算出部、413 移動体合成比率算出部、414 合成部、416 同一面積補正部、417 輝度差合成比率算出部 DESCRIPTION OF SYMBOLS 1 Optical system, 2 Image pick-up element, 3 Signal processing part, 4 HDR processing part, 5 Adjustment processing part, 6 Coding process part, 7 Output part, 8 UI part, 9 Angular velocity sensor, 404,405 Development part, 406 Luminance composition Ratio calculation unit, 407 Motion vector calculation unit, 408 Background separation unit, 409 Position adjustment unit, 410 Area calculation unit, 411 Movement amount calculation unit, 412 Luminance calculation unit, 413 Mobile body composition ratio calculation unit, 414 Composition unit, 416 Identical Area correction unit, 417 Luminance difference composite ratio calculation unit
Claims (13)
前記第1のフレーム画像と前記第2のフレーム画像から、前記第1のフレーム画像の撮影と前記第2のフレーム画像の撮影がなされた間の前記移動体画像の移動量を求める移動量検出手段と、
前記移動体画像の面積を求める面積検出手段と、
前記第1のフレーム画像と前記第2のフレーム画像を合成する合成手段と、
前記移動体画像の前記移動量と前記面積に基づいて、前記合成手段により前記第1のフレーム画像と前記第2のフレーム画像が合成される際の、前記第1のフレーム画像の前記移動体画像と前記第2のフレーム画像の前記移動体画像との合成比率を制御する制御手段とを有する
ことを特徴とする画像処理装置。 A subject whose subject position has changed between the shooting of the first frame image and the shooting of the second frame image from at least two frame images of the first frame image and the second frame image by moving image shooting Moving body detecting means for detecting an image as a moving body image;
From the first frame image and the second frame image, a moving amount detection means for obtaining a moving amount of the moving body image during the shooting of the first frame image and the shooting of the second frame image. When,
Area detecting means for determining the area of the moving object image;
Combining means for combining the first frame image and the second frame image;
The moving body image of the first frame image when the first frame image and the second frame image are combined by the combining unit based on the moving amount and the area of the moving body image. And a control means for controlling a synthesis ratio of the second frame image and the moving body image.
前記評価値が第1の評価閾値以下の場合には前記合成量を第1の合成量で一定となるように前記合成比率を制御し、
前記評価値が前記第1の評価閾値より大きい第2の評価閾値以上の場合には前記合成量を前記第1の合成量より小さい第2の合成量で一定となるように前記合成比率を制御し、
前記評価値が前記第1の評価閾値と前記第2の評価閾値との間の場合には前記評価値が大きくなるにつれて前記合成量を前記第1の合成量から前記第2の合成量へ少なくなるように前記合成比率を制御することを特徴とする請求項3に記載の画像処理装置。 The control means includes
When the evaluation value is equal to or less than a first evaluation threshold, the synthesis ratio is controlled so that the synthesis amount is constant at the first synthesis amount;
When the evaluation value is greater than or equal to a second evaluation threshold greater than the first evaluation threshold, the synthesis ratio is controlled so that the synthesis amount is constant at a second synthesis amount smaller than the first synthesis amount. And
When the evaluation value is between the first evaluation threshold and the second evaluation threshold, the amount of synthesis decreases from the first synthesis amount to the second synthesis amount as the evaluation value increases. The image processing apparatus according to claim 3, wherein the composition ratio is controlled to be
前記制御手段は、前記輝度検出手段により検出された前記第1のフレーム画像の前記移動体画像の輝度と前記第2のフレーム画像の前記移動体画像の輝度に基づいて、前記第1のフレーム画像の前記移動体画像を基準とした前記合成比率を決定する請求項3又は4に記載の画像処理装置。 Brightness detecting means for detecting the brightness of the moving body image of the first frame image and the brightness of the moving body image of the second frame image;
The control means is configured to determine the first frame image based on the luminance of the moving body image of the first frame image detected by the luminance detecting means and the luminance of the moving body image of the second frame image. The image processing apparatus according to claim 3, wherein the composition ratio based on the moving body image is determined.
前記制御手段は、
前記平均輝度が第1の輝度閾値以下である場合には前記第1のフレーム画像の前記移動体画像の割合を大きくする係数を設定し、
前記平均輝度が前記第1の輝度閾値より高い第2の輝度閾値以上である場合には前記第2のフレーム画像の前記移動体画像の割合を大きくする前記係数を設定し、
前記平均輝度が前記第1の輝度閾値と前記第2の輝度閾値の間である場合には前記平均輝度が低くなるにつれて前記第1のフレーム画像の前記移動体画像の割合を大きくする前記係数を設定し、
前記係数と前記合成量とに基づいて、前記第1のフレーム画像の前記移動体画像を基準とした前記合成比率を決定する請求項5に記載の画像処理装置。 The luminance detection means obtains an average luminance of the moving body image of the first frame image and the moving body image of the second frame image;
The control means includes
If the average luminance is less than or equal to a first luminance threshold, set a coefficient to increase the proportion of the moving body image of the first frame image,
When the average luminance is equal to or higher than a second luminance threshold higher than the first luminance threshold, the coefficient for increasing the ratio of the moving body image in the second frame image is set.
When the average luminance is between the first luminance threshold and the second luminance threshold, the coefficient that increases the ratio of the moving body image in the first frame image as the average luminance decreases. Set,
The image processing apparatus according to claim 5, wherein the composition ratio based on the moving body image of the first frame image is determined based on the coefficient and the composition amount.
前記面積検出手段は、前記複数の移動体画像のそれぞれの面積を検出し、
前記制御手段は、前記複数の移動体画像についてそれぞれ前記合成比率を制御するとともに、前記複数の移動体画像のうち前記面積が略々等しい各移動体画像の合成比率については略々同じ合成比率となるように制御することを特徴とする請求項1〜7のいずれか1項に記載の画像処理装置。 The moving body detecting means detects a plurality of moving body images,
The area detecting means detects each area of the plurality of moving body images,
The control means controls the composition ratio for each of the plurality of moving body images, and the composition ratio of each of the plurality of moving body images having substantially the same area is substantially the same. It controls so that it may become. The image processing apparatus of any one of Claims 1-7 characterized by the above-mentioned.
前記制御手段は、前記画素単位の輝度差に基づいて、前記移動体画像の画素単位で前記合成比率を制御することを特徴とする請求項2〜9のいずれか1項に記載の画像処理装置。 A luminance difference detecting means for obtaining a luminance difference in pixel units between the moving body image of the first frame image and the moving body image of the second frame image;
The image processing apparatus according to claim 2, wherein the control unit controls the synthesis ratio in units of pixels of the moving body image based on a luminance difference in units of pixels. .
前記画素単位の輝度差が第1の差閾値以下である場合には第1の比率となる輝度差合成比率を画素単位で設定し、
前記画素単位の輝度差が前記第1の差閾値より大きい第2の差閾値以上である場合には前記第1の比率より大きい第2の比率となる輝度差合成比率を画素単位で設定し、
前記画素単位の輝度差が前記第1の差閾値と前記第2の差閾値の間である場合には前記画素単位の輝度差が大きくなるにつれて前記比率が前記第1の比率から前記第2の比率に変化するような輝度差合成比率を画素単位で設定し、
前記制御手段は、前記画素単位の輝度差合成比率により、前記第1のフレーム画像の前記移動体画像を基準とした前記合成比率を画素単位で補正することを特徴とする請求項10に記載の画像処理装置。 The brightness difference detecting means includes
If the luminance difference in pixel units is less than or equal to the first difference threshold, a luminance difference synthesis ratio that is the first ratio is set in pixel units,
If the luminance difference in pixel units is equal to or greater than a second difference threshold value that is greater than the first difference threshold value, a luminance difference composition ratio that is a second ratio that is greater than the first ratio is set in pixel units;
When the luminance difference of the pixel unit is between the first difference threshold and the second difference threshold, the ratio is increased from the first ratio to the second difference as the luminance difference of the pixel unit increases. Set the luminance difference composition ratio that changes to the ratio in pixel units,
The said control means correct | amends the said composition ratio on the basis of the said moving body image of the said 1st frame image by a pixel unit by the brightness | luminance difference composition ratio of the said pixel unit. Image processing device.
移動量検出手段が、前記第1のフレーム画像と前記第2のフレーム画像から、前記第1のフレーム画像の撮影と前記第2のフレーム画像の撮影がなされた間の前記移動体画像の移動量を求めるステップと、
面積検出手段が、前記移動体画像の面積を求めるステップと、
合成手段が、前記第1のフレーム画像と前記第2のフレーム画像を合成するステップと、
制御手段が、前記移動体画像の前記移動量と前記面積に基づいて、前記合成手段により前記第1のフレーム画像と前記第2のフレーム画像が合成される際の、前記第1のフレーム画像の前記移動体画像と前記第2のフレーム画像の前記移動体画像との合成比率を制御するステップと
を含むことを特徴とする画像処理方法。 The moving body detecting means is configured to capture the first frame image and the second frame image from at least two frame images of the first frame image and the second frame image obtained by moving image shooting. Detecting a subject image whose subject position has changed as a moving body image;
The moving amount detection means moves the moving body image from the first frame image and the second frame image during the shooting of the first frame image and the shooting of the second frame image. A step of seeking
An area detecting means for determining an area of the moving object image;
Combining means for combining the first frame image and the second frame image;
Based on the amount of movement and the area of the moving body image, the control unit is configured to display the first frame image when the first frame image and the second frame image are combined by the combining unit. And a step of controlling a composition ratio of the moving body image and the moving body image of the second frame image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015083468A JP6494388B2 (en) | 2015-04-15 | 2015-04-15 | Image processing apparatus, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015083468A JP6494388B2 (en) | 2015-04-15 | 2015-04-15 | Image processing apparatus, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016208083A JP2016208083A (en) | 2016-12-08 |
JP6494388B2 true JP6494388B2 (en) | 2019-04-03 |
Family
ID=57490377
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015083468A Expired - Fee Related JP6494388B2 (en) | 2015-04-15 | 2015-04-15 | Image processing apparatus, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6494388B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114387248B (en) * | 2022-01-12 | 2022-11-25 | 苏州天准科技股份有限公司 | Silicon material melting degree monitoring method, storage medium, terminal and crystal pulling equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5820213B2 (en) * | 2011-09-26 | 2015-11-24 | キヤノン株式会社 | Image processing apparatus and method, and imaging apparatus |
JP5713885B2 (en) * | 2011-12-26 | 2015-05-07 | キヤノン株式会社 | Image processing apparatus, image processing method, program, and storage medium |
JP6046966B2 (en) * | 2012-04-19 | 2016-12-21 | キヤノン株式会社 | Image processing apparatus, image processing method, program, and storage medium |
-
2015
- 2015-04-15 JP JP2015083468A patent/JP6494388B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2016208083A (en) | 2016-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9646397B2 (en) | Image processing apparatus and image processing method | |
JP5713752B2 (en) | Image processing apparatus and control method thereof | |
TWI602152B (en) | Image capturing device nd image processing method thereof | |
JP5767485B2 (en) | Image processing apparatus and control method | |
JP2021114696A (en) | Image processing device, image processing method and program | |
CN113313661A (en) | Image fusion method and device, electronic equipment and computer readable storage medium | |
JP2015201842A (en) | Image processing system and control method and control program of the same | |
JP2015144475A (en) | Imaging apparatus, control method of the same, program and storage medium | |
JP2022179514A (en) | Control apparatus, imaging apparatus, control method, and program | |
JP5882702B2 (en) | Imaging device | |
JP6887853B2 (en) | Imaging device, its control method, program | |
JP6541501B2 (en) | IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD | |
JP7057079B2 (en) | Image processing device, image pickup device, image processing method, and program | |
JP2011171842A (en) | Image processor and image processing program | |
JP5911340B2 (en) | Imaging apparatus and control method thereof | |
JP6494388B2 (en) | Image processing apparatus, image processing method, and program | |
JP5952574B2 (en) | Image processing apparatus and control method thereof | |
JP2019016893A (en) | Image processing apparatus, control method therefor, and program | |
JP2023090492A (en) | Image processing device, image processing method, and imaging apparatus | |
JP2018128764A (en) | Image processing device, image processing method and program | |
JP2022086311A (en) | Imaging apparatus, control method of imaging apparatus, and program | |
JP5952573B2 (en) | Image processing apparatus and control method thereof | |
JP6603557B2 (en) | Image processing apparatus and image processing method | |
JP5541956B2 (en) | Image composition method, image composition program, and image composition apparatus | |
JP2016208118A (en) | Image processing apparatus, image processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180405 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190118 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20190205 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190305 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6494388 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |