JP2020092302A - Image processing apparatus, image processing apparatus control method, and program - Google Patents
Image processing apparatus, image processing apparatus control method, and program Download PDFInfo
- Publication number
- JP2020092302A JP2020092302A JP2018226852A JP2018226852A JP2020092302A JP 2020092302 A JP2020092302 A JP 2020092302A JP 2018226852 A JP2018226852 A JP 2018226852A JP 2018226852 A JP2018226852 A JP 2018226852A JP 2020092302 A JP2020092302 A JP 2020092302A
- Authority
- JP
- Japan
- Prior art keywords
- image processing
- image
- data
- processing
- compression
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Television Signal Processing For Recording (AREA)
- Studio Devices (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Image Processing (AREA)
Abstract
Description
本発明は、画像処理装置、画像処理装置の制御方法、及びプログラムに関し、特に撮像画像を画像処理し圧縮記録する画像処理装置に関する。 The present invention relates to an image processing device, a control method for the image processing device, and a program, and more particularly to an image processing device for image-processing and compressing and recording a captured image.
デジタルカメラで撮像した画像を画像処理しJPEGなど標準的な圧縮ファイルとして記録媒体などに記録する機能は必須となっている。さらにHEVC圧縮、HEIF形式による記録も広まってきている。一方、カメラ内の画像処理はセンサの高画素化、高フレームレート化にともない高速化が要求され、されには高感度撮影時の高画質化も要求されてきている。これにともない高速連写時などでカメラ内の画像処理が撮影速度には追い付かなくなってきている。また画像処理に関してもディープラーニングの画像処理への応用など処理時間はかかるがより高画質な画像処理が登場してきている。そこで、撮影時は一旦従来の画像処理で記録し、撮影後に高度な画像処理を記録画像に対して再処理することを考える。また撮影時には再処理に必要なRAWデータを復元するための差分画像を合わせて記録する。例えば特許文献1では、本画像のJPEGファイルにRAWデータとの差分である差分画像を可逆符号化した符号化データを付加し記録する技術が開示されている。
The function of image-processing an image captured by a digital camera and recording it on a recording medium as a standard compressed file such as JPEG is essential. Furthermore, HEVC compression and recording in HEIF format are becoming widespread. On the other hand, the image processing in the camera is required to have a higher pixel rate and a higher frame rate of the sensor, and thus to have a higher image quality during high-sensitivity shooting. Along with this, the image processing in the camera cannot keep up with the shooting speed during high-speed continuous shooting. Further, with regard to image processing, application of deep learning to image processing takes time, but higher quality image processing has appeared. Therefore, it is considered that the image is once recorded by the conventional image processing at the time of shooting, and the advanced image processing is performed again on the recorded image after the shooting. Further, at the time of shooting, a difference image for restoring the RAW data necessary for reprocessing is also recorded. For example,
しかしながら、特許文献1に開示されている技術では、撮影時にJPEG本画像を復号、逆変換処理を施して差分画像を生成しているため、全体の処理時間が通常の撮影処理と比較し長くなってしまい、メモリ使用量が増大する。
However, in the technique disclosed in
本発明は、上記課題を鑑みて、撮影後の再処理を想定した差分画像を記録する場合において処理性能を向上する画像処理装置を提供することを目的とする。 In view of the above problems, it is an object of the present invention to provide an image processing apparatus that improves processing performance when recording a difference image that is supposed to be reprocessed after shooting.
上記の課題を解決するために、本発明の画像処理装置は、撮像手段により生成された画像データに対して非可逆な画像処理を行う第一の画像処理手段と、前記第一の画像処理手段により前記非可逆な画像処理が行われた画像データを圧縮処理する第一の圧縮手段と、前記画像データに対して可逆な画像処理を行う、前記第一の画像処理手段と異なる第二の画像処理手段と、前記非可逆な画像処理後の画像データと前記可逆な画像処理後の画像データとの差分データを生成する生成手段と、前記生成手段により生成された前記差分データを圧縮処理する第二の圧縮手段と、前記第一の圧縮手段により圧縮された画像データと前記第二の圧縮手段により圧縮された画像データを記録する記録手段とを備えることを特徴とする。 In order to solve the above-mentioned problems, an image processing apparatus of the present invention includes a first image processing means for performing irreversible image processing on image data generated by an image capturing means, and the first image processing means. And a second image different from the first image processing unit for performing reversible image processing on the image data, the first compression unit for compressing the image data subjected to the irreversible image processing by A processing means; a generation means for generating difference data between the image data after the lossy image processing and the image data after the lossless image processing; and a compression processing for the difference data generated by the generation means It is characterized by comprising a second compression means and a recording means for recording the image data compressed by the first compression means and the image data compressed by the second compression means.
本発明によれば、撮影後の再処理を想定した差分画像を記録する場合において処理性能を向上できる画像処理装置を提供することができる。 According to the present invention, it is possible to provide an image processing apparatus capable of improving processing performance when recording a difference image assuming reprocessing after shooting.
以下、図面を参照しながら本発明の例示的な実施形態について説明する。 Hereinafter, exemplary embodiments of the present invention will be described with reference to the drawings.
(第1実施形態)
まず、図1を参照して、複数の撮像光学系により結像された撮像画像から画像信号を生成し、画像処理、圧縮処理を施し記録を行う画像処理装置として機能する撮像装置について説明する。なお、本実施形態では撮像装置の内部で画像処理と圧縮処理を行う例をあげて説明を行うが、これらに限られるものではない。例えば撮像装置は生成した画像データを通信を介して外部のサーバやクラウドなどの外部の処理装置に転送し、この外部の処理装置において、画像処理と圧縮処理を行う構成としてもよい。図1は、本実施形態に係る撮像装置の構成を示すブロック図である。撮像装置は、結像光学部101と、撮像素子102と、A/D変換回路103と、非可逆画像処理部104と、CPU105とを備える。結像光学部101は、レンズや絞り等からなり、焦点調節や露出調節を行う。撮像素子102は、光学像を電気信号に変換するCCD等の撮像素子である。A/D変換回路103は、撮像素子102からのアナログ画像信号をデジタル画像データに変換する。出力されるRAWデータは、画素に全ての色データ揃っていないような例えばベイヤ配列のデータである。非可逆画像処理部104は、A/D変換回路103から出力された画像データに対してノイズ低減、デモザイク、色変換、ガンマ変換等の非可逆な画像処理を施す。CPU105は、バスを介して各種制御を司る。
(First embodiment)
First, with reference to FIG. 1, an image pickup apparatus that functions as an image processing apparatus that generates an image signal from picked-up images formed by a plurality of image pickup optical systems, performs image processing and compression processing, and performs recording will be described. In the present embodiment, an example of performing image processing and compression processing inside the image pickup apparatus will be described, but the present invention is not limited to these. For example, the imaging device may transfer the generated image data to an external processing device such as an external server or a cloud via communication, and the external processing device may perform image processing and compression processing. FIG. 1 is a block diagram showing the arrangement of the image pickup apparatus according to this embodiment. The image pickup apparatus includes an image forming
なお、非可逆な画像処理は、撮像画像の本画像記録用の画像処理であり、撮像画像の領域ごとにベタ部かエッジ部かまたエッジ部の場合は、エッジの方向など画像特徴の特徴量を抽出し、これに適したノイズ除去処理、デモザイク処理を含む現像処理を施す。また、被写体によっては画像領域ごとに適した露出補正を行う場合もある。よって、これらの画像処理は、撮像画像の特徴に応じた一般的に非可逆な処理であり、また処理に必要なパラメータ数も多い。 Note that the irreversible image processing is image processing for recording the main image of the captured image, and in the case of the solid portion, the edge portion, or the edge portion for each area of the captured image, the feature amount of the image feature such as the direction of the edge. Is extracted, and development processing including noise removal processing and demosaicing processing suitable for this is performed. In addition, depending on the subject, there may be a case where an exposure correction suitable for each image area is performed. Therefore, these image processes are generally irreversible processes according to the characteristics of the captured image, and the number of parameters required for the processes is large.
また、撮像装置は、表示部106と、メモリ107と、記録部108と、可逆画像処理部109と、加減算処理部110と、圧縮伸張処理部111と、通信部112とを備え、通信部112を介し外部サーバ113に接続する。表示部106は、液晶モニター等で構成され、メモリ107に格納された画像データを表示する表示部である。また、表示部106は、シャッターボタンやメニューボタン、方向キー、決定キーなどユーザーが撮像装置に各種の指示や設定などを入力するための入力デバイスを兼ねる。メモリ107は、非可逆画像処理部104、または可逆画像処理部109から出力された画像データを一時的に格納するDRAMなどで構成される。また、後述する圧縮伸張処理部111の圧縮データのバッファ領域、表示部106用表示データの格納領域としても使用する。記録部108は、SDカード等で構成され、メモリ107に格納された画像圧縮データなどをJPEGやHEIFなどのファイル形式として記録する。可逆画像処理部109は、A/D変換回路103から出力された画像データに対してデモザイク処理、色変換、ガンマ処理等の可逆な画像処理を施す。なお、可逆画像処理は、RAW復元用の画像データ生成のための画像処理であり、画質優先で無く可逆性が優先され、パラメータ数も最小限に抑えることを特徴としている。
Further, the imaging device includes a
加減算処理部110は、撮影時には可逆画像処理部109の出力画像データと非可逆画像処理部104の出力画像データの差分画像を生成する。また、記録後の再処理時のRAW復元においては本記録画像と差分画像データを加算しRAW復元用の画像データを生成する。圧縮伸張処理部111は、撮影時には非可逆画像処理部104の出力画像データの圧縮処理、または加減算処理部110の出力差分画像データの圧縮処理を行う。非可逆画像処理部104の出力画像データの圧縮は、JPEG圧縮やHEVC圧縮などが考えられる。加減算処理部110の出力差分画像データの圧縮は可逆なロスレス圧縮が好ましいが記録ファイルサイズの圧縮を優先し非可逆な圧縮とすることでも構わない。これら圧縮データはメモリ107に格納する。また、記録後の再処理時には圧縮されたこれらの画像データを伸張処理する。通信部112は、WiFiなどの外部通信機器とデータの送受信を行う。外部サーバ113は、ネットワークおよびクラウドサーバのようなサーバである。
The addition/
次に、図2を用いて、本実施形態に係る処理フローについて説明する。図2(A)は、撮影時の処理フローの例を示す図である。RAWデータ201は、撮像されたRAWデータであり、A/D変換回路103から出力されたベイヤ配列のRAWデータである。次に、非可逆画像処理202は、非可逆画像処理部104で行う非可逆な画像処理である。本画像YUVデータ203は、非可逆画像処理202の出力である本画像記録用のYUVデータである。そして、本画像YUVデータ203は、メモリ107に書き込まれる。次に、HEVC圧縮204は、圧縮伸張処理部111で行うHEVC圧縮処理であり、本画像YUVデータ203をHEVC圧縮する。なお、本実施形態では、HEVC圧縮手段を例にしているが、JPEG圧縮のような別の圧縮方式でも構わない。そして、圧縮処理204後の圧縮データは、メモリ107に書き込まれる。
Next, the processing flow according to the present embodiment will be described with reference to FIG. FIG. 2A is a diagram illustrating an example of a processing flow at the time of shooting. The
一方、可逆画像処理206は、可逆画像処理部109で行う可逆な画像処理である。本実施形態で使用する可逆パラメータは、非可逆画像処理202で使用されたパラメータに基づいて生成する。非可逆画像処理パラメータからの可逆パラメータの生成は、CPU105で処理する。この処理について後述で詳しく説明する。次に、RAW復元用YUVデータ207は、可逆画像処理206の出力であるRAW復元用YUVデータである。そして、RAW復元用YUVデータ207は、メモリ107に書き込まれる。次に、差分生成処理208は、加減算処理部110で行う差分生成処理であり、メモリ107上の非可逆な画像処理後の本画像YUVデータ203、可逆な画像処理後のRAW復元用YUVデータ207の差分データ209を生成する。そして、差分データ209は、加減算処理部110での差分生成処理208の出力であり、メモリ107に書き込まれる。次に、圧縮処理210は、圧縮伸張処理部111で行う差分データ209の圧縮処理である。RAWの復元性を考えると可逆圧縮がよいが、RAW復元性より圧縮後のデータサイズを優先する場合は非可逆な圧縮処理でもよい。
On the other hand, the
そして、HEIFファイル205は、本画像YUVデータ203のHEVC圧縮処理204後の圧縮データとして、差分データ209の圧縮処理210後の圧縮データは、HEIFファイル205として形成されて記録部108に記録する。また、可逆画像処理206で使用した可逆パラメータもこのHEIFファイル205に付加し記録する。
Then, the
図2(B)は、HEIFファイル205からRAWを復元する処理フローである。HEIFファイル221は、撮影時に記録部108で記録された記録ファイルであって、図2(A)のHEIFファイル205である。HEIFファイル221からHEVC圧縮された本画像YUV圧縮データを読み出し、圧縮伸張処理部111でHEVC伸張処理222を行い、伸張本画像YUVデータ223を出力する。そして、出力された伸張本画像YUVデータ223は、メモリ107に書き込まれる。一方、HEIFファイル221から圧縮された差分データを読み出し、圧縮伸張処理部111で伸張処理228を行い、伸張差分データ229を出力する。そして、出力された伸張差分データ229は、メモリ107に書き込まれる。
FIG. 2B is a processing flow for restoring the RAW from the
次に、伸張本画像YUVデータ223と伸張差分データ229をメモリ107から読み出し加減算処理部110で加算処理224を行い、RAW復元用YUVデータ225を出力する。出力されたRAW復元用YUVデータ225は、メモリ107に書き込まれる。なお、RAW復元用YUVデータ225は、撮影時のRAW復元用YUVデータ207を伸張復元したものである。
Next, the decompressed main
また、HEIFファイル221からは撮影時にHEVC圧縮データ、差分圧縮データともに記録していた可逆パラメータを読み出す。読み出した可逆パラメータに対して、パラメータ逆変換処理230を行い逆変換パラメータを生成する。次に、RAW復元用YUVデータ225をメモリ107から読み出し、可逆画像処理部109にて可逆画像処理の逆変換処理226を行い、復元RAWデータ227を生成し、メモリ107に書き込む。このときの逆変換処理226の処理パラメータは、パラメータ逆変換処理230で生成した逆変換パラメータを使用する。なお、パラメータ逆変換処理230は、CPU105で処理する。
Further, the reversible parameters recorded in the HEVC compressed data and the differential compressed data at the time of shooting are read from the
図2(C)は、復元したRAWデータに対して改めて、図2(A)で示した非可逆画像処理とは異なる、高負荷かつ高度な非可逆画像処理を行う処理フローである。ここで、高度な非可逆画像処理とは、例えば、ディープラーニングを画像処理に応用したような、非常に高画質な画像処理ではあるが、画像1枚あたりの処理時間は、長く撮影時に処理することが製品機能上好ましくないものである。例えば、画像1枚あたり数十秒から数分以上かかるような画像処理である。 FIG. 2C is a processing flow for performing high-load and advanced irreversible image processing, which is different from the irreversible image processing shown in FIG. 2A, on the restored RAW data. Here, the advanced irreversible image processing is, for example, an image processing of extremely high image quality such as applying deep learning to the image processing, but the processing time per image is long and is processed at the time of shooting. That is not preferable in terms of product function. For example, the image processing may take several tens of seconds to several minutes or more per image.
まず、復元RAWデータ241は、図2(B)で復元された復元RAWデータ227である。高度な非可逆画像処理A242は、メモリ107から復元RAWデータ227を読み出し、非可逆画像処理部104で画像処理を施し処理後RAWデータ243を出力する。出力された処理後RAWデータ243は、メモリ107に書き込まれる。
First, the restored
次に、高度な非可逆画像処理B244は、メモリ107から処理後RAWデータ243を読み出し、非可逆画像処理部104で画像処理を施し処理後本画像YUVデータ245を出力する。出力された処理後本画像YUVデータ245は、メモリ107に書き込まれる。次に、処理後本画像YUVデータ245は、圧縮伸張処理部111でHEVC圧縮処理246を行い、HEVC圧縮データは、メモリ107に書き込まれる。
Next, the advanced irreversible image processing B244 reads the processed
一方、選択器248は、処理フローの切替えスイッチであり、復元RAWデータ241と処理後RAWデータ243のどちらを選択するかを切り替える。選択器248は、今回の復元対象のRAWデータをどちらとするかを選択する。選択器248で選択されたRAWは、可逆画像処理部109で可逆画像処理249されRAW復元用YUVデータ250を出力する。出力されたRAW復元用YUVデータ250は、メモリ107に書き込まれる。本実施形態で使用する可逆パラメータは、高度な非可逆画像処理B244のパラメータに基づいて生成する。生成手法は、図2(A)の可逆画像処理206の可逆パラメータの生成と同様であるため説明を省略する。なお、可逆パラメータの生成については、CPU105で処理される。
On the other hand, the
次に、処理後本画像YUVデータ245とRAW復元用YUVデータ250をメモリ107から読み出し加減算処理部110で差分生成処理251を行い、生成された差分データ252をメモリ107に書き込む。次に、差分データ252は、圧縮伸張処理部111で圧縮し圧縮データを出力する。出力された圧縮データは、メモリ107に書き込まれる。次に、HEIFファイル247は、HEIFファイルを示しており、前処理後本画像YUVデータ245のHEVC圧縮処理246後の圧縮データと差分データ252の圧縮処理253後の圧縮データをHEIFファイル247として形成して、記録部108に記録する。また、可逆画像処理249で使用した可逆パラメータもこのHEIFファイル247に付加し記録する。
Next, the processed main
なお、図2(A)の処理フローについて、撮影時の処理フローとして説明したが、図2(B)の処理フローにより復元された復元RAWデータ227に対する処理にも適用できる。また、図2(C)の処理フローの処理後RAWデータ243にも適用できる。
Although the processing flow of FIG. 2A has been described as the processing flow at the time of shooting, the processing flow can be applied to the processing of the restored
図3は、図2(A)で示した処理フローのタイミングチャートを説明する図である。V信号301は、静止画撮影が行われたタイミングを表している。本実施形態では、高速な連写が行われ、V信号301のタイミングで連続した撮影が行われていることを示す。図3に示すように、撮像によるRAWデータ201の取得、非可逆画像処理202、HEVC圧縮処理204、可逆画像処理206、差分生成処理208、差分データの圧縮処理210、HEIFファイル205の記録は、各々連続した撮影画像に対し順次並列に処理する。また、非可逆画像処理からHEVC圧縮、あるいは、可逆画像処理から、差分生成、差分データ圧縮に対しては画像1枚の処理が完了する前から追いかけて処理するようなタイミングチャートとしている。
FIG. 3 is a diagram illustrating a timing chart of the processing flow shown in FIG. The
期間T1は、撮影からHEIFファイル205が記録されるまでの一連の処理全体の処理時間である。一連の処理のように処理完了の待ち合わせを極力無くしフォワード処理のみで構成することにより画像1枚の全体処理時間T1を極力短くすることができる。また、これにより各処理に必要なメモリバッファのライフタイムの長期化を抑え使用メモリ量を抑えることができる。
The period T1 is the processing time of the entire series of processing from shooting to recording the
図4は、図2(A)とは異なる差分データ生成の処理フローの例を示す図である。RAWデータ401は、撮像されたRAWデータであり、A/D変換回路103から出力されたベイヤ配列のRAWデータである。また、図2(B)の処理フローにより復元された復元RAWデータ227でもよい。さらに、図2(C)の処理フローの処理後RAWデータ243でもよい。
FIG. 4 is a diagram illustrating an example of a processing flow of difference data generation different from that in FIG. The
画像処理402は、非可逆画像処理部104で行う非可逆な画像処理である。本画像用YUVデータ403は、非可逆画像処理402の出力である本画像記録用のYUVデータである。出力された本画像用YUVデータ403は、メモリ107に書き込まれる。次に、HEVC圧縮処理404は、圧縮伸張処理部111で行うHEVC圧縮処理であり、本画像用YUVデータ403をHEVC圧縮する。なお、本実施形態では、HEVC圧縮手段を例にしているが、JPEG圧縮など別の圧縮方式でもよい。そして、圧縮処理404後の圧縮データは、メモリ107に書き込まれる。
The
一方、可逆画像処理406は、可逆画像処理部109で行う可逆な画像処理である。本実施形態で使用する可逆パラメータは、非可逆画像処理402で使用されたパラメータに基づいて生成する。この生成については、後述で詳しく説明する。次に、RAW復元用YUVデータ407は、可逆画像処理406の出力であるRAW復元用YUVデータである。出力されたRAW復元用YUVデータ407は、メモリ107に書き込まれる。
On the other hand, the
次に、HEVC伸張処理412は、圧縮伸張処理部111で行うHEVC伸張処理である。HEVC圧縮処理404で出力されたメモリ107上のHEVC圧縮データを伸張処理し、メモリ107に伸張本画像YUVデータ411を書き込む。次に、差分生成処理408は、加減算処理部110で行う差分生成処理であり、メモリ107上の伸張本画像YUVデータ411、RAW復元用YUVデータ407の差分データ409を生成する。なお、差分データ409は、加減算処理部110での差分生成処理408の出力であり、メモリ107に書き込まれる。次に、圧縮処理410は、圧縮伸張処理部111で行う差分データ409の圧縮処理である。RAWの復元性を考えると可逆圧縮がよいが、RAW復元性より圧縮後のデータサイズを優先する場合は非可逆な圧縮処理でもよい。
Next, the
そして、本画像用YUVデータ403のHEVC圧縮処理404後の圧縮データ、差分データ409の圧縮処理410後の圧縮データは、HEIFファイル405として形成され、記録部108に記録される。また、可逆画像処理406で使用した可逆パラメータもこのHEIFファイル405に付加し記録される。なお、図4で記録されたHEIFファイル405は、図2(B)の処理フローにより復元RAWデータ227に復元ができる。また、図4の処理フローは、撮影時だけでなく、図2(C)の処理フローの処理後RAWデータ243にも適用できる。
Then, the compressed data of the main
次に、図5は、図4で示した処理フローのタイミングチャートを説明する図である。V信号501は、静止画撮影が行われたタイミングを表している。本実施形態では、高速な連写が行われ、V信号501のタイミングで連続した撮影が行われていることを示している。図5で示すように、撮像によるRAWデータ401の取得、非可逆画像処理402、HEVC圧縮処理404、可逆画像処理406は各々連続した撮影画像に対し順次並列に処理する。
Next, FIG. 5 is a diagram illustrating a timing chart of the processing flow shown in FIG. The
HEVC伸張処理412は、HEVC圧縮処理404を待って行う。そして、差分生成処理408、差分データの圧縮処理410、HEIFファイル405の記録部108への記録は、HEVC伸張処理412の開始を待って順次処理が開始される。非可逆画像処理からHEVC圧縮、あるいは可逆画像処理から、差分生成、差分データ圧縮に対しては画像1枚の処理が完了する前から追いかけて処理するようなタイミングチャートとしている。
The
期間T2は、撮影からHEIFファイル405が記録されるまでの一連の処理全体の処理時間である。本実施形態において、期間T2は、図3のタイミングチャートで示した期間T1より長い時間がかかることがわかる。つまり、図4で示した処理フローでは、各処理に必要なメモリバッファのライフタイムが図2(A)に示す処理フローより長くなり、使用メモリ量は多くなる傾向がある。
The period T2 is the processing time of the entire series of processing from shooting to recording the
一方、図4に示す処理フローでは、本画像用YUVデータ403でなく、伸張本画像YUVデータ411とRAW復元用YUVデータ407との差分生成処理408を行い、差分データ409を取得している。そのため、図2(B)に示す処理フローによる復元RAWを生成した際に復元処理の誤差が抑えられ結果として復元RAWの品質が向上する傾向がある。
On the other hand, in the processing flow shown in FIG. 4, the
次に、図6は、図2(A)に示す可逆画像処理206、およびその逆変換処理である図2(B)に示す可逆画像処理の逆変換処理226の処理フローを説明する図である。まず、図6(A)は、可逆画像処理206の処理フローの例を示す図である。ベイヤ配列のRAWデータ601は、撮像された図2(A)のRAWデータ201であってよく、図2(C)の復元RAWデータ241、処理後RAWデータ243であってもよい。
Next, FIG. 6 is a diagram for explaining the processing flow of the
次に、デモザイク処理602は、ベイヤ配列の画像データから各画素位置で不足している色を補間し、RGB全色を生成する。ガンマ補正処理603は、本記録画像のガンマ特性に合わせたガンマ補正を行う。マトリクス変換処理604は、RGB色空間からYUV色空間への変換を行う。歪曲補正処理605は、レンズの歪曲収差の補正を行う。RAW復元用YUVデータ606は、可逆画像処理206の出力データである。図2(A)に示す処理フローでは、RAW復元用YUVデータ207に相当する。なお、各処理の詳細については後述説明する。
Next, the
図6(B)は、可逆画像処理の逆変換処理226の処理フローの例を示す図である。RAW復元用YUVデータ621は、可逆画像処理の逆変換226の入力画像データである。なお、図2(B)に示す処理フローでは、RAW復元用YUVデータ225である。歪曲補正の逆変換処理622は、歪曲補正処理605の逆変換処理を行う。マトリクス逆変換処理623は、マトリクス変換処理604の逆変換処理であり、YUV色空間からRGB色空間への変換を行う。逆ガンマ補正処理624は、ガンマ補正処理603の逆変換処理を行う。再ベイヤ化625は、画素ごとにRGB全色そろった画像データからベイヤ配列の画像データを生成する。復元RAWデータ626は、図2(B)に示す処理フローでは、可逆画像処理の逆変換処理226の出力の復元RAWデータ227である。なお、各処理の詳細については後述する。
FIG. 6B is a diagram showing an example of the processing flow of the
次に、図7を参照して、デモザイク処理の例について説明する。ベイヤ配列の画像データ701は、1行目、3行目、以降の奇数行目は、画素ごとにRGの色の画素値が繰り返し配置されている。2行名、4行目、以降の偶数行目は画素ごとにGBの色の画素値が繰り返し配置されている。
Next, an example of demosaic processing will be described with reference to FIG. 7. In the
補間処理702は、R色の補間処理を示す。ベイヤ画像の奇数行目に1画素おきにR画素を配置しており、これらはそのまま出力される。ベイヤ配列のGの位置のR画素値は、左右または上下R画素の間となっているので、この2つのR画素値の平均から求める。ベイヤ配列のBの位置のR画素値は、左上、右上、左下、右下の4つのR画素値の平均から求める。補間処理703は、G色の補間処理を示す。ベイヤ配列のG色はそのまま出力する。ベイヤ配列のRまたはBの画素位置のG画素値は、左右のG画素値の平均から求める。補間処理704は、B色の補間処理を示す。ベイヤ画像の偶数行目に1画素おきにB画素を配置しており、これらはそのまま出力される。ベイヤ配列のGの位置のB画素値は、左右または上下B画素の間となっているのでこの2つのB画素値の平均から求める。ベイヤ配列のRの位置のB画素値は、左上、右上、左下、右下の4つのB画素値の平均から求める。データ705は、各色の補間処理(702、703、704)後の各画素RGBが揃った出力画像データを示す。
次に、図8を参照して、再ベイヤ化処理の例について説明する。データ801は、再ベイヤ化前の各画素RGBが揃った出力画像データである。R画素値802は、データ801のR画素を示す。このR画素値802からR画素値805のような配置で間引きを行う。間引かれた箇所は0値となる。G画素値803は、データ801のG画素を示す。このG画素値803からG画素値806のような配置で間引きを行う。間引かれた箇所は0値となる。B画素値804は、データ801のB画素を示す。このB画素値804からB画素値807のような配置で間引きを行う。間引かれた箇所は0値となる。間引かれた各色の画素値(805、806、807)を合わせることで再ベイヤ化データ808を生成する。
Next, an example of the re-bayering process will be described with reference to FIG. The
図9(A)はガンマ補正処理の例を示す図である。本実施形態では、3点の折れ線で定義される近似によってガンマ補正を処理する。折れ線は、原点(0,0)と(BP1,BC1)、(BP2,BC2)、(BP3,BC3)の3点の入力に対する出力値によって直線の始点が定義され、各直線の傾きは、GR0、GR1、GR2、GR3で定義される。原点と3点の間は、定義された各直線によって入力に対する出力が決まる。ガンマ補正の典型例としては、図9(A)のように上に凸のカーブを近似する折れ線として定義する。 FIG. 9A is a diagram showing an example of gamma correction processing. In the present embodiment, gamma correction is processed by approximation defined by a polygonal line of three points. The polygonal line is defined by the origin (0, 0) and the output values for the three inputs (BP1, BC1), (BP2, BC2), and (BP3, BC3), and the starting point of the line is defined by the gradient GR0. , GR1, GR2, GR3. Between the origin and the three points, the output for the input is determined by each defined straight line. As a typical example of gamma correction, an upwardly convex curve as shown in FIG. 9A is defined as a polygonal line that approximates the curve.
図9(B)は逆ガンマ補正処理の例を示す図である。この実現方法は、図9(A)ガンマ補正処理と同様であり、3点の(BP1,BC1)、(BP2,BC2)、(BP3,BC3)の定義、各直線の傾きGR0、GR1、GR2、GR3の定義が図9(A)と異なる。なお、逆ガンマ補正の典型例としては、図9(B)のように下に凸のカーブを近似する折れ線として定義する。なお、いずれも、3点の折れ線で定義処理することとして説明したが、同様な定義パラメータを増やし、折れ線の点の数を増やすことで入出力定義折れ線を目的のカーブにより近似させてもよい。 FIG. 9B is a diagram showing an example of the inverse gamma correction process. This realization method is similar to the gamma correction process in FIG. 9A, and the definitions of three points (BP1, BC1), (BP2, BC2), and (BP3, BC3), and the slopes GR0, GR1, GR2 of the respective straight lines , GR3 is different from that of FIG. 9(A). As a typical example of the inverse gamma correction, a downward convex curve as shown in FIG. 9B is defined as a polygonal line that approximates the curve. In each of the above explanations, the definition processing is performed using a polygonal line of three points. However, the input/output definition polygonal line may be approximated to a target curve by increasing the number of similar definition parameters and increasing the number of points of the polygonal line.
図10は、マトリクス変換の例を示す図である。図10(A)は、RGBからYUVへの変換を示し、3×3のマトリクス変換によって処理する。3×3マトリクスの係数a00、a01、a02、a10、a11、a12、a20、a21、a22は、ビデオや記録形式などの規格で色空間変換の係数として定義されたものでよい。本実施形態の場合、HEVC圧縮の対象となるYUV空間の規格に合わせることが好ましい。次に、図10(B)は、YUVからRGBへの逆変換を示し、3×3のマトリクス変換によって処理する。3×3マトリクスの係数b00、b01、b02、b10、b11、b12、b20、b21、b22は、ビデオや記録形式などの規格で色空間変換の係数として定義されたものでよい。本実施形態の場合、HEVC圧縮の対象となるYUV空間の規格に合わせることが好ましい。この3×3マトリクスは、図10(A)で定義した3×3マトリクスの逆行列に相当する。 FIG. 10 is a diagram showing an example of matrix conversion. FIG. 10A shows conversion from RGB to YUV, which is processed by 3×3 matrix conversion. The 3×3 matrix coefficients a00, a01, a02, a10, a11, a12, a20, a21, a22 may be defined as coefficients for color space conversion in standards such as video and recording formats. In the case of the present embodiment, it is preferable to conform to the standard of the YUV space that is the target of HEVC compression. Next, FIG. 10B shows an inverse conversion from YUV to RGB, which is processed by 3×3 matrix conversion. The coefficients b00, b01, b02, b10, b11, b12, b20, b21, b22 of the 3×3 matrix may be defined as the coefficients for color space conversion in the standard such as video and recording format. In the case of the present embodiment, it is preferable to conform to the standard of the YUV space that is the target of HEVC compression. This 3×3 matrix corresponds to the inverse matrix of the 3×3 matrix defined in FIG.
図11は、歪曲収差補正の例を示す図である。画像データ1101は、レンズの歪曲収差のある画像データである。例えば、歪曲収差補正処理により画像データ1101を、画像データ1102のように補正する。また、歪曲逆補正処理では、逆に補正後の画像データ1102に対して歪曲収差戻しを行い、補正前の画像データ1101を得る。この実施方法としては、像高中心からの距離ごとに拡縮率を定義し、これに基づいた画素位置から再サンプリングする方法がある。
FIG. 11 is a diagram showing an example of distortion aberration correction. The
次に、図12(A)を参照して、加減算処理部110による差分生成処理について説明する。加減算処理部110による差分生成処理は、図2(A)に示す処理フローの差分生成処理208、図2(C)に示す処理フローの差分生成処理251、図4に示す処理フローの差分生成処理408に該当する。
Next, the difference generation processing by the addition/
本画像YUVデータ1201は、図2(A)に示す処理フローにおける本画像YUVデータ203に相当する。また、図2(C)に示す処理フローにおける処理後本画像YUVデータ245、図4に示す処理フローの伸張本画像YUVデータ411に相当する。RAW復元用YUVデータ1205は、図2(A)に示す処理フローにおけるRAW復元用YUVデータ207に相当する。また、図2(C)に示す処理フローにおけるRAW復元用YUVデータ250、図4に示す処理フローのRAW復元用YUVデータ407に相当する。422−444変換処理1202は、YUV422形式からYUV444形式に変換を行う処理である。つまり、UVについて水平方向に奇数画素位置のUV値を補間して、YUV444形式に変換を行う。例えば、補間処理は、隣接2画素値の平均から求める。
The main
シフタ1203は、bitシフタである。422−444変換処理1202の出力のbit数がRAW復元用YUVデータ1205のbit数より小さい場合、bit幅が合うように左シフトし下位bitは0埋めする。なお、422−444変換処理1202およびシフタ1203は、本画像YUVデータがRAW復元用YUVデータとデータ形式として、輝度に対する色成分のサンプリング比、輝度および色成分の有効ビット数に差がある場合にこれを合わせる目的で行う。差分データ1204は、図2(A)に示す処理フローにおける差分データ209に相当する。また、図2(C)に示す処理フローにおける差分データ252に相当する。RAW復元用YUVデータ1205からシフタ1203の出力を減算し差分データ1204を生成出力する。
The shifter 1203 is a bit shifter. When the number of bits of the output of the 422-444
次に、図12(B)を参照して、加減算処理部110による加算処理について説明する。加減算処理部110による加算処理は、図2(B)に示す処理フローの加算処理224に相当する。本画像YUVデータ1221は図2(B)に示す処理フローにおける伸張本画像YUVデータ223に相当する。差分データ1225は、図2(B)に示す処理フローにおける伸張差分データ229に相当する。422−444変換処理1222は、YUV422形式からYUV444形式に変換を行う処理である。つまり、UVについて水平方向に奇数画素位置のUV値を補間して444形式に変換を行う。例えば、補間処理は、隣接2画素値の平均から求める。
Next, the addition processing by the addition/
シフタ1223は、bitシフタである。422−444変換処理1222の出力のbit数が差分データ1225のbit数より小さい場合、bit幅が合うように左シフトし下位bitは0埋めする。なお、422−444変換処理1222およびシフタ1223は、本画像YUVデータが差分データ1225とデータ形式として、輝度に対する色成分のサンプリング比、輝度および色成分の有効ビット数に差がある場合にこれを合わせる目的で行う。RAW復元用YUVデータ1224は、図2(B)に示す処理フローにおけるRAW復元用YUVデータ225に相当する。差分データ1225とシフタ1223の出力を加算しRAW復元用YUVデータ1224を生成出力する。
The
次に、図13を参照して、記録部108に記録する記録データのデータ構成について説明する。データ構成は、図2(A)に示す処理フローのHEIFファイル205、図2(B)に示す処理フローのHEIFファイル221、図2(C)に示す処理フローのHEIFファイル247に相当する。HEIFファイル1301は、ヘッダ1302と、HEVC本画像1303と、差分画像圧縮データ1304と、可逆画像処理パラメータ1305を含む。ヘッダ1302は、構成する複数のコンテナデータのへのリンク情報を含む。HEVC本画像1303は、HEVC圧縮された本画像データであり、図2(A)に示すHEVC圧縮処理204および図2(C)に示すHEVC圧縮処理246の出力圧縮データに相当する。また、画像データのサイズ、データ形式などの情報も含む。差分画像圧縮データ1304は、図2(A)に示す圧縮処理210および図(C)に示す圧縮処理253の出力圧縮データに相当する。また、画像データのサイズ、データ形式などの情報も含む。可逆画像処理パラメータ1305は、図(A)に示す可逆画像処理206で使用した可逆パラメータである。
Next, with reference to FIG. 13, a data configuration of print data to be recorded in the
次に、図14を参照して、ネットワーク経由での画像処理について説明する。図2(C)に示す処理フローでは、撮像装置内で復元したRAWデータに対して改めて高度な非可逆画像処理を行うことを説明した。本図では、撮像装置内でなく通信部112を介しネットワーク経由で外部サーバ113などにおいて高度な非可逆画像処理を行う場合を示す。高度な非可逆画像処理とは、例えばディープラーニングを画像処理に応用したような、非常に高画質な画像処理ではあるが、画像1枚あたりの処理時間は長く撮影時に処理することが製品機能上好ましくないものである。例えば、画像1枚あたり数十秒から数分以上かかるような画像処理である。
Next, image processing via a network will be described with reference to FIG. In the processing flow illustrated in FIG. 2C, it has been described that the advanced irreversible image processing is performed again on the RAW data restored in the imaging device. In this figure, a case is shown in which an advanced irreversible image processing is performed in the
まず、ステップS1401では、外部サーバで未処理の記録データであるHEIFファイル205があるか否かを判定する。未処理のHEIFファイル205がある場合(YES)、ステップS1402に進む。未処理のHEIFファイル205がない場合(NO)、処理を終了する。次に、ステップS1402では、外部サーバにHEIFファイル205を送付する。つまり、HEIFファイル205は、通信部112を介しネットワーク経由で外部サーバ113に送付される。次に、ステップS1403では、外部サーバによる非可逆画像処理が完了した旨の通知が受信されたか否かを判定する。なお、この通知は、通信部112を介して受信される。完了通知が受信されていない場合(NO)、ステップS1403にて通知があるまで待機する。完了通知があった場合(YES)、ステップS1404に進む。次に、ステップ1404では、外部サーバ113から通信部112を介して非可逆画像処理を行った画像が圧縮格納されたHEIFファイルを受信、記録部108に保存し、ステップS1401に戻る。以上、未処理のHEIFファイル205が無くなるまでこれを繰り返す。
First, in step S1401, it is determined whether or not there is a
次に、図4に示す処理フローで示した伸張処理ありの差分生成を行う場合と、図2(A)に示す処理フローで示した伸張処理なしの差分生成を行う場合との切替え制御について説明する。図15は、伸張ありと伸張なしを切り替える条件を管理する表であり、例えば、ユーザーはこの表をメニューで表示し切り替える条件を選択する。図15に示す例では、低速連写モード時は「伸張あり」であり、図4で示した処理フローでRAW復元用YUVデータ407と伸張本画像YUVデータ411との差分から差分データ409が生成される。一方、高速連写モード時は「伸張なし」であり、図2(A)で示した処理フローでRAW復元用YUVデータ207と本画像YUVデータとの差分から差分データ209が生成される。これにより記録速度優先の「伸張なし」かRAW復元の品質優先の「伸張あり」かを指定管理された条件で切り替え処理する。
Next, switching control between the case of performing the difference generation with the expansion processing shown in the processing flow shown in FIG. 4 and the case of performing the difference generation without the expansion processing shown in the processing flow shown in FIG. 2A will be described. To do. FIG. 15 is a table for managing conditions for switching between expansion and non-expansion. For example, the user displays this table in a menu and selects the switching condition. In the example shown in FIG. 15, “expansion” is set in the low-speed continuous shooting mode, and the
なお、図15では高速連写/低速連写が切替え条件でありこれについて説明したが、他の再生編集時/撮影時、単写撮影/連写撮影、連写代表画像/その他の画像、が選択された場合も同様である。例えば、「撮影時」は、あらゆる撮影モードで動作している場合であり、「再生編集時」は、それ以外の動作モードを示す。「連写」は、連写撮影モードで動作している場合で、「単写」は、単写撮影の撮影モードのことである。「高速連写」は、ある連写速度以上の連写モードを示し、「低速連写」は、単写撮影を含むある連写速度以下の撮影モードを示す。「連写代表画像」は、連写撮影において自動で選択される代表記録画像を示しており、この画像に対しては「伸張あり」で処理する。これに対する「その他」はその他の連写画像であり、「伸張なし」で処理することを示す。なお、本実施形態では、「常に伸張あり」、「常に伸張なし」という選択肢もありこれも選択できる。なお、本実施形態では、ユーザーがメニューでこれらの条件を選択する例について説明した。しかしながら、これに限定することなく、例えば、撮像装置の機能ごとの要求処理速度、可能使用メモリに応じて条件を予め決定し自動的に「伸張あり」「伸張なし」を選択してもよい。 Note that in FIG. 15, high-speed continuous shooting/low-speed continuous shooting is the switching condition, and this has been described. However, during other playback editing/shooting, single shooting/continuous shooting, continuous shooting representative image/other image, The same applies when selected. For example, "at the time of shooting" indicates a case of operating in any shooting mode, and "at the time of reproduction and editing" indicates an operation mode other than that. “Continuous shooting” refers to the case where the camera is operating in the continuous shooting mode, and “single shooting” refers to the shooting mode for single shooting. “High-speed continuous shooting” indicates a continuous shooting mode at or above a certain continuous shooting speed, and “low speed continuous shooting” indicates a shooting mode at or below a certain continuous shooting speed including single shooting. “Continuous shooting representative image” indicates a representative recorded image that is automatically selected in continuous shooting, and this image is processed as “with expansion”. On the other hand, “other” is another continuous shot image, and indicates that the process is performed without “expansion”. In addition, in the present embodiment, there are also options of “always with expansion” and “always without expansion”, which can also be selected. In the present embodiment, an example has been described in which the user selects these conditions from the menu. However, without being limited to this, for example, the condition may be determined in advance according to the required processing speed for each function of the image pickup apparatus and the available memory, and “with expansion” or “without expansion” may be automatically selected.
以上、本実施形態では、RAW復元ができる記録ファイル生成において、処理速度の速さ、使用メモリ量の少なさを極力優先した場合について説明した。また、伸張画像との差分によるRAW復元性が高い方式とを条件によって切り替える場合についても説明した。従って、本実施形態によれば、各撮影モードにおいてRAW復元可能な記録ファイル生成処理を最適な処理速度と品質で処理が可能となる。 As described above, in the present embodiment, the case where the processing speed and the small amount of used memory are prioritized as much as possible in the generation of the recording file capable of RAW restoration has been described. Also, a case has been described in which a method having a high RAW restoration property based on a difference from a decompressed image is switched depending on conditions. Therefore, according to the present embodiment, it is possible to perform the RAW-restorable recording file generation process in each shooting mode at the optimum processing speed and quality.
(第2実施形態)
以下、本実施形態に係る撮像装置について説明する。本実施形態に係る撮像装置の構成は、第1実施形態の図1を用いて説明した構成と同じであり、図6から図11で説明した可逆な画像処理およびその逆変換処理についても同様である。また図13、図14、図15で説明した実施形態も同様である。
(Second embodiment)
The image pickup apparatus according to this embodiment will be described below. The configuration of the image pickup apparatus according to the present embodiment is the same as the configuration described with reference to FIG. 1 of the first embodiment, and the reversible image processing and its inverse conversion processing described with reference to FIGS. 6 to 11 are the same. is there. The same applies to the embodiments described with reference to FIGS. 13, 14, and 15.
次に、図16を参照して、本実施形態の処理フローについて説明する。図16(A)は、撮影時の処理フローの例を示す図である。図16(A)は、図2(A)、図4とは異なる差分データ生成の処理フローの例を示す。まず、RAWデータ1601は、撮像されたRAWデータであり、A/D変換回路103から出力されたベイヤ配列のRAWデータである。また、図2(B)に示す処理フローにより復元された復元RAWデータ227であってもよい。さらに、図2(C)に示す処理フローの処理後RAWデータ243であってもよい。次に、非可逆画像処理1602は、非可逆画像処理部104で行う非可逆な画像処理である。本画像YUVデータ1603は、非可逆画像処理1602の出力である本画像記録用のYUVデータである。そして、本画像記録用の本画像YUVデータ1603は、メモリ107に書き込まれる。HEVC圧縮処理1604は、圧縮伸張処理部111で行うHEVC圧縮処理であり本画像YUVデータ1603をHEVC圧縮する。なお、本実施形態では、HEVC圧縮手段を例に説明しているが、JPEG圧縮など別の圧縮方式でもよい。そして、HEVC圧縮処理1604後の圧縮データは、メモリ107に書き込まれる。
Next, the processing flow of this embodiment will be described with reference to FIG. FIG. 16A is a diagram showing an example of a processing flow at the time of shooting. FIG. 16A shows an example of a processing flow of difference data generation different from those in FIGS. First, the
次に、HEVC伸張処理1612は、圧縮伸張処理部111で行うHEVC伸張処理である。HEVC圧縮処理1604で出力されたメモリ107上のHEVC圧縮データを伸張処理し、メモリ107に伸張本画像YUVデータ1611を書き込む。次に、可逆画像処理の逆変換処理1607は、可逆画像処理部109で行う可逆な画像処理の逆変換処理である。本実施形態で使用する逆変換パラメータは、非可逆画像処理402で使用されたパラメータに基づいた可逆パラメータをパラメータ逆変換処理1613で逆変換パラメータに変換して生成する。なお、非可逆画像処理パラメータからの可逆パラメータの生成、パラメータ逆変換処理1613は、CPU105で処理する。
Next, the
そして、可逆画像処理の逆変換処理1607で出力した逆変換RAWデータ1606は、メモリ107に書き込まれる。差分生成処理1608は加減算処理部110で行う差分生成処理であり、メモリ107上の逆変換RAWデータ1606、RAWデータ1601の差分データ1609を生成する。差分データ1609は、加減算処理部110での差分生成処理1608の出力であり、メモリ107に書き込まれる。圧縮処理1610は、圧縮伸張処理部111で行う差分データ1609の圧縮処理である。RAWの復元性を考えると可逆圧縮がよいが、RAW復元性より圧縮後のデータサイズを優先する場合は非可逆な圧縮処理でもよい。HEIFファイル1605は、HEIFファイルを示しており、本画像YUVデータ1603のHEVC圧縮処理1604後の圧縮データ、差分データ1609の圧縮処理1610後の圧縮データはHEIFファイルとして形成され記録部108に記録する。また、可逆画像処理の逆変換処理1607で使用した逆変換パラメータもこのHEIFファイル1605に付加し記録する。図16(A)で記録されたHEIFファイル1605は、撮影時だけでなく、図2(C)に示す処理フローの処理後RAWデータ243にも適用できる。
Then, the inverse conversion
次に、図16(B)は、図16(A)で記録したHEIFファイル1605からRAWを復元する処理フローである。HEIFファイル1621は、撮影時に記録部108で記録された記録ファイルで、図16(A)のHEIFファイル1605に相当する。HEIFファイル1621からHEVC圧縮された本画像YUV圧縮データを読み出し、圧縮伸張処理部111でHEVC伸張処理1622を行い、伸張本画像YUVデータ1623を出力する。伸張本画像YUVデータ1623は、メモリ107に書き込まれる。
Next, FIG. 16(B) is a processing flow for restoring the RAW from the
一方、HEIFファイル1621から圧縮された差分データを読み出し、圧縮伸張処理部111で伸張処理1628を行い、伸張差分データ1629を出力する。伸張差分データ1629はメモリ107に書き込まれる。次に、伸張本画像YUVデータ1623は、可逆画像処理の逆変換処理1624を行う。このときの逆変換パラメータは、HEIFファイル1621から読み出し使用する。可逆画像処理の逆変換処理1624の出力は、逆変換RAWデータ1625であり、メモリ107に書き込まれる。次に、逆変換RAWデータ1625と伸張差分データ1629をメモリ107から読み出し加減算処理部110で加算処理224を行い、復元RAWデータ1627を出力する。出力された復元RAWデータ1627は、メモリ107に書き込まれる。なお、復元RAWデータ1627は、撮影時のRAWデータ1601を復元したものである。
On the other hand, the compressed difference data is read from the
このように非可逆画像処理1602の逆変換処理でなく可逆画像処理の逆変換処理1607で行うことで処理負荷を極力軽減し処理時間短縮、使用メモリの削減が可能である。また、非可逆画像処理1602の逆変換処理に必要なパラメータと比較し可逆画像処理の逆変換処理1607の逆変換パラメータは、最低限のパラメータ数で済む。そのため、パラメータの逆変換処理1613についても処理負荷を軽減し処理時間短縮、使用メモリの削減が可能である。また、HEIFファイル1605に格納するパラメータのサイズを最小化できる。
In this way, by performing the
図17は、図16(A)で示した処理フローのタイミングチャートを説明する図である。V信号1701は、静止画撮影が行われたタイミングを表している。本実施形態では、高速な連写が行われ、V信号1701のタイミングで連続した撮影が行われていることを示している。
FIG. 17 is a diagram illustrating a timing chart of the processing flow shown in FIG. The
図17で示すように、撮像によるRAWデータ1601取得、非可逆画像処理1602、HEVC圧縮処理1604は各々連続した撮影画像に対し順次並列に処理する。次に、HEVC伸張1612は、HEVC圧縮処理1604を待って行う。HEVC伸張1612、可逆画像処理の逆変換処理1607、差分生成処理1608、圧縮処理1610、HEIFファイル1605の記録部108への記録は、HEVC伸張1612の開始を待って順次処理が開始される。非可逆画像処理からHEVC圧縮、あるいはHEVC伸張から、可逆画像逆変換処理、差分生成、差分データ圧縮に対しては画像1枚の処理が完了する前から追いかけて処理するようなタイミングチャートとしている。
As shown in FIG. 17, the acquisition of
期間T3は、撮影からHEIFファイル1605が記録されるまでの一連の処理全体の処理時間である。T3は、図3のタイミングチャートで示した期間T1より長い時間が掛かることがわかる。つまり、図16で示した処理フローでは、各処理に必要なメモリバッファのライフタイムが図2(A)に示す処理フローより長くなり、使用メモリ量は多くなる傾向がある。
The period T3 is the processing time of the entire series of processing from shooting to recording the
一方、図16に示す処理フローでは、本画像YUVデータ1603でなく、直接RAWデータ1601と逆変換RAWデータ1606との差分を差分生成処理1608で差分データ1609を取得している。そのため、図16(B)に示す処理フローによる復元RAWを生成した際に復元処理の誤差が抑えられ結果として復元RAWの品質が向上する傾向がある。
On the other hand, in the processing flow shown in FIG. 16, the
本実施形態では、第1実施形態の図15を用いて説明した「伸張あり」、「伸張なし」の切替えの対象となる処理フローは、図16(A)の処理フローと図2(A)の処理フローとなる。どちらの処理フローに従って記録するHEIFファイルを生成するかを切り替える。また、本実施形態において、HEIFファイルからのRAW復元処理について、「伸張あり」の場合は、図16(B)に示す処理フローであり、「伸張なし」の場合は、図2(B)に示す処理フローによって行われる。 In the present embodiment, the processing flow targeted for switching between “with expansion” and “without expansion” described with reference to FIG. 15 of the first embodiment is the processing flow of FIG. 16(A) and FIG. 2(A). The processing flow is as follows. The processing flow for switching the HEIF file to be recorded is switched. Further, in the present embodiment, regarding the RAW restoration processing from the HEIF file, the processing flow is shown in FIG. 16(B) in the case of “with decompression”, and is shown in FIG. 2(B) in the case of “without decompression”. The process flow shown is performed.
以上、本実施形態では、逆変換RAWとの差分によるRAW復元性が高い方式とを条件によって切り替える場合について説明した。従って、本実施形態によれば、各撮影モードにおいてRAW復元可能な記録ファイル生成処理を最適な処理速度と品質で処理が可能となる。 As described above, in the present embodiment, the case has been described in which the method of switching between the method having a high RAW recoverability based on the difference from the inverse conversion RAW depending on the condition. Therefore, according to the present embodiment, it is possible to perform the RAW-restorable recording file generation process in each shooting mode at the optimum processing speed and quality.
また、本発明の好ましい実施形態について説明したが、本発明は、これらの実施形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 Although the preferred embodiments of the present invention have been described, the present invention is not limited to these embodiments, and various modifications and changes can be made within the scope of the gist thereof. A program that implements one or more functions of the above-described embodiments is supplied to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus also read and execute the program. It is possible. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
102 撮像素子
104 非可逆画像処理部
108 記録部
109 可逆画像処理部
110 加減算処理部
111 圧縮伸張処理部
102
Claims (19)
前記第一の画像処理手段により前記非可逆な画像処理が行われた画像データを圧縮処理する第一の圧縮手段と、
前記画像データに対して可逆な画像処理を行う第二の画像処理手段と、
前記非可逆な画像処理後の画像データと前記可逆な画像処理後の画像データとの差分データを生成する生成手段と、
前記生成手段により生成された前記差分データを圧縮処理する第二の圧縮手段と、
前記第一の圧縮手段により圧縮された画像データと前記第二の圧縮手段により圧縮された画像データを記録する記録手段と
を備える
ことを特徴とする画像処理装置。 First image processing means for performing irreversible image processing on the image data generated by the imaging means,
A first compression unit that compresses the image data that has been subjected to the irreversible image processing by the first image processing unit;
Second image processing means for performing reversible image processing on the image data,
Generating means for generating difference data between the image data after the lossy image processing and the image data after the lossless image processing;
A second compression means for compressing the difference data generated by the generation means,
An image processing apparatus comprising: image data compressed by the first compression means and recording means for recording the image data compressed by the second compression means.
ことを特徴とする請求項1の画像処理装置。 The image processing apparatus according to claim 1, wherein the first compression unit performs HEVC compression processing as compression processing.
ことを特徴とする請求項1または2の画像処理装置。 The data format of the image data compressed by the first compression means and the image data compressed by the second compression means to be recorded in the recording means is a HEIF format. 2. Image processing device.
ことを特徴とする請求項1〜3のいずれか1項に記載の画像処理装置。 4. The first image processing means, as the irreversible image processing, performs a development process including at least one of a noise removal process and a demosaic process according to a feature amount of an image feature. The image processing device according to claim 1.
ことを特徴とする請求項1〜4のいずれか1項に記載の画像処理装置。 The second image processing means in the first half performs at least one of demosaic processing, gamma processing, and matrix conversion processing as the reversible image processing. Image processing device.
ことを特徴とする請求項1〜5のいずれか1項に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the reversible image processing parameter is determined based on the irreversible image processing parameter.
ことを特徴とする請求項6に記載の画像処理装置。 7. The recording means records the reversible image processing parameter together with the image data compressed by the first compression means and the image data compressed by the second compression means. The image processing device according to.
ことを特徴とする請求項1の画像処理装置。 When the data format of the image data after the lossy image processing is different from the data format of the image data after the lossless image processing, the image data after the lossy image processing is changed to the image data after the lossless image processing. The image processing apparatus according to claim 1, wherein the differential data is generated after conversion to the data format of.
ことを特徴とする請求項8の画像処理装置。 9. The image processing apparatus according to claim 8, wherein the data format of the image data is a sampling ratio of a color component with respect to luminance and an effective bit number.
をさらに備え、
前記生成手段は、前記伸張された画像データと前記可逆な画像処理後の画像データとの第二の差分データを生成する
ことを特徴とする請求項1〜9のいずれか1項に記載の画像処理装置。 Further comprising a decompression unit for decompressing the image data compressed by the first compression unit,
10. The image according to claim 1, wherein the generation unit generates second difference data between the decompressed image data and the reversible image-processed image data. Processing equipment.
をさらに備え、
前記逆変換手段は、前記可逆な画像処理のパラメータを逆変換したパラメータを用いて前記逆変換を行う
ことを特徴とする請求項10に記載の画像処理装置。 The image data decompressed by the decompression means is further inversely transformed,
The image processing apparatus according to claim 10, wherein the inverse conversion unit performs the inverse conversion using a parameter obtained by inversely converting the parameter of the reversible image processing.
さらに備え、
前記切替手段は、撮影モードに応じて前記差分データにするか前記第二の差分データにするかを切り替える
ことを特徴とする請求項10に記載の画像処理装置。 Further comprising a switching means for switching the difference data and the second difference data,
11. The image processing apparatus according to claim 10, wherein the switching unit switches between the difference data and the second difference data according to a shooting mode.
ことを特徴とする請求項12に記載の画像処理装置。 13. The image processing apparatus according to claim 12, wherein the switching unit switches to the difference data in the high speed continuous shooting mode, and switches to the second difference data in the low speed continuous shooting mode.
前記第一の圧縮手段により圧縮された画像データを伸張した画像データと、前記第二の圧縮手段により圧縮された画像データを伸張した画像データを加算する加算手段と、
前記加算手段によって生成された画像データに対して、前記第二の画像処理手段による前記可逆な画像処理の逆変換となる画像処理を行う第三の画像処理手段と、
を備える
ことを特徴とする請求項1〜9のいずれか1項に記載の画像処理装置。 Image data compressed by the first compression means, and decompression means for decompressing the image data compressed by the second compression means,
Image data decompressed by the first compression means, and addition means for adding image data decompressed by the second compression means,
Third image processing means for performing image processing, which is inverse conversion of the reversible image processing by the second image processing means, on the image data generated by the adding means,
The image processing apparatus according to claim 1, further comprising:
ことを特徴とする請求項14に記載の画像処理装置。 Fourth image processing means for performing irreversible image processing on the image data generated by the third image processing means, which is different from the irreversible image processing performed by the first image processing means. The image processing apparatus according to claim 14, further comprising:
ことを特徴とする請求項15に記載の画像処理装置。 The irreversible image processing performed by the fourth image processing means is a higher-load image processing than the irreversible image processing performed by the first image processing means. 15. The image processing device according to item 15.
請求項1〜16のいずれか1項に記載の画像処理装置と
を有する
ことを特徴とする撮像装置。 The imaging means,
An image pickup apparatus comprising: the image processing apparatus according to claim 1.
前記第一の画像処理工程により前記非可逆な画像処理が行われた画像データを圧縮処理する第一の圧縮工程と、
前記画像データに対して可逆な画像処理を行う第二の画像処理工程と、
前記前記非可逆な画像処理後の画像データと前記可逆な画像処理後の画像データとの差分データを生成する生成工程と、
前記生成工程により生成された前記差分データを圧縮処理する第二の圧縮工程と、
前記第一の圧縮手段により圧縮された画像データと前記第二の圧縮手段により圧縮された画像データを記録する記録工程と
を有する
ことを特徴とする画像処理装置の制御方法。 A first image processing step of performing irreversible image processing on the image data generated by the imaging means,
A first compression step of compressing the image data subjected to the irreversible image processing by the first image processing step;
A second image processing step of performing reversible image processing on the image data,
A generation step of generating difference data between the image data after the lossy image processing and the image data after the lossless image processing;
A second compression step of compressing the difference data generated by the generation step;
A control method for an image processing apparatus, comprising: a recording step of recording the image data compressed by the first compression means and the image data compressed by the second compression means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018226852A JP7289642B2 (en) | 2018-12-03 | 2018-12-03 | IMAGE PROCESSING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018226852A JP7289642B2 (en) | 2018-12-03 | 2018-12-03 | IMAGE PROCESSING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2020092302A true JP2020092302A (en) | 2020-06-11 |
| JP7289642B2 JP7289642B2 (en) | 2023-06-12 |
Family
ID=71013115
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018226852A Active JP7289642B2 (en) | 2018-12-03 | 2018-12-03 | IMAGE PROCESSING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7289642B2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12279048B2 (en) | 2021-11-08 | 2025-04-15 | Samsung Electronics Co., Ltd. | Enhancing remosaiced images |
| CN120235787A (en) * | 2025-05-30 | 2025-07-01 | 深圳市中兴微电子技术有限公司 | Image processing method, electronic device, computer readable medium and program product |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH1084548A (en) * | 1996-07-17 | 1998-03-31 | Sony Corp | Image coder, image coding method, image decoder, image decoding method, transmission method and recording medium |
| JP2003280694A (en) * | 2002-03-26 | 2003-10-02 | Nec Corp | Hierarchical lossless coding and decoding method, hierarchical lossless coding method, hierarchical lossless decoding method and device therefor, and program |
| JP2010124114A (en) * | 2008-11-18 | 2010-06-03 | Nikon Corp | Digital camera and image data processing program |
| JP2013050531A (en) * | 2011-08-30 | 2013-03-14 | Olympus Corp | Imaging device and focus control method |
| JP2013255179A (en) * | 2012-06-08 | 2013-12-19 | Sony Corp | Image processing apparatus, method, and program |
| JP2015179909A (en) * | 2014-03-18 | 2015-10-08 | キヤノン株式会社 | Imaging apparatus and control method of the same |
-
2018
- 2018-12-03 JP JP2018226852A patent/JP7289642B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH1084548A (en) * | 1996-07-17 | 1998-03-31 | Sony Corp | Image coder, image coding method, image decoder, image decoding method, transmission method and recording medium |
| JP2003280694A (en) * | 2002-03-26 | 2003-10-02 | Nec Corp | Hierarchical lossless coding and decoding method, hierarchical lossless coding method, hierarchical lossless decoding method and device therefor, and program |
| JP2010124114A (en) * | 2008-11-18 | 2010-06-03 | Nikon Corp | Digital camera and image data processing program |
| JP2013050531A (en) * | 2011-08-30 | 2013-03-14 | Olympus Corp | Imaging device and focus control method |
| JP2013255179A (en) * | 2012-06-08 | 2013-12-19 | Sony Corp | Image processing apparatus, method, and program |
| JP2015179909A (en) * | 2014-03-18 | 2015-10-08 | キヤノン株式会社 | Imaging apparatus and control method of the same |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12279048B2 (en) | 2021-11-08 | 2025-04-15 | Samsung Electronics Co., Ltd. | Enhancing remosaiced images |
| CN120235787A (en) * | 2025-05-30 | 2025-07-01 | 深圳市中兴微电子技术有限公司 | Image processing method, electronic device, computer readable medium and program product |
| CN120235787B (en) * | 2025-05-30 | 2025-09-09 | 深圳市中兴微电子技术有限公司 | Image processing method, electronic device, computer readable medium, and program product |
Also Published As
| Publication number | Publication date |
|---|---|
| JP7289642B2 (en) | 2023-06-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9560256B2 (en) | Image capture apparatus and image capture method in which an image is processed by a plurality of image processing devices | |
| JP3996631B2 (en) | Image processing method, image recording method, image processing apparatus, and image file format | |
| JP5845464B2 (en) | Image processing apparatus, image processing method, and digital camera | |
| JP4840967B2 (en) | Imaging apparatus, image processing method, program, and storage medium | |
| JP5240194B2 (en) | Signal processing method and signal processing apparatus | |
| TW200913674A (en) | Video camera | |
| US8823832B2 (en) | Imaging apparatus | |
| JP2012065187A (en) | Imaging apparatus and restored gain data generation method | |
| JP4596986B2 (en) | Imaging device | |
| JP6247794B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
| JP5135953B2 (en) | Image processing apparatus, image processing method, and imaging apparatus | |
| US7260271B2 (en) | Digital image data correction apparatus, digital image data correction method and digital image pickup apparatus | |
| JP4560180B2 (en) | Imaging device | |
| JP7289642B2 (en) | IMAGE PROCESSING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM | |
| JP6702792B2 (en) | Image processing apparatus and control method thereof | |
| KR20160135826A (en) | Image processing apparatus, method for controlling image processing apparatus, image pickup apparatus, method for controlling image pickup apparatus, and recording medium | |
| US8077226B2 (en) | Data processing apparatus having parallel processing zoom processors | |
| JP4608436B2 (en) | Image shooting device | |
| JP4596987B2 (en) | Imaging device | |
| JP2003219246A (en) | Electronic camera and electronic camera system | |
| JP5674532B2 (en) | Imaging apparatus, image processing method, and image processing apparatus | |
| JP2011223146A (en) | Electronic camera | |
| JP7022544B2 (en) | Image processing equipment and methods, and imaging equipment | |
| JP2006345053A (en) | Image pickup apparatus | |
| JP2006067390A (en) | Imaging apparatus and reproducing apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211203 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230117 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230228 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230417 |
|
| 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: 20230502 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230531 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 7289642 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |