JP4963690B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP4963690B2
JP4963690B2 JP2008204739A JP2008204739A JP4963690B2 JP 4963690 B2 JP4963690 B2 JP 4963690B2 JP 2008204739 A JP2008204739 A JP 2008204739A JP 2008204739 A JP2008204739 A JP 2008204739A JP 4963690 B2 JP4963690 B2 JP 4963690B2
Authority
JP
Japan
Prior art keywords
pixel
color
color conversion
cell
unit
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
JP2008204739A
Other languages
Japanese (ja)
Other versions
JP2010041612A (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.)
MegaChips Corp
Original Assignee
MegaChips Corp
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 MegaChips Corp filed Critical MegaChips Corp
Priority to JP2008204739A priority Critical patent/JP4963690B2/en
Publication of JP2010041612A publication Critical patent/JP2010041612A/en
Application granted granted Critical
Publication of JP4963690B2 publication Critical patent/JP4963690B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、画像処理装置に関し、特に、HD Photoにおけるエンコーダ及びデコーダに関する。   The present invention relates to an image processing apparatus, and more particularly to an encoder and a decoder in HD Photo.

近年、JPEGよりも高画質で、JPEG2000よりも回路構成及び演算処理が簡素化された静止画ファイルフォーマットとして、マイクロソフト社よりHD Photoが提案されている。   In recent years, HD Photo has been proposed by Microsoft as a still image file format with higher image quality than JPEG and a simplified circuit configuration and arithmetic processing than JPEG2000.

HD Photoにおけるエンコーダは、所定の周波数変換処理(PCT)を実行する周波数変換部と、ブロック歪みを軽減するための所定のプレフィルタ処理を実行するプレフィルタとを備えて構成されている。周波数変換部は、縦4画素×横4画素の画素ブロックを処理単位領域として、周波数変換処理を実行する。プレフィルタは、周波数変換部による複数の処理単位領域にオーバーラップする領域を処理単位領域として、周波数変換処理が実行される前にプレフィルタ処理を実行する。但し、プレフィルタ処理を実行するか否かは、Overlap係数の設定によって、任意に選択することができる。   An encoder in HD Photo includes a frequency conversion unit that performs a predetermined frequency conversion process (PCT) and a prefilter that executes a predetermined prefilter process for reducing block distortion. The frequency conversion unit performs the frequency conversion process using a pixel block of 4 pixels vertically × 4 pixels horizontally as a processing unit region. The pre-filter performs pre-filter processing before the frequency conversion processing is executed, with a region overlapping with a plurality of processing unit regions by the frequency conversion unit as a processing unit region. However, whether or not to execute the pre-filter process can be arbitrarily selected by setting an overlap coefficient.

また、HD Photoにおけるデコーダは、上記の周波数変換処理に対応する周波数逆変換処理を実行する周波数逆変換部と、上記のプレフィルタ処理に対応するポストフィルタ処理を実行するポストフィルタとを備えて構成されている。周波数逆変換部は、縦4画素×横4画素の画素ブロックを処理単位領域として、周波数逆変換処理を実行する。ポストフィルタは、周波数逆変換部による複数の処理単位領域にオーバーラップする領域を処理単位領域として、周波数逆変換処理が実行された後にポストフィルタ処理を実行する。但し、上記と同様に、ポストフィルタ処理を実行するか否かは、Overlap係数の設定によって、任意に選択することができる。   The decoder in HD Photo includes a frequency inverse transform unit that performs a frequency inverse transform process corresponding to the frequency transform process, and a post filter that performs a post filter process corresponding to the prefilter process. Has been. The frequency inverse transform unit performs frequency inverse transform processing using a vertical 4 pixel × horizontal 4 pixel pixel block as a processing unit region. The post-filter performs post-filter processing after frequency inverse transform processing is performed, with a region that overlaps a plurality of processing unit regions by the frequency inverse transform unit as a processing unit region. However, in the same manner as described above, whether or not to execute the post filter processing can be arbitrarily selected by setting an overlap coefficient.

なお、HD Photoの詳細については、例えば下記非特許文献1に開示されている。また、HD Photoに関連するJPEG XRの詳細については、例えば下記非特許文献2に開示されている。   The details of HD Photo are disclosed in Non-Patent Document 1, for example. Details of JPEG XR related to HD Photo are disclosed in Non-Patent Document 2 below, for example.

特開2005−333251号公報JP 2005-333251 A "HD Photo -Photographic Still Image File Format", [online], 2006年11月7日, Microsoft Corporation, [2007年10月10日検索], インターネット<URL: http://www.microsoft.com/whdc/xps/hdphotodpk.mspx>"HD Photo -Photographic Still Image File Format", [online], November 7, 2006, Microsoft Corporation, [October 10, 2007 search], Internet <URL: http://www.microsoft.com/whdc /xps/hdphotodpk.mspx> "Coding of Still Pictures -JBIG JPEG", [online], 19 December 2007, ISO/IEC JTC 1/SC 29/WG1 N 4392, [2008年3月4日検索], インターネット<URL: http://www.itscj.ipsj.or.jp/sc29/open/29view/29n9026t.doc>"Coding of Still Pictures -JBIG JPEG", [online], 19 December 2007, ISO / IEC JTC 1 / SC 29 / WG1 N 4392, [March 4, 2008 search], Internet <URL: http: // www .itscj.ipsj.or.jp / sc29 / open / 29view / 29n9026t.doc>

HD Photoにおけるエンコーダは、Bayer配列の撮像素子によって取得されたRAWデータには対応しているが、スーパーCCDハニカム(登録商標)のような、ハニカム配列の撮像素子によって取得されたRAWデータには対応していない。   The encoder in HD Photo supports RAW data acquired by a Bayer array image sensor, but supports RAW data acquired by a honeycomb array image sensor such as Super CCD Honeycomb (registered trademark). Not done.

本発明はかかる事情に鑑みて成されたものであり、回路の変更を最小限に抑えつつ、ハニカム配列の撮像素子によって取得されたRAWデータに対応可能な画像処理装置を得ることを目的とする。   The present invention has been made in view of such circumstances, and an object thereof is to obtain an image processing apparatus capable of handling RAW data acquired by an image pickup device having a honeycomb array while minimizing circuit changes. .

本発明の第1の態様に係る画像処理装置は、ハニカム配列の撮像素子によって取得された第1の色空間の信号を、所定の演算式に基づいて第2の色空間の信号に変換する色変換部を備え、前記色変換部は、ハニカム配列における複数色のセルを含む画素を規定して、画素単位で色変換処理を実行し、前記色変換部の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素と、第2の配置パターンである第2の画素とが含まれ、前記演算式においては、各セルの信号値をパラメータとして設定可能であり、前記色変換部は、前記第1の画素を処理する場合には、第1のパラメータを設定し、前記第2の画素を処理する場合には、前記演算式内における各色のセルの信号値の位置が、前記第1の画素に関するそれと等しくなるような、第2のパラメータを設定することを特徴とするものである。   The image processing apparatus according to the first aspect of the present invention provides a color for converting a signal in the first color space acquired by the honeycomb array of imaging elements into a signal in the second color space based on a predetermined arithmetic expression. A conversion unit, wherein the color conversion unit defines pixels including cells of a plurality of colors in the honeycomb arrangement, performs a color conversion process on a pixel-by-pixel basis, and a pixel to be processed by the color conversion unit includes a pixel The arrangement of each color cell includes a first pixel that is a first arrangement pattern and a second pixel that is a second arrangement pattern. In the arithmetic expression, the signal value of each cell is Can be set as a parameter, and when the first pixel is processed, the color conversion unit sets a first parameter, and when the second pixel is processed, The position of the signal value of each color cell is the first pixel. It equally becomes as related, it is characterized in setting the second parameter.

第1の態様に係る画像処理装置によれば、演算式におけるパラメータの設定を変更するという簡易な手法によって、第1及び第2の画素の双方に関して、画素内における各色のセルの配置パターンの相違を考慮した適切な色変換処理を実行することができる。   According to the image processing apparatus according to the first aspect, the difference in the arrangement pattern of the cells of each color in the pixel with respect to both the first and second pixels by a simple method of changing the parameter setting in the arithmetic expression. Therefore, it is possible to execute an appropriate color conversion process considering the above.

本発明の第2の態様に係る画像処理装置は、ハニカム配列の撮像素子によって取得された第1の色空間の信号を第2の色空間の信号に変換する色変換部と、前記第1の色空間の信号が前記色変換部に入力される前に、前記第1の色空間の信号を並び替える、並び替え処理部とを備え、前記色変換部は、ハニカム配列における複数色のセルを含む画素を規定して、画素単位で色変換処理を実行し、前記色変換部の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素と、第2の配置パターンである第2の画素とが含まれ、前記並び替え処理部は、前記色変換部の処理対象が前記第1の画素である場合には、並び替え処理を実行せず、前記色変換部の処理対象が前記第2の画素である場合には、画素内における各色のセルの信号値の位置が前記第1の画素に関するそれと等しくなるように、並び替え処理を実行することを特徴とするものである。   An image processing apparatus according to a second aspect of the present invention includes a color conversion unit that converts a signal of a first color space acquired by an image pickup device having a honeycomb array into a signal of a second color space; A rearrangement processing unit that rearranges the signals of the first color space before the color space signal is input to the color conversion unit, and the color conversion unit includes a plurality of color cells in the honeycomb arrangement. The color conversion process is executed in units of pixels by defining the pixels to be included, and the arrangement of the cells of each color in the pixel is the first arrangement pattern for the pixel that is the processing target of the color conversion unit. If the pixel and the second pixel that is the second arrangement pattern are included, the rearrangement processing unit executes the rearrangement process when the processing target of the color conversion unit is the first pixel. If the processing target of the color conversion unit is the second pixel, As the position of the signal value of each color cell in the inner becomes equal to that for the first pixel, it is characterized in performing the reordering process.

第2の態様に係る画像処理装置によれば、画素内における各色のセルの信号値の位置を並び替えるという簡易な手法によって、第1及び第2の画素の双方に関して、画素内における各色のセルの配置パターンの相違を考慮した適切な色変換処理を実行することができる。   According to the image processing apparatus according to the second aspect, the cells of each color in the pixel are related to both the first and second pixels by a simple technique of rearranging the signal value positions of the cells of each color in the pixel. Therefore, it is possible to execute an appropriate color conversion process in consideration of the difference in the arrangement pattern.

本発明の第3の態様に係る画像処理装置は、ハニカム配列の撮像素子によって取得された第1の色空間の信号を第2の色空間の信号に変換する色変換部と、前記色変換部の前段に配置された選択部とを備え、前記色変換部は、ハニカム配列における複数色のセルを含む画素を規定して、画素単位で色変換処理を実行し、前記色変換部の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素と、第2の配置パターンである第2の画素とが含まれ、前記色変換部は、第1の演算式に基づいて色変換処理を実行する第1の変換処理部と、各色のセルの信号値の位置が、等価的に前記第1の演算式におけるそれと等しくなるような、第2の演算式に基づいて、色変換処理を実行する第2の変換処理部とを有し、前記選択部は、前記色変換部の処理対象が前記第1の画素である場合には、前記第1の変換処理部を選択し、前記色変換部の処理対象が前記第2の画素である場合には、前記第2の変換処理部を選択することを特徴とするものである。   An image processing apparatus according to a third aspect of the present invention includes a color conversion unit that converts a signal of a first color space acquired by an image pickup device having a honeycomb array into a signal of a second color space, and the color conversion unit The color conversion unit defines a pixel including cells of a plurality of colors in the honeycomb arrangement, executes color conversion processing on a pixel basis, and is processed by the color conversion unit. In the pixel, the arrangement of the cells of each color in the pixel includes a first pixel that is a first arrangement pattern and a second pixel that is a second arrangement pattern. A first conversion processing unit that performs color conversion processing based on the first arithmetic expression, and a position where the signal value position of each color cell is equivalently equal to that in the first arithmetic expression. A second conversion processing unit that performs color conversion processing based on the arithmetic expression of 2; And the selection unit selects the first conversion processing unit when the processing target of the color conversion unit is the first pixel, and the processing target of the color conversion unit is the second pixel. In the case of a pixel, the second conversion processing unit is selected.

