JP7497216B2 - Image processing device and method, imaging device, program, and storage medium - Google Patents

Image processing device and method, imaging device, program, and storage medium Download PDF

Info

Publication number
JP7497216B2
JP7497216B2 JP2020094912A JP2020094912A JP7497216B2 JP 7497216 B2 JP7497216 B2 JP 7497216B2 JP 2020094912 A JP2020094912 A JP 2020094912A JP 2020094912 A JP2020094912 A JP 2020094912A JP 7497216 B2 JP7497216 B2 JP 7497216B2
Authority
JP
Japan
Prior art keywords
raw data
exposure time
exposure
data corresponding
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.)
Active
Application number
JP2020094912A
Other languages
Japanese (ja)
Other versions
JP2021190869A (en
Inventor
貴史 村田
成記 望月
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 JP2020094912A priority Critical patent/JP7497216B2/en
Priority to US17/327,538 priority patent/US11483497B2/en
Priority to EP21175208.4A priority patent/EP3917138A1/en
Priority to CN202110569607.1A priority patent/CN113747152A/en
Publication of JP2021190869A publication Critical patent/JP2021190869A/en
Application granted granted Critical
Publication of JP7497216B2 publication Critical patent/JP7497216B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

本発明は、画素ごとに露光時間が制御可能な撮像センサーで取得した画像を符号化して記録する技術に関するものである。 The present invention relates to a technology for encoding and recording images acquired by an image sensor in which the exposure time can be controlled for each pixel.

従来の撮像装置では、撮像センサーによって撮像された生の画像情報(RAWデータ)をデベイヤー処理(デモザイク処理)し、輝度と色差から成る信号に変換して、各信号についてノイズ除去、光学的な歪補正、画像の適正化などの所謂現像処理を行っている。そして、現像処理された輝度信号及び色差信号を圧縮符号化し、記録媒体に記録するのが一般的である。 In conventional imaging devices, raw image information (RAW data) captured by an imaging sensor is de-Bayered (demosaiced) and converted into signals consisting of luminance and color difference, and each signal is then subjected to so-called development processing, such as noise removal, optical distortion correction, and image optimization. The developed luminance and color difference signals are then typically compressed and encoded, and recorded on a recording medium.

一方、撮像センサーで得られた直後の現像未処理の撮像データ(RAWデータ)を記録媒体に格納する撮像装置もある。RAWデータを記録すると、撮像センサーからの色情報を損ねることなく豊富な色階調数を保ったままの状態で保存できるため、自由度の高い編集が可能である。しかし、RAWデータは記録データ量が膨大となるため、記録メディアに多くの空き領域を必要とするという問題がある。そのため、RAWデータにおいても圧縮符号化を行い、データ量を抑えて記録することが望まれる。 On the other hand, there are also imaging devices that store unprocessed imaging data (RAW data) obtained by the imaging sensor immediately after development on a recording medium. When RAW data is recorded, it can be saved in a state that maintains a rich color gradation without compromising the color information from the imaging sensor, allowing for a high degree of editing freedom. However, the problem with RAW data is that the amount of recorded data is enormous, requiring a lot of free space on the recording media. For this reason, it is desirable to compress and encode the RAW data so that the amount of data recorded can be reduced.

ところで、ハイダイナミックレンジ画像を取得するデバイスとして、特許文献1に開示されているように、同一平面上に露光時間が異なる画素を配置することにより、1度の撮影でダイナミックレンジの広い画像を取得できる撮像デバイスが知られている。特許文献1には、その撮像デバイスを使用した場合の、現像におけるハイダイナミックレンジ画像を生成する際の合成方法に関して開示されている。 Incidentally, as disclosed in Patent Literature 1, an imaging device that can obtain an image with a wide dynamic range in a single shot by arranging pixels with different exposure times on the same plane is known as a device for obtaining a high dynamic range image. Patent Literature 1 also discloses a synthesis method for generating a high dynamic range image in development when using this imaging device.

特開2013-21660号公報JP 2013-21660 A

しかしながら、上述の特許文献1に開示された従来技術では、合成前のRAWデータを符号化する方法が開示されていない。 However, the conventional technology disclosed in the above-mentioned Patent Document 1 does not disclose a method for encoding the RAW data before synthesis.

また、特許文献1に記載されているような撮像デバイスを用いた場合、合成前のRAWデータを符号化しようとすると、同一平面上に配置された露光時間の異なる画素間でのレベル差が大きいため、高周波成分が多く発生して符号化効率が低下する。そのため、RAWデータを記録する際のデータ量が大きくなる課題がある。 In addition, when using an imaging device such as that described in Patent Document 1, when encoding the raw data before synthesis, the level difference between pixels with different exposure times arranged on the same plane is large, resulting in the generation of many high-frequency components and reduced encoding efficiency. This poses the problem of a large amount of data when recording the raw data.

本発明は上述した課題に鑑みてなされたものであり、その目的は、露光時間が異なる画素信号が混在したRAWデータを符号化して記録する場合に、データ量を削減できるようにすることである。 The present invention has been made in consideration of the above-mentioned problems, and its purpose is to make it possible to reduce the amount of data when encoding and recording RAW data that contains a mixture of pixel signals with different exposure times.

本発明に係る画像処理装置は、画素ごとに異なる露光時間で撮影可能な撮像素子から得られた、第1の露光時間に対応するRAWデータと、前記第1の露光時間よりも長い第2の露光時間に対応するRAWデータとから、複数のRAWデータを生成する生成手段と、前記生成手段により生成された複数のRAWデータを符号化する符号化手段と、を備え、前記生成手段は、前記第1の露光時間と前記第2の露光時間のうちの一方に対応するRAWデータにゲインをかけたRAWデータと、前記第1の露光時間と前記第2の露光時間のうちの他方に対応するRAWデータとの差分から差分RAWデータを生成し、前記符号化手段は、前記差分RAWデータと、前記第1の露光時間と前記第2の露光時間のうちの他方に対応するRAWデータとを符号化することを特徴とする。 The image processing device of the present invention comprises a generating means for generating a plurality of RAW data from RAW data corresponding to a first exposure time and RAW data corresponding to a second exposure time longer than the first exposure time, both obtained from an image sensor capable of capturing images with different exposure times for each pixel, and an encoding means for encoding the plurality of RAW data generated by the generating means, wherein the generating means generates differential RAW data from the difference between RAW data obtained by applying a gain to RAW data corresponding to one of the first exposure time and the second exposure time and RAW data corresponding to the other of the first exposure time and the second exposure time, and the encoding means encodes the differential RAW data and the RAW data corresponding to the other of the first exposure time and the second exposure time .

本発明によれば、露光時間が異なる画素信号が混在したRAWデータを符号化して記録する場合に、データ量を削減することが可能となる。 According to the present invention, it is possible to reduce the amount of data when encoding and recording RAW data that contains a mixture of pixel signals with different exposure times.

本発明の画像処理装置の第1の実施形態であるデジタルカメラの機能構成を示すブロック図。1 is a block diagram showing the functional configuration of a digital camera that is a first embodiment of an image processing apparatus of the present invention. 撮像部の画素配列を示す図。FIG. 2 is a diagram showing a pixel array of an imaging unit. 撮像部の画素配列及び露光時間の設定を示す図。FIG. 4 is a diagram showing the pixel arrangement of the imaging unit and settings of exposure time. 第1の実施形態におけるRAWデータの分離方法を示す図。5A to 5C are views showing a method of separating RAW data according to the first embodiment. 第1の実施形態におけるRAWデータの分離方法を示す図。5A to 5C are views showing a method of separating RAW data according to the first embodiment. 第1の実施形態におけるRAWデータの分離方法を示す図。5A to 5C are views showing a method of separating RAW data according to the first embodiment. 第1の実施形態におけるRAWデータの分離方法を示す図。5A to 5C are views showing a method of separating RAW data according to the first embodiment. 画素の露光時間が同一の場合におけるRAWデータ出力を示す図。FIG. 13 is a diagram showing RAW data output when pixels have the same exposure time. RAW符号化部の構成を示すブロック図。FIG. 4 is a block diagram showing the configuration of a RAW encoding unit. 周波数変換(サブバンド分割)の例を示す図。FIG. 13 is a diagram showing an example of frequency transformation (subband division). 量子化パラメータを生成する単位の例を示す図。FIG. 13 is a diagram showing an example of a unit for generating a quantization parameter. 量子化パラメータの生成の例を示す図。FIG. 13 is a diagram showing an example of generation of a quantization parameter. 量子化パラメータの生成の例を示す図。FIG. 13 is a diagram showing an example of generation of a quantization parameter. 量子化パラメータの生成の例を示す図。FIG. 13 is a diagram showing an example of generation of a quantization parameter. 第2の実施形態におけるRAWデータの分離方法を示す図。10A to 10C are diagrams showing a method of separating RAW data according to the second embodiment. 第3の実施形態におけるRAWデータの分離方法を示す図。13A to 13C are diagrams showing a method of separating RAW data according to the third embodiment. 第4の実施形態における画素配列及び露光時間の設定を示す図。13A and 13B are diagrams showing pixel arrangements and exposure time settings according to the fourth embodiment. 第4の実施形態における画素配列の置き換えを示す図。13A and 13B are diagrams showing replacement of pixel arrays in the fourth embodiment.

以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 The following embodiments are described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe multiple features, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicate explanations are omitted.

(第1の実施形態)
図1は、本発明の画像処理装置の第1の実施形態であるデジタルカメラ100の機能構成を示すブロック図である。デジタルカメラ100は、撮像部101、分離部102、RAW符号化部103、記録処理部104、記録媒体105、メモリI/F(メモリインターフェース)106、メモリ107を備えて構成される。
First Embodiment
1 is a block diagram showing the functional configuration of a digital camera 100 which is a first embodiment of an image processing device of the present invention. The digital camera 100 is configured to include an image capturing unit 101, a separation unit 102, a RAW encoding unit 103, a recording processing unit 104, a recording medium 105, a memory I/F (memory interface) 106, and a memory 107.

撮像部101は、光学レンズ、絞り、フォーカス制御部及びレンズ駆動部を含む光学ズームが可能なレンズ光学系と、光電変換素子を有する画素が2次元的に複数配列されたイメージセンサ(撮像素子)とを含む。 The imaging unit 101 includes a lens optical system capable of optical zooming, including an optical lens, an aperture, a focus control unit, and a lens driving unit, and an image sensor (imaging element) in which multiple pixels having photoelectric conversion elements are arranged two-dimensionally.

イメージセンサは、レンズ光学系により結像された被写体像を各画素で光電変換し、さらにA/D変換回路によってアナログ・デジタル変換して、画素単位のデジタル信号(画素データ、RAWデータ)を出力する。イメージセンサには、CCDイメージセンサやCMOSイメージセンサなどが用いられる。 The image sensor photoelectrically converts the subject image formed by the lens optical system at each pixel, then performs analog-to-digital conversion using an A/D conversion circuit, outputting a digital signal (pixel data, RAW data) for each pixel. Image sensors that can be used include CCD image sensors and CMOS image sensors.

なお、本実施形態においては、イメージセンサの各画素に、図2に示すようにR(赤)、G1/G2(緑)、B(青)の何れかのカラーフィルタが設けられている。なお、撮像部101から出力されるRAWデータは、メモリI/F106を介してメモリ107に格納される。 In this embodiment, each pixel of the image sensor is provided with a color filter of R (red), G1/G2 (green), or B (blue) as shown in FIG. 2. The raw data output from the imaging unit 101 is stored in the memory 107 via the memory I/F 106.

分離部102は、撮像部101で取得したRAWデータを露光時間ごとのRAWデータに分離する回路またはモジュールである。メモリ107に格納されているRAWデータをメモリI/F106を介して読み出して、露光時間ごとのRAWデータに分離してRAW符号化部103へ出力する。 The separation unit 102 is a circuit or module that separates the RAW data acquired by the imaging unit 101 into RAW data for each exposure time. The RAW data stored in the memory 107 is read via the memory I/F 106, separated into RAW data for each exposure time, and output to the RAW encoding unit 103.

RAW符号化部103は、RAWデータに対する演算を行う回路またはモジュールであり、分離部102から入力されたRAWデータを符号化する。RAW符号化部103は、符号化によって生成した符号化データを、メモリI/F106を介してメモリ107に格納する。 The RAW encoding unit 103 is a circuit or module that performs calculations on the RAW data, and encodes the RAW data input from the separation unit 102. The RAW encoding unit 103 stores the encoded data generated by encoding in the memory 107 via the memory I/F 106.

記録処理部104は、メモリ107へ格納された符号化データ等の各種データを、メモリI/F106を介して読み出し、記録媒体105へ記録する。記録媒体105は、大容量のランダムアクセス可能な、例えば不揮発性メモリで構成される記録メディアである。 The recording processing unit 104 reads various data, such as encoded data stored in the memory 107, via the memory I/F 106 and records it on the recording medium 105. The recording medium 105 is a large-capacity randomly accessible recording medium, such as a non-volatile memory.

メモリI/F106は、各処理部からのメモリ・アクセス要求を調停し、メモリ107に対する読み出し・書き込み制御を行う。メモリ107は、例えばSDRAMなどの揮発性メモリであり、記憶手段として動作する。メモリ107は、上述の画像データ、音声データ等の各種のデータ、あるいはデジタルカメラ100を構成する各処理部から出力される各種データを格納するための記憶領域を提供する。 The memory I/F 106 arbitrates memory access requests from each processing unit and controls reading and writing to the memory 107. The memory 107 is a volatile memory such as an SDRAM, and operates as a storage means. The memory 107 provides a storage area for storing various data such as the image data and audio data described above, or various data output from each processing unit constituting the digital camera 100.

次に、撮像部101の画素の配列構造について、図2を参照して説明する。図2に示すように、撮像部101には、2×2画素ごとにR画素、G1画素、G2画素、B画素が配列されており、同一の色が2×2画素ごとに配列されているのが特徴である。撮像部101は、これらの計4×4画素を最小単位として、この最小単位を繰り返し配列した構造を有する。 Next, the pixel arrangement structure of the imaging unit 101 will be described with reference to FIG. 2. As shown in FIG. 2, the imaging unit 101 has an R pixel, a G1 pixel, a G2 pixel, and a B pixel arranged in 2×2 pixel units, and is characterized in that the same color is arranged in 2×2 pixel units. The imaging unit 101 has a structure in which a total of 4×4 pixels is the minimum unit, and this minimum unit is repeatedly arranged.

図2に示す画素配列構造を有し、画素ごとに露光時間を制御可能(画素ごとに異なる露光時間で撮影可能)な撮像素子における露光時間の設定について、図3を参照して説明する。図3に示すように、水平方向をx、垂直方向をyとして、列番号をx座標で表し、行番号をy座標で表している。括弧で示した数字はイメージセンサ上の各画素の位置を示す座標を示している。また、白色の画素が短時間露光画素、灰色の画素が長時間露光画素を表している。本実施形態においては、図3に示すように列方向にジグザグ状に短時間露光を行う短時間露光画素と長時間露光を行う長時間露光画素が設定されている。 The setting of the exposure time in an image sensor having the pixel array structure shown in FIG. 2 and capable of controlling the exposure time for each pixel (capturing images with different exposure times for each pixel) will be described with reference to FIG. 3. As shown in FIG. 3, the horizontal direction is x and the vertical direction is y, with the column number represented by the x coordinate and the row number represented by the y coordinate. Numbers in parentheses indicate the coordinates indicating the position of each pixel on the image sensor. White pixels represent short-time exposure pixels and gray pixels represent long-time exposure pixels. In this embodiment, short-time exposure pixels that perform short-time exposure and long-time exposure pixels that perform long-time exposure are set in a zigzag pattern in the column direction as shown in FIG. 3.

例えば、図3の左上端の4つのR画素の露光時間の設定は以下のとおりである。R(1,1)は短時間露光画素、R(2,1)は長時間露光画素、R(1,2)は長時間露光画素、R(2,2)は短時間露光画素となっている。このように、各列において短時間露光画素と長時間露光画素が交互に設定され、また各行に短時間露光画素と長時間露光画素が交互に設定されている。第1列と、第2列においてy方向に短時間露光画素のみを辿ると、上から第1行では第1列が短時間露光画素、第2行では第2列が短時間露光画素、第3行では第1列が短時間露光画素、第4行では第2列が短時間露光画素となっている。同様に、第1列と、第2列においてy方向に長時間露光画素のみを辿ると、上から第1行では第2列が長時間露光画素、第2行では第1列が長時間露光画素、第3行では第2列が長時間露光画素、第4行では第1列が長時間露光画素となっている。 For example, the exposure times of the four R pixels at the top left of FIG. 3 are set as follows: R(1,1) is a short-exposure pixel, R(2,1) is a long-exposure pixel, R(1,2) is a long-exposure pixel, and R(2,2) is a short-exposure pixel. In this way, short-exposure pixels and long-exposure pixels are set alternately in each column, and short-exposure pixels and long-exposure pixels are set alternately in each row. If we trace only the short-exposure pixels in the y direction in the first and second columns, from the top, the first column is a short-exposure pixel in the first row, the second column is a short-exposure pixel in the second row, the first column is a short-exposure pixel in the third row, and the second column is a short-exposure pixel in the fourth row. Similarly, if we trace only the long-exposure pixels in the y direction in the first and second columns, from the top, the second column is a long-exposure pixel in the first row, the first column is a long-exposure pixel in the second row, the second column is a long-exposure pixel in the third row, and the first column is a long-exposure pixel in the fourth row.

以上のように、画素配列構造とその露光時間の設定は、同一色の画素が2×2画素単位で設定され、この4画素中に2つの短時間露光画素(2種類の露光時間の一方)と2つの長時間露光画素(2種類の露光時間の他方)が配置されている構造となっている。 As described above, the pixel array structure and its exposure time settings are such that pixels of the same color are set in 2 x 2 pixel units, and among these four pixels, two short-exposure pixels (one of the two types of exposure times) and two long-exposure pixels (the other of the two types of exposure times) are arranged.

ここで、撮像部101でRAWデータを取得したまま、すなわち露光時間の異なる画素が混在したまま符号化しようとすると、露光時間が異なる画素間でのレベル差が大きいため、高周波成分が多く発生しRAWデータの記録データ量が大きくなってしまう。そこで本実施形態では、分離部102で露光時間ごとのRAWデータに分離して、画素間のレベルを合わせ高周波成分を抑制することでRAWデータの記録データ量を削減する。 If the RAW data is to be encoded while it is acquired by the imaging unit 101, that is, while pixels with different exposure times are mixed, the level difference between the pixels with different exposure times is large, resulting in a large amount of high-frequency components and a large amount of recorded RAW data. Therefore, in this embodiment, the separation unit 102 separates the RAW data for each exposure time, matches the levels between the pixels, and suppresses the high-frequency components, thereby reducing the amount of recorded RAW data.

次に、その分離方法に関して、図4A~図4Dを参照して説明する。分離部102は、図4A~図4Dに示すように、撮像部101から入力されるRAWデータを、短時間露光画素のみで構成されるベイヤー配列構造のRAWデータと、長時間露光画素のみで構成されるベイヤー配列構造のRAWデータとにそれぞれ分離し、RAW符号化部103へ出力する。 Next, the separation method will be described with reference to Figs. 4A to 4D. As shown in Figs. 4A to 4D, the separation unit 102 separates the RAW data input from the imaging unit 101 into RAW data in a Bayer array structure composed only of short-time exposure pixels, and RAW data in a Bayer array structure composed only of long-time exposure pixels, and outputs the data to the RAW encoding unit 103.

具体的には、短時間露光画素のみで構成されるRAWデータを、図4AのRAWデータ401aと図4BのRAWデータ401bで示す、2面の短時間露光RAWデータに分離する。RAWデータ401aは、図4Aに示すように、奇数行・奇数列のひし形で囲った短時間露光画素を抜き出して構成される短時間露光RAWデータである。また、RAWデータ401bは、図4Bに示すように、偶数行・偶数列のひし形で囲った短時間露光画素を抜き出して構成される短時間露光RAWデータである。 Specifically, RAW data consisting only of short-exposure pixels is separated into two planes of short-exposure RAW data, shown as RAW data 401a in FIG. 4A and RAW data 401b in FIG. 4B. RAW data 401a is short-exposure RAW data consisting of short-exposure pixels surrounded by diamond shapes in odd rows and odd columns, as shown in FIG. 4A. RAW data 401b is short-exposure RAW data consisting of short-exposure pixels surrounded by diamond shapes in even rows and even columns, as shown in FIG. 4B.

同様にして、長時間露光画素のみで構成されるRAWデータを、図4CのRAWデータ401cと図4DのRAWデータ401dで示す、2面の長時間露光RAWデータに分離する。RAWデータ401cは、図4Cに示すように、奇数行・偶数列のひし形で囲った長時間露光画素を抜き出して構成される長時間露光RAWデータである。また、RAWデータ401dは、図4Dに示すように、偶数行・奇数列のひし形で囲った長時間露光画素を抜き出して構成される長時間露光RAWデータである。RAW符号化部103は、分離部102からベイヤー配列状に入力されるRAWデータ401a,401b,401c,401dをそれぞれ符号化する。 In the same manner, the RAW data consisting only of long exposure pixels is separated into two planes of long exposure RAW data shown as RAW data 401c in FIG. 4C and RAW data 401d in FIG. 4D. RAW data 401c is long exposure RAW data consisting of long exposure pixels surrounded by a diamond shape in odd rows and even columns as shown in FIG. 4C. RAW data 401d is long exposure RAW data consisting of long exposure pixels surrounded by a diamond shape in even rows and odd columns as shown in FIG. 4D. The RAW encoding unit 103 encodes the RAW data 401a, 401b, 401c, and 401d input from the separation unit 102 in a Bayer array.

なお、ここまでは、図2の画素配列を用いて、同一平面上に配置される画素の露光時間が異なる場合の分離部102の分離方法について説明したが、次に、画素の露光時間を全て同じにした場合の分離部102の処理に関して、図5を参照して説明する。 Up to this point, we have explained the separation method of the separation unit 102 when the exposure times of pixels arranged on the same plane are different using the pixel array in Figure 2. Next, we will explain the processing of the separation unit 102 when the exposure times of all pixels are the same, with reference to Figure 5.

この場合、分離部102は、撮像部101で取得したRAWデータに対して、図5に示すように、灰色で示したひし形で囲った同一の色成分4画素ごとの画素平均値を算出して、RAWデータ501を構成し、RAW符号化部103へ出力する。具体的には、以下の式1~式4に示すように同色成分ごとの加算平均を算出して分離を行う。 In this case, the separation unit 102 calculates the pixel average value for every four pixels of the same color component surrounded by a gray diamond as shown in FIG. 5 for the RAW data acquired by the imaging unit 101, constructs RAW data 501, and outputs it to the RAW encoding unit 103. Specifically, separation is performed by calculating the arithmetic average for each same color component as shown in the following Equations 1 to 4.

Figure 0007497216000001
Figure 0007497216000001

続いて、短時間露光RAWデータ401a,401bと、長時間露光RAWデータ401c,401dに対して処理を行うRAW符号化部103の詳細な構成及び処理の流れについて、図6に示すブロック図を参照しながら説明する。 Next, the detailed configuration and processing flow of the RAW encoding unit 103 that processes the short-exposure RAW data 401a and 401b and the long-exposure RAW data 401c and 401d will be described with reference to the block diagram shown in FIG. 6.

RAW符号化部103は、チャネル変換部601、周波数変換部602、量子化パラメータ生成部603、量子化部604、符号化部605、量子化パラメータ符号化部606を備えて構成されている。 The RAW encoding unit 103 is configured with a channel conversion unit 601, a frequency conversion unit 602, a quantization parameter generation unit 603, a quantization unit 604, an encoding unit 605, and a quantization parameter encoding unit 606.

チャネル変換部601は、分離部102から入力されるベイヤー配列状のRAWデータを複数のチャネルに変換する。例えば、ベイヤー配列のR、G1、G2、B毎に4つのチャネルへ変換する。あるいは、R、G1、G2、Bに対して更に以下の変換式5~8により4つのチャネルへ変換する。 The channel conversion unit 601 converts the Bayer array RAW data input from the separation unit 102 into multiple channels. For example, it converts each of the R, G1, G2, and B in the Bayer array into four channels. Alternatively, it further converts R, G1, G2, and B into four channels using the following conversion formulas 5 to 8.

Y=(R+G1+G2+B)/4 式5
C0=R-B 式6
C1=(G0+G1)/2-(R+B)/2 式7
C2=G0-G1 式8
なお、ここでは4つのチャネルへ変換する構成例を示しているが、チャネル数や変換方法は上記以外の方法であってもよい。
Y = (R + G1 + G2 + B) / 4 Equation 5
C0 = R - B Equation 6
C1 = (G0 + G1) / 2 - (R + B) / 2 Equation 7
C2 = G0 - G1 Equation 8
Although a configuration example in which conversion to four channels is shown here, the number of channels and the conversion method may be other than those described above.

周波数変換部602は、チャネル単位に所定の分解レベル(以降、levと呼ぶ)で離散ウェーブレット変換による周波数変換処理を行い、生成されたサブバンドデータ(変換係数)を量子化パラメータ生成部603及び量子化部604へ出力する。 The frequency transform unit 602 performs frequency transform processing using a discrete wavelet transform at a predetermined decomposition level (hereafter referred to as lev) on a channel-by-channel basis, and outputs the generated subband data (transform coefficients) to the quantization parameter generation unit 603 and the quantization unit 604.

図7(a)は、lev=1のサブバンド分割処理に関わる離散ウェーブレット変換を実現するためのフィルタバンクの構成を示している。離散ウェーブレット変換処理を水平、垂直方向に実行すると、図7(b)に示すように1つの低周波数サブバンド(LL)と、3つの高周波数サブバンド(HL,LH,HH)へ分割される。 Figure 7(a) shows the configuration of a filter bank for realizing the discrete wavelet transform associated with the subband decomposition process with lev=1. When the discrete wavelet transform process is performed in the horizontal and vertical directions, the signal is decomposed into one low-frequency subband (LL) and three high-frequency subbands (HL, LH, HH) as shown in Figure 7(b).

図7(a)に示すローパスフィルタ(以降、lpfと呼ぶ)及びハイパスフィルタ(以降、hpfと呼ぶ)の伝達関数をそれぞれ式9、式10に示す。 The transfer functions of the low-pass filter (hereafter referred to as lpf) and high-pass filter (hereafter referred to as hpf) shown in FIG. 7(a) are shown in Equation 9 and Equation 10, respectively.

lpf(z)=(-z-2+2z-1+6+2z1-z2)/8 式9
hpf(z)=(-z-1+2-z1)/2 式10
levが1よりも大きい場合には、低周波数サブバンド(LL)に対して階層的にサブバンド分割が実行される。なお、ここでは離散ウェーブレット変換は、式9、式10に示されるように、5タップのlpfと3タップのhpfで構成されているが、これとは異なるタップ数及び異なる係数のフィルタ構成であってもよい。
lpf(z)=(-z -2 +2z - 1+6+ 2z1 - z2 )/8 Equation 9
hpf(z)=(-z -1 +2- z1 )/2 Equation 10
When lev is greater than 1, hierarchical subband decomposition is performed on the low frequency subband (LL). Note that, although the discrete wavelet transform is configured with a 5-tap lpf and a 3-tap hpf as shown in Equations 9 and 10, a filter configuration with a different number of taps and different coefficients may be used.

量子化パラメータ生成部603は、周波数変換部602により生成されたサブバンドデータ(変換係数)に対してある所定のサブバンドデータ単位ごとに量子化処理を行うための量子化パラメータを生成する。生成した量子化パラメータは、量子化パラメータ符号化部606へ入力されると共に量子化部604へも供給される。 The quantization parameter generation unit 603 generates a quantization parameter for performing a quantization process for each predetermined subband data unit on the subband data (transformation coefficients) generated by the frequency transformation unit 602. The generated quantization parameter is input to the quantization parameter coding unit 606 and is also supplied to the quantization unit 604.

量子化部604は、周波数変換部602から出力されたサブバンドデータ(変換係数)に対して量子化パラメータ生成部603から供給された量子化パラメータに基づき量子化処理を行い、量子化後のサブバンドデータ(変換係数)を符号化部605へ出力する。 The quantization unit 604 performs quantization processing on the subband data (transformation coefficients) output from the frequency conversion unit 602 based on the quantization parameters supplied from the quantization parameter generation unit 603, and outputs the quantized subband data (transformation coefficients) to the encoding unit 605.

符号化部605は、量子化部604から出力された量子化後のサブバンドデータ(変換係数)に対して、サブバンド毎にラスタースキャン順で予測差分型エントロピー符号化を行い、生成した符号化RAWデータをメモリ107へ格納する。なお、予測方式やエントロピー符号化方式は、他の方式であってもよい。 The encoding unit 605 performs predictive differential entropy encoding for each subband in raster scan order on the quantized subband data (transform coefficients) output from the quantization unit 604, and stores the generated encoded RAW data in the memory 107. Note that the prediction method and entropy encoding method may be other methods.

量子化パラメータ符号化部606は、量子化パラメータ生成部603から入力された量子化パラメータに対して符号化を行う処理部である。符号化部605と共通の符号化方式により量子化パラメータを符号化し、生成した符号化量子化パラメータをメモリ107へ格納する。 The quantization parameter encoding unit 606 is a processing unit that encodes the quantization parameters input from the quantization parameter generation unit 603. The quantization parameter is encoded using a common encoding method with the encoding unit 605, and the generated encoded quantization parameters are stored in the memory 107.

次に、上述した所定のサブバンドの単位を4×4として量子化パラメータを生成する場合のサブバンドデータとチャネルデータ及びRAWデータの関係を図8を参照して説明する。 Next, the relationship between the subband data, channel data, and RAW data when generating quantization parameters with the above-mentioned specified subband unit being 4x4 will be explained with reference to Figure 8.

4×4のサブバンドは、図8に示すように各チャネルの8×8画素相当に対応し、また各RAWデータの16×16画素相当のブロックに対応する。よって、この場合には、量子化パラメータを、短時間露光RAWデータ401a,401b及び長時間露光RAWデータ401c,401dにおいて、それぞれ16×16画素相当のRAWデータブロックごとにメモリ107へ格納することが必要となる。 As shown in FIG. 8, the 4x4 subbands correspond to 8x8 pixels in each channel, and also correspond to blocks of 16x16 pixels in each RAW data. Therefore, in this case, it is necessary to store the quantization parameters in memory 107 for each RAW data block of 16x16 pixels in the short-exposure RAW data 401a, 401b and the long-exposure RAW data 401c, 401d.

なお、量子化パラメータのデータ量を削減するためには、短時間露光RAWデータ401a,401bと長時間露光RAWデータ401c,401dを共通の量子化パラメータとすることが有効である。この場合は、データ量を1/2に削減することができる。また、本実施形態では、さらにデータ量を削減すべく、適正露出に近い方の露光時間で生成された量子化パラメータを基準として、もう片方の量子化パラメータを算出する。これにより、量子化パラメータのデータ量を1/4に削減することができる。ここで、適正露出に近い方を基準とするのは、白とびや黒つぶれが発生している露出過多及び露出不足の画像では、被写体の正確な特徴に応じた量子化パラメータの生成ができないためである。 In order to reduce the amount of data for the quantization parameters, it is effective to use a common quantization parameter for the short-exposure RAW data 401a, 401b and the long-exposure RAW data 401c, 401d. In this case, the amount of data can be reduced to 1/2. In this embodiment, in order to further reduce the amount of data, the quantization parameter generated with the exposure time closer to the correct exposure is used as a reference to calculate the other quantization parameter. This makes it possible to reduce the amount of data for the quantization parameters to 1/4. The reason why the exposure closer to the correct exposure is used as a reference here is that in overexposed and underexposed images in which highlight blowout and shadow crush occur, a quantization parameter that accurately matches the characteristics of the subject cannot be generated.

具体例として、短時間露光の方を適正露出に近いとする場合、短時間露光RAWデータで生成した量子化パラメータを基準として、長時間露光RAWデータの量子化パラメータを算出するための計算式を式11に示す。 As a specific example, if the short exposure is considered to be closer to the correct exposure, the formula for calculating the quantization parameter of the long exposure RAW data is shown in Equation 11, based on the quantization parameter generated from the short exposure RAW data.

L_Qp=α×S_Qp+β 式11
ここで、
L_Qp:長時間露光RAWデータの量子化パラメータ
S_Qp:短時間露光RAWデータの量子化パラメータ
α:傾き
β:切片
である。
L_Qp = α × S_Qp + β Equation 11
here,
L_Qp: quantization parameter of long exposure RAW data, S_Qp: quantization parameter of short exposure RAW data, α: slope, and β: intercept.

なお、本実施形態では、短時間露光RAWデータで生成した量子化パラメータを基準として、長時間露光RAWデータの量子化パラメータを算出している。しかし、長時間露光RAWデータで生成した量子化パラメータを基準として短時間露光RAWデータの量子化パラメータを生成してもよい。また、短時間露光と長時間露光のどちらも基準とせずに、短時間露光と長時間露光のそれぞれでα、βを設定して、量子化パラメータを算出してもよい。 In this embodiment, the quantization parameter for the long exposure RAW data is calculated based on the quantization parameter generated from the short exposure RAW data. However, the quantization parameter for the short exposure RAW data may be generated based on the quantization parameter generated from the long exposure RAW data. Also, the quantization parameter may be calculated by setting α and β for each of the short exposure and long exposure without using either the short exposure or long exposure as the reference.

次に、式11に示したα、βの決定方法に関して説明する。α,βは任意の値でもよいが、本実施形態では詳細なパラメータの決定方法について説明する。上述した例のように、短時間露光の方を適正露出に近いとした場合、長時間露光では短時間露光と比較して露光時間が長いため露出過多となる。よって、短時間露光で明るさが中位から明部の領域に関しては、長時間露光では画素値が飽和レベルに達して被写体の明るさに応じた画素値出力ができなくなっている可能性が高くなる。一方で、暗部領域に関しては短時間露光より詳細な情報を取得することが可能となる。そのため、長時間露光RAWデータの量子化パラメータは、短時間露光RAWデータにおいて明るさが中位から明部と判定された領域に関しては短時間露光と比較して大きくする。また、暗部と判定された領域に関しては同じにすることにより、画質を担保しながら量子化パラメータのデータ量を削減することが可能となる。 Next, a method for determining α and β shown in Equation 11 will be described. Although α and β may be any value, in this embodiment, a detailed method for determining the parameters will be described. As in the above example, if the short exposure is closer to the correct exposure, the long exposure will be overexposed because the exposure time is longer than that of the short exposure. Therefore, in the area where the brightness is medium to bright in the short exposure, the pixel value reaches a saturation level in the long exposure, and it is highly likely that the pixel value output according to the brightness of the subject cannot be performed. On the other hand, it is possible to obtain more detailed information than in the short exposure in the dark area. Therefore, the quantization parameter of the long exposure RAW data is made larger in the area where the brightness is determined to be medium to bright in the short exposure RAW data compared to the short exposure. In addition, by making the quantization parameter the same for the area determined to be dark, it is possible to reduce the data amount of the quantization parameter while maintaining image quality.

具体的に、図9A~図9Cを参照して説明する。図9Aは、短時間露光RAWデータにおける、短時間露光RAWデータの明るさに応じた量子化パラメータの設定の一例を示している。また、図9Bは、長時間露光RAWデータにおける、短時間露光RAWデータの明るさに応じた量子化パラメータ設定の一例を示している。なお、明るさの指標としては、上述した量子化パラメータ生成単位に対応する1LLサブバンドを用いて評価してもよい。それぞれの量子化パラメータの大小関係を、式12~式14に示す。 Specifically, the following will be described with reference to Figures 9A to 9C. Figure 9A shows an example of setting quantization parameters in short-exposure RAW data according to the brightness of the short-exposure RAW data. Also, Figure 9B shows an example of setting quantization parameters in long-exposure RAW data according to the brightness of the short-exposure RAW data. Note that the brightness index may be evaluated using the 1LL subband, which corresponds to the quantization parameter generation unit described above. The magnitude relationship of each quantization parameter is shown in Equations 12 to 14.

Q0<Q1<Q2 式12
Q1<Q3 式13
Q2<Q4 式14
まず、短時間露光RAWデータにおける量子化パラメータは、視覚特性を考慮して、暗部ほど量子化パラメータが小さくなるように設定する(Q0<Q1<Q2)。これに対し、長時間露光RAWデータでは、短時間露光RAWデータの暗部に対応する領域では短時間露光RAWデータと同じQ0となるように、中位から明部に対応する領域では短時間露光RAWデータよりも量子化パラメータが大きくなるように(Q1<Q3、Q2<Q4)設定する。
Q0<Q1<Q2 Equation 12
Q1 < Q3 Equation 13
Q2<Q4 Equation 14
First, the quantization parameter in the short-exposure RAW data is set so that the darker the area, the smaller the quantization parameter (Q0<Q1<Q2) in consideration of visual characteristics. On the other hand, in the long-exposure RAW data, the quantization parameter is set so that the area corresponding to the dark area of the short-exposure RAW data has the same Q0 as the short-exposure RAW data, and the area corresponding to the medium to bright area has a larger quantization parameter than the short-exposure RAW data (Q1<Q3, Q2<Q4).

図9Cは、短時間露光RAWデータで生成した量子化パラメータを基準として、長時間露光RAWデータの量子化パラメータを算出するためのグラフを示している。横軸は、短時間露光RAWデータの量子化パラメータ(S_Qp)を、縦軸は長時間露光RAWデータの量子化パラメータ(L_Qp)を表している。式11に示したα、βは式12~式14の関係となるように設定すればよい。 Figure 9C shows a graph for calculating the quantization parameter of long exposure RAW data based on the quantization parameter generated from the short exposure RAW data. The horizontal axis represents the quantization parameter of the short exposure RAW data (S_Qp), and the vertical axis represents the quantization parameter of the long exposure RAW data (L_Qp). α and β shown in Equation 11 can be set to satisfy the relationship shown in Equations 12 to 14.

なお、α、βは符号化データと同様、メモリ107へ格納され、メモリI/F106を介して記録媒体105に符号化データと共に記録される。また、基準とする量子化パラメータを短時間露光と長時間露光のどちらにするかを示すフラグをメモリ107へ格納し、メモリI/F106を介して記録媒体105に符号化データと共に記録する。ただし、短時間露光及び長時間露光のどちらも基準とせずにそれぞれの露光時間でα、βを持つ場合は、フラグを持たなくてよい。 Note that α and β are stored in memory 107, just like the encoded data, and are recorded together with the encoded data on recording medium 105 via memory I/F 106. Also, a flag indicating whether the reference quantization parameter is for short exposure or long exposure is stored in memory 107, and is recorded together with the encoded data on recording medium 105 via memory I/F 106. However, if neither short exposure nor long exposure is used as the reference, and α and β are provided for each exposure time, then there is no need to have a flag.

また、上述したいずれの場合にも対応する場合は、まず基準とする露光時間を持つか否かを示すフラグを持ち、次に基準とする露光時間がある場合は短時間露光と長時間露光のどちらを基準としたかを示すフラグを持てばよい。この場合も、それぞれのフラグ情報をメモリ107へ格納し、メモリI/F106を介して記録媒体105に符号化データと共に記録する。 Also, to handle both of the above cases, first have a flag indicating whether or not there is a reference exposure time, and then, if there is a reference exposure time, have a flag indicating whether the reference is a short exposure or a long exposure. In this case, too, each flag information is stored in memory 107 and recorded on recording medium 105 together with the encoded data via memory I/F 106.

以上説明したように、本実施形態では、分離部102で露光時間ごとにRAWデータを分離して、符号化する画素間のレベル差をなくし、高周波成分を抑制することにより、RAWデータの記録データ量を削減することが可能になる。また、片方のRAWデータで算出した量子化パラメータを基準として、露光時間の異なるもう片方の量子化パラメータを決定することにより、RAWデータの記録データ量を削減することが可能になる。 As described above, in this embodiment, the separation unit 102 separates the RAW data for each exposure time, eliminating the level difference between the pixels to be encoded, and suppressing high frequency components, making it possible to reduce the amount of recorded RAW data. In addition, by using the quantization parameter calculated for one piece of RAW data as a reference to determine the quantization parameter for the other piece of RAW data with a different exposure time, it is possible to reduce the amount of recorded RAW data.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。第2の実施形態では、分離部102におけるRAWデータの分離方法が第1の実施形態と異なる。なお、第2の実施形態のデジタルカメラの構成は、第1の実施形態と同一であるため、重複する説明は省略し、相違点について説明する。
Second Embodiment
Next, a second embodiment of the present invention will be described. In the second embodiment, the method of separating RAW data in the separation unit 102 is different from that in the first embodiment. Note that the configuration of the digital camera in the second embodiment is the same as that in the first embodiment, so a duplicated description will be omitted and only the differences will be described.

第1の実施形態では、分離部102において露光時間の同じ画素ごとに分離したRAWデータ、具体的には短時間露光画素のみで構成されるRAWデータ2面と、長時間露光画素のみで構成されるRAWデータ2面を、RAW符号化部103へ出力した。 In the first embodiment, the separation unit 102 outputs the raw data separated into pixels with the same exposure time, specifically, two planes of raw data consisting of only short-exposure pixels and two planes of raw data consisting of only long-exposure pixels, to the raw encoding unit 103.

これに対し、第2の実施形態では、さらにデータ量を削減するために、分離部102において、近傍にある同露光時間かつ同一色成分の画素値を加算し、その平均画素値を算出してRAW符号化部103へ出力する方法について説明する。 In contrast, in the second embodiment, in order to further reduce the amount of data, the separation unit 102 adds pixel values of nearby pixels with the same exposure time and color component, calculates the average pixel value, and outputs it to the RAW encoding unit 103.

本実施形態における分離部102の処理について、図10を参照して説明する。撮像部101から入力される露光時間が異なる画素が混在するRAWデータに対して、分離部102は図10(a)に示す長方形で囲った画素、すなわち短時間露光画素かつ同一色成分の画素値の加算平均を算出し、短時間露光RAWデータ1001aに分離する。具体的には、以下の式15~式18に示すように、同色成分ごとの加算平均を算出して分離を行う。 The processing of the separation unit 102 in this embodiment will be described with reference to FIG. 10. For RAW data input from the imaging unit 101 containing a mixture of pixels with different exposure times, the separation unit 102 calculates the arithmetic average of the pixel values of the pixels enclosed in the rectangle shown in FIG. 10(a), i.e., short-exposure pixels and pixel values of the same color component, and separates the data into short-exposure RAW data 1001a. Specifically, the separation is performed by calculating the arithmetic average for each same color component, as shown in the following Equations 15 to 18.

Figure 0007497216000002
Figure 0007497216000002

同様に、図10(b)に示す長方形で囲った画素である長時間露光画素かつ同一色成分の画素同士を加算平均して長時間露光RAWデータ1001bに分離する。具体的には、以下の式19~式22に示すように同色成分ごとの加算平均を算出して分離を行う。 Similarly, pixels surrounded by a rectangle in FIG. 10(b) that are long-exposure pixels and have the same color component are averaged and separated into long-exposure RAW data 1001b. Specifically, the average of each same color component is calculated and separated as shown in the following Equations 19 to 22.

Figure 0007497216000003
Figure 0007497216000003

以上説明したように、第2の実施形態では、撮像部101で取得したRAWデータを分離部102で加算平均して分離することにより、RAW符号化部103へ出力するデータ量を第1の実施形態と比較して1/2に削減することが可能となる。 As described above, in the second embodiment, the RAW data acquired by the imaging unit 101 is averaged and separated by the separation unit 102, making it possible to reduce the amount of data output to the RAW encoding unit 103 to half that of the first embodiment.

(第3の実施形態)
次に、本発明の第3の実施形態について説明する。第3の実施形態では、分離部102におけるRAWデータの分離方法が、第1の実施形態及び第2の実施形態と異なる。なお、本実施形態のデジタルカメラの構成は、第1の実施形態及び第2の実施形態と同一であるため、重複する説明は省略し、相違点について説明する。
Third Embodiment
Next, a third embodiment of the present invention will be described. In the third embodiment, the method of separating RAW data in the separation unit 102 is different from that of the first and second embodiments. Note that the configuration of the digital camera of this embodiment is the same as that of the first and second embodiments, so a duplicated description will be omitted and only the differences will be described.

第2の実施形態では、分離部102において、近傍にある同露光時間画素かつ同一色成分同士の加算平均を算出してRAW符号化部103へ出力した。第3の実施形態では、第2の実施形態と比べてさらにデータ量を削減するために、片方の露光時間に合わせて、もう片方の露光時間のRAWデータに対してゲインを掛けて、その差分値をRAW符号化部103へ出力する。つまり、RAW符号化部103は、一方の露光時間については加算平均のRAWデータを符号化し、他方の露光時間については差分値のRAWデータ(差分RAWデータ)を符号化する。 In the second embodiment, the separation unit 102 calculates the average of adjacent pixels with the same exposure time and the same color component, and outputs it to the RAW encoding unit 103. In the third embodiment, in order to further reduce the amount of data compared to the second embodiment, a gain is multiplied to the RAW data of one exposure time to match the other exposure time, and the difference value is output to the RAW encoding unit 103. In other words, the RAW encoding unit 103 encodes the RAW data of the average for one exposure time, and encodes the RAW data of the difference value (difference RAW data) for the other exposure time.

図11を参照して、本実施形態における分離部102における処理について説明する。まず、分離部102は第2の実施形態と同様、図10(a)と図10(b)に示すように、近傍にある同露光時間かつ同一色成分の画素同士を加算し、その平均を算出してRAWデータ1001a,1001bを取得する。続いて、長露光RAWデータ1001bの1行目と、短露光RAWデータ1001aの1行目に対して長露光RAWデータに対応したゲインγを乗算し、かつオフセットεを加算したものとの差分値を取得する。このとき、ゲインγ及びオフセットεは、予め露光時間から逆算して決定してもよいし、取得した短時間露光画素と長時間露光画素のヒストグラム等を用いて決定してもよい。 The processing in the separation unit 102 in this embodiment will be described with reference to FIG. 11. First, as in the second embodiment, the separation unit 102 adds nearby pixels with the same exposure time and the same color component, calculates the average, and obtains RAW data 1001a and 1001b, as shown in FIG. 10(a) and FIG. 10(b). Next, the first row of the long-exposure RAW data 1001b and the first row of the short-exposure RAW data 1001a are multiplied by a gain γ corresponding to the long-exposure RAW data, and an offset ε is added to obtain a difference value. At this time, the gain γ and the offset ε may be determined in advance by calculating backward from the exposure time, or may be determined using a histogram of the acquired short-exposure pixels and long-exposure pixels.

具体的には、以下の式23~式26に示すように1行目の差分を算出する。 Specifically, the difference in the first row is calculated as shown in Equations 23 to 26 below.

Figure 0007497216000004
Figure 0007497216000004

これを1行目だけでなく、2行目、3行目、4行目についても同様に行い、算出した差分値をRAW符号化部103へ出力する。なお、本実施形態では短時間露光RAWデータに対して補正を行っているが、長時間露光RAWデータに対して補正を行ってもよい。ただし、丸め処理の観点から考えると、短時間露光RAWデータに対してゲインγを掛けて差分を算出した方が差分値の精度は高まる。 This is performed not only on the first row, but also on the second, third, and fourth rows, and the calculated difference value is output to the RAW encoding unit 103. Note that in this embodiment, correction is performed on the short-exposure RAW data, but correction may also be performed on the long-exposure RAW data. However, from the perspective of rounding processing, the accuracy of the difference value is improved by multiplying the short-exposure RAW data by gain γ to calculate the difference.

以上説明したように、第3の実施形態では、RAWデータをそのままRAW符号化部103へ出力するのではなく、差分値として出力することにより、第2の実施形態と比べてさらにRAWデータの記録データ量を削減することが可能となる。 As described above, in the third embodiment, the RAW data is not output directly to the RAW encoding unit 103, but is instead output as a difference value, making it possible to further reduce the amount of recorded RAW data compared to the second embodiment.

(第4の実施形態)
次に、本発明の第4の実施形態について説明する。第4の実施形態では、撮像部101に、第1乃至第3の実施形態とは異なる画素配列、具体的には図12に示す画素配列を適用する。
Fourth Embodiment
Next, a fourth embodiment of the present invention will be described. In the fourth embodiment, a pixel arrangement different from those in the first to third embodiments, specifically, a pixel arrangement shown in FIG.

上述した第1乃至第3の実施形態では、図2に示すR、G1、G2、Bの4つの異なる画素からなる4×4の16画素を最小単位として、この最小単位を繰り返して配置した構造の撮像部101について説明した。 In the first to third embodiments described above, the imaging unit 101 has a structure in which the minimum unit is a 4×4 array of 16 pixels, each of which is made up of four different pixels R, G1, G2, and B as shown in FIG. 2, and this minimum unit is repeatedly arranged.

これに対し、図12は、第4の実施形態における撮像部101の画素配列及び露光時間の設定を示している。水平方向をx、垂直方向をyとして、列番号をx座標で表し、行番号をy座標で表している。括弧で示した数字はイメージセンサ上の各画素の位置の座標を示している。また、白色の画素が短時間露光画素、灰色の画素が長時間露光画素を表している。このように、図12では、R、G1、G2、Bの配列からなるベイヤー配列の画素配列において、2列単位で短時間露光画素と長時間露光画素が交互に設定されている。 In contrast, FIG. 12 shows the pixel array and exposure time settings of the imaging unit 101 in the fourth embodiment. With the horizontal direction as x and the vertical direction as y, the column number is represented by the x coordinate and the row number is represented by the y coordinate. Numbers in parentheses indicate the coordinates of the position of each pixel on the image sensor. White pixels represent short-exposure pixels, and gray pixels represent long-exposure pixels. In this way, in FIG. 12, short-exposure pixels and long-exposure pixels are set alternately in two-column units in a pixel array of a Bayer array consisting of an R, G1, G2, and B array.

図12の画素配列及び露光時間の設定においても、図13に示すように図2に示す画素配列構造に置き換えて処理を行うことにより、第1乃至第3の実施形態で説明した処理を行うことができる。 Even with the pixel array and exposure time settings of FIG. 12, the processing described in the first to third embodiments can be performed by replacing the pixel array structure shown in FIG. 2 as shown in FIG. 13.

以上説明したように、第4の実施形態では、画素配列を変更しても、第1乃至第3の実施形態で説明した処理と同様のことが可能となる。 As described above, in the fourth embodiment, even if the pixel arrangement is changed, it is possible to perform the same processing as described in the first to third embodiments.

(他の実施形態)
また本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現できる。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現できる。
Other Embodiments
The present invention can also be realized by a process in which a program for realizing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) for realizing one or more of the functions.

発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above-described embodiment, and various modifications and variations are possible without departing from the spirit and scope of the invention. Therefore, the following claims are appended to disclose the scope of the invention.

101:撮像部、102:分離部、103:RAW符号化部、104:記録処理部、105:記録媒体、106:メモリインターフェース、107:メモリ 101: imaging unit, 102: separation unit, 103: RAW encoding unit, 104: recording processing unit, 105: recording medium, 106: memory interface, 107: memory

Claims (16)

画素ごとに異なる露光時間で撮影可能な撮像素子から得られた、第1の露光時間に対応するRAWデータと、前記第1の露光時間よりも長い第2の露光時間に対応するRAWデータとから、複数のRAWデータを生成する生成手段と、
前記生成手段により生成された複数のRAWデータを符号化する符号化手段と、
を備え
前記生成手段は、前記第1の露光時間と前記第2の露光時間のうちの一方に対応するRAWデータにゲインをかけたRAWデータと、前記第1の露光時間と前記第2の露光時間のうちの他方に対応するRAWデータとの差分から差分RAWデータを生成し、
前記符号化手段は、前記差分RAWデータと、前記第1の露光時間と前記第2の露光時間のうちの他方に対応するRAWデータとを符号化することを特徴とする画像処理装置。
a generating means for generating a plurality of RAW data from RAW data corresponding to a first exposure time and RAW data corresponding to a second exposure time longer than the first exposure time, the RAW data being obtained from an image sensor capable of capturing images with different exposure times for each pixel;
An encoding means for encoding the plurality of RAW data generated by the generating means;
Equipped with
the generating means generates differential RAW data from a difference between RAW data obtained by applying a gain to RAW data corresponding to one of the first exposure time and the second exposure time and RAW data corresponding to the other of the first exposure time and the second exposure time;
The image processing apparatus according to claim 1, wherein the encoding means encodes the difference RAW data and RAW data corresponding to the other of the first exposure time and the second exposure time .
前記生成手段は、露光時間ごとのベイヤー配列構造のRAWデータを生成することを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the generating means generates RAW data in a Bayer array structure for each exposure time. 前記生成手段は、前記第1の露光時間に対応するRAWデータにゲインをかけたRAWデータと、前記第2の露光時間に対応するRAWデータとの差分から差分RAWデータを生成し、the generating means generates differential RAW data from a difference between RAW data obtained by applying a gain to the RAW data corresponding to the first exposure time and the RAW data corresponding to the second exposure time;
前記符号化手段は、前記差分RAWデータと、前記第2の露光時間に対応するRAWデータとを符号化することを特徴とする請求項1または2に記載の画像処理装置。3. The image processing apparatus according to claim 1, wherein the encoding means encodes the differential raw data and the raw data corresponding to the second exposure time.
前記生成手段は、前記第1の露光時間の同一色成分の複数の画素データを加算することにより、前記第1の露光時間に対応する1つのRAWデータを生成し、前記第2の露光時間の同一色成分の複数の画素データを加算することにより、前記第2の露光時間に対応する1つのRAWデータを生成し、前記第1の露光時間と前記第2の露光時間のうちの一方に対応する前記生成した1つのRAWデータにゲインをかけたRAWデータと、前記第1の露光時間と前記第2の露光時間のうちの他方に対応する前記生成した1つのRAWデータとの差分から差分RAWデータを生成することを特徴とする請求項に記載の画像処理装置。 2. The image processing device according to claim 1, wherein the generating means generates one piece of RAW data corresponding to the first exposure time by adding together multiple pixel data of the same color component for the first exposure time, generates one piece of RAW data corresponding to the second exposure time by adding together multiple pixel data of the same color component for the second exposure time, and generates differential RAW data from a difference between RAW data obtained by applying a gain to the generated piece of RAW data corresponding to one of the first exposure time and the second exposure time and the generated piece of RAW data corresponding to the other of the first exposure time and the second exposure time . 前記生成手段は、複数の画素データの加算平均を算出することにより、前記第1の露光時間に対応する1つのRAWデータ及び前記第2の露光時間に対応する1つのRAWデータを生成することを特徴とする請求項に記載の画像処理装置。 5. The image processing device according to claim 4, wherein the generating means generates one piece of RAW data corresponding to the first exposure time and one piece of RAW data corresponding to the second exposure time by calculating an averaging of a plurality of pixel data. 前記ゲインは、露光時間に応じて決定されることを特徴とする請求項1に記載の画像処理装置。2. The image processing apparatus according to claim 1, wherein the gain is determined in accordance with an exposure time. 前記ゲインは、前記第1の露光時間の画素と前記第2の露光時間の画素のヒストグラムに応じて決定されることを特徴とする請求項1に記載の画像処理装置。2 . The image processing apparatus according to claim 1 , wherein the gain is determined in accordance with a histogram of pixels having the first exposure time and a histogram of pixels having the second exposure time. 前記生成手段は、前記第1の露光時間と前記第2の露光時間のうちの一方に対応するRAWデータにゲインを乗算してかつ所定のオフセットを加算したRAWデータと、前記第1の露光時間と前記第2の露光時間のうちの他方に対応するRAWデータとの差分から差分RAWデータを生成する、ことを特徴とする請求項1に記載の画像処理装置。2. The image processing device according to claim 1, wherein the generating means generates differential RAW data from a difference between RAW data obtained by multiplying RAW data corresponding to one of the first exposure time and the second exposure time by a gain and adding a predetermined offset, and RAW data corresponding to the other of the first exposure time and the second exposure time. 前記撮像素子の画素ごとの露光時間を制御する制御手段を有し、
前記生成手段は、前記画素ごとの露光時間が異なる場合は、前記複数のRAWデータを生成し、前記画素ごとの露光時間が同一の場合は、1つのRAWデータを生成することを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。
a control means for controlling an exposure time for each pixel of the image sensor;
9. The image processing device according to claim 1, wherein the generating means generates the plurality of RAW data when the exposure times for the pixels are different, and generates a single RAW data when the exposure times for the pixels are the same.
前記生成手段は、前記画素ごとの露光時間が同一の場合は、近傍の同一色の画像データの平均値を算出することにより、1つのRAWデータを生成することを特徴とする請求項に記載の画像処理装置。 10. The image processing apparatus according to claim 9 , wherein the generating means generates one piece of RAW data by calculating an average value of image data of the same color in the vicinity when the exposure time for each pixel is the same. 前記符号化手段は、前記第1の露光時間と前記第2の露光時間のうちの一方に対応するRAWデータの量子化パラメータを基準として、前記第1の露光時間と前記第2の露光時間のうちの他方に対応するRAWデータの量子化パラメータを決定することを特徴とする請求項に記載の画像処理装置。 2. The image processing device according to claim 1, wherein the encoding means determines a quantization parameter of the RAW data corresponding to one of the first exposure time and the second exposure time based on a quantization parameter of the RAW data corresponding to the other of the first exposure time and the second exposure time. 前記符号化手段は、前記第1の露光時間に対応するRAWデータの量子化パラメータを基準として、前記第2の露光時間に対応するRAWデータの量子化パラメータを決定することを特徴とする請求項11に記載の画像処理装置。 12. The image processing apparatus according to claim 11, wherein the encoding means determines a quantization parameter for the RAW data corresponding to the second exposure time based on a quantization parameter for the RAW data corresponding to the first exposure time. 画素ごとに露光時間を制御可能な撮像素子と、
請求項1乃至12のいずれか1項に記載の画像処理装置と、
を備えることを特徴とする撮像装置。
An image sensor capable of controlling the exposure time for each pixel;
An image processing device according to any one of claims 1 to 12 ,
An imaging device comprising:
画素ごとに異なる露光時間で撮影可能な撮像素子から得られた、第1の露光時間に対応するRAWデータと、前記第1の露光時間よりも長い第2の露光時間に対応するRAWデータとから、複数のRAWデータを生成する生成工程と、
前記生成工程において生成された複数のRAWデータを符号化する符号化工程と、
を有し、
前記生成工程では、前記第1の露光時間と前記第2の露光時間のうちの一方に対応するRAWデータにゲインをかけたRAWデータと、前記第1の露光時間と前記第2の露光時間のうちの他方に対応するRAWデータとの差分から差分RAWデータを生成し、
前記符号化工程では、前記差分RAWデータと、前記第1の露光時間と前記第2の露光時間のうちの他方に対応するRAWデータとを符号化することを特徴とする画像処理方法。
a generating step of generating a plurality of pieces of RAW data from RAW data corresponding to a first exposure time and RAW data corresponding to a second exposure time longer than the first exposure time, the RAW data being obtained from an image sensor capable of capturing images with different exposure times for each pixel;
an encoding step of encoding the plurality of RAW data generated in the generating step;
having
In the generating step, differential RAW data is generated from a difference between RAW data obtained by applying a gain to RAW data corresponding to one of the first exposure time and the second exposure time, and RAW data corresponding to the other of the first exposure time and the second exposure time;
An image processing method , comprising: encoding the differential RAW data and RAW data corresponding to the other of the first exposure time and the second exposure time, in the encoding step .
コンピュータを、請求項1乃至12のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each of the means of the image processing apparatus according to any one of claims 1 to 12 . コンピュータを、請求項1乃至12のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラムを記憶したコンピュータが読み取り可能な記憶媒体。 13. A computer-readable storage medium storing a program for causing a computer to function as each of the means of the image processing apparatus according to claim 1.
JP2020094912A 2020-05-29 2020-05-29 Image processing device and method, imaging device, program, and storage medium Active JP7497216B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2020094912A JP7497216B2 (en) 2020-05-29 2020-05-29 Image processing device and method, imaging device, program, and storage medium
US17/327,538 US11483497B2 (en) 2020-05-29 2021-05-21 Encoding apparatus and method, image capture apparatus, and storage medium
EP21175208.4A EP3917138A1 (en) 2020-05-29 2021-05-21 Encoding apparatus and method, image capture apparatus, and storage medium
CN202110569607.1A CN113747152A (en) 2020-05-29 2021-05-25 Encoding apparatus and method, image capturing apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020094912A JP7497216B2 (en) 2020-05-29 2020-05-29 Image processing device and method, imaging device, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2021190869A JP2021190869A (en) 2021-12-13
JP7497216B2 true JP7497216B2 (en) 2024-06-10

Family

ID=78847642

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020094912A Active JP7497216B2 (en) 2020-05-29 2020-05-29 Image processing device and method, imaging device, program, and storage medium

Country Status (1)

Country Link
JP (1) JP7497216B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006311240A (en) 2005-04-28 2006-11-09 Olympus Corp Imaging apparatus
WO2010116731A1 (en) 2009-04-08 2010-10-14 パナソニック株式会社 Image pickup device, reproduction device, image pickup method and reproduction method
JP2013066140A (en) 2011-08-31 2013-04-11 Sony Corp Imaging device, signal processing method, and program
WO2013100039A1 (en) 2011-12-27 2013-07-04 富士フイルム株式会社 Color imaging element and imaging device
JP2016201733A (en) 2015-04-13 2016-12-01 ソニー株式会社 Imaging device, imaging method and program
JP2018006869A (en) 2016-06-28 2018-01-11 キヤノン株式会社 Image transmission system, control method thereof, and imaging device
JP2018160777A (en) 2017-03-22 2018-10-11 キヤノン株式会社 Imaging device and control method thereof, program, and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006311240A (en) 2005-04-28 2006-11-09 Olympus Corp Imaging apparatus
WO2010116731A1 (en) 2009-04-08 2010-10-14 パナソニック株式会社 Image pickup device, reproduction device, image pickup method and reproduction method
JP2013066140A (en) 2011-08-31 2013-04-11 Sony Corp Imaging device, signal processing method, and program
WO2013100039A1 (en) 2011-12-27 2013-07-04 富士フイルム株式会社 Color imaging element and imaging device
JP2016201733A (en) 2015-04-13 2016-12-01 ソニー株式会社 Imaging device, imaging method and program
JP2018006869A (en) 2016-06-28 2018-01-11 キヤノン株式会社 Image transmission system, control method thereof, and imaging device
JP2018160777A (en) 2017-03-22 2018-10-11 キヤノン株式会社 Imaging device and control method thereof, program, and storage medium

Also Published As

Publication number Publication date
JP2021190869A (en) 2021-12-13

Similar Documents

Publication Publication Date Title
US7893967B1 (en) Digital video camera with binning or skipping correction
JP5519083B2 (en) Image processing apparatus, method, program, and imaging apparatus
JP5231529B2 (en) Video camera
US10776956B2 (en) Image coding apparatus, image decoding apparatus, image coding method, image decoding method, and non-transitory computer-readable storage medium
JPH05505084A (en) Image compression with color interpolation for single-sensor imaging systems
JP2005354610A (en) Image processing apparatus, image processing method and image processing program
JP2004128985A (en) Imaging system and program, and reproduction system and program
KR20130033304A (en) Image processing apparatus and method
JP7504629B2 (en) IMAGE PROCESSING METHOD, IMAGE PROCESSING APPARATUS, IMAGE PROCESSING PROGRAM, AND STORAGE MEDIUM
US11483497B2 (en) Encoding apparatus and method, image capture apparatus, and storage medium
JP2017216630A (en) Image encoding device and its control method
CN104041021B (en) Image processing device and method and imaging device
JP5092536B2 (en) Image processing apparatus and program thereof
JP6014349B2 (en) Imaging apparatus, control method, and program
US10142604B2 (en) Imaging apparatus and control method thereof
JP2020096326A (en) Imaging device, control method thereof, and program
JP7497216B2 (en) Image processing device and method, imaging device, program, and storage medium
US8223231B2 (en) Imaging apparatus and image processing program
KR20220090559A (en) image processor
JP4687454B2 (en) Image processing apparatus and imaging apparatus
JP5484015B2 (en) Imaging apparatus, imaging method, and program
JP4946417B2 (en) IMAGING DEVICE, IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD, PROGRAM FOR IMAGE PROCESSING METHOD, AND RECORDING MEDIUM CONTAINING PROGRAM FOR IMAGE PROCESSING METHOD
JP2013093745A (en) Image compression apparatus, imaging apparatus and image compression method
US10951891B2 (en) Coding apparatus capable of recording raw image, control method therefor, and storage medium storing control program therefor
US11785352B2 (en) Image encoding apparatus, method for controlling the same, and non-transitory computer-readable storage medium

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230508

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240202

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240314

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240430

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240529

R150 Certificate of patent or registration of utility model

Ref document number: 7497216

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150