JP2010278890A - Image forming apparatus, and image forming method - Google Patents

Image forming apparatus, and image forming method Download PDF

Info

Publication number
JP2010278890A
JP2010278890A JP2009130936A JP2009130936A JP2010278890A JP 2010278890 A JP2010278890 A JP 2010278890A JP 2009130936 A JP2009130936 A JP 2009130936A JP 2009130936 A JP2009130936 A JP 2009130936A JP 2010278890 A JP2010278890 A JP 2010278890A
Authority
JP
Japan
Prior art keywords
image
luminance
hdr
images
region
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
JP2009130936A
Other languages
Japanese (ja)
Inventor
Hideyuki Kinoshita
英之 木下
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2009130936A priority Critical patent/JP2010278890A/en
Publication of JP2010278890A publication Critical patent/JP2010278890A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology for generating an excellent HDR (High Dynamic Range) image. <P>SOLUTION: A combination region extracting section 103 and an equal-luminance region extracting section 104 extract regions having luminance values within a set luminance range from a plurality of images photographed while varying exposure, respectively. A position deviation correcting section 105 corrects position deviation between images within one or more regions among the extracted regions. An HDR combination section 106 generates as an HDR image a result of combining the images in the extracted regions including the corrected regions. An HDR image merging section 107 merges, for a reference image selected as a reference from among a plurality of images, the HDR image corresponding to each luminance range, thereby updating the reference image. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、異なる露出条件で撮影した複数の画像を合成してダイナミックレンジの広い画像を作成する為の技術に関するものである。   The present invention relates to a technique for creating an image with a wide dynamic range by combining a plurality of images taken under different exposure conditions.

屋外などにおいてデジタルカメラで撮影するとき、撮影可能な輝度レンジより撮影シーンの輝度レンジが広い場合がある。このとき、撮影可能な輝度レンジ外の被写体については、その階調情報を記録することができないため、白飛び・黒潰れが発生する。例えば、晴天時に屋外で人物を撮影する場合、人物に露出を合わせると背景の空や雲が白飛びしたり、木陰が黒潰れしたりするケースがある。しかし、人間の視覚には、見ている領域の明るさや色に応じて順応状態を切り替える、「局所順応」と呼ばれる特性があり、明るい場所/暗い場所ともに階調を知覚することができる。このため、シーンを見た際の印象と撮影画像を見た際の印象とが異なっている場合があり、この点がデジタルカメラユーザの不満となっている。   When shooting with a digital camera outdoors or the like, the luminance range of the shooting scene may be wider than the luminance range that can be shot. At this time, since the gradation information cannot be recorded for a subject outside the photographic brightness range, overexposure / blackout occurs. For example, when a person is photographed outdoors in fine weather, there are cases where the sky and clouds in the background are blown off and the shade of the trees is crushed black when exposure is adjusted to the person. However, human vision has a characteristic called “local adaptation” in which the adaptation state is switched according to the brightness and color of the region being viewed, and gradation can be perceived in both bright and dark places. For this reason, the impression when the scene is viewed may be different from the impression when the captured image is viewed, which is dissatisfied with the digital camera user.

このような問題を解決する為の技術の1つに、High Dynamic Range Imaging技術(HDR技術)がある。HDR技術は大きく分けて、「HDRキャプチャー技術」と「HDR再現技術」とから構成される。   One of the techniques for solving such a problem is a high dynamic range imaging technique (HDR technique). The HDR technology is roughly divided into “HDR capture technology” and “HDR reproduction technology”.

HDRキャプチャー技術は、撮影可能なダイナミックレンジを拡大し、白飛び・黒潰れが発生していた輝度レンジの階調情報を記録するための技術であり、たとえば、複数の露出で撮影した画像を合成するなどの方法がある。以下、このHDRキャプチャー技術により取得される画像をHDR画像と呼ぶ。   HDR capture technology is a technology for expanding the dynamic range that can be taken and recording gradation information in the brightness range where whiteout and blackout occurred, for example, combining images taken with multiple exposures There are ways to do it. Hereinafter, an image acquired by the HDR capture technique is referred to as an HDR image.

HDR再現技術は、ダイナミックレンジの広いHDR画像をダイナミックレンジの狭い表示/出力機器で好ましく再現するための画像処理技術であり、例えば、HDR画像の低周波成分を圧縮するなどの方法がある。   The HDR reproduction technique is an image processing technique for preferably reproducing an HDR image having a wide dynamic range with a display / output device having a narrow dynamic range. For example, there is a method of compressing a low frequency component of the HDR image.

このようにHDR技術では、ダイナミックレンジ拡大のためのキャプチャー技術と、ダイナミックレンジの広い撮影画像に対応した再現技術により、白飛び・黒潰れを軽減することができる。   As described above, in the HDR technology, it is possible to reduce overexposure and underexposure by a capture technology for expanding the dynamic range and a reproduction technology corresponding to a captured image with a wide dynamic range.

HDRキャプチャー技術において、露出条件を互いに変更して同一被写体に対して複数回の撮影を行う際、当然ながら撮影と撮影の間には時間差が生じる。そのため、撮影装置のぶれや被写体のぶれや移動が生じていると、撮影画像間で相対的な位置ずれが発生することがある。撮影画像間において被写体のずれが生じている場合に、被写体のずれを考慮せずに撮影画像全体を重ね合わせるように合成してHDR画像を生成すると、その合成画像には被写体が二重に写ってしまうことになってしまう。従って、異なる露出で撮影した画像を合成する際には、合成対象となる画像の重ね合わせを正確に行う必要があるといえる。   In the HDR capture technique, when shooting is performed a plurality of times on the same subject with different exposure conditions, there is a time difference between the shooting and shooting. For this reason, when the photographing apparatus is shaken or the subject is shaken or moved, a relative positional shift may occur between the captured images. If there is a subject shift between the captured images and the HDR image is generated by combining the entire captured image without considering the subject shift and generating the HDR image, the composite image shows the subject in duplicate. It will end up. Therefore, when combining images shot at different exposures, it can be said that it is necessary to accurately superimpose images to be combined.

擬似輪郭の発生を抑制する手段として、特許文献1には、画像データから被写体のぶれを検出し、ぶれている領域の画像データは合成の際には使用しないという手法が提案されている。   As means for suppressing the occurrence of pseudo contours, Patent Document 1 proposes a method in which blurring of a subject is detected from image data and image data in the blurred region is not used for synthesis.

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

しかしながら、特許文献1に記載の技術では、露出条件の異なる複数枚の画像を用いてHDR画像を生成するべき部位に、規定枚数以下の画像の情報のみしか用いないという場合が生じる。これでは、擬似輪郭の発生は抑制できるものの、画像の細部にわたってHDR画像形成は行えないという課題があった。   However, in the technique described in Patent Document 1, there may be a case where only information of an image equal to or less than the specified number is used for a portion where an HDR image is to be generated using a plurality of images having different exposure conditions. In this case, although the generation of the pseudo contour can be suppressed, there is a problem that HDR image formation cannot be performed over the details of the image.

従って、擬似輪郭を抑制しつつ細部にわたってHDR画像を生成する為には、撮影装置のぶれや被写体のぶれや移動を考慮し、画像の位置ずれを細部まで補正して、画像の合成を行うことが必要となる。本発明は、上述の課題に鑑みてなされたものであり、良好なHDR画像を生成する為の技術を提供することを目的とする。   Therefore, in order to generate an HDR image in detail while suppressing pseudo contours, image blurring and movement of the subject and the movement and movement of the subject are taken into consideration, and the positional deviation of the image is corrected to the details and the image is synthesized. Is required. The present invention has been made in view of the above-described problems, and an object thereof is to provide a technique for generating a good HDR image.

本発明の目的を達成するために、例えば、本発明の画像処理装置は以下の構成を備える。即ち、露出を変化させながら撮影された複数枚の画像を入力する手段と、前記複数枚の画像のそれぞれから、設定された輝度レンジ内の輝度値を有する領域を抽出する抽出手段と、前記抽出手段が抽出したそれぞれの領域内の画像の位置ずれを補正する補正手段と、前記補正手段が補正した領域を含む前記抽出手段が抽出した領域内の画像を合成した結果を、HDR画像として生成する合成手段と、複数種類の異なる輝度レンジを順次設定し、設定した輝度レンジについて前記抽出手段、前記補正手段、前記合成手段を動作させることで、それぞれの輝度レンジに対するHDR画像を生成する手段と、前記複数枚の画像のうち基準として選択された基準画像に対して、それぞれの輝度レンジに対するHDR画像を合成することで、前記基準画像を更新する更新手段とを備えることを特徴とする。   In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement. That is, means for inputting a plurality of images taken while changing exposure, extraction means for extracting a region having a luminance value within a set luminance range from each of the plurality of images, and the extraction An HDR image is generated as a result of combining the correcting means for correcting the positional deviation of the image in each area extracted by the means and the image in the area extracted by the extracting means including the area corrected by the correcting means. Means for sequentially generating a plurality of different luminance ranges, and generating HDR images for the respective luminance ranges by operating the extracting means, the correcting means, and the synthesizing means for the set luminance ranges; By synthesizing an HDR image for each luminance range with a reference image selected as a reference among the plurality of images, the reference image Characterized in that it comprises an updating means for updating the.

本発明の構成により、良好なHDR画像を生成することができる。   With the configuration of the present invention, a good HDR image can be generated.

第1の実施形態に係る画像処理装置の機能構成例を示すブロック図。1 is a block diagram illustrating an example of a functional configuration of an image processing apparatus according to a first embodiment. 段階露出画像の例を示す図。The figure which shows the example of a step exposure image. HDR合成対象領域を抽出する処理のフローチャート。The flowchart of the process which extracts a HDR synthetic | combination object area | region. 同輝度領域抽出部104、位置ずれ補正部105、HDR合成部106、HDR画像統合部107が行う処理のフローチャート。The flowchart of the process which the brightness area extraction part 104, the position shift correction | amendment part 105, the HDR synthetic | combination part 106, and the HDR image integration part 107 performs. 段階露出画像の各画像の最大輝度値を示す図。The figure which shows the maximum luminance value of each image of a step exposure image. ステップS403における処理のフローチャート。The flowchart of the process in step S403. ブロックマッチング法を説明するための図。The figure for demonstrating the block matching method. ステップS409における処理の詳細を示すフローチャート。The flowchart which shows the detail of the process in step S409. コンピュータのハードウェア構成例を示すブロック図。The block diagram which shows the hardware structural example of a computer.

以下、添付図面を参照し、本発明の好適な実施形態について説明する。なお、以下説明する実施形態は、本発明を具体的に実施した場合の一例を示すもので、特許請求の範囲に記載の構成の具体的な実施例の1つである。   Preferred embodiments of the present invention will be described below with reference to the accompanying drawings. The embodiment described below shows an example when the present invention is specifically implemented, and is one of the specific examples of the configurations described in the claims.

[第1の実施形態]
本実施形態では、段階露出(bracketing)を使用して取得された画像群を用いてHDR画像を生成する場合について述べる。段階露出とは、写真技術で用いられる用語であり、最適な露出レベルの写真を1枚得ることを期待して複数の露出設定で同一シーンの写真を複数枚取ることを意味する。図1は、本実施形態に係る画像処理装置の機能構成例を示すブロック図である。
[First Embodiment]
In the present embodiment, a case will be described in which an HDR image is generated using an image group acquired by using staged exposure (bracketing). The stepwise exposure is a term used in photographic technology, and means that a plurality of photographs of the same scene are taken with a plurality of exposure settings in the hope of obtaining one photograph with an optimum exposure level. FIG. 1 is a block diagram illustrating a functional configuration example of the image processing apparatus according to the present embodiment.

図1に示す如く、本実施形態に係る画像処理装置は、撮像装置190、合成領域抽出部103、同輝度領域抽出部104、位置ずれ補正部105、HDR合成部106、HDR画像統合部107、により構成されている。   As shown in FIG. 1, the image processing apparatus according to the present embodiment includes an imaging device 190, a synthesis region extraction unit 103, a luminance region extraction unit 104, a misregistration correction unit 105, an HDR synthesis unit 106, an HDR image integration unit 107, It is comprised by.

また、撮像装置190は、撮像部101、撮像制御部102、により構成されている。撮像部101は、一般的なデジタルカメラのように、絞りやシャッター、レンズ群、撮像素子、を備える。撮像制御部102は、シャッター駆動、絞り駆動、焦点駆動、ズーム駆動等を制御する。   In addition, the imaging device 190 includes an imaging unit 101 and an imaging control unit 102. The imaging unit 101 includes an aperture, a shutter, a lens group, and an imaging device as in a general digital camera. The imaging control unit 102 controls shutter drive, aperture drive, focus drive, zoom drive, and the like.

撮像制御部102による制御の元で、撮像部101により、段階露出画像を取得する。本実施形態では、段階露出画像とは、露出時間を段階的に変更して(露出を変化させながら)撮影された画像群を意味する。例えば、段階露出画像には、適正露出の画像(適正露出画像)、適正露出画像取得時の露出時間に比して相対的に長い露出時間の撮影による画像(長露出画像)、相対的に短い露出時間の撮影による画像(短露出画像)のセットが含まれている。ただし、段階露出画像は、露出時間を段階的に変更して得られたものに限定するわけではなく、絞りを段階的に変更して得られたものでもよい。即ち、撮像パラメータをそれぞれ異ならせて撮影することで取得した複数の画像の集合を段階露出画像として良い。   Under the control of the imaging control unit 102, a stepped exposure image is acquired by the imaging unit 101. In the present embodiment, the stepwise exposure image means a group of images taken while changing the exposure time stepwise (while changing the exposure). For example, for a stepped exposure image, an image with proper exposure (appropriate exposure image), an image taken with a relatively long exposure time (long exposure image), and a relatively short image compared to the exposure time at the time of acquisition of the proper exposure image A set of images (short-exposure images) from exposure time shooting is included. However, the stepped exposure image is not limited to the one obtained by changing the exposure time step by step, but may be one obtained by changing the aperture stepwise. That is, a set of a plurality of images acquired by shooting with different imaging parameters may be used as the stepped exposure image.

図2は、段階露出画像の例を示す図である。図2に示す如く、本実施形態では、段階露出画像は、露光時間の長い順に画像IM1、画像IM2、画像IM3・・・で構成されるとする。   FIG. 2 is a diagram illustrating an example of a stepped exposure image. As shown in FIG. 2, in this embodiment, it is assumed that the stepped exposure image is composed of an image IM1, an image IM2, an image IM3,.

図1に戻って、合成領域抽出部103は、撮像装置190から入力された段階露出画像を構成するそれぞれの画像について、白飛び・黒潰れしている領域を除外し、合成対象領域を抽出する(第1の手段)。   Returning to FIG. 1, the synthesis area extraction unit 103 extracts a synthesis target area by excluding a whiteout / blackout area from each of the images constituting the stepped exposure image input from the imaging device 190. (First means).

同輝度領域抽出部104は、合成領域抽出部103がそれぞれの画像から抽出した領域のそれぞれから、「撮影シーンで同輝度となる領域」を、同輝度領域として抽出する。位置ずれ補正部105は、同輝度領域抽出部104が各画像から抽出した同輝領域間での位置のずれを補正する。   The same luminance area extracting unit 104 extracts “an area having the same luminance in the photographic scene” as the same luminance area from each of the areas extracted from the respective images by the synthesis area extracting unit 103. The position deviation correction unit 105 corrects the position deviation between the same brightness areas extracted from each image by the brightness area extraction unit 104.

HDR合成部106は、位置ずれ補正部105が位置ずれ補正を行ったそれぞれの同輝度領域を合成し、ダイナミックレンジを拡大したHDR画像を生成する。HDR画像統合部107は、それぞれの輝度レンジ毎に同輝度領域抽出部104、位置ずれ補正部105、HDR合成部106により生成されたHDR画像を合成し、最終的なHDR画像を生成する。   The HDR synthesizing unit 106 synthesizes the same luminance regions that have been subjected to the positional deviation correction by the positional deviation correction unit 105, and generates an HDR image with an expanded dynamic range. The HDR image integration unit 107 combines the HDR images generated by the same luminance region extraction unit 104, the positional deviation correction unit 105, and the HDR synthesis unit 106 for each luminance range, and generates a final HDR image.

以下では、合成領域抽出部103、同輝度領域抽出部104、位置ずれ補正部105、HDR合成部106、HDR画像統合部107のそれぞれについてより詳細に説明する。   Below, each of the synthetic | combination area | region extraction part 103, the same brightness | luminance area extraction part 104, the position shift correction | amendment part 105, the HDR synthetic | combination part 106, and the HDR image integration part 107 is demonstrated in detail.

上述の通り、合成領域抽出部103には、撮像装置190から送出された段階露出画像が入力される。この段階露出画像を構成する画像群の中には、白飛びが生じている領域を含む画像や、黒潰れが生じている領域を含む画像も含まれ得る。これらの領域では画像の特徴が失われているため、各画像からこれらの領域を除外し、その残りの領域をHDR合成対象領域として抽出する必要がある。   As described above, the stepped exposure image sent from the imaging device 190 is input to the synthesis region extraction unit 103. The image group constituting this stage exposure image may include an image including an area where whiteout occurs and an image including an area where blackout occurs. Since the image features are lost in these areas, it is necessary to exclude these areas from each image and extract the remaining areas as HDR synthesis target areas.

段階露出画像中のある1つの画像から、合成領域抽出部103がHDR合成対象領域を抽出する処理について、同処理のフローチャートを示す図3を用いて説明する。即ち、実際には、合成領域抽出部103は、段階露出画像を構成する各画像について、図3に示すフローチャートに従った処理を行う。   A process in which the synthesis area extraction unit 103 extracts an HDR synthesis target area from one image in the stepwise exposure image will be described with reference to FIG. 3 showing a flowchart of the process. That is, actually, the composite area extraction unit 103 performs processing according to the flowchart shown in FIG. 3 for each image constituting the stepwise exposure image.

先ず、ステップS301では、合成領域抽出部103は、画像中のi(1≦i≦N:Nは1つの画像を構成する画素の数)番目の画素の画素値と、予め定められた閾値Th1との大小比較を行う。この閾値Th1は、白飛び領域に属する画素の画素値が取りうる下限値として予め定められたものである。   First, in step S301, the synthesis region extraction unit 103 determines the pixel value of the i-th pixel (1 ≦ i ≦ N: N is the number of pixels constituting one image) in the image, and a predetermined threshold Th1. Compare size with. This threshold value Th1 is predetermined as a lower limit value that can be taken by the pixel values of the pixels belonging to the whiteout region.

この大小比較の結果、i番目の画素の画素値<Th1の場合には処理をステップS302に進める。一方、i番目の画素の画素値≧Th1の場合、i番目の画素は白飛びしている画素と判断し、処理をステップS303に進める。   As a result of the size comparison, if the pixel value of the i-th pixel <Th1, the process proceeds to step S302. On the other hand, if the pixel value of the i-th pixel ≧ Th1, it is determined that the i-th pixel is a whiteout pixel, and the process proceeds to step S303.

ステップS302では、合成領域抽出部103は、画像中のi番目の画素の画素値と、予め定められた閾値Th2との大小比較を行う。この閾値Th2は、黒潰れ領域に属する画素の画素値が取りうる上限値として予め定められたものである。   In step S302, the composite region extraction unit 103 compares the pixel value of the i-th pixel in the image with a predetermined threshold Th2. This threshold value Th2 is predetermined as an upper limit value that can be taken by the pixel values of the pixels belonging to the blackout area.

この大小比較の結果、i番目の画素の画素値>Th2の場合(上限値より大きい場合)には処理をステップS304に進める。一方、i番目の画素の画素値≦Th2の場合(上限値以下の場合)、i番目の画素は黒潰れしている画素と判断し、処理をステップS303に進める。   As a result of the size comparison, if the pixel value of the i-th pixel> Th2 (when greater than the upper limit value), the process proceeds to step S304. On the other hand, when the pixel value of the i-th pixel ≦ Th2 (when the value is equal to or less than the upper limit value), the i-th pixel is determined to be a blackened pixel, and the process proceeds to step S303.

ステップS303では、i番目の画素についてはHDR合成の対象外とする。例えば、i番目の画素に対するフラグ値を0(HDR合成対象外画素)に設定する。その後、処理をステップS305に進める。   In step S303, the i-th pixel is not subject to HDR synthesis. For example, the flag value for the i-th pixel is set to 0 (non-HDR composition target pixel). Thereafter, the process proceeds to step S305.

一方、ステップS304では、i番目の画素についてはHDR合成対象とする。例えば、i番目の画素に対するフラグ値を1(HDR合成対象画素)に設定する。その後、処理をステップS305に進める。   On the other hand, in step S304, the i-th pixel is subject to HDR synthesis. For example, the flag value for the i-th pixel is set to 1 (HDR synthesis target pixel). Thereafter, the process proceeds to step S305.

ステップS305では、1つの画像を構成する全ての画素について上記処理を行った否かを判断する(i=Nか否かを判断する)。係る判断の結果、1つの画像を構成する全ての画素について上記処理を行った場合(i=N)、本画像に対する処理を終了する。一方、1つの画像を構成する全ての画素について上記処理を行っていない場合(i<N)、処理をステップS301に戻し、次の画素((i+1)番目の画素)についてステップS301以降の処理を行う。   In step S305, it is determined whether or not the above processing has been performed on all the pixels constituting one image (determines whether i = N). As a result of the determination, when the above processing is performed for all the pixels constituting one image (i = N), the processing for the main image is terminated. On the other hand, if the above processing is not performed for all the pixels constituting one image (i <N), the processing returns to step S301, and the processing after step S301 is performed for the next pixel ((i + 1) th pixel). Do.

図3のフローチャートに従った処理を行うことで、1つの画像から、HDR合成対象画素で構成されたHDR合成対象領域を求めることができる。これは例えば、フラグ値が1である画素で構成されている領域を、HDR合成対象領域として抽出しても良い。なお、上記閾値Th1、Th2は、画像撮影時の露出条件を考慮して、画像に応じて適宜設定する必要があるので、上記例に限定するものではない。   By performing the processing according to the flowchart of FIG. 3, it is possible to obtain an HDR synthesis target area composed of HDR synthesis target pixels from one image. For example, an area composed of pixels having a flag value of 1 may be extracted as an HDR synthesis target area. The threshold values Th1 and Th2 need not be limited to the above example because it is necessary to appropriately set the threshold values Th1 and Th2 according to the image in consideration of the exposure conditions at the time of image capturing.

次に、同輝度領域抽出部104、位置ずれ補正部105、HDR合成部106、HDR画像統合部107が行う処理について、同処理のフローチャートを示す図4を用いて以下説明する。   Next, processing performed by the luminance region extraction unit 104, the positional deviation correction unit 105, the HDR synthesis unit 106, and the HDR image integration unit 107 will be described below with reference to FIG. 4 showing a flowchart of the processing.

ステップS401において、同輝度領域抽出部104は先ず、各画像について合成領域抽出部103が抽出したHDR合成対象領域の輝度値を求める処理を行う。本実施形態では、段階露出画像を構成する各画像は何れも、RGB色空間で表される色形式を有するものとして説明するが、これに限定するものではない。RGB色空間からシーンの輝度値Yへの変換には、次の変換式を用いる(第2の手段)。   In step S401, the luminance area extraction unit 104 first performs processing for obtaining the luminance value of the HDR synthesis target area extracted by the synthesis area extraction unit 103 for each image. In the present embodiment, each of the images constituting the stepped exposure image is described as having a color format expressed in the RGB color space, but the present invention is not limited to this. For conversion from the RGB color space to the luminance value Y of the scene, the following conversion formula is used (second means).

Y=(0.299×R+0.587×G+0.114×B)×k
kは、段階露出画像中のある画像を取得したときの露出時間を基準としたときの、他の画像取得時における露光時間の長さの逆比から求められる係数を指す。ここでは、適正露出画像のkを1とし、露出時間が長い画像ほど小さい値となる。即ち、画像毎にkは異なり、ある画像から抽出したHDR合成対象領域を構成する各画素の輝度値Yは、この画像に対するkを用いて上記式により求める。
Y = (0.299 × R + 0.587 × G + 0.114 × B) × k
k indicates a coefficient obtained from the inverse ratio of the length of the exposure time at the time of obtaining another image when the exposure time at the time of obtaining an image in the stepwise exposure image is used as a reference. Here, k of a properly exposed image is set to 1, and an image having a longer exposure time has a smaller value. That is, k differs for each image, and the luminance value Y of each pixel constituting the HDR synthesis target region extracted from a certain image is obtained by the above formula using k for this image.

段階露出画像の各画像のRGBは、露出時間に比例した大きさとなることが知られている。従って、露出時間の逆比kを乗算することで、段階露出画像のデータを撮影シーンの輝度値のデータに統一することができる。   It is known that RGB of each image of the stepwise exposure image has a size proportional to the exposure time. Therefore, by multiplying the inverse ratio k of the exposure time, the data of the stepped exposure image can be unified with the brightness value data of the shooting scene.