第3の態様に係る画像処理装置によれば、色変換部内に第1の変換処理部及び第2の変換処理部を設け、処理対象に応じて一方を選択するという簡易な手法によって、第1及び第2の画素の双方に関して、画素内における各色のセルの配置パターンの相違を考慮した適切な色変換処理を実行することができる。   According to the image processing apparatus according to the third aspect, the first conversion processing unit and the second conversion processing unit are provided in the color conversion unit, and a first method is selected by selecting one according to the processing target. For both the second pixel and the second pixel, an appropriate color conversion process can be executed in consideration of the difference in the arrangement pattern of the cells of each color in the pixel.

本発明の第4の態様に係る画像処理装置は、ハニカム配列の撮像素子によって取得された第1の色空間の信号を第2の色空間の信号に変換する色変換部を備え、前記色変換部は、ハニカム配列における複数色のセルを含む画素を規定して、画素単位で色変換処理を実行し、前記色変換部は、画素内における各色のセルの配置が単一の配置パターンとなるように画素を規定することを特徴とするものである。   An image processing apparatus according to a fourth aspect of the present invention includes a color conversion unit that converts a signal of a first color space acquired by an image pickup device having a honeycomb array into a signal of a second color space, and the color conversion The section defines pixels including cells of a plurality of colors in the honeycomb arrangement, and performs color conversion processing in units of pixels, and the color conversion section has a single arrangement pattern in which the cells of each color in the pixel are arranged. Thus, the pixel is defined as described above.

第4の態様に係る画像処理装置によれば、画素内における各色のセルの配置が単一の配置パターンとなるように画素を規定することにより、全ての画素において、各色のセルの配置パターンが同一となる。従って、パラメータの設定変更や、信号値の位置の並び替え等の処理を行うことなく、全ての画素に関して適切な色変換処理を実行することができる。   According to the image processing apparatus according to the fourth aspect, by defining the pixels so that the arrangement of the cells of each color in the pixel becomes a single arrangement pattern, the arrangement pattern of the cells of each color is changed in all the pixels. It will be the same. Therefore, it is possible to execute appropriate color conversion processing for all pixels without performing processing such as parameter setting change or rearrangement of signal value positions.

本発明の第5の態様に係る画像処理装置は、第4の態様に係る画像処理装置において特に、画素平面の周縁部において一画素内のセル数が不足する画素を対象として、不足のセルに関する信号値を補完する補完処理部をさらに備え、前記補完処理部は、前記不足のセルの近傍に位置するセルに関する信号値を用いた演算によって、前記不足のセルに関する信号値を補完することを特徴とするものである。   The image processing apparatus according to the fifth aspect of the present invention relates to a shortage cell particularly for a pixel whose number of cells in one pixel is insufficient at the peripheral portion of the pixel plane in the image processing apparatus according to the fourth aspect. A complement processing unit that complements the signal value is further provided, and the complement processing unit supplements the signal value related to the insufficient cell by calculation using the signal value related to the cell located in the vicinity of the insufficient cell. It is what.

第5の態様に係る画像処理装置によれば、演算によって高精度の補完を行うことにより、圧縮効率を上げることができる。   With the image processing apparatus according to the fifth aspect, it is possible to increase the compression efficiency by performing high-precision complementation by calculation.

本発明の第6の態様に係る画像処理装置は、第4の態様に係る画像処理装置において特に、画素平面の周縁部において一画素内のセル数が不足する画素を対象として、不足のセルに関する信号値を補完する補完処理部をさらに備え、前記補完処理部は、所定値を用いて、前記不足のセルに関する信号値を補完することを特徴とするものである。   The image processing apparatus according to the sixth aspect of the present invention relates to a shortage cell, particularly for the pixel whose number of cells in one pixel is insufficient at the peripheral portion of the pixel plane in the image processing apparatus according to the fourth aspect. A complement processing unit for complementing signal values is further provided, wherein the complement processing unit supplements signal values related to the insufficient cells using a predetermined value.

第6の態様に係る画像処理装置によれば、演算を行わず、所定値を用いて補完を行うことにより、処理負荷の軽減を図ることができる。   According to the image processing apparatus of the sixth aspect, it is possible to reduce the processing load by performing complementation using a predetermined value without performing calculation.

本発明の第7の態様に係る画像処理装置は、第1〜第6のいずれか一つの態様に係る画像処理装置において特に、前記色変換部からは、画素の規定に関する情報と、画素内における各色のセルの位置に関する情報とがヘッダ部に含まれた、第2の色空間の信号が出力されることを特徴とするものである。   An image processing apparatus according to a seventh aspect of the present invention is the image processing apparatus according to any one of the first to sixth aspects, and in particular, the color conversion unit receives information relating to the definition of the pixel, A signal in the second color space is output, in which information on the position of each color cell is included in the header portion.

第7の態様に係る画像処理装置によれば、画素の規定に関する情報と、画素内における各色のセルの位置に関する情報とが、第2の色空間の信号のヘッダ部に含まれている。従って、第2の色空間の信号を第1の色空間の信号に逆変換する色逆変換部が、これらの情報を参照することによって、原画像を適切に再現することが可能となる。   According to the image processing apparatus of the seventh aspect, the information related to the definition of the pixel and the information related to the position of the cell of each color in the pixel are included in the header portion of the signal in the second color space. Therefore, the color inverse conversion unit that inversely converts the signal in the second color space into the signal in the first color space can appropriately reproduce the original image by referring to the information.

本発明によれば、回路の変更を最小限に抑えつつ、ハニカム配列の撮像素子によって取得されたRAWデータに対応可能な画像処理装置を得ることができる。   ADVANTAGE OF THE INVENTION According to this invention, the image processing apparatus which can respond | correspond to the RAW data acquired by the image pick-up element of a honeycomb arrangement | sequence can be obtained, suppressing the change of a circuit to the minimum.

以下、本発明の実施の形態について、図面を用いて詳細に説明する。なお、異なる図面において同一の符号を付した要素は、同一又は相応する要素を示すものとする。以下では、本発明に係る画像処理装置をHD Photoにおけるエンコーダ及びデコーダに適用する例について説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In addition, the element which attached | subjected the same code | symbol in different drawing shall show the same or corresponding element. Hereinafter, an example in which the image processing apparatus according to the present invention is applied to an encoder and a decoder in HD Photo will be described.

<第1の実施の形態>
図1は、本発明の第1の実施の形態に係る画像処理装置1の構成を示すブロック図である。画像処理装置1は、エンコーダ2とデコーダ3とを備えて構成されている。エンコーダ2は、色変換部21、プレフィルタ22、周波数変換部23、量子化部24、予測部25、及び符号化部26を有している。デコーダ3は、色逆変換部31、ポストフィルタ32、周波数逆変換部33、逆量子化部34、逆予測部35、及び復号化部36を有している。
<First Embodiment>
FIG. 1 is a block diagram showing a configuration of an image processing apparatus 1 according to the first embodiment of the present invention. The image processing apparatus 1 includes an encoder 2 and a decoder 3. The encoder 2 includes a color conversion unit 21, a prefilter 22, a frequency conversion unit 23, a quantization unit 24, a prediction unit 25, and an encoding unit 26. The decoder 3 includes a color inverse transform unit 31, a post filter 32, a frequency inverse transform unit 33, an inverse quantization unit 34, an inverse prediction unit 35, and a decoding unit 36.

符号化部26及び復号化部36は、メモリ4に接続されている。色変換部21はバッファメモリ11に接続されており、バッファメモリ11は撮像素子10に接続されている。但し、バッファメモリ11とメモリ4とを兼用しても良い。撮像素子10は、スーパーCCDハニカム(登録商標)等の、ハニカム配列のカラーフィルタが配置された撮像素子である。撮像素子10によって取得されたRAW画像の信号S1は、バッファメモリ11に入力され、一時的に保存される。   The encoding unit 26 and the decoding unit 36 are connected to the memory 4. The color conversion unit 21 is connected to the buffer memory 11, and the buffer memory 11 is connected to the image sensor 10. However, the buffer memory 11 and the memory 4 may be combined. The image sensor 10 is an image sensor in which a color filter in a honeycomb arrangement, such as a super CCD honeycomb (registered trademark), is arranged. A RAW image signal S1 acquired by the image sensor 10 is input to the buffer memory 11 and temporarily stored.

図2は、ハニカム配列の撮像素子10によって取得されたRAW画像を示す図である。図2には、RAW画像の左上隅のみを抜き出して示している。図2に示した例では、偶数ラインにおいては、赤色(R)のカラーフィルタが配置された赤色セルと、青色(B)のカラーフィルタが配置された青色セルとが、交互に配列されている。また、奇数ラインにおいては、緑色(G)のカラーフィルタが配置された緑色セルが配列されている。奇数ラインは、偶数ラインに対して、セルピッチの1/2だけずれて配置されている。   FIG. 2 is a diagram illustrating a RAW image acquired by the imaging element 10 having the honeycomb arrangement. In FIG. 2, only the upper left corner of the RAW image is extracted and shown. In the example shown in FIG. 2, in even lines, red cells in which red (R) color filters are arranged and blue cells in which blue (B) color filters are arranged are alternately arranged. . In the odd lines, green cells in which green (G) color filters are arranged are arranged. The odd lines are arranged with a shift of ½ the cell pitch with respect to the even lines.

本実施の形態に係る画像処理装置1では、ハニカム配列における各緑色セル(G)を、Bayer配列における、赤色セルに隣接する緑色セル(Gr)と、青色セルに隣接する緑色セル(Gb)との一方に対応付ける。   In the image processing apparatus 1 according to the present embodiment, each green cell (G) in the honeycomb array is divided into a green cell (Gr) adjacent to the red cell and a green cell (Gb) adjacent to the blue cell in the Bayer array. Correspond to one of the.

図3は、図2と同様のRAW画像を示す図である。左上の赤色セル(R)と右下の赤色セル(R)とによって挟まれる緑色セル(G)は、Bayer配列における緑色セル(Gr)に対応付けられており、左上の青色セル(B)と右下の青色セル(B)とによって挟まれる緑色セル(G)は、Bayer配列における緑色セル(Gb)に対応付けられている。これにより、RGrGbB色空間で表されたRAW画像が得られる。なお、上記とは逆に、右上の赤色セル(R)と左下の赤色セル(R)とによって挟まれる緑色セル(G)を緑色セル(Gr)に対応付け、右上の青色セル(B)と左下の青色セル(B)とによって挟まれる緑色セル(G)を緑色セル(Gb)に対応付けても良い。   FIG. 3 is a view showing a RAW image similar to FIG. The green cell (G) sandwiched between the upper left red cell (R) and the lower right red cell (R) is associated with the green cell (Gr) in the Bayer array, and the upper left blue cell (B) The green cell (G) sandwiched between the lower right blue cell (B) is associated with the green cell (Gb) in the Bayer array. Thereby, a RAW image expressed in the RGrGbB color space is obtained. Contrary to the above, the green cell (G) sandwiched between the upper right red cell (R) and the lower left red cell (R) is associated with the green cell (Gr), and the upper right blue cell (B) The green cell (G) sandwiched between the lower left blue cell (B) may be associated with the green cell (Gb).

