JP2007067694A - Apparatus and method for encoding image, camera, and portable terminal equipment - Google Patents

Apparatus and method for encoding image, camera, and portable terminal equipment Download PDF

Info

Publication number
JP2007067694A
JP2007067694A JP2005249858A JP2005249858A JP2007067694A JP 2007067694 A JP2007067694 A JP 2007067694A JP 2005249858 A JP2005249858 A JP 2005249858A JP 2005249858 A JP2005249858 A JP 2005249858A JP 2007067694 A JP2007067694 A JP 2007067694A
Authority
JP
Japan
Prior art keywords
image
encoding
prediction
motion vector
difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005249858A
Other languages
Japanese (ja)
Inventor
Yoshiko Hatano
喜子 幡野
Shuji Toda
修司 外田
Junji Sukeno
順司 助野
Tomokazu Fukuda
智教 福田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2005249858A priority Critical patent/JP2007067694A/en
Priority to PCT/JP2006/312106 priority patent/WO2007026457A1/en
Publication of JP2007067694A publication Critical patent/JP2007067694A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6811Motion detection based on the image signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image encoding apparatus capable of correcting the blur of an animation generated by a camera shake in photographing by detecting the movement of the image and segmenting the image according to the movement, and performing recording and transmitting; and to provide an image encoding method. <P>SOLUTION: The image encoding apparatus includes a first encoding means 1 for encoding an input image, and outputting a motion vector which is used for encoding; a segmenting position determining means 2 for determining the segmenting position of the image with the use of the motion vector which is outputted from the first encoding means; an image segmenting means 3 for segmenting the input image in a prescribed size according to the image segmenting position which is outputted from the segmenting position determining means 2; and a second encoding means for encoding the segmented image which is outputted from the image segmenting means 3. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、撮影時の手ぶれ等により発生した動画のぶれを、補正して記録・伝送するための符号化技術に関するものである。   The present invention relates to an encoding technique for correcting and recording / transmitting moving image blur caused by camera shake during shooting.

従来から、デジタルカメラやカメラ付き携帯端末機器などにおける動画記録または動画伝送においては、携帯端末が小型軽量化するにつれ、撮影時の手ぶれが発生しやすく、問題となっている。動画の手ぶれを補正する方法としては、光学系の振動を補正する機械的な機構を備えたり、画像から動きを検出し、動きに合わせて画像を切り出す回路を備えるなどの方法がある。   2. Description of the Related Art Conventionally, moving image recording or moving image transmission in a digital camera, a mobile terminal device with a camera, or the like has become a problem because camera shake tends to occur as the mobile terminal becomes smaller and lighter. As a method for correcting camera shake of a moving image, there are a method of providing a mechanical mechanism for correcting vibration of an optical system, a method of detecting a motion from an image, and a circuit for cutting out the image in accordance with the motion.

また、動画のデジタル記録やデジタル伝送においては、データ量を削減するため、MPEG−4、MPEG−2などの動き補償予測符号化が採用されることが多い。動き補償予測符号化を行なう場合、手ぶれした画像が入力されると、画像が乱れて見苦しいだけでなく、符号化効率が低下するという問題がある。このような符号化装置の場合、動き補償予測を行なうためにブロック毎に動きベクトルを求めるので、符号化のための動きベクトル検出と、手ぶれ補正のための動き検出とで、回路を共用化する試みも提案されている(例えば、特許文献1)。   Also, in motion picture digital recording and digital transmission, motion compensated predictive coding such as MPEG-4 and MPEG-2 is often employed to reduce the amount of data. When motion-compensated predictive coding is performed, when a blurred image is input, there is a problem that the image is not only disturbed and unsightly, but also the coding efficiency is lowered. In the case of such an encoding apparatus, a motion vector is obtained for each block in order to perform motion compensation prediction, so that a circuit is shared between motion vector detection for encoding and motion detection for camera shake correction. Trials have also been proposed (for example, Patent Document 1).

このような従来技術によれば、入力画像をブロックに分割し、各ブロックの動きベクトルを求め、各動きベクトルから手ぶれベクトルを検出し、入力画像を手ぶれベクトルにより補正し、補正後の画像を符号化する。このとき、手ぶれベクトルにより各ブロックの動きベクトルを修正し、修正動きベクトルにより、動き補償予測符号化を行なう。
特開平9−130748公報(第17頁、第17図)
According to such a conventional technique, an input image is divided into blocks, a motion vector of each block is obtained, a camera shake vector is detected from each motion vector, the input image is corrected by the camera shake vector, and the corrected image is encoded. Turn into. At this time, the motion vector of each block is corrected with the hand movement vector, and motion compensation predictive coding is performed with the corrected motion vector.
JP-A-9-130748 (page 17 and FIG. 17)

かかる従来技術によると、入力画像を手ぶれベクトルに従って切り出し、切り出した画像を補正画像として符号化するが、補正画像を符号化する場合のブロック分割は、手ぶれベクトルを求めたときの入力画像のブロック分割とは同じ位置にならないため、各ブロックの動きベクトルを手ぶれベクトルにより修正しても、必ずしも符号化に最適な動きベクトルとはならないという問題がある。   According to such a conventional technique, an input image is cut out according to a camera shake vector, and the cut out image is encoded as a corrected image. When the corrected image is encoded, block division is performed by dividing the input image when obtaining the camera shake vector. Therefore, there is a problem that even if the motion vector of each block is corrected by a hand movement vector, the motion vector is not necessarily the optimum motion vector for encoding.

本発明は上記のような課題を解決するためになされたもので、符号化を2度行うことにより、回路規模を増やすことなく、手ぶれ補正用の動きベクトルを検出して手ぶれを補正するとともに、符号化に適した動きベクトルを検出し、効率よく画像圧縮できる符号化装置を得ることを目的とする。   The present invention has been made to solve the above-described problems, and by performing the encoding twice, the motion vector for camera shake correction is detected and the camera shake is corrected without increasing the circuit scale. It is an object of the present invention to obtain an encoding device that can detect a motion vector suitable for encoding and efficiently compress an image.

また、本発明は、符号化を2度行うことにより、既存のエンコーダを用いて手ぶれ補正用の動きベクトルを検出し、手ぶれを補正して画像を圧縮する符号化方法を提供することを第2の目的とする。 The second aspect of the present invention also provides an encoding method in which a motion vector for camera shake correction is detected using an existing encoder by performing encoding twice, and the image is compressed by correcting the camera shake. The purpose.

本発明は、上述のような課題を解決するためになされたもので、入力画像および該入力画像の1フレーム前の画像である前画像に基づいて第1の動きベクトルを検出し第1の予測画像を得る第1の画像予測手段と、前記第1の動きベクトルに基づいて画像切り出し位置を決定する切り出し位置決定手段と、前記切り出し位置決定手段から出力される画像切り出し位置に基づいて前記入力画像を予め定めた画像サイズの切り出し画像に切り出す画像切り出し手段と、前記切り出し画像および前記前画像に対応した切り出し画像に基づいて第2の動きベクトルを検出し第2の予測画像を得る第2の画像予測手段と、前記第2の画像予測手段の出力を符号化する第2の可変長符号化手段とを備えた画像符号化装置およびそれに対応する画像符号化方法を提供するものである。   The present invention has been made to solve the above-described problems, and detects a first motion vector based on an input image and a previous image which is an image one frame before the input image, and performs a first prediction. A first image predicting unit for obtaining an image; a cutout position determining unit for determining an image cutout position based on the first motion vector; and the input image based on the image cutout position output from the cutout position determining unit. And a second image that obtains a second predicted image by detecting a second motion vector based on the clipped image corresponding to the clipped image and the previous image. Image coding apparatus including prediction means, and second variable length coding means for coding the output of the second image prediction means, and an image coding method corresponding thereto Is to provide.

本発明によれば、符号化を2度行なうことにより、1度目の符号化で手ぶれ補正用の動きベクトルを検出して、動きベクトルに従って画像を切り出すとともに、2度めの符号化で、符号化に適した動きベクトルを検出し符号化することで、入力画像の手ぶれを補正し、効率よく画像圧縮できる画像符号化装置および画像符号化方法を得る。   According to the present invention, by performing encoding twice, a motion vector for camera shake correction is detected in the first encoding, and an image is cut out according to the motion vector, and encoding is performed in the second encoding. By detecting and encoding a motion vector suitable for the image, an image encoding apparatus and an image encoding method capable of correcting camera shake of an input image and efficiently compressing an image are obtained.

以下、本発明をその実施の形態を示す図面に基づいて具体的に説明する。   Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof.

実施の形態1
本発明の実施の形態1について図面を参照しつつ、以下に説明する。図1は、この発明の実施の形態1に係る画像符号化装置のブロック図を示したものである。図において、1は入力画像を符号化する第一の符号化手段であり、2は第一の符号化手段1から出力される動きベクトルをもとに画像切り出し位置を決定する切り出し位置決定手段、3は切り出し位置決定手段2から出力される画像切り出し位置に従って入力画像を切り出す画像切り出し手段、4は画像切り出し手段3から出力される切り出し後の画像を符号化する第二の符号化手段である。
Embodiment 1
Embodiment 1 of the present invention will be described below with reference to the drawings. FIG. 1 shows a block diagram of an image coding apparatus according to Embodiment 1 of the present invention. In the figure, 1 is a first encoding means for encoding an input image, 2 is a cutout position determining means for determining an image cutout position based on a motion vector output from the first encoding means 1, Reference numeral 3 denotes an image cutout unit that cuts out an input image according to the image cutout position output from the cutout position determination unit 2, and 4 denotes a second encoding unit that encodes the cutout image output from the image cutout unit 3.

次に動作について説明する。第一、第二の符号化手段は、入力画像の動きを動きベクトルとして検出し、検出された動きベクトルを用いて動き補償予測符号化を行なう符号化手段である。まず、入力画像は第一の符号化手段1に入力され、動き補償予測符号化されるとともに、符号化に使用した動きベクトルが出力される。例えば、入力画像が水平4分割、垂直3分割でブロック分割された場合、図2のような12個のブロックの動きベクトルが出力される。なお、第一の符号化手段1の構成例については、後に詳述する。   Next, the operation will be described. The first and second encoding units are encoding units that detect the motion of the input image as a motion vector and perform motion compensation prediction encoding using the detected motion vector. First, the input image is input to the first encoding means 1 and subjected to motion compensation prediction encoding, and a motion vector used for encoding is output. For example, when the input image is divided into blocks of 4 horizontal divisions and 3 vertical divisions, motion vectors of 12 blocks as shown in FIG. 2 are output. A configuration example of the first encoding means 1 will be described later in detail.

次に切り出し位置決定手段2は、この動きベクトルを用いて、画面全体の動きを示す手ぶれベクトルを決定する。例えば、図2の場合、出力された12個の動きベクトルのうち、最も出現頻度の高いベクトルを手ぶれベクトルとすると、手ぶれベクトルは図3のようになる。なお、手ぶれベクトルの決定方法は、すべての動きベクトルの平均としてもよいし、動きベクトルの水平成分、垂直成分のそれぞれの分布の中間値をとってもよい。また、動きベクトルの水平成分、垂直成分のそれぞれについてヒストグラムを求め、それぞれの平均から標準偏差以上離れた値を除いて平均をとるなどの手法を用いてもよい。   Next, the cut-out position determination unit 2 determines a camera shake vector indicating the motion of the entire screen using the motion vector. For example, in the case of FIG. 2, assuming that the most frequently occurring vector among the 12 output motion vectors is the camera shake vector, the camera shake vector is as shown in FIG. Note that the method for determining the hand movement vector may be an average of all motion vectors, or may be an intermediate value of each distribution of the horizontal and vertical components of the motion vector. Alternatively, a method may be used in which a histogram is obtained for each of the horizontal and vertical components of a motion vector, and an average is obtained by excluding a value that is more than a standard deviation from each average.

切り出し位置決定手段2は、この手ぶれベクトルと前フレームの画像切り出し位置とから、現フレームの画像切り出し位置を決定する。例えば、図4において、11を前フレームの入力画像である前画像、12を画像位置を画像左上端で代表した場合の前フレームの画像切り出し位置、13を前フレームの切り出し後の画像とし、14を現フレームの入力画像、15を前フレームの切り出し画像、16を手ぶれベクトルとする。一般に、MPEG−2、MPEG−4などの動き補償予測符号化においては、動きベクトルは、現フレームのブロックを基準として、これに相当する前フレームのブロック位置を示すので、手ぶれベクトル16の始点と終点を入れ替えたベクトル17が、前フレームから現フレームへの動きを示すベクトルとなる。従って、前フレームの画像切り出し位置12をベクトル17だけ移動した位置が、現フレームの画像切り出し位置18となる。すなわち、図4の19が現フレームの切り出し後の画像となる。なお、切り出し後の画像19が画面外に出ないように、画像切り出し位置18を制限する必要がある。   The cutout position determination unit 2 determines the image cutout position of the current frame from the camera shake vector and the image cutout position of the previous frame. For example, in FIG. 4, 11 is the previous image that is the input image of the previous frame, 12 is the image cut-out position of the previous frame when the image position is represented by the upper left corner of the image, and 13 is the image after cutting the previous frame. Is an input image of the current frame, 15 is a cut-out image of the previous frame, and 16 is a camera shake vector. In general, in motion-compensated predictive coding such as MPEG-2 and MPEG-4, the motion vector indicates the block position of the previous frame corresponding to the block of the current frame. A vector 17 with the end points replaced is a vector indicating the movement from the previous frame to the current frame. Therefore, a position obtained by moving the image cutout position 12 of the previous frame by the vector 17 becomes an image cutout position 18 of the current frame. That is, 19 in FIG. 4 is an image after cutting out the current frame. Note that the image cutout position 18 needs to be restricted so that the cutout image 19 does not go out of the screen.

切り出し位置決定手段2で決定した画像切り出し位置に従って、画像切り出し手段3は、入力画像の切り出しを行い、切り出し後の画像19を第二の符号化手段4へ入力する。第二の符号化手段4は切り出し後の画像を符号化し、符号化データを出力する。   In accordance with the image cutout position determined by the cutout position determination unit 2, the image cutout unit 3 cuts out the input image and inputs the image 19 after cutout to the second encoding unit 4. The second encoding means 4 encodes the cut image and outputs encoded data.

次に、第一、第二の符号化手段の構成例について説明する。図5は第二の符号化手段の一構成例であり、図6は第一の符号化手段の一構成例を示している。図5において、入力された切り出し後の画像は、差分器101の第一の入力と、切替器102の第一の入力と、動き補償予測手段111の第一の入力とに与えられる。差分器101の第二の入力には動き補償予測手段111から出力される予測画像が与えられ、差分器101の出力は切替器102の第二の入力に与えられる。切替器102の第三の入力には、動き補償予測手段111から出力されるイントラ/インター判定結果が与えられ、切替器102の出力はDCT手段103に入力される。DCT手段103の出力は量子化手段104に入力され、量子化手段104の出力は可変長符号化手段105の第一の入力と逆量子化手段106に与えられる。逆量子化手段106の出力は逆DCT手段107に入力され、逆DCT手段107の出力は加算器108の第一の入力と、切替器109の第一の入力とに与えられる。加算器108の第二の入力には動き補償予測手段111から出力される予測画像が与えられる。加算器108の出力は切替器109の第二の入力に与えられ、切替器109の第三の入力には動き補償予測手段111から出力されるイントラ/インター判定結果が与えられる。切替器109の出力はメモリ110に入力される。メモリ110の出力は動き補償予測手段111の第二の入力に与えられる。動き補償予測手段111から出力される動きベクトルは可変長符号化手段105の第二の入力に与えられ、可変長符号化手段105の出力はバッファ112に入力され、バッファ112から符号化データが出力される。   Next, a configuration example of the first and second encoding means will be described. FIG. 5 shows a configuration example of the second encoding means, and FIG. 6 shows a configuration example of the first encoding means. In FIG. 5, the input image after clipping is given to the first input of the difference unit 101, the first input of the switch 102, and the first input of the motion compensation prediction unit 111. A predicted image output from the motion compensation prediction unit 111 is given to the second input of the difference unit 101, and an output of the difference unit 101 is given to the second input of the switch 102. The third input of the switch 102 is given the intra / inter determination result output from the motion compensation prediction means 111, and the output of the switch 102 is input to the DCT means 103. The output of the DCT unit 103 is input to the quantization unit 104, and the output of the quantization unit 104 is supplied to the first input of the variable length encoding unit 105 and the inverse quantization unit 106. The output of the inverse quantization means 106 is input to the inverse DCT means 107, and the output of the inverse DCT means 107 is given to the first input of the adder 108 and the first input of the switch 109. The second input of the adder 108 is given a predicted image output from the motion compensation prediction unit 111. The output of the adder 108 is given to the second input of the switch 109, and the intra / inter determination result outputted from the motion compensation prediction means 111 is given to the third input of the switch 109. The output of the switch 109 is input to the memory 110. The output of the memory 110 is given to the second input of the motion compensation prediction means 111. The motion vector output from the motion compensation prediction unit 111 is given to the second input of the variable length encoding unit 105, the output of the variable length encoding unit 105 is input to the buffer 112, and the encoded data is output from the buffer 112. Is done.

次に、図5に基づいて第二の符号化手段の動作を具体的に説明する。画像切り出し手段3から出力された切り出し後の画像は、差分器101において、後に述べる動き補償予測手段111から出力される予測画像との差分が求められる。切替器102は、後に述べる動き補償予測手段111から出力されるイントラ/インター判定結果に基づき、イントラの場合は入力された切り出し後の画像をそのままDCT手段103に入力し、インターの場合は差分器101で求めた予測画像との差分をDCT手段103に入力する。DCT手段103は、入力された切り出し後の画像、または、予測画像との差分を、ブロック毎にDCT変換し、DCT係数を出力する。DCT係数は量子化手段104で量子化される。この量子化DCT係数は、可変長符号化手段105で符号化されるとともに、逆量子化手段106で逆量子化され、逆DCT手段107で逆DCT変換される。イントラの場合、逆DCT変換されたデータが復号画像となっているので、そのままメモリ110に記憶される。インターの場合は、逆DCT変換されたデータを予測画像と加算することにより復号画像を作成し、メモリ110に記憶する。また、可変長符号化手段105で符号化されたデータはバッファ112を介して、外部に出力される。尚、この第二の符号化手段において、可変長符号化手段105とバッファ112を除いた部分は、画像予測手段113を構成する。   Next, the operation of the second encoding means will be specifically described based on FIG. The difference between the cut-out image output from the image cut-out unit 3 and the predicted image output from the motion compensation prediction unit 111 described later is obtained by the differentiator 101. Based on the intra / inter determination result output from the motion compensation prediction unit 111 described later, the switching unit 102 inputs the cut-out image input in the case of intra to the DCT unit 103 as it is, and in the case of inter the difference unit The difference from the predicted image obtained in 101 is input to the DCT means 103. The DCT unit 103 performs DCT conversion for each block on the difference between the input image after cutout or the predicted image and outputs a DCT coefficient. The DCT coefficient is quantized by the quantization means 104. The quantized DCT coefficients are encoded by the variable length encoding means 105, dequantized by the inverse quantization means 106, and inverse DCT transformed by the inverse DCT means 107. In the case of intra, since the inverse DCT transformed data is a decoded image, it is stored in the memory 110 as it is. In the case of inter, a decoded image is created by adding the inverse DCT-transformed data to the predicted image and stored in the memory 110. Further, the data encoded by the variable length encoding means 105 is output to the outside via the buffer 112. In the second encoding means, the portion excluding the variable length encoding means 105 and the buffer 112 constitutes an image prediction means 113.

動き補償予測手段111は、入力された切り出し後の画像を複数画素から成るブロックに分割し、メモリ110に記憶された過去の復号画像と比較することにより、ブロック毎に動きベクトルを求める。動きベクトルの求め方としては、例えばブロックマッチングを使用する。すなわち、入力された切り出し後の画像の各ブロックと、過去の復号画像の任意の位置のブロックとの差分を求め、その差分絶対値和が最も小さくなる過去の復号画像のブロック位置(相対位置)を動きベクトルとして決定する。動き補償予測手段111は、さらに、求めた動きベクトルに従い、予測画像を作成する。また、動き補償予測手段111はブロック毎に入力された切り出し後の画像と予測画像の差分に応じた予測誤差の評価値を算出し、予測誤差が予め定めた値より大きい場合は、動き補償予測を行わない画面内モードであるイントラとし、そうでない場合は動き補償予測を行う動き補償予測モードであるインターとして、イントラ/インター判定を行う。なお、予測誤差の評価値としては、ブロックマッチングで求めた差分絶対値和でもよいし、予測画像と入力された切り出し後の画像の差分二乗和でもよい。また、イントラ/インター判定はこれに限らず、例えば、入力された切り出し後の画像のブロック毎の分散を求め、分散が小さい場合はイントラと判定してもよい。動き補償予測手段111は、このように、イントラ/インター判定結果と、予測画像と、動きベクトルとを出力する。なお、イントラ/インター判定結果がイントラの場合は、予測画像と動きベクトルを出力しない構成としてもよい。   The motion compensation prediction unit 111 divides the input cut-out image into blocks composed of a plurality of pixels, and compares them with past decoded images stored in the memory 110, thereby obtaining a motion vector for each block. As a method for obtaining the motion vector, for example, block matching is used. That is, the difference between each block of the input clipped image and the block at an arbitrary position of the past decoded image is obtained, and the block position (relative position) of the past decoded image having the smallest sum of absolute differences. Is determined as a motion vector. The motion compensation prediction unit 111 further creates a predicted image according to the obtained motion vector. The motion compensation prediction unit 111 calculates an evaluation value of a prediction error according to the difference between the clipped image input for each block and the prediction image. If the prediction error is larger than a predetermined value, the motion compensation prediction Intra / inter determination is performed as intra which is an intra-screen mode in which motion compensation is not performed, and as inter which is a motion compensation prediction mode in which motion compensation prediction is performed otherwise. The evaluation value of the prediction error may be a sum of absolute differences obtained by block matching, or a sum of squared differences between the predicted image and the input image after extraction. The intra / inter determination is not limited to this. For example, the variance for each block of the input cut-out image may be obtained, and if the variance is small, it may be determined as intra. In this way, the motion compensation prediction unit 111 outputs the intra / inter determination result, the predicted image, and the motion vector. In addition, when the intra / inter determination result is intra, it is good also as a structure which does not output a prediction image and a motion vector.

可変長符号化手段105は、量子化手段104から出力される量子化DCT係数と、動き補償予測手段111から出力される動きベクトルとを符号化し、符号化データをバッファ112に出力する。バッファ112は符号化データを外部へ出力する。   The variable length encoding unit 105 encodes the quantized DCT coefficient output from the quantization unit 104 and the motion vector output from the motion compensation prediction unit 111, and outputs the encoded data to the buffer 112. The buffer 112 outputs the encoded data to the outside.

次に図6に基づいて第一の符号化手段の動作を説明する。図6において図5と同一番号は同一部分または相当部分を示す。第一の符号化手段の構成は、基本的に第二の符号化手段の構成と同じであるが、動き補償予測手段111から出力される動きベクトルが、可変長符号化手段105だけでなく、切り出し位置決定手段2へと出力される点と、バッファ112から符号化データが外部へ出力されない点が異なる。   Next, the operation of the first encoding means will be described with reference to FIG. 6, the same reference numerals as those in FIG. 5 denote the same or corresponding parts. The configuration of the first encoding unit is basically the same as the configuration of the second encoding unit, but the motion vector output from the motion compensation prediction unit 111 is not only the variable length encoding unit 105, The difference is that the data is output to the cut-out position determination unit 2 and the encoded data is not output from the buffer 112 to the outside.

第一の符号化手段においては、バッファ112から符号化データを出力する必要がないので、バッファ112のサイズを小さくし、可変長符号化手段105から出力される符号化データは常に上書きするよう制御してもよい。また、可変長符号化手段105およびバッファ112を設けなくても良い。すなわち、画像予測手段113のみから構成されていても良い。この場合、量子化手段104からの出力は逆量子化手段106のみに与えられ、動き補償予測手段111からの出力は切り出し位置決定手段2のみに出力される。   In the first encoding means, since it is not necessary to output encoded data from the buffer 112, the size of the buffer 112 is reduced, and the encoded data output from the variable length encoding means 105 is controlled to always be overwritten. May be. Further, the variable length encoding means 105 and the buffer 112 need not be provided. That is, the image prediction unit 113 may be configured only. In this case, the output from the quantization means 104 is given only to the inverse quantization means 106, and the output from the motion compensation prediction means 111 is outputted only to the cutout position determination means 2.

このように、第一、第二の符号化手段の構成はほぼ同一となるので、同じ回路を共用し、第一の符号化手段として使用する場合は、動き補償予測手段111から出力される動きベクトルを符号化データとは別に出力できるように制御し、第二の符号化手段として使用する場合は、バッファ112から符号化データが出力できるように構成することにより、回路規模を増加させることなく、手ぶれ補正機能のある画像符号化装置を構成することができる。尚、第一、第二の符号化手段として同じ回路を用いる場合、メモリ110は共用することができず、2つのメモリを設ける必要がある。あるいは、2つの画像を記録できるサイズのメモリとし、記録された2つの画像を第一、第二の符号化に応じて選択して出力する選択手段を設けても良い。   As described above, the first and second encoding units have substantially the same configuration. Therefore, when the same circuit is shared and used as the first encoding unit, the motion output from the motion compensation prediction unit 111 is used. When the vector is controlled so that it can be output separately from the encoded data and used as the second encoding means, the encoded data can be output from the buffer 112 without increasing the circuit scale. Thus, an image encoding device having a camera shake correction function can be configured. When the same circuit is used as the first and second encoding means, the memory 110 cannot be shared and two memories need to be provided. Alternatively, a memory having a size capable of recording two images may be provided, and selection means for selecting and outputting the two recorded images according to the first and second encodings may be provided.