次に、ステップS402では、同輝度領域抽出部104は、輝度レンジを複数種類、設定する。例えば、段階露出画像の各画像の最大輝度値が、図5に示す如く、露出時間が長い画像順に、Y1、Y2、Y3・・・(Y1<Y2<Y3<・・・)であれば、輝度レンジをY0〜Y1、Y1〜Y2、Y2〜Y3・・・と設定する。ここで、Y0は、最も露出時間の長い画像IM1の最小輝度値である。そして、同輝度領域抽出部104は、以降の処理で用いる輝度レンジとして先ず、Y0〜Y1を設定する。   Next, in step S402, the same brightness area extraction unit 104 sets a plurality of brightness ranges. For example, if the maximum luminance value of each image of the stepwise exposure image is Y1, Y2, Y3... (Y1 <Y2 <Y3 <. The luminance ranges are set as Y0 to Y1, Y1 to Y2, Y2 to Y3. Here, Y0 is the minimum luminance value of the image IM1 with the longest exposure time. Then, the luminance area extraction unit 104 first sets Y0 to Y1 as the luminance range used in the subsequent processing.

ステップS403では、同輝度領域抽出部104は、段階露出画像の各画像から、輝度値がY0〜Y1の範囲にある領域を同輝度領域として抽出する処理を行う。なお、係る抽出処理では、HDR合成対象領域を対象とし、白飛び領域や黒潰れ領域については対象外とする。   In step S403, the same luminance area extraction unit 104 performs processing for extracting, as the same luminance area, an area whose luminance value is in the range of Y0 to Y1 from each image of the stepwise exposure image. In this extraction process, the HDR synthesis target area is targeted, and the whiteout area and the blackout area are excluded.

段階露出画像中のある1つの画像から、同輝度領域抽出部104が輝度レンジ内の輝度値を有する領域を同輝度領域として抽出する処理、即ち、ステップS403における処理について、同処理のフローチャートを示す図6を用いて説明する。即ち、実際には、同輝度領域抽出部104は、段階露出画像を構成する各画像について、図6に示すフローチャートに従った処理を行う。   A flowchart of the same process is shown for the process in which the same brightness area extraction unit 104 extracts an area having a brightness value within the brightness range as the same brightness area from one image in the stepwise exposure image, that is, the process in step S403. This will be described with reference to FIG. In other words, actually, the luminance area extraction unit 104 performs processing according to the flowchart shown in FIG. 6 for each image constituting the stepwise exposure image.

先ず、ステップS601では、同輝度領域抽出部104は、画像中のHDR合成対象領域中のi(1≦i≦N:Nはこの画像のHDR合成対象領域を構成する画素の数)番目の画素の輝度値とY0との大小比較を行う。この大小比較の結果、i番目の画素の輝度値≧Y0の場合には処理をステップS602に進める。一方、i番目の画素の輝度値<Y0の場合、処理をステップS604に進める。   First, in step S601, the luminance region extraction unit 104 determines the i-th pixel (1 ≦ i ≦ N: N is the number of pixels constituting the HDR synthesis target region of this image) in the HDR synthesis target region in the image. The luminance value of Y is compared with Y0. As a result of the size comparison, if the luminance value of the i-th pixel ≧ Y0, the process proceeds to step S602. On the other hand, if the luminance value of the i-th pixel <Y0, the process proceeds to step S604.

ステップS602では、同輝度領域抽出部104は、画像中のHDR合成対象領域中のi番目の画素の輝度値とY1との大小比較を行う。この大小比較の結果、i番目の画素の輝度値<Y1の場合には処理をステップS603に進める。一方、i番目の画素の輝度値≧Y1の場合、処理をステップS604に進める。   In step S602, the luminance region extraction unit 104 compares the luminance value of the i-th pixel in the HDR synthesis target region in the image with Y1. If the luminance value of the i-th pixel <Y1 as a result of the size comparison, the process proceeds to step S603. On the other hand, if the luminance value of the i-th pixel ≧ Y1, the process proceeds to step S604.

ステップS603では、i番目の画素については抽出対象領域とする。例えば、i番目の画素に対するフラグ値を1(抽出対象領域)に設定する。その後、処理をステップS604に進める。   In step S603, the i-th pixel is set as an extraction target region. For example, the flag value for the i-th pixel is set to 1 (extraction target area). Thereafter, the process proceeds to step S604.

ステップS604では、HDR合成対象領域を構成する全ての画素について上記処理を行った否かを判断する(i=Nか否かを判断する)。係る判断の結果、HDR合成対象領域を構成する全ての画素について上記処理を行った場合(i=N)、本画像に対する処理を終了する。一方、HDR合成対象領域を構成する全ての画素について上記処理を行っていない場合(i<N)、処理をステップS601に戻し、次の画素((i+1)番目の画素)についてステップS601以降の処理を行う。   In step S604, it is determined whether or not the above processing has been performed for all the pixels constituting the HDR composition target region (determining whether i = N). As a result of such determination, when the above processing is performed for all the pixels constituting the HDR synthesis target region (i = N), the processing for the main image is terminated. On the other hand, when the above processing is not performed for all the pixels constituting the HDR synthesis target region (i <N), the processing returns to step S601, and the processing after step S601 is performed for the next pixel ((i + 1) th pixel). I do.

図6のフローチャートに従った処理を行うことで、1つの画像のHDR合成対象領域から、輝度レンジY0〜Y1内の輝度値を有する画素群で構成される領域を同輝度領域として抽出することができる。これは例えば、フラグ値が1である画素で構成されている領域を、同輝度領域として抽出しても良い。   By performing the processing according to the flowchart of FIG. 6, an area composed of pixel groups having luminance values in the luminance ranges Y0 to Y1 can be extracted as the same luminance area from the HDR synthesis target area of one image. it can. For example, an area composed of pixels having a flag value of 1 may be extracted as the same luminance area.

図4に戻って、次に、ステップS404では、位置ずれ補正部105は、段階露出画像の各画像を重ね合わせたときに、同輝度領域抽出部104が抽出したそれぞれの同輝度領域内の画像が一致するように、段階露出画像の各画像の位置を決める。係る処理では、段階露出画像中の任意の画像から抽出された同輝度領域を基準とし、この基準となる同輝度領域に対して、その他の画像から抽出された同輝度領域を重ね合わせる。   Returning to FIG. 4, next, in step S <b> 404, the positional deviation correction unit 105 extracts images in the same luminance region extracted by the same luminance region extraction unit 104 when the images of the stepwise exposure images are superimposed. The positions of the images of the stepwise exposure images are determined so that the two match. In this process, the same luminance region extracted from an arbitrary image in the stepwise exposure image is used as a reference, and the same luminance region extracted from other images is superimposed on this reference same luminance region.

更に、本ステップにおける処理の一例として、並進、回転、拡大縮小に伴う同輝度領域同士の位置ずれを補正する全***置補正を行った後で、精細位置補正として各画素間で並進のずれによる微小な位置ずれを補正する方法を示す。全***置補正では、並進や回転、スケール変換を扱うAffine変換を用いるのが容易である。Affine変換によって画像を変換する方法は次式のように定義される。   Furthermore, as an example of the processing in this step, after performing overall position correction that corrects the positional deviation between the same luminance areas due to translation, rotation, and enlargement / reduction, a minute positional deviation due to translational deviation between each pixel is performed as fine positional correction. A method for correcting a misalignment is shown. In the overall position correction, it is easy to use Affine conversion that handles translation, rotation, and scale conversion. A method for converting an image by Affine conversion is defined as follows.

|x’| |a b||x| |e|
| |=| || |+| |
|y’| |c d||y| |f|
画像Aに対して画像Bの位置ずれを補正する場合、即ち、画像Bの位置をAffine変換によって補正する場合には、この式における(x’、y’)は画像Aの座標位置、(x、y)はAffine変換によって補正する対象となる画像の座標位置となる。(a,b,c,d,e,f)は、並進、回転、スケール変換等を表すAffine変換のパラメータである。上記式に基づいて、画像Bの位置を補正することとなる。このようなAffine変換を用いて、同輝度領域抽出部104が抽出したそれぞれの同輝度領域内の画像が一致するように、それぞれの画像の位置を補正すればよい。
| X ′ | | a b || x | | e |
| | = | || | + | |
| Y ′ || cd || y || f |
When correcting the positional deviation of the image B with respect to the image A, that is, when correcting the position of the image B by Affine transformation, (x ′, y ′) in this equation is the coordinate position of the image A, (x , Y) is a coordinate position of an image to be corrected by Affine transformation. (A, b, c, d, e, f) are parameters for Affine transformation representing translation, rotation, scale transformation, and the like. Based on the above formula, the position of the image B is corrected. Using such Affine transformation, the position of each image may be corrected so that the images in the same luminance region extracted by the same luminance region extraction unit 104 match.

しかし、同輝度領域中で画素位置によって並進量が異なる場合には、画像中に歪みが生じている。たとえば、被写体の微妙な姿勢の違いは、画像中において数画素単位のずれとなって現れ、画像の歪みとなる。このような画素ごとに現れる歪みは、上記全***置補正で十分に補正することはできず、HDR画像形成の際に擬似輪郭の発生要因となってしまう。   However, when the translation amount varies depending on the pixel position in the same luminance region, distortion occurs in the image. For example, a subtle difference in the posture of the subject appears as a shift of several pixels in the image, resulting in image distortion. Such distortion appearing for each pixel cannot be sufficiently corrected by the above-described overall position correction, and becomes a cause of generation of a pseudo contour during HDR image formation.

そこで全***置補正では補正できない画像中の歪みを補正するために、次に、精細位置補正を行う。この精細位置補正は、画素単位で微小な位置ずれを補正することを目的とし、各画素間での並進量のみを補正する。   Therefore, in order to correct distortion in the image that cannot be corrected by the overall position correction, fine position correction is performed next. This fine position correction is intended to correct a minute positional shift in units of pixels, and corrects only the translation amount between pixels.

精細位置補正では、たとえば、ブロックマッチング法を用いる。図7に示すように、位置合わせ対象となっている2つの画像をブロック単位に分割する。そして、ブロックマッチング法により、ブロック中心のずれ量を検出する。係る処理では、ある画像のブロックに対応する、もう一方の画像のブロックを近傍で順次動かしながらサーチすればよい。   In the fine position correction, for example, a block matching method is used. As shown in FIG. 7, two images to be aligned are divided into blocks. Then, the block center shift amount is detected by the block matching method. In such processing, the search may be performed while sequentially moving the other image block corresponding to the block of the other image in the vicinity.

すべてのブロックの組み合わせに対して、ブロック中心のずれ量を検出した後、次に、同輝度領域中の各画素についてずれ量を算出する。画素単位でのずれ量の見積もりは、ブロック中心に該当する画素が保持するずれ量から線形補間等によって求めればよい。ブロックマッチング法の計算式については、下記の文献にあるような方法を用いるとよい。   After detecting the shift amount at the block center for all combinations of blocks, the shift amount is calculated for each pixel in the same luminance region. The estimation of the shift amount in pixel units may be obtained by linear interpolation or the like from the shift amount held by the pixel corresponding to the block center. As a calculation formula of the block matching method, a method as described in the following document may be used.

E. De Castro and C. Morandi "Registration of Translated and Rotated Images Using Finite Fourier Transforms", IEEE Transactions on pattern analysis and machine intelligence, Sept. 1987
すべての画素についてずれ量を求めた後、そのずれ量を用いて各画素を移動することで精細位置補正は終了する。以上のような位置補正処理によって、同輝度領域同士の位置合わせを行う。
E. De Castro and C. Morandi "Registration of Translated and Rotated Images Using Finite Fourier Transforms", IEEE Transactions on pattern analysis and machine intelligence, Sept. 1987
After obtaining the shift amount for all the pixels, the fine position correction is completed by moving each pixel using the shift amount. By the position correction process as described above, the same luminance areas are aligned.

もちろん、同様の目的を達成することができるのであれば、ステップS404において行う処理は、上記処理に限定するものではない。次に、ステップS405では、位置ずれ補正部105は、位置補正が十分に行われた否かを判定する。位置補正が十分か否かの判定は例えば、位置補正後の同輝度領域画像間での相関演算を行い、相関値がある閾値以上である場合には位置補正が十分とみなし、相関値がある閾値未満の場合には位置補正が不十分とみなす、といった方法により行うことが可能である。ステップS404での位置補正を行ったにも関わらず、同輝度領域同士の位置ずれが顕著である場合、ステップS406でのHDR合成は行わないとする。即ち、この場合には処理をステップS407に進める。   Of course, as long as the same object can be achieved, the process performed in step S404 is not limited to the above process. Next, in step S405, the positional deviation correction unit 105 determines whether or not the positional correction has been sufficiently performed. For example, whether or not the position correction is sufficient is performed by performing a correlation calculation between the same luminance region images after the position correction. It can be performed by such a method that the position correction is regarded as insufficient when it is less than the threshold value. Even if the position correction in step S404 is performed, if the positional deviation between the luminance areas is significant, the HDR synthesis in step S406 is not performed. That is, in this case, the process proceeds to step S407.

ステップS407では、HDR合成部106は、適正露出画像から抽出した該輝度レンジの画像領域を、後段のステップS409で使用するHDR画像の代替として設定する。   In step S407, the HDR synthesizing unit 106 sets the image area of the luminance range extracted from the proper exposure image as an alternative to the HDR image used in the subsequent step S409.

一方、位置補正が十分に行われた場合には、処理をステップS406に進める。ステップS406では、HDR合成部106が、同輝度領域の画像を合成し、HDR画像を生成する。HDR画像の生成では、HDR合成に用いる各画像の画素値RGBに各画像に対応する前述のkを乗じた値の平均値を、HDR画像の画素値とする。すなわち、HDR画像の画素値RGBは、下記式に基づいて求める。   On the other hand, if the position correction has been sufficiently performed, the process proceeds to step S406. In step S406, the HDR synthesizing unit 106 synthesizes images in the same luminance region and generates an HDR image. In the generation of an HDR image, an average value of values obtained by multiplying the pixel value RGB of each image used for HDR synthesis by the above-described k corresponding to each image is set as the pixel value of the HDR image. That is, the pixel value RGB of the HDR image is obtained based on the following formula.

RGBHDR=Σ(RGB×k)/n
ここで、nは合成に用いる画像の数であり、Σはiについて1からnまでの総和を示す。RGBは、i番目の画像の画素値を示している。kは、前述の、i番目の画像に対する露光時間の逆比である。なお、HDR画像形成には、特開2002-290829号公報に記載の技術を用いても良い。以上の処理により、輝度レンジY0〜Y1に属する輝度値を有する画素群で構成される領域、即ち同輝度領域について、擬似輪郭のないHDR画像を生成することができる。
RGB HDR = Σ (RGB i × k i ) / n
Here, n is the number of images used for composition, and Σ is the total from 1 to n for i. RGB i indicates the pixel value of the i-th image. k i is the inverse ratio of the exposure time for the i-th image described above. For HDR image formation, the technique described in JP-A-2002-290829 may be used. With the above processing, an HDR image without a pseudo contour can be generated for an area composed of pixel groups having luminance values belonging to the luminance ranges Y0 to Y1, that is, the same luminance area.

次に、ステップS402で設定した全ての輝度レンジについてステップS403〜ステップS407の処理を行った場合には処理をステップS408を介してステップS409に進める。一方、ステップS402で設定した全ての輝度レンジについてステップS403〜ステップS407の処理を行っていない場合には処理をステップS408を介してステップS402に戻し、未だ設定していない輝度レンジを設定し、以降の処理(動作)を行う。例えば本実施形態では最初に輝度レンジY0〜Y1を設定したので、次は輝度レンジY1〜Y2を設定し、ステップS403以降の処理を行う。このように、それぞれの輝度レンジを順次設定し、それぞれの輝度レンジに対するHDR画像を生成する。   Next, when the processes in steps S403 to S407 have been performed for all the luminance ranges set in step S402, the process proceeds to step S409 via step S408. On the other hand, if the processes in steps S403 to S407 have not been performed for all the brightness ranges set in step S402, the process returns to step S402 via step S408, and a brightness range that has not been set is set. The process (operation) is performed. For example, in the present embodiment, since the luminance ranges Y0 to Y1 are set first, the luminance ranges Y1 to Y2 are set next, and the processes after step S403 are performed. In this way, the respective luminance ranges are sequentially set, and an HDR image for each luminance range is generated.

これにより、処理をステップS409に進めた時点では、それぞれの輝度レンジについてHDR画像を取得していることになるので、ステップS409においてHDR画像統合部107は、それぞれのHDR画像を合成(統合)する。   As a result, since the HDR image is acquired for each luminance range at the time when the process proceeds to step S409, the HDR image integration unit 107 synthesizes (integrates) the respective HDR images in step S409. .

本実施形態では、各輝度レンジのHDR画像を統合する際には、段階露出画像中の適正露出画像(基準画像)内での輝度分布を参考に、各輝度レンジのHDR画像データを配置し、最終HDR画像の画像データを生成する。適正露出画像内での輝度分布を参考にするのは、適正露出画像は白飛びや黒潰れがないことが多く、撮影シーンの輝度値情報を十分に含んでいるためである。そこで、本実施形態では、最終HDR画像の画像データ生成時は、画像データとして適正露出画像の複製を用意しておき、その画像データに対して上書き(更新)する方法を採用する。   In the present embodiment, when integrating HDR images of each luminance range, the HDR image data of each luminance range is arranged with reference to the luminance distribution in the appropriate exposure image (reference image) in the stepwise exposure image, Image data of the final HDR image is generated. The reason why the luminance distribution in the proper exposure image is referred to is that the proper exposure image often has no whiteout or blackout, and sufficiently includes luminance value information of the shooting scene. Therefore, in the present embodiment, when the image data of the final HDR image is generated, a method of preparing a copy of the appropriate exposure image as the image data and overwriting (updating) the image data is adopted.

HDR画像データの配置とは、次のような処理を指す。例えば、輝度レンジY0〜Y1のHDR画像の配置を例にとる。輝度レンジY0〜Y1のHDR画像の重心となる画素位置(gx、gy)が、適正露出画像中で輝度レンジY0〜Y1の領域の重心となる画素の座標位置(Gx、Gy)となるように、輝度レンジY0〜Y1のHDR画像データを割り当てることである。これは、撮影シーンの輝度分布とHDR画像統合時の輝度分布とが同一となるように、撮影シーンの最終HDR画像を生成するためである。他の輝度レンジのHDR画像を配置する際にも同様のことがいえる。   The arrangement of HDR image data refers to the following processing. For example, an arrangement of HDR images with luminance ranges Y0 to Y1 is taken as an example. The pixel position (gx, gy) serving as the centroid of the HDR image in the luminance range Y0 to Y1 is the coordinate position (Gx, Gy) of the pixel serving as the centroid of the area of the luminance range Y0 to Y1 in the appropriate exposure image. , Assigning HDR image data of luminance ranges Y0 to Y1. This is because the final HDR image of the shooting scene is generated so that the luminance distribution of the shooting scene and the luminance distribution at the time of HDR image integration are the same. The same can be said when arranging HDR images in other luminance ranges.

また本実施形態においてHDR画像の配置では、配置するHDR画像の輝度値が昇順又は降順となるように、即ち輝度値の小さいHDR画像から順に配置し、複製した適正露出画像の画像データを上書きする。または、輝度値の大きいHDR画像から順に配置し、複製した適正露出画像の画像データを上書きする。   In this embodiment, the HDR image is arranged so that the luminance values of the arranged HDR images are in ascending order or descending order, that is, in order from the HDR image having the smallest luminance value, and the image data of the copied proper exposure image is overwritten. . Alternatively, the images are arranged in order from the HDR image having the largest luminance value, and the copied image data of the proper exposure image is overwritten.

なお、HDR画像配置時の輝度の降順、昇順は、輝度レンジごとの面積により決定するとし、輝度レンジごとのHDR画像のうち、面積の大きいHDR画像ほど後半で配置する。輝度レンジごとの面積は、適正露出画像の平均輝度YAVEと中間輝度値YMIDから簡易的に推定する。簡易的にとは、本実施形態では、YAVE>YMIDであれば、輝度の高い部位の面積が大きいと判断する。 It is assumed that the descending and increasing order of the luminance when the HDR image is arranged is determined by the area for each luminance range, and among the HDR images for each luminance range, the HDR image having a larger area is arranged in the latter half. The area for each luminance range is simply estimated from the average luminance Y AVE and the intermediate luminance value Y MID of the properly exposed image. In the present embodiment, in this embodiment, if Y AVE > Y MID , it is determined that the area of the portion with high luminance is large.

図8は、HDR画像統合部107が行う画像統合処理、即ち、上記ステップS409における処理の詳細を示すフローチャートである。先ず、ステップS801では、適正露出画像の最小輝度値YMINと最大輝度値YMAXとから、次式より適正露出画像の中間輝度値YMIDを算出する。 FIG. 8 is a flowchart showing details of the image integration process performed by the HDR image integration unit 107, that is, the process in step S409. First, in step S801, an intermediate luminance value Y MID of a proper exposure image is calculated from the following equation from the minimum luminance value Y MIN and the maximum luminance value Y MAX of the proper exposure image.

MID=(YMIN+YMAX)/2
次に、ステップS802では、適正露出画像の平均輝度値YAVEを算出する。次に、ステップS803では、各輝度レンジのHDR画像を配置する際の昇順、降順を決定するために、中間輝度値YMIDと平均輝度値YAVEとの大小比較処理を行う。係る大小比較処理の結果、YAVE>YMIDである場合には、処理をステップS804に進める。ステップS804では、輝度レンジの低いHDR画像から順に、上述のように適正露出画像への統合処理を行う。なお、確保した画像領域内に各輝度レンジのHDR画像を順次配置した際に、HDR画像同士の領域が重なる際には、輝度レンジの高い方のHDR画像を優先する。つまり、重なった領域は、輝度レンジの高い方のHDR画像のデータで上書きする。
Y MID = (Y MIN + Y MAX ) / 2
Next, in step S802, an average luminance value Y AVE of a properly exposed image is calculated. Next, in step S803, a magnitude comparison process between the intermediate luminance value Y MID and the average luminance value Y AVE is performed in order to determine the ascending order and descending order when the HDR images of each luminance range are arranged. If Y AVE > Y MID as a result of the size comparison process, the process advances to step S804. In step S804, the integration processing into the proper exposure image is performed in order from the HDR image with the low luminance range in the order described above. Note that when HDR images of each luminance range are sequentially arranged in the secured image region, when the regions of the HDR images overlap, the HDR image with the higher luminance range is prioritized. That is, the overlapped area is overwritten with the data of the HDR image with the higher luminance range.

一方、YAVE≦YMIDの場合には、処理をステップS805に進める。ステップS805では、輝度レンジの高いHDR画像から順に、上述のように適正露出画像への統合処理を行う。その際、各輝度レンジのHDR画像同士で領域が重なる際には、その領域は、輝度レンジの低い方のHDR画像を優先する。以上のようにして、HDR画像統合部107は最終HDR画像を生成する。 On the other hand, if Y AVE ≦ Y MID , the process advances to step S805. In step S805, the integration processing into the proper exposure image is performed in the order from the HDR image with the high luminance range in order. At that time, when the regions overlap each other in the HDR images of each luminance range, the region gives priority to the HDR image having the lower luminance range. As described above, the HDR image integration unit 107 generates a final HDR image.

なお、この最終HDR画像はその後、ディスプレイなどの表示装置上に表示しても良いし、ファイルとして記憶媒体に記録しても良い。即ち、最終HDR画像の出力先については特に限定するものではない。   The final HDR image may be displayed on a display device such as a display afterwards, or may be recorded as a file on a storage medium. That is, the output destination of the final HDR image is not particularly limited.

以上説明したように、第1の実施形態によれば、撮影シーンのHDR画像を生成する際に、撮影シーンの中で同輝度レンジを持つ領域毎に位置補正とHDR合成を行うことにより、擬似輪郭のないHDR画像を生成することができる。   As described above, according to the first embodiment, when an HDR image of a shooting scene is generated, position correction and HDR synthesis are performed for each region having the same luminance range in the shooting scene, so that the simulation is performed. An HDR image without a contour can be generated.

<変形例>
第1の実施形態では、輝度レンジを変更しながら、すべての輝度レンジ毎に画像を抽出し、位置補正を施したのちにHDR画像を生成し、それらのHDR画像を統合して最終的なHDR画像を生成した。
<Modification>
In the first embodiment, while changing the luminance range, an image is extracted for every luminance range, position correction is performed, an HDR image is generated, and those HDR images are integrated to obtain a final HDR. An image was generated.

しかし、すべての輝度レンジについて位置補正を施す必要はなく、HDR画像を生成する際に位置補正処理を施す輝度レンジを指定(選択)してもよい。例えば、各輝度レンジの画像領域の大きさを比較し、面積が最大となる輝度レンジに対してのみ、位置補正を行うとしてもよい。   However, it is not necessary to perform position correction for all the luminance ranges, and a luminance range to be subjected to position correction processing may be specified (selected) when generating an HDR image. For example, the size of the image area of each luminance range may be compared, and the position correction may be performed only for the luminance range having the maximum area.

[第2の実施形態]
第1の実施形態(変形例を含む)では、図1に示した各部は全てハードウェアでもって構成されており、且つ画像処理装置がこれら全てのハードウェアを含むものとして説明した。しかし、合成領域抽出部103、同輝度領域抽出部104、位置ずれ補正部105、HDR合成部106、HDR画像統合部107のそれぞれをソフトウェアで実装し、これらのソフトウェアをPC(パーソナルコンピュータ)等のコンピュータに格納しても良い。この場合、このコンピュータが有するCPUが係るソフトウェアを実行することで、このコンピュータは、これらの各部の機能を実現することになる。なお、その場合には当然、このコンピュータには、撮像装置190が接続されることになり、このコンピュータはこの撮像装置190から段階露出画像を取得し、この段階露出画像を用いて処理を行うことになる。
[Second Embodiment]
In the first embodiment (including the modified example), all the units illustrated in FIG. 1 are configured by hardware, and the image processing apparatus includes all these hardware. However, each of the synthesis region extraction unit 103, the same luminance region extraction unit 104, the misregistration correction unit 105, the HDR synthesis unit 106, and the HDR image integration unit 107 is implemented by software, and these software are installed on a PC (personal computer) or the like. You may store in a computer. In this case, the computer realizes the functions of these units by executing the software related to the CPU of the computer. In this case, of course, an imaging device 190 is connected to the computer, and the computer acquires a stepped exposure image from the imaging device 190 and performs processing using the stepped exposure image. become.

図9は、合成領域抽出部103、同輝度領域抽出部104、位置ずれ補正部105、HDR合成部106、HDR画像統合部107のそれぞれに対応するソフトウェアを実行するコンピュータのハードウェア構成例を示すブロック図である。   FIG. 9 shows a hardware configuration example of a computer that executes software corresponding to each of the synthesis region extraction unit 103, the luminance region extraction unit 104, the misregistration correction unit 105, the HDR synthesis unit 106, and the HDR image integration unit 107. It is a block diagram.

CPU901は、RAM902やROM903に格納されているコンピュータプログラムやデータを用いて本コンピュータ全体の制御を行うと共に、上記画像処理装置が行うものとして上述した各処理を実行する。   The CPU 901 controls the entire computer using computer programs and data stored in the RAM 902 and the ROM 903, and executes the processes described above as performed by the image processing apparatus.

RAM902は、外部記憶装置906からロードされたコンピュータプログラムやデータ、I/F(インターフェース)907を介して撮像装置190から受信した段階露出画像を一時的に記憶するためのエリアを有する。更にRAM902は、CPU901が各種の処理を実行する際に用いるワークエリアも有する。即ち、RAM902は、各種のエリアを適宜提供することができる。ROM903には、本コンピュータの設定データや、ブートプログラム等が格納されている。   The RAM 902 has an area for temporarily storing the computer program and data loaded from the external storage device 906 and the stepped exposure image received from the imaging device 190 via the I / F (interface) 907. Further, the RAM 902 also has a work area used when the CPU 901 executes various processes. That is, the RAM 902 can provide various areas as appropriate. The ROM 903 stores setting data for the computer, a boot program, and the like.

操作部904は、キーボードやマウスなどにより構成されており、本コンピュータの操作者が操作することで、各種の指示をCPU901に対して入力することができる。表示装置905は、CRTや液晶画面などにより構成されており、CPU901による処理結果を画像や文字などでもって表示することができる。例えば、段階露出画像中の各画像や、同輝度領域、上述の最終HDR画像等、をこの表示装置905の表示画面上に表示しても良い。   The operation unit 904 is configured by a keyboard, a mouse, and the like, and can input various instructions to the CPU 901 by being operated by an operator of the computer. The display device 905 is configured by a CRT, a liquid crystal screen, or the like, and can display a processing result by the CPU 901 with an image, text, or the like. For example, each image in the stepwise exposure image, the same luminance region, the above-described final HDR image, and the like may be displayed on the display screen of the display device 905.

外部記憶装置906は、ハードディスクドライブ装置に代表される大容量情報記憶装置である。外部記憶装置906には、例えば次のような情報が保存されている。即ち、OS(オペレーティングシステム)や、合成領域抽出部103、同輝度領域抽出部104、位置ずれ補正部105、HDR合成部106、HDR画像統合部107の各部の機能をCPU901に実現させる為のコンピュータプログラム等が保存されている。もちろん、段階露出画像を予め取得してこの外部記憶装置906に保存しておいても良い。   The external storage device 906 is a large-capacity information storage device represented by a hard disk drive device. The external storage device 906 stores the following information, for example. That is, a computer for causing the CPU 901 to realize the functions of the OS (operating system), the synthesis region extraction unit 103, the luminance region extraction unit 104, the misregistration correction unit 105, the HDR synthesis unit 106, and the HDR image integration unit 107. Programs are stored. Of course, a stepped exposure image may be acquired in advance and stored in the external storage device 906.

外部記憶装置906に保存されているコンピュータプログラムやデータは、CPU901による制御に従って適宜RAM902にロードされ、CPU901による処理対象となる。   Computer programs and data stored in the external storage device 906 are appropriately loaded into the RAM 902 under the control of the CPU 901 and are processed by the CPU 901.

I/F907には、上記撮像装置190が接続され、撮像装置190によって撮像された段階露出画像は、このI/F907を介してRAM902や外部記憶装置906に格納される。908は上述の各部を繋ぐバスである。   The imaging device 190 is connected to the I / F 907, and the stepwise exposure image captured by the imaging device 190 is stored in the RAM 902 or the external storage device 906 via the I / F 907. Reference numeral 908 denotes a bus connecting the above-described units.

また、本発明は、前述した実施形態の機能をコンピュータに実現させるためのコンピュータプログラムや、これを記録したコンピュータ読み取り可能な記憶媒体、によっても達成しうることは自明である。   It is obvious that the present invention can also be achieved by a computer program for causing a computer to realize the functions of the above-described embodiments and a computer-readable storage medium that records the computer program.

Claims (9)

露出を変化させながら撮影された複数枚の画像を入力する手段と、
前記複数枚の画像のそれぞれから、設定された輝度レンジ内の輝度値を有する領域を抽出する抽出手段と、
前記抽出手段が抽出したそれぞれの領域内の画像の位置ずれを補正する補正手段と、
前記補正手段が補正した領域を含む前記抽出手段が抽出した領域内の画像を合成した結果を、HDR画像として生成する合成手段と、
複数種類の異なる輝度レンジを順次設定し、設定した輝度レンジについて前記抽出手段、前記補正手段、前記合成手段を動作させることで、それぞれの輝度レンジに対するHDR画像を生成する手段と、
前記複数枚の画像のうち基準として選択された基準画像に対して、それぞれの輝度レンジに対するHDR画像を合成することで、前記基準画像を更新する更新手段と
を備えることを特徴とする画像処理装置。
Means for inputting a plurality of images taken while changing the exposure;
An extraction means for extracting a region having a luminance value within a set luminance range from each of the plurality of images;
Correction means for correcting the positional deviation of the image in each region extracted by the extraction means;
A synthesizing unit that generates, as an HDR image, a result of synthesizing an image in the region extracted by the extracting unit including the region corrected by the correcting unit;
Means for sequentially setting a plurality of different luminance ranges, and generating HDR images for the respective luminance ranges by operating the extracting means, the correcting means, and the synthesizing means for the set luminance ranges;
An image processing apparatus comprising: an update unit that updates the reference image by synthesizing an HDR image for each luminance range with a reference image selected as a reference among the plurality of images. .
前記抽出手段は、
白飛び領域に属する画素が取りうる下限値よりも小さく、黒潰し領域に属する画素が取りうる上限値よりも大きい画素値を有する領域を、前記複数枚の画像のそれぞれから抽出する第1の手段と、
前記第1の手段が抽出したそれぞれの領域から、前記設定された輝度レンジ内の輝度値を有する領域を抽出する第2の手段と
を備えることを特徴とする請求項1に記載の画像処理装置。
The extraction means includes
First means for extracting, from each of the plurality of images, an area having a pixel value that is smaller than a lower limit value that can be taken by a pixel that belongs to a whiteout area and greater than an upper limit value that can be taken by a pixel that belongs to a blackout area When,
2. The image processing apparatus according to claim 1, further comprising: a second unit that extracts a region having a luminance value within the set luminance range from each region extracted by the first unit. .
前記第2の手段は、前記第1の手段が抽出したそれぞれの領域内の輝度値を、各画像の露出時間に応じて補正し、補正した輝度値が、前記設定された輝度レンジ内の輝度値となる領域を抽出することを特徴とする請求項1又は2に記載の画像処理装置。   The second means corrects the luminance value in each area extracted by the first means according to the exposure time of each image, and the corrected luminance value is the luminance within the set luminance range. The image processing apparatus according to claim 1, wherein a region to be a value is extracted. 前記補正手段は、前記複数枚の画像を重ねた場合に、前記抽出手段が抽出したそれぞれの領域が一致するように、それぞれの画像の位置ずれを補正することを特徴とする請求項1乃至3の何れか1項に記載の画像処理装置。   The correction means corrects the positional deviation of each image so that the respective areas extracted by the extraction means match when the plurality of images are overlapped. The image processing apparatus according to any one of the above. 前記合成手段は、合成する領域の重心となる画素位置が、合成される領域の重心となる画素の座標位置となるように、これらの領域を合成する処理を、それぞれの領域について行うことで、HDR画像を生成することを特徴とする請求項1乃至4の何れか1項に記載の画像処理装置。   The synthesizing unit performs the process of synthesizing these areas for each area so that the pixel position serving as the center of gravity of the area to be synthesized becomes the coordinate position of the pixel serving as the center of gravity of the area to be synthesized. The image processing apparatus according to claim 1, wherein an HDR image is generated. 前記更新手段は、
前記基準画像の平均輝度値YAVEと中間輝度値YMIDとの大小比較を行う手段と、
AVE<YMIDである場合には、輝度レンジの低いHDR画像から順に前記基準画像に対して合成し、YAVE≧YMIDである場合には、輝度レンジの高いHDR画像から順に前記基準画像に対して合成する手段と
を備えることを特徴とする請求項2に記載の画像処理装置。
The updating means includes
Means for comparing the average luminance value Y AVE and the intermediate luminance value Y MID of the reference image;
If a Y AVE <Y MID combines with respect to the reference image in order from the lower HDR image luminance range, Y AVEY when a MID, the reference image from the high HDR image luminance range in the order The image processing apparatus according to claim 2, further comprising:
露出を変化させながら撮影された複数枚の画像を入力する工程と、
前記複数枚の画像のそれぞれから、設定された輝度レンジ内の輝度値を有する領域を抽出する抽出工程と、
前記抽出工程で抽出したそれぞれの領域内の画像の位置ずれを補正する補正工程と、
前記補正工程で補正した領域を含む前記抽出工程で抽出した領域内の画像を合成した結果を、HDR画像として生成する合成工程と、
複数種類の異なる輝度レンジを順次設定し、設定した輝度レンジについて前記抽出工程、前記補正工程、前記合成工程を動作させることで、それぞれの輝度レンジに対するHDR画像を生成する工程と、
前記複数枚の画像のうち基準として選択された基準画像に対して、それぞれの輝度レンジに対するHDR画像を合成することで、前記基準画像を更新する更新工程と
を備えることを特徴とする画像処理方法。
Inputting a plurality of images taken while changing the exposure;
An extraction step of extracting a region having a luminance value within a set luminance range from each of the plurality of images;
A correction step of correcting the positional deviation of the image in each region extracted in the extraction step;
A synthesis step of generating, as an HDR image, a result of combining the images in the region extracted in the extraction step including the region corrected in the correction step;
A step of sequentially setting a plurality of different luminance ranges, and generating an HDR image for each luminance range by operating the extraction step, the correction step, and the synthesis step for the set luminance range;
An update process for updating the reference image by synthesizing an HDR image for each luminance range with a reference image selected as a reference among the plurality of images. .
コンピュータを、請求項1乃至6の何れか1項に記載の画像処理装置が有する各手段として機能させるためのコンピュータプログラム。   The computer program for functioning a computer as each means which the image processing apparatus of any one of Claims 1 thru | or 6 has. 請求項8に記載のコンピュータプログラムを格納した、コンピュータ読み取り可能な記憶媒体。   A computer-readable storage medium storing the computer program according to claim 8.
JP2009130936A 2009-05-29 2009-05-29 Image forming apparatus, and image forming method Withdrawn JP2010278890A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009130936A JP2010278890A (en) 2009-05-29 2009-05-29 Image forming apparatus, and image forming method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009130936A JP2010278890A (en) 2009-05-29 2009-05-29 Image forming apparatus, and image forming method

Publications (1)

Publication Number Publication Date
JP2010278890A true JP2010278890A (en) 2010-12-09

Family

ID=43425410

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009130936A Withdrawn JP2010278890A (en) 2009-05-29 2009-05-29 Image forming apparatus, and image forming method

Country Status (1)

Country Link
JP (1) JP2010278890A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8902328B2 (en) 2013-03-14 2014-12-02 Konica Minolta Laboratory U.S.A., Inc. Method of selecting a subset from an image set for generating high dynamic range image
US9747675B2 (en) 2013-11-14 2017-08-29 Nec Corporation Image processing system
KR101789992B1 (en) 2014-01-10 2017-10-25 퀄컴 인코포레이티드 System and method for capturing digital images using multiple short exposures
JP2018504790A (en) * 2015-12-08 2018-02-15 ▲楽▼視控股(北京)有限公司Le Holdings(Beijing)Co.,Ltd. High dynamic range image generation method and apparatus
JP2018530031A (en) * 2015-07-16 2018-10-11 トムソン ライセンシングThomson Licensing Method and device for tone mapping a picture using a parametric tone adjustment function
CN110266965A (en) * 2019-06-28 2019-09-20 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN111866399A (en) * 2019-04-26 2020-10-30 佳能株式会社 Image processing apparatus, control method thereof, and computer readable medium

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8902328B2 (en) 2013-03-14 2014-12-02 Konica Minolta Laboratory U.S.A., Inc. Method of selecting a subset from an image set for generating high dynamic range image
US9747675B2 (en) 2013-11-14 2017-08-29 Nec Corporation Image processing system
KR101789992B1 (en) 2014-01-10 2017-10-25 퀄컴 인코포레이티드 System and method for capturing digital images using multiple short exposures
US10091434B2 (en) 2014-01-10 2018-10-02 Qualcomm Incorporated System and method for capturing digital images using multiple short exposures
JP2018530031A (en) * 2015-07-16 2018-10-11 トムソン ライセンシングThomson Licensing Method and device for tone mapping a picture using a parametric tone adjustment function
US11182882B2 (en) 2015-07-16 2021-11-23 Interdigital Madison Patent Holdings, Sas Method and device for tone-mapping a picture by using a parametric tone-adjustment function
JP2018504790A (en) * 2015-12-08 2018-02-15 ▲楽▼視控股(北京)有限公司Le Holdings(Beijing)Co.,Ltd. High dynamic range image generation method and apparatus
CN111866399A (en) * 2019-04-26 2020-10-30 佳能株式会社 Image processing apparatus, control method thereof, and computer readable medium
CN111866399B (en) * 2019-04-26 2022-06-28 佳能株式会社 Image processing apparatus, control method thereof, and computer readable medium
CN110266965A (en) * 2019-06-28 2019-09-20 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN110266965B (en) * 2019-06-28 2021-06-01 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN106797437B (en) High dynamic range image synthesis using multiple images
CN110378859B (en) Novel high dynamic range image generation method
JP6081726B2 (en) HDR video generation apparatus and method with ghost blur removed on multiple exposure fusion base
KR101225482B1 (en) Digital image processing method, apparatus, and computer-readable recording medium
JP2011004353A (en) Image processing apparatus, and image processing method
KR101609491B1 (en) Image compositing device, image compositing method and recording medium
JP5713752B2 (en) Image processing apparatus and control method thereof
EP2624204B1 (en) Image processing apparatus and method of controlling the same
JP5408053B2 (en) Image processing apparatus and image processing method
JP2010278890A (en) Image forming apparatus, and image forming method
WO2016019770A1 (en) Method, device and storage medium for picture synthesis
US20120127336A1 (en) Imaging apparatus, imaging method and computer program
KR20110035981A (en) Image processing apparatus, image processing method, and storage medium
JP6087612B2 (en) Image processing apparatus and image processing method
KR20150145725A (en) Method and apparatus for dynamic range expansion of ldr video sequence
JP2017011327A (en) Image processing apparatus, image processing method, and program
JP2015144475A (en) Imaging apparatus, control method of the same, program and storage medium
JP5765893B2 (en) Image processing apparatus, imaging apparatus, and image processing program
CN114820405A (en) Image fusion method, device, equipment and computer readable storage medium
Chaurasiya et al. High dynamic range imaging
TW201806378A (en) Information processing device, information processing method, and program
JP7057079B2 (en) Image processing device, image pickup device, image processing method, and program
JP5713643B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2009200743A (en) Image processor, image processing method, image processing program and imaging apparatus
KR101437898B1 (en) Apparatus and method for generating a High Dynamic Range image using single image

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