図1を参照して、色変換部21には、バッファメモリ11から読み出された信号S1が入力される。色変換部21は、RGrGbB色空間の信号S1を、YUVK色空間の画素信号S2に変換して出力する。色変換部21における色変換処理の詳細については後述する。   Referring to FIG. 1, the signal S <b> 1 read from the buffer memory 11 is input to the color conversion unit 21. The color converter 21 converts the signal S1 in the RGrGbB color space into a pixel signal S2 in the YUVK color space and outputs the pixel signal S2. Details of the color conversion processing in the color conversion unit 21 will be described later.

プレフィルタ22には、色変換部21から画素信号S2が入力される。プレフィルタ22は、画素信号S2に対して所定のプレフィルタ処理を選択的に実行し、画素信号S3を出力する。   The pixel signal S <b> 2 is input from the color conversion unit 21 to the prefilter 22. The prefilter 22 selectively executes a predetermined prefilter process on the pixel signal S2 and outputs a pixel signal S3.

周波数変換部23には、プレフィルタ22から画素信号S3が入力される。周波数変換部23は、画素信号S3に対して所定の周波数変換処理(PCT:HD Photo Core Transform)を実行し、周波数変換処理後の周波数データS4を出力する。HD Photoでは、周波数データS4に、ハイパス成分、ローパス成分、及び直流成分が含まれる。   The pixel signal S <b> 3 is input from the prefilter 22 to the frequency conversion unit 23. The frequency conversion unit 23 performs a predetermined frequency conversion process (PCT: HD Photo Core Transform) on the pixel signal S3, and outputs frequency data S4 after the frequency conversion process. In HD Photo, the frequency data S4 includes a high-pass component, a low-pass component, and a DC component.

量子化部24には、周波数変換部23から周波数データS4が入力される。量子化部24は、周波数データS4を量子化し、量子化後の周波数データS5を出力する。   The frequency data S4 is input from the frequency conversion unit 23 to the quantization unit 24. The quantization unit 24 quantizes the frequency data S4 and outputs the quantized frequency data S5.

予測部25には、量子化部24から周波数データS5が入力される。予測部25は、量子化部24から入力された周波数データS5の値と、過去に処理した特定の周波数データの値(予測値)との差分値を求め、周波数差分データS6として出力する。   The frequency data S5 is input from the quantization unit 24 to the prediction unit 25. The prediction unit 25 obtains a difference value between the value of the frequency data S5 input from the quantization unit 24 and the value (prediction value) of specific frequency data processed in the past, and outputs the difference value as frequency difference data S6.

符号化部26には、予測部25から周波数差分データS6が入力される。符号化部26は、周波数差分データS6に対してエントロピー符号化を実行し、符号化データS7を出力する。符号化部26から出力された符号化データS7は、メモリ4に記憶される。なお、厳密には、HD Photoにおいては、周波数差分データS6のうち、上位ビットに相当するNormal Bitに対してのみエントロピー符号化が実行され、下位ビットに相当するFlex Bitに関しては、エントロピー符号化が実行されることなく、メモリ4に記憶される。   The encoding unit 26 receives the frequency difference data S6 from the prediction unit 25. The encoding unit 26 performs entropy encoding on the frequency difference data S6 and outputs encoded data S7. The encoded data S7 output from the encoding unit 26 is stored in the memory 4. Strictly speaking, in HD Photo, entropy encoding is performed only on the Normal Bit corresponding to the upper bits in the frequency difference data S6, and the Entropy encoding is performed on the Flex Bit corresponding to the lower bits. It is stored in the memory 4 without being executed.

復号化部36には、メモリ4から符号化データS7が入力される。復号化部36は、符号化データS7に対してエントロピー復号化を実行し、上記の周波数差分データS6に相当する周波数差分データS8を出力する。   The encoded data S <b> 7 is input from the memory 4 to the decoding unit 36. The decoding unit 36 performs entropy decoding on the encoded data S7, and outputs frequency difference data S8 corresponding to the frequency difference data S6.

逆予測部35には、復号化部36から周波数差分データS8が入力される。逆予測部35は、周波数差分データS8に予測値を加算することにより、上記の周波数データS5に相当する周波数データS9を出力する。   The inverse prediction unit 35 receives the frequency difference data S8 from the decoding unit 36. The inverse prediction unit 35 outputs the frequency data S9 corresponding to the frequency data S5 by adding the predicted value to the frequency difference data S8.

逆量子化部34には、逆予測部35から周波数データS9が入力される。逆量子化部34は、周波数データS9を逆量子化し、上記の周波数データS4に相当する周波数データS10を出力する。   The inverse quantization unit 34 receives the frequency data S9 from the inverse prediction unit 35. The inverse quantization unit 34 inversely quantizes the frequency data S9 and outputs frequency data S10 corresponding to the frequency data S4.

周波数逆変換部33には、逆量子化部34から周波数データS10が入力される。周波数逆変換部33は、周波数データS10に対して、上記の周波数変換処理に対応する周波数逆変換処理を実行し、上記の画素信号S3に相当する画素信号S11を出力する。   The frequency data S <b> 10 is input from the inverse quantization unit 34 to the frequency inverse transform unit 33. The frequency inverse conversion unit 33 performs frequency inverse conversion processing corresponding to the frequency conversion processing on the frequency data S10, and outputs a pixel signal S11 corresponding to the pixel signal S3.

ポストフィルタ32には、周波数逆変換部33から、画素信号S11が入力される。ポストフィルタ32は、画素信号S11に対して、上記のプレフィルタ処理に対応するポストフィルタ処理を選択的に実行し、上記の画素信号S2に相当する画素信号S12を出力する。   The pixel signal S <b> 11 is input from the frequency inverse conversion unit 33 to the post filter 32. The post filter 32 selectively executes post filter processing corresponding to the pre-filter processing on the pixel signal S11, and outputs a pixel signal S12 corresponding to the pixel signal S2.

色逆変換部31には、ポストフィルタ32から画素信号S12が入力される。色逆変換部31は、YUVK色空間の画素信号S12を、RGrGbB色空間の画素信号S13に変換し、外部の表示装置等に向けて出力する。   The pixel signal S <b> 12 is input from the post filter 32 to the color inverse conversion unit 31. The color reverse conversion unit 31 converts the pixel signal S12 in the YUVK color space into the pixel signal S13 in the RGrGbB color space, and outputs it to an external display device or the like.

以下、色変換部21における色変換処理について説明する。   Hereinafter, the color conversion processing in the color conversion unit 21 will be described.

まず、色変換部21は、図3に示したRAW画像内に、色変換処理の処理単位となる画素を規定する。一つの画素内には、赤色セル(R)、青色セル(B)、緑色セル(Gr)、及び緑色セル(Gb)を、それぞれ一つずつ含める。   First, the color conversion unit 21 defines a pixel that is a unit of color conversion processing in the RAW image shown in FIG. One pixel includes one red cell (R), one blue cell (B), one green cell (Gr), and one green cell (Gb).

図4は、画素の規定の第1の例を示す図である。各画素には、同一のセル行に属する赤色セル(R)及び青色セル(B)と、その下のセル行に属する緑色セル(Gr)及び緑色セル(Gb)とが含まれている。その結果、偶数の画素行Y0,Y2に属する画素G00〜G02,G20〜G22においては、左上が赤色セル(R)、右上が青色セル(B)、左下が緑色セル(Gr)、右下が緑色セル(Gb)となり、奇数の画素行Y1,Y3に属する画素G10〜G12,G30〜G32においては、左上が青色セル(B)、右上が赤色セル(R)、左下が緑色セル(Gb)、右下が緑色セル(Gr)となる。   FIG. 4 is a diagram illustrating a first example of pixel definition. Each pixel includes a red cell (R) and a blue cell (B) belonging to the same cell row, and a green cell (Gr) and a green cell (Gb) belonging to the cell row below the pixel. As a result, in the pixels G00 to G02 and G20 to G22 belonging to the even pixel rows Y0 and Y2, the upper left is the red cell (R), the upper right is the blue cell (B), the lower left is the green cell (Gr), and the lower right is In the pixels G10 to G12 and G30 to G32 belonging to the odd pixel rows Y1 and Y3, the upper left is the blue cell (B), the upper right is the red cell (R), and the lower left is the green cell (Gb). The lower right is a green cell (Gr).

色変換部21は、左上の画素から順に、画素単位で色変換処理を実行する。つまり、画素G00→G01→G02→・・・→G10→G11→G12→・・・→G20→G21→G22→・・・→G30→G31→G32→・・・の順に、色変換処理を実行する。   The color conversion unit 21 performs color conversion processing in units of pixels in order from the upper left pixel. That is, color conversion processing is executed in the order of pixels G00 → G01 → G02 →... → G10 → G11 → G12 →... → G20 → G21 → G22 →... → G30 → G31 → G32 →. To do.

図5は、色変換部21の構成を概略的に示す図である。色変換部21は、4個のレジスタF1〜F4と、これらのレジスタF1〜F4に接続された演算部13とを有している。4個のレジスタは、左上がレジスタF1、右上がレジスタF2、左下がレジスタF3、右下がレジスタF4である。   FIG. 5 is a diagram schematically showing the configuration of the color conversion unit 21. The color conversion unit 21 includes four registers F1 to F4 and a calculation unit 13 connected to these registers F1 to F4. Of the four registers, the upper left is the register F1, the upper right is the register F2, the lower left is the register F3, and the lower right is the register F4.

左上のレジスタF1には、画素内の左上のセルに関する信号値が入力され、右上のレジスタF2には、画素内の右上のセルに関する信号値が入力され、左下のレジスタF3には、画素内の左下のセルに関する信号値が入力され、右下のレジスタF4には、画素内の右下のセルに関する信号値が入力される。   A signal value related to the upper left cell in the pixel is input to the upper left register F1, a signal value related to the upper right cell in the pixel is input to the upper right register F2, and a signal value related to the upper left cell in the pixel is input to the lower left register F3. A signal value related to the lower left cell is input, and a signal value related to the lower right cell in the pixel is input to the lower right register F4.

従って、偶数の画素行Y0,Y2に属する画素G00〜G02,G20〜G22を処理する場合には、レジスタF1には赤色セル(R)の信号値が入力され、レジスタF2には青色セル(B)の信号値が入力され、レジスタF3には緑色セル(Gr)の信号値が入力され、レジスタF4には緑色セル(Gb)の信号値が入力される。また、奇数の画素行Y1,Y3に属する画素G10〜G12,G30〜G32を処理する場合には、レジスタF1には青色セル(B)の信号値が入力され、レジスタF2には赤色セル(R)の信号値が入力され、レジスタF3には緑色セル(Gb)の信号値が入力され、レジスタF4には緑色セル(Gr)の信号値が入力される。   Therefore, when processing the pixels G00 to G02 and G20 to G22 belonging to the even pixel rows Y0 and Y2, the signal value of the red cell (R) is input to the register F1, and the blue cell (B ), The signal value of the green cell (Gr) is input to the register F3, and the signal value of the green cell (Gb) is input to the register F4. When the pixels G10 to G12 and G30 to G32 belonging to the odd pixel rows Y1 and Y3 are processed, the signal value of the blue cell (B) is input to the register F1, and the red cell (R) is input to the register F2. ), The signal value of the green cell (Gb) is input to the register F3, and the signal value of the green cell (Gr) is input to the register F4.

図6は、演算部13が演算によって色変換処理を実行するための演算式を示す図である。図6に示すように、演算式は、パラメータP1〜P4を用いて記述されている。パラメータP1〜P4は、図5に示したレジスタF1〜F4に設定される。色変換部21は、図6に示した演算式に基づいて、K信号、V信号、U信号、及びY信号の各画素値を算出する。なお、図6に示した変換式において、“floor(x)”は、x以下の最大の整数を意味し、“ceiling(x)”は、x以上の最小の整数を意味する。また、“α”は、画素値の階調数の1/2を意味する。例えば、画素値が8bitで表される場合は、256階調であるため、“α”は128となる。   FIG. 6 is a diagram illustrating an arithmetic expression for the arithmetic unit 13 to perform color conversion processing by arithmetic operation. As shown in FIG. 6, the arithmetic expression is described using parameters P1 to P4. The parameters P1 to P4 are set in the registers F1 to F4 shown in FIG. The color conversion unit 21 calculates each pixel value of the K signal, the V signal, the U signal, and the Y signal based on the arithmetic expression shown in FIG. In the conversion formula shown in FIG. 6, “floor (x)” means the largest integer not more than x, and “ceiling (x)” means the smallest integer not less than x. “Α” means 1/2 of the number of gradations of the pixel value. For example, when the pixel value is represented by 8 bits, since there are 256 gradations, “α” is 128.

図7は、レジスタF1〜F4へのパラメータP1〜P4の設定例を示す図である。色変換部21は、偶数の画素行Y0,Y2に属する画素G00〜G02,G20〜G22を処理する場合には、図7の(A)に示すように、レジスタF1,F2,F3,F4に、それぞれパラメータP4,P3,P1,P2を設定する。また、色変換部21は、奇数の画素行Y1,Y3に属する画素G10〜G12,G30〜G32を処理する場合には、図7の(B)に示すように、レジスタF1,F2,F3,F4に、それぞれパラメータP3,P4,P2,P1を設定する。   FIG. 7 is a diagram illustrating an example of setting the parameters P1 to P4 in the registers F1 to F4. When processing the pixels G00 to G02 and G20 to G22 belonging to the even pixel rows Y0 and Y2, the color conversion unit 21 stores the registers F1, F2, F3, and F4 in the registers F1, F2, F3, and F4 as shown in FIG. , Parameters P4, P3, P1 and P2 are set, respectively. Further, when the pixels G10 to G12 and G30 to G32 belonging to the odd pixel rows Y1 and Y3 are processed, the color converter 21 registers F1, F2, F3, as shown in FIG. Parameters P3, P4, P2 and P1 are set in F4, respectively.

図8は、HD Photoにおける、RGrGbB色空間からYUVK色空間への変換式を示す図である。レジスタF1〜F4へのパラメータP1〜P4の設定を図7の(A)及び(B)のように規定することにより、全ての画素G00〜G02,G10〜G12,G20〜G22,G30〜G32に関して、図8に示した変換式が実現される。   FIG. 8 is a diagram showing a conversion formula from the RGrGbB color space to the YUVK color space in HD Photo. By setting the parameters P1 to P4 in the registers F1 to F4 as shown in FIGS. 7A and 7B, all the pixels G00 to G02, G10 to G12, G20 to G22, and G30 to G32 are related. The conversion formula shown in FIG. 8 is realized.

図9は、画素の規定の第2の例を示す図である。各画素には、同一のセル列に属する赤色セル(R)及び青色セル(B)と、その隣のセル列に属する緑色セル(Gr)及び緑色セル(Gb)とが含まれている。その結果、偶数の画素列X0,X2,X4に属する画素G00,G10,G02,G12,G04,G14においては、左上が赤色セル(R)、右上が緑色セル(Gr)、左下が青色セル(B)、右下が緑色セル(Gb)となり、奇数の画素列X1,X3,X5に属する画素G01,G11,G03,G13,G05,G15においては、左上が青色セル(B)、右上が緑色セル(Gb)、左下が赤色セル(R)、右下が緑色セル(Gr)となる。   FIG. 9 is a diagram illustrating a second example of pixel definition. Each pixel includes a red cell (R) and a blue cell (B) belonging to the same cell column, and a green cell (Gr) and a green cell (Gb) belonging to the adjacent cell column. As a result, in the pixels G00, G10, G02, G12, G04, and G14 belonging to the even pixel rows X0, X2, and X4, the upper left is the red cell (R), the upper right is the green cell (Gr), and the lower left is the blue cell ( B), the lower right is a green cell (Gb), and in the pixels G01, G11, G03, G13, G05, and G15 belonging to the odd pixel columns X1, X3, and X5, the upper left is a blue cell (B), and the upper right is green. The cell (Gb), the lower left is a red cell (R), and the lower right is a green cell (Gr).

色変換部21は、左上の画素から順に、画素単位で色変換処理を実行する。つまり、画素G00→G01→G02→G03→G04→G05→・・・→G10→G11→G12→G13→G14→G15→・・・の順に、色変換処理を実行する。   The color conversion unit 21 performs color conversion processing in units of pixels in order from the upper left pixel. That is, the color conversion processing is executed in the order of pixels G00 → G01 → G02 → G03 → G04 → G05 →... → G10 → G11 → G12 → G13 → G14 → G15 →.

図10は、レジスタF1〜F4へのパラメータP1〜P4の設定例を示す図である。色変換部21は、偶数の画素列X0,X2,X4に属する画素G00,G10,G02,G12,G04,G14を処理する場合には、図10の(A)に示すように、レジスタF1,F2,F3,F4に、それぞれパラメータP4,P1,P3,P2を設定する。また、色変換部21は、奇数の画素列X1,X3,X5に属する画素G01,G11,G03,G13,G05,G15を処理する場合には、図10の(B)に示すように、レジスタF1,F2,F3,F4に、それぞれパラメータP3,P2,P4,P1を設定する。レジスタF1〜F4へのパラメータP1〜P4の設定を図10の(A)及び(B)のように規定することにより、全ての画素G00〜G05,G10〜G15に関して、図8に示した変換式が実現される。   FIG. 10 is a diagram illustrating an example of setting the parameters P1 to P4 in the registers F1 to F4. When processing the pixels G00, G10, G02, G12, G04, and G14 belonging to the even-numbered pixel columns X0, X2, and X4, as shown in FIG. Parameters P4, P1, P3, and P2 are set in F2, F3, and F4, respectively. Further, when processing the pixels G01, G11, G03, G13, G05, and G15 belonging to the odd pixel columns X1, X3, and X5, the color conversion unit 21 registers the registers as shown in FIG. Parameters P3, P2, P4, and P1 are set in F1, F2, F3, and F4, respectively. By defining the parameters P1 to P4 in the registers F1 to F4 as shown in (A) and (B) of FIG. 10, the conversion formulas shown in FIG. 8 are obtained for all the pixels G00 to G05 and G10 to G15. Is realized.

本実施の形態において、色変換部21は、ハニカム配列における複数色のセルを含む画素を、RAW画像内に規定して、画素単位で色変換処理を実行する。ここで、色変換部21の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素(例えば図4の画素G00)と、第1の配置パターンとは異なる第2の配置パターンである第2の画素(例えば図4の画素G10)とが含まれる。また、図6に示したように、演算式においては、各セルの信号値をパラメータP1〜P4として設定可能である。そして、色変換部21は、第1の画素を処理する場合には、第1のパラメータ(例えば図7の(A))を設定する。一方、第2の画素を処理する場合には、演算式内における各色のセルの信号値の位置が、第1の画素に関するそれと等しくなるような、第2のパラメータ(例えば図7の(B))を設定する。   In the present embodiment, the color conversion unit 21 defines a pixel including cells of a plurality of colors in the honeycomb arrangement in the RAW image, and executes a color conversion process on a pixel basis. Here, in the pixel to be processed by the color conversion unit 21, the arrangement of the cells of each color in the pixel is the first pixel (for example, the pixel G00 in FIG. 4) which is the first arrangement pattern, and the first A second pixel that is a second arrangement pattern different from the arrangement pattern (for example, pixel G10 in FIG. 4) is included. Further, as shown in FIG. 6, in the arithmetic expression, the signal value of each cell can be set as parameters P1 to P4. When the first pixel is processed, the color conversion unit 21 sets a first parameter (for example, (A) in FIG. 7). On the other hand, when the second pixel is processed, a second parameter (for example, (B) in FIG. 7) is set such that the position of the signal value of the cell of each color in the arithmetic expression is equal to that of the first pixel. ) Is set.

従って、本実施の形態によれば、演算式におけるパラメータP1〜P4の設定を変更するという簡易な手法によって、第1及び第2の画素の双方に関して、画素内における各色のセルの配置パターンの相違を考慮した適切な色変換処理を実行することができる。その結果、符号化効率の劣化が生じる可能性を回避することができる。   Therefore, according to the present embodiment, the difference in the arrangement pattern of the cells of the respective colors in the pixel with respect to both the first and second pixels by a simple method of changing the setting of the parameters P1 to P4 in the arithmetic expression. Therefore, it is possible to execute an appropriate color conversion process considering the above. As a result, it is possible to avoid the possibility that the encoding efficiency is deteriorated.

<第2の実施の形態>
図11は、本発明の第2の実施の形態に係る画像処理装置1の構成の一部を示すブロック図である。バッファメモリ11と色変換部21との間に、並び替え処理部15が接続されている。並び替え処理部15は、バッファメモリ11から読み出した信号S1を選択的に並び替えて、信号S1aとして色変換部21に入力する。
<Second Embodiment>
FIG. 11 is a block diagram showing a part of the configuration of the image processing apparatus 1 according to the second embodiment of the present invention. A rearrangement processing unit 15 is connected between the buffer memory 11 and the color conversion unit 21. The rearrangement processing unit 15 selectively rearranges the signal S1 read from the buffer memory 11, and inputs the signal S1 to the color conversion unit 21 as the signal S1a.

図12は、色変換部21が有するレジスタF1〜F4の第1の例を示す図である。この例では、レジスタF1には赤色セル(R)の信号値が入力され、レジスタF2には青色セル(B)の信号値が入力され、レジスタF3には緑色セル(Gr)の信号値が入力され、レジスタF4には緑色セル(Gb)の信号値が入力される。色変換部21が有する演算部13(図12には示さない)は、図8に示した演算式に基づいて、RGrGbB色空間からYUVK色空間への色変換処理を実行する。   FIG. 12 is a diagram illustrating a first example of the registers F1 to F4 included in the color conversion unit 21. As illustrated in FIG. In this example, the signal value of the red cell (R) is input to the register F1, the signal value of the blue cell (B) is input to the register F2, and the signal value of the green cell (Gr) is input to the register F3. The signal value of the green cell (Gb) is input to the register F4. The calculation unit 13 (not shown in FIG. 12) included in the color conversion unit 21 executes color conversion processing from the RGrGbB color space to the YUVK color space based on the calculation formula shown in FIG.

図4に示した例では、偶数の画素行Y0,Y2に属する画素G00〜G02,G20〜G22においては、左上が赤色セル(R)、右上が青色セル(B)、左下が緑色セル(Gr)、右下が緑色セル(Gb)となる。従って、画素内における各色の配置パターンと、図12に示したレジスタF1〜F4における各色の配置パターンとが一致するため、並び替え処理部15は、並び替え処理を実行することなく、各色のセルの信号値を、対応するレジスタF1〜F4に入力する。   In the example shown in FIG. 4, in the pixels G00 to G02 and G20 to G22 belonging to the even pixel rows Y0 and Y2, the upper left is the red cell (R), the upper right is the blue cell (B), and the lower left is the green cell (Gr ), The lower right is a green cell (Gb). Accordingly, since the arrangement pattern of each color in the pixel matches the arrangement pattern of each color in the registers F1 to F4 shown in FIG. 12, the rearrangement processing unit 15 does not perform the rearrangement process, and the cell of each color. Are input to the corresponding registers F1 to F4.

一方、奇数の画素行Y1,Y3に属する画素G10〜G12,G30〜G32においては、左上が青色セル(B)、右上が赤色セル(R)、左下が緑色セル(Gb)、右下が緑色セル(Gr)となる。従って、図12に示したレジスタF1〜F4における各色の配置パターンは、画素内における各色の配置パターンに対して左右が逆転している。そのため、並び替え処理部15は、画素内における各色のセルの信号値を左右反転した後に、各色のセルの信号値を、対応するレジスタF1〜F4に入力する。   On the other hand, in the pixels G10 to G12 and G30 to G32 belonging to the odd pixel rows Y1 and Y3, the upper left is a blue cell (B), the upper right is a red cell (R), the lower left is a green cell (Gb), and the lower right is green. This becomes a cell (Gr). Accordingly, the arrangement pattern of each color in the registers F1 to F4 shown in FIG. 12 is reversed to the left and right with respect to the arrangement pattern of each color in the pixel. For this reason, the rearrangement processing unit 15 horizontally inverts the signal value of each color cell in the pixel, and then inputs the signal value of each color cell to the corresponding registers F1 to F4.

図13は、色変換部21が有するレジスタF1〜F4の第2の例を示す図である。この例では、レジスタF1には赤色セル(R)の信号値が入力され、レジスタF2には緑色セル(Gr)の信号値が入力され、レジスタF3には青色セル(B)の信号値が入力され、レジスタF4には緑色セル(Gb)の信号値が入力される。色変換部21が有する演算部13(図12には示さない)は、図8に示した演算式に基づいて、RGrGbB色空間からYUVK色空間への色変換処理を実行する。   FIG. 13 is a diagram illustrating a second example of the registers F1 to F4 included in the color conversion unit 21. As illustrated in FIG. In this example, the signal value of the red cell (R) is input to the register F1, the signal value of the green cell (Gr) is input to the register F2, and the signal value of the blue cell (B) is input to the register F3. The signal value of the green cell (Gb) is input to the register F4. The calculation unit 13 (not shown in FIG. 12) included in the color conversion unit 21 executes color conversion processing from the RGrGbB color space to the YUVK color space based on the calculation formula shown in FIG.

図9に示した例では、偶数の画素列X0,X2,X4に属する画素G00,G10,G02,G12,G04,G14においては、左上が赤色セル(R)、右上が緑色セル(Gr)、左下が青色セル(B)、右下が緑色セル(Gb)となる。従って、画素内における各色の配置パターンと、図13に示したレジスタF1〜F4における各色の配置パターンとが一致するため、並び替え処理部15は、並び替え処理を実行することなく、各色のセルの信号値を、対応するレジスタF1〜F4に入力する。   In the example shown in FIG. 9, in the pixels G00, G10, G02, G12, G04, and G14 belonging to the even pixel rows X0, X2, and X4, the upper left is the red cell (R), the upper right is the green cell (Gr), The lower left is a blue cell (B) and the lower right is a green cell (Gb). Therefore, since the arrangement pattern of each color in the pixel matches the arrangement pattern of each color in the registers F1 to F4 shown in FIG. 13, the rearrangement processing unit 15 does not execute the rearrangement process, and the cell of each color. Are input to the corresponding registers F1 to F4.

一方、奇数の画素列X1,X3,X5に属する画素G01,G11,G03,G13,G05,G15においては、左上が青色セル(B)、右上が緑色セル(Gb)、左下が赤色セル(R)、右下が緑色セル(Gr)となる。従って、図13に示したレジスタF1〜F4における各色の配置パターンは、画素内における各色の配置パターンに対して上下が逆転している。そのため、並び替え処理部15は、画素内における各色のセルの信号値を上下反転した後に、各色のセルの信号値を、対応するレジスタF1〜F4に入力する。   On the other hand, in the pixels G01, G11, G03, G13, G05, and G15 belonging to the odd pixel columns X1, X3, and X5, the upper left is a blue cell (B), the upper right is a green cell (Gb), and the lower left is a red cell (R ), The lower right is a green cell (Gr). Therefore, the arrangement pattern of each color in the registers F1 to F4 shown in FIG. 13 is reversed upside down with respect to the arrangement pattern of each color in the pixel. For this reason, the rearrangement processing unit 15 vertically inverts the signal value of each color cell in the pixel, and then inputs the signal value of each color cell to the corresponding registers F1 to F4.

図14は、第2の実施の形態の変形例を示す図である。図14に示すように、並び替え処理部15は、撮像素子10とバッファメモリ11との間に接続されていても良い。   FIG. 14 is a diagram illustrating a modification of the second embodiment. As shown in FIG. 14, the rearrangement processing unit 15 may be connected between the image sensor 10 and the buffer memory 11.

本実施の形態に係る画像処理装置1は、色変換部21よりも前段に配置された並び替え処理部15を備える。また、色変換部21は、ハニカム配列における複数色のセルを含む画素を、RAW画像内に規定して、画素単位で色変換処理を実行する。ここで、色変換部21の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素(例えば図4の画素G00)と、第1の配置パターンとは異なる第2の配置パターンである第2の画素(例えば図4の画素G10)とが含まる。そして、並び替え処理部15は、色変換部21の処理対象が第1の画素である場合には、並び替え処理を実行せず、色変換部21の処理対象が第2の画素である場合には、画素内における各色のセルの信号値の位置が第1の画素に関するそれと等しくなるように、並び替え処理を実行する。   The image processing apparatus 1 according to the present embodiment includes a rearrangement processing unit 15 that is arranged before the color conversion unit 21. In addition, the color conversion unit 21 defines pixels including cells of a plurality of colors in the honeycomb arrangement in the RAW image, and executes the color conversion process in units of pixels. Here, in the pixel to be processed by the color conversion unit 21, the arrangement of the cells of each color in the pixel is the first pixel (for example, the pixel G00 in FIG. 4) which is the first arrangement pattern, and the first A second pixel that is a second arrangement pattern different from the arrangement pattern (for example, pixel G10 in FIG. 4) is included. Then, when the processing target of the color conversion unit 21 is the first pixel, the rearrangement processing unit 15 does not execute the rearrangement processing and the processing target of the color conversion unit 21 is the second pixel. The rearrangement process is executed so that the position of the signal value of the cell of each color in the pixel is equal to that of the first pixel.

従って、本実施の形態によれば、画素内における各色のセルの信号値の位置を並び替えるという簡易な手法によって、第1及び第2の画素の双方に関して、画素内における各色のセルの配置パターンの相違を考慮した適切な色変換処理を実行することができる。その結果、符号化効率の劣化が生じる可能性を回避することができる。   Therefore, according to the present embodiment, the arrangement pattern of the cells of each color in the pixel with respect to both the first and second pixels can be obtained by a simple technique of rearranging the signal value positions of the cells of each color in the pixel. Appropriate color conversion processing can be executed in consideration of these differences. As a result, it is possible to avoid the possibility that the encoding efficiency is deteriorated.

<第3の実施の形態>
図15は、本発明の第3の実施の形態に係る画像処理装置1の構成の一部を示すブロック図である。色変換部21の前段に、選択部40が接続されている。また、色変換部21は、変換処理部41A,41Bを有している。選択部40は、変換処理部41A,41Bの一方を選択して、信号S1を入力する。
<Third Embodiment>
FIG. 15 is a block diagram showing a part of the configuration of the image processing apparatus 1 according to the third embodiment of the present invention. A selection unit 40 is connected in front of the color conversion unit 21. The color conversion unit 21 includes conversion processing units 41A and 41B. The selection unit 40 selects one of the conversion processing units 41A and 41B and inputs the signal S1.

図16は、変換処理部41Aの構成の第1の例を概略的に示す図である。図16の(A)に示すように、変換処理部41Aは、4個のレジスタF1〜F4と、これらのレジスタF1〜F4に接続された演算部13Aとを有している。図16の(B)には、演算部13Aが演算によって色変換処理を実行するための演算式を示している。例えば、K信号の値は、レジスタF3の値Q3からレジスタF4の値Q4を減算することによって求まり、V信号の値は、レジスタF2の値Q2からレジスタF1の値Q1を減算することによって求まる。   FIG. 16 is a diagram schematically illustrating a first example of the configuration of the conversion processing unit 41A. As illustrated in FIG. 16A, the conversion processing unit 41A includes four registers F1 to F4 and an arithmetic unit 13A connected to these registers F1 to F4. FIG. 16B shows an arithmetic expression for the arithmetic unit 13A to execute color conversion processing by arithmetic operation. For example, the value of the K signal is obtained by subtracting the value Q4 of the register F4 from the value Q3 of the register F3, and the value of the V signal is obtained by subtracting the value Q1 of the register F1 from the value Q2 of the register F2.

図17は、変換処理部41Bの構成の第1の例を概略的に示す図である。図17の(A)に示すように、変換処理部41Bは、4個のレジスタF1〜F4と、これらのレジスタF1〜F4に接続された演算部13Bとを有している。図17の(B)には、演算部13Bが演算によって色変換処理を実行するための演算式を示している。例えば、K信号の値は、レジスタF4の値Q4からレジスタF3の値Q3を減算することによって求まり、V信号の値は、レジスタF1の値Q1からレジスタF2の値Q2を減算することによって求まる。   FIG. 17 is a diagram schematically illustrating a first example of the configuration of the conversion processing unit 41B. As shown in FIG. 17A, the conversion processing unit 41B includes four registers F1 to F4 and an arithmetic unit 13B connected to these registers F1 to F4. FIG. 17B shows an arithmetic expression for the arithmetic unit 13B to perform color conversion processing by arithmetic operation. For example, the value of the K signal is obtained by subtracting the value Q3 of the register F3 from the value Q4 of the register F4, and the value of the V signal is obtained by subtracting the value Q2 of the register F2 from the value Q1 of the register F1.

図4に示した例において、偶数の画素行Y0,Y2に属する画素G00〜G02,G20〜G22を処理する場合には、選択部40は変換処理部41Aを選択する。これにより、レジスタF1の値Q1は赤色セル(R)の信号値となり、レジスタF2の値Q2は青色セル(B)の信号値となり、レジスタF3の値Q3は緑色セル(Gr)の信号値となり、レジスタF4の値Q4は緑色セル(Gb)の信号値となる。その結果、図16の(B)に示した演算式は、図8に示した演算式に等価的に等しくなる。   In the example illustrated in FIG. 4, when processing the pixels G00 to G02 and G20 to G22 belonging to the even pixel rows Y0 and Y2, the selection unit 40 selects the conversion processing unit 41A. As a result, the value Q1 of the register F1 becomes the signal value of the red cell (R), the value Q2 of the register F2 becomes the signal value of the blue cell (B), and the value Q3 of the register F3 becomes the signal value of the green cell (Gr). The value Q4 of the register F4 becomes the signal value of the green cell (Gb). As a result, the arithmetic expression shown in FIG. 16B is equivalently equivalent to the arithmetic expression shown in FIG.

一方、奇数の画素行Y1,Y3に属する画素G10〜G12,G30〜G32を処理する場合には、選択部40は変換処理部41Bを選択する。これにより、レジスタF1の値Q1は青色セル(B)の信号値となり、レジスタF2の値Q2は赤色セル(R)の信号値となり、レジスタF3の値Q3は緑色セル(Gb)の信号値となり、レジスタF4の値Q4は緑色セル(Gr)の信号値となる。その結果、図17の(B)に示した演算式は、図8に示した演算式に等価的に等しくなる。   On the other hand, when processing the pixels G10 to G12 and G30 to G32 belonging to the odd pixel rows Y1 and Y3, the selection unit 40 selects the conversion processing unit 41B. Thus, the value Q1 of the register F1 becomes the signal value of the blue cell (B), the value Q2 of the register F2 becomes the signal value of the red cell (R), and the value Q3 of the register F3 becomes the signal value of the green cell (Gb). The value Q4 of the register F4 becomes the signal value of the green cell (Gr). As a result, the arithmetic expression shown in FIG. 17B is equivalently equivalent to the arithmetic expression shown in FIG.

図18は、変換処理部41Aの構成の第2の例を概略的に示す図である。図18の(A)に示すように、変換処理部41Aは、4個のレジスタF1〜F4と、これらのレジスタF1〜F4に接続された演算部13Aとを有している。図18の(B)には、演算部13Aが演算によって色変換処理を実行するための演算式を示している。例えば、K信号の値は、レジスタF2の値Q2からレジスタF4の値Q4を減算することによって求まり、V信号の値は、レジスタF3の値Q3からレジスタF1の値Q1を減算することによって求まる。   FIG. 18 is a diagram schematically illustrating a second example of the configuration of the conversion processing unit 41A. As illustrated in FIG. 18A, the conversion processing unit 41A includes four registers F1 to F4 and an arithmetic unit 13A connected to these registers F1 to F4. FIG. 18B shows an arithmetic expression for the arithmetic unit 13A to execute color conversion processing by arithmetic operation. For example, the value of the K signal is obtained by subtracting the value Q4 of the register F4 from the value Q2 of the register F2, and the value of the V signal is obtained by subtracting the value Q1 of the register F1 from the value Q3 of the register F3.

図19は、変換処理部41Bの構成の第2の例を概略的に示す図である。図19の(A)に示すように、変換処理部41Bは、4個のレジスタF1〜F4と、これらのレジスタF1〜F4に接続された演算部13Bとを有している。図19の(B)には、演算部13Bが演算によって色変換処理を実行するための演算式を示している。例えば、K信号の値は、レジスタF4の値Q4からレジスタF2の値Q2を減算することによって求まり、V信号の値は、レジスタF1の値Q1からレジスタF3の値Q3を減算することによって求まる。   FIG. 19 is a diagram schematically illustrating a second example of the configuration of the conversion processing unit 41B. As shown in FIG. 19A, the conversion processing unit 41B includes four registers F1 to F4 and a calculation unit 13B connected to these registers F1 to F4. FIG. 19B shows an arithmetic expression for the arithmetic unit 13B to perform color conversion processing by arithmetic operation. For example, the value of the K signal is obtained by subtracting the value Q2 of the register F2 from the value Q4 of the register F4, and the value of the V signal is obtained by subtracting the value Q3 of the register F3 from the value Q1 of the register F1.

図9に示した例において、偶数の画素列X0,X2,X4に属する画素G00,G10,G02,G12,G04,G14を処理する場合には、選択部40は変換処理部41Aを選択する。これにより、レジスタF1の値Q1は赤色セル(R)の信号値となり、レジスタF2の値Q2は緑色セル(Gr)の信号値となり、レジスタF3の値Q3は青色セル(B)の信号値となり、レジスタF4の値Q4は緑色セル(Gb)の信号値となる。その結果、図18の(B)に示した演算式は、図8に示した演算式に等価的に等しくなる。   In the example shown in FIG. 9, when processing the pixels G00, G10, G02, G12, G04, and G14 belonging to the even pixel rows X0, X2, and X4, the selection unit 40 selects the conversion processing unit 41A. As a result, the value Q1 of the register F1 becomes the signal value of the red cell (R), the value Q2 of the register F2 becomes the signal value of the green cell (Gr), and the value Q3 of the register F3 becomes the signal value of the blue cell (B). The value Q4 of the register F4 becomes the signal value of the green cell (Gb). As a result, the arithmetic expression shown in FIG. 18B is equivalently equivalent to the arithmetic expression shown in FIG.

一方、奇数の画素列X1,X3,X5に属する画素G01,G11,G03,G13,G05,G15を処理する場合には、選択部40は変換処理部41Bを選択する。これにより、レジスタF1の値Q1は青色セル(B)の信号値となり、レジスタF2の値Q2は緑色セル(Gb)の信号値となり、レジスタF3の値Q3は赤色セル(R)の信号値となり、レジスタF4の値Q4は緑色セル(Gr)の信号値となる。その結果、図19の(B)に示した演算式は、図8に示した演算式に等価的に等しくなる。   On the other hand, when processing the pixels G01, G11, G03, G13, G05, and G15 belonging to the odd pixel rows X1, X3, and X5, the selection unit 40 selects the conversion processing unit 41B. Thus, the value Q1 of the register F1 becomes the signal value of the blue cell (B), the value Q2 of the register F2 becomes the signal value of the green cell (Gb), and the value Q3 of the register F3 becomes the signal value of the red cell (R). The value Q4 of the register F4 becomes the signal value of the green cell (Gr). As a result, the arithmetic expression shown in FIG. 19B is equivalently equivalent to the arithmetic expression shown in FIG.

本実施の形態に係る画像処理装置1は、色変換部21の前段に配置された選択部40を備える。また、色変換部21は、ハニカム配列における複数色のセルを含む画素を、RAW画像内に規定して、画素単位で色変換処理を実行する。ここで、色変換部21の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素(例えば図4の画素G00)と、第1の配置パターンとは異なる第2の配置パターンである第2の画素(例えば図4の画素G10)とが含まれる。また、色変換部21は、第1の演算式(例えば図16の(B))に基づいて色変換処理を実行する変換処理部41Aと、第2の演算式(例えば図17の(B))に基づいて色変換処理を実行する変換処理部41Bとを有している。ここで、第2の演算式は、各色のセルの信号値の位置が、等価的に第1の演算式におけるそれと等しくなるような演算式である。そして、選択部40は、色変換部21の処理対象が第1の画素である場合には、変換処理部41Aを選択し、色変換部21の処理対象が第2の画素である場合には、変換処理部41Bを選択する。   The image processing apparatus 1 according to the present embodiment includes a selection unit 40 arranged in the preceding stage of the color conversion unit 21. In addition, the color conversion unit 21 defines pixels including cells of a plurality of colors in the honeycomb arrangement in the RAW image, and executes the color conversion process in units of pixels. Here, in the pixel to be processed by the color conversion unit 21, the arrangement of the cells of each color in the pixel is the first pixel (for example, the pixel G00 in FIG. 4) which is the first arrangement pattern, and the first A second pixel that is a second arrangement pattern different from the arrangement pattern (for example, pixel G10 in FIG. 4) is included. Further, the color conversion unit 21 includes a conversion processing unit 41A that executes color conversion processing based on a first arithmetic expression (for example, FIG. 16B), and a second arithmetic expression (for example, FIG. 17B). ) Based on the color conversion processing unit 41B. Here, the second arithmetic expression is an arithmetic expression such that the position of the signal value of each color cell is equivalently equal to that in the first arithmetic expression. The selection unit 40 selects the conversion processing unit 41A when the processing target of the color conversion unit 21 is the first pixel, and when the processing target of the color conversion unit 21 is the second pixel. The conversion processor 41B is selected.

従って、本実施の形態によれば、色変換部21内に変換処理部41A及び変換処理部41Bを設け、処理対象に応じて一方を選択するという簡易な手法によって、第1及び第2の画素の双方に関して、画素内における各色のセルの配置パターンの相違を考慮した適切な色変換処理を実行することができる。その結果、符号化効率の劣化が生じる可能性を回避することができる。   Therefore, according to the present embodiment, the first and second pixels are obtained by a simple method of providing the conversion processing unit 41A and the conversion processing unit 41B in the color conversion unit 21 and selecting one according to the processing target. In both cases, it is possible to execute appropriate color conversion processing in consideration of the difference in the arrangement pattern of the cells of each color in the pixel. As a result, it is possible to avoid the possibility that the encoding efficiency is deteriorated.

なお、変換処理部41Aと変換処理部41Bとは、一部の要素(例えば演算部13A,13B)を共有する構成とすることもできる。   Note that the conversion processing unit 41A and the conversion processing unit 41B may be configured to share some elements (for example, the calculation units 13A and 13B).

<第4の実施の形態>
図20は、画素の規定の第1の例を示す図である。各画素には、あるセル行に属する青色セル(B)と、その下のセル行に属する緑色セル(Gr)及び緑色セル(Gb)と、その下のセル行に属する赤色セル(R)とが含まれている。その結果、各画素において、上が青色セル(B)、左が緑色セル(Gr)、右が緑色セル(Gb)、下が赤色セル(R)となる。
<Fourth embodiment>
FIG. 20 is a diagram illustrating a first example of pixel definition. Each pixel includes a blue cell (B) belonging to a certain cell row, a green cell (Gr) and a green cell (Gb) belonging to the cell row below, and a red cell (R) belonging to the cell row below the cell. It is included. As a result, in each pixel, the top is a blue cell (B), the left is a green cell (Gr), the right is a green cell (Gb), and the bottom is a red cell (R).

図21は、本発明の第4の実施の形態に係る画像処理装置1の構成の一部を示すブロック図である。バッファメモリ11と色変換部21との間に、補完処理部50が接続されている。補完処理部50は、画素平面の周縁部において一画素内のセル数が不足する画素を対象として、不足のセルに関する信号値を補完して、補完後の信号S1bを色変換部21に入力する。   FIG. 21 is a block diagram showing a part of the configuration of the image processing apparatus 1 according to the fourth embodiment of the present invention. A complement processing unit 50 is connected between the buffer memory 11 and the color conversion unit 21. The complement processing unit 50 complements the signal value related to the insufficient cell for pixels where the number of cells in one pixel is insufficient at the peripheral portion of the pixel plane, and inputs the complemented signal S1b to the color conversion unit 21. .

補完処理の第1の例として、補完処理部50は、不足のセルの近傍に位置するセルに関する信号値を用いた演算によって、不足のセルに関する信号値を補完する。   As a first example of the complement processing, the complement processing unit 50 supplements the signal value related to the insufficient cell by calculation using the signal value related to the cell located in the vicinity of the insufficient cell.

図20を参照して、例えば、画素G20に関しては、緑色セル(Gr)に関する信号値が不足している。そこで、補完処理部50は、画素G20内の緑色セル(Gb)に関する信号値を、画素G20内の緑色セル(Gr)に関する信号値として補完する。   Referring to FIG. 20, for example, regarding the pixel G20, the signal value relating to the green cell (Gr) is insufficient. Therefore, the complement processing unit 50 supplements the signal value related to the green cell (Gb) in the pixel G20 as the signal value related to the green cell (Gr) in the pixel G20.

また、例えば、画素G01に関しては、青色セル(B)に関する信号値、緑色セル(Gr)に関する信号値、及び緑色セル(Gb)に関する信号値が不足している。そこで、補完処理部50は、画素G10内の青色セル(B)に関する信号値と、画素G11内の青色セル(B)に関する信号値との平均値を算出し、その値を、画素G01内の青色セル(B)に関する信号値として補完する。また、補完処理部50は、画素G10内の緑色セル(Gb)に関する信号値を、画素G01内の緑色セル(Gr)に関する信号値として補完し、画素G11内の緑色セル(Gr)に関する信号値を、画素G01内の緑色セル(Gb)に関する信号値として補完する。   For example, for the pixel G01, the signal value for the blue cell (B), the signal value for the green cell (Gr), and the signal value for the green cell (Gb) are insufficient. Therefore, the complement processing unit 50 calculates an average value of the signal value related to the blue cell (B) in the pixel G10 and the signal value related to the blue cell (B) in the pixel G11, and the value is calculated as the value in the pixel G01. It complements as a signal value regarding a blue cell (B). The complement processing unit 50 complements the signal value related to the green cell (Gb) in the pixel G10 as the signal value related to the green cell (Gr) in the pixel G01, and the signal value related to the green cell (Gr) in the pixel G11. Is supplemented as a signal value relating to the green cell (Gb) in the pixel G01.

また、例えば、画素G00に関しては、青色セル(B)に関する信号値、緑色セル(Gr)に関する信号値、及び緑色セル(Gb)に関する信号値が不足している。そこで、補完処理部50は、画素G10内の青色セル(B)に関する信号値を、画素G00内の青色セル(B)に関する信号値として補完する。また、補完処理部50は、画素G10内の緑色セル(Gr)に関する信号値を、画素G00内の緑色セル(Gr)及び緑色セル(Gb)に関する各信号値として補完する。   For example, for the pixel G00, the signal value for the blue cell (B), the signal value for the green cell (Gr), and the signal value for the green cell (Gb) are insufficient. Therefore, the complement processing unit 50 supplements the signal value related to the blue cell (B) in the pixel G10 as the signal value related to the blue cell (B) in the pixel G00. In addition, the complement processing unit 50 supplements the signal value related to the green cell (Gr) in the pixel G10 as each signal value related to the green cell (Gr) and the green cell (Gb) in the pixel G00.

補完処理の第2の例として、補完処理部50は、所定値を用いて、不足のセルに関する信号値を補完する。   As a second example of the complement processing, the complement processing unit 50 supplements signal values related to the insufficient cells using a predetermined value.

例えば、信号値が256階調で表される場合には、中間の第128階調の値を、全ての不足セルの信号値として補完する。   For example, when the signal value is represented by 256 gradations, the intermediate 128th gradation value is complemented as the signal values of all the insufficient cells.

また、例えば、各画素内の赤色セル(R)の信号値を、その画素内の全ての不足セルの信号値として補完する。   Further, for example, the signal value of the red cell (R) in each pixel is complemented as the signal value of all the insufficient cells in that pixel.

図22は、画素の規定の第2の例を示す図である。各画素には、あるセル行に属する赤色セル(R)及び青色セル(B)と、その下のセル行に属する緑色セル(Gr)及び緑色セル(Gb)とが含まれている。その結果、各画素において、左上が赤色セル(R)、右上が青色セル(B)、左下が緑色セル(Gr)、右下が緑色セル(Gb)となる。不足セルの補完については、上記と同様である。   FIG. 22 is a diagram illustrating a second example of pixel definition. Each pixel includes a red cell (R) and a blue cell (B) belonging to a certain cell row, and a green cell (Gr) and a green cell (Gb) belonging to a cell row below the pixel. As a result, in each pixel, the upper left is a red cell (R), the upper right is a blue cell (B), the lower left is a green cell (Gr), and the lower right is a green cell (Gb). The shortage cell compensation is the same as described above.

図23は、画素の規定の第3の例を示す図である。各画素には、あるセル行に属する赤色セル(R)と、その下のセル行に属する緑色セル(Gr)と、その下のセル行に属する青色セル(B)と、その下のセル行に属する緑色セル(Gb)とが含まれている。その結果、各画素において、左上が赤色セル(R)、右上が緑色セル(Gr)、左下が青色セル(B)、右下が緑色セル(Gb)となる。不足セルの補完については、上記と同様である。   FIG. 23 is a diagram illustrating a third example of pixel definition. Each pixel has a red cell (R) belonging to a certain cell row, a green cell (Gr) belonging to the cell row below it, a blue cell (B) belonging to the cell row below it, and a cell row below it And a green cell (Gb) belonging to. As a result, in each pixel, the upper left is a red cell (R), the upper right is a green cell (Gr), the lower left is a blue cell (B), and the lower right is a green cell (Gb). The shortage cell compensation is the same as described above.

本実施の形態に係る色変換部21は、画素内における各色のセルの配置が単一の配置パターンとなるように、RAW画像内に画素を規定する。従って、RAW画像内の全ての画素において、各色のセルの配置パターンが同一となる。従って、第1の実施の形態のようなパラメータの設定変更や、第2の実施の形態のような並び替え処理や、第3の実施の形態のような変換処理部41A,41Bの切り換え処理を行うことなく、画素内における各色のセルの配置パターンの相違を考慮した適切な色変換処理を、全ての画素に関して実行することができる。その結果、符号化効率の劣化が生じる可能性を回避することができる。   The color conversion unit 21 according to the present embodiment defines the pixels in the RAW image so that the arrangement of the cells of each color in the pixel becomes a single arrangement pattern. Accordingly, the arrangement pattern of the cells of each color is the same for all the pixels in the RAW image. Therefore, parameter setting change as in the first embodiment, rearrangement processing as in the second embodiment, and switching processing of the conversion processing units 41A and 41B as in the third embodiment are performed. Without performing, an appropriate color conversion process considering the difference in the arrangement pattern of the cells of each color in the pixel can be executed for all the pixels. As a result, it is possible to avoid the possibility that the encoding efficiency is deteriorated.

また、補完処理の第1の例によれば、演算によって高精度の補完を行うことにより、圧縮効率を上げることができる。   Further, according to the first example of the complementing process, the compression efficiency can be increased by performing the highly accurate complementing by calculation.

また、補完処理の第2の例によれば、演算を行わず、所定値を用いて補完を行うことにより、処理負荷の軽減を図ることができる。   Moreover, according to the 2nd example of a complementation process, a process load can be reduced by performing complementation using a predetermined value, without calculating.

<デコーダ3への情報の受け渡しについて>
図24は、色変換部21から出力される画素信号S2を示す図である。画素信号S2は、ヘッダ部Hとペイロード部Pとを有している。ヘッダ部Hには、色変換部21によるRAW画像内における画素の規定に関する情報、つまり、RAW画像内にどのようなパターン(切り出し方)で画素を規定したのかについての情報が、データD1として記述されている。また、ヘッダ部Hには、画素内における各色のセルの位置に関する情報、つまり、画素内のどの信号値がどの色に対応するのかについての情報が、データD2として記述されている。図1を参照して、色変換部21によって信号S2のヘッダ部Hに付加されたデータD1,D2は、信号S3〜S12に付随して、色逆変換部31に受け渡される。
<About passing information to the decoder 3>
FIG. 24 is a diagram illustrating the pixel signal S2 output from the color conversion unit 21. The pixel signal S2 has a header portion H and a payload portion P. In the header portion H, information relating to the definition of pixels in the RAW image by the color conversion portion 21, that is, information regarding what pattern (cutting-out method) the pixels are defined in the RAW image is described as data D1. Has been. Further, in the header portion H, information on the position of each color cell in the pixel, that is, information on which signal value in the pixel corresponds to which color is described as data D2. Referring to FIG. 1, data D1 and D2 added to the header portion H of the signal S2 by the color conversion unit 21 are delivered to the color reverse conversion unit 31 along with the signals S3 to S12.

図25は、色逆変換部31が色逆変換処理を実行するための演算式を示す図である。色逆変換部31は、ポストフィルタ32から入力されたYUVK色空間の画素信号S12を、図25に示した演算式に基づいて、RGrGbB色空間の画素信号S13に変換する。また、色逆変換部31は、データD1,D2に基づいて、画素平面の適切な位置に適切な色を当てはめることにより、ハニカム配列のRAW画像を再現する。これにより、原画像を適切に再現することが可能となる。   FIG. 25 is a diagram illustrating an arithmetic expression for the color reverse conversion unit 31 to execute the color reverse conversion process. The color inverse conversion unit 31 converts the pixel signal S12 in the YUVK color space input from the post filter 32 into the pixel signal S13 in the RGrGbB color space based on the arithmetic expression shown in FIG. Further, the color reverse conversion unit 31 reproduces a RAW image having a honeycomb arrangement by applying an appropriate color to an appropriate position on the pixel plane based on the data D1 and D2. This makes it possible to appropriately reproduce the original image.

本発明の第1の実施の形態に係る画像処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus according to a first embodiment of the present invention. ハニカム配列の撮像素子によって取得されたRAW画像を示す図である。It is a figure which shows the RAW image acquired by the image pick-up element of a honeycomb arrangement | sequence. 図2と同様のRAW画像を示す図である。It is a figure which shows the same RAW image as FIG. 画素の規定の第1の例を示す図である。It is a figure which shows the 1st example of prescription | regulation of a pixel. 色変換部の構成を概略的に示す図である。It is a figure which shows the structure of a color conversion part roughly. 演算部が演算によって色変換処理を実行するための演算式を示す図である。It is a figure which shows the computing equation for a calculating part to perform a color conversion process by a calculation. レジスタへのパラメータの設定例を示す図である。It is a figure which shows the example of a parameter setting to a register. HD Photoにおける、RGrGbB色空間からYUVK色空間への変換式を示す図である。It is a figure which shows the conversion formula from RGrGbB color space to YUVK color space in HD Photo. 画素の規定の第2の例を示す図である。It is a figure which shows the 2nd example of prescription | regulation of a pixel. レジスタへのパラメータの設定例を示す図である。It is a figure which shows the example of a parameter setting to a register. 本発明の第2の実施の形態に係る画像処理装置の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of the image processing apparatus which concerns on the 2nd Embodiment of this invention. 色変換部が有するレジスタの第1の例を示す図である。It is a figure which shows the 1st example of the register | resistor which a color conversion part has. 色変換部が有するレジスタの第2の例を示す図である。It is a figure which shows the 2nd example of the register | resistor which a color conversion part has. 第2の実施の形態の変形例を示す図である。It is a figure which shows the modification of 2nd Embodiment. 本発明の第3の実施の形態に係る画像処理装置の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of the image processing apparatus which concerns on the 3rd Embodiment of this invention. 変換処理部の構成の第1の例を概略的に示す図である。It is a figure which shows roughly the 1st example of a structure of a conversion process part. 変換処理部の構成の第1の例を概略的に示す図である。It is a figure which shows roughly the 1st example of a structure of a conversion process part. 変換処理部の構成の第2の例を概略的に示す図である。It is a figure which shows schematically the 2nd example of a structure of a conversion process part. 変換処理部の構成の第2の例を概略的に示す図である。It is a figure which shows schematically the 2nd example of a structure of a conversion process part. 画素の規定の第1の例を示す図である。It is a figure which shows the 1st example of prescription | regulation of a pixel. 本発明の第4の実施の形態に係る画像処理装置の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of the image processing apparatus which concerns on the 4th Embodiment of this invention. 画素の規定の第2の例を示す図である。It is a figure which shows the 2nd example of prescription | regulation of a pixel. 画素の規定の第3の例を示す図である。It is a figure which shows the 3rd example of prescription | regulation of a pixel. 色変換部から出力される画素信号を示す図である。It is a figure which shows the pixel signal output from a color conversion part. 色逆変換部が色逆変換処理を実行するための演算式を示す図である。It is a figure which shows the computing equation for a color reverse conversion part to perform a color reverse conversion process.

符号の説明Explanation of symbols

1 画像処理装置
2 エンコーダ
3 デコーダ
10 撮像素子
13,13A,13B 演算部
15 並び替え処理部
21 色変換部
31 色逆変換部
40 選択部
41A,41B 変換処理部
50 補完処理部
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Encoder 3 Decoder 10 Image pick-up element 13,13A, 13B calculating part 15 Rearrangement process part 21 Color conversion part 31 Color reverse conversion part 40 Selection part 41A, 41B Conversion process part 50 Complementary process part

Claims (7)

ハニカム配列の撮像素子によって取得された第1の色空間の信号を、所定の演算式に基づいて第2の色空間の信号に変換する色変換部を備え、
前記色変換部は、ハニカム配列における複数色のセルを含む画素を規定して、画素単位で色変換処理を実行し、
前記色変換部の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素と、第2の配置パターンである第2の画素とが含まれ、
前記演算式においては、各セルの信号値をパラメータとして設定可能であり、
前記色変換部は、前記第1の画素を処理する場合には、第1のパラメータを設定し、前記第2の画素を処理する場合には、前記演算式内における各色のセルの信号値の位置が、前記第1の画素に関するそれと等しくなるような、第2のパラメータを設定する、画像処理装置。
A color conversion unit that converts a signal in the first color space acquired by the image pickup device having the honeycomb arrangement into a signal in the second color space based on a predetermined arithmetic expression;
The color conversion unit defines pixels including cells of a plurality of colors in the honeycomb arrangement, and performs a color conversion process in units of pixels.
The pixel that is the processing target of the color conversion unit includes a first pixel that is a first arrangement pattern and a second pixel that is a second arrangement pattern in the arrangement of cells of each color in the pixel. And
In the arithmetic expression, the signal value of each cell can be set as a parameter,
The color conversion unit sets the first parameter when processing the first pixel, and sets the signal value of the cell of each color in the arithmetic expression when processing the second pixel. An image processing apparatus, wherein a second parameter is set such that a position is equal to that of the first pixel.
ハニカム配列の撮像素子によって取得された第1の色空間の信号を第2の色空間の信号に変換する色変換部と、
前記第1の色空間の信号が前記色変換部に入力される前に、前記第1の色空間の信号を並び替える、並び替え処理部と
を備え、
前記色変換部は、ハニカム配列における複数色のセルを含む画素を規定して、画素単位で色変換処理を実行し、
前記色変換部の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素と、第2の配置パターンである第2の画素とが含まれ、
前記並び替え処理部は、前記色変換部の処理対象が前記第1の画素である場合には、並び替え処理を実行せず、前記色変換部の処理対象が前記第2の画素である場合には、画素内における各色のセルの信号値の位置が前記第1の画素に関するそれと等しくなるように、並び替え処理を実行する、画像処理装置。
A color conversion unit that converts a signal in the first color space acquired by the image sensor with the honeycomb arrangement into a signal in the second color space;
A rearrangement processing unit that rearranges the signals of the first color space before the signals of the first color space are input to the color conversion unit;
The color conversion unit defines pixels including cells of a plurality of colors in the honeycomb arrangement, and performs a color conversion process in units of pixels.
The pixel that is the processing target of the color conversion unit includes a first pixel that is a first arrangement pattern and a second pixel that is a second arrangement pattern in the arrangement of cells of each color in the pixel. And
The rearrangement processing unit does not execute the rearrangement processing when the processing target of the color conversion unit is the first pixel, and the processing target of the color conversion unit is the second pixel. The image processing apparatus executes rearrangement processing so that the position of the signal value of the cell of each color in the pixel is equal to that of the first pixel.
ハニカム配列の撮像素子によって取得された第1の色空間の信号を第2の色空間の信号に変換する色変換部と、
前記色変換部の前段に配置された選択部と
を備え、
前記色変換部は、ハニカム配列における複数色のセルを含む画素を規定して、画素単位で色変換処理を実行し、
前記色変換部の処理対象である画素には、画素内における各色のセルの配置が、第1の配置パターンである第1の画素と、第2の配置パターンである第2の画素とが含まれ、
前記色変換部は、
第1の演算式に基づいて色変換処理を実行する第1の変換処理部と、
各色のセルの信号値の位置が、等価的に前記第1の演算式におけるそれと等しくなるような、第2の演算式に基づいて、色変換処理を実行する第2の変換処理部と
を有し、
前記選択部は、前記色変換部の処理対象が前記第1の画素である場合には、前記第1の変換処理部を選択し、前記色変換部の処理対象が前記第2の画素である場合には、前記第2の変換処理部を選択する、画像処理装置。
A color conversion unit that converts a signal in the first color space acquired by the image sensor with the honeycomb arrangement into a signal in the second color space;
A selection unit arranged in front of the color conversion unit,
The color conversion unit defines pixels including cells of a plurality of colors in the honeycomb arrangement, and performs a color conversion process in units of pixels.
The pixel that is the processing target of the color conversion unit includes a first pixel that is a first arrangement pattern and a second pixel that is a second arrangement pattern in the arrangement of cells of each color in the pixel. And
The color converter is
A first conversion processing unit that executes color conversion processing based on the first arithmetic expression;
And a second conversion processing unit that executes color conversion processing based on the second arithmetic expression such that the position of the signal value of each color cell is equivalently equal to that in the first arithmetic expression. And
The selection unit selects the first conversion processing unit when the processing target of the color conversion unit is the first pixel, and the processing target of the color conversion unit is the second pixel. In this case, the image processing apparatus selects the second conversion processing unit.
ハニカム配列の撮像素子によって取得された第1の色空間の信号を第2の色空間の信号に変換する色変換部を備え、
前記色変換部は、ハニカム配列における複数色のセルを含む画素を規定して、画素単位で色変換処理を実行し、
前記色変換部は、画素内における各色のセルの配置が単一の配置パターンとなるように画素を規定する、画像処理装置。
A color conversion unit that converts a signal in the first color space acquired by the image sensor with the honeycomb arrangement into a signal in the second color space;
The color conversion unit defines pixels including cells of a plurality of colors in the honeycomb arrangement, and performs a color conversion process in units of pixels.
The color conversion unit is an image processing apparatus that defines pixels so that the arrangement of cells of each color in a pixel is a single arrangement pattern.
画素平面の周縁部において一画素内のセル数が不足する画素を対象として、不足のセルに関する信号値を補完する補完処理部をさらに備え、
前記補完処理部は、前記不足のセルの近傍に位置するセルに関する信号値を用いた演算によって、前記不足のセルに関する信号値を補完する、請求項4に記載の画像処理装置。
For a pixel in which the number of cells in one pixel is insufficient at the periphery of the pixel plane, the image processing apparatus further includes a complement processing unit that complements a signal value related to the insufficient cell,
The image processing apparatus according to claim 4, wherein the complement processing unit complements the signal value related to the insufficient cell by a calculation using a signal value related to a cell located in the vicinity of the insufficient cell.
画素平面の周縁部において一画素内のセル数が不足する画素を対象として、不足のセルに関する信号値を補完する補完処理部をさらに備え、
前記補完処理部は、所定値を用いて、前記不足のセルに関する信号値を補完する、請求項4に記載の画像処理装置。
For a pixel in which the number of cells in one pixel is insufficient at the periphery of the pixel plane, the image processing apparatus further includes a complement processing unit that complements a signal value related to the insufficient cell,
The image processing apparatus according to claim 4, wherein the complement processing unit supplements a signal value related to the insufficient cell using a predetermined value.
前記色変換部からは、画素の規定に関する情報と、画素内における各色のセルの位置に関する情報とがヘッダ部に含まれた、第2の色空間の信号が出力される、請求項1〜6のいずれか一つに記載の画像処理装置。   The color conversion unit outputs a signal of a second color space in which information on the definition of the pixel and information on the position of each color cell in the pixel are included in the header unit. The image processing apparatus according to any one of the above.
JP2008204739A 2008-08-07 2008-08-07 Image processing device Active JP4963690B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008204739A JP4963690B2 (en) 2008-08-07 2008-08-07 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008204739A JP4963690B2 (en) 2008-08-07 2008-08-07 Image processing device

Publications (2)

Publication Number Publication Date
JP2010041612A JP2010041612A (en) 2010-02-18
JP4963690B2 true JP4963690B2 (en) 2012-06-27

Family

ID=42013638

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008204739A Active JP4963690B2 (en) 2008-08-07 2008-08-07 Image processing device

Country Status (1)

Country Link
JP (1) JP4963690B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4302855B2 (en) * 2000-04-06 2009-07-29 富士フイルム株式会社 Image processing method and apparatus, and recording medium
JP3736455B2 (en) * 2001-12-27 2006-01-18 コニカミノルタフォトイメージング株式会社 Solid-state image pickup device and image pickup apparatus including the same
JP3961975B2 (en) * 2003-03-20 2007-08-22 富士フイルム株式会社 Signal processing apparatus and digital camera
JP2006094194A (en) * 2004-09-24 2006-04-06 Fuji Photo Film Co Ltd Signal processing device and method therefor

Also Published As

Publication number Publication date
JP2010041612A (en) 2010-02-18

Similar Documents

Publication Publication Date Title
JP5711098B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, and programs thereof
KR20210127157A (en) Deriving parameters for intra prediction
WO2012115420A2 (en) Intra-prediction method using filtering, and apparatus using the method
KR20210126009A (en) Neighbor sample selection for intra prediction
WO2020258010A1 (en) Image encoding method, image decoding method, encoder, decoder and storage medium
JP2007150913A (en) Image encoding device
JP4704333B2 (en) Image encoding device, image decoding device, and integrated circuit used in the same
JP4992117B2 (en) Image processing device
JP2013090120A (en) Image coding method, image decoding method, image coder, image decoder, and program thereof
JP2009231914A (en) Decoding apparatus, decoding processing method, and program
JP5995622B2 (en) Moving picture coding apparatus, moving picture coding method, and program
JP4919231B2 (en) Image processing device
JP4963690B2 (en) Image processing device
US20190238832A1 (en) Image processing device
JP5528914B2 (en) Image processing device
US8204342B2 (en) Image processor
JP5061330B2 (en) Image processing device
JP4900721B2 (en) Image processing device
JP2011142699A (en) Image encoding apparatus, and image encoding method
JP6890993B2 (en) Image coding device, image decoding device, its control method, and control program
JP4963681B2 (en) Image processing device
JP5240916B2 (en) Image processing device
JP5235818B2 (en) Moving picture coding apparatus, moving picture coding apparatus control method, and program
JP5240935B2 (en) Image processing device
JP5289284B2 (en) Image decoding device

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20110621

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110801

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120308

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120326

R150 Certificate of patent or registration of utility model

Ref document number: 4963690

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150406

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250