JP2007158524A - Image coding apparatus and method - Google Patents

Image coding apparatus and method Download PDF

Info

Publication number
JP2007158524A
JP2007158524A JP2005348073A JP2005348073A JP2007158524A JP 2007158524 A JP2007158524 A JP 2007158524A JP 2005348073 A JP2005348073 A JP 2005348073A JP 2005348073 A JP2005348073 A JP 2005348073A JP 2007158524 A JP2007158524 A JP 2007158524A
Authority
JP
Japan
Prior art keywords
image
motion vector
motion
pixel
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.)
Withdrawn
Application number
JP2005348073A
Other languages
Japanese (ja)
Inventor
Masaru Kamiya
賢 神谷
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to JP2005348073A priority Critical patent/JP2007158524A/en
Publication of JP2007158524A publication Critical patent/JP2007158524A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Color Television Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image coding apparatus which hardly causes noises, and the scale of hardware of which is small, in the case of image compression, and which needs a reduced computational complexity, and to provide an image coding method. <P>SOLUTION: The image coding apparatus for a moving picture of a primary color filter image using image filters for extracting a plurality of pixel blocks from blocks each comprising N×N pixels of an image array by color components through the separation of the blocks by color components by using color filters and thereafter coding the pixel blocks is characterized by including: a motion detection means for applying motion detection to each of the pixel blocks in terms of 1×1 point and extracting a motion vector; and a compression means for compressing the moving picture on the basis of the motion vector. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、イメージフィルタ原色フィルタ画像の動画像の圧縮を行う画像符号化装置及び画像符号化方法に関する。   The present invention relates to an image encoding apparatus and an image encoding method for compressing a moving image of an image filter primary color filter image.

従来より、カプセル内視鏡等の医療に用いられる超小型カメラの画像を送信する装置において、撮影した動画像を圧縮するにあたり様々な方法が提案されてきた。例えば、特許文献1の圧縮技術がある。特許文献1に示される圧縮技術では、イメージアレイから得られた画像信号をデジタル信号に変換し、そして4×4画素RGB成分抽出回路により色成分ごとに4×4の画素ブロックに変換し、変換回路により各ブロックに対して2次元離散コサイン変換を施したのち、量子化回路により量子化を行う。その後、AC係数に対してはゼロレングス圧縮をハフマン符号化回路より行い、ゼロでないAC係数及びDC係数に対してはハフマン符号化回路により可変長符号化を行うものである。
特開2005−217896号公報
Conventionally, various methods have been proposed for compressing a captured moving image in an apparatus for transmitting an image of a micro camera used for medical treatment such as a capsule endoscope. For example, there is a compression technique disclosed in Patent Document 1. In the compression technique disclosed in Patent Document 1, an image signal obtained from an image array is converted into a digital signal, and converted into a 4 × 4 pixel block for each color component by a 4 × 4 pixel RGB component extraction circuit. A two-dimensional discrete cosine transform is performed on each block by a circuit, and then quantization is performed by a quantization circuit. Thereafter, zero length compression is performed on the AC coefficient by the Huffman coding circuit, and variable length coding is performed on the non-zero AC coefficient and DC coefficient by the Huffman coding circuit.
JP 2005-217896 A

しかしながら、従来の画像符号化装置の圧縮技術では、2次元離散コサイン変換や動き検出等のハードウェアの規模が大きくなり、計算量も大きいことから、医療用等で用いられる超小型カメラ等に実装することが困難である。   However, the compression technology of the conventional image encoding device increases the scale of hardware such as two-dimensional discrete cosine transform and motion detection, and the amount of calculation is large. Therefore, it is mounted on a micro camera used for medical purposes. Difficult to do.

本発明は、このような事情に鑑みてなされたもので、画像圧縮にあたりノイズを生じにくく、ハードウェアの規模が小さく計算量が少ない画像符号化装置及び画像符号化方法を提供することにある。   The present invention has been made in view of such circumstances, and it is an object of the present invention to provide an image encoding apparatus and an image encoding method that are less likely to generate noise during image compression, have a small hardware scale, and a small amount of calculation.

請求項1記載の画像符号化装置は、画素ブロックに1×1点で動き検出を行い動きベクトルを抽出する動き検出手段と、動きベクトルを元に該動画像を圧縮する圧縮手段とを備えることを特徴とする。   The image coding apparatus according to claim 1, further comprising: a motion detection unit that performs motion detection on a pixel block at 1 × 1 point and extracts a motion vector; and a compression unit that compresses the moving image based on the motion vector. It is characterized by.

請求項2記載の画像符号化装置は、圧縮手段として動き補償予測符号化の圧縮を用いることを特徴とする。   The image coding apparatus according to claim 2 is characterized in that compression of motion compensated prediction coding is used as the compression means.

請求項3記載の画像符号化装置は、動き検出手段が、圧縮対象画像のある画素とその近傍の参照画像とで差分をとることで動きベクトルを抽出することを特徴とする。   The image coding apparatus according to claim 3 is characterized in that the motion detection means extracts a motion vector by taking a difference between a pixel of a compression target image and a reference image in the vicinity thereof.

請求項4記載の画像符号化装置は、動きベクトルが、画素ブロックの所定範囲内のマクロブロック自体の動きベクトルと、マクロブロック内の画素の動きベクトルとでなることを特徴とする。   The image encoding apparatus according to claim 4 is characterized in that the motion vector is a motion vector of a macroblock itself within a predetermined range of the pixel block and a motion vector of a pixel in the macroblock.

請求項5記載の画像符号化装置は、動き検出手段が、1つの赤(R)、2つの緑(G1、G2)、1つの青(B)の前記画素ブロックの色成分に対して同時に動き検出を行うことを特徴とする。   6. The image encoding apparatus according to claim 5, wherein the motion detection means moves simultaneously with respect to the color components of the pixel block of one red (R), two green (G1, G2), and one blue (B). The detection is performed.

請求項6記載の画像符号化方法は、画素ブロックに1×1点で動き検出を行い動きベクトルを抽出し、動きベクトルを元に該動画像を圧縮することを特徴とする。   The image encoding method according to claim 6 is characterized in that motion detection is performed on a pixel block at 1 × 1 point to extract a motion vector, and the moving image is compressed based on the motion vector.

請求項7記載の画像符号化方法は、圧縮として動き補償予測符号化の圧縮を用いることを特徴とする。   The image encoding method according to claim 7 is characterized in that compression of motion compensated prediction encoding is used as compression.

請求項8記載の画像符号化方法は、動き検出が、圧縮対象画像のある画素とその近傍の参照画像とで差分をとることで動きベクトルを抽出することを特徴とする。   The image encoding method according to claim 8 is characterized in that the motion detection extracts a motion vector by taking a difference between a pixel of a compression target image and a reference image in the vicinity thereof.

請求項9記載の画像符号化方法は、動きベクトルが、画素ブロックの所定範囲内のマクロブロック自体の動きベクトルと、マクロブロック内の画素の動きベクトルとでなることを特徴とする。   The image coding method according to claim 9 is characterized in that the motion vector is a motion vector of the macroblock itself within a predetermined range of the pixel block and a motion vector of the pixel in the macroblock.

請求項10記載の画像符号化方法は、動き検出が、1つの赤(R)、2つの緑(G1、G2)、1つの青(B)の画素ブロックの色成分に対して同時に動き検出を行うことを特徴とする。   The image coding method according to claim 10, wherein the motion detection is performed simultaneously on the color components of one red (R), two green (G 1, G 2), and one blue (B) pixel block. It is characterized by performing.

本発明によれば、画素ブロックに1×1点で動き検出を行い動きベクトルを抽出する動き検出手段と、動きベクトルを元に該動画像を圧縮する圧縮手段とを備え画像を圧縮することで、画像圧縮にあたりノイズを生じにくく、ハードウェアの規模が小さく計算量が少なく抑えることができる。   According to the present invention, the image is compressed by including a motion detection unit that performs motion detection on the pixel block at 1 × 1 point and extracts a motion vector, and a compression unit that compresses the moving image based on the motion vector. In addition, it is difficult to generate noise in image compression, the hardware scale is small, and the amount of calculation can be reduced.

以下、本発明の形態について図面を参照しながら具体的に説明する。本発明の形態における画像符号化装置は、カラーフィルタを用いるイメージアレイのN×N画素よりなるブロックから色成分ごとに分けて複数の画素ブロックを抽出した後符号化を行うイメージフィルタ原色フィルタ画像の動画像の圧縮を行うものである。   Hereinafter, embodiments of the present invention will be specifically described with reference to the drawings. An image coding apparatus according to an embodiment of the present invention is an image filter primary color filter image that performs coding after extracting a plurality of pixel blocks separately for each color component from a block composed of N × N pixels of an image array using a color filter. The moving image is compressed.

図1は、本発明に係る画像符号化装置の一例を示す構成図である。図2は、同画像符号化装置のカラーフィルタの説明図である。図3は、同画像符号化方法の動作を示す説明図である。図4は、同画像符号化方法を示す構成図である。図5は、同画像符号化方法の動作を示すフローチャートである。図6〜図12は、同画像符号化方法の動作を示す説明図である。   FIG. 1 is a block diagram showing an example of an image encoding device according to the present invention. FIG. 2 is an explanatory diagram of a color filter of the image coding apparatus. FIG. 3 is an explanatory diagram showing the operation of the image coding method. FIG. 4 is a block diagram showing the image encoding method. FIG. 5 is a flowchart showing the operation of the image encoding method. 6 to 12 are explanatory diagrams showing the operation of the image coding method.

本実施例の画像符号化装置は、図1に示すように、単板カラー方式のイメージセンサは、撮像部の上に、モザイク上の配列のカラーフィルタ5を配置し、赤(以下R)、緑(以下G)、青(以下B)のカラー信号を得ている。具体的には、撮像部5の信号を垂直スキャナ12及びノイズキャンセル回路14を介して水平スキャナ16で出力させ、増幅器18を介してA/D変換器20でデジタル化し、バッフメモリ24及び予測差分符号化回路26を介して出力させている。ひとつの画素には1色のみのカラーフィルタしか使うことができないので、それぞれ欠けている色は、色補間処理により欠けている色を計算して推定している(以下補間した画像をビットマップ画像と呼ぶ)。実際には、図2(a)に示すカラーフィルタを用いるイメージアレイのN×N画素よりなるブロックから色成分ごとに分けて、図2(b)に示す複数の画素ブロックを抽出した後符号化を行う。 As shown in FIG. 1, in the image coding apparatus of the present embodiment, a single-plate color type image sensor has a mosaic arrangement of color filters 5 on an imaging unit, and red (hereinafter R), Green (hereinafter G) and blue (hereinafter B) color signals are obtained. Specifically, the signal of the imaging unit 5 is output by the horizontal scanner 16 via the vertical scanner 12 and the noise cancellation circuit 14, digitized by the A / D converter 20 via the amplifier 18, and the buffer memory 24 and the prediction difference code are output. The output is made via the conversion circuit 26. Since only one color filter can be used for one pixel, each missing color is estimated by calculating the missing color by color interpolation processing (hereinafter, the interpolated image is a bitmap image). Called). In fact, separated from the N H × N V pixels consisting block of an image array using a color filter shown in FIG. 2 (a) for each color component, after extracting a plurality of pixel blocks shown in FIG. 2 (b) Encoding is performed.

次に、本実施例の画像符号化装置の構成及び動作について説明する。概略は、図3に示すように、ベイヤーカラーフィルタの出力(a)を(b)のように並べ替えた後、1×1点の動き検出を行う。その結果を普通なら直交変換(DCT)するところを、行わないで、いきなり量子化して可変長符号化を行う。ブロック図で示すと、図4のようになる。図3、図4の内容をほかの図を参照しながら詳細に説明する。   Next, the configuration and operation of the image coding apparatus according to the present embodiment will be described. As shown in FIG. 3, the output (a) of the Bayer color filter is rearranged as shown in (b), and 1 × 1 point motion detection is performed. If the result is normal, orthogonal transform (DCT) is not performed, but suddenly quantization is performed and variable length coding is performed. A block diagram is shown in FIG. The contents of FIGS. 3 and 4 will be described in detail with reference to other drawings.

図1に示すように、ベイヤーカラーフィルタが付いている撮像部5からA/D変換器20によりA/D変換されてデジタル化された信号は、図2(a)のように並んでいた画像が、図2(b)のように並べ替えられてバッファメモリ24に読み出される。この画像信号は、補間処理やYUV表色系への色変換処理を経ずに、圧縮対象画像として扱われる。   As shown in FIG. 1, the signals digitized by A / D conversion by the A / D converter 20 from the imaging unit 5 having the Bayer color filter are arranged as shown in FIG. Are rearranged as shown in FIG. 2B and read out to the buffer memory 24. This image signal is treated as a compression target image without undergoing interpolation processing or color conversion processing to the YUV color system.

図5に動き補償予測符号化(標準圧縮方式でいうところのPピクチャ)を行うフローチャートを示す。まず、図5(a)では、画面全体をマクロブロックに分割し(S100)、1×1点の動き検出を行う(S101)。図5(b)1×1点の動き検出をフローチャートに示すが,1×1点の動き検出については後述する。   FIG. 5 shows a flowchart for performing motion compensation predictive coding (P picture in the standard compression method). First, in FIG. 5A, the entire screen is divided into macro blocks (S100), and 1 × 1 point motion detection is performed (S101). FIG. 5B shows the motion detection of 1 × 1 point in the flowchart, and the motion detection of 1 × 1 point will be described later.

1×1点の動き検出を行った後、マクロブロックのオフセットを計算する(S102)。オフセットとは、マクロブロックの移動量のことであり、1×1点の動き検出から求める。さらに、オフセットが加味されたマクロブロック内での画素の動きベクトルを1×1点の動き検出結果から求める(S103)。その後、動き補償を行う(S104)。予測差分画像は、DCTをかける必要がなくなるくらい隣り合う画素間の冗長性が排除されていると考えられるので、DCTを行わずに量子化され、可変符号化ビットを割り当ててLZ77法やレンジコーダにより符号化する(S105)。また、求めた動きベクトルにも可変長ビットを割当て(S106)、LZ77法やレンジコーダによって圧縮が完了する(S110)。これをすべてのマクロブロックについて行い、動き補償予測符号化(Pピクチャ)の圧縮は完了する。Iピクチャにおいては、カラーフィルタの出力を直接PNG方式や、LZ77法、レンジコーダなどで圧縮したものを用いる。   After detecting the motion of 1 × 1 point, the offset of the macroblock is calculated (S102). The offset is the amount of movement of the macroblock and is obtained from motion detection at 1 × 1 point. Further, the motion vector of the pixel in the macro block to which the offset is added is obtained from the motion detection result of 1 × 1 point (S103). Thereafter, motion compensation is performed (S104). Since the prediction difference image is considered to have eliminated redundancy between adjacent pixels so that it is not necessary to apply DCT, the prediction difference image is quantized without performing DCT and assigned with variable coding bits to perform the LZ77 method or the range coder. (S105). Also, variable length bits are assigned to the obtained motion vector (S106), and compression is completed by the LZ77 method or a range coder (S110). This is performed for all macroblocks, and the compression of motion compensation predictive coding (P picture) is completed. In the I picture, the color filter output directly compressed by the PNG method, the LZ77 method, a range coder or the like is used.

次に、図5(b)の1×1点の動き検出について説明する。1×1点の動き検出では、圧縮対象画像のある画素とその近傍の参照画像の画素で差分をとることで、数1で示す式の評価関数が最小になる画素を見つける。   Next, the 1 × 1 point motion detection in FIG. 5B will be described. In the 1 × 1 point motion detection, a difference between an image to be compressed and a reference image pixel in the vicinity thereof is found to find a pixel that minimizes the evaluation function expressed by the equation (1).

動きベクトルは、図6に示すように、R,G1、G2、Bの動きベクトルを同時に検索する。したがって、各色で同じ動きベクトルを持つことになる。また、輝度成分を利用しないで、R、G、B成分を利用して最小値Errminを評価する理由は、輝度でいくら最小値になっても、例えばRで必ず最小になるとは限らないからである。輝度は色の成分を含んでいないので、そのような偽最小値が生じてしまうためである。ここで、Rは参照画像を、R‘は圧縮対象画像を示している。GとG’やBとB‘についても同様である。G1、G2は、図2(b)で、ベイヤーのGをG1、G2の二画面分に分離したものである。そして、動きベクトルには一意のベクトル番号nを付ける。xとyの絶対値が小さい(x,y)の組み合わせから小さいベクトル番号nを付けておき、このベクトル番号nを可変長符号化する。R、G1、G2、Bを別々に動き検出しない理由は、圧縮すべき動きベクトルが4倍に増加してしまうからである。 As for the motion vector, as shown in FIG. 6, the motion vectors of R, G1, G2, and B are searched simultaneously. Therefore, each color has the same motion vector. Further, the reason why the minimum value Err min is evaluated using the R, G, and B components without using the luminance component is that the minimum value of luminance does not always become the minimum with R, for example. It is. This is because such a false minimum value is generated because the luminance does not include a color component. Here, R indicates a reference image, and R ′ indicates a compression target image. The same applies to G and G ′ and B and B ′. G1 and G2 are obtained by separating Bayer's G into two screens G1 and G2 in FIG. 2B. A unique vector number n is attached to the motion vector. A small vector number n is assigned from a combination of (x, y) having a small absolute value of x and y, and this vector number n is variable-length encoded. The reason why the motions of R, G1, G2, and B are not separately detected is that the motion vector to be compressed increases four times.

1×1点の動き検出で求められた動きベクトルを基にして、マクロブロックのオフセット(動きベクトル)と、マクロブロック内の画素の動きベクトルを求める方法について述べる(図7、図8)。まず、図7(a)の格子の中に書かれた数字は、図7(c)にあるように、動きベクトル(x,y)とそれに付けられたベクトル番号nである。図7(a)の格子の中の数字は、説明が分かりやすいように意図的に考えた数字である。ちなみに、図7(a)の斜めの矢印は、ベクトル番号nのベクトルが指す先を示している。このように、多数の画素で似たようなベクトルを持つことが多々ある。図7(c)に示したように、最も頻度が大きいのは9度数のベクトル番号2=(2,2)であり、これをマクロブロックの動きベクトルとして(OffSetX,OffSetY)=(2,2)を設定する。ところで、ここでのマクロブロックは、図7(a)で太い四角で囲ったように4×4画素としている。   A method for obtaining the macroblock offset (motion vector) and the motion vector of the pixel in the macroblock based on the motion vector obtained by the motion detection of 1 × 1 point will be described (FIGS. 7 and 8). First, the numbers written in the lattice of FIG. 7A are the motion vector (x, y) and the vector number n attached thereto, as shown in FIG. 7C. The numbers in the grid in FIG. 7A are intentional numbers that are easy to understand. Incidentally, the slanted arrow in FIG. 7A indicates the point indicated by the vector of vector number n. In this way, there are many cases where many pixels have similar vectors. As shown in FIG. 7C, the vector number 2 = (2, 2) having the highest frequency is the most frequent, and this is set as the motion vector of the macroblock (OffSetX, OffSetY) = (2, 2 ) Is set. By the way, the macroblock here is 4 × 4 pixels as shown by a thick square in FIG.

次に、図7(a)の1×1の動きベクトルと、(OffSetX,OffSetY)=(2,2)のベクトルと差分をとる。そのベクトルを再びベクトル番号に置き換えると図7(b)のようになる。これをみると、画素の動きベクトルには、ゼロベクトルが多く含まれるようになる。   Next, the difference between the 1 × 1 motion vector of FIG. 7A and the vector of (OffSetX, OffSetY) = (2, 2) is taken. When the vector is replaced with the vector number again, the result is as shown in FIG. As seen from this, many zero vectors are included in pixel motion vectors.

図8は、上記の説明を模式的に表現しなおしたものである。図8(a)に、1×1の動き検出で求められた画素の動きベクトルを示す。すべての画素の動きベクトルが、長い距離を指しているような場合、可変長符号化の効率が悪くなる。そこで、図8(b)のように、ある領域をマクロブロックとしてひとまとめに取り扱い、オフセット分まとめて移動しておいてから、内部の個々の画素を動かすようにする。こうすることで、大きな移動量を持つ動きベクトルが少なくなる。この結果ゼロベクトルなどが増えて可変長符号化効率が向上する。   FIG. 8 is a schematic representation of the above description. FIG. 8A shows a pixel motion vector obtained by 1 × 1 motion detection. When the motion vectors of all the pixels indicate a long distance, the efficiency of variable length coding is deteriorated. Therefore, as shown in FIG. 8B, a certain area is collectively handled as a macroblock, and after moving together by the offset, individual pixels inside are moved. By doing so, motion vectors having a large amount of movement are reduced. As a result, the number of zero vectors and the like increase, and the variable length coding efficiency improves.

また、マクロブロックの動きベクトルも、カメラのパンニングなど画面全体が平行して移動している場合などのように、隣同士のマクロブロックで同じ値をとりやすいので、冗長性がある。このように、図8(a)の1×1の動き検出で求められた動きベクトルを図8(b)マクロブロックの動きとマクロブロック内の画素の動きに分離するほうが圧縮率向上につながる。この方法で、動きの多い動画像の圧縮率が顕著に増加する。   In addition, the macroblock motion vector is redundant because it is easy to take the same value between adjacent macroblocks, such as when the entire screen is moving in parallel, such as camera panning. As described above, the compression ratio is improved by separating the motion vector obtained by the 1 × 1 motion detection in FIG. 8A into the motion of the macroblock and the motion of the pixels in the macroblock in FIG. By this method, the compression rate of a moving image with a lot of motion is remarkably increased.

動きベクトルが求まった後は、予測差分画像を求める必要がある。数2に示す式は、参照画像と圧縮対象画像の間で予測差分画像を求め、それを量子化係数QTで量子化している(図5(a))。   After the motion vector is obtained, it is necessary to obtain a prediction difference image. The equation shown in Equation 2 obtains a prediction difference image between the reference image and the compression target image, and quantizes it with the quantization coefficient QT (FIG. 5A).

この式において、RQT、G1QT、G2QT、BQTは、量子化された予測差分画像を示している。R、G1、G2、Bは参照画像を、R‘、G1’、G2‘、B’は圧縮対象画像を示している。(xref,yref)は参照画像の座標を、(xinp,yinp)は圧縮対象画像の座標を示している。なお、(xref,yref)は、(xinp,yinp)を中心とする最大±MVの探索領域内の画素を示す座標である。尚、ここでは、DCTを行わない。その理由は、1×1点の動き検出・補償により、十分な精度の動き補償がなされており、DCTをしなくても隣同士の画素の相関をかなり多く引き去っているからである。ここで用いているスカラー量子化とは、量子化係数が画面全体で一律同じ値である量子化法である。量子化テーブルが無く、処理が簡単になる。なお、QTを2のべき乗に選ぶと、シフトレジスタだけで量子化回路を構成できる。 In this equation, R QT , G 1QT , G 2QT , and B QT indicate quantized prediction difference images. R, G1, G2, and B indicate reference images, and R ′, G1 ′, G2 ′, and B ′ indicate compression target images. (X ref , y ref ) indicates the coordinates of the reference image, and (x inp , y inp ) indicates the coordinates of the compression target image. Note that (x ref , y ref ) is a coordinate indicating a pixel in a search region of maximum ± MV centered on (x inp , y inp ). Here, DCT is not performed. The reason is that motion compensation with sufficient accuracy is performed by motion detection / compensation of 1 × 1 point, and a considerable amount of correlation between adjacent pixels is removed without performing DCT. The scalar quantization used here is a quantization method in which the quantization coefficients are uniformly the same throughout the screen. Since there is no quantization table, processing is simplified. If QT is selected to be a power of 2, a quantization circuit can be configured with only a shift register.

次に、2種類の動きベクトル(マクロブロックの動きベクトルと、マクロブロック内の画素の動きベクトル)の可変長符号化について説明する。マクロブロックの動きベクトルは、隣同士のマクロブロックの動きベクトルと差分を取る。その差分をとったマクロブロックの動きベクトルと、マクロブロック内の画素の動きベクトルは、同様な符号化手法を行う。   Next, variable length coding of two types of motion vectors (macroblock motion vector and pixel motion vector in the macroblock) will be described. The motion vector of the macroblock takes a difference from the motion vector of the adjacent macroblock. The same encoding method is used for the motion vector of the macroblock obtained from the difference and the motion vector of the pixel in the macroblock.

図9(b)に示すように、動きベクトルの成分(x,y)に対にしてベクトル番号nが割り当てられており、このnに対して可変長ビットを割り当てる。出現頻度が高い(0,0)や(1,0)などのベクトル番号には、短いビットを割り当てる。図9(a)に示すように、ベクトル番号が小さいほうが木の根に近くなるように2分木を作成する。可変長ビットの割り当ては、目的のノードから根に向かって遷移した経路を逆にしたものが、求める符号になる。   As shown in FIG. 9B, a vector number n is assigned to the motion vector component (x, y) as a pair, and variable length bits are assigned to this n. Short bits are assigned to vector numbers such as (0, 0) and (1, 0) having a high appearance frequency. As shown in FIG. 9A, a binary tree is created so that the smaller vector number is closer to the root of the tree. The variable length bit allocation is obtained by reversing the path from the target node toward the root.

つまり、5を符号化する場合、ノード5から出発し、左の子から親をたどれば0が出力され、右の子から親をたどれば1が出力される。ここで木の根にたどり着けば、01となる。出力された符合を逆に並べると10となり、これが求めるパスとなる。復号する際は、根から出発して、この符号どおり左(1)→右(0)に木を探索すれば、目的のノード5へ到達できる。   That is, when 5 is encoded, starting from node 5, if the parent is traced from the left child, 0 is output, and if the parent is traced from the right child, 1 is output. If you get to the root of the tree here, it will be 01. If the output codes are arranged in reverse, it becomes 10 and this is the desired path. When decoding, starting from the root and searching the tree from the left (1) to the right (0) as shown, the target node 5 can be reached.

図10では、ベクトル番号8と4に対して可変長ビットを割り当てた例である。図10(a)で、8の場合、8と書いてあるノードから2分木の根に向けて出発する。8の親3に遷移すると、親3から見れば、ノード8は右の子であるため、1が出力される。次は、3から親1へ遷移する。親1から見れば子3は、左の子であるため、0が出力される。最後に、左の子から親である根に遷移するので、また0が出力される。これを逆に並べて001がノード8までのパスとなる。   In FIG. 10, variable length bits are assigned to vector numbers 8 and 4. In FIG. 10A, in the case of 8, it starts from the node written as 8 toward the root of the binary tree. When transitioning to the parent 3 of 8, since the node 8 is a right child as viewed from the parent 3, 1 is output. Next, transition from 3 to parent 1. Since the child 3 is the left child as seen from the parent 1, 0 is output. Finally, since a transition is made from the left child to the parent root, 0 is output again. These are arranged in reverse, and 001 becomes a path to the node 8.

図10(b)は、こうして求まった001という符号に対する補助情報である。001という符号は、符号の長さを明記する必要がある。そうしないと2進数のビットストリームを並べた場合、どこからどこまでが該当する符号かが分からなくなるからである。そのため、001が正確に切り出されるために、もうひとつ補助のためのストリームを生成する。このストリームは図10(b)に記される符号である。001という情報に対して図10(b)は、8が始まる合図として1を出力する。そして001の3ビットが出力されている間0を3つ出力する。したがって、001というパスに対して、1000が出力される。同様に、4の場合、パス01とそれに対しては、符号が始まる合図として1を出力し、図10(a)の01に対して2ビットの0を出力する。その結果、100が出力される。このように可変長符号が割り当てられたら、LZ77法や、レンジコーダなどを用いてこの符合を圧縮する。この出力は多重器へ出力する。   FIG. 10B shows auxiliary information for the code 001 obtained in this way. The code 001 needs to specify the length of the code. Otherwise, when binary bit streams are arranged, it is impossible to know where and where the corresponding code is. Therefore, in order to accurately extract 001, another auxiliary stream is generated. This stream is the code shown in FIG. For information 001, FIG. 10 (b) outputs 1 as a cue where 8 begins. Three 0s are output while 3 bits of 001 are output. Therefore, 1000 is output for the path 001. Similarly, in the case of 4, 1 is output as a cue to start the code for the path 01 and 2 and 0 of 2 bits is output for 01 in FIG. 10A. As a result, 100 is output. When a variable length code is assigned in this way, this code is compressed using the LZ77 method or a range coder. This output is output to the multiplexer.

次に、量子化された予測差分画像RQT、G1QT、G2QT、BQTの可変長符号化について説明する(図5(a))。動き補償後の予測差分画像を量子化器で量子化する。この量子化された予測差分画像を、可変長ビットを割り当てる。予測誤差も0が最も多く、1や−1などが次に出現頻度が高くなる可能性が高い。そのため、動きベクトルでの可変長ビットの割り当てと同様に、図11に示すように、0を木の根とする2分木を作成し、1、−1、2、−2、3・・・と絶対値が小さい順に木の根に近くなるような2分木を作成し、目的の差分値が入っているノードまでに至るパスとその長さを2進数で表現することで、動きベクトルと同様、可変長ビットを割り当てる。 Next, variable-length coding of quantized prediction difference images R QT , G 1QT , G 2QT , and B QT will be described (FIG. 5A). The motion-compensated prediction difference image is quantized with a quantizer. Variable length bits are assigned to the quantized prediction difference image. The prediction error is also 0 most frequently, and 1 and −1 are likely to have the next highest appearance frequency. For this reason, as shown in FIG. 11, a binary tree having 0 as the root of the tree is created, and 1, −1, 2, 2, −2,. By creating a binary tree that approaches the root of the tree in ascending order and expressing the path to the node containing the target difference value and its length in binary, variable length is the same as for motion vectors Assign bits.

例として、差分値に4と3の2つのデータに可変長符号を割り当てる。4と書いてあるノードから出発して、2分木を根までたどっていくと、右の子から3回親に遷移することを繰り返すので、出力は000となる。これを逆に並べて000となる。符合の長さは3である。上述の動きベクトルの可変長符号化と同様に、ビットストリームから値を切り出すための補助的なストリームは、先頭の合図として1を出力してそのあと先の3ビットの符号分0が3つ続き、図12(b)に示すように、1000となる。同様に、3が入ってくると、図12(a)は10、図12(b)は100となる。このように(a)には、あるノードから根まで遷移したときに出力される符号を逆に並べ、木の根からある節(ノード)へのパスとする。そして、図12(a)、(b)の符号には冗長性が含まれているため、これをLZ77法やレンジコーダなどで符号化する。この符号化器は特に指定はしなく、効率がよく、ハードウェアが小さい符号化方法ならば何でも構わない。   As an example, variable length codes are assigned to two data of 4 and 3 as difference values. Starting from the node written as 4 and following the root of the binary tree, the transition from the right child to the parent is repeated three times, so the output is 000. This is reversed and becomes 000. The length of the sign is 3. Similar to the variable length coding of the motion vector described above, the auxiliary stream for cutting out the value from the bit stream outputs 1 as the first cue, followed by three code bits 0 of the next 3 bits. As shown in FIG. 12B, it becomes 1000. Similarly, when 3 enters, 10 in FIG. 12A and 100 in FIG. Thus, in (a), the codes output when transitioning from a certain node to the root are arranged in reverse, and the path from the root of the tree to a certain node (node) is set. Since the codes in FIGS. 12A and 12B include redundancy, the codes are encoded by the LZ77 method, a range coder, or the like. This encoder is not particularly specified, and any encoder can be used as long as it is efficient and has a small hardware.

以上のように本実施例の画像符号化装置及び画像符号化方法によれば、画像圧縮にあたりノイズを生じにくく、ハードウェアの規模が小さく計算量が少なく抑えることができる。具体的には、ベイヤー画像の直接圧縮により、カメラ側の補間回路が不要になり、同様にRGB表色系からYUV表色系への変換回路も不要である。さらに、動き検出を大まかな被写体の動きを示す成分と、細かな動きを示す成分の両方を採用することで、高品質な差分画像を得ることができる。   As described above, according to the image coding apparatus and the image coding method of the present embodiment, noise is hardly generated in image compression, the hardware scale is small, and the amount of calculation can be suppressed. Specifically, the direct compression of the Bayer image eliminates the need for an interpolation circuit on the camera side, and similarly eliminates a conversion circuit from the RGB color system to the YUV color system. Furthermore, a high-quality difference image can be obtained by adopting both a component indicating a rough motion of the subject and a component indicating a fine motion for motion detection.

さらに、1×1画素単位の動き検出は、直接N×N画素で動き検出をするよりも差分絶対値和の計算コストを削減できる。さらに、ベイヤー画像の動き検出の探索領域はビットマップで行う場合に比べ4分の1となる。   Furthermore, motion detection in units of 1 × 1 pixels can reduce the calculation cost of the sum of absolute differences compared to direct motion detection using N × N pixels. Further, the search area for detecting the motion of the Bayer image is one-fourth that in the case of using a bitmap.

さらに、DCTがなくても、高品質な圧縮でき、ブロックノイズ等のDCTにまつわる画質の劣化がなく、DCTに必要なハードウェアや計算コストを削減できる。   Further, even without DCT, high-quality compression can be performed, there is no deterioration in image quality related to DCT such as block noise, and hardware and calculation costs required for DCT can be reduced.

さらに、量子化器も簡単なスカラー量子化であるため、ハードウェアを簡略化できる。また、ジグザグスキャンなども存在しないため、ハードウェアを簡略化できる。   Furthermore, since the quantizer is also a simple scalar quantization, the hardware can be simplified. In addition, since there is no zigzag scan or the like, hardware can be simplified.

さらに、ベイヤー画像はビットマップ画像の3分の1のバッファメモリしか占有しないので、動画圧縮でネックになるバッファメモリサイズを大幅に減らすことができる。   Furthermore, since the Bayer image occupies only one third of the buffer memory of the bitmap image, the buffer memory size that becomes a bottleneck in moving image compression can be greatly reduced.

以上のように、本発明の画像符号化装置及び画像符号化方法は、カプセル内視鏡等の医療機器の他、超小型カメラの画像を送信する装置に適用できる。   As described above, the image encoding device and the image encoding method of the present invention can be applied to a device that transmits an image of a micro camera in addition to a medical device such as a capsule endoscope.

本発明に係る画像符号化装置の一例を示す構成図である。It is a block diagram which shows an example of the image coding apparatus which concerns on this invention. 同画像符号化装置のカラーフィルタの説明図である。It is explanatory drawing of the color filter of the image coding apparatus. 同画像符号化方法の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the image coding method. 同画像符号化方法を示す構成図である。It is a block diagram which shows the image coding method. 同画像符号化方法の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the image coding method. 同画像符号化方法の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the image coding method. 同画像符号化方法の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the image coding method. 同画像符号化方法の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the image coding method. 同画像符号化方法の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the image coding method. 同画像符号化方法の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the image coding method. 同画像符号化方法の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the image coding method. 同画像符号化方法の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the image coding method.

符号の説明Explanation of symbols

5・・・・撮像部
12・・・垂直スキャナ
14・・・ノイズキャンセル回路
16・・・水平スキャナ
18・・・増幅器
20・・・A/D変換器
24・・・バッフメモリ
26・・・予測差分符号化回路
5 ... Imaging unit 12 ... Vertical scanner 14 ... Noise canceling circuit 16 ... Horizontal scanner 18 ... Amplifier 20 ... A / D converter 24 ... Buff memory 26 ... Prediction Differential encoding circuit

Claims (10)

カラーフィルタを用いるイメージアレイのN×N画素よりなるブロックから色成分ごとに分けて複数の画素ブロックを抽出した後符号化を行うイメージフィルタ原色フィルタ画像の動画像の画像符号化装置において、
該画素ブロックに1×1点で動き検出を行い動きベクトルを抽出する動き検出手段と、
該動きベクトルを元に該動画像を圧縮する圧縮手段とを備えることを特徴とする画像符号化装置。
In an image coding apparatus for a moving image of an image filter primary color filter image that performs coding after extracting a plurality of pixel blocks from a block composed of N × N pixels of an image array using a color filter and separating each of the color components.
Motion detection means for detecting motion at 1 × 1 point in the pixel block and extracting a motion vector;
An image encoding apparatus comprising: compression means for compressing the moving image based on the motion vector.
前記圧縮手段として動き補償予測符号化の圧縮を用いることを特徴とする請求項1記載の画像符号化装置。   2. The image coding apparatus according to claim 1, wherein compression of motion compensation prediction coding is used as the compression means. 前記動き検出手段が、圧縮対象画像のある画素とその近傍の参照画像とで差分をとることで動きベクトルを抽出することを特徴とする請求項1又は請求項2記載の画像符号化装置。   3. The image coding apparatus according to claim 1, wherein the motion detection unit extracts a motion vector by taking a difference between a pixel in a compression target image and a reference image in the vicinity thereof. 前記動きベクトルが、前記画素ブロックの所定範囲内のマクロブロック自体の動きベクトルと、該マクロブロック内の画素の動きベクトルとでなることを特徴とする請求項1〜請求項3記載のいずれかに記載の画像符号化装置。   4. The motion vector according to claim 1, wherein the motion vector includes a motion vector of a macro block itself within a predetermined range of the pixel block and a motion vector of a pixel in the macro block. The image encoding device described. 前記動き検出手段が、1つの赤(R)、2つの緑(G1、G2)、1つの青(B)の前記画素ブロックの色成分に対して同時に動き検出を行うことを特徴とする請求項1〜請求項4のいずれかに記載の画像符号化装置。   The motion detection unit performs motion detection simultaneously on the color components of the pixel blocks of one red (R), two green (G1, G2), and one blue (B). The image encoding device according to any one of claims 1 to 4. カラーフィルタを用いるイメージアレイのN×N画素よりなるブロックから色成分ごとに分けて複数の画素ブロックを抽出した後符号化を行うイメージフィルタ原色フィルタ画像の動画像の画像符号化方法において、
該画素ブロックに1×1点で動き検出を行い動きベクトルを抽出し、
該動きベクトルを元に該動画像を圧縮することを特徴とする画像符号化方法。
In the image coding method of a moving image of an image filter primary color filter image that performs coding after extracting a plurality of pixel blocks separately for each color component from a block consisting of N × N pixels of an image array using a color filter,
Motion detection is performed on the pixel block at 1 × 1 point to extract a motion vector,
An image encoding method comprising compressing the moving image based on the motion vector.
前記圧縮として動き補償予測符号化の圧縮を用いることを特徴とする請求項6記載の画像符号化方法。   7. The image encoding method according to claim 6, wherein compression of motion compensated prediction encoding is used as the compression. 前記動き検出が、圧縮対象画像のある画素とその近傍の参照画像とで差分をとることで動きベクトルを抽出することを特徴とする請求項6又は請求項7記載の画像符号化方法。   8. The image encoding method according to claim 6, wherein the motion detection extracts a motion vector by taking a difference between a pixel in a compression target image and a reference image in the vicinity thereof. 前記動きベクトルが、前記画素ブロックの所定範囲内のマクロブロック自体の動きベクトルと、該マクロブロック内の画素の動きベクトルとでなることを特徴とする請求項6〜請求項8記載のいずれかに記載の画像符号化方法。   9. The motion vector according to claim 6, wherein the motion vector includes a motion vector of a macroblock itself within a predetermined range of the pixel block and a motion vector of a pixel in the macroblock. The image encoding method described. 前記動き検出が、1つの赤(R)、2つの緑(G1、G2)、1つの青(B)の前記画素ブロックの色成分に対して同時に動き検出を行うことを特徴とする請求項6〜請求項9のいずれかに記載の画像符号化方法。   7. The motion detection is performed simultaneously for the color components of the pixel blocks of one red (R), two green (G1, G2), and one blue (B). The image encoding method according to claim 9.
JP2005348073A 2005-12-01 2005-12-01 Image coding apparatus and method Withdrawn JP2007158524A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005348073A JP2007158524A (en) 2005-12-01 2005-12-01 Image coding apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005348073A JP2007158524A (en) 2005-12-01 2005-12-01 Image coding apparatus and method

Publications (1)

Publication Number Publication Date
JP2007158524A true JP2007158524A (en) 2007-06-21

Family

ID=38242342

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005348073A Withdrawn JP2007158524A (en) 2005-12-01 2005-12-01 Image coding apparatus and method

Country Status (1)

Country Link
JP (1) JP2007158524A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009125673A1 (en) * 2008-04-07 2009-10-15 アキュートロジック株式会社 Dynamic image processing device, dynamic image processing method, and dynamic image processing program
JP2014197806A (en) * 2013-03-29 2014-10-16 富士フイルム株式会社 Image compression device, image expansion device, and method for controlling operation of the same

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009125673A1 (en) * 2008-04-07 2009-10-15 アキュートロジック株式会社 Dynamic image processing device, dynamic image processing method, and dynamic image processing program
JP2009253667A (en) * 2008-04-07 2009-10-29 Acutelogic Corp Moving image processing device, moving image processing method, and moving image processing program
JP4494490B2 (en) * 2008-04-07 2010-06-30 アキュートロジック株式会社 Movie processing apparatus, movie processing method, and movie processing program
KR101046012B1 (en) * 2008-04-07 2011-07-01 어큐트로직 가부시키가이샤 Dynamic image processing device, dynamic image processing method, and computer-readable recording medium having recorded dynamic image processing program
JP2014197806A (en) * 2013-03-29 2014-10-16 富士フイルム株式会社 Image compression device, image expansion device, and method for controlling operation of the same

Similar Documents

Publication Publication Date Title
JP5194833B2 (en) Encoding apparatus and method, recording medium, and program
JP2017055444A (en) Data coding and decoding
JP4159400B2 (en) Computer-implemented method and recording medium for processing video images
JP4799438B2 (en) Image recording apparatus, image recording method, image encoding apparatus, and program
KR20100015651A (en) Two-dimensional adaptive interpolation filter coefficient decision method
JP2005333622A (en) Predictive reversible encoding of image and video
JP2007159155A (en) Filtering method for eliminating blocking effect, and equipment therefor
WO1998026601A1 (en) Picture encoder and picture decoder
JP2006157481A (en) Image coding apparatus and method thereof
MXPA06002494A (en) Conditional lapped transform.
JP2023156438A (en) Data encoding method and device, data decoding method and device, and image processing device
JP2009194760A (en) Image coding device, image decoding device, program for coding image, and program for decoding image
JP2010258576A (en) Scene change detector, and video recorder
JP2007158524A (en) Image coding apparatus and method
JP2007116731A (en) Image signal processing method
JP4580880B2 (en) Image encoding apparatus, image decoding apparatus, and image processing system
JP2005167655A (en) Conversion coding method and conversion decoding method
JP3812808B2 (en) Skip region detection type moving image encoding apparatus and recording medium
JP4139657B2 (en) Video signal encoding apparatus and decoding apparatus
JPH06113291A (en) Picture coder and decoder
JP2004260251A (en) Apparatus and program of detecting motion vector
WO2016047250A1 (en) Signal processing apparatus, imaging apparatus and signal processing method
KR100715512B1 (en) Apparatus for image processing and method thereof
JP4077706B2 (en) Interlaced image processing apparatus and processing method
JP4256221B2 (en) Moving picture encoding method, moving picture decoding method, moving picture encoding program, moving picture decoding program, moving picture encoding apparatus, and moving picture decoding apparatus

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090203