JP2012244501A - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
JP2012244501A
JP2012244501A JP2011114112A JP2011114112A JP2012244501A JP 2012244501 A JP2012244501 A JP 2012244501A JP 2011114112 A JP2011114112 A JP 2011114112A JP 2011114112 A JP2011114112 A JP 2011114112A JP 2012244501 A JP2012244501 A JP 2012244501A
Authority
JP
Japan
Prior art keywords
frame
image
encoded
encoding
inter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2011114112A
Other languages
Japanese (ja)
Other versions
JP2012244501A5 (en
JP5873255B2 (en
Inventor
Akihito Imai
彰人 今井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2011114112A priority Critical patent/JP5873255B2/en
Publication of JP2012244501A publication Critical patent/JP2012244501A/en
Publication of JP2012244501A5 publication Critical patent/JP2012244501A5/en
Application granted granted Critical
Publication of JP5873255B2 publication Critical patent/JP5873255B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an encoding technique that achieves high-compression-rate encoding and smooth bidirectional reproduction of high picture quality of an image comprising a plurality of frames having continuity.SOLUTION: The plurality of frames are divided into GOPs, and an I frame in a GOP is subjected to intra-frame encoding. Then P, B frames are subjected to inter-frame predictive encoding for forward reproduction and inter-frame predictive encoding for backward reproduction. At this time, the P frame is subjected to the encoding such that the same decoding result is obtained in both the directions. The same encoding result is therefore obtained in both the directions with respect to the B frame, so encoded data is generated only in the forward direction. Then a GOP is composed of encoded data of the I, P, and B frames for forward reproduction and encoded data of the P frame for backward reproduction.

Description

本発明は、連続性を有する複数フレームからなる画像を符号化する画像処理装置および画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method for encoding an image composed of a plurality of frames having continuity.

近年、有形の文化財等を静止画像あるいは動画像としてデジタル化して保存・公開するデジタルアーカイブが盛んに行われている。特に写真・絵画・図面等の平面物として表現可能な文化財については、デジタルカメラやデジタルスキャナを使用することで非常に高精度なデジタルデータの作成が可能となっている。   In recent years, digital archives that digitize tangible cultural assets as still images or moving images for storage and release have been actively performed. Especially for cultural assets that can be expressed as plane objects such as photographs, paintings, drawings, etc., it is possible to create very high-precision digital data by using digital cameras and digital scanners.

一方、立体物や、薄膜干渉や構造色を含むなど平面であっても観察方向や光源方向によって見え方が変化するような物体についてのデジタルアーカイブを行う場合、より大量のデータを取得する必要がある。そのために、被写体を取り囲むような複数の視点位置から被写体を撮影する多視点撮影を行うことが一般的である。多視点撮影の手法としては複数のカメラを用いる方法、カメラをアームやレール上に設置して移動しながら撮影する方法、被写体をターンテーブル状に設置して回転させながら連続的に撮影する方法等が知られている。また、カメラと被写体の位置関係を固定し、光源の位置や強さ、色を変化させながら連続的に撮影することも行われる。   On the other hand, when digital archiving is performed on objects that change their appearance depending on the viewing direction or the light source direction even if they are flat surfaces such as thin objects and thin film interference and structural colors, it is necessary to acquire a larger amount of data. is there. For this purpose, it is common to perform multi-viewpoint photography in which a subject is photographed from a plurality of viewpoint positions surrounding the subject. Multi-viewpoint shooting methods such as using multiple cameras, mounting the camera on an arm or rail and shooting while moving, setting the subject in a turntable and rotating continuously, etc. It has been known. In addition, the positional relationship between the camera and the subject is fixed, and continuous shooting is performed while changing the position, intensity, and color of the light source.

このようにして連続的に撮影された画像データは、主にコンピュータ上で再生表示される。例えば多視点撮影を行ったデータであれば、ユーザーの指示に従って画面内の被写体を回転させるかのように画像を切り替え、自由な角度で観賞することが行われる。   The image data continuously photographed in this way is mainly reproduced and displayed on a computer. For example, in the case of data obtained by multi-viewpoint shooting, images are switched as if the subject in the screen is rotated in accordance with a user's instruction, and viewing is performed at a free angle.

このような再生表示を行う場合、コンピュータ上に大量の画像データを取り込む必要があるため、画像データは圧縮符号化されていることが望ましい。同一被写体に対して連続的に撮影された画像は前後の画像と強い相関を持つ可能性が高い。そのため、H.264等の動画像の符号化に用いられているフレーム間予測符号化技術を用いることで、高い圧縮率が実現できる。   When such reproduction display is performed, it is necessary to capture a large amount of image data on a computer, and therefore it is desirable that the image data is compressed and encoded. There is a high possibility that images taken continuously for the same subject have a strong correlation with the preceding and following images. Therefore, a high compression rate can be realized by using the inter-frame predictive coding technique used for coding moving images such as H.264.

ここで、一般的なフレーム間予測符号化技術について説明する。フレーム間予測符号化とは、主に動画像において、着目するフレームと異なるフレーム(以下、参照フレーム)に基づいて予測画像を生成し、入力画像と予測画像の差分を符号化する方法である。一般にフレーム間予測符号化技術においては、符号化対象となる各フレームを、その符号化方法によってIフレーム、Pフレーム、Bフレームの3種類に分類する。Iフレームはフレーム間予測を用いずに符号化(以下、フレーム内符号化)されるフレームであり、他のフレームに依存せずに復号することができる。Pフレームは時間的に前のフレームを参照フレームとして使用する。Bフレームは時間的に前にあるフレームか後にあるフレーム、あるいはその双方を参照フレームとして使用する。PフレームおよびBフレームでは、入力画像と予測画像の差分だけを符号化すれば良いため、Iフレームと比較して高い圧縮率を達成することが可能である。ただし、PフレームおよびBフレームを復号する場合、その参照フレームが既に復号されている必要がある。従って、画像の復号はいずれかのIフレームから開始する必要がある。Iフレームから次のIフレームの手前のフレームまでをGOP(Group Of Pictures)と呼び、符号化あるいは復号の際の処理単位となる。   Here, a general inter-frame prediction encoding technique will be described. Interframe predictive coding is a method of generating a predicted image based on a frame (hereinafter referred to as a reference frame) different from a frame of interest mainly in a moving image and coding a difference between the input image and the predicted image. In general, in the inter-frame predictive encoding technique, each frame to be encoded is classified into three types of I frame, P frame, and B frame according to the encoding method. The I frame is a frame that is encoded without using inter-frame prediction (hereinafter referred to as intra-frame encoding), and can be decoded without depending on other frames. The P frame uses the previous frame in time as a reference frame. The B frame uses the previous frame in time, the subsequent frame, or both as reference frames. In the P frame and the B frame, since only the difference between the input image and the predicted image needs to be encoded, it is possible to achieve a higher compression rate than the I frame. However, when decoding a P frame and a B frame, the reference frame needs to be already decoded. Therefore, it is necessary to start decoding of an image from any I frame. A frame from an I frame to a frame before the next I frame is called a GOP (Group Of Pictures) and is a processing unit in encoding or decoding.

図17は、フレーム間予測符号化技術によって符号化された動画像の構成例を示した図であり、矩形は動画像内の各フレームを表している。各フレーム内のアルファベットは符号化方法を、数字は再生順序を示している。また矢印はフレームの参照関係を示している。例えば、I0は最初に復号され表示されるIフレームを示している。またI0を参照フレームとしてP2が復号され、I0とP2を参照フレームとしてB1が復号される。I0からB15までのフレームで1つのGOPを構成し、I16と、図示されていない次のIフレームの手前までの各フレームが、次のGOPを構成する。   FIG. 17 is a diagram illustrating a configuration example of a moving image encoded by the inter-frame predictive encoding technique, and a rectangle represents each frame in the moving image. The alphabet in each frame indicates the encoding method, and the numbers indicate the reproduction order. An arrow indicates a frame reference relationship. For example, I0 indicates an I frame that is first decoded and displayed. P2 is decoded using I0 as a reference frame, and B1 is decoded using I0 and P2 as a reference frame. A frame from I0 to B15 constitutes one GOP, and I16 and each frame before the next I frame (not shown) constitute the next GOP.

また、フレーム間予測と関連の深い技術として、動き補償と呼ばれる技術がある。これは、フレーム間予測において予測画像を生成する際、参照フレームをいくつかのブロックに分け、それぞれをある量移動させたフレーム画像を使用する技術である。この各ブロックの移動量を動きベクトルと呼び、符号化の際にはこの動きベクトルも同時に符号化する。   As a technique closely related to inter-frame prediction, there is a technique called motion compensation. This is a technique of using a frame image obtained by dividing a reference frame into several blocks and moving each by a certain amount when generating a predicted image in inter-frame prediction. The amount of movement of each block is called a motion vector, and this motion vector is also encoded at the time of encoding.

一般的な動画の符号化に用いられるフレーム間予測技術および動き補償技術は、高圧縮率を達成するために、時系列正方向への一定速度での再生に特化している。一方、多視点画像をコンピュータ上で再生表示する場合、ユーザーが被写体の画像を任意の方向に任意の速度で連続表示できることが望ましい。こうした表示は、動画像においては逆再生やスロー再生・高速再生といった特殊再生に相当する。   The inter-frame prediction technique and motion compensation technique used for encoding a general moving image are specialized for reproduction at a constant speed in the time-series positive direction in order to achieve a high compression rate. On the other hand, when a multi-viewpoint image is reproduced and displayed on a computer, it is desirable that the user can continuously display the subject image in an arbitrary direction at an arbitrary speed. Such display corresponds to special reproduction such as reverse reproduction, slow reproduction, and high-speed reproduction in a moving image.

一般的なフレーム間予測で圧縮符号化された動画像データから逆再生を実現する方法としては、再生するGOP内の全てのフレームを一括して復号してメモリ上に保持し、所望の再生順序に従って再生する方法が知られている。また、ユーザーから高速再生や逆再生の指示があった場合に、原動画データから用途に応じたビットストリームを圧縮符号化により生成する手法が提案されている(例えば、特許文献1参照)。また、逆再生時にはIフレームのみを使用することによって、逆再生時の負荷を低減する手法も提案されている(例えば、特許文献2参照)。   As a method of realizing reverse playback from moving image data compression-encoded by general inter-frame prediction, all the frames in the GOP to be played back are decoded and held in the memory, and the desired playback order The method of reproducing according to is known. In addition, there has been proposed a method of generating a bit stream corresponding to a purpose from original moving image data by compression encoding when a user gives an instruction for high-speed playback or reverse playback (see, for example, Patent Document 1). In addition, a method has been proposed in which only the I frame is used during reverse playback to reduce the load during reverse playback (see, for example, Patent Document 2).

特開平10-032787号公報Japanese Patent Laid-Open No. 10-032787 特開2004-289629号公報JP 2004-289629 A

しかしながら、上記従来の圧縮符号化方式では、高圧縮率かつ高画質、再生機器への負荷の低減を実現しつつ、順方向および逆方向による両方向での連続画像再生を行うことは困難であった。   However, with the conventional compression encoding method, it has been difficult to perform continuous image reproduction in both the forward direction and the reverse direction while realizing a high compression rate, high image quality, and a reduction in load on the reproduction device. .

例えば、再生するGOP内の全てのフレームを一括して復号する手法では、GOP内の全フレームを復号された状態で保持するためのメモリ領域と、適切な再生速度を保ってGOP内の全フレームを一括して復号するに足る演算速度が必要となる。また、上記特許文献1に記載の技術では、ユーザーが逆再生を指示した際に新たに逆再生用のビットストリームの生成を開始するため、再生中に自在に再生方向を反転させることは困難である。また、上記特許文献2に記載の技術では、再生中にユーザーが再生方向を自在に切り替えることが可能であるが、逆方向再生時にはIフレームのみを復号するため、画質が大きく劣化してしまう。   For example, in the method of decoding all the frames in the GOP to be played at once, a memory area for holding all the frames in the GOP in a decoded state, and all the frames in the GOP while maintaining an appropriate playback speed It is necessary to have a calculation speed that is sufficient to decode all of the above. Also, with the technique described in Patent Document 1, generation of a reverse playback bitstream is newly started when the user instructs reverse playback, so it is difficult to reverse the playback direction freely during playback. is there. In the technique described in Patent Document 2, the user can freely switch the playback direction during playback. However, since only the I frame is decoded during backward playback, the image quality is greatly degraded.

本発明は上述した問題を鑑みてなされたものであり、連続性を有する複数フレームからなる画像について、高圧縮率な符号化、および高画質かつスムーズな両方向再生を可能とする符号化技術を提供することを目的とする。   The present invention has been made in view of the above-described problems, and provides an encoding technique that enables high-compression encoding and high-quality and smooth bidirectional reproduction of images composed of a plurality of frames having continuity. The purpose is to do.

上記目的を達成するための一手段として、本発明の画像処理装置は以下の構成を備える。   As a means for achieving the above object, an image processing apparatus of the present invention comprises the following arrangement.

すなわち、被写体と撮像装置の位置関係を連続的に変化させながら撮影した複数フレームからなる画像を符号化して符号化画像を作成する画像処理装置であって、前記複数フレームを、フレーム内符号化を行う第1のフレームと、フレーム間予測符号化を行う第2のフレームに分類するフレーム分類手段と、前記第1のフレームについて、フレーム内符号化を行うフレーム内符号化手段と、前記第2のフレームについて、前記符号化画像を順方向に再生する際のフレーム並びにおけるフレーム間予測符号化を行う第1のフレーム間予測符号化手段と、前記第2のフレームについて、前記符号化画像を前記順方向とは逆方向に再生する際のフレーム並びにおけるフレーム間予測符号化を行う第2のフレーム間予測符号化手段と、前記フレーム内符号化手段で符号化された第1のフレームと、前記第1のフレーム間予測符号化手段で符号化された第2のフレーム、および前記第2のフレーム間予測符号化手段で符号化された第2のフレームを符号化単位として、前記符号化画像を作成する符号化画像の作成手段と、を有することを特徴とする。   That is, an image processing apparatus that creates an encoded image by encoding an image made up of a plurality of frames shot while continuously changing the positional relationship between the subject and the imaging device, wherein the plurality of frames are subjected to intra-frame encoding. A first frame to be performed, a frame classification means for classifying the second frame to be subjected to inter-frame predictive coding, an intra-frame coding means to perform intra-frame coding for the first frame, and the second frame First inter-frame predictive encoding means for performing inter-frame predictive encoding in a frame sequence when the encoded image is reproduced in the forward direction for the frame, and the encoded image for the second frame. Second inter-frame predictive encoding means for performing inter-frame predictive encoding in a frame sequence when reproducing in a direction opposite to the direction, A first frame encoded by the encoding means, a second frame encoded by the first inter-frame predictive encoding means, and encoded by the second inter-frame predictive encoding means And a coded image creating means for creating the coded image with the second frame as a coding unit.

本発明によれば、連続性を有する複数フレームからなる画像について、高圧縮率な符号化、および高画質かつスムーズな両方向再生を可能とする符号化技術を提供することができる。   According to the present invention, it is possible to provide an encoding technique that enables high-compression encoding and high-quality and smooth bidirectional reproduction of an image including a plurality of frames having continuity.

第1実施形態における画像処理装置の構成例を示すブロック図、FIG. 2 is a block diagram showing a configuration example of an image processing apparatus according to the first embodiment. 第1実施形態における画像符号化アプリケーションの論理構成例を示すブロック図、A block diagram showing a logical configuration example of an image encoding application in the first embodiment, 第1実施形態における画像符号化部の論理構成例を示すブロック図、A block diagram showing a logical configuration example of an image encoding unit in the first embodiment, 第1実施形態における原画像の撮影方法を示す模式図、FIG. 3 is a schematic diagram showing a method for capturing an original image in the first embodiment; 第1実施形態における符号化処理を示すフローチャート、The flowchart which shows the encoding process in 1st Embodiment, 第1実施形態における各フレームの分類と参照関係の一例を示す図、The figure which shows an example of the classification | category of each flame | frame in 1st Embodiment, and a reference relationship, 第1実施形態におけるフレーム間予測符号化処理を示すフローチャート、The flowchart which shows the inter-frame prediction encoding process in 1st Embodiment, 第1実施形態における画像再生アプリケーションの論理構成例を示すブロック図、FIG. 2 is a block diagram showing a logical configuration example of an image reproduction application in the first embodiment. 第1実施形態における画像再生用のGUI例を示す図、The figure which shows the GUI example for the image reproduction in 1st Embodiment, 第1実施形態における画像再生処理を示すフローチャート、The flowchart which shows the image reproduction process in 1st Embodiment, 第2実施形態における画像符号化アプリケーションの論理構成例を示すブロック図、A block diagram showing a logical configuration example of an image encoding application in the second embodiment, 第2実施形態における方向転換用情報付加部の論理構成例を示すブロック図、The block diagram which shows the logic structural example of the information addition part for direction change in 2nd Embodiment, 第2実施形態における各フレームの分類と参照関係の一例を示す図、The figure which shows an example of the classification | category of each flame | frame in 2nd Embodiment, and a reference relationship, 第2実施形態における符号化処理を示すフローチャート、The flowchart which shows the encoding process in 2nd Embodiment, 第2実施形態における画像再生アプリケーションの論理構成例を示すブロック図、A block diagram showing a logical configuration example of an image reproduction application in the second embodiment, 第2実施形態における画像再生処理を示すフローチャート、The flowchart which shows the image reproduction process in 2nd Embodiment, 一般的なフレーム間予測技術を用いた動画の符号化方法を説明するための図、である。It is a figure for demonstrating the encoding method of the moving image using the general inter-frame prediction technique.

以下、本発明の実施の形態を図面を参照して詳細に説明する。尚、以下の実施の形態は本発明の特許請求の範囲を限定するものではなく、また以下の実施の形態で説明されている特徴の組み合わせの全てが本発明を構成する上で必須のものとは限らない。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The following embodiments do not limit the scope of the claims of the present invention, and all combinations of features described in the following embodiments are indispensable for constituting the present invention. Is not limited.

<第1実施形態>
●画像処理装置
まず本実施形態における、連続した複数フレームからなる画像の符号化および復号を行う画像処理装置の構成について、図1〜図4を用いて説明する。
<First Embodiment>
Image Processing Apparatus First, the configuration of an image processing apparatus that performs encoding and decoding of an image composed of a plurality of continuous frames in the present embodiment will be described with reference to FIGS.

図1は、本実施形態における画像処理装置のハードウェア構成例を示すブロック図である。同図において、102〜107は画像処理装置101の構成要素である。102はメインバス、103はUI部、104はCPU、105はメインメモリ、106はHDDやSSD等のデータ保存部である。また107は、外部デバイス108やネットワーク等に接続可能なUSBやWi-Fi等の通信部、である。   FIG. 1 is a block diagram illustrating a hardware configuration example of an image processing apparatus according to the present embodiment. In the figure, reference numerals 102 to 107 are components of the image processing apparatus 101. 102 is a main bus, 103 is a UI unit, 104 is a CPU, 105 is a main memory, and 106 is a data storage unit such as an HDD or an SSD. Reference numeral 107 denotes a communication unit such as USB or Wi-Fi that can be connected to the external device 108 or a network.

本実施形態における符号化処理は、上記構成において汎用OS上で動作するアプリケーションとして実現される。尚、本実施形態における汎用OS並びにアプリケーションは、周知の技術によって作成されるソフトウェアプログラムによって実現可能である。よって、アプリケーションが汎用OS上で動作する詳細については、説明を省略する。   The encoding process in the present embodiment is realized as an application that operates on a general-purpose OS in the above configuration. Note that the general-purpose OS and application in the present embodiment can be realized by a software program created by a known technique. Therefore, the details of how the application operates on the general-purpose OS will be omitted.

以下、本実施形態における画像処理装置の動作について説明する。まず、データ保存部106に格納されているアプリケーションがCPU104からの指令により起動され、メインメモリ105に展開される。続いて、アプリケーション内の処理に従って、データ保存部106に格納されている原画像の各フレームのデータが、バス102経由でメインメモリ105に転送される。その後、アプリケーションによって符号化された各フレームのデータがメインメモリ105に生成され、バス102経由でデータ保存部106に格納される。ユーザーはUI部103を介してアプリケーションからの情報を随時取得し、またアプリケーションに対し指示を行う。   Hereinafter, the operation of the image processing apparatus according to the present embodiment will be described. First, an application stored in the data storage unit 106 is activated by a command from the CPU 104 and loaded in the main memory 105. Subsequently, the data of each frame of the original image stored in the data storage unit 106 is transferred to the main memory 105 via the bus 102 according to the processing in the application. Thereafter, the data of each frame encoded by the application is generated in the main memory 105 and stored in the data storage unit 106 via the bus 102. The user acquires information from the application at any time via the UI unit 103 and gives an instruction to the application.

符号化処理の対象となる原画像データは、事前に外部デバイス108等から通信部107を介してデータ保存部106に格納することができる。また、アプリケーションによって生成され、データ保存部106に格納された符号化済みの画像データを、通信部107を介して外部デバイス108に取り出すことも可能である。   The original image data to be encoded can be stored in advance in the data storage unit 106 via the communication unit 107 from the external device 108 or the like. In addition, encoded image data generated by an application and stored in the data storage unit 106 can be extracted to the external device 108 via the communication unit 107.

図2は、本実施形態における画像処理装置の論理構成を示すブロック図である。同図において201は、本実施形態における画像符号化処理を実施する画像符号化アプリケーションである。画像符号化アプリケーション201は、画像符号化部202からなる。   FIG. 2 is a block diagram illustrating a logical configuration of the image processing apparatus according to the present embodiment. In the figure, reference numeral 201 denotes an image encoding application that performs image encoding processing in the present embodiment. The image encoding application 201 includes an image encoding unit 202.

図3は、画像符号化部202における論理構成の詳細を示すブロック図である。同図において、301はデータ保存部106から符号化されていない原画像データを取得する原画像取得部である。302は取得された原画像データを、符号化単位となる複数のGOPに分割するGOP決定部である。このGOPは従来のフレーム間予測符号化技術と同様に、所定の複数フレームからなる。303はGOP内の各フレームを、それぞれ符号化方法に応じて分類するフレーム分類部であり、各フレームを内部予測フレーム(I)、前方向予測フレーム(P)、両方向予測フレーム(B)のいずれかに分類する。304は後述する305〜308の各部を制御してGOP内の各フレームの符号化を行う符号化部である。305はIフレームをフレーム内で予測符号化するフレーム内符号化部である。306はPフレームおよびBフレームを、ある再生順序に従ってフレーム間予測符号化するフレーム間予測符号化部である。すなわち、Pフレームについては該フレームより前に再生される参照フレームとの相関を利用した前方向予測による符号化を行う。またBフレームについては該フレームの前後に再生される参照フレームとの相関を利用した両方向予測による符号化を行う。308はフレーム間予測符号化で用いる動きベクトルを算出する動きベクトル算出部である。309は符号化部304が符号化したフレームデータを復号するフレーム復号部である。310は全てのフレームが符号化された画像データをデータ保存部106に格納する符号化画像出力部である。   FIG. 3 is a block diagram illustrating details of a logical configuration in the image encoding unit 202. In the figure, reference numeral 301 denotes an original image acquisition unit that acquires unencoded original image data from the data storage unit 106. Reference numeral 302 denotes a GOP determination unit that divides the acquired original image data into a plurality of GOPs as encoding units. This GOP is composed of a plurality of predetermined frames as in the conventional inter-frame predictive coding technique. 303 is a frame classification unit that classifies each frame in the GOP according to the encoding method, and each frame is classified as an internal prediction frame (I), a forward prediction frame (P), or a bidirectional prediction frame (B). Categorize. Reference numeral 304 denotes an encoding unit that controls each unit of 305 to 308 to be described later and encodes each frame in the GOP. Reference numeral 305 denotes an intraframe encoding unit that predictively encodes an I frame within a frame. Reference numeral 306 denotes an inter-frame predictive encoding unit that performs inter-frame predictive encoding on P frames and B frames according to a certain reproduction order. That is, the P frame is encoded by forward prediction using the correlation with the reference frame reproduced before the frame. The B frame is encoded by bi-directional prediction using the correlation with reference frames reproduced before and after the frame. Reference numeral 308 denotes a motion vector calculation unit that calculates a motion vector used in inter-frame prediction encoding. A frame decoding unit 309 decodes the frame data encoded by the encoding unit 304. Reference numeral 310 denotes an encoded image output unit that stores image data in which all frames are encoded in the data storage unit 106.

ここで本実施形態における原画像データとしては、静物である被写体を1度ずつ回転させながら回転軸に対し横方向から撮影した、全360フレームの画像を使用するものとする。図4は、本実施形態における原画像データの撮影方法を示した模式図である。同図において、401は被写体、402は被写体を乗せた回転台、403はデジタルカメラである。404は制御装置であり、回転台402とデジタルカメラ403を制御して、被写体401について連続撮影された360フレームの画像を自動的に取得し、保存する。すなわち、被写体と撮像装置の位置関係を連続的に変化させながら撮影を行った複数フレームを取得する。このように連続撮影された原画像データの各フレームには、最初に撮影した角度から右回りに0〜359までの通し番号が振られる。360フレームの撮影で被写体が1回転するため、359番と0番のフレームも連続性を持つ。   Here, as the original image data in the present embodiment, it is assumed that an image of all 360 frames taken from the lateral direction with respect to the rotation axis while rotating the subject that is a still object one by one is used. FIG. 4 is a schematic diagram illustrating a method for capturing original image data according to the present embodiment. In the figure, 401 is a subject, 402 is a turntable on which the subject is placed, and 403 is a digital camera. Reference numeral 404 denotes a control device that controls the rotary base 402 and the digital camera 403 to automatically acquire and store 360-frame images continuously photographed for the subject 401. That is, a plurality of frames obtained by photographing while continuously changing the positional relationship between the subject and the imaging device are acquired. Each frame of the original image data continuously photographed in this way is assigned a serial number from 0 to 359 clockwise from the angle at which the image was first photographed. Since the subject rotates once in 360 frame shooting, frames 359 and 0 also have continuity.

制御装置404に保存された原画像データは、制御装置404を外部デバイス108として画像処理装置101に接続することで、データ保存部106に格納することが可能である。あるいは画像処理装置101に回転台402とデジタルカメラ403を接続し、画像処理装置101上で回転台402とデジタルカメラ403を制御するアプリケーションを駆動させても良い。この場合、画像処理装置101が制御装置404を代替し、撮影された画像は直接、データ保存部106に格納される。   The original image data stored in the control device 404 can be stored in the data storage unit 106 by connecting the control device 404 to the image processing apparatus 101 as the external device 108. Alternatively, the turntable 402 and the digital camera 403 may be connected to the image processing apparatus 101, and an application for controlling the turntable 402 and the digital camera 403 may be driven on the image processing apparatus 101. In this case, the image processing apparatus 101 replaces the control apparatus 404, and the captured image is directly stored in the data storage unit.

●画像符号化処理
以下、画像符号化アプリケーション201によって実施される画像符号化処理について、図5のフローチャートを用いて詳細に説明する。
Image Encoding Process Hereinafter, the image encoding process performed by the image encoding application 201 will be described in detail with reference to the flowchart of FIG.

まずS501で原画像取得部301が、符号化対象となる原画像データの情報として、全フレーム数の他、画像サイズ、保存形式等の必要な情報を取得する。次にS502でGOP決定部302が、原画像データを複数の符号化単位、すなわちGOPに分割する。本実施形態では360フレームの原画像データを24個のGOPに分割するとする。各GOPは16フレームからなり、GOPの両端のフレームは隣接したGOPと共有される。すなわち、0番〜15番のフレームが最初のGOPを構成し、15番〜30番のフレームが次のGOPを構成する。そして最後のGOPは、345番〜359番および0番のフレームによって構成される。   First, in S501, the original image acquisition unit 301 acquires necessary information such as the image size and storage format in addition to the total number of frames as information of the original image data to be encoded. Next, in S502, the GOP determination unit 302 divides the original image data into a plurality of encoding units, that is, GOPs. In the present embodiment, it is assumed that original image data of 360 frames is divided into 24 GOPs. Each GOP consists of 16 frames, and the frames at both ends of the GOP are shared with adjacent GOPs. That is, frames 0 to 15 constitute the first GOP, and frames 15 to 30 constitute the next GOP. The last GOP is composed of frames 345-359 and 0.

次にS503により、S502で分割した各GOPに対して以下のS504〜S507の処理を施すためのループ制御が行われる。   Next, in S503, loop control for performing the following processing of S504 to S507 is performed on each GOP divided in S502.

S504でフレーム分類部303が、GOP内の各フレームをI/P/Bフレームのいずれかに分類することで、フレーム毎の符号化方法が決定される。具体的には、まずGOPの両端のフレームがIフレームに設定される。続いて残りのフレームが、画質やデータの圧縮率等の要素に応じて、Iフレーム、Pフレーム、Bフレームいずれかに設定される。ここで図6に、本実施形態の最初のGOPを構成する各フレームの分類と、符号化時におけるフレーム間の参照関係の一例を示す。同図における矩形は画像内の各フレームを表しており、各フレーム内のアルファベット(I/P/B)フレーム種別すなわち符号化方法を示し、数字はフレームの番号を示している。また矢印はフレームの参照関係を示している。本実施形態では図6に示すように、GOPの両端のフレームをIフレームに設定し、残りのフレームのうち偶数番のフレームをPフレーム、奇数番のフレームをBフレームに設定する。また上段の矢印は、後述するS506で右回り符号化される、PフレームおよびBフレームの参照関係を示している。また図6の下段の矢印は、後述するS507で左回り符号化される、Pフレームの参照関係を示している。   In S504, the frame classification unit 303 classifies each frame in the GOP into one of the I / P / B frames, thereby determining an encoding method for each frame. Specifically, first, frames at both ends of the GOP are set as I frames. Subsequently, the remaining frames are set to one of an I frame, a P frame, and a B frame according to factors such as image quality and data compression rate. Here, FIG. 6 shows an example of the classification of each frame constituting the first GOP of this embodiment and the reference relationship between frames at the time of encoding. The rectangle in the figure represents each frame in the image, the alphabet (I / P / B) frame type in each frame, that is, the encoding method, and the number represents the frame number. An arrow indicates a frame reference relationship. In this embodiment, as shown in FIG. 6, frames at both ends of the GOP are set as I frames, and among the remaining frames, even-numbered frames are set as P frames and odd-numbered frames are set as B frames. The upper arrow indicates the reference relationship between the P frame and the B frame that are encoded clockwise in S506, which will be described later. Further, the lower arrow in FIG. 6 indicates the reference relationship of the P frame that is encoded counterclockwise in S507 described later.

次にS505でフレーム内符号化部305が、既知のフレーム内符号化アルゴリズムを用いて、GOP内の各Iフレームの符号化を行う。本発明を構成する上で、使用するフレーム内符号化アルゴリズムには特に制限はなく、非可逆な圧縮を施すものであってもよいし、可逆な圧縮を施すものであってもよい。あるいは圧縮を行わなくてもよい。その後、S506でフレーム間予測符号化部306が、画像を右回り方向(順方向)に再生するためのPフレームおよびBフレームの符号化処理(第1のフレーム間予測符号化)を行う。またS507でフレーム間予測符号化部306が、画像を左回り方向(逆方向)に再生するためのPフレームの符号化処理(第2のフレーム間予測符号化)を行う。   Next, in S505, the intraframe encoding unit 305 encodes each I frame in the GOP using a known intraframe encoding algorithm. In constructing the present invention, the intraframe encoding algorithm to be used is not particularly limited, and may be irreversible compression or reversible compression. Alternatively, compression may not be performed. After that, in S506, the inter-frame predictive encoding unit 306 performs P frame and B frame encoding processing (first inter-frame predictive encoding) for reproducing the image in the clockwise direction (forward direction). In S507, the inter-frame prediction encoding unit 306 performs P-frame encoding processing (second inter-frame prediction encoding) for reproducing the image in the counterclockwise direction (reverse direction).

本実施形態では、あるPフレームに対し、それぞれ異なる参照フレームを用いた複数通りの符号化を行った場合、それらの復号結果が同一となるか、無視できる程度に誤差が小さくなるような符号化アルゴリズムを使用する。例えば、入力画像と予測画像の差分を可逆符号化するようなアルゴリズムであれば、同一のPフレームについてその再生方向によらず復号結果が等しくなる。この場合例えば、I0フレームを参照フレームとして符号化されたP2フレームの復号結果と、P4フレームを参照フレームとして符号化されたP2フレームの復号結果は同一とみなすことができる。したがって、各Bフレームの符号化を行う際の参照フレームとなるIフレームおよびPフレームの復号結果は、その再生方向によらず一定であるため、Bフレームの符号化結果も再生方向によらず一定となる。そこで本実施形態では、S507ではPフレームの符号化のみを行うとし、IフレームおよびBフレームについては、左回り再生時にもS506で生成した右回り用の符号化データを使用するように設定する。なお、S506およびS507におけるフレーム間予測符号化処理の詳細については後述する。   In the present embodiment, when a plurality of types of encoding using different reference frames are performed on a certain P frame, the decoding results are the same or encoding such that the error is small enough to be ignored. Use the algorithm. For example, if the algorithm is such that the difference between the input image and the predicted image is losslessly encoded, the decoding results are the same for the same P frame regardless of the playback direction. In this case, for example, the decoding result of the P2 frame encoded using the I0 frame as the reference frame and the decoding result of the P2 frame encoded using the P4 frame as the reference frame can be regarded as the same. Therefore, since the decoding result of the I frame and the P frame, which are reference frames when encoding each B frame, is constant regardless of the playback direction, the encoding result of the B frame is also constant regardless of the playback direction. It becomes. Therefore, in the present embodiment, it is assumed that only the P frame is encoded in S507, and the I frame and B frame are set to use the clockwise encoded data generated in S506 during the counterclockwise reproduction. Details of the inter-frame predictive encoding process in S506 and S507 will be described later.

S505におけるフレーム内符号化処理、S506およびS507におけるフレーム間予測符号化処理によってそれぞれ作成された各フレームの符号化データを組とすることで、当該GOPについての符号化データが完成する。すなわち、Pフレームについての右回り再生用の符号化データと左回り再生用の符号化データとをマージして、GOPを構成する必要がある。例えば、Pフレームについての左回り再生用の符号化データを、右回り再生用の符号化データに連続するようにマージすれば良い。   The encoded data of the GOP is completed by combining the encoded data of each frame created by the intra-frame encoding process in S505 and the inter-frame predictive encoding process in S506 and S507, respectively. That is, it is necessary to configure the GOP by merging the encoded data for clockwise playback and the encoded data for counterclockwise playback of the P frame. For example, the encoded data for counterclockwise reproduction of the P frame may be merged so as to be continuous with the encoded data for clockwise rotation.

なお、S507で作成された左回り再生用Pフレームの符号化データが、S506で作成された右回り再生用Pフレームと関連付けられていれば、GOPは上記構成に限定されない。例えば、右回り再生用の符号化データのみでGOPを構成し、左回り再生用の符号化データについては、右回り再生用の符号化データと関連付けられた別のデータファイルとして保存されていても良い。   Note that the GOP is not limited to the above configuration as long as the encoded data of the counterclockwise playback P frame created in S507 is associated with the clockwise playback P frame created in S506. For example, a GOP is composed only of encoded data for clockwise playback, and encoded data for counterclockwise playback may be stored as a separate data file associated with encoded data for clockwise playback. good.

上記S504〜S507による符号化処理が全てのGOPに対して施されると、S503のループ制御が終了する。そしてS508で符号化画像出力部310が、生成された各GOPの符号化データを符号化画像として集積し、データ保存部106に格納する。   When the encoding process in S504 to S507 is performed on all GOPs, the loop control in S503 is terminated. In step S508, the encoded image output unit 310 accumulates the generated encoded data of each GOP as an encoded image and stores it in the data storage unit 106.

●フレーム間予測符号化
以下、上記S506およびS507におけるフレーム間予測符号化処理について、図7のフローチャートを用いて詳細に説明する。図7は、ある再生方向についてのGOP内フレームの予測符号化処理を示している。すなわち上記S506では右回り方向(順方向)について図7のフローチャートに示す処理が実行され、その後S507において左回り方向(逆方向)について同処理が実行される。したがって、あるGOPにおいて、まずその順方向についてI,B,Pフレームからなる符号化データが作成され、次に逆方向についてPフレームのみからなる符号化データが作成される。
Interframe Predictive Encoding Hereinafter, the interframe predictive encoding process in S506 and S507 will be described in detail with reference to the flowchart of FIG. FIG. 7 shows a predictive encoding process of an intra-GOP frame for a certain reproduction direction. That is, in S506, the process shown in the flowchart of FIG. 7 is executed in the clockwise direction (forward direction), and then in S507, the process is executed in the counterclockwise direction (reverse direction). Therefore, in a certain GOP, first, encoded data including I, B, and P frames is generated in the forward direction, and then encoded data including only P frames is generated in the reverse direction.

まずS701により、GOP内の各フレームに対して以下のS702〜S708の処理を施すためのループ制御が行われる。このとき、フレームの処理順序は特に限定されないが、計算負荷の観点から、S506では右回り順、S507では左回りの順にフレームを処理することが望ましい。あるいはPフレームを先に符号化し、その後にBフレームの符号化を実行しても良い。   First, in S701, loop control for performing the following processes in S702 to S708 is performed on each frame in the GOP. At this time, the processing order of frames is not particularly limited, but from the viewpoint of calculation load, it is desirable to process the frames in the clockwise order in S506 and the counterclockwise order in S507. Alternatively, the P frame may be encoded first, and then the B frame may be encoded.

S702では、処理対象のフレームが既に符号化されているか否かの判定を行う。処理対象フレームが符号化済みである場合にはS701へ戻って次のフレームの処理を行うが、まだ符号化されていない場合にはS703へ進む。ここで、処理対象フレームが符号化済となる例としては、処理対象フレームがIフレームであり、S505あるいは他のGOPにおいて既に符号化されている場合がある。また、他のフレームの符号化を行う際に、その参照画像として後述するS705において符号化されている場合もある。さらに、このフローチャートがS507における処理である場合には、Bフレームについては符号化済であるものと判定する。これは上述したように、本実施形態では左回り再生時に、S506で生成した右回り用の符号化Bフレームデータを使用するためである。   In S702, it is determined whether or not the processing target frame has already been encoded. If the processing target frame has been encoded, the process returns to S701 to process the next frame. If it has not been encoded yet, the process proceeds to S703. Here, as an example in which the processing target frame is already encoded, the processing target frame is an I frame, which may be already encoded in S505 or another GOP. Further, when other frames are encoded, they may be encoded in S705, which will be described later, as the reference image. Furthermore, when this flowchart is the process in S507, it is determined that the B frame has been encoded. This is because, as described above, in the present embodiment, the clockwise B encoded B frame data generated in S506 is used during counterclockwise reproduction.

次にS703では、処理対象のフレームを符号化するために使用される全ての参照フレームに対してS704〜S706の処理を施すためのループ制御が行われる。なお、各フレームに対応する参照フレームの設定(フレーム参照関係)は、フレーム間予測符号化部306に予め保持されているものとする。   Next, in S703, loop control for performing the processing of S704 to S706 is performed on all reference frames used for encoding the processing target frame. It is assumed that the reference frame setting (frame reference relationship) corresponding to each frame is held in advance in inter-frame prediction encoding section 306.

S704では、参照フレームが既に符号化されているか否かの判定を行う。参照フレームが符号化されていない場合にはS705に進んで参照フレームの符号化を行う。ここでは参照フレームを処理対象フレームとして、S703〜S708の処理を再帰的に実行する。一方、S704で参照フレームが符号化済みの場合はS706へ進み、フレーム間予測符号化部306がフレーム復号部309を駆動し、参照フレームの符号化データを復号する。この復号処理には、従来のフレーム間予測符号化技術において用いられる復号処理が適用可能であるため、ここでは詳細な説明を省略する。   In S704, it is determined whether or not the reference frame has already been encoded. If the reference frame is not encoded, the process proceeds to S705 to encode the reference frame. Here, the processing from S703 to S708 is recursively executed with the reference frame as the processing target frame. On the other hand, if the reference frame has been encoded in S704, the process proceeds to S706, and the interframe predictive encoding unit 306 drives the frame decoding unit 309 to decode the encoded data of the reference frame. Since the decoding process used in the conventional inter-frame predictive coding technique can be applied to this decoding process, detailed description is omitted here.

上記S704〜S706による復号処理が全ての参照フレームに対して施されると、S703のループ制御が終了する。そしてS707でフレーム間予測符号化部306が動きベクトル算出部308を駆動して、動きベクトルの生成を行う。この動きベクトルの生成処理としては周知の動き補償技術が適用可能であるため、ここでは詳細な説明を省略する。   When the decoding process in S704 to S706 is performed on all reference frames, the loop control in S703 ends. In step S707, the inter-frame prediction encoding unit 306 drives the motion vector calculation unit 308 to generate a motion vector. Since a known motion compensation technique can be applied as the motion vector generation process, detailed description thereof is omitted here.

次にS708で、処理対象フレームの符号化データを生成する。詳細には、S706で生成した参照フレームの復号データとS707で生成した動きベクトルから予測フレーム画像データを生成し、処理対象フレームの原画像データと予測フレーム画像データとの差分を符号化する。該符号化された差分データと動きベクトルデータとの組が、処理対象フレーム(B,Pフレーム)の符号化データとなる。   Next, in S708, encoded data of the processing target frame is generated. Specifically, predicted frame image data is generated from the decoded data of the reference frame generated in S706 and the motion vector generated in S707, and the difference between the original image data and the predicted frame image data of the processing target frame is encoded. A set of the encoded difference data and motion vector data becomes encoded data of a processing target frame (B, P frame).

本実施形態では以上説明したように、画像再生方向を考慮したフレーム間予測符号化を行う。なお、以上説明した処理により生成された画像の符号化データもまた、本発明を構成する。   In the present embodiment, as described above, inter-frame predictive coding is performed in consideration of the image reproduction direction. Note that encoded data of an image generated by the processing described above also constitutes the present invention.

●画像再生装置
以下、上述したフレーム間予測符号化処理によって符号化された画像データの再生処理について説明する。
Image Reproducing Device Hereinafter, a process for reproducing image data encoded by the above-described interframe predictive encoding process will be described.

本実施形態における画像再生処理は、上述した図1に示す画像処理装置の構成において、汎用OS上で動作する画像再生アプリケーションとして実現される。   The image reproduction process in the present embodiment is realized as an image reproduction application that operates on a general-purpose OS in the configuration of the image processing apparatus shown in FIG. 1 described above.

図8は、本実施形態における画像再生アプリケーション1001の論理構成例を示すブロック図である。1002は、sRGB表示が可能なディスプレイデバイスであり、外部デバイス108としてハードウェアに接続されている
1003〜1005は、画像再生アプリケーション1001の構成要素である。1003はデータ保存部106から符号化済みの画像のフレームデータを取得するフレームデータ取得部である。1004はフレームデータ取得部1003が取得したフレームデータを復号するフレーム復号部であり、実質的に上記図3に示すフレーム復号部309と同様の機能を実現する。1005は画像表示部であり、UI部103の指示に従い、アプリケーションのGUIや復号済フレームを外部モニタ1002に表示する。また、フレーム復号部1004に対し復号処理の指示を行う。
FIG. 8 is a block diagram showing a logical configuration example of the image playback application 1001 in the present embodiment. 1002 is a display device capable of sRGB display, and is connected to the hardware as an external device 108.
Reference numerals 1003 to 1005 are components of the image reproduction application 1001. Reference numeral 1003 denotes a frame data acquisition unit that acquires frame data of an encoded image from the data storage unit 106. Reference numeral 1004 denotes a frame decoding unit that decodes the frame data acquired by the frame data acquisition unit 1003, and realizes substantially the same function as the frame decoding unit 309 shown in FIG. Reference numeral 1005 denotes an image display unit which displays an application GUI and a decoded frame on the external monitor 1002 in accordance with an instruction from the UI unit 103. In addition, it instructs the frame decoding unit 1004 to perform decoding processing.

画像再生アプリケーション1001は、メインメモリ105上に、少なくとも3フレーム分の復号済フレームを格納可能なメモリ領域を確保できるとする。なお、符号化データの形式が本実施形態とは異なる場合、必要なメモリ領域は増減する可能性がある。例えば符号化データがIフレームとPフレームだけで構成されている場合には、2フレーム分のメモリ領域を確保すれば動作可能である。またフレーム同士がより複雑な参照関係を持っている場合、例えば4フレーム分以上のメモリ領域が必要となる場合もある。   Assume that the image playback application 1001 can secure a memory area on the main memory 105 that can store at least three frames of decoded frames. Note that if the format of the encoded data is different from that of the present embodiment, the necessary memory area may increase or decrease. For example, when the encoded data is composed only of I frames and P frames, operation is possible if a memory area for two frames is secured. When frames have a more complicated reference relationship, for example, a memory area of 4 frames or more may be required.

●画像再生UI
ここで、本実施形態における画像再生アプリケーション1001のUIについて、図9を用いて説明する。同図において1101は、外部モニタ1002上に表示される画像再生アプリケーション1001の描画領域である。1102は、復号されたフレームのうちの1枚が表示される画像表示領域である。1103は画像を右回りに再生する旨を指示する右回り再生ボタン、1104は画像を左回りに再生する旨を指示す左回り再生ボタンであり、再生方向指定手段として機能する。また、1105は表示中のフレームで画像を停止させる旨を指示する再生停止ボタンである。以降、1103〜1105をまとめて再生指示ボタンと称する。1106は画像再生の終了を指示する終了ボタンである。
● Image playback UI
Here, the UI of the image reproduction application 1001 in the present embodiment will be described with reference to FIG. In the drawing, reference numeral 1101 denotes a drawing area of the image reproduction application 1001 displayed on the external monitor 1002. An image display area 1102 displays one of the decoded frames. 1103 is a clockwise playback button for instructing to play back an image in the clockwise direction, and 1104 is a counterclockwise playback button for instructing to play back the image in the counterclockwise direction. Reference numeral 1105 denotes a playback stop button for instructing to stop the image at the frame being displayed. Hereinafter, 1103 to 1105 are collectively referred to as playback instruction buttons. Reference numeral 1106 denotes an end button for instructing the end of image reproduction.

●画像再生処理
以下、本実施形態の画像再生アプリケーション1001によって実施される画像再生処理について、図10のフローチャートを用いて説明する。
Image Reproduction Processing Hereinafter, image reproduction processing performed by the image reproduction application 1001 of this embodiment will be described with reference to the flowchart of FIG.

まずS1201で画像表示部1005が、画像表示領域1102に画像中のいずれかのIフレームを、初期フレームとして表示する。本実施形態では0番のフレームを初期フレームとして表示するとする。詳細には、フレームデータ取得部1003によって0番フレームの符号化データが取得され、該取得された符号化データがフレーム復号部1004によって復号され、メインメモリ105に格納される。画像表示部1005は、メインメモリ105に格納された復号済フレームデータを画像表示領域1102に表示する。   First, in S1201, the image display unit 1005 displays any I frame in the image as an initial frame in the image display area 1102. In the present embodiment, it is assumed that frame 0 is displayed as the initial frame. Specifically, encoded data of the 0th frame is acquired by the frame data acquisition unit 1003, and the acquired encoded data is decoded by the frame decoding unit 1004 and stored in the main memory 105. The image display unit 1005 displays the decoded frame data stored in the main memory 105 in the image display area 1102.

そしてS1202では画像表示部1005が、次に画像表示領域1102に表示するフレーム(再生フレーム)を、最後に押下された再生指示ボタンに応じて決定する。具体的には、最後に押下された再生指示ボタンが再生停止ボタン1105であった場合、現在表示中のフレームを再生フレームとして決定する。また、右回り再生ボタン1103であれば、現在表示中のフレームに右回り方向に隣接するフレームを再生フレームとし、左回り再生ボタン1104であれば、現在表示中のフレームに左回り方向に隣接するフレームを再生フレームとする。   In step S1202, the image display unit 1005 determines a frame (playback frame) to be displayed next in the image display area 1102 in accordance with the playback instruction button that is pressed last. Specifically, when the playback instruction button that was pressed last is the playback stop button 1105, the currently displayed frame is determined as the playback frame. In the case of the clockwise playback button 1103, the frame that is adjacent to the currently displayed frame in the clockwise direction is set as the playback frame, and in the case of the counterclockwise playback button 1104, it is adjacent to the currently displayed frame in the counterclockwise direction. Let the frame be a playback frame.

次にS1203でフレーム復号部1004が、S1202で決定された再生フレームが復号済であるか否かの判定を行う。すなわち、再生フレームの復号済フレームデータが既にメインメモリ105に格納されている場合には、復号済みであるとしてS1206へ進むが、そうでない場合はS1204へ進む。   Next, in S1203, the frame decoding unit 1004 determines whether or not the playback frame determined in S1202 has been decoded. That is, if the decoded frame data of the playback frame is already stored in the main memory 105, the process proceeds to S1206 as having been decoded, but otherwise the process proceeds to S1204.

S1204ではフレーム復号部1004が、メインメモリ105に格納されている復号済みフレームデータのうち、再生フレームの復号に不要なものを破棄し、再生フレームおよびその参照フレームの復号済フレームデータの格納に必要な領域を確保する。   In S1204, the frame decoding unit 1004 discards the decoded frame data stored in the main memory 105 that is not necessary for decoding the playback frame, and is necessary for storing the decoded frame data of the playback frame and its reference frame. Secure areas.

例えば、図6に示すフレームの並びにおいて、I0、B1、P2が順番に再生され、3フレーム分の復号済みフレームデータがメインメモリ105に格納されている状況であるとする。このとき、B3を再生フレームとして復号する場合、B3およびその参照フレームであるP2とP4の3フレーム分の復号済フレームデータを格納する領域が必要となる。一方、I0とB1の復号済フレームデータについては不要となる。そこでフレーム復号部1004は、メインメモリ105上からI0およびB1のデータを削除して、B3およびP4の復号済フレームデータを格納する領域を確保する。   For example, assume that I0, B1, and P2 are reproduced in order in the frame sequence shown in FIG. 6 and decoded frame data for three frames is stored in the main memory 105. At this time, when decoding B3 as a playback frame, an area for storing the decoded frame data for three frames of B3 and its reference frames P2 and P4 is required. On the other hand, the decoded frame data of I0 and B1 are unnecessary. Therefore, the frame decoding unit 1004 deletes the data of I0 and B1 from the main memory 105, and secures an area for storing the decoded frame data of B3 and P4.

なお、メインメモリ105上により多くの復号済フレームデータの格納領域が確保可能である場合には、不要となったフレームの復号済フレームデータを即座に破棄する必要はない。再生後の復号済フレームデータをより多くメインメモリ105上に保持しておくことで、再生方向が変化した場合に復号済フレームデータを再利用することが可能となり、計算負荷が低減する。   If more storage area of decoded frame data can be secured on the main memory 105, it is not necessary to immediately discard the decoded frame data of a frame that is no longer needed. By holding more decoded frame data after reproduction on the main memory 105, the decoded frame data can be reused when the reproduction direction changes, and the calculation load is reduced.

次にS1205でフレーム復号部1004が、再生フレームの復号処理を行う。この復号処理には、従来のフレーム間予測符号化技術において用いられる復号処理を適用する。このとき、再生フレームの参照フレームが復号されていない場合には、同様の手段で先に参照フレームの復号を行い、それから再生フレームの復号を行う。なお、各フレームに対応する参照フレームの設定(フレーム参照関係)については、符号化時にフレーム間予測符号化部306において参照されたものと同様の内容が、フレーム復号部1004に予め保持されているものとする。再生フレームおよび参照フレームの復号済フレームデータはメインメモリ105に格納される。   In step S1205, the frame decoding unit 1004 performs playback frame decoding processing. For this decoding process, a decoding process used in the conventional inter-frame prediction encoding technique is applied. At this time, if the reference frame of the reproduction frame is not decoded, the reference frame is first decoded by the same means, and then the reproduction frame is decoded. As for the reference frame setting (frame reference relationship) corresponding to each frame, the same content as that referenced in the inter-frame prediction encoding unit 306 at the time of encoding is held in advance in the frame decoding unit 1004. Shall. The decoded frame data of the reproduction frame and the reference frame is stored in the main memory 105.

S1206では画像表示部1005が、再生フレームの復号済フレームデータを画像表示領域1102に表示する。そしてS1207で画像表示部1005が、再生処理の終了判定を行う。すなわち、S1202〜S1207の処理の間に終了ボタン1106が押下されていれば一連の処理を終了し、そうではない場合にはS1202に戻って次の再生フレームを決定する。   In S1206, the image display unit 1005 displays the decoded frame data of the playback frame in the image display area 1102. In step S1207, the image display unit 1005 determines the end of the reproduction process. That is, if the end button 1106 is pressed during the processes of S1202 to S1207, the series of processes is terminated, and if not, the process returns to S1202 to determine the next playback frame.

上述したようにS1202〜S1207の処理を適切な速度で繰り返すことにより、再生方向を任意に切り替えつつ、画像を再生することが可能となる。すなわち、S1202で決定される再生フレームが、再生方向に応じて所定のタイミングで逐次更新され、再生停止ボタン1105が押下された時点で、再生フレームの更新が停止する。   As described above, by repeating the processing of S1202 to S1207 at an appropriate speed, it is possible to reproduce an image while arbitrarily switching the reproduction direction. That is, the playback frame determined in S1202 is sequentially updated at a predetermined timing according to the playback direction, and playback frame update stops when the playback stop button 1105 is pressed.

以上説明したように本実施形態によれば、1つのPフレームに対し画像の再生方向に応じた2つの符号化データを生成する。これにより、再生機器(例えば外部モニタ1002)上で被写体の画像を任意の再生方向について連続的に再生することが可能となる。その際に、各フレームの符号化および復号には周知のフレーム間予測符号化技術が適用可能であるため、再生の方向に関わらず、周知の動画像符号化技術と同等の画質を実現することができる。なお、本実施形態の符号化方法によれば、従来の動画像符号化手法と比較してPフレームのデータ量が倍となるものの、IフレームおよびBフレームのデータ量については従来と同等である。従って本実施形態では、従来の動画符号化手法に近いデータの圧縮率を実現することができる。   As described above, according to the present embodiment, two encoded data corresponding to the reproduction direction of an image are generated for one P frame. As a result, it is possible to continuously reproduce the image of the subject in any reproduction direction on a reproduction device (for example, the external monitor 1002). At that time, since a well-known inter-frame predictive coding technique can be applied to the encoding and decoding of each frame, an image quality equivalent to the well-known moving picture coding technique should be realized regardless of the reproduction direction. Can do. According to the encoding method of the present embodiment, the data amount of the P frame is doubled as compared with the conventional moving image encoding method, but the data amount of the I frame and the B frame is the same as the conventional method. . Therefore, in this embodiment, it is possible to realize a data compression rate close to that of the conventional moving image encoding method.

また、本実施形態における符号化データを再生する場合、あるフレームの再生時に復号処理を行うフレーム数は最大で2枚となるため、復号処理にかかる計算負荷についても、従来の動画像符号化技術と同等程度に抑えることが可能である。また再生機器においては、復号済フレームデータを格納するために少なくとも3フレーム分のメモリ領域を用意すれば良く、したがって再生機器への負荷も抑制される。   Further, when the encoded data in the present embodiment is reproduced, the number of frames to be decoded at the time of reproduction of a certain frame is two at the maximum, so that the conventional moving image encoding technique is also applied to the calculation load for the decoding process. It is possible to suppress to the same level. Further, in the playback device, it is sufficient to prepare a memory area for at least 3 frames in order to store the decoded frame data, so that the load on the playback device is also suppressed.

なお、本実施形態では図4に示すように被写体401を右回り方向、すなわち水平方向に連続撮影した原画像データを符号化する例について説明したが、被写体401を垂直方向や斜め方向に連続撮影することも可能である。また、連続撮影の軌跡についても必ずしも直線とは限らず、デジタルカメラ403が曲線を描きながら連続撮影することも可能である。したがって、あるフレームについての再生方向として右回り/左回り方向のみならず。さらに複数方向が存在する場合も考えられる。同一の被写体に対して複数方向に連続撮影を行う場合、1回の連続撮影単位で、その順方向および逆方向での両方向再生を可能とするように、符号化画像を作成しておけば良い。その再生時には、例えば図9に示す画像再生UIにおいて再生指示ボタンによって指定可能な方向を増やす必要があるが、指示された再生方向に応じて再生フレームを設定、復号することは本実施形態と同様の方法で実現可能である。   In the present embodiment, as shown in FIG. 4, an example of encoding original image data obtained by continuously shooting the subject 401 in the clockwise direction, that is, in the horizontal direction has been described. However, the subject 401 is continuously shot in the vertical direction or the oblique direction. It is also possible to do. Also, the locus of continuous shooting is not necessarily a straight line, and the digital camera 403 can also perform continuous shooting while drawing a curve. Therefore, not only the clockwise / counterclockwise direction as the playback direction for a certain frame. Further, there may be a case where a plurality of directions exist. When continuous shooting is performed in a plurality of directions on the same subject, an encoded image may be created so that bidirectional playback in the forward direction and the reverse direction can be performed in one continuous shooting unit. . At the time of playback, for example, it is necessary to increase the direction that can be specified by the playback instruction button in the image playback UI shown in FIG. 9, but setting and decoding the playback frame according to the specified playback direction is the same as in this embodiment. It is realizable by this method.

<第2実施形態>
以下、本発明に係る第2実施形態について説明する。上述した第1実施形態では、あるPフレームに対してそれぞれが異なる参照フレームを用いた複数通りの符号化を行った場合に、それらの復号結果が同一とみなせるような条件で、画像の符号化処理および復号処理を行う例を示した。しかしながら、より高い圧縮率や、符号化および復号処理の計算負荷の低減を追求した場合、他の符号化アルゴリズムを採用することも考えられる。そこで第2実施形態においては、あるPフレームに対してそれぞれ異なる参照フレームを用いた複数通りの符号化を行った場合、それらの復号結果に有意差が発生するような符号化アルゴリズムを使用する例を示す。
Second Embodiment
Hereinafter, a second embodiment according to the present invention will be described. In the first embodiment described above, when a plurality of types of encoding using different reference frames are performed on a certain P frame, the image is encoded under such a condition that the decoding results can be regarded as the same. The example which performs a process and a decoding process was shown. However, when pursuing a higher compression ratio and a reduction in calculation load of encoding and decoding processing, it is conceivable to adopt another encoding algorithm. Therefore, in the second embodiment, when a plurality of types of encoding using different reference frames are performed on a certain P frame, an example of using an encoding algorithm that causes a significant difference between the decoding results is used. Indicates.

●画像処理装置
以下、第2実施形態における、連続した複数フレームからなる画像の符号化および復号を行う画像処理装置の構成について説明する。第2実施形態における画像処理装置のハードウェア構成は、上述した第1実施形態において図1に示した画像処理装置101の構成と同様であるため、説明を省略する。
Image Processing Device Hereinafter, a configuration of an image processing device that performs encoding and decoding of an image including a plurality of continuous frames in the second embodiment will be described. The hardware configuration of the image processing apparatus in the second embodiment is the same as that of the image processing apparatus 101 shown in FIG.

図11は、第2実施形態における画像処理装置の論理構成を示すブロック図である。同図において1301は、第2実施形態における画像符号化処理を実施する画像符号化アプリケーションである。画像符号化アプリケーション1301は、画像符号化部202と、第2実施形態における特徴的な機能を提供する方向転換用情報付加部1302からなる。なお、画像符号化部202の論理構成は上述した第1実施形態で図3に示した構成と同様であるため、説明を省略する。   FIG. 11 is a block diagram illustrating a logical configuration of the image processing apparatus according to the second embodiment. In the figure, reference numeral 1301 denotes an image encoding application for performing the image encoding process in the second embodiment. The image encoding application 1301 includes an image encoding unit 202 and a direction changing information adding unit 1302 that provides a characteristic function in the second embodiment. Note that the logical configuration of the image encoding unit 202 is the same as the configuration shown in FIG. 3 in the first embodiment described above, and a description thereof will be omitted.

図12は、方向転換用情報付加部1302における論理構成の詳細を示すブロック図である。同図において、1401はデータ保存部106から符号化画像データを取得する符号化画像取得部である。1402は右回り再生用の符号化データと左回り再生用の符号化データにおける同一フレームについて、その再生フレーム間における差分情報を、方向転換時に利用する方向転換用情報として生成する方向転換用情報生成部である。なおフレーム復号部309は上述した第1実施形態におけるフレーム復号部309,1004と同様に、符号化されたフレームデータを復号する。   FIG. 12 is a block diagram showing details of a logical configuration in the direction changing information adding unit 1302. In the figure, reference numeral 1401 denotes an encoded image acquisition unit that acquires encoded image data from the data storage unit 106. 1402 is a direction change information generation that generates difference information between the playback frames for the same frame in the encoded data for clockwise reproduction and the encoded data for counterclockwise reproduction as information for direction change used at the time of direction change. Part. The frame decoding unit 309 decodes the encoded frame data in the same manner as the frame decoding units 309 and 1004 in the first embodiment described above.

なお、第2実施形態において符号化対象となる原画像データとしては、上述した第1実施形態と同様に、静物である被写体を1度ずつ回転させながら撮影した、全360フレームの画像であるとする。   Note that the original image data to be encoded in the second embodiment is an image of all 360 frames obtained by rotating a subject that is a still object one by one, as in the first embodiment described above. To do.

●画像符号化処理
以下、第2実施形態の画像符号化アプリケーション1301によって実施される画像符号化処理について説明する。
Image Encoding Process The image encoding process performed by the image encoding application 1301 of the second embodiment will be described below.

ここで図13に、第2実施形態の最初のGOPを構成する各フレームの分類と参照関係の一例を示す。同図に示すように第2実施形態においても第1実施形態と同様にI,P,Bフレームを用いたフレーム間予測符号化を行っている。しかしながら、第2実施形態におけるPフレームの復号結果は再生方向によって異なるため、左回り再生用データにおいてもBフレームの符号化を行うことを特徴とする。そこで再生方向による復号結果の差を区別するため、図13では右回りに再生されるフレームには"-R"を、左回りに再生されるフレームには"-L"を付している。   Here, FIG. 13 shows an example of the classification and reference relationship of each frame constituting the first GOP of the second embodiment. As shown in the figure, also in the second embodiment, inter-frame prediction encoding using I, P, B frames is performed as in the first embodiment. However, since the decoding result of the P frame in the second embodiment differs depending on the reproduction direction, the B frame is encoded also in the counterclockwise reproduction data. Therefore, in order to distinguish the difference in the decoding result depending on the reproduction direction, in FIG. 13, “−R” is attached to the frame reproduced clockwise, and “−L” is attached to the frame reproduced counterclockwise.

なお、Bフレームの動きベクトルについては、右回り再生時と左回り再生時で共通のデータを使用しても良い。第2実施形態では再生方向により参照フレームの復号結果に差異はあるものの、それらは同一の原フレームから生成されたものであり、フレーム内の被写体の位置が変化するものではない。従って、Bフレームの動きベクトルについては再生方向によらず一定であると考えることができるため、再生方向によらず共通のデータが使用可能である。   For the motion vector of the B frame, common data may be used during clockwise playback and counterclockwise playback. In the second embodiment, although there are differences in the decoding result of the reference frame depending on the reproduction direction, they are generated from the same original frame, and the position of the subject in the frame does not change. Therefore, it can be considered that the motion vector of the B frame is constant regardless of the reproduction direction, so that common data can be used regardless of the reproduction direction.

また、図13中段の点線矢印は、各Pフレームの右回り再生時の復号画像と左回り再生時の復号画像との差分情報(方向転換用情報)による作用関係を示す。第2実施形態では各Pフレームの右回り再生時に、この差分情報を復号画像に加算することで、左回り再生時の復号画像を生成することができる。また、差分情報を左回り再生時の復号画像から減算することで、右回り再生時の復号画像を生成することができる。   Also, the dotted arrows in the middle of FIG. 13 indicate the operational relationship based on the difference information (direction change information) between the decoded image during clockwise playback and the decoded image during counterclockwise playback of each P frame. In the second embodiment, by adding this difference information to the decoded image during clockwise rotation of each P frame, a decoded image during counterclockwise reproduction can be generated. Further, by subtracting the difference information from the decoded image at the time of counterclockwise reproduction, a decoded image at the time of clockwise rotation can be generated.

以下、第2実施形態における画像符号化処理について、図14のフローチャートを用いて詳細に説明する。   Hereinafter, the image encoding process in the second embodiment will be described in detail with reference to the flowchart of FIG.

まずS1601で画像符号化部202が、原画像データを入力して符号化画像の生成を行う。この符号化画像の生成処理の詳細は、左回り再生用データについてもBフレームの符号化処理を行うことを除き、上述した第1実施形態において図5のフローチャートに示した処理と同様である。従って、S1601における符号化画像処理の詳細については説明を省略する。   First, in S1601, the image encoding unit 202 inputs original image data and generates an encoded image. The details of the encoded image generation process are the same as the process shown in the flowchart of FIG. 5 in the first embodiment described above, except that the B frame encoding process is also performed on the counterclockwise reproduction data. Therefore, description of the details of the encoded image processing in S1601 is omitted.

次にS1602では方向転換用情報付加部1302において、符号化画像の全フレームに対してS1603〜S1606の処理を施すためのループ制御が行われる。   Next, in S1602, the direction changing information adding unit 1302 performs loop control for performing the processes of S1603 to S1606 on all frames of the encoded image.

S1603では方向転換用情報生成部1402が、符号化画像取得部1401がデータ保存部106から取得した処理対象となる符号化済みフレームについて、Iフレームであるか否かの判定を行う。Iフレームであれば再生方向による復号結果の差異が生じないため、方向転換用の差分情報を生成する必要がない。従って、処理対象フレームがIフレームであればS1602に戻って次のフレームの処理を開始するが、IフレームでなければS1604へ移る。S1604では、処理対象のフレームが他のフレームの参照フレームとなっているか否かの判定を行う。例えばBフレーム等、他のフレームの参照フレームとなっていない場合は、やはり差分情報の生成は不要であるためS1602に戻る。一方、Pフレーム等、他のフレームの参照フレームとなっている場合にはS1605へ移る。   In S1603, the direction change information generation unit 1402 determines whether the encoded frame to be processed acquired by the encoded image acquisition unit 1401 from the data storage unit 106 is an I frame. Since there is no difference in the decoding result depending on the reproduction direction in the case of an I frame, there is no need to generate difference information for direction change. Therefore, if the processing target frame is an I frame, the process returns to S1602 to start processing the next frame, but if it is not an I frame, the process proceeds to S1604. In S1604, it is determined whether or not the processing target frame is a reference frame of another frame. For example, if it is not a reference frame of another frame such as a B frame, the difference information need not be generated, and the process returns to S1602. On the other hand, if the frame is a reference frame of another frame such as a P frame, the process proceeds to S1605.

S1605では、方向転換用情報生成部1402がフレーム復号部309を駆動し、右回り再生、左回り再生の両方向について処理フレームの復号を行う。そしてS1606では方向転換用情報生成部1402が、左回り再生時の復号データから右回り再生時の復号データを減算し、得られた差分を方向転換用情報とする。方向転換用情報は周知の符号化技術を用いて圧縮され、データ保存部106に格納される。なお、方向転換用情報は符号化画像データと関連付けられた別のデータファイルとして保存されても良いし、符号化画像データと方向転換用情報とをマージした新たな形式の画像データファイルとして保存されても良い。   In S1605, the direction change information generation unit 1402 drives the frame decoding unit 309 to decode the processing frame in both the clockwise and counterclockwise playback directions. In S1606, the direction change information generation unit 1402 subtracts the decoded data at the clockwise playback from the decoded data at the counterclockwise playback, and uses the obtained difference as the information for the direction change. The direction change information is compressed using a known encoding technique and stored in the data storage unit 106. The direction change information may be stored as a separate data file associated with the encoded image data, or may be stored as a new format image data file obtained by merging the encoded image data and the direction change information. May be.

●画像再生処理
以下、上述した第2実施形態の画像符号化方法によって符号化された画像データの再生処理について、説明する。第2実施形態における画像再生処理は、上述した第1実施形態において図1に示した画像処理装置101と同様の構成において、汎用OS上で動作する画像再生アプリケーションとして実現される。
Image Reproduction Processing Hereinafter, image data reproduction processing encoded by the above-described image encoding method according to the second embodiment will be described. The image reproduction process in the second embodiment is realized as an image reproduction application that operates on a general-purpose OS in the same configuration as the image processing apparatus 101 shown in FIG. 1 in the first embodiment.

図15は、第2実施形態における画像再生アプリケーション1701の論理構成例を示すブロック図である。1702は、方向転換用情報を復号し、メインメモリ150上の復号済フレームデータに対して加算あるいは減算を行う方向転換用演算部である。なお、画像再生アプリケーション1701におけるその他の構成については、第1実施形態の図8に示す画像再生アプリケーション1001と同様であるため、説明を省略する。また、第2実施形態における画像再生アプリケーション1701のGUIについても、第1実施形態で図9に示したものと同様であるため、説明を省略する。   FIG. 15 is a block diagram illustrating a logical configuration example of the image playback application 1701 in the second embodiment. Reference numeral 1702 denotes a direction change operation unit that decodes the direction change information and adds or subtracts the decoded frame data on the main memory 150. Since the other configuration of the image playback application 1701 is the same as that of the image playback application 1001 shown in FIG. 8 of the first embodiment, the description thereof is omitted. Also, the GUI of the image playback application 1701 in the second embodiment is the same as that shown in FIG. 9 in the first embodiment, and thus the description thereof is omitted.

以下、第2実施形態における画像再生処理について、図16のフローチャートを用いて説明する。第2実施形態における画像再生処理は、第1実施形態において図10のフローチャートに示した処理とほぼ同様であるが、S1205における再生フレームの復号処理の詳細が異なる。S1205における復号処理としては、第1実施形態ではフレーム復号部1004において、従来のフレーム間予測符号化技術に対応する復号処理を行う例を示した。第2実施形態では、再生方向変化時に参照フレームに方向転換用情報を適用する処理を行うため、以下の図16に示すような復号処理を行う。   Hereinafter, the image reproduction processing in the second embodiment will be described with reference to the flowchart of FIG. The image reproduction process in the second embodiment is substantially the same as the process shown in the flowchart of FIG. 10 in the first embodiment, but the details of the reproduction frame decoding process in S1205 are different. As a decoding process in S1205, in the first embodiment, an example in which the frame decoding unit 1004 performs a decoding process corresponding to a conventional interframe predictive coding technique has been shown. In the second embodiment, in order to perform the process of applying the direction change information to the reference frame when the reproduction direction is changed, the decoding process as shown in FIG. 16 below is performed.

図16は、第2実施形態における再生フレームの復号処理を示すフローチャートである。この処理は、主にフレーム復号部1004において行われる。   FIG. 16 is a flowchart showing decoding processing of a playback frame in the second embodiment. This processing is mainly performed in the frame decoding unit 1004.

まずS1801で、再生フレームがIフレームであるか否かの判定を行う。再生フレームがIフレームであれば処理はS1808へ移るが、Iフレームでない場合にはS1802へ移る。S1802では、フレーム復号部1004に予め保持されている再生フレームのフレーム参照関係を取得し、復号に必要な参照フレームを決定する。   First, in S1801, it is determined whether or not the playback frame is an I frame. If the reproduction frame is an I frame, the process proceeds to S1808. If the reproduction frame is not an I frame, the process proceeds to S1802. In S1802, the frame reference relationship of the reproduction frame held in advance in the frame decoding unit 1004 is acquired, and a reference frame necessary for decoding is determined.

次にS1803では、復号に必要な全ての参照フレームに対してS1804〜S1807の処理を施すためのループ制御が行われる。S1804では、参照フレームが復号済であるか否かの判定を行う。復号済であればS1806へ移るが、復号されていなければS1805へ移って参照フレームの復号を行う。ここでの復号には従来のフレーム間予測符号化技術において用いられる復号処理を適用する。   Next, in S1803, loop control for performing the processing of S1804 to S1807 is performed on all reference frames necessary for decoding. In S1804, it is determined whether or not the reference frame has been decoded. If it has been decoded, the process proceeds to S1806. If it has not been decoded, the process proceeds to S1805 to decode the reference frame. The decoding process used in the conventional inter-frame prediction encoding technique is applied to the decoding here.

S1806では、復号済みである参照フレームについて、その復号時における再生方向が現在の再生方向と同じであるか否かの判定を行う。同じであれば処理はS1803に戻って次の参照フレームの処理を開始するが、再生方向が異なる、すなわち復号時と変化している場合、処理はS1807へ移る。S1807では方向転換用演算部1702が、メインメモリ105上に格納されている参照フレームの復号済フレームデータに対し、方向転換用の差分情報を適用する。すなわち、現在の再生方向が左回りである(つまり参照フレーム復号時の再生方向は右回りである)場合、復号済フレームデータに方向転換用情報を加算する。一方、現在の再生方向が右回りである(つまり参照フレーム復号時の再生方向が左回りである)場合、復号済フレームデータから方向転換用情報を減算する。   In S1806, for the reference frame that has been decoded, it is determined whether or not the playback direction at the time of decoding is the same as the current playback direction. If they are the same, the process returns to S1803 to start the process of the next reference frame. However, if the playback direction is different, that is, changes from the time of decoding, the process moves to S1807. In S1807, the direction changing operation unit 1702 applies the direction change difference information to the decoded frame data of the reference frame stored in the main memory 105. That is, when the current reproduction direction is counterclockwise (that is, the reproduction direction at the time of decoding the reference frame is clockwise), the direction change information is added to the decoded frame data. On the other hand, when the current reproduction direction is clockwise (that is, the reproduction direction at the time of decoding the reference frame is counterclockwise), the direction change information is subtracted from the decoded frame data.

そしてS1808で再生フレームの復号を行う。ここでの復号には従来のフレーム間予測符号化技術で用いられる復号処理を適用する。   In step S1808, the playback frame is decoded. The decoding process used in the conventional inter-frame prediction encoding technique is applied to the decoding here.

以上説明したように第2実施形態によれば、Pフレームについての復号結果が再生方向によって同一とはならない符号化アルゴリズムを用いる場合であっても、任意の再生方向について被写体の画像を連続的に再生することが可能となる。したがって、再生方向による復号結果が同一であるという条件に縛られることなく、高圧縮率化や再生付加の低減を実現するような符号化アルゴリズムを適用した符号化を行うことが可能となる。   As described above, according to the second embodiment, even when an encoding algorithm is used in which the decoding results for P frames are not the same depending on the playback direction, the subject image is continuously displayed in an arbitrary playback direction. It can be played back. Therefore, it is possible to perform encoding using an encoding algorithm that realizes high compression ratio and reduction of reproduction addition without being restricted by the condition that the decoding results in the reproduction direction are the same.

<他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (10)

被写体と撮像装置の位置関係を連続的に変化させながら撮影した複数フレームからなる画像を符号化して符号化画像を作成する画像処理装置であって、
前記複数フレームを、フレーム内符号化を行う第1のフレームと、フレーム間予測符号化を行う第2のフレームに分類するフレーム分類手段と、
前記第1のフレームについて、フレーム内符号化を行うフレーム内符号化手段と、
前記第2のフレームについて、前記符号化画像を順方向に再生する際のフレーム並びにおけるフレーム間予測符号化を行う第1のフレーム間予測符号化手段と、
前記第2のフレームについて、前記符号化画像を前記順方向とは逆方向に再生する際のフレーム並びにおけるフレーム間予測符号化を行う第2のフレーム間予測符号化手段と、
前記フレーム内符号化手段で符号化された第1のフレームと、前記第1のフレーム間予測符号化手段で符号化された第2のフレーム、および前記第2のフレーム間予測符号化手段で符号化された第2のフレームを符号化単位として、前記符号化画像を作成する符号化画像の作成手段と、
を有することを特徴とする画像処理装置。
An image processing device that creates an encoded image by encoding an image composed of a plurality of frames taken while continuously changing a positional relationship between a subject and an imaging device,
Frame classification means for classifying the plurality of frames into a first frame that performs intra-frame coding and a second frame that performs inter-frame predictive coding;
Intra-frame coding means for performing intra-frame coding for the first frame;
First inter-frame predictive encoding means for performing inter-frame predictive encoding in a frame sequence when reproducing the encoded image in the forward direction for the second frame;
Second inter-frame predictive encoding means for performing inter-frame predictive encoding in a frame sequence when reproducing the encoded image in the direction opposite to the forward direction for the second frame;
A first frame encoded by the intra-frame encoding means, a second frame encoded by the first inter-frame predictive encoding means, and a code by the second inter-frame predictive encoding means A coded image creating means for creating the coded image with the second frame converted into a coding unit;
An image processing apparatus comprising:
前記第1および第2のフレーム間予測符号化手段は、同一のフレームに対する互いの復号結果が同一となるような符号化データを生成することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the first and second inter-frame predictive encoding units generate encoded data such that the decoding results of the same frame are the same. 前記フレーム分類手段は、前記第2のフレームをさらに、当該フレームより前に再生される参照フレームとの相関を利用した予測により符号化される前方向予測フレームと、当該フレームの前後に再生される参照フレームとの相関を利用した予測により符号化される両方向予測フレームに分類し、
前記第1のフレーム間予測符号化手段は、前記前方向予測フレームを符号化した符号化データと、前記両方向予測フレームを符号化した符号化データを作成し、
前記第2のフレーム間予測符号化手段は、前記前方向予測フレームを符号化した符号化データのみを作成することを特徴とする請求項2に記載の画像処理装置。
The frame classification means reproduces the second frame further in a forward prediction frame encoded by prediction using a correlation with a reference frame reproduced before the frame, and before and after the frame. Classify into bi-directional prediction frames encoded by prediction using correlation with reference frames,
The first inter-frame prediction encoding means creates encoded data obtained by encoding the forward prediction frame and encoded data obtained by encoding the bidirectional prediction frame,
The image processing apparatus according to claim 2, wherein the second inter-frame prediction encoding unit creates only encoded data obtained by encoding the forward prediction frame.
さらに、前記第1および第2のフレーム間予測符号化手段による同一フレームの符号化データを再生した再生フレーム間における差分情報を生成する差分情報の生成手段を有し、
前記符号化画像の作成手段は、前記符号化単位に前記差分情報を加えて、前記符号化画像を作成することを特徴とする請求項1に記載の画像処理装置。
Furthermore, it has difference information generating means for generating difference information between reproduced frames obtained by reproducing encoded data of the same frame by the first and second inter-frame predictive encoding means,
The image processing apparatus according to claim 1, wherein the coded image creating unit creates the coded image by adding the difference information to the coding unit.
前記フレーム分類手段は、前記第2のフレームをさらに、当該フレームより前に再生される参照フレームとの相関を利用した予測により符号化される前方向予測フレームと、当該フレームの前後に再生される参照フレームとの相関を利用した予測により符号化される両方向予測フレームに分類し、
前記第1および第2のフレーム間予測符号化手段は、前記前方向予測フレームを符号化した符号化データと、前記両方向予測フレームを符号化した符号化データを作成し、
前記差分情報の生成手段は、前記前方向予測フレームについて前記差分情報を生成することを特徴とする請求項4に記載の画像処理装置。
The frame classification means reproduces the second frame further in a forward prediction frame encoded by prediction using a correlation with a reference frame reproduced before the frame, and before and after the frame. Classify into bi-directional prediction frames encoded by prediction using correlation with reference frames,
The first and second inter-frame prediction encoding means create encoded data obtained by encoding the forward prediction frame and encoded data obtained by encoding the bidirectional prediction frame,
The image processing apparatus according to claim 4, wherein the difference information generation unit generates the difference information for the forward prediction frame.
請求項1乃至3のいずれか1項に記載の画像処理装置によって符号化された前記符号化画像を入力する入力手段と、
前記符号化画像の再生方向として、順方向および逆方向のいずれかを指定する再生方向指定手段と、
前記符号化画像における再生フレームを前記再生方向に応じて決定する再生フレームの決定手段と、
該決定された前記再生フレームを、前記再生方向が順方向である場合には前記第1のフレーム間予測符号化手段による符号化データを用いて復号し、前記再生方向が逆方向である場合には前記第2のフレーム間予測符号化手段による符号化データを用いて復号する復号手段と、
該復号された前記再生フレームを表示する表示手段と、
を有することを特徴とする画像処理装置。
Input means for inputting the encoded image encoded by the image processing apparatus according to any one of claims 1 to 3,
Reproduction direction designating means for designating either the forward direction or the reverse direction as the reproduction direction of the encoded image;
Playback frame determining means for determining a playback frame in the encoded image according to the playback direction;
The determined playback frame is decoded using the encoded data by the first inter-frame predictive encoding means when the playback direction is the forward direction, and when the playback direction is the reverse direction. Decoding means for decoding using the encoded data by the second inter-frame predictive encoding means;
Display means for displaying the decoded playback frame;
An image processing apparatus comprising:
請求項4または5に記載の画像処理装置によって符号化された前記符号化画像を入力する入力手段と、
前記符号化画像の再生方向として、順方向および逆方向のいずれかを指定する再生方向指定手段と、
前記符号化画像における再生フレームを、前記再生方向に応じて決定する再生フレームの決定手段と、
該決定された前記再生フレームを、前記再生方向が順方向である場合には前記第1のフレーム間予測符号化手段による符号化データを用いて復号し、前記再生方向が逆方向である場合には前記第2のフレーム間予測符号化手段による符号化データを用いて復号する復号手段と、
前記復号手段で前記再生フレームを復号する際に参照された参照フレームが、前記再生方向指定手段で指定された再生方向とは異なる再生方向において復号されたものである場合に、該再生フレームの復号結果に対して前記差分情報の加算または減算を行う演算手段と、
前記復号手段で復号された前記再生フレーム、または前記演算手段で前記差分情報の演算がなされた前記再生フレームを表示する表示手段と、
を有することを特徴とする画像処理装置。
Input means for inputting the encoded image encoded by the image processing device according to claim 4 or 5,
Reproduction direction designating means for designating either the forward direction or the reverse direction as the reproduction direction of the encoded image;
A reproduction frame determining means for determining a reproduction frame in the encoded image according to the reproduction direction;
The determined playback frame is decoded using the encoded data by the first inter-frame predictive encoding means when the playback direction is the forward direction, and when the playback direction is the reverse direction. Decoding means for decoding using the encoded data by the second inter-frame predictive encoding means;
When the reference frame referred to when the decoding unit decodes the reproduction frame is decoded in a reproduction direction different from the reproduction direction designated by the reproduction direction designation unit, the reproduction frame is decoded. Arithmetic means for adding or subtracting the difference information to the result;
Display means for displaying the playback frame decoded by the decoding means, or the playback frame for which the difference information has been calculated by the calculation means;
An image processing apparatus comprising:
前記再生方向指定手段はさらに再生停止の指定を可能とし、
前記再生フレームの決定手段は、前記再生方向指定手段で指定された再生方向に応じて前記再生フレームを所定のタイミングで逐次更新し、前記再生方向指定手段で再生停止が指定された場合に、該再生フレームの更新を停止することを特徴とする請求項6または7に記載の画像処理装置。
The playback direction designating means further enables designation of playback stop,
The playback frame determining means sequentially updates the playback frame at a predetermined timing according to the playback direction specified by the playback direction specifying means, and when playback stop is specified by the playback direction specifying means, 8. The image processing apparatus according to claim 6, wherein updating of the reproduction frame is stopped.
フレーム分類手段、フレーム内符号化手段、第1および第2のフレーム間予測符号化手段、符号化画像の作成手段を有する画像処理装置において、被写体と撮像装置の位置関係を連続的に変化させながら撮影した複数フレームからなる画像を符号化して符号化画像を作成する画像処理方法であって、
前記フレーム分類手段が、前記複数フレームを、フレーム内符号化を行う第1のフレームと、フレーム間予測符号化を行う第2のフレームに分類し、
前記フレーム内符号化手段が、前記第1のフレームについてフレーム内符号化を行い、
前記第1のフレーム間予測符号化手段が、前記第2のフレームについて、前記符号化画像を順方向に再生する際のフレーム並びにおけるフレーム間予測符号化を行い、
前記第2のフレーム間予測符号化手段が、前記第2のフレームについて、前記符号化画像を前記順方向とは逆方向に再生する際のフレーム並びにおけるフレーム間予測符号化を行い、
前記符号化画像の作成手段が、前記フレーム内符号化手段で符号化された第1のフレームと、前記第1のフレーム間予測符号化手段で符号化された第2のフレーム、および前記第2のフレーム間予測符号化手段で符号化された第2のフレームを符号化単位として、前記符号化画像を作成する
ことを特徴とする画像処理方法。
In an image processing apparatus having frame classification means, intra-frame coding means, first and second inter-frame prediction coding means, and coded image creation means, while continuously changing the positional relationship between the subject and the imaging device An image processing method for generating an encoded image by encoding a captured image of a plurality of frames,
The frame classification means classifies the plurality of frames into a first frame that performs intra-frame coding and a second frame that performs inter-frame predictive coding,
The intra-frame encoding means performs intra-frame encoding for the first frame;
The first inter-frame predictive encoding means performs inter-frame predictive encoding in a frame sequence when reproducing the encoded image in the forward direction for the second frame;
The second inter-frame predictive encoding means performs inter-frame predictive encoding in a frame sequence when reproducing the encoded image in the direction opposite to the forward direction for the second frame;
The encoded image creating means includes a first frame encoded by the intra-frame encoding means, a second frame encoded by the first inter-frame predictive encoding means, and the second frame An image processing method characterized in that the encoded image is created using the second frame encoded by the inter-frame predictive encoding means as an encoding unit.
コンピュータ装置で実行されることにより、該コンピュータ装置を請求項1乃至8のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   A non-transitory computer-readable storage medium storing a program for causing a computer device to function as each unit of the image processing device according to claim 1 when executed by the computer device.
JP2011114112A 2011-05-20 2011-05-20 Image processing apparatus and method, and image reproduction apparatus Expired - Fee Related JP5873255B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011114112A JP5873255B2 (en) 2011-05-20 2011-05-20 Image processing apparatus and method, and image reproduction apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011114112A JP5873255B2 (en) 2011-05-20 2011-05-20 Image processing apparatus and method, and image reproduction apparatus

Publications (3)

Publication Number Publication Date
JP2012244501A true JP2012244501A (en) 2012-12-10
JP2012244501A5 JP2012244501A5 (en) 2014-07-03
JP5873255B2 JP5873255B2 (en) 2016-03-01

Family

ID=47465705

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011114112A Expired - Fee Related JP5873255B2 (en) 2011-05-20 2011-05-20 Image processing apparatus and method, and image reproduction apparatus

Country Status (1)

Country Link
JP (1) JP5873255B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1198513A (en) * 1997-09-18 1999-04-09 Toshiba Corp Moving image coding/decoding device
JP2000125260A (en) * 1998-10-15 2000-04-28 Toshiba Corp Moving picture transmission server, moving picture transmission system using the server and moving picture transmission control method
JP2003116141A (en) * 2001-10-04 2003-04-18 Nippon Telegr & Teleph Corp <Ntt> Moving picture prediction encoding method and its decoding method, and apparatus for the same
JP2011082622A (en) * 2009-10-02 2011-04-21 Sony Corp Apparatus and method for processing image signal, apparatus and method for displaying image, program therefor, and system for displaying image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1198513A (en) * 1997-09-18 1999-04-09 Toshiba Corp Moving image coding/decoding device
JP2000125260A (en) * 1998-10-15 2000-04-28 Toshiba Corp Moving picture transmission server, moving picture transmission system using the server and moving picture transmission control method
JP2003116141A (en) * 2001-10-04 2003-04-18 Nippon Telegr & Teleph Corp <Ntt> Moving picture prediction encoding method and its decoding method, and apparatus for the same
JP2011082622A (en) * 2009-10-02 2011-04-21 Sony Corp Apparatus and method for processing image signal, apparatus and method for displaying image, program therefor, and system for displaying image

Also Published As

Publication number Publication date
JP5873255B2 (en) 2016-03-01

Similar Documents

Publication Publication Date Title
US10021302B2 (en) Video recording method and device
JP5888614B2 (en) IMAGING DEVICE, VIDEO CONTENT GENERATION METHOD, AND PROGRAM
US8428121B2 (en) Image pick-up apparatus for shooting and reproducing a moving image
KR101964126B1 (en) The Apparatus And Method For Transferring High Definition Video
WO2014141638A1 (en) Image processing apparatus and image processing method
WO2014141637A1 (en) Imaging apparatus and imaging apparatus control method
JP5883052B2 (en) Image processing apparatus and control method thereof
JP6270555B2 (en) Image processing system, imaging apparatus, and control method thereof
JP2020524450A (en) Transmission system for multi-channel video, control method thereof, multi-channel video reproduction method and device thereof
JP2008252874A (en) Moving picture coding method, moving picture decoding method, moving picture coding device, and moving picture decoding device
JP5873255B2 (en) Image processing apparatus and method, and image reproduction apparatus
US7991265B2 (en) Content recording apparatus capable of recording long content output
JP6245819B2 (en) Image processing apparatus and image processing method
JP5213557B2 (en) Moving image processing apparatus and moving image processing method
JP2006311366A (en) Image recorder and method for driving image recorder
JP2018074523A (en) Imaging device, control method thereof, program, and recording medium
JP5622167B2 (en) Movie imaging apparatus, imaging method, and program
JP2011146847A (en) Image reproduction controller, image reproduction control method, and imaging device
JP6294725B2 (en) Image processing apparatus, imaging apparatus, image processing apparatus control method, and program
JP4594163B2 (en) Image coding method and image coding apparatus
JP6436818B2 (en) Recording apparatus and method
JP6245818B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP6192319B2 (en) Image processing apparatus and image processing method
JP6282136B2 (en) Imaging apparatus and control method thereof
JP2013021654A (en) Reproduction apparatus

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140520

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140520

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150320

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150518

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20151218

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160115

R151 Written notification of patent or utility model registration

Ref document number: 5873255

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees