JP2023091493A - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP2023091493A
JP2023091493A JP2021206265A JP2021206265A JP2023091493A JP 2023091493 A JP2023091493 A JP 2023091493A JP 2021206265 A JP2021206265 A JP 2021206265A JP 2021206265 A JP2021206265 A JP 2021206265A JP 2023091493 A JP2023091493 A JP 2023091493A
Authority
JP
Japan
Prior art keywords
data
image
frames
synthesizing
image processing
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.)
Pending
Application number
JP2021206265A
Other languages
Japanese (ja)
Inventor
孝幸 鈴木
Takayuki Suzuki
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 JP2021206265A priority Critical patent/JP2023091493A/en
Priority to US17/955,590 priority patent/US20230096541A1/en
Priority to CN202211311912.1A priority patent/CN116055907A/en
Publication of JP2023091493A publication Critical patent/JP2023091493A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)

Abstract

To provide an image processing apparatus and an image processing method that can perform image composition in which a pixel value other than that in an effective pixel area can be appropriately used.SOLUTION: An image processing apparatus aligns and composes pieces of image data of a plurality of frames. The pieces of image data include first data that is data of pixels in an effective pixel area of an image pickup device and is composed of signals corresponding to the sequence of predetermined color components, and second data that is data of pixels other than the pixels in the effective pixel area. The image processing apparatus aligns the second data based on the amount of alignment used for aligning the first data. The image processing apparatus corrects data of a first composite image obtained by composing the aligned first data based on data of a second composite image obtained by composing the aligned second data.SELECTED DRAWING: Figure 7

Description

本発明は、画像処理装置および画像処理方法に関し、特には画像合成技術に関する。 The present invention relates to an image processing device and an image processing method, and more particularly to an image synthesizing technique.

必要な露光時間の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).

特開2007-243775号公報JP-A-2007-243775

複数の画像を合成する場合、画像間の位置合わせが必要になる。しかしながら、画像間で単純に位置合わせすると、有効画素領域外の画素は、位置がずれた状態で合成されることになる。そのため、有効画素領域外の画素の値を利用したい場合に問題が生じる。特許文献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 an effective pixel region are appropriately used. offer.

上述の目的は、複数フレームの画像データを取得する取得手段と、複数フレームの画像データを位置合わせする位置合わせ手段と、位置合わせされた複数フレームの画像データを合成する合成手段と、を有する画像処理装置であって、画像データには、撮像素子の有効画素領域の画素のデータであって、所定の色成分の配列に対応する信号で構成される第1のデータと、有効画素領域外の画素のデータである第2のデータが含まれ、位置合わせ手段は、複数フレームの画像データに含まれる第1のデータを位置合わせするために用いる位置合わせ量に基づいて、複数フレームの画像データに含まれる第2のデータを位置合わせし、合成手段が、位置合わせされた第1のデータを合成した第1の合成画像のデータと、位置合わせされた第2のデータを合成した第2の合成画像のデータとを生成し、画像処理装置は、第2の合成画像のデータに基づいて、第1の合成画像のデータを補正する補正手段をさらに有する、ことを特徴とする画像処理装置によって達成される。 The above object is to provide an image having an acquisition means for acquiring image data of a plurality of frames, a registration means for aligning the image data of the plurality of frames, and a synthesizing means for synthesizing the aligned image data of the plurality of frames. In the processing device, the image data includes first data of pixels in an effective pixel area of an image sensor, which is composed of signals corresponding to an arrangement of predetermined color components, and data of pixels outside the effective pixel area. The second data is pixel data, and the alignment means aligns the image data of the plurality of frames based on the alignment amount used to align the first data contained in the image data of the plurality of frames. The included second data is aligned, and the synthesizing means synthesizes first synthesized image data obtained by synthesizing the aligned first data and second synthesized image data obtained by synthesizing the aligned second data. and generating image data, the image processing device further comprising correcting means for correcting the data of the first synthesized image based on the data of the second synthesized image. be done.

本発明によれば、有効画素領域外の画素値を適切に利用可能な画像合成が可能な画像処理装置および画像処理方法を提供することができる。 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.

実施形態に係る画像処理装置としての撮像装置の機能構成例を示すブロック図1 is a block diagram showing a functional configuration example of an imaging device as an image processing device according to an embodiment; FIG. 撮像素子の画素領域に関する模式図Schematic diagram of the pixel area of the image sensor 第1実施形態におけるRAWデータの合成処理の模式図Schematic diagram of synthesis processing of RAW data in the first embodiment 第1実施形態における合成撮影モードの動作に関するフローチャートFlowchart relating to operation of composite shooting mode in the first embodiment 第2実施形態の背景を説明するための図A diagram for explaining the background of the second embodiment. 第2実施形態の概要を説明するための図Diagram for explaining the outline of the second embodiment 第2実施形態における合成撮影モードの動作に関するフローチャートFlowchart relating to operations in composite shooting mode in the second embodiment

以下、添付図面を参照して本発明をその例示的な実施形態に基づいて詳細に説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定しない。また、実施形態には複数の特徴が記載されているが、その全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 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 imaging device 10 as an example of an image processing device according to an embodiment of the present invention.

制御部113は、プログラムを実行可能なプロセッサを1つ以上と、RAMと、ROMとを有する。制御部113は、ROMに記憶されたプログラムをRAMに読み込み、プロセッサによって実行することができる。制御部113は、プログラムを実行することにより、図1に示す機能ブロックを含む撮像装置10の構成要素、および/または通信可能に接続された外部機器の動作を制御する。撮像装置10の機能は、制御部113がプログラムを実行することにより実施することができる。なお、制御部113がプログラムを実行することによって実現可能な機能をハードウェア(例えばASICやFPGAなど)を用いて実施してもよい。ROMは例えば電気的に書き換え可能であり、制御部113が有するプロセッサが実行可能なプログラムのほか、撮像装置10の設定値、GUIデータなどを記憶する。制御部113は例えばシステムオンチップ(SoC)やシステムオンパッケージ(SiP)の形態を有しうる。 The control unit 113 has one or more processors capable of executing programs, a RAM, and a ROM. The control unit 113 can load the program stored in the ROM into the RAM and execute it by the processor. By executing a program, the control unit 113 controls the components of the imaging apparatus 10 including the functional blocks shown in FIG. 1 and/or the operations of external devices communicably connected. The functions of the imaging device 10 can be implemented by the control unit 113 executing a program. It should be noted that functions that can be realized by the control unit 113 executing a program may be implemented using hardware (for example, ASIC, FPGA, etc.). The ROM is electrically rewritable, for example, and stores programs executable by the processor of the control unit 113, setting values of the imaging device 10, GUI data, and the like. The control unit 113 can have the form of a system-on-chip (SoC) or a system-on-package (SiP), for example.

撮影レンズ100は複数のレンズおよび絞りを有し、被写体の光学像を生成する。撮像素子102は例えばCMOSイメージセンサであり、2次元配列された複数の光電変換部(画素)を有する。 A photographing lens 100 has a plurality of lenses and a diaphragm, and generates an optical image of a subject. The imaging element 102 is, for example, a CMOS image sensor, and has a plurality of photoelectric conversion units (pixels) arranged two-dimensionally.

図2は撮像素子102の画素配列を模式的に示した図である。撮像素子102は、画素が配列された領域として、有効画素領域200と、有効画素領域外のオプティカルブラック(OB)領域201とを有する。有効画素領域200は、被写体像の撮影に用いられる(露光される)領域である。一方、OB領域201は被写体像の撮影には用いられない(露光されない)領域である。OB領域201の画素には、光の入射を防止するために例えば遮光膜を設けてもよい。なお、有効画素領域200の上方もしくは下方に、さらなるOB領域202を設けてもよい。OB領域202は黒レベルの算出に用いることができるほか、垂直画素ライン単位のラインオフセット補正に用いることができる。 FIG. 2 is a diagram schematically showing the pixel arrangement of the image sensor 102. As shown in FIG. The image sensor 102 has an effective pixel area 200 and an optical black (OB) area 201 outside the effective pixel area as areas in which pixels are arranged. The effective pixel area 200 is an area used (exposed) for photographing a subject image. On the other hand, an OB area 201 is an area that is not used (unexposed) for photographing a subject image. Pixels in the OB region 201 may be provided with, for example, a light shielding film to prevent light from entering. A further OB region 202 may be provided above or below the effective pixel region 200 . The OB area 202 can be used not only for black level calculation but also for line offset correction for each vertical pixel line.

OB領域201に配置される画素は、遮光膜を除けば、有効画素領域200に配置される画素と同じ構造を有する。また、有効画素領域200の画素にカラーフィルタが設けられている場合、OB領域201の画素にも有効画素領域200の画素と同様にカラーフィルタが設けられる。 The pixels arranged in the OB region 201 have the same structure as the pixels arranged in the effective pixel region 200 except for the light shielding film. When the pixels in the effective pixel region 200 are provided with color filters, the pixels in the OB region 201 are also provided with color filters in the same manner as the pixels in the effective pixel region 200 .

有効画素領域200およびOB領域201は撮像素子102の領域であるが、本明細書では便宜上、撮像素子102によって得られる画像においても同様の表現を用いる。例えば、画像もしくは有効画素領域とは、撮影によって得られる1フレームの画像のうち、撮像素子102の有効画素領域200の画素によって得られる画像領域を意味する。 The effective pixel area 200 and the OB area 201 are the areas of the image sensor 102, but for the sake of convenience in this specification, the same expressions are used for the image obtained by the image sensor 102 as well. For example, an image or an effective pixel area means an image area obtained by the pixels of the effective pixel area 200 of the image sensor 102 in the image of one frame obtained by shooting.

カラーフィルタは異なる色の単位フィルタが配列された構成を有し、画素ごとに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 OB region 201 are used, for example, to detect noise components of photoelectric conversion elements (for example, photodiodes) included in the pixels. For example, by subtracting the signal value of the pixel in the OB area 201 from the signal value of the pixel in the effective pixel area 200, the offset due to the noise component can be removed and the black level of the image can be corrected.

撮像素子102が有する画素は、電荷蓄積期間に発生した電荷量に応じた値を有する画素信号を生成する。なお、メカニカルシャッタ101を開閉させる撮影では、電荷蓄積期間は露光期間に相当する。メカニカルシャッタ101を開状態に維持する撮影では、電荷蓄積期間は蓄積電荷のリセット時から露光期間経過までの期間に相当する。一般に前者は静止画撮影、後者は動画撮影に相当するが、後者は静止画撮影にも該当しうる。 A pixel included in the image sensor 102 generates a pixel signal having a value corresponding to the amount of charge generated during the charge accumulation period. Note that in shooting with the mechanical shutter 101 opened and closed, the charge accumulation period corresponds to the exposure period. In photographing in which the mechanical shutter 101 is kept open, the charge accumulation period corresponds to the period from the resetting of the accumulated charges to the elapse of the exposure period. Generally, the former corresponds to still image shooting and the latter corresponds to moving image shooting, but the latter can also correspond to still image shooting.

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 image sensor 102 . One frame of analog image signal includes pixel signals of an effective pixel area 200 and an OB area 201 . The analog image signal is converted into a digital image signal (digital format pixel signal group) by the A/D conversion unit 103 . Note that the A/D conversion unit 103 may be omitted if the image sensor 102 can output a group of digital pixel signals.

この段階では、各画素信号は、対応する画素が有する単位フィルタの色に応じた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/D conversion unit 103 or the image sensor 102 is temporarily stored in the memory 114 . The memory 114 is used to temporarily store RAW data, image data processed by the signal processing unit 111, and the like.

OB積分部104は、RAWデータのうち、OB領域201の画素値について、画素の種類ごとの平均画素値を算出する。ここでは、撮像素子102が原色ベイヤ配列のカラーフィルタを有するため、OB積分部104は、OB領域201内のR画素、G1画素、G2画素、B画素の平均画素値を算出する。この平均画素値は黒レベルとして用いられる。 The OB integration unit 104 calculates an average pixel value for each type of pixel for the pixel values in the OB area 201 in the RAW data. Here, since the image sensor 102 has a color filter of primary color Bayer array, the OB integration unit 104 calculates the average pixel value of the R, G1, G2, and B pixels in the OB area 201 . This average pixel value is used as the black level.

OBクランプ部105は、有効画素領域200の画素値に対し、OB領域201の画素値に基づいて黒レベルを補正するOBクランプ処理を適用する。OBクランプ処理は、具体的には、OB積分部104が算出した平均画素値を減じる処理であってよい。OBクランプ処理により、有効画素領域200の画素信号から得られる画像の黒浮きや色ずれ等を抑制することができる。なお、OBクランプ処理では、画素の種類に応じた黒レベルを用いる。例えば、有効画素領域200のR画素の画素値については、OB領域のR画素から得られた黒レベルを減じる。OBクランプ部105は、合成元の画像それぞれに対して、また合成部108が生成した合成画像に対して、OBクランプ処理を適用する。 The OB clamping unit 105 applies OB clamping processing for correcting the black level to the pixel values of the effective pixel region 200 based on the pixel values of the OB region 201 . Specifically, the OB clamping process may be a process of subtracting the average pixel value calculated by the OB integration unit 104 . The OB clamping process can suppress black floating, color shift, and the like in an image obtained from pixel signals in the effective pixel area 200 . Note that the OB clamp processing uses a black level corresponding to the type of pixel. For example, for the pixel values of the R pixels in the effective pixel area 200, the black level obtained from the R pixels in the OB area is subtracted. The OB clamping unit 105 applies OB clamping processing to each of the original images to be combined and to the combined image generated by the combining unit 108 .

シェーディング補正部106は、有効画素領域200の画素値に対してシェーディング補正を適用する。シェーディング補正は、撮影レンズ100や画素が有するマイクロレンズの光学特性などに起因する画素位置に応じた輝度低下を補正する。したがって、シェーディング補正では、画素位置に応じたゲインが適用される。 A shading correction unit 106 applies shading correction to the pixel values of the effective pixel area 200 . The shading correction corrects luminance reduction according to the pixel position due to the optical characteristics of the imaging lens 100 and the microlenses of the pixels. Therefore, in shading correction, a gain is applied according to the pixel position.

ホワイトバランス(WB)処理部107は、シェーディング補正後の画像に対してホワイトバランス調整処理を適用する。ホワイトバランス調整処理は、シェーディング補正された画素値に対して、画素の種類(R,G1,G2,B)に応じたゲインを適用する処理である。 A white balance (WB) processing unit 107 applies white balance adjustment processing to the image after shading correction. The white balance adjustment process is a process of applying a gain corresponding to the pixel type (R, G1, G2, B) to the shading-corrected pixel value.

位置ずれ検出部109は、合成元の複数フレームの画像のそれぞれについて、位置ずれ量を検出する。位置ずれ量は、最初に撮影された1フレーム目のずれ量を0とした絶対的なずれ量であってもよいし、直前のフレームに対する相対的なずれ量であってもよい。絶対的なずれ量を検出する場合、1フレーム目の画像が基準画像となる。 The misregistration detection unit 109 detects the amount of misregistration for each of the multiple frames of images to be synthesized. The amount of positional deviation may be an absolute amount of deviation where the amount of deviation of the first frame photographed first is set to 0, or may be an amount of relative deviation with respect to the immediately preceding frame. When detecting an absolute shift amount, the image of the first frame is the reference image.

位置ずれ検出部109は、フレーム間における、有効画素領域200の画像の移動ベクトルとしてずれ量を検出することができる。位置ずれ検出部109は、例えば、フレーム間でテンプレートマッチングを用いる方法や、撮像装置10が有するジャイロセンサなどの出力を用いる方法など、任意の公知技術を用いてずれ量を検出することができる。位置ずれ検出部109は、検出した位置ずれ量を位置ずれ補正部110に出力するか、メモリ114に保存する。 The positional deviation detection unit 109 can detect the amount of deviation as a motion vector of the image of the effective pixel area 200 between frames. The positional deviation detection unit 109 can detect the amount of deviation using any known technique, such as a method using template matching between frames or a method using the output of a gyro sensor or the like included in the imaging device 10 . The positional deviation detection unit 109 outputs the detected positional deviation amount to the positional deviation correction unit 110 or stores it in the memory 114 .

位置ずれ補正部110は、位置ずれ検出部109で検出された位置ずれ量に基づいて、合成するフレームの画像を位置合わせする。位置ずれ補正部110は例えば、合成するフレームの各画素の座標値を位置ずれ量に応じて変更することにより、位置合わせを行うことができる。 The misregistration correction unit 110 aligns the images of the frames to be synthesized based on the amount of misregistration detected by the misregistration detection unit 109 . For example, the positional deviation correction unit 110 can perform positional alignment by changing the coordinate value of each pixel of the frame to be synthesized according to the amount of positional deviation.

なお、位置ずれ補正部110は、有効画素領域200の画像だけを位置合わせするモードと、有効画素領域200とOB領域201とを含んだ領域(例えばフレーム全体)の画像を位置合わせするモードを有する。このように、位置ずれ補正部110は、有効画素領域200のデータ(第1のデータ)を、OB領域201のデータ(第2のデータ)とは独立して位置合わせ可能である。位置ずれ補正部110のモードは、例えば制御部113が設定可能である。 Note that the misregistration correction unit 110 has a mode for aligning only the image of the effective pixel area 200 and a mode for aligning the image of an area including the effective pixel area 200 and the OB area 201 (for example, the entire frame). . In this manner, the positional deviation correction unit 110 can align the data of the effective pixel area 200 (first data) independently of the data of the OB area 201 (second data). For example, the control unit 113 can set the mode of the positional deviation correction unit 110 .

制御部113は、フレーム全体を位置合わせするモードが設定されていても、位置合わせによってOB領域201の合成精度が低下する条件を満たす場合には、有効画素領域200の画像だけを位置合わせするモードに変更してもよい。例えば、OB領域201が重複するフレーム数が総フレーム数Nの所定割合以下となる場合、制御部113は有効画素領域200の画像だけを位置合わせするモードに変更することができる。OB領域201が重複するフレーム数は、位置ずれ検出部109が検出する個々のフレームの位置ずれ量に基づいて把握することができる。 Even if a mode for aligning the entire frame is set, the control unit 113 is set to a mode for aligning only the image of the effective pixel region 200 when the condition that the compositing accuracy of the OB region 201 is lowered by alignment is satisfied. can be changed to For example, when the number of frames in which the OB area 201 overlaps is equal to or less than a predetermined ratio of the total number of frames N, the control unit 113 can change to a mode in which only the images of the effective pixel area 200 are aligned. The number of frames in which the OB region 201 overlaps can be grasped based on the positional displacement amount of each frame detected by the positional displacement detection unit 109 .

合成部108は、選択可能な複数の合成モードの1つで複数の画像を合成し、合成画像を生成する。フレーム全体に合成処理を適用する必要はなく、基準画像における有効画素領域とOB領域に対する合成処理が行われればよい。 Combining unit 108 combines a plurality of images in one of a plurality of selectable combining modes to generate a combined image. It is not necessary to apply the synthesizing process to the entire frame, and it is sufficient to perform the synthesizing process on the effective pixel area and the OB area in the reference image.

合成部108は、生成した合成画像をメモリ114に保存する。本実施形態において撮像装置10は、合成モードとして加算モード、平均加算モード、比較明モードが選択可能であるものとする。なお、これらの合成モードは例示であり、他の合成モードが選択可能であってもよいし、合成モードが1つであってもよい。 Synthesis unit 108 stores the generated synthetic image in memory 114 . In the present embodiment, the imaging apparatus 10 can select an addition mode, an average addition mode, or a comparatively bright mode as a synthesis mode. Note that these combining modes are examples, and other combining modes may be selectable, or there may be only one combining mode.

各合成モードにおける画像合成方法について説明する。ここで、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 unit 108 calculates the luminance value I(x, y) of each pixel of the synthesized image as follows, according to the synthesis mode.

・加算モード
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 unit 108 adds luminance values of pixels at the same coordinates in each frame to generate a synthesized image. The addition mode is used, for example, when N frames of images shot with an exposure amount that is 1/N of the proper exposure amount are combined to generate a proper exposure image.

・加算平均モード
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 unit 108 divides the brightness value obtained in the same manner as in the addition mode by the number of frames N, thereby generating a synthesized image in which the brightness value of each pixel is the average value of N frames. The averaging mode is used, for example, to reduce noise in images shot with high sensitivity.

・比較明モード
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 combination unit 108 converts the pixel value of the coordinate in another predetermined frame (for example, the first frame) to the coordinates for which there is no pixel value to be combined due to the change in the coordinates due to the alignment. can be used instead. In addition, the synthesizing unit 108 can perform synthesis using only existing pixel values in the averaging mode or the relatively bright mode (in the averaging mode, the divisor is set to the number of frames used for addition (<N)). change). Note that these are only possible examples, and synthesis may be performed using other methods.

また、合成部108は、有効画素領域200外の画像が基準画像の有効画素領域に合成されないようにする。位置合わせによって基準画像の有効画素領域に重なる位置に座標が変更された、有効画素領域200外の画素値について、合成部108は、画素値が存在しない場合と同様に取り扱うことができる。 Also, the combining unit 108 prevents the image outside the effective pixel area 200 from being combined with the effective pixel area of the reference image. The synthesizing unit 108 can handle pixel values outside the effective pixel region 200 whose coordinates have been changed to overlap with the effective pixel region of the reference image by alignment in the same manner as when pixel values do not exist.

信号処理部111は、(合成されていない)RAWデータや、合成部108により生成された合成画像のデータ(合成RAWデータ)に対し、現像処理を適用する。なお、現像処理を適用するのは、有効画素領域200に対応する画像領域である。現像処理は、色補間処理や階調補正処理(ガンマ処理)など、複数の画像処理の総称である。色補間処理は、撮影時に得られない色成分の値を補間する処理であり、デモザイク処理とも呼ばれる。色補間処理が適用されることにより、各画素はカラー画像として必要な複数の色成分(例えばRGBやYCbCr)を有するようになり、RAWデータではなくなる。 The signal processing unit 111 applies development processing to the (uncombined) RAW data and data of a combined image generated by the combining unit 108 (combined RAW data). It should be noted that the image area corresponding to the effective pixel area 200 is subjected to the development process. Development processing is a general term for a plurality of image processing such as color interpolation processing and tone correction processing (gamma processing). Color interpolation processing is processing that interpolates values of color components that cannot be obtained at the time of shooting, and is also called demosaicing processing. By applying color interpolation processing, each pixel comes to have a plurality of color components (for example, RGB and YCbCr) necessary for a color image, and is no longer RAW data.

信号処理部111は、現像後の画像データに対して、特徴領域(たとえば顔領域や人体領域)やその動きの検出、人物の認識処理などの検出処理、合成処理、スケーリング処理、符号化および復号処理を適用することができる。また、信号処理部111は、ヘッダ情報生成処理などのデータ加工処理、自動焦点検出(AF)に用いる信号や評価値の生成、自動露出制御(AE)に用いる評価値の算出などの評価値算出処理など、様々な画像処理を適用することができる。なお、これらは信号処理部111が適用可能な画像処理の例示であり、信号処理部111が適用する画像処理を限定するものではない。 The signal processing unit 111 performs detection processing such as detection of feature regions (for example, face regions and human body regions) and their movements, detection processing such as person recognition processing, synthesis processing, scaling processing, encoding and decoding on the image data after development. Treatment can be applied. The signal processing unit 111 also performs data processing such as header information generation processing, generation of signals and evaluation values used for automatic focus detection (AF), and evaluation value calculation such as calculation of evaluation values used for automatic exposure control (AE). Various image processing can be applied, such as processing. Note that these are examples of image processing to which the signal processing unit 111 can apply, and the image processing to which the signal processing unit 111 applies is not limited.

記録部112は、撮影モードおよび記録設定に応じて、RAWデータ、合成RAWデータ、現像処理された画像データ、これらのデータに付随する音声データなどを、メモリカードなどの記録媒体に記録する。 The recording unit 112 records RAW data, composite RAW data, developed image data, audio data accompanying these data, etc. on a recording medium such as a memory card, according to the shooting mode and recording settings.

操作部115は、ユーザが撮像装置10に様々な指示を与えるための入力デバイス(スイッチ、キー、ボタン、ダイヤル、タッチパネルなど)の総称である。
表示部116は、例えばタッチディスプレイであり、ライブビュー画像、再生画像、GUI、撮像装置10の設定値や情報などの表示に用いられる。
The operation unit 115 is a general term for input devices (switches, keys, buttons, dials, touch panels, etc.) for the user to give various instructions to the imaging apparatus 10 .
The display unit 116 is, for example, a touch display, and is used to display live view images, reproduced images, GUI, setting values and information of the imaging device 10, and the like.

図4のフローチャートを用いて、撮像装置10の合成撮影モードにおける動作について説明する。合成撮影モードは、経時的に撮影された複数フレームの画像を合成した合成画像を記録する撮影モードである。合成撮影モードでは、上述した複数の合成モードのいずれかが設定される。なお、ここでは静止画撮影に関して説明するが、各フレームを合成画像とするような動画撮影の1フレーム分の生成処理としても実行可能である。 The operation of the imaging device 10 in the composite shooting mode will be described with reference to the flowchart of FIG. 4 . The composite photographing mode is a photographing mode for recording a composite image obtained by synthesizing a plurality of frames of images captured over time. In the composite photographing mode, one of the plurality of composite modes described above is set. Note that although still image shooting will be described here, it is also possible to perform generation processing for one frame of moving image shooting in which each frame is a composite image.

S101で制御部113は、操作部115を通じてユーザから合成するフレーム数Nの設定を受け付ける。なお、フレーム数Nは、合成モードの設定と同様、事前に設定されていてもよい。 In S<b>101 , the control unit 113 receives setting of the number of frames N to be combined from the user through the operation unit 115 . Note that the number of frames N may be set in advance, similar to the setting of the synthesis mode.

S102で制御部113は、操作部115を通じてユーザから撮影指示が入力されたことを検出する。撮影指示は例えば操作部115に含まれるシャッタボタンの全押し操作であってよい。撮影指示の入力を検出すると、制御部113はS103を実行する。 In S<b>102 , the control unit 113 detects that the user has input a photographing instruction through the operation unit 115 . The shooting instruction may be, for example, a full-press operation of the shutter button included in the operation unit 115 . Upon detecting the input of the shooting instruction, the control unit 113 executes S103.

S103で制御部113は1フレームの撮影処理を実行する。なお、撮影時の露出条件(シャッタスピード、絞り値、感度)は、S102の前(例えばシャッタボタンの半押し操作を検出した際)に、例えばライブビュー画像を用いたAE処理を実行して得られる適正露出量とすることができる。なお、合成モードが加算モードの場合、制御部113は、S101で設定されたフレーム数Nに基づいて、適正露出量の1/Nとなるような露出条件を設定する。 In S<b>103 , the control unit 113 executes imaging processing for one frame. The exposure conditions (shutter speed, aperture value, sensitivity) at the time of shooting are obtained by executing AE processing using, for example, a live view image before S102 (for example, when half-pressing the shutter button is detected). It can be an appropriate exposure amount. Note that when the synthesis mode is the addition mode, the control unit 113 sets an exposure condition that is 1/N of the appropriate exposure amount based on the number of frames N set in S101.

制御部113は撮影で得られたRAWデータをメモリ114に保存する。制御部113は、1フレーム目の撮影時にはS104をスキップしてS105を実行し、2フレーム目以降の撮影時にはS104を実行する。 The control unit 113 stores RAW data obtained by shooting in the memory 114 . The control unit 113 skips S104 and executes S105 when photographing the first frame, and executes S104 when photographing the second and subsequent frames.

S104で、位置ずれ検出部109は、直近の撮影で得られた画像(RAWデータ)のずれ量を検出する。ここでは、2フレーム目以降の全ての画像について、1フレーム目の画像(基準画像)に対するずれ量を検出するものとする。また、ずれ量は、基準画像の一部をテンプレートとするテンプレートマッチングを用いて検出する。 In S<b>104 , the positional deviation detection unit 109 detects the deviation amount of the image (RAW data) obtained in the most recent shooting. Here, for all images from the second frame onwards, the amount of deviation from the first frame image (reference image) is detected. Further, the displacement amount is detected using template matching using a part of the reference image as a template.

ここでは、ずれ量の検出精度を高めるため、位置ずれ検出部109は、基準画像から複数のテンプレートを生成し、個々のテンプレートについて位置ずれ量を検出する。そして、位置ずれ検出部109は、検出された複数の位置ずれ量に基づいて、最終的な位置ずれ量を決定する。位置ずれ検出部109は、例えば、最も頻度が高い位置ずれ量、または位置ずれ量の平均値を最終的な位置ずれ量として決定することができるが、他の方法で決定してもよい。 Here, in order to increase the detection accuracy of the amount of displacement, the positional displacement detection unit 109 generates a plurality of templates from the reference image and detects the amount of positional displacement for each template. Then, the positional deviation detection unit 109 determines the final positional deviation amount based on the plurality of detected positional deviation amounts. The positional deviation detection unit 109 can determine, for example, the most frequent positional deviation amount or the average value of the positional deviation amounts as the final positional deviation amount, but other methods may be used.

S105で、OB積分部104は、直近の撮影で得られた画像(RAWデータ)のうち、OB領域201の画素値を用いて、画素の種類ごとに黒レベルを算出する。 In S105, the OB integration unit 104 calculates the black level for each type of pixel using the pixel values of the OB region 201 in the image (RAW data) obtained by the most recent imaging.

S106で、OBクランプ部105は、S105で算出された黒レベルを用いて、直近の撮影で得られた画像(RAWデータ)のうち、有効画素領域の画素に対してOBクランプ処理を適用する。 In S106, the OB clamp unit 105 uses the black level calculated in S105 to apply OB clamp processing to the pixels in the effective pixel area of the image (RAW data) obtained in the most recent shooting.

S107で、位置ずれ補正部110は、S104で検出された位置ずれ量を用い、直近の撮影で得られた画像(RAWデータ)を、基準画像に位置合わせする。この位置合わせ処理について、図3を用いて説明する。 In S107, the positional deviation correction unit 110 uses the positional deviation amount detected in S104 to align the image (RAW data) obtained in the latest photographing with the reference image. This alignment processing will be described with reference to FIG.

図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 image 301 has an effective pixel area 301a and an OB area 301b. Similarly, image 302 has an effective pixel area 302a and an OB area 302b.

ここでは、位置ずれ補正部110のモードが、有効画素領域の画像だけを位置合わせするモードに設定されているものとする。したがって、位置合わせ後の画像302’では、有効画素領域302a’だけが移動し、OB領域302bは移動していない。その結果、位置合わせ後の画像302’には画素が存在しない領域302cが生じている。位置ずれ補正部110のモードがフレーム全体を位置合わせするモードに設定されている場合、内部的に座標情報が変更されているが、位置合わせ前後で画像302の見かけに変化はない。 Here, it is assumed that the mode of the positional deviation correction unit 110 is set to a mode in which only the images in the effective pixel area are aligned. Therefore, in the image 302' after alignment, only the effective pixel area 302a' has moved, and the OB area 302b has not moved. As a result, an image 302' after alignment has a region 302c where no pixels exist. When the mode of the positional deviation correction unit 110 is set to the mode of aligning the entire frame, the coordinate information is internally changed, but the appearance of the image 302 does not change before and after the alignment.

S108で、合成部108は、S107で位置合わせされた画像(図3の画像302’)を、基準画像もしくは前フレームまでの合成画像(合成RAWデータ)に合成する。合成部108は、設定されているモードに応じて、上述したように合成処理を実行する。 In S108, the synthesizing unit 108 synthesizes the image aligned in S107 (image 302' in FIG. 3) with the reference image or the synthesized image (synthesized RAW data) up to the previous frame. The synthesizing unit 108 performs the synthesizing process as described above according to the set mode.

図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-free region 302c generated by alignment is excluded from compositing targets. As a result, the effective pixel area 310a of the synthesized image 310 includes an area 310c where the image of the second frame is not synthesized. As for the OB area 310 of the synthesized image 310, the OB area 301b of the first frame and the OB area 302b of the second frame are synthesized by a method according to the mode.

なお、画素信号がマイナス方向のノイズの影響を受けている場合、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 memory 114 . If an offset is given to the composite image, the same amount of offset as that given to the composite image is given to the composite image and then the OB clamping process of S105 is applied. After applying the OB clamping process, the offset is removed from both images before applying the compositing process at S108.

また、図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 synthesize 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 control unit 113 determines whether or not the shooting of the set number of frames N has been completed. The control unit 113 executes S110 if it is determined that the photographing has been completed, and executes the photographing of the next frame in S103 if it is not determined. Note that the control unit 113 is assumed to continuously perform shooting while the shooting instruction is continuously input, for example. When the input of the shooting instruction stops before the shooting of the set number of frames N is completed, for example, the control unit 113 may discard the processing results performed so far and return to the shooting standby state.

S110で、OB積分部104が、メモリ114に保存された合成画像のOB領域の画素値に基づいて、黒レベルを算出する。黒レベルの算出は、OB領域の画素値が合成処理後の画素値であることを除き、S105と同じである。 In S<b>110 , the OB integrator 104 calculates the black level based on the pixel values of the OB area of the synthesized image stored in the memory 114 . Calculation of the black level is the same as in S105, except that the pixel values in the OB area are pixel values after the compositing process.

S111で、OB積分部104は、合成画像のOB領域の画素値のばらつきを示す値(例えば分散値)を算出する。分散値は画素の種類(色)ごとに算出してもよいし、全ての画素について1つの分散値を算出してもよい。OB積分部104は、S110とS111の処理を並行して実行してもよい。 In S111, the OB integrator 104 calculates a value (for example, a variance value) indicating variation in pixel values in the OB area of the synthesized image. The variance value may be calculated for each pixel type (color), or one variance value may be calculated for all pixels. The OB integrator 104 may execute the processes of S110 and S111 in parallel.

S112で、OBクランプ部105は、S110で算出された、合成画像に基づく黒レベルを用い、合成画像の有効画素領域内の画素値に対してOBクランプ処理を適用する。なお、S106で合成前の画像にOBクランプを適用しているにも係わらず、合成後にOBクランプ処理を適用するのは、合成に起因した黒浮きを低減するためである。 In S112, the OB clamp unit 105 uses the black level based on the composite image calculated in S110 and applies OB clamp processing to pixel values within the effective pixel area of the composite image. Note that the reason why the OB clamping process is applied after composition even though OB clamping is applied to the image before composition in S106 is to reduce the black floating due to composition.

例えば、高感度で撮影された複数フレームの画像を比較明モードで合成する場合、各フレームの画像はノイズを多く含んでいる。比較明モードの合成は、各座標において最も高い輝度値を選択するものである。したがって、ノイズによって本来の輝度値より高くなった輝度値が各座標について選択される可能性が高くなる。そのため、有効画素領域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 effective pixel region 200, the black floating can be suppressed. Here, the composition in the comparatively bright mode has been described as a typical example of black floating due to composition. However, since black floating due to composition also occurs in other composition modes, the black level based on the pixels in the composite OB area is used for the composite image. OB clamping is applied.

S113で、WB処理部107は、OBクランプ処理された、合成画像の有効画素領域の画像(RAWデータ)に対して、ホワイトバランス調整処理を適用する。 In S113, the WB processing unit 107 applies white balance adjustment processing to the image (RAW data) of the effective pixel area of the combined image that has undergone OB clamp processing.

S114で、信号処理部111が、ホワイトバランス調整処理が適用されたRAWデータに対して、現像処理を適用する。信号処理部111は、S111で算出された分散値に応じて、現像処理の過程で適用するノイズ低減処理のパラメータを変更する。具体的には、信号処理部111は、分散値が予め定められた閾値より大きい場合には、そうでない場合よりも強いノイズ低減処理が適用されるように、ノイズ低減処理のパラメータを変更する。分散値が閾値より大きい場合にはそうでない場合よりもノイズ量が大きいためである。なお、ノイズ低減処理の強さが3通り以上ある場合には、2つ以上の閾値を用いてノイズ低減処理の強さを調整してもよい。信号処理部111は、現像処理後の画像データから、画像データを格納した画像データファイルを生成する。 In S114, the signal processing unit 111 applies development processing to the RAW data to which the white balance adjustment processing has been applied. The signal processing unit 111 changes parameters of noise reduction processing applied in the process of development processing according to the variance value calculated in S111. Specifically, the signal processing unit 111 changes the parameters of the noise reduction processing so that stronger noise reduction processing is applied when the variance value is greater than a predetermined threshold value. This is because the amount of noise is greater when the variance value is greater than the threshold value than otherwise. Note that if there are three or more levels of noise reduction processing, two or more thresholds may be used to adjust the strength of the noise reduction processing. The signal processing unit 111 generates an image data file storing the image data from the image data after the development processing.

S115で、記録部112は、S114で生成された画像データファイルをメモリカードなどの記録媒体や外部装置に記録する。なお、現像処理された画像データに加えて、あるいはその代わりに、S112でOBクランプ処理を適用する前の、有効画素領域の合成RAWデータを記録してもよい。また、合成RAWデータに外部装置がS112~S114の処理を実行するために必要な情報(S110で算出した黒レベルおよびS111で算出した分散量)を合成RAWデータに加えて記録してもよい。また、外部装置でS104~S114の処理を実行できるように、合成元のNフレームのRAWデータを記録してもよい。 In S115, the recording unit 112 records the image data file generated in S114 in a recording medium such as a memory card or an external device. In addition to or instead of the developed image data, composite RAW data of the effective pixel area may be recorded before the OB clamping process is applied in S112. Further, information necessary for the external device to execute the processes of S112 to S114 (the black level calculated in S110 and the dispersion amount calculated in S111) may be recorded in the combined RAW data in addition to the combined RAW data. In addition, the RAW data of N frames of the composition source may be recorded so that the processes of S104 to S114 can be executed by an external device.

記録部112による記録が終了すると、制御部113は図4に示した動作を終了し、例えば撮影スタンバイ状態に復帰する。 When the recording by the recording unit 112 ends, the control unit 113 ends the operation shown in FIG. 4 and returns to, for example, the shooting standby state.

以上説明したように、本実施形態によれば、複数フレームの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, a highly accurate black level can be calculated from the OB area after synthesis, and black floating in an image caused by synthesis can be effectively suppressed. can.

●(第2実施形態)
次に、本発明の第2実施形態について説明する。本実施形態はOBクランプ処理に加え、ラインオフセット補正を行う場合に関する。撮像素子に形成される多数の回路素子の特性は、製造誤差などに起因するばらつきが発生する。例えば画素ライン単位で設けられる増幅器の特性のばらつきによって生じる画素信号のオフセット量の差は、画像において縞状のパターンとして視認されうる。
● (Second embodiment)
Next, a second embodiment of the invention will be described. This embodiment relates to the case of performing line offset correction in addition to OB clamp processing. The characteristics of a large number of circuit elements formed in an imaging device vary due to manufacturing errors and the like. For example, a difference in pixel signal offset caused by variations in the characteristics of amplifiers provided for each pixel line can be visually recognized as a striped pattern in an image.

ラインオフセット補正は、このような、水平画素ライン単位や垂直画素ライン単位で生じうる画素信号のオフセットの差を補正する処理である。画素ラインごとのオフセット量の差はOB領域の画素で検出することができる。そのため、OB領域で検出した画素ラインごとのオフセット量の差に基づいて、有効画素領域から読み出される画素信号にラインオフセット補正を適用することができる。 Line offset correction is a process of correcting such a difference in pixel signal offset that may occur in units of horizontal pixel lines or vertical pixel lines. A difference in offset amount for each pixel line can be detected in pixels in the OB area. Therefore, line offset correction can be applied to pixel signals read out from the effective pixel area based on the difference in offset amount for each pixel line detected in the OB area.

しかし、有効画素領域とOB領域とで位置合わせ量が異なる場合、ラインオフセット補正が必要な画素ラインの位置が、OB領域と位置合わせ後の有効画素領域とで一致しない。特に、複数フレームの画像を合成する場合にはフレームごとにOB領域と有効画素領域との位置合わせ量が異なりうる。そのため、合成処理後のOB領域で検出した画素ラインごとのオフセット量は合成後の有効画素領域の画素信号のオフセット量と一致せず、ラインオフセット補正を正しく行うことができない。 However, when the amount of alignment is different between the effective pixel area and the OB area, the positions of the pixel lines requiring line offset correction do not match between the OB area and the effective pixel area after alignment. In particular, when synthesizing images of a plurality of frames, the amount of alignment between the OB area and the effective pixel area may differ for each frame. Therefore, the amount of offset for each pixel line detected in the OB area after synthesis processing does not match the amount of offset of pixel signals in the effective pixel area after synthesis, and line offset correction cannot be performed correctly.

図5を用いて、正しいラインオフセット補正ができない例について説明する。ここでは水平画素ラインに対するラインオフセット補正に関して示しているが、垂直画素ラインに対するラインオフセット補正についても同様である。垂直画素ラインに対するラインオフセット補正を行う場合、図2に示したOB領域202を用いる。 An example in which correct line offset correction cannot be performed will be described with reference to FIG. Although line offset correction for horizontal pixel lines is shown here, line offset correction for vertical pixel lines is similar. When performing line offset correction for vertical pixel lines, the OB area 202 shown in FIG. 2 is used.

図5は、基準画像である1フレーム目の画像(RAWデータ)301に対し、OB領域と有効画素領域との位置合わせ量を別個に適用して2フレーム目の画像(RAWデータ)302を位置合わせして合成処理する構成を模式的に示している。画像301は、有効画素領域301aおよびOB領域301bを有している。同様に、画像302は、有効画素領域302aおよびOB領域302bを有している。 FIG. 5 shows an image (RAW data) 302 of a second frame obtained by separately applying the amount of alignment between the OB area and the effective pixel area to an image (RAW data) 301 of the first frame, which is a reference image. It schematically shows a configuration in which they are put together and combined. An image 301 has an effective pixel area 301a and an OB area 301b. Similarly, image 302 has an effective pixel area 302a and an OB area 302b.

ここでも、位置ずれ補正部110のモードが、有効画素領域の画像だけを位置合わせするモードに設定されているものとする。したがって、位置合わせ後の画像302’では、有効画素領域302a’だけが移動し、OB領域302bは移動していない。その結果、位置合わせ後の画像302’には画素が存在しない領域302cが生じている。 Also here, it is assumed that the mode of the positional deviation correction unit 110 is set to the mode for aligning only the images in the effective pixel area. Therefore, in the image 302' after alignment, only the effective pixel area 302a' has moved, and the OB area 302b has not moved. As a result, an image 302' after alignment has a region 302c where no pixels exist.

1フレーム目の画像(基準画像)301には、信号オフセットが他の水平画素ラインの信号オフセットよりも一定量以上大きい(または小さい)2つの水平画素ラインが、明るい(または暗い)筋状パターン501を形成している。同様に、2フレーム目の画像302にも、2つの水平画素ラインが明るい(または暗い)筋状パターン502を形成している。 In an image (reference image) 301 of the first frame, two horizontal pixel lines whose signal offsets are larger (or smaller) than the signal offsets of other horizontal pixel lines by a certain amount or more have bright (or dark) striped patterns 501 . forming Similarly, in the image 302 of the second frame, two horizontal pixel lines also form a bright (or dark) striped pattern 502 .

撮像素子における水平画素ラインの位置は固定であるため、撮像画像には常に同じ位置に筋状のパターンが形成される。したがって、2フレーム目の画像の有効画素領域302aを1フレーム目の画像の有効画素領域301aに位置合わせする前は、1フレーム目の画像と2フレーム目の画像で同じ位置に筋状パターンが形成される。 Since the position of the horizontal pixel line in the image pickup device is fixed, streaky patterns are always formed at the same position in the captured image. Therefore, before aligning the effective pixel region 302a of the second frame image with the effective pixel region 301a of the first frame image, streak patterns are formed at the same positions in the first frame image and the second frame image. be done.

しかしながら、2フレーム目の画像における筋状のパターンは、有効画素領域302を1フレーム目の画像の有効画素領域301に位置合わせすることにより、位置合わせ後の画像の有効画素領域302’では数と位置が変化している。 However, by aligning the effective pixel region 302 with the effective pixel region 301 of the first frame image, the streaky pattern in the image of the second frame can be reduced in number in the effective pixel region 302′ of the image after alignment. position has changed.

その結果、1フレーム目の画像に2フレーム目の画像の合成画像301の有効画素領域310aには、有効画素領域301が有する筋状パターン501に加え、有効画素領域302a’が有する筋状パターン502’が含まれている。 As a result, in the effective pixel region 310a of the composite image 301 of the image of the first frame and the image of the second frame, in addition to the streak pattern 501 of the effective pixel region 301, the streak pattern 502 of the effective pixel region 302a′ is displayed. 'It is included.

一方、OB領域に着目すると、1フレーム目および2フレーム目の画像のOB領域301bおよび302bは位置合わせされずに合成される。そのため、合成画像310におけるOB領域310bにおける筋状パターンの数および位置は、合成前と同じである。 On the other hand, focusing on the OB area, the OB areas 301b and 302b of the images of the first and second frames are combined without being aligned. Therefore, the number and positions of streak patterns in the OB region 310b in the synthesized image 310 are the same as before synthesis.

ここで、ラインオフセット補正について説明する。ラインオフセット補正は、筋状パターンの有無および位置の検出と、オフセット補正量の決定とを含む。ラインオフセット補正は、例えば信号処理部111で実行することができる。 Here, line offset correction will be described. Line offset correction includes detection of the presence or absence and position of a streak pattern, and determination of an offset correction amount. Line offset correction can be performed by the signal processor 111, for example.

筋状パターンの有無および位置の検出は、OB領域310bの画素値を例えば水平方向に平均して形成した垂直方向に伸びる画素信号列について、代表信号レベルとの差の絶対値が閾値以上である信号レベルを有する画素とその位置の検出であってよい。代表信号レベルは信号レベルの平均値もしくは中央値であってよい。また、閾値は予め実験的に定めることができる。 The presence or absence and position of the streak pattern is detected when the absolute value of the difference between the representative signal level and the pixel signal line extending in the vertical direction, which is formed by averaging the pixel values of the OB region 310b in the horizontal direction, is equal to or greater than the threshold. It may be the detection of pixels with signal levels and their locations. The representative signal level may be the average or median signal level. Also, the threshold can be determined experimentally in advance.

代表信号レベルとの差の絶対値が閾値以上である信号レベルを有する画素が存在する場合、その位置が補正すべき画素ラインの位置に相当し、その信号レベルと代表信号レベルとの差をオフセット補正量とすることができる。なお、ここで説明したものとは異なる方法により、補正すべき画素ラインとその位置を検出したり、オフセット補正量を決定したりしてもよい。 If there is a pixel having a signal level whose absolute value of the difference from the representative signal level is equal to or greater than the threshold, the position corresponds to the position of the pixel line to be corrected, and the difference between the signal level and the representative signal level is offset. It can be used as a correction amount. Note that the pixel line to be corrected and its position may be detected and the offset correction amount may be determined by a method different from that described here.

合成画像310について、OB領域310bで検出された筋状パターンに基づいて有効画素領域310aにラインオフセット補正を適用することを考える。この場合、補正後の画像511の有効画素領域511aには、合成される画像のうち、有効画素領域の垂直方向の位置合わせ量が0でない画像(ここでは2フレーム目の画像)の筋状パターン502’が残ってしまう。 For the composite image 310, consider applying line offset correction to the effective pixel region 310a based on the streak pattern detected in the OB region 310b. In this case, in the effective pixel area 511a of the corrected image 511, among the images to be synthesized, a streak pattern of the image (here, the image of the second frame) whose vertical alignment amount of the effective pixel area is not 0 is displayed. 502' remains.

本実施形態では、ラインオフセット補正用の合成画像を生成することにより、上述した問題を解決する。具体的には、基準画像のOB領域に、合成する個々のフレーム画像のOB領域を、有効画素領域の位置合わせ量に応じて位置合わせして合成することにより、ラインオフセット補正用の合成画像を生成する。 In this embodiment, the above problem is solved by generating a composite image for line offset correction. Specifically, the OB area of each frame image to be synthesized is aligned with the OB area of the reference image in accordance with the amount of alignment of the effective pixel area, and synthesized to obtain a synthesized image for line offset correction. Generate.

従って、本実施形態においては、
・有効画素領域を位置合わせして合成して得られる合成画像(第1の合成画像)
・抽出したOB領域を位置合わせして合成して得られる、ラインオフセット補正用の合成画像(第2の合成画像)
・OB領域を位置合わせせずに合成して得られる、OBクランプ(黒レベルの調整)用の合成画像(第3の合成画像)
が生成される。
Therefore, in this embodiment,
・Synthetic image obtained by aligning and synthesizing effective pixel areas (first synthetic image)
・Synthetic image for line offset correction (second synthetic image) obtained by aligning and synthesizing the extracted OB areas
・Synthetic image for OB clamping (black level adjustment) obtained by synthesizing without aligning the OB areas (third synthetic image)
is generated.

図6は、図5と同じ合成処理において、ラインオフセット補正用の合成画像を用いる例を示している。合成部108は、図6に示すように、1フレーム目の画像(基準画像)301に合成する、2フレーム目の画像302のOB領域302bを抽出し、有効画素領域302aの位置合わせ量の垂直方向成分を適用して位置合わせした画像601を生成する。そして、合成部108は、位置合わせしたOB領域の画像601を、基準画像から抽出したOB領域301bに合成し、ラインオフセット補正用の合成画像602を生成する。 FIG. 6 shows an example of using a synthesized image for line offset correction in the same synthesizing process as in FIG. As shown in FIG. 6, the synthesizing unit 108 extracts an OB area 302b of a second frame image 302 to be synthesized with a first frame image (reference image) 301, and vertically adjusts the alignment amount of the effective pixel area 302a. A direction component is applied to generate the aligned image 601 . Then, the synthesizing unit 108 synthesizes the aligned OB area image 601 with the OB area 301b extracted from the reference image to generate a synthesized image 602 for line offset correction.

なお、3フレーム以上を合成する場合、合成部108は、基準画像を除く各フレーム画像について、OB領域を抽出し、有効画素領域の位置合わせ量の垂直成分を適用して位置合わせしたのち、基準画像から抽出したOB領域に順次合成する。このようにして、合成部108はラインオフセット補正用の合成画像を生成することができる。 When synthesizing three or more frames, the synthesizing unit 108 extracts the OB area for each frame image other than the reference image, applies the vertical component of the alignment amount of the effective pixel area, and performs alignment. The OB area extracted from the image is synthesized sequentially. In this manner, the synthesizing unit 108 can generate a synthesized image for line offset correction.

なお、OB領域の位置合わせを行う際、有効画素領域の位置合わせ量の垂直方向成分だけを適用するのは、ラインオフセット補正の対象が水平画素ラインのためである。ラインオフセット補正の対象が垂直画素ラインの場合には、フレーム画像のOB領域202に有効画素領域の位置合わせ量の水平方向成分だけを適用し、OB領域を位置合わせする。 When aligning the OB area, only the vertical component of the alignment amount of the effective pixel area is applied because the target of the line offset correction is the horizontal pixel line. When the target of line offset correction is a vertical pixel line, only the horizontal component of the alignment amount of the effective pixel area is applied to the OB area 202 of the frame image to align the OB area.

なお、ラインオフセット補正用の合成画像は、各フレームから抽出したOB領域を用いるため、各フレームのOB領域の合成には影響を与えない。合成部108は、OBクランプ用に用いるOB領域の合成や、有効画素領域の合成とは別個に、ラインオフセット補正用の合成を行う。 Note that the composite image for line offset correction uses the OB regions extracted from each frame, and therefore does not affect the synthesis of the OB regions of each frame. The synthesizing unit 108 performs synthesizing for line offset correction separately from synthesizing the OB area used for OB clamping and synthesizing the effective pixel area.

ラインオフセット補正用の合成画像602には、位置合わせされて合成された有効画素領域310aと同じ位置に筋状パターンが存在する。そのため、ラインオフセット補正用の合成画像602を用いて合成後の有効画素領域310aに対してラインオフセット補正を適用することにより、筋状パターンを適切に補正することができる。図6に示すように、ラインオフセット補正後の画像511’の有効画素領域511aには筋状パターンが存在しない。 In the synthesized image 602 for line offset correction, a streak pattern exists at the same position as the aligned and synthesized effective pixel region 310a. Therefore, by applying line offset correction to the combined effective pixel region 310a using the combined image 602 for line offset correction, the streak pattern can be corrected appropriately. As shown in FIG. 6, no stripe pattern exists in the effective pixel area 511a of the image 511' after the line offset correction.

なお、ラインオフセット補正用の合成画像602を用いたラインオフセット補正を適用する場合、信号処理部111は、合成画像602のうち、合成画像602の生成に用いられたOB領域の全てに共通する領域を用いてもよい。この場合、信号処理部111は、図6の602aで示す領域のように、一部のフレームのOB領域しか合成されていない領域はラインオフセット補正に用いない。 Note that when applying line offset correction using the synthetic image 602 for line offset correction, the signal processing unit 111 selects an area common to all of the OB areas used to generate the synthetic image 602 in the synthetic image 602. may be used. In this case, the signal processing unit 111 does not use an area, such as the area indicated by 602a in FIG. 6, where only the OB areas of some frames are synthesized, for line offset correction.

図7は、第1実施形態で説明した撮像装置10の合成撮影モードにおける動作に、本実施形態で説明したラインオフセット補正に関する工程を追加したフローチャートである。S701~S708は図4のS101~S108と、S711~S714は図4のS109~712と、S716~S718は図4のS113~S115の処理とそれぞれ同じであるため、説明を省略する。 FIG. 7 is a flow chart obtained by adding a process related to line offset correction described in this embodiment to the operation in the composite shooting mode of the imaging apparatus 10 described in the first embodiment. S701 to S708 are the same as S101 to S108 in FIG. 4, S711 to S714 are the same as S109 to S712 in FIG. 4, and S716 to S718 are the same as S113 to S115 in FIG.

S709で制御部113は、信号処理部111に直近に撮影されたフレーム画像からOB領域を抽出して位置ずれ補正部110に供給するように指示する。また、制御部113は、S709を最初に実行する場合には、信号処理部111に基準画像のOB領域も抽出して合成部108に供給するように指示する。信号処理部111は制御部113からの指示に従ってフレーム画像からOB領域を抽出し、位置ずれ補正部110に供給する。 In S<b>709 , the control unit 113 instructs the signal processing unit 111 to extract the OB area from the most recently captured frame image and supply it to the misregistration correction unit 110 . Further, when executing S709 first, the control unit 113 instructs the signal processing unit 111 to also extract the OB region of the reference image and supply it to the synthesizing unit 108 . The signal processing unit 111 extracts the OB area from the frame image according to the instruction from the control unit 113 and supplies it to the misregistration correction unit 110 .

また、制御部113は位置ずれ補正部110に対し、S707における位置合わせ処理で有効画素領域に適用した位置合わせ量を用いてOB領域に位置合わせ処理を適用し、合成部108に供給するように指示する。位置ずれ補正部110は、信号処理部111から供給されるOB領域に対して位置合わせ処理を適用し、合成部108に供給する。上述したように、位置合わせ処理において位置ずれ補正部110は、OB領域201が抽出される場合には位置合わせ量の垂直方向成分のみを適用し、OB領域202が抽出される場合には位置合わせ量の水平方向成分のみを適用する。位置ずれ補正部110は、位置合わせ処理を適用したOB領域を合成部108に供給する。 In addition, the control unit 113 instructs the misregistration correction unit 110 to apply the registration processing to the OB region using the registration amount applied to the effective pixel region in the registration processing in S707, and to supply the result to the synthesizing unit 108. instruct. The misregistration correction unit 110 applies alignment processing to the OB area supplied from the signal processing unit 111 and supplies the result to the synthesizing unit 108 . As described above, in the alignment process, the position deviation correction unit 110 applies only the vertical component of the alignment amount when the OB region 201 is extracted, and when the OB region 202 is extracted, the alignment Applies only the horizontal component of the amount. The misregistration correction unit 110 supplies the OB area to which the alignment process has been applied to the synthesizing unit 108 .

S710で制御部113は、合成部108に対し、ラインオフセット補正用の合成画像を生成するように指示する。合成部108は、位置ずれ補正部110から供給される位置合わせ後のOB領域を、直近に生成し、メモリ114に格納した合成画像にさらに合成する。S710を最初に実行する場合、合成部108は信号処理部111から供給される、基準画像のOB領域に対して、位置ずれ補正部110から供給される位置合わせ後のOB領域を合成する。合成部108は、OB領域の合成画像をメモリ114に格納する。 In S710, the control unit 113 instructs the composition unit 108 to generate a composite image for line offset correction. The synthesizing unit 108 generates the OB area after alignment supplied from the misregistration correcting unit 110 most recently and further synthesizes it with the synthesized image stored in the memory 114 . When S710 is executed first, the synthesizing unit 108 synthesizes the aligned OB area supplied from the misregistration correcting unit 110 with the OB area of the reference image supplied from the signal processing unit 111 . Synthesis unit 108 stores the synthesized image of the OB area in memory 114 .

なお、ここでは記録用のフレーム画像のOB領域301と有効画素領域302の合成処理が完了してからオフセット補正用の合成画像を生成するための位置合わせ処理や合成処理を実行する場合について説明した。しかし、オフセット補正用のOB領域の合成画像を生成するための位置合わせ処理および合成処理についてもS707およびS708で実行するようにしてもよい。 Here, a case has been described in which alignment processing and synthesis processing for generating a synthesized image for offset correction are executed after the synthesis processing of the OB area 301 and the effective pixel area 302 of the frame image for recording is completed. . However, the alignment processing and composition processing for generating the composite image of the OB area for offset correction may also be executed in S707 and S708.

S714のOBクランプ処理が終了すると、S715で制御部113は、信号処理部111にラインオフセット補正を実行するように指示する。信号処理部111は、メモリ114に格納されているオフセット補正用の合成画像を読み出して、筋状パターンの有無および位置を検出する。筋状パターンが検出されない場合、信号処理部111は制御部113に検出結果(検出されない)を通知し、ラインオフセット補正を適用しない。この場合制御部113はS716を実行し、WB処理部107にホワイトバランス調整処理の実行を指示する。 After the OB clamping process of S714 is completed, the control unit 113 instructs the signal processing unit 111 to perform line offset correction in S715. The signal processing unit 111 reads the composite image for offset correction stored in the memory 114 and detects the presence or absence and position of the streak pattern. If no streak pattern is detected, the signal processing unit 111 notifies the control unit 113 of the detection result (not detected) and does not apply line offset correction. In this case, the control unit 113 executes S716 and instructs the WB processing unit 107 to execute white balance adjustment processing.

一方、筋状パターンが検出された場合、信号処理部111はその位置を検出するともに、検出された筋状パターンごとにオフセット補正値を決定する。そして、信号処理部111は、メモリ114に格納されているOBクランプ処理済みの合成画像に対し、ラインオフセット補正を適用する。以降の処理は第1実施形態と同じであるため、説明を省略する。 On the other hand, when a streak pattern is detected, the signal processing unit 111 detects its position and determines an offset correction value for each detected streak pattern. Then, the signal processing unit 111 applies line offset correction to the OB clamped synthesized image stored in the memory 114 . Since subsequent processing is the same as that of the first embodiment, description thereof is omitted.

本実施形態では、OB領域を位置合わせして合成した画像をラインオフセット補正用に生成する。そして、ラインオフセット補正用に生成した、OB領域の合成画像を用いて、有効画素領域の合成画像に対してラインオフセット補正を適用するようにした。これにより、第1実施形態の効果に加え、撮像素子の回路特性のばらつきに起因する筋状のパターンを適切に補正することが可能になる。 In this embodiment, an image synthesized by aligning the OB areas is generated for line offset correction. Then, using the synthesized image of the OB area generated for line offset correction, line offset correction is applied to the synthesized image of the effective pixel area. As a result, in addition to the effect of the first embodiment, it is possible to appropriately correct a streaky pattern caused by variations in circuit characteristics of the imaging device.

(その他の実施形態)
上述の実施形態では撮像装置における撮影時に合成画像を生成する場合について説明した。しかし、先に述べたとおり、本発明において撮影機能は必須でない。したがって、S103(S703)で撮影する代わりに、経時的に撮影され、記録されたRAWデータの1フレームを取得して、S104(S704)以降の処理を実行する画像処理装置でも本発明を実施可能である。この場合、S109(S709)の判定処理は、設定数のフレームの取得を完了したか否かを判定する。
(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 (S703), the present invention can also be implemented in an image processing apparatus that acquires one frame of RAW data that has been shot and recorded over time and executes the processes after S104 (S704). is. In this case, the determination processing in S109 (S709) determines whether or not acquisition of the set number of frames has been completed.

また、第2実施形態で説明したラインオフセット補正についても、撮影時に実行しなくてもよい。例えば、有効画素領域の合成画像と関連付けてラインオフセット補正用のOB領域の合成画像を記録しておくことにより、記録した装置とは異なる装置で、かつ任意のタイミングで、ラインオフセット補正を実行することができる。 Also, the line offset correction described in the second embodiment does not have to be executed at the time of photographing. For example, by recording the composite image of the OB area for line offset correction in association with the composite image of the effective pixel area, the line offset correction can be performed by a device different from the recording device at an arbitrary timing. be able to.

あるいは、OB領域についてもRAWデータとして記録しておくことで、合成画像の生成とラインオフセット補正とを、記録した装置とは異なる装置で、かつ任意のタイミングで実行することができる。 Alternatively, by recording the OB area as RAW data, it is possible to generate a composite image and perform line offset correction with an apparatus different from the recording apparatus at arbitrary timing.

また、上述の実施形態において、撮像素子102とは別の機能ブロックとして記載した構成の1つ以上を撮像素子102に実装してもよい。撮像素子102を積層型撮像素子とすることで、A/D変換部103、メモリ114、位置ずれ検出部109、位置ずれ補正部110、および合成部108を撮像素子102に実装することができる。 Also, in the above-described embodiments, one or more of the configurations described as functional blocks separate from the image sensor 102 may be mounted on the image sensor 102 . The A/D conversion unit 103, the memory 114, the positional deviation detection unit 109, the positional deviation correction unit 110, and the synthesizing unit 108 can be mounted on the imaging device 102 by using the stacked imaging device as the imaging device 102. FIG.

この場合、有効画素領域の合成画像は撮像素子102で生成することができる。また、ラインオフセット補正用のOB領域の合成画像も撮像素子102内で生成することができる。撮像素子102は、有効画素領域の合成画像のデータと、ラインオフセット補正用のOB領域の合成画像のデータとを別個の画像データとして出力してもよいし、1つの画像データに合成して出力してもよい。撮像素子内でラインオフセット補正も可能である場合、撮像素子はラインオフセット補正用のOB領域の合成画像のデータを出力しなくてもよい。 In this case, the composite image of the effective pixel area can be generated by the imaging device 102 . A composite image of the OB area for line offset correction can also be generated in the imaging device 102 . The image pickup device 102 may output the composite image data of the effective pixel area and the composite image data of the OB area for line offset correction as separate image data, or combine them into one image data and output them. You may If the line offset correction is also possible within the imaging device, the imaging device does not need to output data of the synthesized image of the OB area for line offset correction.

また、第2実施形態ではラインオフセット補正用のOB領域の合成画像を常に生成するものとしたが、ラインオフセット補正が必要と判断される場合のみ生成するようにしてもよい。ラインオフセット補正の必要性は、例えば撮影時のISO感度やシャッタ速度など撮影条件や、センサ温度や環境温度等の環境条件を、予め定めた閾値と比較することによって判定することができる。 Also, in the second embodiment, the composite image of the OB area for line offset correction is always generated, but it may be generated only when it is determined that line offset correction is necessary. The necessity of line offset correction can be determined, for example, by comparing shooting conditions such as ISO sensitivity and shutter speed at the time of shooting, and environmental conditions such as sensor temperature and environmental temperature, with predetermined threshold values.

本発明は、上述の実施形態の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 SYMBOLS 10... Imaging device, 102... Image sensor, 104... OB integrating part, 105... OB clamping part, 108... Synthesizing part, 109... Positional deviation detection part, 110... Positional deviation correction|amendment part, 113... Control part

Claims (11)

複数フレームの画像データを取得する取得手段と、
前記複数フレームの画像データを位置合わせする位置合わせ手段と、
位置合わせされた前記複数フレームの画像データを合成する合成手段と、を有する画像処理装置であって、
前記画像データには、撮像素子の有効画素領域の画素のデータであって、所定の色成分の配列に対応する信号で構成される第1のデータと、有効画素領域外の画素のデータである第2のデータが含まれ、
前記位置合わせ手段は、前記複数フレームの画像データに含まれる前記第1のデータを位置合わせするために用いる位置合わせ量に基づいて、前記複数フレームの画像データに含まれる前記第2のデータを位置合わせし、
前記合成手段が、前記位置合わせされた前記第1のデータを合成した第1の合成画像のデータと、前記位置合わせされた前記第2のデータを合成した第2の合成画像のデータとを生成し、
前記画像処理装置は、前記第2の合成画像のデータに基づいて、前記第1の合成画像のデータを補正する補正手段をさらに有する、ことを特徴とする画像処理装置。
an acquisition means for acquiring image data of multiple frames;
alignment means for aligning the image data of the plurality of frames;
and synthesizing means for synthesizing the aligned image data of the plurality of frames, wherein
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,
The alignment means aligns the second data included in the plurality of frames of image data based on an alignment amount used for aligning the first data included in the plurality of frames of image data. match,
The synthesizing means generates data of a first synthesized image obtained by synthesizing the aligned first data and data of a second synthesized image obtained by synthesizing the second data aligned. death,
The image processing apparatus, further comprising correction means for correcting the data of the first synthesized image based on the data of the second synthesized image.
前記補正手段は、前記複数フレームの画像データの生成に用いられた撮像素子に起因して前記第1の合成画像に画素ライン単位で発生する筋状パターンを補正することを特徴とする請求項1に記載の画像処理装置。 2. The correcting means corrects streak patterns generated in units of pixel lines in the first composite image due to an imaging device used to generate the image data of the plurality of frames. The image processing device according to . 前記補正手段が水平画素ラインに発生する筋状パターンを補正する場合、前記位置合わせ手段は、前記複数フレームの画像データに含まれる前記第1のデータを位置合わせするために用いる位置合わせ量の水平方向成分と垂直方向成分のうち、垂直方向成分を用いて前記第2のデータを位置合わせすることを特徴とする請求項2に記載の画像処理装置。 When the correction means corrects a streak pattern generated in a horizontal pixel line, the alignment means horizontally adjusts the amount of alignment used for aligning the first data included in the image data of the plurality of frames. 3. The image processing apparatus according to claim 2, wherein the second data is aligned using a vertical component out of the directional component and the vertical component. 前記補正手段が垂直画素ラインに発生する筋状パターンを補正する場合、前記位置合わせ手段は、前記複数フレームの画像データに含まれる前記第1のデータを位置合わせするために用いる位置合わせ量の水平方向成分と垂直方向成分のうち、水平方向成分を用いて前記第2のデータを位置合わせすることを特徴とする請求項2または3に記載の画像処理装置。 When the correction means corrects a streak pattern generated in a vertical pixel line, the alignment means horizontally adjusts the amount of alignment used for aligning the first data included in the image data of the plurality of frames. 4. The image processing apparatus according to claim 2, wherein the second data is aligned using a horizontal component out of the directional component and the vertical component. 前記第1の合成画像のデータと、前記第2の合成画像のデータとを関連付けて記録する記録手段をさらに有することを特徴とする請求項1から4のいずれか1項に記載の画像処理装置。 5. The image processing apparatus according to claim 1, further comprising recording means for recording the data of the first composite image and the data of the second composite image in association with each other. . 前記合成手段は、位置合わせされていない前記第2のデータを合成した第3の合成画像のデータをさらに生成することを特徴とする、請求項1から5のいずれか1項に記載の画像処理装置。 6. The image processing according to any one of claims 1 to 5, wherein said synthesizing means further generates data of a third synthesized image obtained by synthesizing said second data not aligned. Device. 前記第3の合成画像のデータが、前記第1の合成画像のデータの黒レベルの調整に用いられることを特徴とする請求項6に記載の画像処理装置。 7. The image processing apparatus according to claim 6, wherein the data of the third synthesized image is used for adjusting the black level of the data of the first synthesized image. 前記第2のデータが露光されない画素のデータであることを特徴とする、請求項1から7のいずれか1項に記載の画像処理装置。 8. The image processing apparatus according to any one of claims 1 to 7, wherein said second data is data of non-exposed pixels. 撮像素子と、
請求項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 device.
画像処理装置が実行する画像処理方法であって、
複数フレームの画像データを取得することと、
前記複数フレームの画像データを位置合わせすることと、
位置合わせされた前記複数フレームの画像データを合成することと、を有し、
前記画像データには、撮像素子の有効画素領域の画素のデータであって、所定の色成分の配列に対応する信号で構成される第1のデータと、有効画素領域外の画素のデータである第2のデータが含まれ、
前記位置合わせすることは、前記複数フレームの画像データに含まれる前記第1のデータを位置合わせするために用いる位置合わせ量に基づいて、前記複数フレームの画像データに含まれる前記第2のデータを位置合わせすることを含み、
前記合成することは、前記位置合わせされた前記第1のデータを合成した第1の合成画像のデータと、前記位置合わせされた前記第2のデータを合成した第2の合成画像のデータとを生成することを含み、
前記画像処理方法は、前記第2の合成画像のデータに基づいて、前記第1の合成画像のデータを補正することをさらに有する、ことを特徴とする画像処理方法。
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 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,
Aligning the second data included in the plurality of frames of image data based on an alignment amount used for aligning the first data included in the plurality of frames of image data. aligning;
The synthesizing includes data of a first synthesized image obtained by synthesizing the aligned first data and data of a second synthesized image obtained by synthesizing the aligned second data. including generating
The image processing method, further comprising correcting the data of the first synthesized image based on the data of the second synthesized image.
コンピュータを、請求項1から8のいずれか1項に記載の画像処理装置が有する各手段として機能させるためのプログラム。 A program for causing a computer to function as each unit included in the image processing apparatus according to any one of claims 1 to 8.
JP2021206265A 2021-10-26 2021-12-20 Image processing apparatus and image processing method Pending JP2023091493A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021206265A JP2023091493A (en) 2021-12-20 2021-12-20 Image processing apparatus and image processing method
US17/955,590 US20230096541A1 (en) 2021-10-26 2022-09-29 Image processing apparatus and image processing method
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
JP2021206265A JP2023091493A (en) 2021-12-20 2021-12-20 Image processing apparatus and image processing method

Publications (1)

Publication Number Publication Date
JP2023091493A true JP2023091493A (en) 2023-06-30

Family

ID=86940886

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021206265A Pending JP2023091493A (en) 2021-10-26 2021-12-20 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP2023091493A (en)

Similar Documents

Publication Publication Date Title
JP4826028B2 (en) Electronic camera
US20160142656A1 (en) Image pickup apparatus, image processing apparatus, and storage medium storing image processing program
TWI524709B (en) Image capture apparatus, method of controlling image capture apparatus, and electronic device
US8547451B2 (en) Apparatus and method for obtaining high dynamic range image
KR101229600B1 (en) Image capturing apparatus and camera shake correction method, and computer-readable medium
US9843735B2 (en) Image processing apparatus, imaging apparatus comprising the same, and image processing method
US10630920B2 (en) Image processing apparatus
JP4973719B2 (en) Imaging apparatus, imaging method, and imaging program
KR101352440B1 (en) Image processing apparatus, image processing method, and recording medium
JP2012019397A (en) Image processing apparatus, image processing method and image processing program
JP2017022610A (en) Image processing apparatus and image processing method
JP2016226059A (en) Image processing device, imaging apparatus, and image processing method
JP6108680B2 (en) Imaging apparatus, control method therefor, program, and storage medium
US20230096541A1 (en) Image processing apparatus and image processing method
JP7479831B2 (en) Imaging device, control method thereof, and program
JP5173664B2 (en) Image processing apparatus and image processing method
JP2006352804A (en) Imaging apparatus
JP2023091493A (en) Image processing apparatus and image processing method
JP6570311B2 (en) Image processing apparatus and image processing method
JP2023064501A (en) Image processing device and image processing method
JP5482428B2 (en) Imaging apparatus, camera shake correction method, and program
JPH06261333A (en) Image pickup device
JP2020036162A (en) Image processing device, imaging device, image processing method, and program
JP2011244027A (en) Imaging apparatus, camera shake correction method, program
JP3871681B2 (en) Imaging apparatus and camera