Nothing Special   »   [go: up one dir, main page]

JP5094752B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP5094752B2
JP5094752B2 JP2009011119A JP2009011119A JP5094752B2 JP 5094752 B2 JP5094752 B2 JP 5094752B2 JP 2009011119 A JP2009011119 A JP 2009011119A JP 2009011119 A JP2009011119 A JP 2009011119A JP 5094752 B2 JP5094752 B2 JP 5094752B2
Authority
JP
Japan
Prior art keywords
image
divided
divided image
encoded
identifier
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.)
Expired - Fee Related
Application number
JP2009011119A
Other languages
Japanese (ja)
Other versions
JP2010171621A5 (en
JP2010171621A (en
Inventor
玲子 藤野
進 五十嵐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2009011119A priority Critical patent/JP5094752B2/en
Publication of JP2010171621A publication Critical patent/JP2010171621A/en
Publication of JP2010171621A5 publication Critical patent/JP2010171621A5/ja
Application granted granted Critical
Publication of JP5094752B2 publication Critical patent/JP5094752B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本発明は、画像の符号化技術に関するものである。   The present invention relates to an image encoding technique.

原画像データが有する情報を損なわずにデータ量を抑制する方法として可逆符号化がある。例えば、可逆符号化方式として、DPCM変換(Difference Pulse Code Modulation)が知られている。DPCM変換は、原画像データにおける隣接画素の差分をとり、エントロピを減少させた後、ハフマン符号化を行って原画像データを符号化するものである。   There is lossless encoding as a method for suppressing the amount of data without losing information contained in the original image data. For example, DPCM conversion (Difference Pulse Code Modulation) is known as a lossless encoding method. In DPCM conversion, the difference between adjacent pixels in the original image data is taken, entropy is reduced, and then Huffman coding is performed to encode the original image data.

しかし、隣接画素の相関が低い場合は、ハフマン符号化によって得られる符号データのデータ量が原画像データのデータ量より大きくなってしまうことがある。可逆符号化を用いる際、データ量の最大値を保証する方法として、以下のような方法が知られている。   However, when the correlation between adjacent pixels is low, the amount of code data obtained by Huffman coding may be larger than the amount of original image data. The following methods are known as methods for guaranteeing the maximum data amount when using lossless encoding.

可逆符号化データのデータ量と予め定められた閾値とを比較し、データ量が閾値以上であれば原画像データを符号化ストリームに挿入し、閾値よりも小さければ可逆符号化データを符号化ストリームに挿入する。これにより、可逆符号化を施した場合においても、メモリ帯域やデータ伝送量の上限を保証することができる。
特開2008−092126号公報 特開2008−028534号公報
The amount of lossless encoded data is compared with a predetermined threshold. If the amount of data is equal to or greater than the threshold, the original image data is inserted into the encoded stream. If the amount is less than the threshold, the lossless encoded data is encoded. Insert into. Thereby, even when lossless encoding is performed, the upper limit of the memory bandwidth and the data transmission amount can be guaranteed.
JP 2008-092126 A JP 2008-028534 A

原画像データもしくは符号化データのいずれかのデータ形式で符号化ストリームに挿入されたのかを復号側が判断するためには、データ形式を判別するための識別子を、符号化ストリームに挿入しなくてはいけない。さらに、原画像データもしくは符号化データのいずれであるのか判別するためには、通常1bitあればよい。このように、データ形式を判別するために固定長の識別子を逐次付加する方法を、本明細書では「方式A」と呼ぶことにする。   In order for the decoding side to determine whether the data format of the original image data or encoded data is inserted into the encoded stream, an identifier for determining the data format must be inserted into the encoded stream. should not. Further, in order to determine whether the data is the original image data or the encoded data, 1 bit is usually sufficient. In this specification, a method of sequentially adding a fixed-length identifier in order to determine the data format will be referred to as “method A” in this specification.

方式Aを用いた場合、識別子のデータ長は、画像の分割数に識別子長を乗じた値となる。そのため、符号化ストリーム長の最大値は、原画像データのデータ長に先の識別子のデータ長を加算した値となる。つまり、方式Aは、識別子のデータ長が短いため、画像全体の符号化ストリームのデータ長の最大値を短くすることができるというメリットがある。しかし、一般的に撮像素子から伝送される画像にあっては、可逆符号化を施しても圧縮率が100%を超えることは殆どなく、原画像データが選択される頻度は低い。それにも関わらず、分割画像毎にかならず識別子を挿入することは、符号化ストリームのデータ長をいたずらに増大させることになる。   When the method A is used, the data length of the identifier is a value obtained by multiplying the number of image divisions by the identifier length. Therefore, the maximum value of the encoded stream length is a value obtained by adding the data length of the previous identifier to the data length of the original image data. That is, since the data length of the identifier is short, the method A has an advantage that the maximum data length of the encoded stream of the entire image can be shortened. However, in general, in an image transmitted from an image sensor, the compression rate hardly exceeds 100% even when lossless encoding is performed, and the frequency of selecting original image data is low. Nevertheless, inserting an identifier for every divided image will unnecessarily increase the data length of the encoded stream.

この問題を解決する方法として、データ形式ごとに異なるビット長の識別子を挿入する方法がある。この方法を本明細書では「方式B」と呼ぶことにする。例えば、符号化データには識別子を挿入せず、原画像データに対してのみ、識別子を挿入する。原画像データの識別子は、可逆符号化のエントロピ符号化の符号コードとして、決して起こりえないビット・パターンでなければならない。例えば、エントロピ符号化にハフマン符号化を用いる場合は、ハフマン符号の最大長は16ビットであるため、識別子長は16ビット以上を要する。具体例として示すと、識別子長を16ビットとした場合、ビット・パターンは0xFFNN(N:任意の値)(例:0xFFB0)となる。   As a method of solving this problem, there is a method of inserting an identifier having a different bit length for each data format. This method will be referred to as “method B” in this specification. For example, an identifier is not inserted into encoded data, but an identifier is inserted only into original image data. The identifier of the original image data must be a bit pattern that can never occur as a code code of entropy encoding of lossless encoding. For example, when Huffman coding is used for entropy coding, the maximum length of the Huffman code is 16 bits, so the identifier length needs to be 16 bits or more. As a specific example, when the identifier length is 16 bits, the bit pattern is 0xFFNN (N: arbitrary value) (example: 0xFFB0).

さらに、識別子はバイト・バウンダリで挿入しなければならない。そのため、識別子挿入前の符号化ストリームがバイト・バウンダリで終わるように、ビット(パディング・ビット)を付加しなければならない。   In addition, identifiers must be inserted at the byte boundary. For this reason, bits (padding bits) must be added so that the encoded stream before the identifier insertion ends at the byte boundary.

しかし、一般的に撮像素子から伝送される画像にあっては、可逆符号化を施しても圧縮率が100%を超えることは殆どないため、最大圧縮率を保証しながらも、符号化ストリーム長を抑制することができる。ところが、全ての分割画像の圧縮率が100%を超え、原画像データが選択された場合、符号化データには、画像分割数分の識別子長とパディング・ビットが必要となる。そのため、全ての分割画像において、原画像データが選択される場合には、方式Bは方式Aに比べて符号化効率が低下することは自明である。   However, in general, in an image transmitted from an image sensor, even when lossless encoding is performed, the compression rate rarely exceeds 100%, so the encoded stream length is guaranteed while ensuring the maximum compression rate. Can be suppressed. However, when the compression rate of all the divided images exceeds 100% and the original image data is selected, the encoded data requires identifier lengths and padding bits for the number of image divisions. Therefore, when original image data is selected for all divided images, it is obvious that the encoding efficiency of the method B is lower than that of the method A.

本発明は以上の問題に鑑みて成されたものであり、上記2つの方式に係る問題を解決し、圧縮率100%を保証する符号化ストリームを生成する為の技術を提供することを目的とする。   The present invention has been made in view of the above problems, and has as its object to provide a technique for solving the problems related to the above two systems and generating an encoded stream that guarantees a compression rate of 100%. To do.

本発明の目的を達成するために、例えば、本発明の画像処理装置は以下の構成を備える。   In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement.

即ち、入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで、分割画像の符号化分割画像を生成する画像処理装置であって、
前記符号化分割画像のデータ量と、前記分割画像のデータ量と、の大小比較を行い、当該大小比較の結果に基づいて、前記分割画像、前記符号化分割画像、の何れかを前記分割画像の符号化結果として選択する選択手段と、
前記選択手段が選択した符号化結果を、符号化ストリームに格納する第1の格納制御手段と、
前記入力画像を構成するそれぞれの分割画像について前記選択手段が選択した符号化結果が前記分割画像、前記符号化分割画像の何れであるのかを特定するための識別子であって、該特定のために該識別子に要求される複数種のデータ構造のうち事前に決定されたデータ構造を有する識別子を、前記符号化ストリームに格納する第2の格納制御手段と、
前記第1の格納制御手段、前記第2の格納制御手段、により完成した前記符号化ストリームのデータ量に基づいて、前記入力画像の次に入力される画像について前記第2の格納制御手段で用いる識別子のデータ構造を決定する決定手段と
を備えることを特徴とする。
That is, an input image is divided into a plurality of divided images, by performing lossless encoding on the divided image, an image processing apparatus for generating an encoded divided picture of the divided images,
The data amount of the encoded divided image and the data amount of the divided image are compared, and based on the result of the size comparison, either the divided image or the encoded divided image is the divided image. Selecting means for selecting as an encoding result of
First storage control means for storing an encoding result selected by the selection means in an encoded stream;
An identifier for specifying whether the encoding result selected by the selection unit for each divided image constituting the input image is the divided image or the encoded divided image. Second storage control means for storing, in the encoded stream, an identifier having a data structure determined in advance among a plurality of types of data structures required for the identifier ;
Based on the data amount of the encoded stream completed by the first storage control means and the second storage control means, the second storage control means uses the image input next to the input image. Determining means for determining the data structure of the identifier.

本発明の構成によれば、上記2つの方式に係る問題を解決し、圧縮率100%を保証する符号化ストリームを生成することができる。   According to the configuration of the present invention, it is possible to solve the problems related to the above two methods and generate an encoded stream that guarantees a compression rate of 100%.

以下、添付図面を参照し、本発明の好適な実施形態について説明する。なお、以下説明する実施形態は、本発明を具体的に実施した場合の一例を示すもので、特許請求の範囲に記載の構成の具体的な実施例の1つである。   Preferred embodiments of the present invention will be described below with reference to the accompanying drawings. The embodiment described below shows an example when the present invention is specifically implemented, and is one of the specific examples of the configurations described in the claims.

[第1の実施形態]
本実施形態では、画像を符号化する機能、符号化された画像を復号する機能、を有する画像処理装置について説明する。画像を符号化する機能は、デジタルカメラやデジタルカムコーダが有する撮像素子から読み出された画像や、ネットワークを介して受信した画像を、符号化対象とする。そして、この画像が有する情報を欠損させることなく、この画像のデータ量を、取得時のデータ量と同じ若しくはそれ以下のデータ量に圧縮(符号化)する。
[First Embodiment]
In the present embodiment, an image processing apparatus having a function for encoding an image and a function for decoding an encoded image will be described. The function of encoding an image is to encode an image read from an image sensor included in a digital camera or digital camcorder or an image received via a network. Then, the data amount of the image is compressed (encoded) to a data amount equal to or less than the data amount at the time of acquisition without losing information included in the image.

図16は、本実施形態に係る画像処理装置としてのデジタルカメラのハードウェア構成例を示す図である。撮像対象の像は、レンズ1601を介して、CCDやCMOSセンサなどの撮像素子1602上に結像される。撮像素子1602は、この結像された像をアナログ信号に変換し、このアナログ信号を後段のA/D変換器1603に送出する。   FIG. 16 is a diagram illustrating a hardware configuration example of a digital camera as an image processing apparatus according to the present embodiment. An image to be imaged is formed on an image sensor 1602 such as a CCD or CMOS sensor via a lens 1601. The image sensor 1602 converts the image thus formed into an analog signal, and sends this analog signal to the A / D converter 1603 at the subsequent stage.

A/D変換器1603は、撮像素子1602から受けたアナログ信号をデジタル信号に変換する。メモリ制御回路1607は、この変換されたデジタル信号をデータ(画像データ)としてA/D変換器1603から取得すると、この画像データを画像処理部1604に送出する。画像処理部1604は、この画像データに対して周知の画像補間処理や色変換処理などを施す。例えば、この画像データがベイヤ配列である場合には、この画像データをRGB画像データに変換する。   The A / D converter 1603 converts the analog signal received from the image sensor 1602 into a digital signal. When the memory control circuit 1607 acquires the converted digital signal as data (image data) from the A / D converter 1603, the memory control circuit 1607 sends the image data to the image processing unit 1604. The image processing unit 1604 performs known image interpolation processing, color conversion processing, and the like on this image data. For example, when the image data is a Bayer array, the image data is converted into RGB image data.

メモリ制御回路1607は、画像処理部1604による処理後の画像データをこの画像処理部1604から取得すると、この取得した画像データをメモリ1605に格納する。メモリ1605は、撮像された静止画像や動画像のデータを一時的に格納するためのメモリであって、所定枚数の静止画像(所定フレーム数分の静止画像)を格納するための領域を有する。このメモリ1605は読み書き可能なメモリであるので、メモリ制御回路1607は、メモリ1605に対するデータ書込み専用の複数のメモリ制御部と、メモリ1605に対するデータ読出し専用の複数のメモリ制御部と、を有する。   When the memory control circuit 1607 acquires the image data processed by the image processing unit 1604 from the image processing unit 1604, the memory control circuit 1607 stores the acquired image data in the memory 1605. The memory 1605 is a memory for temporarily storing captured still image and moving image data, and has an area for storing a predetermined number of still images (a predetermined number of still images). Since the memory 1605 is a readable / writable memory, the memory control circuit 1607 includes a plurality of memory control units dedicated to writing data to the memory 1605 and a plurality of memory control units dedicated to reading data from the memory 1605.

メモリ1605に格納された画像データはメモリ制御回路1607によって再度読み出され、D/A変換器1608と画像分割部1610と、に送出される。D/A変換器1608は、この画像データをアナログ信号に変換し、この変換したアナログ信号を画像表示部1609に送出する。これにより、画像表示部1609の表示画面上には、このアナログ信号が示す画像(撮像された画像)が表示される(再生される)ことになる。   The image data stored in the memory 1605 is read again by the memory control circuit 1607 and sent to the D / A converter 1608 and the image dividing unit 1610. The D / A converter 1608 converts the image data into an analog signal, and sends the converted analog signal to the image display unit 1609. As a result, the image (captured image) indicated by the analog signal is displayed (reproduced) on the display screen of the image display unit 1609.

一方で、画像分割部1610は、メモリ制御回路1607から受けた画像データ(入力画像)を、符号化処理単位(分割画像)毎に分割する。そして画像分割部1610は、この分割したそれぞれの分割画像を符号化部1611に送出する。符号化部1611は、分割画像毎の符号化結果と、分割画像毎の符号化結果の識別子と、を含む符号化ストリームを生成する。メモリ制御回路1607は、符号化部1611が生成した符号化ストリームを記憶媒体1606に記録する。記憶媒体1606には、SDカード等の、画像処理装置に着脱可能なリムーバブルな媒体が利用される。   On the other hand, the image dividing unit 1610 divides the image data (input image) received from the memory control circuit 1607 for each encoding processing unit (divided image). Then, the image dividing unit 1610 sends each divided image to the encoding unit 1611. The encoding unit 1611 generates an encoded stream including an encoding result for each divided image and an identifier of the encoding result for each divided image. The memory control circuit 1607 records the encoded stream generated by the encoding unit 1611 in the storage medium 1606. As the storage medium 1606, a removable medium such as an SD card that can be attached to and detached from the image processing apparatus is used.

記録モードスイッチ1622は、撮像の開始を指示するためのもので、ユーザがこの記録モードスイッチ1622を押下すると、撮像開始の指示がシステム制御部1620に対して入力される。   The recording mode switch 1622 is used to instruct the start of imaging. When the user presses the recording mode switch 1622, an instruction to start imaging is input to the system control unit 1620.

ここで、このデジタルカメラには、ユーザが操作する為のモードダイアル1621が備わっている。モードダイアル1621は、撮像モード、再生モードの何れかを選択するためのものである。ユーザがモードダイアル1621を操作して撮像モードを選択すると、システム制御部1620は、レンズ1601を介して得た像の画像データに基づく画像を画像表示部1609に表示させると共に、記録モードスイッチ1622を有効状態にする。記録モードスイッチ1622が有効状態となって初めて、撮像可能な状態となる。撮像モードにおいてユーザが記録モードスイッチ1622を押下すると、上述の通り撮像開始指示がシステム制御部1620に対して入力されるので、システム制御部1620は、画像処理装置を構成する各部の動作制御を行い、上述した処理を実現する。即ち、レンズ1601を介して得た像の画像データを符号化し、符号化ストリームとして記憶媒体1606に記録する処理を実現する。   Here, this digital camera is provided with a mode dial 1621 for user operation. A mode dial 1621 is used to select either the imaging mode or the playback mode. When the user operates the mode dial 1621 to select the imaging mode, the system control unit 1620 causes the image display unit 1609 to display an image based on the image data of the image obtained through the lens 1601 and also sets the recording mode switch 1622. Enable it. Only when the recording mode switch 1622 is in an effective state can an image be captured. When the user presses the recording mode switch 1622 in the imaging mode, an imaging start instruction is input to the system control unit 1620 as described above. Therefore, the system control unit 1620 performs operation control of each unit constituting the image processing apparatus. The above-described processing is realized. That is, the image data of the image obtained through the lens 1601 is encoded, and a process of recording the encoded data as a coded stream on the storage medium 1606 is realized.

一方、ユーザがモードダイアル1621を操作して再生モードを選択すると、システム制御部1620は画像処理装置を構成する各部の動作制御を行い、以下に説明する各処理を実現する。   On the other hand, when the user operates the mode dial 1621 to select a playback mode, the system control unit 1620 controls the operation of each unit constituting the image processing apparatus, and implements each process described below.

メモリ制御回路1607は、記憶媒体1606に記録されている符号化ストリームを順次読み出し、読み出した符号化ストリームを復号化部1613に送出する。復号化部1613は、メモリ制御回路1607から受けた符号化ストリームを復号する。画像合成部1612は、復号化部1613が1枚の画像を構成するそれぞれの分割画像について復号した結果をまとめることで1枚の画像を復元する。メモリ制御回路1607は、画像合成部1612が復元したそれぞれの画像のデータを画像合成部1612から取得し、取得した画像データをD/A変換器1608に送出する。D/A変換器1608は、この画像データをアナログ信号に変換し、この変換したアナログ信号を画像表示部1609に送出する。これにより、画像表示部1609の表示画面上には、このアナログ信号が示す画像(撮像された画像)が表示される(再生される)ことになる。   The memory control circuit 1607 sequentially reads the encoded stream recorded in the storage medium 1606 and sends the read encoded stream to the decoding unit 1613. The decoding unit 1613 decodes the encoded stream received from the memory control circuit 1607. The image synthesizing unit 1612 restores one image by collecting the results of decoding of the respective divided images that form one image by the decoding unit 1613. The memory control circuit 1607 acquires the data of each image restored by the image composition unit 1612 from the image composition unit 1612, and sends the obtained image data to the D / A converter 1608. The D / A converter 1608 converts the image data into an analog signal, and sends the converted analog signal to the image display unit 1609. As a result, the image (captured image) indicated by the analog signal is displayed (reproduced) on the display screen of the image display unit 1609.

ROM1623には、画像処理装置の設定データや、システム制御部1620による実行対象のコンピュータプログラムが格納されている。更に、ROM1623には、以下に説明する処理において既知のデータとして説明するものについても格納されている。即ち、システム制御部1620は、このROM1623に格納されているコンピュータプログラムやデータを用いて処理を実行することで、画像処理装置を構成する各部の動作制御を行う。これにより、本実施形態に係る画像処理装置は、以下に説明する各処理を実現することになる。   The ROM 1623 stores setting data of the image processing apparatus and a computer program to be executed by the system control unit 1620. Further, the ROM 1623 also stores data described as known data in the processing described below. In other words, the system control unit 1620 executes processing using the computer program and data stored in the ROM 1623, thereby controlling the operation of each unit constituting the image processing apparatus. As a result, the image processing apparatus according to the present embodiment realizes each process described below.

<符号化部1611>
図1は、符号化部1611の詳細な機能構成例を示すブロック図である。図1に示した各部はハードウェアでもって構成されているものとするが、その一部若しくは全部をコンピュータプログラムで実現しても良い。
<Encoding unit 1611>
FIG. 1 is a block diagram illustrating a detailed functional configuration example of the encoding unit 1611. Although each part shown in FIG. 1 shall be comprised with hardware, you may implement | achieve part or all with a computer program.

上述の通り、符号化部1611には、1枚の画像を構成する複数の分割画像が分割画像単位で入力されるので、符号化部1611は、分割画像単位で符号化処理を行うことになる。以下では、1枚の分割画像を符号化する為の符号化部1611の動作について説明するが、同様の動作は、他の分割画像に対しても行われることになる。   As described above, since a plurality of divided images constituting one image are input to the encoding unit 1611 in units of divided images, the encoding unit 1611 performs encoding processing in units of divided images. . In the following, the operation of the encoding unit 1611 for encoding one divided image will be described, but the same operation is performed for other divided images.

可逆符号化部107は、画像分割部1610から送出された分割画像(RAWデータ)に対して、可逆符号化方式に従った可逆符号化を行う。以下では、RAWデータに対する可逆符号化結果(符号化分割画像)のデータを「CODEデータ」と呼称する。可逆符号化部107で用いる可逆符号化方式には、画像が有する情報(画質)を損なうことなくこの画像を圧縮することができるのであれば、どのような方式を適用してもよい。例えば、可逆符号化方式として、JPEGのDPCM変換やJPEG−LS、JPEG2000などの静止画可逆符号化方式を用いても構わないし、H.264などの動画符号化方式におけるIスライスの可逆符号化方式を用いても構わない。   The lossless encoding unit 107 performs lossless encoding on the divided image (RAW data) sent from the image dividing unit 1610 according to the lossless encoding method. Hereinafter, data of a lossless encoding result (encoded divided image) for RAW data is referred to as “CODE data”. As the lossless encoding method used by the lossless encoding unit 107, any method may be applied as long as the image can be compressed without impairing information (image quality) of the image. For example, as a lossless encoding method, a still image lossless encoding method such as JPEG DPCM conversion, JPEG-LS, or JPEG2000 may be used. A lossless encoding method for I slices in a moving image encoding method such as H.264 may be used.

比較部101は、画像分割部1610から入力されたRAWデータのデータ量と、可逆符号化部107がこのRAWデータに対して可逆符号化を行うことで生成されたCODEデータのデータ量との大小比較を行う。係る処理は、換言すれば、可逆符号化部107によるこのRAWデータに対する圧縮率が100%を超えているか否かを判定する処理である。   The comparison unit 101 compares the data amount of the RAW data input from the image division unit 1610 and the data amount of the CODE data generated by the lossless encoding unit 107 performing lossless encoding on the RAW data. Make a comparison. In other words, this processing is processing for determining whether or not the compression rate of the RAW data by the lossless encoding unit 107 exceeds 100%.

選択部102は、画像分割部1610から入力されたRAWデータ、可逆符号化部107がこのRAWデータに対して可逆符号化を行うことで生成されたCODEデータ、のうち、比較部101による大小比較処理の結果に基づいて一方を選択する。本実施形態では、比較部101による大小比較の結果、可逆符号化部107によるRAWデータの圧縮率が100%を超えている場合にはこのRAWデータを選択し、越えていない場合にはこのRAWデータの可逆符号化結果であるCODEデータを選択する。   The selection unit 102 compares the RAW data input from the image division unit 1610 and the CODE data generated by the lossless encoding unit 107 performing lossless encoding on the RAW data. One is selected based on the processing result. In the present embodiment, as a result of the comparison by the comparison unit 101, this RAW data is selected when the compression rate of the RAW data by the lossless encoding unit 107 exceeds 100%, and this RAW data is selected when it does not exceed. CODE data which is a result of lossless encoding of data is selected.

識別子挿入部105は、比較部101から大小比較結果を得ることで、選択部102が選択したものがRAWデータであるのかCODEデータであるのかを識別する。そして、選択部102がRAWデータを選択した場合には、RAWデータであることを示す識別子をこのRAWデータと共に、符号化ストリームに格納する(第1の格納制御、第2の格納制御)。一方、選択部102がCODEデータを選択した場合には、CODEデータであることを示す識別子をこのCODEデータと共に、符号化ストリームに格納する。なお、符号化ストリームは、1つの画像について1つ設けられるものである。そして識別子挿入部105は、1つの符号化ストリームが完成したら(全ての分割画像についてRAWデータ若しくはCODEデータとその識別子を符号化ストリームに格納したら)、この完成した符号化ストリームを出力する。   The identifier insertion unit 105 obtains a magnitude comparison result from the comparison unit 101 to identify whether the selection unit 102 selects RAW data or CODE data. When the selection unit 102 selects RAW data, an identifier indicating the RAW data is stored in the encoded stream together with the RAW data (first storage control and second storage control). On the other hand, when the selection unit 102 selects CODE data, an identifier indicating the CODE data is stored in the encoded stream together with the CODE data. Note that one encoded stream is provided for one image. Then, when one encoded stream is completed (when RAW data or CODE data and its identifier are stored in the encoded stream for all the divided images), the identifier inserting unit 105 outputs the completed encoded stream.

一方、計数部103は、識別子挿入部105から出力された符号化ストリームのデータ量を計数する。そして計数したデータ量から、本画像処理装置が出力可能なデータ送出量の残量を求める。   On the other hand, the counting unit 103 counts the data amount of the encoded stream output from the identifier inserting unit 105. Then, the remaining amount of the data transmission amount that can be output by the image processing apparatus is obtained from the counted data amount.

判定部104は、計数部103による計数結果に基づいて、次に符号化する画像について識別子挿入部105が用いる識別子のデータ構造を決定する。即ち、識別子挿入部105が着目画像について用いる識別子とは、着目画像の1つ前に符号化した画像について判定部104が判定した結果に基づいて決まるデータ構造を有する識別子である。本実施形態では、識別子のデータ構造には2つの方式があるものとして説明する。そして一方の方式を方式A(第1の方式)、他方の方式を方式B(第2の方式)と呼称する。   The determination unit 104 determines the data structure of the identifier used by the identifier insertion unit 105 for the next image to be encoded based on the counting result obtained by the counting unit 103. That is, the identifier used by the identifier insertion unit 105 for the image of interest is an identifier having a data structure that is determined based on the determination result of the determination unit 104 for the image encoded immediately before the image of interest. In the present embodiment, it is assumed that there are two types of identifier data structures. One method is called method A (first method), and the other method is called method B (second method).

図3は、方式A、方式Bのそれぞれを表形式で示す図である。   FIG. 3 is a diagram showing each of the method A and the method B in a table format.

図3に示す如く、方式Aは、RAWデータを示す識別子として1ビットの識別子を用い、CODEデータを示す識別子として1ビットの識別子を用いることを規定している。即ち、方式Aを用いる場合、選択部102がRAWデータを選択すると、識別子挿入部105は、このRAWデータに1ビットの識別子(例えば”0”)を付加する。一方、選択部102がCODEデータを選択すると、識別子挿入部105は、このCODEデータに1ビットの識別子(例えば”1”)を付加する。   As shown in FIG. 3, the method A stipulates that a 1-bit identifier is used as an identifier indicating RAW data and a 1-bit identifier is used as an identifier indicating CODE data. That is, when the method A is used, when the selection unit 102 selects RAW data, the identifier insertion unit 105 adds a 1-bit identifier (for example, “0”) to the RAW data. On the other hand, when the selection unit 102 selects CODE data, the identifier insertion unit 105 adds a 1-bit identifier (for example, “1”) to the CODE data.

ここで、1つの画像の符号化に際し、方式Aのみを用いる場合、最終的にこの画像の符号化ストリームに含まれる全ての識別子のデータ長(ビット長)は、(分割画像の個数×1ビット)となる。そのため、1つの画像についての符号化ストリームのデータ長は、この画像を構成する全ての分割画像の符号化データの合計長に、識別子のデータ長(分割画像の個数×1ビット)を加えたものとなる。つまり、方式Aは、識別子のデータ長が短いため、画像全体の符号化ストリームのデータ長の最大値を短くすることができるというメリットがある。しかし、一般的に撮像素子から伝送される画像は、可逆符号化を施しても圧縮率が100%を超えることは殆どないので、選択部102においてRAWデータが選択される頻度は低い。従って、分割画像毎に必ず1ビットの識別子を設けることは、符号化ストリームのデータ長を増大させる原因となる。   Here, when only one method A is used for encoding one image, the data length (bit length) of all identifiers finally included in the encoded stream of this image is (number of divided images × 1 bit). ) Therefore, the data length of the encoded stream for one image is obtained by adding the data length of the identifier (number of divided images × 1 bit) to the total length of the encoded data of all the divided images constituting this image. It becomes. That is, since the data length of the identifier is short, the method A has an advantage that the maximum data length of the encoded stream of the entire image can be shortened. However, since the compression rate of an image transmitted from an image sensor generally does not exceed 100% even when lossless encoding is performed, the selection unit 102 does not frequently select RAW data. Therefore, always providing a 1-bit identifier for each divided image increases the data length of the encoded stream.

この問題を解決する方法として、RAWデータ、CODEデータのそれぞれで異なるビット長の識別子を用いる方法がある。方式Bは、係る点に着目したもので、RAWデータ、CODEデータのそれぞれで異なるビット長の識別子を規定するものである。例えば、CODEデータについては識別子を設けず、RAWデータに対してのみ識別子を設ける。RAWデータの識別子は、可逆符号化のエントロピ符号化の符号コードとして、決して起こりえないビット・パターンでなければならない。例えば、エントロピ符号化にハフマン符号化を用いる場合は、ハフマン符号の最大長は16ビットであるため、識別子のビット長は16ビット以上を要する。具体例を示すと、識別子のデータ長を16ビットとした場合、ビット・パターンは0xFFNN(N:任意の値)となる。上述したビット・パターンの上位8ビットは、ITU-T勧告T.81に規定されたマーカーと同じ0xFFである。ただし、ビット・パターンの下位8ビットは、任意の値としているが、既にITU-T勧告T.81で予約されているマーカーの値を識別子の値に用いることはできない。そのため、16ビットの識別子のビット・パターンの一例として、0xFFB0などがある。さらに、識別子はバイト・バウンダリで符号化ストリームに格納しなければならない。そのため、識別子格納前の符号化ストリームがバイト・バウンダリで終わるように、符号化ストリームにビット(パディング・ビット)を付加しなければならない。   As a method of solving this problem, there is a method of using identifiers having different bit lengths for RAW data and CODE data. The method B pays attention to such a point, and defines identifiers having different bit lengths for RAW data and CODE data. For example, no identifier is provided for CODE data, and an identifier is provided only for RAW data. The identifier of RAW data must be a bit pattern that can never occur as a code code of entropy encoding of lossless encoding. For example, when Huffman coding is used for entropy coding, the maximum length of the Huffman code is 16 bits, so the bit length of the identifier needs to be 16 bits or more. As a specific example, when the data length of the identifier is 16 bits, the bit pattern is 0xFFNN (N: arbitrary value). The upper 8 bits of the above bit pattern are ITU-T recommendation T.264. The same 0xFF as the marker defined in 81. However, the lower 8 bits of the bit pattern are arbitrary values. The marker value reserved in 81 cannot be used as the identifier value. Therefore, an example of a 16-bit identifier bit pattern is 0xFFB0. Furthermore, the identifier must be stored in the encoded stream on a byte boundary. Therefore, it is necessary to add bits (padding bits) to the encoded stream so that the encoded stream before storing the identifier ends with a byte boundary.

しかし、一般的に撮像素子から伝送される画像は、可逆符号化を施しても圧縮率が100%を超えることは殆どないため、最大圧縮率を保証しながらも、符号化ストリームのデータ長を抑制することができる。ところが、全ての分割画像の圧縮率が100%を超え、選択部102でRAWデータが選択された場合、符号化ストリームには、{(分割画像の個数×16ビット)+パディング・ビットのビット長}のビット長を有するビット群が格納されることになる。これは、方式Aに比べて符号化効率が低下することは自明である。   However, in general, an image transmitted from an image sensor hardly has a compression rate exceeding 100% even when lossless encoding is performed. Therefore, while ensuring the maximum compression rate, the data length of the encoded stream is reduced. Can be suppressed. However, when the compression rate of all the divided images exceeds 100% and RAW data is selected by the selection unit 102, the encoded stream includes {(number of divided images × 16 bits) + bit length of padding bits. } Is stored. It is obvious that the encoding efficiency is lower than that of the scheme A.

本実施形態では、方式A、方式Bについての上記の性質を鑑み、画像の符号化前にこの画像の圧縮効率を計算し、その計算した結果に応じて、何れか一方の方式を採用する。そして採用した方式で規定された識別子を、符号化結果と共に符号化ストリームに格納する。   In the present embodiment, in view of the above-described properties of the method A and the method B, the compression efficiency of the image is calculated before the image is encoded, and either one of the methods is adopted according to the calculated result. And the identifier prescribed | regulated by the employ | adopted system is stored in an encoding stream with an encoding result.

なお、上述の通り、本実施形態では、識別子のデータ構造を規定する方式として方式A、方式Bの2つの方式を用いるものとしているが、1つの方式のみを用いるようにしても良いし、3つ以上の方式を用いるようにしてももちろん良い。   As described above, in the present embodiment, two methods of method A and method B are used as methods for defining the data structure of the identifier. However, only one method may be used, or 3 Of course, more than one method may be used.

次に、撮像モードが設定された場合における符号化部1611の動作について、図10に示したフローチャートを用いて説明する。図10は、撮像モード時において符号化部1611が行う処理のフローチャートである。ここでは一例として、各フレームの画像を符号化する場合における、着目フレームの画像を符号化する場合について説明する。上述の通り、着目フレームの画像を符号化する場合、この画像は画像分割部1610によって複数の分割画像に分割され、それぞれの分割画像は順次この符号化部1611に入力される。   Next, the operation of the encoding unit 1611 when the imaging mode is set will be described using the flowchart shown in FIG. FIG. 10 is a flowchart of processing performed by the encoding unit 1611 in the imaging mode. Here, as an example, a case where an image of a frame of interest is encoded when an image of each frame is encoded will be described. As described above, when the image of the frame of interest is encoded, the image is divided into a plurality of divided images by the image dividing unit 1610, and each divided image is sequentially input to the encoding unit 1611.

また、上述したように、本実施形態では如何なる可逆符号化を用いても良いのであるが、ここでは説明上、一例としてDPCM方式を用いるものとする。   Further, as described above, any lossless encoding may be used in the present embodiment, but here, for the sake of explanation, the DPCM method is used as an example.

ステップS1001では、判定部104は、方式Aを用いた場合に、符号化部1611が有する不図示のメモリ(以下、符号化用メモリ)において、1枚の画像に割り当てることのできる最大容量TAを求める。更に判定部104は、方式Bを用いた場合に、符号化用メモリにおいて、1枚の画像に割り当てることのできる最大容量TBを求める。   In step S1001, when the method A is used, the determination unit 104 determines the maximum capacity TA that can be allocated to one image in a memory (not shown) included in the encoding unit 1611 (hereinafter referred to as an encoding memory). Ask. Further, when the method B is used, the determination unit 104 obtains the maximum capacity TB that can be assigned to one image in the encoding memory.

最大容量TAを求める方法には様々な方法がある。その一例としては、符号化用メモリに格納する画像の枚数として予め設定した枚数で、符号化用メモリの総容量を除した商を、上記最大容量TAとする方法がある。本実施形態では説明を簡単にするため、方式Aに従って生成される符号化ストリームのデータ量を最大容量TAとする。即ち、1枚の画像を構成する全ての分割画像のデータ量の合計値と、それぞれの分割画像に対する識別子のビット長(1ビット)の合計値と、の和を最大容量TAとする。   There are various methods for obtaining the maximum capacity TA. As an example, there is a method in which a quotient obtained by dividing the total capacity of the encoding memory by a preset number of images to be stored in the encoding memory is the maximum capacity TA. In this embodiment, to simplify the description, the data amount of the encoded stream generated according to the scheme A is assumed to be the maximum capacity TA. That is, the maximum capacity TA is the sum of the total value of the data amounts of all the divided images constituting one image and the total bit length (1 bit) of the identifier for each divided image.

一方、最大容量TBについては、方式Bに従って生成される符号化ストリームのデータ量を最大容量TBとする。即ち、1枚の画像を構成する全ての分割画像のデータ量の合計値と、それぞれの分割画像に対する識別子のビット長(16ビット)の合計値と、の和を最大容量TBとする。   On the other hand, for the maximum capacity TB, the data volume of the encoded stream generated according to the scheme B is set as the maximum capacity TB. That is, the sum of the total data amount of all the divided images constituting one image and the total bit length (16 bits) of the identifier for each divided image is defined as the maximum capacity TB.

補足となるが、最大容量TAが最大容量TBよりも大きければ、方式A、方式Bの何れを用いても良い。一方、最大容量TAが最大容量TBよりも小さいのであれば、方式Aのみを用いる。ただし、符号化用メモリの容量が最大容量TAより小さい場合は、通常実装上考慮しない。なぜならば、連続撮影される画像の枚数が多く、撮影された画像をもれなくメモリに保存することが保証されないからである。そのため、このような場合は、連続撮影される画像の枚数を適切な値に変更する必要がある。   As a supplement, as long as the maximum capacity TA is larger than the maximum capacity TB, either system A or system B may be used. On the other hand, if the maximum capacity TA is smaller than the maximum capacity TB, only the method A is used. However, when the capacity of the encoding memory is smaller than the maximum capacity TA, it is not considered in normal implementation. This is because the number of images that are continuously captured is large, and it is not guaranteed that all the captured images are stored in the memory. Therefore, in such a case, it is necessary to change the number of images that are continuously shot to an appropriate value.

次に、ステップS1002では、判定部104は、符号化用メモリにおいて、1枚の画像に実際に割り当てるデータ量TP(N)を求める。ここでNは画像のフレーム番号を示すので、TP(N)はN番目の画像に実際に割り当てるデータ量(容量)を示すことになる。即ち、最初に符号化対象として符号化部1611に入力された画像(1番目の画像である画像1)はN=1、次に符号化対象として符号化部1611に入力された画像(2番目の画像である画像2)はN=2となる。本実施形態ではTP(1)=TAとする。なお、TP(m)(m>1)については後述する。以下では、画像x(x=1,2,3,…)を符号化する場合について説明する。   Next, in step S1002, the determination unit 104 obtains a data amount TP (N) that is actually allocated to one image in the encoding memory. Here, since N indicates the frame number of the image, TP (N) indicates the data amount (capacity) that is actually allocated to the Nth image. That is, an image (image 1 which is the first image) first input to the encoding unit 1611 as an encoding target is N = 1, and then an image (second image) input to the encoding unit 1611 as an encoding target. In the case of image 2), N = 2. In this embodiment, TP (1) = TA. TP (m) (m> 1) will be described later. Hereinafter, a case where the image x (x = 1, 2, 3,...) Is encoded will be described.

次に、ステップS1003では、判定部104は、識別子挿入部105が用いる識別子を方式Aに従って規定するのか、方式Aと方式Bの何れかに従って規定するのかを判定する(方式選択)。係る判定処理では先ず、画像xについてステップS1002で求めた容量TP(x)と、上記最大容量TBとの大小比較を行う。   In step S1003, the determination unit 104 determines whether the identifier used by the identifier insertion unit 105 is defined according to the method A or the method A or the method B (method selection). In this determination process, first, the size of the capacity TP (x) obtained in step S1002 for the image x is compared with the maximum capacity TB.

本実施形態では、一例ではあるが、可逆符号化方式にDPCM変換を用い、エントロピ符号化にハフマン符号化を適用した場合を想定している。そのため、図3に示すように、方式Bを用いる場合、それぞれの分割画像には、16ビットの識別子が付加されることになる。従って、識別子のデータ長は、16ビットに分割画像の数を乗じた数となる。なお、方式Bにおける識別子長は、可逆符号化方式に依存するが、本実施形態は、方式Bの識別子長を限定するものではない。   In the present embodiment, as an example, it is assumed that DPCM conversion is used as a lossless encoding method and Huffman encoding is applied to entropy encoding. Therefore, as shown in FIG. 3, when the method B is used, a 16-bit identifier is added to each divided image. Accordingly, the data length of the identifier is 16 bits multiplied by the number of divided images. Note that the identifier length in the scheme B depends on the lossless encoding scheme, but this embodiment does not limit the identifier length of the scheme B.

そして判定部104は、容量TP(x)と最大容量TBとの大小比較の結果、TP(x)<TBである場合には、方式Aを用いるものとして決定する。一方、TP(x)≧TBの場合には、方式Aを用いても良いし方式Bを用いても良い。   Then, the determination unit 104 determines that the method A is used when TP (x) <TB as a result of the size comparison between the capacity TP (x) and the maximum capacity TB. On the other hand, when TP (x) ≧ TB, the method A may be used or the method B may be used.

従って、方式Aを用いるものとして決定した場合には、処理はステップS1005を介してステップS1008に進める。一方、方式Aを用いても良いし方式Bを用いても良いと決定した場合には、処理をステップS1005を介してステップS1007に進める。   Therefore, if it is determined that the method A is to be used, the process proceeds to step S1008 via step S1005. On the other hand, if it is determined that method A or method B may be used, the process proceeds to step S1007 via step S1005.

ステップS1007では、判定部104は、方式A、方式Bのうち何れか一方を選択する。この選択は、予め定められた方を選択するようにしても良いし、ユーザに選択させても良い。ユーザに選択させる場合には、その選択のための画面を提示し、ユーザからの選択指示を受け付ければよい。   In step S <b> 1007, the determination unit 104 selects one of method A and method B. This selection may be made by selecting a predetermined one or by the user. When the user makes a selection, a screen for the selection may be presented and a selection instruction from the user may be accepted.

次に、ステップS1008では、可逆符号化部107は、画像xについて未だ符号化されていない分割画像を1つ、画像分割部1610から取得する。   Next, in step S <b> 1008, the lossless encoding unit 107 acquires from the image dividing unit 1610 one divided image that has not yet been encoded for the image x.

そしてステップS1009では、可逆符号化部107は、ステップS1008で取得した分割画像(RAWデータ)に対して可逆符号化を行う。   In step S1009, the lossless encoding unit 107 performs lossless encoding on the divided image (RAW data) acquired in step S1008.

次に、ステップS1010では、比較部101は、ステップS1009で可逆符号化部107による可逆符号化によって得られたCODEデータのデータ量と、ステップS1008で取得したRAWデータのデータ量と、の大小比較処理を行う。係る大小比較処理の結果、CODEデータのデータ量がRAWデータのデータ量よりも小さい場合(圧縮率100%未満)には、処理をステップS1011に進める。一方、CODEデータのデータ量がRAWデータのデータ量以上である場合(圧縮率100%以上)には、処理をステップS1012に進める。   Next, in step S1010, the comparison unit 101 compares the data amount of the CODE data obtained by the lossless encoding by the lossless encoding unit 107 in step S1009 and the data amount of the RAW data acquired in step S1008. Process. As a result of the size comparison processing, if the data amount of the CODE data is smaller than the data amount of the RAW data (compression rate is less than 100%), the process proceeds to step S1011. On the other hand, if the amount of CODE data is greater than or equal to the amount of RAW data (compression rate of 100% or more), the process proceeds to step S1012.

ステップS1011では、選択部102は、ステップS1008で取得した分割画像の符号化結果として、ステップS1009で生成されたCODEデータを選択し、選択したCODEデータを、後段の識別子挿入部105に送出する。識別子挿入部105は、このCODEデータに対して、決定した方式が規定するデータ構造を有する識別子を添付する。例えば、決定した方式が方式Aである場合には、図3より、このCODEデータには、1ビットの識別子(例えば値は1)を添付する。そして識別子挿入部105は、画像xについての符号化ストリームに、識別子が付加されたCODEデータを格納する。   In step S1011, the selection unit 102 selects the CODE data generated in step S1009 as the encoded result of the divided image acquired in step S1008, and sends the selected CODE data to the identifier insertion unit 105 in the subsequent stage. The identifier insertion unit 105 attaches an identifier having a data structure defined by the determined method to the CODE data. For example, when the determined method is method A, a 1-bit identifier (for example, the value is 1) is attached to the CODE data from FIG. The identifier insertion unit 105 stores the CODE data with the identifier added to the encoded stream for the image x.

一方、ステップS1012では、選択部102は、ステップS1008で取得した分割画像の符号化結果として、この分割画像のRAWデータを選択し、選択したRAWデータを、後段の識別子挿入部105に送出する。識別子挿入部105は、このRAWデータに対して、決定した方式が規定するデータ構造を有する識別子を添付する。例えば、決定した方式が方式Aである場合には、図3より、このRAWデータには、1ビットの識別子(例えば値は0)を添付する。そして識別子挿入部105は、画像xについての符号化ストリームに、識別子が付加されたRAWデータを格納する。   On the other hand, in step S1012, the selection unit 102 selects the RAW data of the divided image as the encoding result of the divided image acquired in step S1008, and sends the selected RAW data to the identifier insertion unit 105 in the subsequent stage. The identifier insertion unit 105 attaches an identifier having a data structure defined by the determined method to the RAW data. For example, when the determined method is method A, a 1-bit identifier (for example, the value is 0) is attached to the RAW data from FIG. The identifier insertion unit 105 stores the RAW data with the identifier added to the encoded stream for the image x.

なお、方式Bを用いるものとして決定されている場合、16ビットの識別子は、バイト・バウンダリで格納する。そのため、既に生成された符号化ストリーム長がバイト・バウンダリになるように、パディング・ビットを挿入する。パディング・ビットを挿入後、この16ビットの識別子を格納することになる。当然であるが、方式Bが選択され、データ形式がCODEデータである場合は、識別子が存在しないため、パディング・ビット挿入は不要である。また、方式Aが選択された場合は、データ形式に関わらず、パディング・ビットは挿入されず、識別子のみ付加される。   When it is determined that the method B is used, the 16-bit identifier is stored on the byte boundary. Therefore, padding bits are inserted so that the length of the encoded stream already generated is a byte boundary. After inserting the padding bits, this 16-bit identifier is stored. Naturally, when the method B is selected and the data format is CODE data, no padding bit insertion is required because there is no identifier. When method A is selected, padding bits are not inserted regardless of the data format, and only an identifier is added.

ステップS1013では、計数部103は、ステップS1011でCODEデータと識別子とが格納された時点での符号化ストリームのデータ量LACTを計数する。なお、LACTの初期値は0である。 In step S1013, the counting unit 103 counts the data amount L ACT of the encoded stream when the CODE data and the identifier are stored in step S1011. Note that the initial value of LACT is zero.

ステップS1014では、計数部103は、ステップS1012でRAWデータと識別子とが格納された時点での符号化ストリームのデータ量LACTを計数する。なお、LACTの初期値は0である。 In step S1014, the counting unit 103 counts the data amount L ACT of the encoded stream at the time when the RAW data and the identifier are stored in step S1012. Note that the initial value of LACT is zero.

次に、画像xにおいて未だ符号化されていない分割画像があれば、処理はステップS1015を介してステップS1008に戻り、以降の処理が繰り返される。一方、画像xについて全ての分割画像が符号化されたのであれば、処理はステップS1015を介してステップS1016に進む。   Next, if there is a divided image that has not been encoded in the image x, the process returns to step S1008 via step S1015, and the subsequent processes are repeated. On the other hand, if all the divided images have been encoded for the image x, the process proceeds to step S1016 via step S1015.

次に、全ての画像について符号化処理が終わった場合には処理はステップS1016を介して本処理は終了する。一方、未だ符号化処理が施されていない画像があれば、処理はステップS1016を介してステップS1002に戻る。ここでは画像xの次に、未だ符号化されていない画像(x+1)があるものとして説明を続ける。   Next, when the encoding process has been completed for all the images, the process ends via step S1016. On the other hand, if there is an image that has not been subjected to the encoding process, the process returns to step S1002 via step S1016. Here, the description is continued on the assumption that there is an image (x + 1) that has not been encoded yet after the image x.

ステップS1016からステップS1002に処理が戻り、画像(x+1)についての処理を行う場合について説明する。   A case will be described in which the processing returns from step S1016 to step S1002 to perform processing on the image (x + 1).

ステップS1002では、判定部104は、符号化用メモリにおいて、画像(x+1)に実際に割り当てる容量TP(x+1)を以下の式に従って求める。   In step S1002, the determination unit 104 obtains the capacity TP (x + 1) actually allocated to the image (x + 1) in the encoding memory according to the following equation.

TP(x+1)=(TP(1)+TP(2)+…+TP(x))−LACT+TA
ここで、LACTは、画像xについて完成した符号化ストリームのデータ量である。図4は、符号化用メモリにおけるTA、TP、LACTを説明する図である。
TP (x + 1) = (TP (1) + TP (2) +... + TP (x)) − L ACT + TA
Here, L ACT is the data amount of the encoded stream completed for the image x. Figure 4 is a diagram for explaining TA in the memory for coding, TP, the L ACT.

次に、ステップS1003では、判定部104は、識別子挿入部105が用いる識別子を方式Aに従って規定するのか、方式Aと方式Bの何れかに従って規定するのかを判定する。係る判定処理では先ず、画像(x+1)についてステップS1002で求めた容量TP(x+1)と、上記最大容量TBとの大小比較を行う。   Next, in step S1003, the determination unit 104 determines whether the identifier used by the identifier insertion unit 105 is defined according to the method A or according to either the method A or the method B. In the determination process, first, the size of the capacity TP (x + 1) obtained in step S1002 for the image (x + 1) is compared with the maximum capacity TB.

以降の処理については上述の通りである。   The subsequent processing is as described above.

なお、以上の説明を簡単にするために、デジタルカメラにおける連続撮影画像を、メモリに記録する場合を想定して説明したが、当然ながら上記処理は、係るケースのみに適用するものではない。例えば、符号化対象画像は1枚でも構わない。また、画像はネットワークなど通信経路を介して受信しても構わない。さらに、符号化ストリームは、ネットワークにデータ送信しても構わない。   In order to simplify the above description, the description has been made assuming that continuously shot images in a digital camera are recorded in a memory. However, the above processing is not applied only to such a case. For example, the number of encoding target images may be one. The image may be received via a communication path such as a network. Furthermore, the encoded stream may be transmitted to the network.

また、上記処理は、先に記載した処理手順の順序を限定するものではなく、同様の結果を得ることができるのであれば、その順序は適宜変更しても構わない。   Further, the above processing does not limit the order of the processing procedures described above, and the order may be appropriately changed as long as similar results can be obtained.

また、本実施形態では、説明を簡単にするため、連続撮影時の画像コマ数で方式A、方式Bの何れかを選択する方法を説明した。しかし、画像スライス単位に分割し、スライス単位で方式を選定しても構わないことは自明である。さらに、計測対象は、メモリの残容量に限定するものではなく、例えば、ネットワークの帯域など、本装置がデータ出力可能なデータの出力総残量を計測するものであればよい。   Further, in the present embodiment, for the sake of simplicity of explanation, the method of selecting either method A or method B according to the number of image frames during continuous shooting has been described. However, it is obvious that the method may be divided into image slice units and the method may be selected in slice units. Furthermore, the measurement target is not limited to the remaining capacity of the memory, and may be anything that measures the total output remaining amount of data that can be output by the apparatus, such as a network bandwidth.

<復号化部1613>
次に、復号化部1613について説明する。図2は、復号化部1613の詳細な機能構成例を示すブロック図である。図2に示した各部はハードウェアでもって構成されているものとするが、その一部若しくは全部をコンピュータプログラムで実現しても良い。
<Decoding unit 1613>
Next, the decoding unit 1613 will be described. FIG. 2 is a block diagram illustrating a detailed functional configuration example of the decoding unit 1613. Although each part shown in FIG. 2 shall be comprised with hardware, you may implement | achieve part or all by a computer program.

復号化部1613には、画像毎の符号化ストリームが入力される。識別子復号部205は、メモリ制御回路1607がメモリ1605から読み出した符号化ストリームを、このメモリ制御回路1607から取得する。そして取得した符号化ストリームから、全ての識別子(識別子群)を抽出する。   An encoded stream for each image is input to the decoding unit 1613. The identifier decoding unit 205 acquires the encoded stream read from the memory 1605 by the memory control circuit 1607 from the memory control circuit 1607. Then, all identifiers (identifier groups) are extracted from the acquired encoded stream.

データ読み出し部201は、メモリ制御回路1607がメモリ1605から読み出した符号化ストリームを、このメモリ制御回路1607から取得する。そして取得した符号化ストリームから、識別子のデータやヘッダ部分を取り除いた残り(符号化画像データ)を抽出する。この符号化画像データは、分割画像毎の符号化結果(RAWデータ若しくはCODEデータ)である。そして、データ読み出し部201は、抽出した符号化画像データを分割画像単位で出力するのであるが、その出力の際には、識別子復号部205が抽出した識別子群を参照する。   The data reading unit 201 acquires the encoded stream read from the memory 1605 by the memory control circuit 1607 from the memory control circuit 1607. Then, the remaining (encoded image data) obtained by removing the identifier data and the header portion is extracted from the acquired encoded stream. This encoded image data is an encoding result (RAW data or CODE data) for each divided image. The data reading unit 201 outputs the extracted encoded image data in units of divided images, and refers to the identifier group extracted by the identifier decoding unit 205 at the time of output.

即ち、符号化画像データ及び識別子群の先頭部分から順に参照し、参照した識別子がRAWデータを示すものであれば、分割画像のサイズ分のデータを符号化画像データから読み出し、これをRAWデータとして選択部202に送出する。一方、参照した識別子がCODEデータを示すものであれば、CODEデータの終端までを符号化画像データから読み出し、可逆復号化部206に送出する。なお、符号化画像データを構成する「分割画像毎の符号化結果」のそれぞれを、対応する識別子を用いて識別するための処理については周知であるので、これ以上の説明は省略する。   That is, the encoded image data and the identifier group are referred to in order from the beginning, and if the referenced identifier indicates RAW data, the data corresponding to the size of the divided image is read from the encoded image data, and this is used as the RAW data. The data is sent to the selection unit 202. On the other hand, if the referenced identifier indicates CODE data, the data up to the end of the CODE data is read from the encoded image data and sent to the lossless decoding unit 206. In addition, since the process for identifying each “encoding result for each divided image” constituting the encoded image data using a corresponding identifier is well known, further description is omitted.

