JP2023064501A - Image processing device and image processing method - Google Patents
Image processing device and image processing method Download PDFInfo
- Publication number
- JP2023064501A JP2023064501A JP2021174826A JP2021174826A JP2023064501A JP 2023064501 A JP2023064501 A JP 2023064501A JP 2021174826 A JP2021174826 A JP 2021174826A JP 2021174826 A JP2021174826 A JP 2021174826A JP 2023064501 A JP2023064501 A JP 2023064501A
- Authority
- JP
- Japan
- Prior art keywords
- data
- image
- image processing
- frames
- processing apparatus
- 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.)
- Granted
Links
Images
Landscapes
- Studio Devices (AREA)
Abstract
【課題】有効画素領域外の画素値を適切に利用可能な画像合成が可能な画像処理装置および画像処理方法を提供すること。【解決手段】複数フレームの画像データを位置合わせして合成する画像処理装置である。画像データには撮像素子の有効画素領域の画素のデータであって、所定の色成分の配列に対応する信号で構成される第1のデータと、有効画素領域外の画素のデータである第2のデータが含まれる。画像処理装置は、第1のデータを、第2のデータとは独立して位置合わせ可能である。【選択図】図3An object of the present invention is to provide an image processing apparatus and an image processing method capable of performing image synthesis in which pixel values outside an effective pixel area are appropriately used. Kind Code: A1 An image processing apparatus aligns and synthesizes image data of a plurality of frames. The image data includes first data of pixels in the effective pixel area of the image sensor, which is composed of signals corresponding to an arrangement of predetermined color components, and second data of pixels outside the effective pixel area. data is included. The image processor can align the first data independently of the second data. [Selection drawing] Fig. 3
Description
本発明は、画像処理装置および画像処理方法に関し、特には画像合成技術に関する。 The present invention relates to an image processing device and an image processing method, and more particularly to image synthesizing technology.
必要な露光時間の1/nの露光時間で連続に撮影したn枚の複数枚の画像を合成することにより、像ブレを抑制する技術が知られている(特許文献1)。 There is known a technique for suppressing image blur by synthesizing a plurality of n images that are continuously shot with an exposure time that is 1/n of the required exposure time (Patent Document 1).
複数の画像を合成する場合、画像間の位置合わせが必要になる。しかしながら、画像間で単純に位置合わせすると、有効画素領域外の画素は、位置がずれた状態で合成されることになる。そのため、有効画素領域外の画素の値を利用したい場合に問題が生じる。特許文献1はこのような課題について認識していない。 When merging a plurality of images, it is necessary to align the images. However, if the images are simply aligned, the pixels outside the effective pixel area will be synthesized with their positions shifted. Therefore, a problem arises when it is desired to use the values of pixels outside the effective pixel area. Patent document 1 does not recognize such a problem.
本発明はこのような従来技術の課題に鑑みてなされたものであり、その一態様において、有効画素領域外の画素値を適切に利用可能な画像合成が可能な画像処理装置および画像処理方法を提供する。 The present invention has been made in view of such problems in the prior art, and one aspect of the present invention provides an image processing apparatus and an image processing method capable of synthesizing an image in which pixel values outside the effective pixel region can be appropriately used. offer.
上述の目的は、複数フレームの画像データを取得する取得手段と、複数フレームの画像データを位置合わせする位置合わせ手段と、位置合わせされた複数フレームの画像データを合成する合成手段と、を有し、画像データには、撮像素子の有効画素領域の画素のデータであって、所定の色成分の配列に対応する信号で構成される第1のデータと、有効画素領域外の画素のデータである第2のデータが含まれ、位置合わせ手段が、第1のデータを、第2のデータとは独立して位置合わせ可能である、ことを特徴とする画像処理装置によって達成される。 The above object has acquisition means for acquiring multiple frames of image data, alignment means for aligning the multiple frames of image data, and synthesizing means for synthesizing the aligned multiple frames of image data. , the image data includes first data of pixels in the effective pixel area of the image pickup device, which is composed of signals corresponding to an arrangement of predetermined color components, and data of pixels outside the effective pixel area. Accomplished by an image processing apparatus characterized in that second data is included and the registration means are capable of registering the first data independently of the second data.
本発明によれば、有効画素領域外の画素値を適切に利用可能な画像合成が可能な画像処理装置および画像処理方法を提供することができる。 According to the present invention, it is possible to provide an image processing apparatus and an image processing method capable of performing image synthesis in which pixel values outside the effective pixel area are appropriately used.
以下、添付図面を参照して本発明をその例示的な実施形態に基づいて詳細に説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定しない。また、実施形態には複数の特徴が記載されているが、その全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 The invention will now be described in detail on the basis of its exemplary embodiments with reference to the accompanying drawings. In addition, the following embodiments do not limit the invention according to the scope of claims. In addition, although a plurality of features are described in the embodiments, not all of them are essential to the invention, and the plurality of features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant description is omitted.
なお、以下では、本発明をデジタルカメラなどの撮像装置で実施する形態に関して説明する。しかし、本発明に撮像機能は必須でなく、画像データを取り扱い可能な任意の電子機器で実施可能である。このような電子機器には、コンピュータ機器(パーソナルコンピュータ、タブレットコンピュータ、メディアプレーヤ、PDAなど)、スマートフォン、ゲーム機、ロボット、ドローン、ドライブレコーダが含まれる。これらは例示であり、本発明は他の電子機器でも実施可能である。 In addition, below, the form which implements this invention by imaging devices, such as a digital camera, is demonstrated. However, the imaging function is not essential to the present invention, and can be implemented in any electronic device capable of handling image data. Such electronic devices include computer devices (personal computers, tablet computers, media players, PDAs, etc.), smart phones, game consoles, robots, drones, and drive recorders. These are examples, and the present invention can also be implemented in other electronic devices.
図1は、本発明の一実施形態に係る画像処理装置の一例としての撮像装置10の機能構成例を示すブロック図である。
FIG. 1 is a block diagram showing an example functional configuration of an
制御部113は、プログラムを実行可能なプロセッサを1つ以上と、RAMと、ROMとを有する。制御部113は、ROMに記憶されたプログラムをRAMに読み込み、プロセッサによって実行することができる。制御部113は、プログラムを実行することにより、図1に示す機能ブロックを含む撮像装置10の構成要素、および/または通信可能に接続された外部機器の動作を制御する。撮像装置10の機能は、制御部113がプログラムを実行することにより実施することができる。なお、制御部113がプログラムを実行することによって実現可能な機能をハードウェア(例えばASICやFPGAなど)を用いて実施してもよい。ROMは例えば電気的に書き換え可能であり、制御部113が有するプロセッサが実行可能なプログラムのほか、撮像装置10の設定値、GUIデータなどを記憶する。制御部113は例えばシステムオンチップ(SoC)やシステムオンパッケージ(SiP)の形態を有しうる。
The
撮影レンズ100は複数のレンズおよび絞りを有し、被写体の光学像を生成する。撮像素子102は例えばCMOSイメージセンサであり、2次元配列された複数の光電変換部(画素)を有する。
A photographing
図2は撮像素子102の画素配列を模式的に示した図である。撮像素子102は、画素が配列された領域として、有効画素領域200と、有効画素領域外のオプティカルブラック(OB)領域201とを有する。有効画素領域202は、被写体像の撮影に用いられる(露光される)領域である。一方、OB領域201は被写体像の撮影には用いられない(露光されない)領域である。OB領域201の画素には、光の入射を防止するために例えば遮光膜を設けてもよい。
FIG. 2 is a diagram schematically showing the pixel arrangement of the
OB領域201に配置される画素は、遮光膜を除けば、有効画素領域200に配置される画素と同じ構造を有する。また、有効画素領域200の画素にカラーフィルタが設けられている場合、OB領域201の画素にも有効画素領域200の画素と同様にカラーフィルタが設けられる。
The pixels arranged in the
有効画素領域200およびOB領域201は撮像素子102の領域であるが、本明細書では便宜上、撮像素子102によって得られる画像においても同様の表現を用いる。例えば、画像もしくは有効画素領域とは、撮影によって得られる1フレームの画像のうち、撮像素子102の有効画素領域200の画素によって得られる画像領域を意味する。
Although the
カラーフィルタは異なる色の単位フィルタが配列された構成を有し、画素ごとに1つの単位フィルタが設けられる。例えば原色ベイヤ配列のカラーフィルタは、2×2画素を繰り返し単位として、R(赤)、G1(緑)、G2(緑)、B(青)の4種類の単位フィルタが配列された構成を有する。以下では、単位フィルタG1が設けられた画素をG1画素と呼ぶ。他の種類の単位フィルタが設けられた画素についても同様である。 The color filter has a configuration in which unit filters of different colors are arranged, and one unit filter is provided for each pixel. For example, a primary-color Bayer array color filter has a configuration in which four types of unit filters, R (red), G1 (green), G2 (green), and B (blue), are arranged in a repeating unit of 2×2 pixels. . Below, the pixel provided with the unit filter G1 is called a G1 pixel. The same applies to pixels provided with other types of unit filters.
OB領域201に配置される画素は、例えば、画素が有する光電変換素子(例えばフォトダイオード)のノイズ成分を検出するために用いられる。例えば、有効画素領域200の画素の信号値から、OB領域201の画素の信号値を減じることにより、ノイズ成分によるオフセットを除去し、画像の黒レベルを補正することができる。
Pixels arranged in the
撮像素子102が有する画素は、電荷蓄積期間に発生した電荷量に応じた値を有する画素信号を生成する。なお、メカニカルシャッタ101を開閉させる撮影では、電荷蓄積期間は露光期間に相当する。メカニカルシャッタ101を開状態に維持する撮影では、電荷蓄積期間は蓄積電荷のリセット時から露光期間経過までの期間に相当する。一般に前者は静止画撮影、後者は動画撮影に相当するが、後者は静止画撮影にも該当しうる。
A pixel included in the
1回の電荷蓄積期間が終了すると、撮像素子102から、1フレーム分の画素信号群(アナログ画像信号)が読み出される。1フレーム分のアナログ画像信号には、有効画素領域200およびOB領域201の画素信号が含まれる。アナログ画像信号はA/D変換部103でデジタル画像信号(デジタル形式の画素信号群)に変換される。なお、撮像素子102がデジタル形式の画素信号群を出力可能な場合、A/D変換部103はなくてもよい。
When one charge accumulation period ends, a pixel signal group (analog image signal) for one frame is read out from the
この段階では、各画素信号は、対応する画素が有する単位フィルタの色に応じた1つの色成分のみを有する。本明細書では、このような、所定の色成分の配列に対応する画素信号(単位フィルタの色に応じた1つの色成分のみを有する画素信号)から構成されるデジタル形式の画像信号をRAWデータと呼ぶ。 At this stage, each pixel signal has only one color component corresponding to the color of the unit filter that the corresponding pixel has. In this specification, a digital image signal composed of pixel signals corresponding to a predetermined color component arrangement (a pixel signal having only one color component corresponding to the color of a unit filter) is referred to as RAW data. call.
A/D変換部103もしくは撮像素子102から出力されるRAWデータは、メモリ114に一旦格納される。メモリ114は、RAWデータや、信号処理部111によって処理された画像データなどを一時的に記憶するために用いられる。
RAW data output from the A/
OB積分部104は、RAWデータのうち、OB領域201の画素値について、画素の種類ごとの平均画素値を算出する。ここでは、撮像素子102が原色ベイヤ配列のカラーフィルタを有するため、OB積分部104は、OB領域201内のR画素、G1画素、G2画素、B画素の平均画素値を算出する。この平均画素値は黒レベルとして用いられる。
The
OBクランプ部105は、有効画素領域200の画素値に対し、OB領域201の画素値に基づいて黒レベルを補正するOBクランプ処理を適用する。OBクランプ処理は、具体的には、OB積分部104が算出した平均画素値を減じる処理であってよい。OBクランプ処理により、有効画素領域200の画素信号から得られる画像の黒浮きや色ずれ等を抑制することができる。なお、OBクランプ処理では、画素の種類に応じた黒レベルを用いる。例えば、有効画素領域200のR画素の画素値については、OB領域のR画素から得られた黒レベルを減じる。OBクランプ部105は、合成元の画像それぞれに対して、また合成部108が生成した合成画像に対して、OBクランプ処理を適用する。
The
シェーディング補正部106は、有効画素領域200の画素値に対してシェーディング補正を適用する。シェーディング補正は、撮影レンズ100や画素が有するマイクロレンズの光学特性などに起因する画素位置に応じた輝度低下を補正する。したがって、シェーディング補正では、画素位置に応じたゲインが適用される。
A
ホワイトバランス(WB)処理部107は、シェーディング補正後の画像に対してホワイトバランス調整処理を適用する。ホワイトバランス調整処理は、シェーディング補正された画素値に対して、画素の種類(R,G1,G2,B)に応じたゲインを適用する処理である。
A white balance (WB)
位置ずれ検出部109は、合成元の複数フレームの画像のそれぞれについて、位置ずれ量を検出する。位置ずれ量は、最初に撮影された1フレーム目のずれ量を0とした絶対的なずれ量であってもよいし、直前のフレームに対する相対的なずれ量であってもよい。絶対的なずれ量を検出する場合、1フレーム目の画像が基準画像となる。
The
位置ずれ検出部109は、フレーム間における、有効画素領域200の画像の移動ベクトルとしてずれ量を検出することができる。位置ずれ検出部109は、例えば、フレーム間でテンプレートマッチングを用いる方法や、撮像装置10が有するジャイロセンサなどの出力を用いる方法など、任意の公知技術を用いてずれ量を検出することができる。位置ずれ検出部109は、検出した位置ずれ量を位置ずれ補正部110に出力するか、メモリ114に保存する。
The positional
位置ずれ補正部110は、位置ずれ検出部109で検出された位置ずれ量に基づいて、合成するフレームの画像を位置合わせする。位置ずれ補正部110は例えば、合成するフレームの各画素の座標値を位置ずれ量に応じて変更することにより、位置合わせを行うことができる。
The
なお、位置ずれ補正部110は、有効画素領域200の画像だけを位置合わせするモードと、有効画素領域200とOB領域201とを含んだ領域(例えばフレーム全体)の画像を位置合わせするモードを有する。このように、位置ずれ補正部110は、有効画素領域200のデータ(第1のデータ)を、OB領域201のデータ(第2のデータ)とは独立して位置合わせ可能である。位置ずれ補正部110のモードは、例えば制御部113が設定可能である。
Note that the
制御部113は、フレーム全体を位置合わせするモードが設定されていても、位置合わせによってOB領域201の合成精度が低下する条件を満たす場合には、有効画素領域200の画像だけを位置合わせするモードに変更してもよい。例えば、OB領域201が重複するフレーム数が総フレーム数Nの所定割合以下となる場合、制御部113は有効画素領域200の画像だけを位置合わせするモードに変更することができる。OB領域201が重複するフレーム数は、位置ずれ検出部109が検出する個々のフレームの位置ずれ量に基づいて把握することができる。
Even if a mode for aligning the entire frame is set, the
合成部108は、選択可能な複数の合成モードの1つで複数の画像を合成し、合成画像を生成する。フレーム全体に合成処理を適用する必要はなく、基準画像における有効画素領域とOB領域に対する合成処理が行われればよい。
Combining
合成部108は、生成した合成画像をメモリ114に保存する。本実施形態において撮像装置10は、合成モードとして加算モード、平均加算モード、比較明モードが選択可能であるものとする。なお、これらの合成モードは例示であり、他の合成モードが選択可能であってもよいし、合成モードが1つであってもよい。
各合成モードにおける画像合成方法について説明する。ここで、Nフレーム(Nは2以上の整数)の画像を合成するものとする。各フレームの画像を構成する画素が、xy直交座標系の座標(x,y)を有し、座標(x,y)の画素の輝度値をI_i(x,y)(i=1~N)、合成画像の座標(x,y)の画素の輝度値をI(x,y)とする。合成部108は、合成モードに応じて、以下のように合成画像の各画素の輝度値I(x,y)を算出する。
An image synthesizing method in each synthesizing mode will be described. Assume here that images of N frames (N is an integer equal to or greater than 2) are synthesized. A pixel constituting an image of each frame has coordinates (x, y) in an xy orthogonal coordinate system, and the luminance value of the pixel at the coordinates (x, y) is I_i (x, y) (i=1 to N). , and let I(x, y) be the luminance value of the pixel at the coordinates (x, y) of the synthesized image. The synthesizing
・加算モード
I(x,y)=I_1(x,y)+I_2(x,y)+・・・+I_N(x,y)
加算モードにおいて合成部108は、各フレームの同じ座標の画素の輝度値を加算して合成画像を生成する。加算モードは、例えば適正露出量の1/Nの露出量で撮影したNフレームの画像を合成して適正露出の画像を生成する場合に用いられる。
・Addition mode I(x, y)=I_1(x, y)+I_2(x, y)+...+I_N(x, y)
In addition mode, the synthesizing
・加算平均モード
I(x,y)=(I_1(x,y)+I_2(x,y)+・・・+I_N(x,y))/N
加算平均モードにおいて合成部108は、加算モードと同様に求めた輝度値をフレーム数Nで割ることで、各画素の輝度値がNフレームの平均値である合成画像を生成する。加算平均モードは、例えば高感度で撮影した画像のノイズを低減するために用いられる。
・Averaging mode I(x, y)=(I_1(x, y)+I_2(x, y)+...+I_N(x, y))/N
In the averaging mode, the synthesizing
・比較明モード
I(x,y)=max(I_1(x,y),I_2(x,y),・・・,I_N(x,y))
ここで、max()は、()内の要素の最大値を抽出する関数である。各フレームで同じ座標を有するN画素のうち最大の輝度値から構成される合成画像が得られる。比較明モードは、例えば花火や星空を撮影した画像を合成する際に効果的である。
・Light mode I(x, y)=max(I_1(x, y), I_2(x, y), . . . , I_N(x, y))
Here, max() is a function that extracts the maximum value of the elements in (). A composite image is obtained which consists of the maximum luminance value of the N pixels with the same coordinates in each frame. The comparatively bright mode is effective, for example, when synthesizing an image of fireworks or a starry sky.
なお、位置合わせによる座標の変更により、合成する画素値が存在しない座標について、合成部108は、加算モードおよび加算平均モードでは他の所定のフレーム(例えば1フレーム目)における当該座標の画素値を代わりに用いることができる。また、合成部108は、加算平均モードまたは比較明モードでは存在する画素値だけを用いて合成を行うことができる(加算平均モードの場合には除数を加算に用いたフレーム数(<N)に変更する)。なお、これらは考えられる一例であり、他の方法を用いて合成してもよい。
In the addition mode and the averaging mode, the
また、合成部108は、有効画素領域200外の画像が基準画像の有効画素領域に合成されないようにする。位置合わせによって基準画像の有効画素領域に重なる位置に座標が変更された、有効画素領域200外の画素値について、合成部108は、画素値が存在しない場合と同様に取り扱うことができる。
Also, the synthesizing
信号処理部111は、(合成されていない)RAWデータや、合成部108により生成された合成画像のデータ(合成RAWデータ)に対し、現像処理を適用する。なお、現像処理を適用するのは、有効画素領域200に対応する画像領域である。現像処理は、色補間処理や階調補正処理(ガンマ処理)など、複数の画像処理の総称である。色補間処理は、撮影時に得られない色成分の値を補間する処理であり、デモザイク処理とも呼ばれる。色補間処理が適用されることにより、各画素はカラー画像として必要な複数の色成分(例えばRGBやYCbCr)を有するようになり、RAWデータではなくなる。
The
信号処理部111は、現像後の画像データに対して、特徴領域(たとえば顔領域や人体領域)やその動きの検出、人物の認識処理などの検出処理、合成処理、スケーリング処理、符号化および復号処理を適用することができる。また、信号処理部111は、ヘッダ情報生成処理などのデータ加工処理、自動焦点検出(AF)に用いる信号や評価値の生成、自動露出制御(AE)に用いる評価値の算出などの評価値算出処理など、様々な画像処理を適用することができる。なお、これらは信号処理部111が適用可能な画像処理の例示であり、信号処理部111が適用する画像処理を限定するものではない。
The
記録部112は、撮影モードおよび記録設定に応じて、RAWデータ、合成RAWデータ、現像処理された画像データ、これらのデータに付随する音声データなどを、メモリカードなどの記録媒体に記録する。
The
操作部115は、ユーザが撮像装置10に様々な指示を与えるための入力デバイス(スイッチ、キー、ボタン、ダイヤル、タッチパネルなど)の総称である。
表示部116は、例えばタッチディスプレイであり、ライブビュー画像、再生画像、GUI、撮像装置10の設定値や情報などの表示に用いられる。
The
The
図4のフローチャートを用いて、撮像装置10の合成撮影モードにおける動作について説明する。合成撮影モードは、経時的に撮影された複数フレームの画像を合成した合成画像を記録する撮影モードである。合成撮影モードでは、上述した複数の合成モードのいずれかが設定される。なお、ここでは静止画撮影に関して説明するが、各フレームを合成画像とするような動画撮影の1フレーム分の生成処理としても実行可能である。
The operation of the
S101で制御部113は、操作部115を通じてユーザから合成するフレーム数Nの設定を受け付ける。なお、フレーム数Nは、合成モードの設定と同様、事前に設定されていてもよい。
In S<b>101 , the
S102で制御部113は、操作部115を通じてユーザから撮影指示が入力されたことを検出する。撮影指示は例えば操作部115に含まれるシャッタボタンの全押し操作であってよい。撮影指示の入力を検出すると、制御部113はS103を実行する。
In S<b>102 , the
S103で制御部113は1フレームの撮影処理を実行する。なお、撮影時の露出条件(シャッタスピード、絞り値、感度)は、S102の前(例えばシャッタボタンの半押し操作を検出した際)に、例えばライブビュー画像を用いたAE処理を実行して得られる適正露出量とすることができる。なお、合成モードが加算モードの場合、制御部113は、S101で設定されたフレーム数Nに基づいて、適正露出量の1/Nとなるような露出条件を設定する。
In S<b>103 , the
制御部113は撮影で得られたRAWデータをメモリ114に保存する。制御部113は、1フレーム目の撮影時にはS104をスキップしてS105を実行し、2フレーム目以降の撮影時にはS104を実行する。
The
S104で、位置ずれ検出部109は、直近の撮影で得られた画像(RAWデータ)のずれ量を検出する。ここでは、2フレーム目以降の全ての画像について、1フレーム目の画像(基準画像)に対するずれ量を検出するものとする。また、ずれ量は、基準画像の一部をテンプレートとするテンプレートマッチングを用いて検出する。
In S<b>104 , the positional
ここでは、ずれ量の検出精度を高めるため、位置ずれ検出部109は、基準画像から複数のテンプレートを生成し、個々のテンプレートについて位置ずれ量を検出する。そして、位置ずれ検出部109は、検出された複数の位置ずれ量に基づいて、最終的な位置ずれ量を決定する。位置ずれ検出部109は、例えば、最も頻度が高い位置ずれ量、または位置ずれ量の平均値を最終的な位置ずれ量として決定することができるが、他の方法で決定してもよい。
Here, in order to increase the detection accuracy of the amount of displacement, the positional
S105で、OB積分部104は、直近の撮影で得られた画像(RAWデータ)のうち、OB領域201の画素値を用いて、画素の種類ごとに黒レベルを算出する。
In S105, the
S106で、OBクランプ部105は、S105で算出された黒レベルを用いて、直近の撮影で得られた画像(RAWデータ)のうち、有効画素領域の画素に対してOBクランプ処理を適用する。
In S106, the
S107で、位置ずれ補正部110は、S104で検出された位置ずれ量を用い、直近の撮影で得られた画像(RAWデータ)を、基準画像に位置合わせする。この位置合わせ処理について、図3を用いて説明する。
In S107, the positional
図3は、基準画像である1フレーム目の画像(RAWデータ)301に対し、2フレーム目の画像(RAWデータ)302を位置合わせして合成処理する構成を模式的に示している。画像301は、有効画素領域301aおよびOB領域301bを有している。同様に、画像302は、有効画素領域302aおよびOB領域302bを有している。
FIG. 3 schematically shows a configuration for aligning a second frame image (RAW data) 302 with respect to a first frame image (RAW data) 301, which is a reference image, and synthesizing the images. An
ここでは、位置ずれ補正部110のモードが、有効画素領域の画像だけを位置合わせするモードに設定されているものとする。したがって、位置合わせ後の画像302’では、有効画素領域302a’だけが移動し、OB領域302bは移動していない。その結果、位置合わせ後の画像302’には画素が存在しない領域302cが生じている。位置ずれ補正部110のモードがフレーム全体を位置合わせするモードに設定されている場合、内部的に座標情報が変更されているが、位置合わせ前後で画像302の見かけに変化はない。
Here, it is assumed that the mode of the positional
S108で、合成部108は、S107で位置合わせされた画像(図3の画像302’)を、基準画像もしくは前フレームまでの合成画像(合成RAWデータ)に合成する。合成部108は、設定されているモードに応じて、上述したように合成処理を実行する。
In S108, the synthesizing
図3では、位置合わせによって生じた、画素が存在しない領域302cについては、合成対象から外す加算平均モードまたは比較明モードにおける合成処理の例を示している。その結果、合成画像310の有効画素領域310aには、2フレーム目の画像が合成されない領域310cが含まれている。合成画像310のOB領域310については、1フレーム目のOB領域301bと2フレーム目のOB領域302bが、モードに応じた方法で合成されている。
FIG. 3 shows an example of compositing processing in the averaging mode or the comparatively bright mode in which a pixel-
なお、画素信号がマイナス方向のノイズの影響を受けている場合、S106のOBクランプ処理で黒レベルを減じた際に画素値が0未満になる可能性がある。これを防止するため、合成画像に所定の正のオフセットを付与してからメモリ114に保存してもよい。合成画像にオフセットが与えられる場合、合成する画像に合成画像に与えたものと同量のオフセットを与えてからS105のOBクランプ処理を適用する。OBクランプ処理の適用後、S108で合成処理を適用する前に両方の画像からオフセットを除去する。
Note that if the pixel signal is affected by noise in the negative direction, the pixel value may become less than 0 when the black level is reduced by the OB clamping process in S106. To prevent this, the composite image may be given a predetermined positive offset before being stored in
また、図4のフローチャートでは基準画像に対して2フレーム目から順次合成を行うが、2フレーム目からNフレーム目までの合成画像を生成し、最後に基準画像に合成するようにしてもよい。この場合、2フレーム目からNフレーム目までの合成は、全てのフレームで重複する領域にだけ行ってもよい。基準画像の有効画素領域において、2フレーム目からNフレーム目までの合成画像が生成されていない部分については、合成する画素値が存在しないものとして、上述した合成モードに応じた方法を適用することができる。 In addition, in the flowchart of FIG. 4, synthesis is sequentially performed from the second frame on the reference image, but it is also possible to generate synthesized images from the second frame to the N-th frame and finally combine them with the reference image. In this case, synthesis from the 2nd frame to the Nth frame may be performed only in areas where all the frames overlap. In the effective pixel area of the reference image, the method according to the above-described synthesis mode is applied assuming that there is no pixel value to be synthesized for the portion where the synthesized image from the 2nd frame to the Nth frame is not generated. can be done.
S109で、制御部113は、設定フレーム数Nの撮影が完了したか否かを判定する。制御部113は、撮影が完了したと判定されればS110を、判定されなければS103で次のフレームの撮影を実行する。なお、制御部113は例えば撮影指示が継続して入力されている間は連続して撮影を行うものとする。設定フレーム数Nの撮影完了前に撮影指示の入力が途絶えた場合、例えば制御部113はそれまでに行った処理結果を破棄して撮影スタンバイ状態に復帰してもよい。
In S109, the
S110で、OB積分部104が、メモリ114に保存された合成画像のOB領域の画素値に基づいて、黒レベルを算出する。黒レベルの算出は、OB領域の画素値が合成処理後の画素値であることを除き、S105と同じである。
In S<b>110 , the
S111で、OB積分部104は、合成画像のOB領域の画素値のばらつきを示す値(例えば分散値)を算出する。分散値は画素の種類(色)ごとに算出してもよいし、全ての画素について1つの分散値を算出してもよい。OB積分部104は、S110とS111の処理を並行して実行してもよい。
In S111, the
S112で、OBクランプ部105は、S110で算出された、合成画像に基づく黒レベルを用い、合成画像の有効画素領域内の画素値に対してOBクランプ処理を適用する。なお、S106で合成前の画像にOBクランプを適用しているにも係わらず、合成後にOBクランプ処理を適用するのは、合成に起因した黒浮きを低減するためである。
In S112, the
例えば、高感度で撮影された複数フレームの画像を比較明モードで合成する場合、各フレームの画像はノイズを多く含んでいる。比較明モードの合成は、各座標において最も高い輝度値を選択するものである。したがって、ノイズによって本来の輝度値より高くなった輝度値が各座標について選択される可能性が高くなる。そのため、有効画素領域200と同様に比較明モードで合成されたOB領域201(合成OB領域)の画素に基づく黒レベルを用いて合成画像に対してOBクランプ処理を適用することにより、合成に起因する黒浮きを抑制することができる。ここでは合成による黒浮きが発生する典型例として比較明モードの合成について説明したが、他の合成モードでも合成による黒浮きは発生するため、合成画像について合成OB領域の画素に基づく黒レベルを用いたOBクランプ処理を適用する。
For example, when synthesizing a plurality of frames of images shot with high sensitivity in the comparatively bright mode, the images of each frame contain a lot of noise. Lighter mode compositing selects the highest luminance value at each coordinate. Therefore, there is a high possibility that a luminance value that is higher than the original luminance value due to noise will be selected for each coordinate. Therefore, by applying the OB clamping process to the composite image using the black level based on the pixels of the OB region 201 (composite OB region) composited in the comparatively bright mode similarly to the
S113で、WB処理部107は、OBクランプ処理された、合成画像の有効画素領域の画像(RAWデータ)に対して、ホワイトバランス調整処理を適用する。
In S113, the
S114で、信号処理部111が、ホワイトバランス調整処理が適用されたRAWデータに対して、現像処理を適用する。信号処理部111は、S111で算出された分散値に応じて、現像処理の過程で適用するノイズ低減処理のパラメータを変更する。具体的には、信号処理部111は、分散値が予め定められた閾値より大きい場合には、そうでない場合よりも強いノイズ低減処理が適用されるように、ノイズ低減処理のパラメータを変更する。分散値が閾値より大きい場合にはそうでない場合よりもノイズ量が大きいためである。なお、ノイズ低減処理の強さが3通り以上ある場合には、2つ以上の閾値を用いてノイズ低減処理の強さを調整してもよい。信号処理部111は、現像処理後の画像データから、画像データを格納した画像データファイルを生成する。
In S114, the
S115で、記録部112は、S114で生成された画像データファイルをメモリカードなどの記録媒体や外部装置に記録する。なお、現像処理された画像データに加えて、あるいはその代わりに、S112でOBクランプ処理を適用する前の、有効画素領域の合成RAWデータを記録してもよい。また、合成RAWデータに外部装置がS112~S114の処理を実行するために必要な情報(S110で算出した黒レベルおよびS111で算出した分散量)を合成RAWデータに加えて記録してもよい。また、外部装置でS104~S114の処理を実行できるように、合成元のNフレームのRAWデータを記録してもよい。
In S115, the
記録部112による記録が終了すると、制御部113は図4に示した動作を終了し、例えば撮影スタンバイ状態に復帰する。
When the recording by the
以上説明したように、本実施形態によれば、複数フレームのRAWデータを合成する際に、RAWデータの位置合わせを、有効画素領域のデータとOB領域のデータとで別個に適用できるようにした。有効画素領域のデータを独立して位置合わせ可能にすることで、OB領域のデータが有効画素領域のデータに合成されることを防止できるため、合成画像の品質低下を抑制できる。また、合成するフレーム間でOB領域にズレを生じなくすることができるため、合成後のOB領域から精度の良い黒レベルが算出でき、合成によって生じる画像の黒浮きを効果的に抑制することができる。 As described above, according to the present embodiment, when combining RAW data of a plurality of frames, alignment of RAW data can be applied separately to data in the effective pixel area and data in the OB area. . By making it possible to align the data of the effective pixel area independently, it is possible to prevent the data of the OB area from being synthesized with the data of the effective pixel area, thereby suppressing deterioration in the quality of the synthesized image. In addition, since it is possible to prevent the OB area from being shifted between frames to be synthesized, the black level can be calculated with high accuracy from the OB area after synthesis, and black floating in the image caused by synthesis can be effectively suppressed. can.
また、撮像素子102が積層構造を有する場合には、A/D変換部103、メモリ114に加え、位置ずれ検出部109、位置ずれ補正部110、および合成部108も撮像素子102内に実装することができる。そのため、撮影、位置合わせ、合成までを撮像素子102で実行することも可能になる。
Further, when the
(その他の実施形態)
上述の実施形態では撮像装置における撮影時に合成画像を生成する場合について説明した。しかし、先に述べたとおり、本発明において撮影機能は必須でない。したがって、S103で撮影する代わりに、経時的に撮影され、記録されたRAWデータの1フレームを取得して、S104以降の処理を実行する画像処理装置でも本発明を実施可能である。この場合、S109の判定処理は、設定数のフレームの取得を完了したか否かを判定する。
(Other embodiments)
In the above-described embodiment, the case where a composite image is generated at the time of photographing by the imaging device has been described. However, as described above, the shooting function is not essential in the present invention. Therefore, instead of shooting in S103, the present invention can also be implemented in an image processing apparatus that acquires one frame of RAW data shot and recorded over time and executes the processes from S104 onward. In this case, the determination processing in S109 determines whether or not acquisition of the set number of frames has been completed.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
本発明は上述した実施形態の内容に制限されず、発明の精神および範囲から離脱することなく様々な変更及び変形が可能である。したがって、発明の範囲を公にするために請求項を添付する。 The present invention is not limited to the content of the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the claims are appended to make public the scope of the invention.
10…撮像装置、102…撮像素子、104…OB積分部、105…OBクランプ部、108…合成部、109…位置ずれ検出部、110…位置ずれ補正部、113…制御部
DESCRIPTION OF
Claims (11)
前記複数フレームの画像データを位置合わせする位置合わせ手段と、
位置合わせされた前記複数フレームの画像データを合成する合成手段と、を有し、
前記画像データには、撮像素子の有効画素領域の画素のデータであって、所定の色成分の配列に対応する信号で構成される第1のデータと、有効画素領域外の画素のデータである第2のデータが含まれ、
前記位置合わせ手段が、前記第1のデータを、前記第2のデータとは独立して位置合わせ可能である、
ことを特徴とする画像処理装置。 an acquisition means for acquiring image data of multiple frames;
alignment means for aligning the image data of the plurality of frames;
synthesizing means for synthesizing the aligned image data of the plurality of frames;
The image data includes first data of pixels in the effective pixel area of the imaging device, which is composed of signals corresponding to an arrangement of predetermined color components, and data of pixels outside the effective pixel area. includes second data,
wherein said alignment means is capable of aligning said first data independently of said second data;
An image processing apparatus characterized by:
前記合成手段が合成した画像データの現像処理において適用するノイズ低減処理の強さが、前記ばらつきを示す値に基づいて決定される、
ことを特徴とする請求項1から6のいずれか1項に記載の画像処理装置。 further comprising calculating means for calculating a value representing variation of the second data of the image data synthesized by the synthesizing means,
the strength of noise reduction processing applied in the development processing of the image data synthesized by the synthesizing means is determined based on the value indicating the variation;
7. The image processing apparatus according to any one of claims 1 to 6, characterized by:
請求項1から8のいずれか1項に記載の画像処理装置と、
を有し、
前記複数フレームの画像データが、前記撮像素子を用いて経時的に撮影されたものである、ことを特徴とする撮像装置。 an imaging device;
an image processing device according to any one of claims 1 to 8;
has
An imaging apparatus, wherein the image data of the plurality of frames are captured over time using the imaging element.
複数フレームの画像データを取得することと、
前記複数フレームの画像データを位置合わせすることと、
位置合わせされた前記複数フレームの画像データを合成することと、を有し、
前記画像データには撮像素子の有効画素領域の画素のデータであって、所定の色成分の配列に対応する信号で構成される第1のデータと、有効画素領域外の画素のデータである第2のデータが含まれ、
前記第1のデータを、前記第2のデータとは独立して位置合わせ可能である、
ことを特徴とする画像処理方法。 An image processing method executed by an image processing device,
obtaining multiple frames of image data;
aligning the frames of image data;
combining the aligned frames of image data;
The image data includes first data of pixels in the effective pixel area of the image sensor, which is composed of signals corresponding to an arrangement of predetermined color components, and second data of pixels outside the effective pixel area. 2 data included,
the first data can be aligned independently of the second data;
An image processing method characterized by:
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021174826A JP7809487B2 (en) | 2021-10-26 | Image processing device and image processing method | |
| US17/955,590 US12100123B2 (en) | 2021-10-26 | 2022-09-29 | Image processing apparatus and image processing method for combining images |
| CN202211311912.1A CN116055907A (en) | 2021-10-26 | 2022-10-25 | Image processing apparatus, image capturing apparatus, image processing method, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021174826A JP7809487B2 (en) | 2021-10-26 | Image processing device and image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023064501A true JP2023064501A (en) | 2023-05-11 |
| JP7809487B2 JP7809487B2 (en) | 2026-02-02 |
Family
ID=
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009014831A (en) * | 2007-07-02 | 2009-01-22 | Fujifilm Corp | Imaging device |
| JP2016226059A (en) * | 2011-07-11 | 2016-12-28 | キヤノン株式会社 | Image processing apparatus, imaging apparatus, and image processing method |
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009014831A (en) * | 2007-07-02 | 2009-01-22 | Fujifilm Corp | Imaging device |
| JP2016226059A (en) * | 2011-07-11 | 2016-12-28 | キヤノン株式会社 | Image processing apparatus, imaging apparatus, and image processing method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4826028B2 (en) | Electronic camera | |
| JP4293174B2 (en) | Imaging apparatus and image processing apparatus | |
| KR101229600B1 (en) | Image capturing apparatus and camera shake correction method, and computer-readable medium | |
| US8218036B2 (en) | Image sensing apparatus and control method therefor | |
| KR101303410B1 (en) | Image capture apparatus and image capturing method | |
| US10630920B2 (en) | Image processing apparatus | |
| KR101352440B1 (en) | Image processing apparatus, image processing method, and recording medium | |
| CN103581638B (en) | Image processing apparatus and image processing method | |
| US9843735B2 (en) | Image processing apparatus, imaging apparatus comprising the same, and image processing method | |
| CN102883108B (en) | Picture pick-up device and control method, image processing equipment and method | |
| JP2017022610A (en) | Image processing apparatus and image processing method | |
| JP2017108309A (en) | Imaging apparatus and imaging method | |
| US20230196530A1 (en) | Image processing apparatus, image processing method, and image capture apparatus | |
| US12100123B2 (en) | Image processing apparatus and image processing method for combining images | |
| JP6108680B2 (en) | Imaging apparatus, control method therefor, program, and storage medium | |
| JP7809487B2 (en) | Image processing device and image processing method | |
| JP2023064501A (en) | Image processing device and image processing method | |
| JP6570311B2 (en) | Image processing apparatus and image processing method | |
| JP5482427B2 (en) | Imaging apparatus, camera shake correction method, and program | |
| JP5482428B2 (en) | Imaging apparatus, camera shake correction method, and program | |
| JP2023091493A (en) | Image processing device and image processing method | |
| JP7678776B2 (en) | Imaging device, control method thereof, and image processing device | |
| JP2025178826A (en) | Image processing device and method, electronic device, program and storage medium | |
| WO2025249363A1 (en) | Image processing device and image processing method | |
| JP2017034536A (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: 20241017 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250630 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250801 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250924 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20251223 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20260121 |