上記のように、実施の形態1に係る画像符号化装置は、動きベクトルから求めた手ぶれベクトルにより入力画像の手ぶれを補正し、手ぶれ補正した画像を符号化するため、動き補償モードによる符号化を用いて効率よく画像圧縮できる。   As described above, the image coding apparatus according to Embodiment 1 corrects camera shake of an input image using a camera shake vector obtained from a motion vector, and encodes a camera shake-corrected image. It can be used to efficiently compress images.

実施の形態2
図7は実施の形態2における画像符号化装置を示しており、図8はこの画像符号化装置による画像符号化方法を示すフローチャートを示している。図7において、201はCPU、202はエンコーダ、203はメモリであり、これらCPU201、エンコーダ202、メモリ203はCPUバス204で接続されている。ここで、エンコーダ202は、実施の形態1における符号化手段1(または4)、切り出し位置決定手段2および画像切り出し手段3を含んだ構成である。入力画像は外部からメモリ203に入力され、CPU201の制御により、エンコーダ202を起動し、メモリ203内の入力画像を符号化し、符号化データをメモリ203に格納する構成となっている。なお、エンコーダ202は、符号化する画像サイズ、符号化に使用した動きベクトルの出力ON/OFF、イントラ/インター判定結果の出力ON/OFFなどのパラメータ設定を、CPU201から、制御できるように構成される。ここで、符号化に使用した動きベクトルや、イントラ/インター判定結果などの情報は、メモリ203上の符号化データとは別の領域(図示せず)に記憶される。
Embodiment 2
FIG. 7 shows an image encoding apparatus according to Embodiment 2, and FIG. 8 shows a flowchart showing an image encoding method by this image encoding apparatus. In FIG. 7, 201 is a CPU, 202 is an encoder, and 203 is a memory. These CPU 201, encoder 202, and memory 203 are connected by a CPU bus 204. Here, the encoder 202 includes the encoding unit 1 (or 4), the cutout position determining unit 2 and the image cutout unit 3 in the first embodiment. The input image is input to the memory 203 from the outside, the encoder 202 is activated under the control of the CPU 201, the input image in the memory 203 is encoded, and the encoded data is stored in the memory 203. The encoder 202 is configured so that the CPU 201 can control parameter settings such as the image size to be encoded, output ON / OFF of the motion vector used for encoding, and output ON / OFF of the intra / inter determination result. The Here, information such as a motion vector used for encoding and an intra / inter determination result is stored in an area (not shown) different from the encoded data on the memory 203.

次に図8に従って、実施の形態2における画像符号化方法を説明する。まず、CPU201は、エンコーダ202の動作パラメータの設定を行なう。符号化する画像サイズを入力画像の画像サイズとし、かつ、動きベクトルの切り出し位置決定手段2への出力をONとする。そして、エンコーダを起動する(301)。ここで出力された動きベクトルから、画像切り出し位置を決定する(302)。画像切り出し位置の決定方法としては、例えば実施の形態1で説明したように、各ブロックの動きベクトルの平均を手ぶれベクトルとし、この手ぶれベクトルに従って、画像切り出し位置を決定する。次に、決定した切り出し位置に従って、予め定めた画像サイズで画像を切り出す(303)。最後に、CPU201はエンコーダ202で符号化する画像サイズを切り出し後の画像サイズに設定し、上記切り出し後の画像を符号化するようエンコーダ202を起動する(304)。次のフレームを符号化する場合は、ステップ301に戻り、符号化終了する場合は、処理を終了する。ステップ304から出力される一連の符号化データが、手ぶれ補正付きの画像符号化データとなる。   Next, the image coding method according to the second embodiment will be described with reference to FIG. First, the CPU 201 sets operation parameters of the encoder 202. The image size to be encoded is set to the image size of the input image, and the output of the motion vector to the clip position determination unit 2 is turned ON. Then, the encoder is activated (301). An image cutout position is determined from the motion vector output here (302). As a method for determining the image cutout position, for example, as described in the first embodiment, the average of the motion vectors of the respective blocks is set as a shake vector, and the image cutout position is determined according to the shake vector. Next, an image is cut out with a predetermined image size in accordance with the determined cut-out position (303). Finally, the CPU 201 sets the image size to be encoded by the encoder 202 to the image size after clipping, and activates the encoder 202 to encode the image after clipping (304). If the next frame is to be encoded, the process returns to step 301. If the encoding is to be ended, the process is ended. A series of encoded data output from step 304 becomes image encoded data with camera shake correction.

このように実施の形態2によれば、既存のエンコーダを2度起動することにより、手ぶれ補正効果のある画像符号化方法・画像符号化装置を得ることができる。   As described above, according to the second embodiment, it is possible to obtain an image encoding method / image encoding apparatus having a camera shake correction effect by activating an existing encoder twice.

なお、上記実施の形態2において、一回目のエンコーダ設定〜起動(301)を行なうときは、符号化歪によって動きベクトルの検出精度が落ちるのを防ぐため、エンコーダ202へのビットレート設定を高くすることにより、誤判定の少ない手ぶれ補正を得ることができる。例えば、所望のビットレートが64kbit/sの場合、2回目のエンコーダ起動(304)においてはエンコーダ202へのビットレート設定を64kbit/sとするが、一回目のエンコーダ設定〜起動(301)においては、エンコーダ202へのビットレート設定を例えば256kbit/sとする。   In the second embodiment, when the first encoder setting to start-up (301) is performed, the bit rate setting to the encoder 202 is increased in order to prevent the motion vector detection accuracy from being reduced due to coding distortion. Thus, it is possible to obtain camera shake correction with few erroneous determinations. For example, when the desired bit rate is 64 kbit / s, the bit rate setting to the encoder 202 is 64 kbit / s in the second encoder activation (304), but in the first encoder setting to activation (301). The bit rate setting for the encoder 202 is, for example, 256 kbit / s.

あるいは、エンコーダ202が、実施の形態1で説明した図6のような構成の符号化手段を有する場合、一回目のエンコーダ設定〜起動(301)においては、量子化手段104における量子化ステップ幅を最小値、たとえば1に固定し、符号化歪が発生しない、あるいは十分に小さくなるように制御してもよい。   Alternatively, when the encoder 202 includes the encoding unit configured as shown in FIG. 6 described in the first embodiment, the quantization step width in the quantization unit 104 is set in the first encoder setting to activation (301). It may be controlled to be fixed at a minimum value, for example, 1 so that encoding distortion does not occur or becomes sufficiently small.

あるいは、また、エンコーダ202が、低ビットレートに設定した方が動きベクトルの探索にかける処理を増やすような構成になっている場合は、一回目のエンコーダ設定〜起動(301)においては、量子化手段104における量子化ステップ幅を大きめの値、例えば、1から31の整数が設定できる場合、たとえば20に固定し、動きベクトル探索にかける処理を増やし、動きベクトルの精度が高くなるように制御してもよい。   Alternatively, if the encoder 202 is configured to increase the processing to search for motion vectors when the bit rate is set to a low bit rate, quantization is performed in the first encoder setting to activation (301). If the quantization step width in the means 104 can be set to a large value, for example, an integer from 1 to 31, for example, it is fixed to 20, for example, the processing applied to the motion vector search is increased, and the motion vector accuracy is controlled to be high. May be.

上記のように、一回目のエンコーダ設定〜起動(301)において、高ビットレートに設定あるいは量子化ステップを装置に応じて最適化することで、符号化歪により本来の動きと大きく異なる動きベクトルが検出されることを防ぐことができ、精度が高い手ぶれ補正が可能となる。   As described above, in the first encoder setting to start-up (301), by setting a high bit rate or optimizing the quantization step according to the apparatus, a motion vector that differs greatly from the original motion due to coding distortion is obtained. Detection can be prevented, and camera shake correction with high accuracy is possible.

また、上記実施の形態2において、エンコーダ202が実施の形態1で説明した図6のような構成の符号化手段を有し、かつ、イントラ/インター判定結果がイントラの場合は動きベクトルを出力しないような構成である場合、一回目のエンコーダ起動(301)においては、動き補償予測手段111のイントラ/インター判定結果が常にインターとなるように制御すれば、すべてのブロックに対して動きベクトルを得ることができ、精度の高い手ぶれ補正機能のある画像符号化装置を得ることができる。例えば、イントラ/インター判定が、予測誤差が所定値より大きい場合にイントラと判定するような構成の場合、一回目のエンコーダ設定〜起動(301)においては、この所定値を予測誤差が取りうる最大値とすることで、イントラ/インター判定結果が常にインターとなるように制御することができ、すべてのブロックに対して手ぶれベクトルの検出を可能とすることができる。   Further, in the second embodiment, the encoder 202 has the coding unit configured as shown in FIG. 6 described in the first embodiment and does not output a motion vector when the intra / inter determination result is intra. In such a configuration, in the first encoder activation (301), if control is performed so that the intra / inter determination result of the motion compensation prediction means 111 is always inter, motion vectors are obtained for all blocks. Therefore, it is possible to obtain an image encoding device having a highly accurate camera shake correction function. For example, when the intra / inter determination is configured to determine intra when the prediction error is larger than a predetermined value, in the first encoder setting to activation (301), this predetermined value can take the maximum possible prediction error. By setting the value, it is possible to control so that the intra / inter determination result is always inter, and it is possible to detect camera shake vectors for all blocks.

さらに、上記実施の形態1および実施の形態2においては、一回目の符号化において、各ブロックの動きベクトルを検出し、この動きベクトルをもとに画像切り出し位置を決定するとしたが、一回目の符号化手段が画面全体の動きを示すグローバル動きベクトルを用いた符号化方式である場合、一回目の符号化は、グローバル動きベクトルを出力し、グローバル動きベクトルをもとに、画像切り出し位置を決定するよう構成してもよい。   Furthermore, in Embodiment 1 and Embodiment 2 described above, the motion vector of each block is detected in the first encoding, and the image cutout position is determined based on this motion vector. When the encoding means is an encoding method using a global motion vector indicating the motion of the entire screen, the first encoding outputs the global motion vector and determines the image cutout position based on the global motion vector. You may comprise.

実施の形態3
上記実施の形態1および実施の形態2においては、一回目の符号化において動きベクトルを検出し、この動きベクトルをもとに画像切り出し位置を決定し、画像を切り出して符号化するとしたが、一回目の符号化において動きベクトルとイントラ/インター判定結果を出力し、各ブロックの動きベクトルとイントラ/インター判定結果をもとに、画像切り出し位置を決定するよう構成してもよい。
Embodiment 3
In Embodiment 1 and Embodiment 2 described above, the motion vector is detected in the first encoding, the image cutout position is determined based on this motion vector, and the image is cut out and encoded. In the second encoding, a motion vector and an intra / inter determination result may be output, and an image cutout position may be determined based on the motion vector and the intra / inter determination result of each block.

図9は上述のような実施の形態3による画像符号化装置を示すブロック図である。図において、1aは入力画像を符号化する第一の符号化手段であり、第一の符号化手段から出力される動きベクトルと、イントラ/インター判定結果が切り出し位置決定手段2aに入力される。切り出し位置決定手段2aから出力される画像切り出し位置に従って、画像切り出し手段3は入力画像を切り出し、第二の符号化手段4へ入力する。第二の符号化手段4は、切り出し後の画像を符号化して、符号化データを出力する。   FIG. 9 is a block diagram showing an image coding apparatus according to the third embodiment as described above. In the figure, reference numeral 1a denotes a first encoding unit that encodes an input image, and a motion vector output from the first encoding unit and an intra / inter determination result are input to the cut-out position determination unit 2a. In accordance with the image cutout position output from the cutout position determining means 2a, the image cutout means 3 cuts out the input image and inputs it to the second encoding means 4. The second encoding means 4 encodes the cut image and outputs encoded data.

次に動作について説明する。第一の符号化手段1aは、例えば、実施の形態1で説明した図6のような構成とする。実施の形態1の第一の符号化手段1と異なるのは、動き補償予測手段111で求めた動きベクトルだけでなく、イントラ/インター判定結果(動き補償予測モードか画面内モードかを示すモード情報)も切り出し位置決定手段2aへ入力される点である。   Next, the operation will be described. The first encoding unit 1a is configured as shown in FIG. 6 described in the first embodiment, for example. The difference from the first encoding unit 1 of the first embodiment is not only the motion vector obtained by the motion compensation prediction unit 111 but also the intra / inter determination result (mode information indicating whether the motion compensation prediction mode or the in-screen mode). ) Is also input to the cut-out position determining means 2a.

切り出し位置決定手段2aは、第一の符号化手段1から出力される動きベクトルと、イントラ/インター判定結果をもとに、画像切り出し位置を決定する。たとえば、イントラと判定されたブロックについては、動きベクトルを(0,0)として、画面全体の動きベクトルの平均値を求め、これを手ぶれベクトルとする。この手ぶれベクトルをもとに、図4のように画像切り出し位置を決定する。   The cutout position determination unit 2a determines the image cutout position based on the motion vector output from the first encoding unit 1 and the intra / inter determination result. For example, for a block determined to be intra, the motion vector is set to (0, 0), the average value of the motion vectors of the entire screen is obtained, and this is used as the camera shake vector. Based on this camera shake vector, the image cutout position is determined as shown in FIG.

画像切り出し手段3および第二の符号化手段4の動作は実施の形態1と同様であるので説明を省略する。   Since the operations of the image cutout unit 3 and the second encoding unit 4 are the same as those in the first embodiment, description thereof is omitted.

なお、本実施の形態3においては、切り出し位置決定手段2aが、イントラと判定されたブロックについては動きベクトルを(0,0)として、画像切り出し位置を決定するとしたが、インターと判定されたブロックの動きベクトルのみの平均値を手ぶれベクトルとし、この手ぶれベクトルをもとに画像切り出し位置を決定するよう構成してもよい。また、手ぶれベクトルの算出方法は平均に限らず、中間値や、最も頻度の高いベクトルを選択するなどの方法をとってもよい。   In Embodiment 3, the cutout position determination unit 2a determines the image cutout position with the motion vector set to (0, 0) for the block determined to be intra, but the block determined to be inter The average value of only the motion vectors may be used as a camera shake vector, and the image cutout position may be determined based on the camera shake vector. Further, the method of calculating the hand movement vector is not limited to the average, and a method of selecting an intermediate value or a vector having the highest frequency may be used.

上記のように構成することで、動きベクトルの信頼性が低い画面内モードでは動きがないと扱うことで、手ぶれ補正の精度を高めることができる。   By configuring as described above, it is possible to improve the accuracy of camera shake correction by handling that there is no motion in the in-screen mode in which the reliability of the motion vector is low.

また、上記実施の形態1ないし3においては、第一の符号化手段が図6のように構成され、動き補償予測手段111で求めた動きベクトルないしイントラ/インター判定結果を切り出し位置決定手段2へ出力するものとしたが、第一の符号化手段の構成はこれに限らず、例えば、図5に示した第二の符号化手段と同一の構成とし、バッファ112に記憶される符号化データを復号することにより、動きベクトルないしイントラ/インター判定結果を求めるような構成としてもよい。   In the first to third embodiments, the first encoding unit is configured as shown in FIG. 6, and the motion vector or intra / inter determination result obtained by the motion compensation prediction unit 111 is sent to the cut-out position determining unit 2. However, the configuration of the first encoding unit is not limited to this. For example, the first encoding unit has the same configuration as the second encoding unit shown in FIG. It is possible to obtain a motion vector or an intra / inter determination result by decoding.

実施の形態4
図10は実施の形態4による画像符号化装置を示すブロック図である。図において、1bは入力画像を符号化する第一の符号化手段であり、第一の符号化手段1bは動きベクトルとイントラ/インター判定結果を切り出し位置決定手段2aに、符号量制御情報を第2の符号化手段4aに出力する。画像切り出し手段3は、切り出し位置決定手段2aから出力される画像切り出し位置に従って、入力画像を切り出し、第二の符号化手段4aに入力する。第二の符号化手段4aは、第一の符号化手段1bから出力される符号量制御情報に従って、切り出し後の画像を符号化し、符号化データを出力する。
Embodiment 4
FIG. 10 is a block diagram showing an image coding apparatus according to the fourth embodiment. In the figure, 1b is a first encoding means for encoding an input image, and the first encoding means 1b extracts the motion vector and the intra / inter determination result to the position determining means 2a, and the code amount control information to the first. 2 to the encoding means 4a. The image cutout unit 3 cuts out an input image according to the image cutout position output from the cutout position determination unit 2a, and inputs the input image to the second encoding unit 4a. The second encoding unit 4a encodes the cut-out image according to the code amount control information output from the first encoding unit 1b, and outputs encoded data.

次に動作について説明する。第一の符号化手段1bは、例えば、実施の形態1で説明した図6のような構成とする。ここで、実施の形態1の第一の符号化手段1と異なるのは、動き補償予測手段111で決定された動きベクトルだけでなく、イントラ/インター判定結果も出力する点と、可変長符号化手段105から出力される符号量等をもとに算出等した符号量制御情報を出力する点である。   Next, the operation will be described. The first encoding means 1b is configured as shown in FIG. 6 described in the first embodiment, for example. Here, the first encoding unit 1 of the first embodiment is different from the first embodiment in that not only the motion vector determined by the motion compensation prediction unit 111 but also an intra / inter determination result is output, and variable length encoding. The code amount control information calculated based on the code amount output from the means 105 is output.

第一の符号化手段1bから出力された動きベクトルとイントラ/インター判定結果は切り出し位置決定手段2aに入力されて、画像切り出し位置が決定され、さらに、画像切り出し手段3で、この画像切り出し位置に従って入力画像が切り出される。これら、切り出し位置決定手段2aと画像切り出し手段3の動作は実施の形態3と同様であるので、説明を省略する。   The motion vector and the intra / inter determination result output from the first encoding unit 1b are input to the cutout position determination unit 2a to determine the image cutout position, and the image cutout unit 3 further determines the image cutout position according to the image cutout position. The input image is cut out. Since the operations of the cutout position determination unit 2a and the image cutout unit 3 are the same as those in the third embodiment, description thereof is omitted.

第二の符号化手段4aは、画像切り出し手段3から出力される切り出し後の画像を符号化する。このとき、第一の符号化手段1bから出力される符号量制御情報に従って、符号量の制御を行なう。例えば、第一の符号化手段1bにおいては、量子化手段104が固定の量子化ステップ幅で量子化を行なうよう制御し、符号量制御情報として、フレーム毎の符号量を出力するよう構成する。このとき、符号量制御情報はフレーム毎の画像の複雑度を表すので、第二の符号化手段4aはこの符号量制御情報に従って、各フレームの目標符号量を設定し、量子化ステップ幅を制御する。例えば、フレーム毎のビットレート変動を許容し、平均ビットレートの中でなるべく高画質に記録・伝送を行なう場合は、各フレームの目標符号量を符号量制御情報に比例するように設定し、各フレームの発生符号量が目標符号量に等しくなるように量子化ステップ幅を制御する。ここで符号量制御情報としては、例えば、符号量と量子化ステップ幅、あるいは符号量と量子化ステップ幅の積等を用いる。第一の符号化手段1bにおける量子化手段104が固定の量子化ステップ幅を用いている場合には、符号量制御情報として、符号量そのものを用いても良い。   The second encoding unit 4a encodes the cut-out image output from the image cut-out unit 3. At this time, the code amount is controlled according to the code amount control information output from the first encoding means 1b. For example, the first encoding unit 1b is configured to control the quantization unit 104 to perform quantization with a fixed quantization step width and output the code amount for each frame as the code amount control information. At this time, since the code amount control information represents the complexity of the image for each frame, the second encoding unit 4a sets the target code amount of each frame according to this code amount control information, and controls the quantization step width. To do. For example, when the bit rate fluctuation for each frame is allowed and recording / transmission is performed with the highest possible image quality within the average bit rate, the target code amount of each frame is set to be proportional to the code amount control information, The quantization step width is controlled so that the generated code amount of the frame becomes equal to the target code amount. Here, as the code amount control information, for example, a code amount and a quantization step width, or a product of the code amount and the quantization step width is used. When the quantization unit 104 in the first encoding unit 1b uses a fixed quantization step width, the code amount itself may be used as the code amount control information.

あるいは、固定ビットレート伝送において、フレーム毎の発生符号量をなるべく一定とする場合には、符号量制御情報と反比例するような変換で各フレームの量子化ステップ幅の初期値を設定することで、各フレームの発生符号量を一定に制御することが容易となる。   Alternatively, in the constant bit rate transmission, when the generated code amount for each frame is as constant as possible, by setting the initial value of the quantization step width of each frame by conversion inversely proportional to the code amount control information, It becomes easy to control the generated code amount of each frame to be constant.

また、第一の符号化手段1bは、ブロック毎の符号量を符号量制御情報として出力し、第二の符号化手段は、この符号量制御情報に従って、フレーム内の各部の量子化パラメータを決定するよう構成してもよい。   The first encoding unit 1b outputs the code amount for each block as code amount control information, and the second encoding unit determines the quantization parameter of each part in the frame according to the code amount control information. You may comprise.

以上のように実施の形態4においては、符号化を2度行なうことにより、手ぶれ補正を行なうだけでなく、高画質化または固定ビットレート化のための符号量制御を行なうことができ、手ぶれによる画像の乱れを取るとともに、高画質な画像符号化装置および安定したビットレート制御のできる画像符号化装置を得ることができる。   As described above, in the fourth embodiment, encoding is performed twice, so that not only camera shake correction but also code amount control for high image quality or constant bit rate can be performed. It is possible to obtain a high-quality image encoding device and an image encoding device capable of stable bit rate control while removing image disturbance.

本発明の実施の形態1における画像符号化装置を示すブロック図である。It is a block diagram which shows the image coding apparatus in Embodiment 1 of this invention. 本発明の実施の形態1における第一の符号化手段から出力される動きベクトルを示す説明図である。It is explanatory drawing which shows the motion vector output from the 1st encoding means in Embodiment 1 of this invention. 本発明の実施の形態1における切り出し位置決定手段の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the cut-out position determination means in Embodiment 1 of this invention. 本発明の実施の形態1における切り出し位置決定手段の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the cut-out position determination means in Embodiment 1 of this invention. 本発明の実施の形態1における第二の符号化手段の一構成例を示すブロック図である。It is a block diagram which shows the example of 1 structure of the 2nd encoding means in Embodiment 1 of this invention. 本発明の実施の形態1における第一の符号化手段の一構成例を示すブロック図である。It is a block diagram which shows the example of 1 structure of the 1st encoding means in Embodiment 1 of this invention. 本発明の実施の形態2における画像符号化装置を示す構成図である。It is a block diagram which shows the image coding apparatus in Embodiment 2 of this invention. 本発明の実施の形態2における画像符号化方法を示すフローチャートである。It is a flowchart which shows the image coding method in Embodiment 2 of this invention. 本発明の実施の形態3における画像符号化装置を示すブロック図である。It is a block diagram which shows the image coding apparatus in Embodiment 3 of this invention. 本発明の実施の形態4における画像符号化装置を示すブロック図である。It is a block diagram which shows the image coding apparatus in Embodiment 4 of this invention.

符号の説明Explanation of symbols

1、1a、1b 第一の符号化手段、
2、2a 切り出し位置決定手段、
3 画像切り出し手段、
4、4a 第二の符号化手段、
101 差分器、
102 切替器、
103 DCT手段、
104 量子化手段、
105 可変長符号化手段、
106 逆量子化手段、
107 逆DCT手段、
108 加算器、
109 切替器、
110 メモリ、
111 動き補償予測手段、
112 バッファ、
113 画像予測手段
201 CPU、
202 エンコーダ、
203 メモリ、
204 CPUバス。
1, 1a, 1b first encoding means,
2, 2a Cutout position determining means,
3 image cropping means,
4, 4a second encoding means,
101 differentiator,
102 switch,
103 DCT means,
104 quantization means,
105 variable length encoding means,
106 inverse quantization means,
107 inverse DCT means,
108 adders,
109 switch,
110 memory,
111 motion compensation prediction means,
112 buffers,
113 Image predicting means 201 CPU,
202 encoder,
203 memory,
204 CPU bus.

Claims (19)

入力画像および該入力画像の1フレーム前の画像である前画像に基づいて第1の動きベクトルを検出し第1の予測画像を得る第1の画像予測手段と、
前記第1の動きベクトルに基づいて画像切り出し位置を決定する切り出し位置決定手段と、
前記切り出し位置決定手段から出力される画像切り出し位置に基づいて前記入力画像を予め定めた画像サイズの切り出し画像に切り出す画像切り出し手段と、
前記切り出し画像および前記前画像に対応した切り出し画像に基づいて第2の動きベクトルを検出し第2の予測画像を得る第2の画像予測手段と、
前記第2の画像予測手段の出力を符号化する第2の可変長符号化手段とを備えた
ことを特徴とする画像符号化装置。
First image prediction means for detecting a first motion vector and obtaining a first predicted image based on an input image and a previous image that is an image one frame before the input image;
Cutout position determining means for determining an image cutout position based on the first motion vector;
Image cutout means for cutting out the input image into a cutout image of a predetermined image size based on the image cutout position output from the cutout position determining means;
Second image prediction means for detecting a second motion vector based on the clipped image and the clipped image corresponding to the previous image and obtaining a second predicted image;
An image encoding apparatus comprising: second variable length encoding means for encoding the output of the second image prediction means.
前記第1の画像予測手段は、
前記入力画像と前記第1の予測画像の差分である第1の差分を得る手段と、
当該第1の差分または前記入力画像を直交変換し、第1の変換係数を出力する手段と、
前記第1の変換係数を量子化する手段と
を備え、
前記第2の画像予測手段は、
前記切り出し画像と前記第2の予測画像の差分である第2の差分を得る手段と、
当該第2の差分または前記切り出し画像を直交変換し、第2の変換係数を出力する手段と、
前記第2の変換係数を量子化する手段とを備え、
前記第1の画像予測手段は前記入力画像を、前記第2の画像予測手段は前記切り出し画像を、それぞれ複数に分割したブロック単位に処理を行なう
ことを特徴とする請求項1記載の画像符号化装置。
The first image prediction means includes
Means for obtaining a first difference which is a difference between the input image and the first predicted image;
Means for orthogonally transforming the first difference or the input image and outputting a first transform coefficient;
Means for quantizing the first transform coefficient;
The second image prediction means includes:
Means for obtaining a second difference which is a difference between the clipped image and the second predicted image;
Means for orthogonally transforming the second difference or the cut-out image and outputting a second transform coefficient;
Means for quantizing the second transform coefficient,
2. The image encoding according to claim 1, wherein the first image predicting unit performs processing on the input image, and the second image predicting unit performs processing on a block unit obtained by dividing the cut image into a plurality of blocks. apparatus.
前記第1の画像予測手段から出力される量子化された前記第1の変換係数を符号化する第1の可変長符号化手段を備え、
当該第1の可変長符号化手段による符号化データのビットレートを、前記第2の可変長符号化手段による符号化データのビットレートよりも高く設定したことを特徴とする請求項2記載の画像符号化装置。
First variable length encoding means for encoding the quantized first transform coefficient output from the first image prediction means;
3. The image according to claim 2, wherein a bit rate of encoded data by the first variable length encoding unit is set higher than a bit rate of encoded data by the second variable length encoding unit. Encoding device.
前記第1の画像予測手段において、前記第1の変換係数の量子化のステップ幅を固定値に設定したことを特徴とする請求項2記載の画像符号化装置。 3. The image encoding apparatus according to claim 2, wherein the first image predicting means sets a quantization step width of the first transform coefficient to a fixed value. 前記第1の画像予測手段は前記第1の差分の大きさに、前記第2の画像予測手段は前記第2の差分の大きさにそれぞれ基づいて、動き補償予測モードと画面内モードとをブロック毎に切り替え可能であり、
前記第1の画像予測手段は、ブロック毎に前記第1の動きベクトルとともに、動き補償予測モードと画面内モードのどちらを選択するよう切り替えたかを示すモード情報とを前記切り出し位置決定手段に出力することを特徴とする請求項2記載の画像符号化装置。
The first image prediction means blocks the motion compensation prediction mode and the in-screen mode based on the first difference magnitude, and the second image prediction means based on the second difference magnitude. Can be switched every time,
The first image prediction means outputs mode information indicating which of the motion compensation prediction mode and the in-screen mode has been switched to the cutout position determination means together with the first motion vector for each block. The image coding apparatus according to claim 2.
前記切り出し位置決定手段は、前記第1の画像予測手段から出力された前記モード情報が画面内モードであった場合は、そのブロックの動きベクトルを(0、0)として扱うことを特徴とする請求項5記載の画像符号化装置。 The cutout position determination unit treats the motion vector of the block as (0, 0) when the mode information output from the first image prediction unit is an in-screen mode. Item 6. The image encoding device according to Item 5. 前記切り出し位置決定手段は、前記第1の画像予測手段から出力されたモード情報が動き補償予測モードであるブロックの動きベクトルのみを参照して、画像切り出し位置を決定することを特徴とする請求項5記載の画像符号化装置。 The cutout position determination unit determines an image cutout position with reference to only a motion vector of a block whose mode information output from the first image prediction unit is a motion compensation prediction mode. 5. The image encoding device according to 5. 前記第2の画像予測手段は、前記第2の差分の大きさにより動き補償予測モードと画面内モードとをブロック毎に切り替えるよう設定し、
前記第1の画像予測手段は、常に動き補償予測モードを選択するように設定したことを特徴とする請求項2に記載の画像符号化装置。
The second image prediction means is set to switch between the motion compensation prediction mode and the in-screen mode for each block according to the magnitude of the second difference,
The image coding apparatus according to claim 2, wherein the first image predicting unit is set to always select a motion compensation prediction mode.
前記第1の画像予測手段と前記第2の画像予測手段は、共通の画像予測手段であり、それぞれ必要な設定を外部からの設定手段により設定することを特徴とする請求項1から8のいずれかに記載の画像符号化装置。 9. The method according to claim 1, wherein the first image prediction unit and the second image prediction unit are common image prediction units, and each necessary setting is set by an external setting unit. An image encoding apparatus according to claim 1. 請求項1から9のいずれかに記載の画像符号化装置を備えたことを特徴とするカメラ。 A camera comprising the image encoding device according to claim 1. 請求項10記載のカメラを備えたことを特徴とする携帯端末機器。 A portable terminal device comprising the camera according to claim 10. 入力画像および該入力画像の1フレーム前の画像である前画像に基づいて第1の動きベクトルを検出し第1の予測画像を得る第1の画像予測ステップと、
前記第1の動きベクトルに基づいて画像切り出し位置を決定する切り出し位置決定ステップと、
前記切り出し位置決定ステップから出力される画像切り出し位置に基づいて前記入力画像を予め定めた画像サイズの切り出し画像に切り出す画像切り出しステップと、
前記切り出し画像および前記前画像に対応した切り出し画像に基づいて第2の動きベクトルを検出し第2の予測画像を得る第2の画像予測ステップと、
前記第2の画像予測ステップで得られた出力を符号化する第2の可変長符号化ステップとを備えた
ことを特徴とする画像符号化方法。
A first image prediction step of detecting a first motion vector based on an input image and a previous image that is an image one frame before the input image to obtain a first predicted image;
A cutout position determining step for determining an image cutout position based on the first motion vector;
An image cutout step of cutting the input image into a cutout image of a predetermined image size based on the image cutout position output from the cutout position determination step;
A second image prediction step of detecting a second motion vector based on the clipped image and the clipped image corresponding to the previous image and obtaining a second predicted image;
An image encoding method comprising: a second variable length encoding step for encoding the output obtained in the second image prediction step.
前記第1の画像予測ステップは、
前記入力画像と前記第1の予測画像の差分である第1の差分を得るステップと、
当該第1の差分または前記入力画像を直交変換し、第1の変換係数を出力するステップと、
前記第1の変換係数を量子化するステップと
を備え、
前記第2の画像予測ステップは、
前記切り出し画像と前記第2の予測画像の差分である第2の差分を得るステップと、
当該第2の差分または前記切り出し画像を直交変換し、第2の変換係数を出力するステップと、
前記第2の変換係数を量子化するステップとを備え、
前記第1の画像予測ステップは前記入力画像を、前記第2の画像予測ステップは前記切り出し画像を、それぞれ複数に分割したブロック単位に処理を行なう
ことを特徴とする請求項12記載の画像符号化方法。
The first image prediction step includes:
Obtaining a first difference that is a difference between the input image and the first predicted image;
Orthogonally transforming the first difference or the input image and outputting a first transform coefficient;
Quantizing the first transform coefficient,
The second image prediction step includes:
Obtaining a second difference that is a difference between the clipped image and the second predicted image;
Orthogonally transforming the second difference or the clipped image and outputting a second transform coefficient;
Quantizing the second transform coefficient,
13. The image encoding according to claim 12, wherein the first image prediction step performs processing in units of blocks obtained by dividing the input image, and the second image prediction step includes dividing the cut-out image into a plurality of blocks. Method.
前記第1の画像予測ステップから出力される量子化された前記第1の変換係数を符号化する第1の可変長符号化ステップを備え、
当該第1の可変長符号化ステップによる符号化データのビットレートを、前記第2の可変長符号化ステップによる符号化データのビットレートよりも高く設定したことを特徴とする請求項13記載の画像符号化方法。
A first variable length encoding step for encoding the quantized first transform coefficient output from the first image prediction step;
14. The image according to claim 13, wherein a bit rate of encoded data obtained by the first variable length encoding step is set higher than a bit rate of encoded data obtained by the second variable length encoding step. Encoding method.
前記第1の画像予測ステップにおいて、前記第1の変換係数の量子化のステップ幅を固定値に設定したことを特徴とする請求項13記載の画像符号化方法。 14. The image encoding method according to claim 13, wherein in the first image prediction step, a quantization step width of the first transform coefficient is set to a fixed value. 前記第1の画像予測ステップは前記第1の差分の大きさに、前記第2の画像予測ステップは前記第2の差分の大きさにそれぞれ基づいて、動き補償予測モードと画面内モードとをブロック毎に切り替え可能であり、
前記第1の画像予測ステップは、ブロック毎に前記第1の動きベクトルとともに、動き補償予測モードと画面内モードのどちらを選択するよう切り替えたかを示すモード情報とを前記切り出し位置決定ステップに出力することを特徴とする請求項13記載の画像符号化方法。
The first image prediction step blocks the motion compensation prediction mode and the in-screen mode based on the first difference size, and the second image prediction step based on the second difference size. Can be switched every time,
In the first image prediction step, mode information indicating which one of the motion compensation prediction mode and the in-screen mode is switched is output to the cutout position determination step together with the first motion vector for each block. The image encoding method according to claim 13.
前記切り出し位置決定ステップは、前記第1の画像予測ステップから出力された前記モード情報が画面内モードであった場合は、そのブロックの動きベクトルを(0、0)として扱うことを特徴とする請求項16記載の画像符号化方法。 The cutout position determination step treats the motion vector of the block as (0, 0) when the mode information output from the first image prediction step is an in-screen mode. Item 17. The image encoding method according to Item 16. 前記切り出し位置決定ステップは、前記第1の画像予測ステップから出力されたモード情報が動き補償予測モードであるブロックの動きベクトルのみを参照して、画像切り出し位置を決定することを特徴とする請求項16記載の画像符号化方法。 The cutout position determining step determines an image cutout position with reference to only a motion vector of a block whose mode information output from the first image prediction step is a motion compensation prediction mode. 16. The image encoding method according to 16. 前記第2の画像予測ステップは、前記第2の差分の大きさにより動き補償予測モードと画面内モードとをブロック毎に切り替えるよう設定し、
前記第1の画像予測ステップは、常に動き補償予測モードを選択するように設定したことを特徴とする請求項13に記載の画像符号化方法。
The second image prediction step is set to switch between the motion compensation prediction mode and the in-screen mode for each block according to the magnitude of the second difference.
The image encoding method according to claim 13, wherein the first image prediction step is set to always select a motion compensation prediction mode.
JP2005249858A 2005-08-30 2005-08-30 Apparatus and method for encoding image, camera, and portable terminal equipment Pending JP2007067694A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2005249858A JP2007067694A (en) 2005-08-30 2005-08-30 Apparatus and method for encoding image, camera, and portable terminal equipment
PCT/JP2006/312106 WO2007026457A1 (en) 2005-08-30 2006-06-16 Image encoder, camera, portable terminal, and image encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005249858A JP2007067694A (en) 2005-08-30 2005-08-30 Apparatus and method for encoding image, camera, and portable terminal equipment

Publications (1)

Publication Number Publication Date
JP2007067694A true JP2007067694A (en) 2007-03-15

Family

ID=37808560

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005249858A Pending JP2007067694A (en) 2005-08-30 2005-08-30 Apparatus and method for encoding image, camera, and portable terminal equipment

Country Status (2)

Country Link
JP (1) JP2007067694A (en)
WO (1) WO2007026457A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009290588A (en) * 2008-05-29 2009-12-10 Kyocera Corp Motion vector detecting device and its method, and image pickup device
JP2014123846A (en) * 2012-12-20 2014-07-03 Olympus Corp Imaging apparatus and imaging method
JP2015035001A (en) * 2014-11-04 2015-02-19 株式会社ニコン Shake correcting device and optical apparatus
JP2015170908A (en) * 2014-03-05 2015-09-28 日本放送協会 Image processing apparatus and program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9105923B2 (en) 2013-02-13 2015-08-11 Nanophase Technologies Corporation Zinc anode alkaline electrochemical cells containing bismuth

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61198879A (en) * 1985-02-27 1986-09-03 Matsushita Electric Ind Co Ltd Television signal processor
JPH082090B2 (en) * 1986-12-27 1996-01-10 株式会社東芝 Image motion compensation device
JPH01125068A (en) * 1987-11-09 1989-05-17 Matsushita Electric Ind Co Ltd Blur correcting device
JP2615693B2 (en) * 1987-11-09 1997-06-04 松下電器産業株式会社 Shake correction imaging device
JPH02250568A (en) * 1989-03-24 1990-10-08 Matsushita Electric Ind Co Ltd Shake correcting device
JPH0488761A (en) * 1990-07-31 1992-03-23 Sony Corp Device for correcting unsteady holding by hands
JP3465264B2 (en) * 1991-04-05 2003-11-10 ソニー株式会社 Apparatus and method for detecting motion of video data
JP3227173B2 (en) * 1991-06-24 2001-11-12 キヤノン株式会社 Imaging device and method thereof
JP3132055B2 (en) * 1991-07-15 2001-02-05 ソニー株式会社 Image processing apparatus and image processing method
JPH0614312A (en) * 1992-06-25 1994-01-21 Matsushita Electric Ind Co Ltd Coding device
JPH06165164A (en) * 1992-11-18 1994-06-10 Nec Corp Dynamic picture processor
JP3490142B2 (en) * 1994-06-24 2004-01-26 株式会社東芝 Moving image encoding method and apparatus
JPH1028270A (en) * 1996-07-11 1998-01-27 Kokusai Electric Co Ltd Image transmitting device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009290588A (en) * 2008-05-29 2009-12-10 Kyocera Corp Motion vector detecting device and its method, and image pickup device
JP2014123846A (en) * 2012-12-20 2014-07-03 Olympus Corp Imaging apparatus and imaging method
JP2015170908A (en) * 2014-03-05 2015-09-28 日本放送協会 Image processing apparatus and program
JP2015035001A (en) * 2014-11-04 2015-02-19 株式会社ニコン Shake correcting device and optical apparatus

Also Published As

Publication number Publication date
WO2007026457A1 (en) 2007-03-08

Similar Documents

Publication Publication Date Title
US7460042B2 (en) Encoding circuit, decoding circuit, encoder circuit, decoder circuit, and CABAC processing method
US8625916B2 (en) Method and apparatus for image encoding and image decoding
US7542623B2 (en) Image processing apparatus and method, and computer program and computer-readable storage medium
KR102032771B1 (en) Image predictive encoding device, image predictive encoding method, image predictive decoding device, and image predictive decoding method
RU2332809C2 (en) Image encoding device and shift predicting method using turning correlation
US9554145B2 (en) Re-encoding image sets using frequency-domain differences
EP2028865A2 (en) Bit depth dependent video coding
US20140211858A1 (en) Spatially adaptive video coding
JPWO2008139721A1 (en) Decoding device and decoding method
JP2007067694A (en) Apparatus and method for encoding image, camera, and portable terminal equipment
JP2014007469A (en) Image coding device and image coding method
US11683497B2 (en) Moving picture encoding device and method of operating the same
KR102413038B1 (en) Predictive image correction apparatus, image encoding apparatus, image decoding apparatus, and program
JP2003069997A (en) Moving picture encoder
US8218626B2 (en) Encoding control apparatus, encoding control method, and storage medium
JP2007336005A (en) Image coding apparatus and image coding method
JP6985899B2 (en) Image coding device and its control method and program
JP2004350030A (en) Telop superimposing device, telop superimposing method, and telop superimposing program
JP2005080004A (en) Dynamic image encoding device
JPH10145795A (en) Method for coding dynamic image, method for decoding, device for coding dynamic image and device for decoding dynamic image
JP2008258769A (en) Image encoding device and control method thereof, and computer program
JP2004208280A (en) Encoding apparatus and encoding method
JP2004080682A (en) Moving image data coding device, moving image data decoding device, and method thereof
JP2007208432A (en) Moving picture decoder and decoding program
JP2012109846A (en) Image encoder and camera system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070724