可逆復号化部206は、符号化部1611が有する可逆符号化部107が用いる可逆符号化方式に対応する可逆復号化方式を用いて、データ読み出し部201から送出されたCODEデータを復号する。そしてその復号結果であるRAWデータは、選択部202に送出される。   The lossless decoding unit 206 decodes the CODE data sent from the data reading unit 201 using a lossless decoding method corresponding to the lossless encoding method used by the lossless encoding unit 107 included in the encoding unit 1611. Then, the RAW data as the decoding result is sent to the selection unit 202.

選択部202には、データ読み出し部201からのRAWデータ、可逆復号化部206からのRAWデータの何れか一方が入力されるので、これを外部に送出する。   Since either the RAW data from the data reading unit 201 or the RAW data from the lossless decoding unit 206 is input to the selection unit 202, it is transmitted to the outside.

計数部203は、データ読み出し部201から送出されるデータのデータ量、及び識別子復号部205が抽出した識別子のデータ長を計数する。   The counting unit 203 counts the data amount of data transmitted from the data reading unit 201 and the data length of the identifier extracted by the identifier decoding unit 205.

判定部204は、計数部203による計数結果、即ち、1枚の画像について計数部203が計数した累積データ量に基づいて、識別子の方式を決定する。なお、計数部203、判定部204のそれぞれの動作は、図1に示した計数部103、判定部104と同じである。   The determination unit 204 determines the identifier method based on the counting result of the counting unit 203, that is, the accumulated data amount counted by the counting unit 203 for one image. The operations of the counting unit 203 and the determining unit 204 are the same as those of the counting unit 103 and the determining unit 104 shown in FIG.

次に、復号化部1613の動作について、図13のフローチャートを参照して説明する。図13は、復号化部1613が行う処理のフローチャートである。   Next, the operation of the decoding unit 1613 will be described with reference to the flowchart of FIG. FIG. 13 is a flowchart of processing performed by the decoding unit 1613.

ここでは、説明を簡単にするため、デジタルカメラにより連続撮影され、メモリやバッファといった記憶媒体に保存されたデータを閲覧するために、データを復元する方法について説明する。   Here, in order to simplify the description, a method for restoring data in order to browse data continuously taken by a digital camera and stored in a storage medium such as a memory or a buffer will be described.

ステップS1001〜S1003、S1005,S1007のそれぞれについては第1の実施形態で説明した通りであり、処理を行う主体が異なるのみであるので、これについての説明は省略する。即ち、第1の実施形態で計数部103が行うものとしたものを本実施形態では計数部203が行い、第1の実施形態で判定部104が行うものとしたものを本実施形態では判定部204が行う。   Steps S1001 to S1003, S1005, and S1007 are the same as described in the first embodiment, and only the main body that performs the process is different. Therefore, the description thereof is omitted. That is, what the counting unit 103 performs in the first embodiment is performed by the counting unit 203 in the present embodiment, and what the determination unit 104 performs in the first embodiment is performed by the determination unit in the present embodiment. 204 performs.

そして、方式Aを用いると決定した場合には処理はステップS1308を介してステップS1309に進み、方式Bを用いると決定した場合には、処理はステップS1308を介してステップS1310に進む。   If it is determined that the method A is used, the process proceeds to step S1309 via step S1308. If it is determined that the method B is used, the process proceeds to step S1310 via step S1308.

ステップS1309では、識別子復号部205は、入力された符号化ストリームを先読みし、この符号化ストリーム中に格納されているそれぞれの識別子を方式Aに従って解釈する。そして方式Aに従った解釈でもって、読み出した識別子がRAWデータを示しているのかCODEデータを示しているのかを判断する。例えば、符号化ストリームを1ビット分読み出し、読み出したビット値に応じて、この識別子が添付されているデータがRAWデータであるのかCODEデータであるのかを特定する。   In step S1309, the identifier decoding unit 205 pre-reads the input encoded stream and interprets each identifier stored in the encoded stream according to the scheme A. Then, it is determined whether the read identifier indicates RAW data or CODE data by interpretation according to method A. For example, one bit of the encoded stream is read, and whether the data to which the identifier is attached is RAW data or CODE data is specified according to the read bit value.

一方、ステップS1310では、識別子復号部205は、入力された符号化ストリームを先読みし、この符号化ストリーム中に格納されているそれぞれの識別子を方式Bに従って解釈する。例えば、符号化ストリームをバイト・バウンダリまで挿入されているパディング・ビットを読み捨てる。その後、符号化ストリームから再度16ビット分のビット列を識別子として読み出し、RAWデータを示す識別子とのビット・パターンの一致をとる。識別子のビット・パターンと一致している場合は、符号化ストリーム中のデータ形式がRAWデータである。また、不一致の場合は、符号化ストリーム中のデータ形式がCODEデータである。   On the other hand, in step S1310, the identifier decoding unit 205 pre-reads the input encoded stream and interprets each identifier stored in the encoded stream according to the scheme B. For example, padding bits inserted up to the byte boundary in the encoded stream are discarded. Thereafter, a 16-bit bit string is read again from the encoded stream as an identifier, and the bit pattern matches the identifier indicating the RAW data. If the bit pattern of the identifier matches, the data format in the encoded stream is RAW data. If there is no match, the data format in the encoded stream is CODE data.

そして、ステップS1309/ステップS1310における判断結果がRAWデータである場合には、ステップS1311を介してステップS1312に進み、CODEデータである場合には、ステップS1311を介してステップS1313に進む。   If the determination result in step S1309 / step S1310 is RAW data, the process proceeds to step S1312 via step S1311. If the determination result is CODE data, the process proceeds to step S1313 via step S1311.

ステップS1312では、データ読み出し部201は、分割画像のサイズ分のデータを符号化画像データから読み出し、これをRAWデータとして選択部202に送出する。一方、ステップS1313では、データ読み出し部201は、CODEデータの終端までを符号化画像データから読み出し、可逆復号化部206に送出する。なお、方式Bの場合は、識別子の前に挿入されているパディング・ビットも読み捨てる。   In step S1312, the data reading unit 201 reads data for the size of the divided image from the encoded image data, and sends this to the selection unit 202 as RAW data. On the other hand, in step S <b> 1313, the data reading unit 201 reads up to the end of the CODE data from the encoded image data and sends it to the lossless decoding unit 206. In the case of method B, the padding bits inserted before the identifier are also discarded.

ステップS1314では、計数部203は、データ読み出し部201が読み出したRAWデータのデータ量と、識別子のデータ長との合計値を累積する。この累積値をLACTとする。なお、方式Bの場合は、パディング・ビットのデータ長もLACTに加える。 In step S1314, the counting unit 203 accumulates the total value of the data amount of the RAW data read by the data reading unit 201 and the data length of the identifier. Let this accumulated value be LACT . In the case of method B, the data length of the padding bits added to the L ACT.

一方、ステップS1315では、計数部203は、データ読み出し部201が読み出したCODEデータのデータ量と、識別子のデータ長との合計値を累積する。この累積値をLACTとする。なお、方式Bの場合は、パディング・ビットのデータ長もLACTに加える。なお、LACTの初期値は0である。 On the other hand, in step S1315, the counting unit 203 accumulates the total value of the data amount of the CODE data read by the data reading unit 201 and the data length of the identifier. Let this accumulated value be LACT . In the case of method B, the data length of the padding bits added to the L ACT. Note that the initial value of LACT is zero.

次に、ステップS1316では、可逆復号化部206は、データ読み出し部201がステップS1313において読み出したCODEデータに対して可逆復号化を行うことで、RAWデータを復元する。そして復元したRAWデータを選択部102に送出する。   Next, in step S1316, the lossless decoding unit 206 restores RAW data by performing lossless decoding on the CODE data read by the data reading unit 201 in step S1313. Then, the restored RAW data is sent to the selection unit 102.

次に、未だ復号されていない分割画像があれば、処理はステップS1317を介してステップS1308に戻り、以降の処理が繰り返される。一方、全ての分割画像が復号されたのであれば、処理はステップS1317を介してステップS1318に進む。   Next, if there is a divided image that has not been decoded yet, the process returns to step S1308 via step S1317, and the subsequent processes are repeated. On the other hand, if all the divided images have been decoded, the process proceeds to step S1318 via step S1317.

次に、全ての画像について復号処理が終わった場合には処理はステップS1318を介して本処理は終了する。一方、未だ復号処理が施されていない符号化ストリームがあれば、処理はステップS1318を介してステップS1002に戻る。   Next, when the decoding process has been completed for all the images, the process ends via step S1318. On the other hand, if there is an encoded stream that has not been subjected to decoding processing, the processing returns to step S1002 via step S1318.

なお、以上の復号化処理の説明では、その説明を簡単にするため、記憶媒体に記録された連続撮影画像を復元する場合を想定して説明したが、当然ながら、以上の処理は、これに限定するものではない。例えば、復号化対象画像は1枚でも構わない。また、符号化ストリームはネットワークなど通信経路を介して受信しても構わない。さらに、復元した画像データは、ネットワークに送信しても構わない。   In the above description of the decoding process, in order to simplify the description, it has been described assuming that a continuously shot image recorded on a storage medium is restored. It is not limited. For example, the number of decoding target images may be one. The encoded stream may be received via a communication path such as a network. Further, the restored image data may be transmitted to the network.

また、上記処理は、先に記載した処理手順の順序を限定するものではなく、同様の結果を得ることができるのであれば、その順序は適宜変更しても構わない。   Further, the above processing does not limit the order of the processing procedures described above, and the order may be appropriately changed as long as similar results can be obtained.

以上の説明により、本実施形態によれば、符号化処理の負荷は小さいが、連続撮影された画像の情報を欠落させることなく、記憶媒体への保存を保証しつつ、かつ、記憶媒体において使用するデータ容量を抑制することができる。   As described above, according to the present embodiment, the load of the encoding process is small, but the information stored in the storage medium is guaranteed without being lost in the information of continuously shot images, and is used in the storage medium. Data capacity to be reduced.

[第2の実施形態]
以下では、本実施形態が第1の実施形態と異なる部分についてのみ説明する。
[Second Embodiment]
Below, only the part from which this embodiment differs from 1st Embodiment is demonstrated.

<符号化部1611>
図6は、本実施形態に係る符号化部1611の詳細な機能構成例を示すブロック図である。図6に示した構成は、図1に示した構成に予測部606を加えたものである。従って、予測部606以外の構成については第1の実施形態と同じであるので、以下では、予測部606の動作とそれに関連する各部の動作についてのみ説明する。
<Encoding unit 1611>
FIG. 6 is a block diagram illustrating a detailed functional configuration example of the encoding unit 1611 according to the present embodiment. The configuration shown in FIG. 6 is obtained by adding a prediction unit 606 to the configuration shown in FIG. Accordingly, since the configuration other than the prediction unit 606 is the same as that of the first embodiment, only the operation of the prediction unit 606 and the operation of each unit related thereto will be described below.

第1の実施形態では、容量TP(x)と最大容量TBとの大小比較の結果、TP(x)≧TBの場合には、方式Aを用いても良いし方式Bを用いても良いので、何れか一方を手動で選択するか、予め定められた方を選択していた。本実施形態では、予測部606が何れの方式を選択するのかを決定する。   In the first embodiment, as a result of comparing the size of the capacity TP (x) and the maximum capacity TB, when TP (x) ≧ TB, the method A or the method B may be used. Either one of them was manually selected or a predetermined one was selected. In this embodiment, the prediction unit 606 determines which method to select.

図11は、本実施形態に係る符号化部1611が行う処理のフローチャートである。図11に示したフローチャートは、図10に示したフローチャートにステップS1106が加わったのみであるので、以下ではこのステップS1106とこれに関連するステップについてのみ説明する。   FIG. 11 is a flowchart of processing performed by the encoding unit 1611 according to this embodiment. In the flowchart shown in FIG. 11, only step S1106 is added to the flowchart shown in FIG. 10, and therefore only step S1106 and steps related thereto will be described below.

図5は、符号化対象分割画像Xに隣接する符号化済み分割画像のデータ形式の例を示している。図5では、データ形式がRAWデータであった分割画像には「RAW」と記載し、データ形式がCODEデータであった分割画像には「CODE」と記載している。   FIG. 5 shows an example of the data format of the encoded divided image adjacent to the encoding target divided image X. In FIG. 5, a divided image whose data format is RAW data is described as “RAW”, and a divided image whose data format is CODE data is described as “CODE”.

例えば、隣接する符号化済み分割画像のデータ形式にあって、RAWデータが1つでも存在する場合は、ふたたび圧縮率が100%を超える可能があるので、この場合、予測部606は、データ形式としてRAWデータが選択されると予測する。   For example, in the case of the data format of the adjacent encoded divided image and there is even one RAW data, the compression rate may exceed 100% again. In this case, the prediction unit 606 uses the data format. As RAW data is selected.

また、隣接する符号化済み分割画像のデータ形式が、全てCODEデータであった場合は、継続して圧縮率が100%を切る可能が高く、この場合、予測部606は、データ形式としてCODEデータが選択されると予測する。   In addition, when the data formats of the adjacent encoded divided images are all CODE data, it is highly possible that the compression rate is continuously cut below 100%. In this case, the prediction unit 606 uses the CODE data as the data format. Is predicted to be selected.

なお、図5は分割画像の予測方法の一例であり、分割画像のデータ形式の予測方法について限定するものではない。   FIG. 5 is an example of a method for predicting a divided image, and the method for predicting the data format of the divided image is not limited.

そこで、ステップS1106では、予測部606は、符号化対象分割画像に隣接する分割画像の符号化結果に1つでもRAWデータが含まれている場合は、データ形式としてRAWデータが選択されると予測する。また、予測部606は、符号化対象分割画像に隣接する全ての分割画像の符号化結果がCODEデータである場合には、データ形式としてCODEデータが選択されると予測する。   Accordingly, in step S1106, the prediction unit 606 predicts that RAW data is selected as the data format when at least one RAW data is included in the encoding result of the divided image adjacent to the encoding target divided image. To do. Also, the prediction unit 606 predicts that CODE data is selected as the data format when the encoding results of all the divided images adjacent to the encoding target divided image are CODE data.

そしてステップS1007では、判定部604は、ステップS1106における予測に基づき、方式A、方式Bの何れかを選択する。   In step S1007, the determination unit 604 selects either method A or method B based on the prediction in step S1106.

例えば、ステップS1106において、データ形式としてRAWデータが選択されると予測された場合には、方式Aを選択する。一方、データ形式としてCODEデータが選択されると予測された場合には、方式Bを選択する。   For example, if it is predicted in step S1106 that RAW data is selected as the data format, method A is selected. On the other hand, when it is predicted that CODE data is selected as the data format, the method B is selected.

なお、予測部606による予測方法については他にも考えられ、説明した処理に限定するものではない。   Note that other prediction methods by the prediction unit 606 are conceivable and are not limited to the processing described.

<復号化部1613>
図7は、本実施形態に係る復号化部1613の機能構成例を示すブロック図である。図7に示した構成は、図2に示した構成に予測部706を加えたものである。従って、予測部706以外の構成については第1の実施形態と同じであるので、以下では、予測部706の動作とそれに関連する各部の動作についてのみ説明する。
<Decoding unit 1613>
FIG. 7 is a block diagram illustrating a functional configuration example of the decoding unit 1613 according to the present embodiment. The configuration shown in FIG. 7 is obtained by adding a prediction unit 706 to the configuration shown in FIG. Therefore, since the configuration other than the prediction unit 706 is the same as that of the first embodiment, only the operation of the prediction unit 706 and the operation of each unit related thereto will be described below.

予測部706の動作については基本的には予測部606と同じである。より詳細な動作について、図14のフローチャートを用いて説明する。   The operation of the prediction unit 706 is basically the same as that of the prediction unit 606. A more detailed operation will be described with reference to the flowchart of FIG.

図14は、復号化部1613が行う処理のフローチャートである。図14に示したフローチャートは、図13に示したフローチャートにステップS1406が加わったのみであるので、以下ではこのステップS1406についてのみ説明する。   FIG. 14 is a flowchart of processing performed by the decoding unit 1613. In the flowchart shown in FIG. 14, only step S1406 is added to the flowchart shown in FIG. 13, so only step S1406 will be described below.

ステップS1406では、予測部706は、符号化済みの分割画像の識別子を用いて上記ステップS1106と同じ処理を行う。   In step S1406, the prediction unit 706 performs the same process as in step S1106 using the encoded divided image identifier.

以上の説明により、本実施形態によれば、分割画像毎にデータ形式を予測することにより、適応的に識別子を規定する方式を選択することができる。そのため、識別子に要するデータ量を抑制することができる。   As described above, according to the present embodiment, it is possible to select a method for adaptively specifying an identifier by predicting a data format for each divided image. Therefore, the amount of data required for the identifier can be suppressed.

[第3の実施形態]
以下では、本実施形態が第1の実施形態と異なる部分についてのみ説明する。
[Third Embodiment]
Below, only the part from which this embodiment differs from 1st Embodiment is demonstrated.

<符号化部1611>
図8は、本実施形態に係る符号化部1611の詳細な機能構成例を示すブロック図である。図8に示した構成は、図6に示した構成に識別子挿入部808を加えたものである。従って、識別子挿入部808以外の構成については第2の実施形態と同じであるので、以下では、識別子挿入部808の動作とそれに関連する各部の動作についてのみ説明する。
<Encoding unit 1611>
FIG. 8 is a block diagram illustrating a detailed functional configuration example of the encoding unit 1611 according to the present embodiment. The configuration shown in FIG. 8 is obtained by adding an identifier insertion unit 808 to the configuration shown in FIG. Accordingly, since the configuration other than the identifier insertion unit 808 is the same as that of the second embodiment, only the operation of the identifier insertion unit 808 and the operation of each unit related thereto will be described below.

識別子挿入部808は、識別子挿入部105が1つの画像を構成する全ての分割画像について方式Aに基づく識別子を用いたのか、それとも方式A、方式Bの両方を用いたのか、を示す識別子(第2の識別子)を、符号化ストリームに格納する。   The identifier inserting unit 808 uses an identifier (first number) indicating whether the identifier inserting unit 105 uses the identifier based on the method A for all the divided images constituting one image or both the method A and the method B. 2 identifier) is stored in the encoded stream.

図12は、本実施形態に係る符号化部1611が行う処理のフローチャートである。図12に示したフローチャートは、図11に示したフローチャートにステップS1204が加わると共に、ステップS1011,S1012の代わりにステップS1211,S1212を設けているのみである。従って、以下ではこれらのステップについてのみ説明する。   FIG. 12 is a flowchart of processing performed by the encoding unit 1611 according to this embodiment. In the flowchart shown in FIG. 12, step S1204 is added to the flowchart shown in FIG. Therefore, only these steps will be described below.

ステップS1204では、識別子挿入部808は、1つの画像を構成する全ての分割画像について、方式Aに基づき識別子を用いるのか、方式Bに基づく識別子をも用いるのかを示す識別子(第1の識別子)を、この画像に対する符号化ストリームに格納する。   In step S1204, the identifier insertion unit 808 uses an identifier (first identifier) indicating whether an identifier based on the scheme A or an identifier based on the scheme B is used for all the divided images constituting one image. And stored in the encoded stream for this image.

ステップS1211,S1212において用いる第2の識別子とは、第2の実施形態で用いている識別子と同じであり、処理そのものはそれぞれステップS1011,S1012と同じである。   The second identifier used in steps S1211 and S1212 is the same as the identifier used in the second embodiment, and the process itself is the same as steps S1011 and S1012.

<復号化部1613>
図9は、本実施形態に係る復号化部1613の詳細な機能構成例を示すブロック図である。図9に示した構成は、図7に示した構成に、識別子復号部907を加えたものである。従って、識別子復号部907以外の構成については第2の実施形態と同じであるので、以下では、識別子復号部907の動作とそれに関連する各部の動作について説明する。
<Decoding unit 1613>
FIG. 9 is a block diagram illustrating a detailed functional configuration example of the decoding unit 1613 according to the present embodiment. The configuration shown in FIG. 9 is obtained by adding an identifier decoding unit 907 to the configuration shown in FIG. Accordingly, since the configuration other than the identifier decoding unit 907 is the same as that of the second embodiment, the operation of the identifier decoding unit 907 and the operation of each unit related thereto will be described below.

図15は、本実施形態係る復号化部1613が行う処理のフローチャートである。   FIG. 15 is a flowchart of processing performed by the decoding unit 1613 according to this embodiment.

ステップS1501において、識別子復号部907は、符号化ストリームに格納されている第1の識別子を抽出する。そしてこの抽出した第1の識別子が、この符号化ストリームには方式Aに従った識別子のみが格納されていることを示しているのか、方式Aに従った識別子、方式Bに従った識別子が混在して格納されていることを示しているのかを判別する。係る判別の結果、第1の識別子が、この符号化ストリームには方式Aに従った識別子のみが格納されていることを示している場合には、処理はステップS1005を介してステップS1308に進む。一方、第1の識別子が、方式Aに従った識別子、方式Bに従った識別子が混在して格納されていることを示している場合には、処理は、ステップS1005を介してステップS1106に進む。   In step S1501, the identifier decoding unit 907 extracts the first identifier stored in the encoded stream. Then, whether the extracted first identifier indicates that only the identifier according to the scheme A is stored in the encoded stream, or the identifier according to the scheme A and the identifier according to the scheme B are mixed. It is determined whether it is stored. As a result of such determination, when the first identifier indicates that only an identifier according to the scheme A is stored in the encoded stream, the process proceeds to step S1308 via step S1005. On the other hand, if the first identifier indicates that an identifier according to method A and an identifier according to method B are stored together, the process proceeds to step S1106 via step S1005. .

ステップS1509,S1510において用いる第2の識別子とは、第2の実施形態で用いている識別子と同じであり、処理そのものはそれぞれステップS1309,S1310と同じである。   The second identifier used in steps S1509 and S1510 is the same as the identifier used in the second embodiment, and the processing itself is the same as steps S1309 and S1310, respectively.

以上の説明により、本実施形態によれば、復号側における符号化ストリームの計数処理を省略することができるため、復号処理を簡略化することができる。さらには、実装コストを抑制することが可能となる。   As described above, according to the present embodiment, the counting process of the encoded stream on the decoding side can be omitted, so that the decoding process can be simplified. Furthermore, the mounting cost can be suppressed.

[第4の実施形態]
上記第1〜3の実施形態では、1つの画像処理装置内に画像を符号化する構成と、符号化された画像を復号する構成とが備わっていたが、それぞれの構成を別個の装置内に設けるようにしても良い。即ち、一方の装置が生成した符号化ストリームを、他方の装置が復号するようにしても良い。その場合のそれぞれの装置には、例えば一般のPC(パーソナルコンピュータ)等を適用することができる。また、それぞれの装置により構成されるシステムの構成については様々なものが考え得る。
[Fourth Embodiment]
In the first to third embodiments, the configuration for encoding an image and the configuration for decoding the encoded image are provided in one image processing device, but each configuration is included in a separate device. You may make it provide. That is, the encoded stream generated by one device may be decoded by the other device. In each case, for example, a general PC (personal computer) can be applied. Moreover, various things can be considered about the structure of the system comprised by each apparatus.

以上の各実施形態による効果をまとめれば次のようなものとなる。即ち、可逆符号化にあっても符号化ストリームのデータ量を保証し、さらに、符号化ストリーム中のデータ形式を示す識別子に要するデータ量も抑制することができる符号化機能を実現できる。   The effects of the above embodiments can be summarized as follows. That is, it is possible to realize an encoding function that guarantees the data amount of the encoded stream even in lossless encoding, and further can suppress the data amount required for the identifier indicating the data format in the encoded stream.

さらに、この符号化機能は、複数の識別子方式は、符号化ストリームを復号化するときに逐次推定できるため、複数の識別子方式を判別するための追加情報が不要となる。そして、この符号化機能は、符号化ストリーム中のデータ形式を示す識別子に要するデータ量も抑制することが可能である。   Furthermore, since this encoding function can sequentially estimate a plurality of identifier schemes when decoding an encoded stream, additional information for determining the plurality of identifier schemes is not necessary. This encoding function can also suppress the amount of data required for the identifier indicating the data format in the encoded stream.

これにより、原画像データの情報を損ねずにデータの最大量を保証する符号化機能を実現できる。また、この符号化機能若しくはこの符号化機能と同様の方法で生成された符号化ストリームを復号する復号機能を実現できる。   Thereby, it is possible to realize an encoding function that guarantees the maximum amount of data without damaging the information of the original image data. In addition, this encoding function or a decoding function for decoding an encoded stream generated by a method similar to this encoding function can be realized.

[その他の実施形態]
また、本発明の目的は、以下のようにすることによって達成されることはいうまでもない。即ち、前述した実施形態の機能を実現するソフトウェアのプログラムコード(コンピュータプログラム)を記録した記録媒体(または記憶媒体)を、システムあるいは装置に供給する。係る記憶媒体は言うまでもなく、コンピュータ読み取り可能な記憶媒体である。そして、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読み出し実行する。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記録した記録媒体は本発明を構成することになる。
[Other Embodiments]
Needless to say, the object of the present invention can be achieved as follows. That is, a recording medium (or storage medium) that records a program code (computer program) of software that implements the functions of the above-described embodiments is supplied to the system or apparatus. Needless to say, such a storage medium is a computer-readable storage medium. Then, the computer (or CPU or MPU) of the system or apparatus reads and executes the program code stored in the recording medium. In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium on which the program code is recorded constitutes the present invention.

また、コンピュータが読み出したプログラムコードを実行することにより、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行う。その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Further, by executing the program code read by the computer, an operating system (OS) or the like running on the computer performs part or all of the actual processing based on the instruction of the program code. Needless to say, the process includes the case where the functions of the above-described embodiments are realized.

さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれたとする。その後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Furthermore, it is assumed that the program code read from the recording medium is written in a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer. After that, based on the instruction of the program code, the CPU included in the function expansion card or function expansion unit performs part or all of the actual processing, and the function of the above-described embodiment is realized by the processing. Needless to say.

本発明を上記記録媒体に適用する場合、その記録媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。   When the present invention is applied to the recording medium, program code corresponding to the flowchart described above is stored in the recording medium.

符号化部1611の詳細な機能構成例を示すブロック図である。12 is a block diagram illustrating a detailed functional configuration example of an encoding unit 1611. FIG. 復号化部1613の詳細な機能構成例を示すブロック図である。24 is a block diagram illustrating a detailed functional configuration example of a decoding unit 1613. FIG. 方式A、方式Bのそれぞれを表形式で示す図である。It is a figure which shows each of the system A and the system B in a table format. 符号化用メモリにおけるTA、TP、LACTを説明する図である。TA in the memory for encoding is a diagram for explaining TP, the L ACT. 符号化対象分割画像Xに隣接する符号化済み分割画像のデータ形式の例を示している。The example of the data format of the encoded divided image adjacent to the encoding object divided image X is shown. 本発明の第2の実施形態に係る符号化部1611の詳細な機能構成例を示すブロック図である。It is a block diagram which shows the detailed functional structural example of the encoding part 1611 which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る復号化部1613の機能構成例を示すブロック図である。It is a block diagram which shows the function structural example of the decoding part 1613 which concerns on the 2nd Embodiment of this invention. 本発明の第3の実施形態に係る符号化部1611の詳細な機能構成例を示すブロック図である。It is a block diagram which shows the detailed function structural example of the encoding part 1611 which concerns on the 3rd Embodiment of this invention. 本発明の第3の実施形態に係る復号化部1613の詳細な機能構成例を示すブロック図である。It is a block diagram which shows the detailed function structural example of the decoding part 1613 which concerns on the 3rd Embodiment of this invention. 撮像モード時において符号化部1611が行う処理のフローチャートである。25 is a flowchart of processing performed by an encoding unit 1611 in the imaging mode. 本発明の第2の実施形態に係る符号化部1611が行う処理のフローチャートである。It is a flowchart of the process which the encoding part 1611 which concerns on the 2nd Embodiment of this invention performs. 本発明の第3の実施形態に係る符号化部1611が行う処理のフローチャートである。It is a flowchart of the process which the encoding part 1611 which concerns on the 3rd Embodiment of this invention performs. 復号化部1613が行う処理のフローチャートである。21 is a flowchart of processing performed by a decoding unit 1613. 復号化部1613が行う処理のフローチャートである。21 is a flowchart of processing performed by a decoding unit 1613. 本発明の第3の実施形態係る復号化部1613が行う処理のフローチャートである。It is a flowchart of the process which the decoding part 1613 which concerns on the 3rd Embodiment of this invention performs. 本発明の第1の実施形態に係る画像処理装置としてのデジタルカメラのハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of the digital camera as an image processing apparatus which concerns on the 1st Embodiment of this invention.

Claims (18)

入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで、分割画像の符号化分割画像を生成する画像処理装置であって、
前記符号化分割画像のデータ量と、前記分割画像のデータ量と、の大小比較を行い、当該大小比較の結果に基づいて、前記分割画像、前記符号化分割画像、の何れかを前記分割画像の符号化結果として選択する選択手段と、
前記選択手段が選択した符号化結果を、符号化ストリームに格納する第1の格納制御手段と、
前記入力画像を構成するそれぞれの分割画像について前記選択手段が選択した符号化結果が前記分割画像、前記符号化分割画像の何れであるのかを特定するための識別子であって、該特定のために該識別子に要求される複数種のデータ構造のうち事前に決定されたデータ構造を有する識別子を、前記符号化ストリームに格納する第2の格納制御手段と、
前記第1の格納制御手段、前記第2の格納制御手段、により完成した前記符号化ストリームのデータ量に基づいて、前記入力画像の次に入力される画像について前記第2の格納制御手段で用いる識別子のデータ構造を決定する決定手段と
を備えることを特徴とする画像処理装置。
Dividing the input image into a plurality of divided images, by performing lossless encoding on the divided image, an image processing apparatus for generating an encoded divided picture of the divided images,
The data amount of the encoded divided image and the data amount of the divided image are compared, and based on the result of the size comparison, either the divided image or the encoded divided image is the divided image. Selecting means for selecting as an encoding result of
First storage control means for storing an encoding result selected by the selection means in an encoded stream;
An identifier for specifying whether the encoding result selected by the selection unit for each divided image constituting the input image is the divided image or the encoded divided image. Second storage control means for storing, in the encoded stream, an identifier having a data structure determined in advance among a plurality of types of data structures required for the identifier ;
Based on the data amount of the encoded stream completed by the first storage control means and the second storage control means, the second storage control means uses the image input next to the input image. An image processing apparatus comprising: a determination unit that determines a data structure of the identifier.
前記選択手段は、前記符号化分割画像の圧縮率が100%未満か否かを判断し、100%未満である場合には前記符号化分割画像、100%以上である場合には前記分割画像、を、前記分割画像の符号化結果として選択することを特徴とする請求項1に記載の画像処理装置。   The selection means determines whether or not the compression rate of the encoded divided image is less than 100%. If the compression ratio is less than 100%, the encoded divided image, and if it is 100% or more, the divided image, The image processing apparatus according to claim 1, wherein the image processing apparatus is selected as an encoding result of the divided image. 前記決定手段は、前記選択手段が選択した結果が前記分割画像、前記符号化分割画像の何れであるのかを示す識別子のデータ構造を規定する第1の方式、前記選択手段が選択した結果が前記分割画像であるか否かを示す識別子のデータ構造を規定する第2の方式、の何れかを選択し、選択した方式に従って、前記入力画像の次に入力される画像について前記第2の格納制御手段で用いる識別子のデータ構造を決定することを特徴とする請求項1又は2に記載の画像処理装置。   The determination means is a first method for defining a data structure of an identifier indicating whether the result selected by the selection means is the divided image or the encoded divided image, and the result selected by the selection means is the The second storage control is performed on an image input next to the input image in accordance with the selected method by selecting any one of the second methods for defining the data structure of the identifier indicating whether the image is a divided image. The image processing apparatus according to claim 1, wherein the data structure of an identifier used in the means is determined. 前記決定手段は、
前記第1の格納制御手段、前記第2の格納制御手段、により完成したN番目の入力画像に対する符号化ストリームのデータ量をLACT、前記N番目の入力画像に割り当てるデータ量として計算されたデータ量をTP(N)、前記N番目の入力画像を構成する全ての分割画像の符号化結果として前記選択手段が分割画像を選択し且つ前記第1の方式が規定する識別子を用いた場合の符号化ストリームのデータ量をTA、前記N番目の入力画像を構成する全ての分割画像の符号化結果として前記選択手段が分割画像を選択し且つ前記第2の方式が規定する識別子を用いた場合の符号化ストリームのデータ量をTB、とすると、(N+1)番目の入力画像に割り当てるデータ量TP(N+1)を、TP(N+1)=(TP(1)+TP(2)+…+TP(N))−LACT+TAを計算することで求める手段と、
TP(N+1)<TBの場合には、前記第1の方式を選択し、TP(N+1)≧TBの場合には、前記第1の方式若しくは前記第2の方式を選択する方式選択手段とを備え、
前記第2の格納制御手段は、前記(N+1)番目の入力画像については、前記方式選択手段が選択した方式が規定するデータ構造を有する識別子を前記符号化ストリームに格納することを特徴とする請求項3に記載の画像処理装置。
The determining means includes
The first storage control means, said second storage control unit, L the data amount of the coded stream for the finished N-th input image by ACT, the N-th calculated data as data amount to be allocated to the input image Code when the amount is TP (N), the selection means selects a divided image as an encoding result of all the divided images constituting the Nth input image, and an identifier defined by the first method is used. the data amount of stream TA, when the N-th of the selection means as the encoding result of all the divided images to select the divided image constituting the input image and the second method is used an identifier defining When the data amount of the coded stream TB, and the (N + 1) -th assigned to the input image data amount TP (N + 1), TP (N + 1) = (TP (1) + TP (2) + + TP (N)) - means for determining by calculating the L ACT + TA,
When TP (N + 1) <TB, the first method is selected, and when TP (N + 1) ≧ TB, method selecting means for selecting the first method or the second method is provided. Prepared,
The second storage control means stores, for the (N + 1) th input image, an identifier having a data structure defined by the method selected by the method selection means in the encoded stream. Item 4. The image processing apparatus according to Item 3.
前記第2の格納制御手段は、前記第1の方式が選択された場合には、前記第1の方式が前記分割画像について規定しているデータ構造の識別子、前記第1の方式が前記符号化分割画像について規定しているデータ構造の識別子、を用いることを特徴とする請求項3に記載の画像処理装置。   The second storage control means, when the first method is selected, is an identifier of a data structure defined by the first method for the divided image, and the first method is the encoding. The image processing apparatus according to claim 3, wherein an identifier having a data structure defining a divided image is used. 前記第2の格納制御手段は、前記第2の方式が選択された場合には、前記第2の方式が前記分割画像について規定しているデータ構造の識別子、を用いることを特徴とする請求項3に記載の画像処理装置。   The second storage control unit uses an identifier of a data structure defined by the second method for the divided image when the second method is selected. The image processing apparatus according to 3. 前記TAは、前記N番目の入力画像を構成する全ての分割画像のデータの合計値と、それぞれの分割画像に対して前記第1の方式が規定する識別子のビット長の合計値と、の和であり、
前記TBは、前記N番目の入力画像を構成する全ての分割画像のデータ量の合計値と、それぞれの分割画像に対して前記第2の方式が規定する識別子のビット長の合計値と、の和であることを特徴とする請求項4乃至の何れか1項に記載の画像処理装置。
The TA is a total value of data amounts of all divided images constituting the Nth input image, and a total value of bit lengths of identifiers defined by the first method for the respective divided images. Is sum,
The TB is a total value of the data amounts of all the divided images constituting the Nth input image, and a total value of the bit lengths of identifiers defined by the second method for the respective divided images. the image processing apparatus according to any one of claims 4 to 6, characterized in that the sum.
入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで、分割画像の符号化分割画像を生成する画像処理装置であって、
前記符号化分割画像のデータ量と、前記分割画像のデータ量と、の大小比較を行い、当該大小比較の結果に基づいて、前記分割画像、前記符号化分割画像、の何れかを前記分割画像の符号化結果として選択する選択手段と、
前記選択手段が選択した符号化結果を、符号化ストリームに格納する第1の格納制御手段と、
前記入力画像を構成するそれぞれの分割画像について前記選択手段が選択した符号化結果が前記分割画像、前記符号化分割画像の何れであるのかを特定するための識別子であって、該特定のために該識別子に要求される複数種のデータ構造のうち事前に決定されたデータ構造を有する識別子を、前記符号化ストリームに格納する第2の格納制御手段とを備え、
前記第2の格納制御手段は、分割画像毎に前記識別子のデータ構造を決定する決定手段を備え、
前記決定手段は、複数のデータ構造の使用が可能な場合には、前記分割画像に隣接する前記選択手段が選択した分割画像の符号化結果に基づいて1つデータ構造を決定することを特徴とする画像処理装置。
Dividing the input image into a plurality of divided images, by performing lossless encoding on the divided image, an image processing apparatus for generating an encoded divided picture of the divided images,
The data amount of the encoded divided image and the data amount of the divided image are compared, and based on the result of the size comparison, either the divided image or the encoded divided image is the divided image. Selecting means for selecting as an encoding result of
First storage control means for storing an encoding result selected by the selection means in an encoded stream;
An identifier for specifying whether the encoding result selected by the selection unit for each divided image constituting the input image is the divided image or the encoded divided image. Second storage control means for storing an identifier having a predetermined data structure among a plurality of types of data structures required for the identifier in the encoded stream;
The second storage control means includes a determination means for determining a data structure of the identifier for each divided image,
The determination means determines one data structure based on a coding result of a divided image selected by the selection means adjacent to the divided image when a plurality of data structures can be used. An image processing apparatus.
前記決定手段は、
前記分割画像に隣接する前記選択手段が選択した分割画像の符号化結果に1つでも分割画像が含まれている場合には、前記選択手段が選択した結果が前記分割画像、前記符号化分割画像の何れであるのかを示す識別子のデータ構造を規定する第1の方式に基づくデータ構造を決定し、
前記分割画像に隣接する前記選択手段が選択した分割画像の符号化結果が全て前記符号化分割画像である場合には、前記選択手段が選択した結果が前記分割画像であるか否かを示す識別子のデータ構造を規定する第2の方式に基づくデータ構造を決定する
ことを特徴とする請求項に記載の画像処理装置。
The determining means includes
When even one divided image is included in the encoding result of the divided image selected by the selection unit adjacent to the divided image, the result selected by the selection unit is the divided image, the encoded divided image Determining a data structure based on a first method that defines a data structure of an identifier indicating which one of
An identifier indicating whether or not the result selected by the selection unit is the divided image when all of the encoding results of the divided images selected by the selection unit adjacent to the divided image are the encoded divided images. The image processing apparatus according to claim 8 , wherein a data structure based on a second method that defines the data structure of the image data is determined.
更に、
全ての分割画像について同じ方式に基づくデータ構造を有する識別子を用いたのか、用いていないのかを示す情報を前記符号化ストリームに格納する手段を備えることを特徴とする請求項又はに記載の画像処理装置。
Furthermore,
It did using an identifier having a data structure based on the same method for all the divided images, information indicating whether the not used according to claim 8 or 9, characterized in that it comprises means for storing the coded stream Image processing device.
入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで生成された、分割画像の符号化分割画像を復号化する画像処理装置であって、
画像を構成するそれぞれの分割画像の符号化結果として分割画像、若しくは符号化分割画像と、それぞれの分割画像についての符号化結果が分割画像、符号化分割画像の何れであるのかを特定するための識別子と、を含む符号化ストリームを取得する手段と、
前記符号化ストリーム中の各識別子のデータ構造を規定する方式を決定する決定手段と、
前記決定手段が決定した方式に基づいて前記各識別子を解釈し、解釈した識別子に基づいて、対応する符号化結果が符号化分割画像であるのか分割画像であるのかを判断し、符号化分割画像である場合には、当該符号化分割画像を復号してから出力し、特定した形式が分割画像である場合には、当該分割画像を出力する出力手段とを備え、
前記決定手段は、前記符号化ストリームのデータ量に基づいて、前記符号化ストリームの次に入力される符号化ストリーム中の各識別子の方式を決定する
ことを特徴とする画像処理装置。
Dividing the input image into a plurality of divided images, generated by performing lossless encoding on the divided image, an image processing apparatus for decoding an encoded divided picture of the divided images,
For specifying whether a divided image or an encoded divided image as an encoding result of each divided image constituting the image and whether the encoding result for each divided image is a divided image or an encoded divided image Means for obtaining an encoded stream including an identifier;
Determining means for determining a method for defining a data structure of each identifier in the encoded stream;
Each identifier is interpreted based on the method determined by the determination means, and based on the interpreted identifier, it is determined whether the corresponding encoding result is an encoded divided image or a divided image, and the encoded divided image The encoded divided image is decoded and output, and when the specified format is a divided image, the output unit includes an output unit that outputs the divided image.
The image processing apparatus according to claim 1, wherein the determination unit determines a method of each identifier in an encoded stream input next to the encoded stream, based on a data amount of the encoded stream.
入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで生成された、分割画像の符号化分割画像を復号化する画像処理装置であって、
画像を構成するそれぞれの分割画像の符号化結果として分割画像、若しくは符号化分割画像と、それぞれの分割画像についての符号化結果が分割画像、符号化分割画像の何れであるのかを特定するための識別子と、を含む符号化ストリームを取得する手段と、
前記符号化ストリーム中の各識別子のデータ構造を規定する方式を決定する決定手段と、
前記決定手段が決定した方式に基づいて前記各識別子を解釈し、解釈した識別子に基づいて、対応する符号化結果が符号化分割画像であるのか分割画像であるのかを判断し、符号化分割画像である場合には、当該符号化分割画像を復号してから出力し、特定した形式が分割画像である場合には、当該分割画像を出力する出力手段とを備え、
前記決定手段は、分割画像毎に前記方式を決定し、複数の方式の使用が可能な場合には、前記分割画像に隣接する分割画像の符号化結果に基づいて1つ方式を決定することを特徴とする画像処理装置。
Dividing the input image into a plurality of divided images, generated by performing lossless encoding on the divided image, an image processing apparatus for decoding an encoded divided picture of the divided images,
For specifying whether a divided image or an encoded divided image as an encoding result of each divided image constituting the image and whether the encoding result for each divided image is a divided image or an encoded divided image Means for obtaining an encoded stream including an identifier;
Determining means for determining a method for defining a data structure of each identifier in the encoded stream;
Each identifier is interpreted based on the method determined by the determination means, and based on the interpreted identifier, it is determined whether the corresponding encoding result is an encoded divided image or a divided image, and the encoded divided image The encoded divided image is decoded and output, and when the specified format is a divided image, the output unit includes an output unit that outputs the divided image.
The determining means determines the method for each divided image, and when a plurality of methods can be used, determines one method based on a coding result of a divided image adjacent to the divided image. A featured image processing apparatus.
入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで、分割画像の符号化分割画像を生成する画像処理装置が行う画像処理方法であって、
前記画像処理装置の選択手段が、前記符号化分割画像のデータ量と、前記分割画像のデータ量と、の大小比較を行い、当該大小比較の結果に基づいて、前記分割画像、前記符号化分割画像、の何れかを前記分割画像の符号化結果として選択する選択工程と、
前記画像処理装置の第1の格納制御手段が、前記選択工程で選択した符号化結果を、符号化ストリームに格納する第1の格納制御工程と、
前記画像処理装置の第2の格納制御手段が、前記入力画像を構成するそれぞれの分割画像について前記選択工程で選択した符号化結果が前記分割画像、前記符号化分割画像の何れであるのかを特定するための識別子であって、該特定のために該識別子に要求される複数種のデータ構造のうち事前に決定されたデータ構造を有する識別子を、前記符号化ストリームに格納する第2の格納制御工程と、
前記画像処理装置の決定手段が、前記第1の格納制御工程、前記第2の格納制御工程、で完成した前記符号化ストリームのデータ量に基づいて、前記入力画像の次に入力される画像について前記第2の格納制御工程で用いる識別子のデータ構造を決定する決定工程と
を備えることを特徴とする画像処理方法。
Dividing the input image into a plurality of divided images, by performing lossless encoding on the divided image, an image processing method for an image processing apparatus for generating an encoded divided picture of the divided picture is performed,
The selection unit of the image processing device performs a size comparison between the data amount of the encoded divided image and the data amount of the divided image, and based on the result of the size comparison, the divided image and the encoded division A selection step of selecting any one of the images as an encoding result of the divided image;
A first storage control step in which the first storage control means of the image processing apparatus stores the encoding result selected in the selection step in an encoded stream;
The second storage control means of the image processing device specifies whether the encoding result selected in the selection step for each divided image constituting the input image is the divided image or the encoded divided image A second storage control for storing an identifier having a predetermined data structure among a plurality of types of data structures required for the identifier for identification in the encoded stream Process,
An image to be input next to the input image based on a data amount of the encoded stream completed by the determination unit of the image processing device in the first storage control step and the second storage control step. A determination step of determining a data structure of an identifier used in the second storage control step.
入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで、分割画像の符号化分割画像を生成する画像処理装置が行う画像処理方法であって、
前記画像処理装置の選択手段が、前記符号化分割画像のデータ量と、前記分割画像のデータ量と、の大小比較を行い、当該大小比較の結果に基づいて、前記分割画像、前記符号化分割画像、の何れかを前記分割画像の符号化結果として選択する選択工程と、
前記画像処理装置の第1の格納制御手段が、前記選択工程で選択した符号化結果を、符号化ストリームに格納する第1の格納制御工程と、
前記画像処理装置の第2の格納制御手段が、前記入力画像を構成するそれぞれの分割画像について前記選択工程で選択した符号化結果が前記分割画像、前記符号化分割画像の何れであるのかを特定するための識別子であって、該特定のために該識別子に要求される複数種のデータ構造のうち事前に決定されたデータ構造を有する識別子を、前記符号化ストリームに格納する第2の格納制御工程とを備え、
前記第2の格納制御工程は、分割画像毎に前記識別子のデータ構造を決定する決定工程を備え、
前記決定工程では、複数のデータ構造の使用が可能な場合には、前記分割画像に隣接する前記選択工程で選択した分割画像の符号化結果に基づいて1つデータ構造を決定することを特徴とする画像処理方法。
Dividing the input image into a plurality of divided images, by performing lossless encoding on the divided image, an image processing method for an image processing apparatus for generating an encoded divided picture of the divided picture is performed,
The selection unit of the image processing device performs a size comparison between the data amount of the encoded divided image and the data amount of the divided image, and based on the result of the size comparison, the divided image and the encoded division A selection step of selecting any one of the images as an encoding result of the divided image;
A first storage control step in which the first storage control means of the image processing apparatus stores the encoding result selected in the selection step in an encoded stream;
The second storage control means of the image processing device specifies whether the encoding result selected in the selection step for each divided image constituting the input image is the divided image or the encoded divided image A second storage control for storing an identifier having a predetermined data structure among a plurality of types of data structures required for the identifier for identification in the encoded stream A process,
The second storage control step includes a determination step of determining a data structure of the identifier for each divided image,
In the determining step, when a plurality of data structures can be used, one data structure is determined based on the encoding result of the divided image selected in the selection step adjacent to the divided image. Image processing method.
入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで生成された、分割画像の符号化分割画像を復号化する画像処理装置が行う画像処理方法であって、
前記画像処理装置の取得手段が、画像を構成するそれぞれの分割画像の符号化結果として分割画像、若しくは符号化分割画像と、それぞれの分割画像についての符号化結果が分割画像、符号化分割画像の何れであるのかを特定するための識別子と、を含む符号化ストリームを取得する工程と、
前記画像処理装置の決定手段が、前記符号化ストリーム中の各識別子のデータ構造を規定する方式を決定する決定工程と、
前記画像処理装置の出力手段が、前記決定工程で決定した方式に基づいて前記各識別子を解釈し、解釈した識別子に基づいて、対応する符号化結果が符号化分割画像であるのか分割画像であるのかを判断し、符号化分割画像である場合には、当該符号化分割画像を復号してから出力し、特定した形式が分割画像である場合には、当該分割画像を出力する出力工程とを備え、
前記決定工程では、前記符号化ストリームのデータ量に基づいて、前記符号化ストリームの次に入力される符号化ストリーム中の各識別子の方式を決定する
ことを特徴とする画像処理方法。
Dividing the input image into a plurality of divided images, generated by performing lossless encoding on the divided image, an image processing method to be performed by the image processing apparatus for decoding an encoded divided picture of the divided images,
The acquisition unit of the image processing device is a divided image or an encoded divided image as an encoding result of each divided image constituting the image, and an encoding result for each divided image is a divided image or an encoded divided image. Obtaining an encoded stream including an identifier for specifying which is, and
A determining step in which the determining means of the image processing apparatus determines a method for defining a data structure of each identifier in the encoded stream;
The output means of the image processing apparatus interprets each identifier based on the method determined in the determination step, and based on the interpreted identifier, whether the corresponding encoding result is an encoded divided image or a divided image When the encoded divided image is a decoded image, the encoded divided image is output after being decoded. When the specified format is a divided image, an output step of outputting the divided image is performed. Prepared,
The image processing method according to claim 1, wherein, in the determining step, a method of each identifier in an encoded stream input next to the encoded stream is determined based on a data amount of the encoded stream.
入力画像を複数の分割画像に分割し、分割画像について可逆符号化を行うことで生成された、分割画像の符号化分割画像を復号化する画像処理装置が行う画像処理方法であって、
前記画像処理装置の取得手段が、画像を構成するそれぞれの分割画像の符号化結果として分割画像、若しくは符号化分割画像と、それぞれの分割画像についての符号化結果が分割画像、符号化分割画像の何れであるのかを特定するための識別子と、を含む符号化ストリームを取得する工程と、
前記画像処理装置の決定手段が、前記符号化ストリーム中の各識別子のデータ構造を規定する方式を決定する決定工程と、
前記画像処理装置の出力手段が、前記決定工程で決定した方式に基づいて前記各識別子を解釈し、解釈した識別子に基づいて、対応する符号化結果が符号化分割画像であるのか分割画像であるのかを判断し、符号化分割画像である場合には、当該符号化分割画像を復号してから出力し、特定した形式が分割画像である場合には、当該分割画像を出力する出力工程とを備え、
前記決定工程では、分割画像毎に前記方式を決定し、複数の方式の使用が可能な場合には、前記分割画像に隣接する分割画像の符号化結果に基づいて1つ方式を決定することを特徴とする画像処理方法。
Dividing the input image into a plurality of divided images, generated by performing lossless encoding on the divided image, an image processing method to be performed by the image processing apparatus for decoding an encoded divided picture of the divided images,
The acquisition unit of the image processing device is a divided image or an encoded divided image as an encoding result of each divided image constituting the image, and an encoding result for each divided image is a divided image or an encoded divided image. Obtaining an encoded stream including an identifier for specifying which is, and
A determining step in which the determining means of the image processing apparatus determines a method for defining a data structure of each identifier in the encoded stream;
The output means of the image processing apparatus interprets each identifier based on the method determined in the determination step, and based on the interpreted identifier, whether the corresponding encoding result is an encoded divided image or a divided image When the encoded divided image is a decoded image, the encoded divided image is output after being decoded. When the specified format is a divided image, an output step of outputting the divided image is performed. Prepared,
In the determining step, the method is determined for each divided image, and when a plurality of methods can be used, one method is determined based on the encoding result of the divided image adjacent to the divided image. A featured image processing method.
コンピュータを、請求項1乃至12の何れか1項に記載の画像処理装置各手段として機能させるためのコンピュータプログラム。 A computer program for a computer to function as each means of the image processing apparatus according to any one of claims 1 to 12. 請求項17に記載のコンピュータプログラムを格納した、コンピュータが読み取り可能な記憶媒体。 A computer-readable storage medium storing the computer program according to claim 17 .
JP2009011119A 2009-01-21 2009-01-21 Image processing apparatus and image processing method Expired - Fee Related JP5094752B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009011119A JP5094752B2 (en) 2009-01-21 2009-01-21 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009011119A JP5094752B2 (en) 2009-01-21 2009-01-21 Image processing apparatus and image processing method

Publications (3)

Publication Number Publication Date
JP2010171621A JP2010171621A (en) 2010-08-05
JP2010171621A5 JP2010171621A5 (en) 2012-03-01
JP5094752B2 true JP5094752B2 (en) 2012-12-12

Family

ID=42703328

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009011119A Expired - Fee Related JP5094752B2 (en) 2009-01-21 2009-01-21 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP5094752B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6083973B2 (en) * 2012-08-08 2017-02-22 株式会社メガチップス Data storage control device and data storage method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3192113B2 (en) * 1997-10-29 2001-07-23 富士ゼロックス株式会社 Encoding device
JP2003324731A (en) * 2002-04-26 2003-11-14 Sony Corp Encoder, decoder, image processing apparatus, method and program for them
JP2008028534A (en) * 2006-07-19 2008-02-07 Pentax Corp Digital camera

Also Published As

Publication number Publication date
JP2010171621A (en) 2010-08-05

Similar Documents

Publication Publication Date Title
JP4682102B2 (en) Image coding apparatus and image coding method
US8665467B2 (en) Image processing apparatus and method extracting still images from a moving image, system having such apparatus, printing apparatus used in such system, and computer-readable medium storing a program executed by a computer that extracts still images from a moving image
US8554004B2 (en) Data transform apparatus
JP2000138934A (en) JPEG encoding apparatus, method and recording medium with limited file size
JP4470485B2 (en) Image compression apparatus, image compression program, image expansion apparatus, image expansion program, and electronic camera for generating prediction differential compression data of fixed bit length
JP2003046582A (en) Video signal encoder, video signal decoder and video transmission system
US20080279464A1 (en) Transport stream structure of image data having additional information inserted, and method and apparatus for transmission and reception thereof
KR101208233B1 (en) Two step arithmetic decoding with conversion into an intermediate format
US20050213830A1 (en) Image processing device and method
US6563946B2 (en) Image processing apparatus and method
JPH1079941A (en) Image processing device
WO2004112396A1 (en) Electronic device for compressing image data and creating thumbnail image, image processor, and data structure
JP6512916B2 (en) Image pickup apparatus, control method thereof and program
JP3501213B2 (en) Video device and recoder used therefor
KR100591796B1 (en) Image processing method and device
CN101677385B (en) Moving-image reproducing apparatus and moving-image reproducing method
JP4288398B2 (en) Image recording apparatus, image reproducing apparatus, and recording medium recording image processing program
JP5094752B2 (en) Image processing apparatus and image processing method
JP4100836B2 (en) Image processing device
US20040208481A1 (en) Apparatus and method for image processing, and image processing system using the same and program
JP3495336B2 (en) Image encoding method and apparatus, image decoding method and apparatus
JP2941913B2 (en) Image signal recording device
JP6332039B2 (en) Screen encoding device, screen decoding device, screen encoding transmission system
EP0843483A2 (en) A method for decoding encoded video data
JP2001128043A (en) Picture photographing/accumulating device and picture displaying/printing device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120113

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120113

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120814

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120918

R151 Written notification of patent or utility model registration

Ref document number: 5094752

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20150928

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees