JP2007053445A - Server and its control method, computer program, storage medium - Google Patents

Server and its control method, computer program, storage medium Download PDF

Info

Publication number
JP2007053445A
JP2007053445A JP2005235487A JP2005235487A JP2007053445A JP 2007053445 A JP2007053445 A JP 2007053445A JP 2005235487 A JP2005235487 A JP 2005235487A JP 2005235487 A JP2005235487 A JP 2005235487A JP 2007053445 A JP2007053445 A JP 2007053445A
Authority
JP
Japan
Prior art keywords
data
resolution level
image data
packet
external device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005235487A
Other languages
Japanese (ja)
Inventor
Miyuki Enokida
幸 榎田
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 JP2005235487A priority Critical patent/JP2007053445A/en
Publication of JP2007053445A publication Critical patent/JP2007053445A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology for reducing hardware requirements requested for the data receiving side in a configuration for transmitting/receiving image data encoded hierarchically. <P>SOLUTION: The server comprises a means for storing image data consisting of one or more packets for each resolution level, a means for receiving a transmission request including designation of the resolution level of image data and information about the storage capacity of an external unit from the external unit, a means for determining whether a predetermined processing is performed or not, based on comparison of the image data size and the capacity information, a means for performing a processing for creating return data when a decision is made to perform the processing by the determining means by adding a packet included in a resolution level below a specified level to the return data and adding a packet not included in a resolution level to the return data while replacing the length by ZLP, and a means for delivering the created return data to the external unit. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は画像データを送受信する技術に関する。   The present invention relates to a technique for transmitting and receiving image data.

近年、コンピュータの表示装置等に用いられるディスプレイの解像度が向上している。かつて普及していたディスプレイの解像度は、VGA(640×480画素)、SVGA(800×600画素)程度以下であった。これに対し、現在ではノートPC(Personal Computer)でさえ、XGA(1024×768画素)以上のディスプレイを備えている。デスクトップPC等に外付けされるディスプレイにいたっては、SXGA(1280×1024画素), UXGA(1600×1200画素)程度の解像度を備えたものが普及している。今後、QXGA, QUXGA等の高解像度をサポートするディスプレイが普及することは、容易に推察できる。   In recent years, the resolution of displays used in computer display devices and the like has improved. The resolution of the display that was once popular was about VGA (640 × 480 pixels) or SVGA (800 × 600 pixels) or less. On the other hand, even a notebook PC (Personal Computer) now has a display of XGA (1024 × 768 pixels) or more. A display having a resolution of about SXGA (1280 × 1024 pixels) or UXGA (1600 × 1200 pixels) is widely used as a display attached to a desktop PC or the like. It can be easily guessed that displays that support high resolution such as QXGA and QUXGA will become widespread in the future.

一方、デジタルカメラ等により撮影された多数の画像データをサムネイル画像(縮小画像)として並べて表示し、所定のイベントに基づいてその中の1つを元画像のサイズで詳細表示するアプリケーションが知られている。このようなアプリケーションはズームやスクロールなどの表示技術を利用していることが一般的である。   On the other hand, there is known an application that displays a large number of image data taken by a digital camera or the like as thumbnail images (reduced images) and displays one of them in detail at the size of the original image based on a predetermined event. Yes. Such applications generally use display technologies such as zoom and scroll.

このようなアプリケーションにおいて、多数の画像データを同時に表示する場合には高速性が重要視されるため、主画像データとは異なる予め作成されたサムネイル画像データを用いることが多い。一方、そのサムネイル表示から選択された画像データの1枚表示は、主画像データを用いて、アプリケーションのウィンドウサイズあるいは、ディスプレイ装置に表示できるまでは、画像全体を表示することが多い。それ以上の拡大表示については画像の一部分を表示することが多い。   In such an application, when displaying a large number of image data at the same time, high speed is regarded as important. Therefore, thumbnail image data created in advance different from the main image data is often used. On the other hand, in the single image display selected from the thumbnail display, the entire image is often displayed until it can be displayed on the window size of the application or the display device using the main image data. For enlarged display beyond that, a part of the image is often displayed.

このような、1枚の画像データを表示する際に、元画像データの画像サイズより小さい画像サイズの画像データを複数種類使用するようなアプリケーションにおいては、次のような処理を行っていた。即ち、必要に応じてデコード処理を行い、1度元画像データの画像サイズを再現し、その後、目的の画像サイズになるように、画像データを縮小する処理を行っていた。   In such an application that uses a plurality of types of image data having an image size smaller than that of the original image data when displaying one image data, the following processing is performed. That is, the decoding process is performed as necessary, and the image size of the original image data is reproduced once, and then the process of reducing the image data so as to obtain the target image size is performed.

一方、画像データは、非圧縮かあるいはJPEG baselineのようなシーケンシャルの符号化方式で圧縮されていた。或いは、画像データを階層符号化方式で画像圧縮しておき、表示に必要な画像サイズまでをデコードし、表示するように実装していた。   On the other hand, the image data is uncompressed or compressed by a sequential encoding method such as JPEG baseline. Alternatively, the image data is compressed by a hierarchical encoding method, and the image size required for display is decoded and displayed.

階層符号化方式としては、例えば、JPEG2000符号化方式がある。JPEG2000は、1枚の画像データを1つ以上のタイルに分割し、その分割されたタイル毎に、1つ以上の解像度の画像を階層的に保持する階層符号化方式である。JPEG2000は、2001年にISO/ITCで標準化された画像符号化方式としても知られている。   As a hierarchical encoding method, for example, there is a JPEG2000 encoding method. JPEG2000 is a hierarchical encoding method in which one piece of image data is divided into one or more tiles, and an image having one or more resolutions is hierarchically stored for each divided tile. JPEG2000 is also known as an image encoding method standardized by ISO / ITC in 2001.

JPEG2000符号化方式には、エンコード時のエンコード・オプションが数多く存在する。しかし、全ての機能をサポートしたデコーダは、多大な開発コストを要し、また、動作させるために通常よりも高度な演算リソース(CPUクロック、メモリ容量等)を要する。   The JPEG2000 encoding method has many encoding options at the time of encoding. However, a decoder that supports all functions requires a large development cost, and requires more advanced computing resources (CPU clock, memory capacity, etc.) than usual to operate.

また、ネットワーク上でこのJPEG2000で符号化された符号データファイルに対して断片的に必要な部分のみをアクセスする時のプロトコルとしてJPIPが知られており、現在策定中である。ただし、JPIPは、JPEG2000 image coding system - Part 9: Interactivity tools, APIs and protocolsの略称である。   JPIP is known as a protocol for accessing only a necessary part of a code data file encoded with JPEG2000 on a network in a fragmentary manner and is currently being formulated. However, JPIP is an abbreviation for JPEG2000 image coding system-Part 9: Interactivity tools, APIs and protocols.

また、JPIPを利用したサーバ、クライアントからなる画像配信システムが知られている。   In addition, an image distribution system including a server and a client using JPIP is known.

特許文献1には、JPEG2000で符号化された画像データの部分データをサーバ・クライアントで送受信するシステムが開示されている。この構成において、クライアントは、サーバに格納されているコードストリームのどの部分が、既にクライアントのバッファに格納されているかを判別し、未だバッファに格納していない圧縮データの部分をサーバに要求する。クライアントが要求するデータの単位は、例えば、JPEG2000符号内のパケット、タイル、コードブロックから選択可能であり、或いは、バイト単位での要求も可能である。一方、サーバは、要求された圧縮データの部分データを抜き出してクライアントに返送する。クライアントは、受信したデータと既にバッファに格納されたデータを統合してデコードを行い、画像を取得する。   Patent Document 1 discloses a system that transmits and receives partial data of image data encoded by JPEG2000 using a server and a client. In this configuration, the client determines which part of the codestream stored in the server is already stored in the client's buffer, and requests the server for the portion of compressed data that is not yet stored in the buffer. The unit of data requested by the client can be selected from, for example, packets, tiles, and code blocks in the JPEG2000 code, or can be requested in byte units. On the other hand, the server extracts the partial data of the requested compressed data and returns it to the client. The client integrates the received data and the data already stored in the buffer for decoding, and acquires an image.

また、特許文献2には、サーバ側に格納されているJPEG2000符号データを、クライアント側で高速にプログレッシブ表示するための技術が開示されている。この構成において、クライアントは、欲しい解像度レベルを指定するリクエストを発行し、サーバへ送出する。サーバは、クライアントから指定された解像度レベルのサブバンド符号データを、格納された画像ファイルから取り出してクライアントに送信する。クライアントは、表示している画像の解像度レベルの、復号化されたサブバンドの係数と、サーバから受信した符号データを復号して得られたサブバンドの係数とに基づいて画像データを復元することで、解像度方向のプログレッシブ表示を行うことができる。
特開2003−023630号公報 特開2004−040674号公報
Patent Document 2 discloses a technique for displaying JPEG2000 code data stored on the server side in a progressive manner on the client side. In this configuration, the client issues a request specifying the desired resolution level and sends it to the server. The server extracts subband code data of the resolution level designated by the client from the stored image file and transmits it to the client. The client restores the image data based on the decoded subband coefficient of the resolution level of the displayed image and the subband coefficient obtained by decoding the code data received from the server. Thus, progressive display in the resolution direction can be performed.
JP 2003-023630 A JP 2004-040673 A

上記のように階層的に符号化された画像データを送受信する構成においては、データ伝送を効率よく行うために、クライアントが1度受信した符号データをキャッシュしておき、未受信部分の符号データのみをサーバに要求するように制御する。しかし、このような構成を実現するためには、クライアントは大容量の記憶装置を有している必要がある。   In the configuration for transmitting and receiving the hierarchically encoded image data as described above, in order to perform data transmission efficiently, the code data received once by the client is cached, and only the code data of the unreceived portion is stored. To request to the server. However, in order to realize such a configuration, the client needs to have a large-capacity storage device.

例えば、上記のような構成において、クライアント側で画像データを追加要求をせずに全て表示できた場合には、サーバに格納されている圧縮画像データが全てクライアント側に送信されている。つまり、このような場合には、サーバに格納されている圧縮画像データのファイルと同サイズ、あるいはそれ以上のキャッシュ容量をクライアント側が有していることを意味する。   For example, in the configuration as described above, when all the image data can be displayed without requesting addition on the client side, all the compressed image data stored in the server is transmitted to the client side. That is, in such a case, it means that the client side has a cache capacity equal to or larger than that of the compressed image data file stored in the server.

また、キャッシュデータをJPEG2000の符号データに変換する場合は、キャッシュデータと符号データとの2種類のデータを作成/管理する必要がある。このため、クライアント側ではサーバに格納されている圧縮画像ファイルサイズの2倍以上のメモリあるいはファイル容量を必要とすることになる。   In addition, when converting cache data into JPEG2000 code data, it is necessary to create / manage two types of data: cache data and code data. For this reason, the client side requires a memory or file capacity that is at least twice the size of the compressed image file stored in the server.

画像データのサイズについて具体例を挙げて説明する。ここで、サーバにある圧縮画像ファイルの画像サイズがとても大きい場合、例えば、画像サイズが10240×10240画素×3色の場合を考えると、非圧縮状態での画像データは、300Mバイトになる。102400×102400画素×3色の場合は、30000Mバイト、即ち約30Gバイトとなる。これを1/20に圧縮したとして前者は15Mバイト、後者は1500Mバイトになる。   The size of the image data will be described with a specific example. Here, when the image size of the compressed image file in the server is very large, for example, when the image size is 10240 × 10240 pixels × 3 colors, the image data in the uncompressed state is 300 Mbytes. In the case of 102400 × 102400 pixels × 3 colors, it is 30000 Mbytes, that is, about 30 Gbytes. If this is compressed to 1/20, the former is 15 Mbytes and the latter is 1500 Mbytes.

このようなデータサイズの大きいデータは、クライアント装置がパーソナルコンピュータ(PC、パソコン)で実現されている場合は、処理可能かもしれない。しかしながら、小型のPC、PDAや携帯端末等のようなデバイスの場合では、メモリ容量あるいはファイル容量等の記憶装置の制限に加えて、CPU性能の制限においても扱えない場合が多い。   Such data with a large data size may be processable if the client device is realized by a personal computer (PC, personal computer). However, in the case of a device such as a small PC, PDA, portable terminal, etc., in many cases, it cannot be dealt with by limiting the CPU performance in addition to the limitation of the storage device such as memory capacity or file capacity.

また、クライアントが通常のPCによって実現された場合においても、画像通信の処理をその他の様々な処理と並行して行なう場合、画像通信に割り当てられるハードウェア・リソースが制限され、大容量の画像データ処理が現実的に困難になる可能性がある。さらに通常のPCにおいても、一時的なファイルやメモリとして1Gバイトを超えるファイルを作成することは容易ではなく、ましてやメモリ上にこの容量の領域を確保することは極めて困難である。   Even when the client is realized by a normal PC, if the image communication process is performed in parallel with other various processes, hardware resources allocated to the image communication are limited, and a large amount of image data Processing can be difficult in practice. Further, even in a normal PC, it is not easy to create a temporary file or a file exceeding 1 Gbyte as a memory, and it is extremely difficult to secure an area of this capacity on the memory.

また、受信した符号データをキャッシュしないでJPEG2000のデコード作業を途中で停止し、差分の符号データを追加してデコードを続ける構成も可能である。しかし、このような構成の場合は、演算の途中結果であるDWT係数を保持する必要がある。各画素が8ビットの場合でも、このDWT係数は16ビット以上であり通常の実装では32ビットである。よってこのDWT係数を保持することは、デコード後の画像データを保持する以上のメモリ容量を必要とする。即ち、符号データをキャッシュする場合よりはるかに大きいメモリ容量を必要とすることを意味する。   Further, it is possible to stop the JPEG2000 decoding operation halfway without caching the received code data, add differential code data, and continue decoding. However, in such a configuration, it is necessary to hold a DWT coefficient that is an intermediate result of the calculation. Even when each pixel is 8 bits, this DWT coefficient is 16 bits or more, and is 32 bits in a normal implementation. Therefore, holding this DWT coefficient requires a memory capacity larger than holding the decoded image data. That is, it means that a much larger memory capacity is required than when the code data is cached.

特許文献1に開示された構成は、クライアント側でキャッシュすることを前提としているため、要求した圧縮画像データファイルのバイト数以上のキャッシュ容量を必要とする。そのため要求した圧縮画像データファイルのファイルサイズがクライアントの能力を超えて大きい場合は、クライアントは処理を継続することができない場合がある。   Since the configuration disclosed in Patent Document 1 is premised on caching on the client side, it requires a cache capacity equal to or greater than the number of bytes of the requested compressed image data file. Therefore, if the requested compressed image data file size is larger than the client's capability, the client may not be able to continue processing.

また、特許文献2に開示された構成においては、デコード処理を途中で止めて、デコード処理で使用したDWT係数を保持する。このため、符号データを保持する場合に比べて、DWT計数の保持のための大容量メモリを要する。また、デコード作業を途中で停止したり、サブバンドのデータを追加するためには、特殊なデコーダを要する。   In the configuration disclosed in Patent Document 2, the decoding process is stopped halfway and the DWT coefficient used in the decoding process is held. For this reason, a large-capacity memory for holding the DWT count is required as compared with the case of holding the code data. Also, a special decoder is required to stop the decoding operation halfway or add subband data.

さらには、要求する画像データのファイルサイズは、現状のJPIPのリクエスト/レスポンスのデータフォーマットからは取得することができない。このため、クライアント側で符号データを要求する前にファイルサイズ等を調べることができない。   Furthermore, the file size of the requested image data cannot be obtained from the current JPIP request / response data format. For this reason, the file size or the like cannot be checked before requesting code data on the client side.

上記のように、階層的に符号化された画像データを送受信する従来の構成においては、クライアント装置に要求されるハードウェア要件が非常に高かった。特に、画像データのデータサイズが大きい場合にこの問題が顕著であった。   As described above, in the conventional configuration in which image data encoded hierarchically is transmitted and received, the hardware requirements required for the client device are very high. This problem is particularly noticeable when the image data size is large.

本発明は上記問題に鑑みなされたものであり、階層的に符号化された画像データを送受信する構成において、データ受信側に要求されるハードウェア要件を低減する技術を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique for reducing hardware requirements required on the data receiving side in a configuration for transmitting and receiving hierarchically encoded image data. .

上記目的を達成するため、本発明によるサーバ装置は以下の構成を備える。即ち、
1以上のパケットから構成された画像データを解像度レベル毎に記憶する記憶手段と、
外部装置から、少なくとも前記画像データの前記解像度レベルの指定が含まれる送信要求と、該外部装置の記憶可能容量に係る容量情報とを受信する受信手段と、
前記画像データのサイズと前記容量情報との比較に基づいて前記画像データに対して所定の処理を実行するか否かを決定する決定手段と、
前記決定手段において処理を実行すると決定された場合、指定された前記解像度レベル及び当該指定された解像度レベルよりも低い解像度レベルに含まれる前記パケットを返送データに追加し、前記解像度レベルに含まれない前記パケットを長さが0であることを示すパケットで置き換えて該返送データに追加することによって、返送データを生成する処理を実行する生成手段と、
生成された前記返送データを前記外部装置へ送出する送出手段と、を備える。
In order to achieve the above object, a server apparatus according to the present invention comprises the following arrangement. That is,
Storage means for storing image data composed of one or more packets for each resolution level;
Receiving means for receiving, from an external device, a transmission request including at least the designation of the resolution level of the image data, and capacity information relating to the storable capacity of the external device;
Determining means for determining whether or not to execute a predetermined process on the image data based on a comparison between the size of the image data and the capacity information;
When the determination means determines to execute the process, the packet included in the specified resolution level and the resolution level lower than the specified resolution level is added to the return data, and is not included in the resolution level. Generation means for executing processing for generating return data by replacing the packet with a packet indicating that the length is 0 and adding the packet to the return data;
Sending means for sending the generated return data to the external device.

本発明によれば、階層的に符号化された画像データを送受信する構成において、データ受信側に要求されるハードウェア要件を低減する技術を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the technique which reduces the hardware requirement requested | required by the data receiving side in the structure which transmits / receives the image data encoded hierarchically can be provided.

以下、添付図面を参照して本発明に係る実施の形態を詳細に説明する。ただし、この実施の形態に記載されている構成要素はあくまでも例示であり、本発明の範囲をそれらのみに限定する趣旨のものではない。   Embodiments according to the present invention will be described below in detail with reference to the accompanying drawings. However, the constituent elements described in this embodiment are merely examples, and are not intended to limit the scope of the present invention only to them.

<<第1実施形態>>
(システム構成)
まず、本実施形態におけるシステムの構成について図1を参照して説明する。図1は、インターネットに代表されるネットワーク上に複数のコンピュータが接続されている様子を示した図である。
<< First Embodiment >>
(System configuration)
First, the configuration of the system in the present embodiment will be described with reference to FIG. FIG. 1 is a diagram showing a state in which a plurality of computers are connected on a network represented by the Internet.

図1において、100はインターネットに代表されるネットワークである。   In FIG. 1, reference numeral 100 denotes a network represented by the Internet.

101はサーバ・コンピュータ(サーバ)であり、WWWサーバとして機能するために必要なソフトウエアがインストールされている。このようなソフトウエアには、例えば、画像データを送信するためのJPEG2000用の通信プロトコルであるJPIPサーバとして機能するためのプログラムが含まれる。サーバ101は、例えば、ワークステーション(WS)、パーソナルコンピュータ(PC)等の情報処理装置によって実現される。   Reference numeral 101 denotes a server computer (server) in which software necessary for functioning as a WWW server is installed. Such software includes, for example, a program for functioning as a JPIP server, which is a JPEG2000 communication protocol for transmitting image data. The server 101 is realized by an information processing apparatus such as a workstation (WS) or a personal computer (PC).

また、104は大容量の画像データを格納するHD(Hard Disk)装置であり、JPEG2000符号化方式で符号化された圧縮画像データが保存されている。HD装置104はサーバ101と通信可能に接続されている。   Reference numeral 104 denotes an HD (Hard Disk) device for storing large-capacity image data, which stores compressed image data encoded by the JPEG2000 encoding method. The HD device 104 is communicably connected to the server 101.

102及び103はクライアント・コンピュータ(以下、まとめてクライアント102と称する)である。クライアント102は、例えば、PCやWS、或いは、携帯電話、PHS、携帯情報端末(PDA)等で実現される。クライアント102には、Webページを閲覧するために必要なWebブラウザ等のソフトウエア、JPEG2000符号化データをデコード/表示するためのソフトウエア、JPIPのクライアント機能を実装したソフトウエア等がインストールされている。   Reference numerals 102 and 103 denote client computers (hereinafter collectively referred to as the client 102). The client 102 is realized by, for example, a PC, WS, a mobile phone, a PHS, a personal digital assistant (PDA), or the like. The client 102 is installed with software such as a Web browser necessary for browsing a Web page, software for decoding / displaying JPEG2000 encoded data, and software implementing a JPIP client function. .

(情報処理装置の構成)
次に、サーバ101の構成について図2を参照して説明する。図2は、サーバ101のハードウェア構成を示したブロック図である。
(Configuration of information processing device)
Next, the configuration of the server 101 will be described with reference to FIG. FIG. 2 is a block diagram illustrating a hardware configuration of the server 101.

201はCPU(Central Processing Unit)であり、システム全体の制御などを行う。202はキーボードであり、201aのマウスと共に、ユーザがシステムに情報等を指示入力するために使用される。   A CPU (Central Processing Unit) 201 controls the entire system. A keyboard 202 is used together with the mouse 201a for the user to input information and the like to the system.

203は表示部であり、CRT(Cathode Ray Tube)や液晶ディスプレイなどで構成される。204はROM(Read Only Memory)、205はRAM(Random Access Memory)であり、システムの記憶装置を構成し、システムが実行するプログラムやシステムが利用するデータを記憶する。   A display unit 203 includes a CRT (Cathode Ray Tube) or a liquid crystal display. Reference numeral 204 denotes a ROM (Read Only Memory), and 205 denotes a RAM (Random Access Memory), which constitutes a storage device of the system and stores programs executed by the system and data used by the system.

206はハードディスク装置、207はフロッピー(登録商標)ディスク装置であり、システムのファイルシステムに使用される外部記憶装置を構成する。   Reference numeral 206 denotes a hard disk device, and 207 denotes a floppy (registered trademark) disk device, which constitutes an external storage device used for the file system of the system.

208はプリンタである。209はネットワークを制御する部分であり、ここからインターネットなどのネットワーク上に接続されているクライアント102などの外部装置と通信する。   Reference numeral 208 denotes a printer. Reference numeral 209 denotes a part for controlling the network, and communicates with an external device such as the client 102 connected on the network such as the Internet.

尚、本実施形態において、クライアント102もサーバ101と同様に、図2に示したハードウェア構成を備えるものとする。   In the present embodiment, the client 102 is assumed to have the hardware configuration shown in FIG.

(JPEG2000符号化データ)
次に、一般的なJPEG2000の符号化データの概略について、図3を参照して説明する。図3は、JPEG2000の符号化データの概略図である。
(JPEG2000 encoded data)
Next, an outline of general JPEG2000 encoded data will be described with reference to FIG. FIG. 3 is a schematic diagram of JPEG2000 encoded data.

図3のように、JPEG2000符号化データは、先頭のMain Header(メインヘッダ)データ301と1以上のタイル(Tile)データから構成される。   As shown in FIG. 3, JPEG2000 encoded data is composed of head Main Header data 301 and one or more tile data.

メインヘッダデータ301には、Resolution Level(解像度レベル)数、Layer(レイヤ)数など画像全体の符号化条件についての情報が記述されている。   The main header data 301 describes information about the coding conditions of the entire image, such as the number of resolution levels and the number of layers.

タイルデータは、それぞれ、タイルパートヘッダ(Tile Header)302と、符号化データ306から構成される。タイルパートヘッダ302は、タイルの符号化条件を含む情報を記述したヘッダデータである。   Each tile data includes a tile part header (Tile Header) 302 and encoded data 306. The tile part header 302 is header data describing information including tile coding conditions.

タイルパートヘッダ302に後続する符号化データ306は、1以上のPacket(パケット)303という符号化単位データから構成される。図3のように、パケット303は、Packet Header(パケットヘッダ)304とPacket Body(パケットボディ、パケットデータ)305から構成される。パケットヘッダ304は当該パケットの符号化条件を含む情報が格納されている。このような情報には、例えば、コードブロックの存在の有無、0ビットプレーン情報、符号化パス数、コードブロックの圧縮データ長等が含まれる。パケットデータ(パケットボディ)305には当該パケット内に存在するコードブロックの圧縮データが格納されている。   The encoded data 306 following the tile part header 302 is composed of encoded unit data called one or more packets (packets) 303. As shown in FIG. 3, the packet 303 includes a packet header (packet header) 304 and a packet body (packet body, packet data) 305. The packet header 304 stores information including the encoding condition of the packet. Such information includes, for example, the presence / absence of a code block, 0-bit plane information, the number of encoding passes, the compressed data length of the code block, and the like. The packet data (packet body) 305 stores compressed data of code blocks present in the packet.

図3は、Layer-Resolution level-Component-Position progression(LRCP)に沿ってパケットデータが記録されたJPEG2000ファイルを例示している。図3のように、LRCPに準じた場合、符号化データはLayer / Resolution / Component / Positionの順でネスト(入れ子)状に構成される。このようなデータの並び順をProgression Orderと呼ぶ。Progression Orderには、LRCPの他にも、例えば、SNR Progression等の符号順が存在する。本実施形態では、説明を簡単にするため、Resolution ProgressionのJPEG2000符号化データについて例示的に説明する。尚、ここで記されているPosition(ポジション、位置)とは、JPEG2000符号化データにおけるPrecinct(プリシンクト)のことである。   FIG. 3 exemplifies a JPEG2000 file in which packet data is recorded in accordance with Layer-Resolution level-Component-Position progression (LRCP). As shown in FIG. 3, in the case of conforming to LRCP, encoded data is configured in a nested manner in the order of Layer / Resolution / Component / Position. Such an arrangement order of data is called a Progression Order. In addition to the LRCP, the Progression Order includes a code order such as SNR Progression, for example. In this embodiment, in order to simplify the description, the JPEG 2000 encoded data of Resolution Progression will be described as an example. Note that “Position (position)” described here is Precinct in JPEG2000 encoded data.

図3のようにProgression OrderがLRCPの場合、各Layer(レイヤ)内は、Resolution(解像度)番号の小さい順にデータが格納されている。このため、LRCPはResolution Progressionとも呼ばれる。レイヤ番号は復元する画像の原画に対するS/N比に対応し、レイヤ番号が小さいほどS/N比が悪くなる。一つのJPEG2000ファイル内での解像度番号とレイヤ番号、Component(コンポーネント)番号の最大値は、エンコーダによって予め設定され、そのパラメータにしたがってエンコードされており、その情報は符号化データの中に格納されている。   When Progression Order is LRCP as shown in FIG. 3, data is stored in each layer in ascending order of Resolution (resolution) number. For this reason, LRCP is also called Resolution Progression. The layer number corresponds to the S / N ratio with respect to the original image of the image to be restored. The smaller the layer number, the worse the S / N ratio. The maximum values of resolution number, layer number, and component number in one JPEG2000 file are preset by the encoder and encoded according to the parameters, and the information is stored in the encoded data. Yes.

次に、解像度とサブバンドの関係について図4を参照して説明する。図4は、decomposition level(分割レベル)=4の場合の、解像度とサブバンドの関係を模式的に示した図である。   Next, the relationship between resolution and subband will be described with reference to FIG. FIG. 4 is a diagram schematically showing the relationship between the resolution and subbands when decomposition level (division level) = 4.

図4において、401乃至405はNL(分割レベル数)がそれぞれ0乃至4のサブバンドである。例えば、LL(NL=0)401のサブバンドをデコードすることで解像度レベルが0の画像データを再現することができる。更に、HL(NL=1)402a, LH(NL=1)402b, HH(NL=1)402cの3つのサブバンドをデコードすることで解像度レベルが1の画像を再現することができる。同様に、NL=2乃至4のサブバンドまでデコードすることで、それぞれ解像度レベルが2乃至4の画像を再現することができる。このように、再現したい解像度レベル及びその解像度レベルよりも低い解像度レベルに含まれるデータ(パケット)に基づいて、所望の解像度レベルの画像データを取得することができる。 In FIG. 4, 401 to 405 are subbands having N L (number of division levels) of 0 to 4, respectively. For example, by decoding the subband of LL (N L = 0) 401, image data with a resolution level of 0 can be reproduced. Furthermore, an image having a resolution level of 1 can be reproduced by decoding three subbands of HL (N L = 1) 402a, LH (N L = 1) 402b, and HH (N L = 1) 402c. . Similarly, by decoding up to N L = 2 to 4 subbands, it is possible to reproduce images with resolution levels of 2 to 4, respectively. In this manner, image data having a desired resolution level can be acquired based on the resolution level to be reproduced and data (packets) included in the resolution level lower than the resolution level.

図4のように、JPEG2000符号化方式においては、解像度レベル番号が1増加する毎に、再現される画像データの画像サイズが幅、高さ共に2倍になっていく。図3で示したResolution Progressionの場合は、1つの解像度レベルの符号データは、レイヤ番号が小さい順に、コンポーネント番号が小さい順に、ポジション番号が小さい順になるように配列される。ここでのレイヤ番号は復元する画像の原画に対するS/N比に対応し、レイヤ番号が小さいほどS/N比が悪い、即ち、低解像度の画像データを再現することになる。   As shown in FIG. 4, in the JPEG2000 encoding method, every time the resolution level number is increased by 1, the image size of the reproduced image data is doubled in both width and height. In the case of Resolution Progression shown in FIG. 3, the code data of one resolution level is arranged so that the layer number is in ascending order, the component number is in ascending order, and the position number is in ascending order. The layer number here corresponds to the S / N ratio with respect to the original image of the image to be restored. The smaller the layer number, the worse the S / N ratio, that is, the lower resolution image data is reproduced.

(JPIP通信)
次に、サーバ101(に接続されたHD装置104)に格納されたJPEG2000符号化データをクライアント102へ送出する場合の通信の概要について、図5を参照して説明する。図5は、画像データに係るリクエスト(要求)とレスポンス(応答)の対応を示した概念図である。
(JPIP communication)
Next, an outline of communication when sending JPEG2000 encoded data stored in the server 101 (the HD device 104 connected to the server 101) to the client 102 will be described with reference to FIG. FIG. 5 is a conceptual diagram showing a correspondence between a request (request) and a response (response) related to image data.

本実施形態に係る構成では、画像データ(符号データ)の通信をJPIPを利用して行う。これによりクライアント102は圧縮画像データの全てを取得するのではなく、必要な部分のデータのみを取得することが可能である。   In the configuration according to the present embodiment, communication of image data (code data) is performed using JPIP. As a result, the client 102 can acquire not only all of the compressed image data but only the necessary portion of data.

クライアント102が受信するデータの単位としては、JPEG2000のパケット、或いは、パケットよりも大きい符号化単位であるタイル単位が考えられる。ここでは送受信するデータの単位をパケット単位とした場合について例示的に説明する。図5では、送受信するデータの単位がパケット単位である場合の、リクエストおよびレスポンスの様子を示している。   As a unit of data received by the client 102, a JPEG2000 packet or a tile unit which is an encoding unit larger than the packet can be considered. Here, a case where the unit of data to be transmitted / received is a packet unit will be described as an example. FIG. 5 shows a request and response when the unit of data to be transmitted / received is a packet unit.

クライアント102はサーバ101に、画像のタイル番号、解像度レベル、レイヤ、コンポーネント、ポジション番号等の情報を指定して、データを要求する。要求501を受け取ると、サーバ101は、画像503のコードストリームを解析して、指定されたタイル番号、解像度レベルとレイヤ、コンポーネント、ポジション番号に相当するパケットデータを抜き出す。そして、これらの情報を含む応答502をクライアント102に送り返す。   The client 102 requests data from the server 101 by specifying information such as an image tile number, resolution level, layer, component, and position number. Upon receiving the request 501, the server 101 analyzes the code stream of the image 503 and extracts packet data corresponding to the specified tile number, resolution level and layer, component, and position number. Then, a response 502 including these pieces of information is sent back to the client 102.

次に、JPIPを使ってパケットデータを送信単位として、データを送受信する場合のレスポンス(応答)データの構成を、図6および図7を使って説明する。   Next, the structure of response data when data is transmitted and received using JPIP as packet data transmission units will be described with reference to FIGS. 6 and 7. FIG.

図6は、precinct data-binの構造の概略図である。JPIPでは、図6の601に示すように、precinct data-binと呼ばれるJPEG2000のパケットデータの塊を基本としてレスポンスデータ(Response Data)を作成する。precinct data-binとは、タイル番号tnの中の、プリシンクト番号pnの解像度レベル rn、 コンポーネント番号cnを構成する全てのレイヤのパケットを、レイヤ番号が昇順になるように並べてつなげたデータの塊である。   FIG. 6 is a schematic diagram of the structure of the precinct data-bin. In JPIP, as shown by 601 in FIG. 6, response data (Response Data) is created based on a block of JPEG2000 packet data called “precinct data-bin”. The precinct data-bin is a block of data in which the packets of all layers that make up the resolution level rn of the precinct number pn and the component number cn in the tile number tn are arranged in an ascending order. is there.

図6に示すprecinct data-binから抜き出したPacket(tn, rn, cn, pn, 1)を使って、作成されたJPIP Response Dataの例を図7に示す。図7は、JPIP Response Data(応答データ)の一例を示した図である。ここで、Packet(tn, rn, cn, pn, qn)は、タイルtnの解像度レベルがrn, コンポーネント番号がcn, ポジション番号がpn, レイヤ番号がqnのパケットを示す。応答データは、message header(メッセージヘッダ)701とmessage body(メッセージボディ)703から構成される。メッセージヘッダとメッセージボディを合わせて、JPIP messageと呼ぶ。precinct data-binから作成されたJPIP messageをprecinct data-bin messageと呼ぶ。そして、メインヘッダから作成されたJPIP messageをmain header data-bin messageと呼ぶ。   FIG. 7 shows an example of JPIP Response Data created using Packet (tn, rn, cn, pn, 1) extracted from the precinct data-bin shown in FIG. FIG. 7 is a diagram illustrating an example of JPIP Response Data. Here, Packet (tn, rn, cn, pn, qn) indicates a packet with the resolution level of the tile tn, rn, the component number cn, the position number pn, and the layer number qn. The response data includes a message header 701 and a message body 703. The message header and message body are collectively called JPIP message. A JPIP message created from precinct data-bin is called a precinct data-bin message. A JPIP message created from the main header is called a main header data-bin message.

precinct data-bin messageのメッセージボディ703には、precinct data-bin 601から切り出されたJPEG2000符号化データが格納される。例えば、図6のPacket(tn, rn, cn, pn, 1)603を抜き出してJPIP Response Dataを作成する場合、Packet(tn, rn, cn, pn, 1)603がメッセージボディ703に格納される。   The message body 703 of the precinct data-bin message stores JPEG2000 encoded data cut out from the precinct data-bin 601. For example, when JPIP Response Data is created by extracting Packet (tn, rn, cn, pn, 1) 603 in FIG. 6, Packet (tn, rn, cn, pn, 1) 603 is stored in the message body 703 .

メッセージヘッダ701は、4つのパラメータから構成される。即ち、1番目のパラメータは、メッセージボディ703に入っているデータがprecinct data-binであるか否かを示す識別子が格納される。   The message header 701 is composed of four parameters. That is, the first parameter stores an identifier indicating whether or not the data contained in the message body 703 is a precinct data-bin.

2番目のパラメータには、precinct data-bin ID(PrID)が格納される。これは、タイル番号tn, 解像度レベル番号rn, コンポーネント番号cn, プリシンクト番号pnから次式により一意に定まるパラメータである。
PrID(tn, rn, cn, pn)=tn+(cn+s×(コンポーネント数))×タイル数
ただし、
s=pn+tn×(解像度レベルrnにおける1タイルあたりのプリシンクト数)
+(解像度レベル0から(rn−1)までのタイルtnのプリシンクト数の総和)。
The second parameter stores a precinct data-bin ID (PrID). This is a parameter uniquely determined from the tile number tn, the resolution level number rn, the component number cn, and the precinct number pn by the following equation.
PrID (tn, rn, cn, pn) = tn + (cn + s x (number of components)) x number of tiles
s = pn + tn × (number of precincts per tile at resolution level rn)
+ (Total number of precincts of tile tn from resolution level 0 to (rn-1)).

3番目のパラメータは、レスポンスデータのprecinct data-binにおけるオフセット値PrOffset 602である。つまり、メッセージボディ703に入っているデータが、PrID(tn, rn, cn, pn)のprecinct data-bin601において何Byte目からのデータであるのかを示す値であり、図6の602の値と等しい。   The third parameter is an offset value PrOffset 602 in the response data-precinct data-bin. In other words, the data contained in the message body 703 is a value indicating from which byte the data in the precinct data-bin 601 of PrID (tn, rn, cn, pn) is the value of 602 in FIG. equal.

メッセージヘッダ701の4番目のパラメータは、Response Data(レスポンスデータ)のバイト長、即ち、メッセージボディ703のバイト長である。つまり、ResLen702には、ResLen[byte]704の値が格納される。   The fourth parameter of the message header 701 is the byte length of Response Data (response data), that is, the byte length of the message body 703. That is, the value of ResLen [byte] 704 is stored in ResLen 702.

(諸条件例)
次に、本実施形態に係るシステムにおいて想定する画像データの符号化条件やクライアント102のスペック等についての諸条件について説明する。以下の諸条件は説明の便宜のために例示的に取り上げるものであり、本発明に係る実施形態がこれらの条件に限定されるわけではない。
(Examples of conditions)
Next, various conditions regarding image data encoding conditions and client 102 specifications assumed in the system according to the present embodiment will be described. The following conditions are taken as an example for convenience of description, and embodiments according to the present invention are not limited to these conditions.

サーバ101に格納されている圧縮画像データは、ファイル名が"a.jp2"であり、JPEG2000符号化方式を用いて以下の条件で符号化されているものとする。   The compressed image data stored in the server 101 has a file name “a.jp2” and is encoded using the JPEG2000 encoding method under the following conditions.

[符号化条件]
ファイル名:a.jp2
画像サイズ:65536×65536画素
タイルサイズ:512×512画素
タイル数:(65536/512)×(65536/512)=128×128=16384個
色数:1
レイヤ数:1
解像度レベル数:9(0〜8)
解像度レベル8の画像サイズ:65536×65536画素
解像度レベル7の画像サイズ:32768×32768画素
解像度レベル6の画像サイズ:16384×16384画素
解像度レベル5の画像サイズ:8192×8182画素
解像度レベル4の画像サイズ:4096×4096画素
解像度レベル3の画像サイズ:2048×2048画素
解像度レベル2の画像サイズ:1024×1024画素
解像度レベル1の画像サイズ:512×512画素
解像度レベル0の画像サイズ:256×256画素
非圧縮時の画像のデータサイズ:65536×65536=4096Mバイト
ファイルサイズ: 512Mバイト(1/8の圧縮時)。
[Encoding condition]
File name: a.jp2
Image size: 65536 × 65536 pixels Tile size: 512 × 512 pixels Number of tiles: (65536/512) × (65536/512) = 128 × 128 = 16384 Colors: 1
Number of layers: 1
Number of resolution levels: 9 (0 to 8)
Resolution level 8 image size: 65536 × 65536 pixels Resolution level 7 image size: 32768 × 32768 pixels Resolution level 6 image size: 16384 × 16384 pixels Resolution level 5 image size: 8192 × 8182 pixels Resolution level 4 image size : 4096 × 4096 pixels Resolution level 3 image size: 2048 × 2048 pixels Resolution level 2 image size: 1024 × 1024 pixels Resolution level 1 image size: 512 × 512 pixels Resolution level 0 image size: 256 × 256 pixels Data size of image at the time of compression: 65536 × 65536 = 4096 Mbytes File size: 512 Mbytes (when compressed to 1/8).

また、クライアント102に備えられた記憶装置の空き容量は画像データのサイズに比べて小さいものとする。ファイル”a.jp2”のデータサイズは圧縮時に512Mバイトであるが、クライアント102の記憶装置の空き容量は、例えば、256Mバイトであるとする。ただし、記憶装置の空き容量とは、例えば、RAM205やハードディスク206等の空き容量の合計値である。   Further, it is assumed that the free capacity of the storage device provided in the client 102 is smaller than the size of the image data. The data size of the file “a.jp2” is 512 Mbytes at the time of compression, but the free capacity of the storage device of the client 102 is, for example, 256 Mbytes. However, the free capacity of the storage device is, for example, the total free capacity of the RAM 205, the hard disk 206, and the like.

クライアント102は、JPIPで受信した断片的な符号データをキャッシュし、新たな画像表示の指示がユーザから入力されたときに、キャッシュに無い符号データをサーバ101に要求する。このキャッシュデータは、受信した符号データを管理するための情報などが必要であり、符号データの追加や削除などの処理を簡単に行うような形式で管理されるべきである。このため、JPEG2000符号データの形式とは別の形式で管理される場合が多い。   The client 102 caches fragmented code data received by JPIP, and requests the server 101 for code data not in the cache when a new image display instruction is input from the user. The cache data needs information for managing the received code data, and should be managed in a format that allows easy processing such as addition and deletion of code data. For this reason, it is often managed in a format different from the format of JPEG2000 code data.

本実施形態に係る構成においても、クライアント102上のキャッシュデータはJPEG2000符号データとは別の形式で管理される。このため、JPEG2000のデコーダで符号データをデコードするには、このキャッシュ形式で管理された符号データをJPEG2000準拠の符号データの形式に変換する必要がある。   Also in the configuration according to the present embodiment, the cache data on the client 102 is managed in a format different from the JPEG2000 code data. Therefore, in order to decode the code data by the JPEG2000 decoder, it is necessary to convert the code data managed in this cache format into a JPEG2000-compliant code data format.

このようなキャッシュ機構を設ける場合、変換の際に生成される一時的なファイルを考慮すると、クライアント102はキャッシュデータを管理する領域とJPEG2000符号データを管理する領域の両方を記憶装置上に有している必要がある。このことは、クライアント102が必要な記憶容量は、サーバ101で保管されているJPEG2000ファイルのバイト数の2倍必要であることを意味する。例えば、サーバ101でのファイルサイズが512Mバイトの場合、クライアント102が必要な記憶装置の空き容量は、例えば、約1024Mバイトとなる。従って、クライアント102の記憶装置の空き容量が256Mバイトの場合、全てのキャッシュファイルを作成することもできず、キャッシュからJPEG2000符号データを作成することができない。   When such a cache mechanism is provided, the client 102 has both an area for managing cache data and an area for managing JPEG2000 code data on the storage device in consideration of a temporary file generated at the time of conversion. Need to be. This means that the storage capacity required by the client 102 is twice the number of bytes of the JPEG2000 file stored in the server 101. For example, when the file size on the server 101 is 512 Mbytes, the free capacity of the storage device necessary for the client 102 is, for example, about 1024 Mbytes. Therefore, when the free capacity of the storage device of the client 102 is 256 Mbytes, all cache files cannot be created, and JPEG2000 code data cannot be created from the cache.

本実施形態に係る構成は、上記のような環境においてもクライアント102が画像データをデコードし、表示することを可能にするものである。以下、サーバ101がクライアント102にファイル”a.jp2”をJPIPを利用して送信し、クライアント102がデコード・表示等を行う場合における、サーバ101の動作について説明する。   The configuration according to the present embodiment enables the client 102 to decode and display image data even in the above environment. Hereinafter, the operation of the server 101 when the server 101 transmits the file “a.jp2” to the client 102 using JPIP and the client 102 performs decoding / display, etc. will be described.

(全体処理)
本実施形態において、サーバ101は、ある解像度の画像データの送信要求をクライアン102から受け取った場合、その解像度の画像をデコードするのに必要でない部分の符号データを全て長さが0のパケットに置き換えてクライアント102へ送出する。長さが0のパケットは”Zero Length Packet”と呼ばれ、以下、ZLPと称する。
(Overall processing)
In this embodiment, when the server 101 receives a request for transmission of image data of a certain resolution from the client 102, the server 101 replaces all of the code data of a part not necessary for decoding the image of that resolution with a packet having a length of 0. To the client 102. A packet having a length of 0 is called “Zero Length Packet” and is hereinafter referred to as ZLP.

以下、クライアント102が、レベル1の解像度、すなわち512×512画素の画像を表示すべくサーバ101へリクエストを送出した場合について例示的に説明する。この時、クライアント102によって発行されるリクエストの内容は、例えば、次のようなJPIPコマンドの記述となる。
http://www.image.com/JPIP.cgi?target=a.jp2&fsize=512,512&type=jpp-stream
以下、このコマンドをJPIPコマンド1と呼ぶ。
Hereinafter, a case where the client 102 sends a request to the server 101 to display a level 1 resolution, that is, an image of 512 × 512 pixels will be described as an example. At this time, the content of the request issued by the client 102 is, for example, the following JPIP command description.
http://www.image.com/JPIP.cgi?target=a.jp2&fsize=512,512&type=jpp-stream
Hereinafter, this command is referred to as JPIP command 1.

次に、図8を参照してサーバ101が実行する全体処理の流れについて説明する。図8は、サーバ101処理の全体のフローを示したフローチャートである。   Next, the flow of overall processing executed by the server 101 will be described with reference to FIG. FIG. 8 is a flowchart showing the overall flow of the server 101 process.

まず、ステップS800ではクライアント102からの通信要求の受信に対応して、クライアント102とのセッションを開く処理を行う。   First, in step S800, in response to reception of a communication request from the client 102, processing for opening a session with the client 102 is performed.

次に、ステップS801において、クライアント102に対して符号ファイル最大容量(以下、BSと称する)を、例えば、バイト数単位で問い合わせを行い、その値を取得する。これは、例えば、BSを問い合わせる旨のパケットをクライアント102へ送出し、その応答を受信、解析することによって行う。   Next, in step S801, the client 102 is inquired of the code file maximum capacity (hereinafter referred to as BS), for example, in units of bytes, and the value is acquired. This is done, for example, by sending a packet for inquiring about the BS to the client 102 and receiving and analyzing the response.

ステップS801に対応して、クライアント102は、上述のようにキャッシュデータと符号データの2種類のファイル群を管理する場合には、クライアント102側の記憶容量の半分の値を符号データとして確保できるサイズとして返す。本実施形態の場合は、一時ファイルの容量が256Mバイトであるため、符号データとして利用できる容量は半分の128Mバイトである、
次に、ステップS802において、クライアント102から上記JPIPコマンドを受信する。
Corresponding to step S801, when the client 102 manages two types of file groups of cache data and code data as described above, the size that can secure half the value of the storage capacity on the client 102 side as code data Return as. In the case of this embodiment, since the capacity of the temporary file is 256 Mbytes, the capacity that can be used as the code data is a half of 128 Mbytes.
In step S 802, the JPIP command is received from the client 102.

次に、ステップS803では、ステップS802で受信したJPIPコマンドの解析を行う。具体的には、要求された画像ファイルや、解像度レベル等の情報を取得する。   Next, in step S803, the JPIP command received in step S802 is analyzed. Specifically, information such as the requested image file and resolution level is acquired.

次に、ステップS804では、ステップS803でのコマンド解析結果に基づき、要求されたファイルから返送に必要な符号データを切り抜き、返送符号データを作成する返送符号データ作成処理を行う。この処理の詳細は後述する。   Next, in step S804, based on the command analysis result in step S803, code data necessary for return is cut out from the requested file, and return code data generation processing for generating return code data is performed. Details of this processing will be described later.

次に、ステップS805では、ステップS804で作成した返送データをクライアント102に送信する。   In step S805, the return data created in step S804 is transmitted to the client 102.

次に、ステップS806で今回のセッションを終了するか否かを判定する。この判定は、例えば、クライアント102から最後のパケットを受信してから所定の時間が経過したか否かや、クライアント102からセッション終了の旨のパケットを受信したか否か等に基づいて行う。   Next, in step S806, it is determined whether or not to end the current session. This determination is made based on, for example, whether or not a predetermined time has elapsed since the last packet was received from the client 102, whether or not a session end packet has been received from the client 102, and the like.

セッションを終了しないと判定した場合(ステップS806でNO)には、ステップS802に戻り、ステップS802乃至S805の処理を繰り返す。一方、セッションを終了すると判定した場合(ステップS806でYES)には、ステップS807へ進む。   If it is determined not to end the session (NO in step S806), the process returns to step S802, and the processes in steps S802 to S805 are repeated. On the other hand, if it is determined to end the session (YES in step S806), the process proceeds to step S807.

ステップS806においては、クライアント102とのセッションを閉じる処理を行う。例えば、クライアント102との通信を行うために一時的に作成したオブジェクト等をメモリから解放する等の処理を行う。そして、サーバ101での処理を終了する。   In step S806, processing for closing the session with the client 102 is performed. For example, processing such as releasing an object temporarily created for communication with the client 102 from the memory is performed. Then, the process in the server 101 is terminated.

(返送符号データ作成処理)
次に図9を参照して、ステップS804で実行する返送符号データ作成の詳細なフローを説明する。図9は返送符号データ作成処理の流れを示したフローチャートである。
(Return code data creation process)
Next, with reference to FIG. 9, the detailed flow of return code data creation executed in step S804 will be described. FIG. 9 is a flowchart showing the flow of return code data creation processing.

まず、ステップS900では、ステップS803において解析結果を参照して、今回要求されているターゲットファイルのバイト数を取得する。そして、ステップS801で取得したクライアント102側の符号データ最大容量BSの値と、要求されているターゲットファイルのバイト数との大小を比較する。   First, in step S900, the number of bytes of the target file requested this time is acquired with reference to the analysis result in step S803. Then, the size of the code data maximum capacity BS on the client 102 side acquired in step S801 is compared with the requested number of bytes of the target file.

この比較の結果、BSの値がターゲットファイルのバイト数以上の場合(ステップS904でNO)はステップS904に進み、ステップS803でのコマンド解析結果の基づいて、通常の処理により返送用のデータを作成する処理を行う。その後、ステップS905にて、ステップS904で作成した返送用データの用のJPIPヘッダを作成する。これらの処理は公知であるため、詳細な説明は割愛する。ステップS905の処理の後、サーバ101は返送符号データ作成処理を終了して、図8のステップS805へ進む。   As a result of this comparison, if the BS value is equal to or greater than the number of bytes of the target file (NO in step S904), the process proceeds to step S904, and based on the command analysis result in step S803, return data is created by normal processing. Perform the process. Thereafter, in step S905, a JPIP header for the return data created in step S904 is created. Since these processes are well-known, detailed description is omitted. After the process of step S905, the server 101 ends the return code data creation process, and proceeds to step S805 of FIG.

一方、ステップS900において、値BSがファイルサイズより小さい場合(ステップS904でYES)、ステップS901へ進む。   On the other hand, if the value BS is smaller than the file size in step S900 (YES in step S904), the process proceeds to step S901.

ステップS901では、クライアント102側で今回のターゲットファイルは全てキャッシュする能力がないと判断し、クライアント102においてキャッシュレスで処理できるように、キャッシュレスデータを生成する処理を行う。この処理の詳細については、後に図10を用いて詳細に説明する。   In step S901, the client 102 determines that all the target files of this time are not capable of caching, and performs processing for generating cacheless data so that the client 102 can perform processing without cache. Details of this processing will be described later in detail with reference to FIG.

次にステップS902では、ステップS901で作成したキャッシュレスデータ用の返送用のJPIPヘッダを生成する。具体的にはサーバ101でtypeパラメータを”type=RAW”、あるいは”type=jp2”に変更したレスポンスヘッダを作成する。例えば、本実施形態の場合、クライアント102は前述したJPIPコマンド1のように”jpp-stream”を要求しているが、”type=RAW”、あるいは”type=jp2”に変更する。このJPIPレスポンスヘッダを受け取ったクライアント102は、このJPIPレスポンスヘッダを参照することによって、受信したデータを、キャッシュをせずに直接JPEG2000のデコーダで処理するものと判断することができる。   In step S902, a return JPIP header for cashless data created in step S901 is generated. Specifically, the server 101 creates a response header in which the type parameter is changed to “type = RAW” or “type = jp2”. For example, in the present embodiment, the client 102 requests “jpp-stream” as in the above-described JPIP command 1, but changes it to “type = RAW” or “type = jp2”. The client 102 that has received the JPIP response header can determine that the received data is directly processed by the JPEG2000 decoder without caching, by referring to the JPIP response header.

ステップS902の処理の後、サーバ101は返送符号データ作成処理を終了して、図8のステップS805へ進む。   After the processing in step S902, the server 101 ends the return code data creation processing, and proceeds to step S805 in FIG.

(キャッシュレスデータ作成処理)
次に、図10を参照して、図9のステップS901において実行するキャッシュレスデータ作成処理について説明する。図10は返送符号データ作成処理において実行するキャッシュレスデータ作成処理の流れを示したフローチャートである。
(Cashless data creation process)
Next, with reference to FIG. 10, the cacheless data creation process executed in step S901 of FIG. 9 will be described. FIG. 10 is a flowchart showing the flow of the cacheless data creation process executed in the return code data creation process.

まず、ステップS1000において、ターゲットファイルのJPEG2000符号データのメインヘッダをリード、解析し、エンコード条件等の情報を取得する。   First, in step S1000, the main header of the JPEG2000 code data of the target file is read and analyzed, and information such as encoding conditions is acquired.

次に、ステップS1001では、ステップS803で解析したJPIPコマンドで要求されている符号データがターゲットファイル内のどのパケットに対応するかを判断し、返送するパケットを特定する。この特定の処理は公知技術と知られているため詳細な説明は割愛する。例えば、前述したJPIPコマンドの場合は、解像度レベル1までの全てのタイルを構成するパケットを返送するパケットとして特定する。   In step S1001, it is determined which packet in the target file corresponds to the code data requested by the JPIP command analyzed in step S803, and the packet to be returned is specified. Since this specific processing is known as a known technique, a detailed description thereof is omitted. For example, in the case of the above-mentioned JPIP command, packets constituting all tiles up to resolution level 1 are specified as packets to be returned.

次に、ステップS1002では、ターゲットファイルのヘッダをそのまま返信データに追加する。   In step S1002, the header of the target file is added to the reply data as it is.

次に、ステップS1003−1乃至ステップS1007−5の処理によって、要求された解像度レベルの画像を復号するために必要なパケットを返送データに追加し、それ以外のパケットはZLPに置き換える処理を行う。   Next, in steps S1003-1 to S1007-5, a packet necessary for decoding an image with the requested resolution level is added to the return data, and other packets are replaced with ZLP.

このような処理を画像データを形成する全てのパケットについて行うために、まず、ステップS1003−1乃至ステップS1003−5において、参照するパケットを特定するパラメータ変数を初期化する処理を行う。即ち、まず、ステップS1003−1では、タイル特定するための変数Tを値0にして初期化する。次に、ステップS1003−2では、レイヤを特定するための変数Lを値0にして初期化する。次に、ステップS1003−3では、解像度レベルを特定するための変数Rを値0にして初期化する。次に、ステップS1003−4では、コンポーネント(Component)を特定するための変数Cを値0にして初期化する。次に、ステップS1003−5では、ポジション(Position)を特定するための変数Pを値0にして初期化する。   In order to perform such processing for all the packets forming the image data, first, in step S1003-1 to step S1003-5, processing for initializing a parameter variable for specifying a packet to be referred to is performed. That is, first, in step S1003-1, a variable T for specifying a tile is initialized to a value 0. In step S1003-2, a variable L for specifying a layer is initialized with a value 0. In step S1003-3, a variable R for specifying the resolution level is initialized to a value 0. In step S1003-4, a variable C for specifying a component (Component) is initialized with a value 0. Next, in step S1003-5, a variable P for specifying a position (Position) is initialized to a value 0.

次に、ステップS1005では、上記各変数(T,L,R,C,P)で識別されるパケットが、ステップS1001で特定されたパケット(即ち、返送パケット)に該当するか否かを判定する。   In step S1005, it is determined whether the packet identified by each of the variables (T, L, R, C, P) corresponds to the packet specified in step S1001 (that is, a return packet). .

返送パケットに該当しない場合(ステップS1005でNO)はステップS1008へ進み、各変数(T,L,R,C,P)で識別されるパケットをZLPに置き換える処理を行う。一方、ステップS1005で返送パケットであると判断された場合(ステップS1005でYES)には、ステップS1006へ進み、返送データに各変数(T,L,R,C,P)で識別されるパケットを追加する。ステップS1008、S1006の処理が終了したら、それぞれステップS1007−1へ進む。   If the packet does not correspond to a return packet (NO in step S1005), the process proceeds to step S1008 to perform processing for replacing the packet identified by each variable (T, L, R, C, P) with ZLP. On the other hand, if it is determined in step S1005 that the packet is a return packet (YES in step S1005), the process proceeds to step S1006, and the packet identified by each variable (T, L, R, C, P) is included in the return data. to add. When the processes of steps S1008 and S1006 are completed, the process proceeds to step S1007-1.

ステップS1007−1からステップS1007−5までは、各変数をインクリメントし、最後まで処理したか否かを判断する。   From step S1007-1 to step S1007-5, each variable is incremented, and it is determined whether or not the process has been completed.

即ち、ステップS1007−1においては、変数Pをインクリメント、即ち、1増加する。そして、この時点で変数Cで識別されるコンポーネント中の、全てのポジションについて、ステップS1005とそれに続く処理を行ったか否かを判定する。処理を行った場合(ステップS1007−1でYES)はステップS1007−2へ進む。処理を行っていない場合(ステップS1007−1でNO)はステップS1005へ戻り、処理を繰り返す。   That is, in step S1007-1, the variable P is incremented, that is, incremented by one. At this time, it is determined whether or not step S1005 and subsequent processing have been performed for all positions in the component identified by the variable C. When the process is performed (YES in step S1007-1), the process proceeds to step S1007-2. When the process is not performed (NO in step S1007-1), the process returns to step S1005 and the process is repeated.

ステップS1007−2においては、変数Cをインクリメント、即ち、1増加する。そして、この時点で変数Rで識別される解像度レベルにおける画像データ中の、全てのコンポーネントについて、ステップS1005とそれに続く処理を行ったか否かを判定する。処理を行った場合(ステップS1007−2でYES)はステップS1007−3へ進む。処理を行っていない場合(ステップS1007−2でNO)はステップS1003−5へ戻り、処理を繰り返す。   In step S1007-2, the variable C is incremented, that is, incremented by one. At this time, it is determined whether or not step S1005 and subsequent processing have been performed for all components in the image data at the resolution level identified by the variable R. When the process is performed (YES in step S1007-2), the process proceeds to step S1007-3. If the process has not been performed (NO in step S1007-2), the process returns to step S1003-5 and the process is repeated.

ステップS1007−3においては、変数Rをインクリメント、即ち、1増加する。そして、この時点で変数Lで識別されるレイヤ中の、全ての解像度レベルの画像データについて、ステップS1005とそれに続く処理を行ったか否かを判定する。処理を行った場合(ステップS1007−3でYES)はステップS1007−4へ進む。処理を行っていない場合(ステップS1007−3でNO)はステップS1003−4へ戻り、処理を繰り返す。   In step S1007-3, the variable R is incremented, that is, incremented by one. Then, at this time, it is determined whether or not step S1005 and subsequent processing have been performed for all the resolution level image data in the layer identified by the variable L. When the process is performed (YES in step S1007-3), the process proceeds to step S1007-4. If the process has not been performed (NO in step S1007-3), the process returns to step S1003-4 and the process is repeated.

ステップS1007−4においては、変数Lをインクリメント、即ち、1増加する。そして、この時点で変数Tで識別されるタイル中の、全てのレイヤについて、ステップS1005とそれに続く処理を行ったか否かを判定する。処理を行った場合(ステップS1007−4でYES)はステップS1009へ進む。処理を行っていない場合(ステップS1007−4でNO)はステップS1003−3へ戻り、処理を繰り返す。   In step S1007-4, the variable L is incremented, that is, incremented by one. At this point, it is determined whether or not step S1005 and the subsequent processing have been performed for all layers in the tile identified by the variable T. When the process is performed (YES in step S1007-4), the process proceeds to step S1009. If the process has not been performed (NO in step S1007-4), the process returns to step S1003-3, and the process is repeated.

ステップS1009においては、各タイルの先頭にあるタイルパートヘッダを調整する。即ち、タイルパートヘッダにはタイルパートを構成する全パケット長を記述する部分があるが、ZLPへの置き換えによって変動したタイルパートの長さに合わせてパケット長の記述を修正する。そして、ステップS1007−5へ進む。   In step S1009, the tile part header at the head of each tile is adjusted. That is, the tile part header includes a part describing the total packet length constituting the tile part, but the description of the packet length is corrected in accordance with the length of the tile part that has changed due to the replacement with the ZLP. Then, the process proceeds to step S1007-5.

ステップS1007−5においては、変数Tをインクリメント、即ち、1増加する。そして、画像データ中の全てのタイルについて、ステップS1005とそれに続く処理を行ったか否かを判定する。処理を行った場合(ステップS1007−5でYES)はキャッシュレスデータ作成処理を終了し、図9のステップS902へ進む。処理を行っていない場合(ステップS1007−5でNO)はステップS1003−2へ戻り、処理を繰り返す。   In step S1007-5, the variable T is incremented, that is, incremented by one. Then, it is determined whether or not step S1005 and subsequent processing have been performed for all tiles in the image data. If the process has been performed (YES in step S1007-5), the cacheless data creation process ends, and the process proceeds to step S902 in FIG. If the process has not been performed (NO in step S1007-5), the process returns to step S1003-2 and the process is repeated.

以上の処理により、要求された解像度レベルの全てのタイルを構成するパケットが含まれ、要求されなかったパケットはZLPで置き換えられた、返送データとしてのJPEG2000符号データを作成することができる。例えば、上記の例では、解像度レベル0から解像度レベル1までを構成する全てのパケットが追加され、それ以外のパケットはZLPに置き換えられた返送データを作成することができる。   With the above processing, it is possible to create JPEG2000 code data as return data in which packets constituting all tiles of the requested resolution level are included, and packets that are not requested are replaced with ZLP. For example, in the above example, return data in which all packets constituting resolution level 0 to resolution level 1 are added and other packets are replaced with ZLP can be created.

この場合、クライアント102は、キャッシュを行う必要なく、サーバ101から受け取った符号データをそのままデコードし、画像を表示することが可能となる。また本実施形態の場合、不必要な部分のパケットをZLPで置き換えるだけで、再エンコードを行っていないため、要求した部分に関しては、画質劣化などは全くない。さらにサーバ101の処理は、基本的に、不必要な部分のパケットをZLPで置き換えるのみであるため、サーバ101に要する処理の負荷は比較的小さい。   In this case, the client 102 can display the image by decoding the code data received from the server 101 as it is without performing caching. In the case of the present embodiment, only unnecessary portions of the packet are replaced with ZLP, and re-encoding is not performed. Therefore, there is no image quality degradation at the requested portion. Furthermore, the processing of the server 101 basically only replaces unnecessary portions of the packet with the ZLP, so that the processing load required for the server 101 is relatively small.

<<第2実施形態>>
第1実施形態では、メインヘッダを変更しないで、不要な部分のパケットをZLPで置き換える構成について説明した。本実施形態では、要求された部分の符号データのみから構成される、即ち、ZLPすらも返送データに含まれない返送データを作成する構成について説明する。本実施形態の構成においては、返送データが要求された部分の符号データのみから構成されるようにするために、メインヘッダを適宜変更する処理を行う。
<< Second Embodiment >>
In the first embodiment, a configuration has been described in which a packet in an unnecessary portion is replaced with a ZLP without changing the main header. In the present embodiment, a description will be given of a configuration in which return data that includes only requested code data, that is, even ZLP is not included in the return data. In the configuration of the present embodiment, processing for appropriately changing the main header is performed so that the return data is composed only of the requested code data.

本実施形態に係る構成は特に断らない限り第1実施形態の構成と同様であり、構成や処理の相違点についてのみ説明を行う。本実施形態に係る構成が実行する全体処理と返送符号データ作成処理は第1実施形態と同様であり、それぞれ図8,9のフローチャートで示される処理を実行する。   The configuration according to the present embodiment is the same as the configuration according to the first embodiment unless otherwise specified, and only differences in configuration and processing will be described. The overall processing and return code data creation processing executed by the configuration according to this embodiment are the same as those in the first embodiment, and the processing shown in the flowcharts of FIGS.

本実施形態に係る構成が実行するキャッシュレスデータ作成処理について、図11を参照して説明する。図11は、本実施形態に係る構成が実行するキャッシュレスデータ作成処理の流れを示したフローチャートである。   The cacheless data creation process executed by the configuration according to the present embodiment will be described with reference to FIG. FIG. 11 is a flowchart showing the flow of the cacheless data creation process executed by the configuration according to the present embodiment.

図11において、図10で説明したフローと同じ動作をする部分については、同一の番号を付しており、説明を省略する。第1実施形態と異なる部分は、ステップS1005の判断で返送パケット以外であると判断された場合(ステップS1005でNO)の処理と、ステップS1002の代わりにステップS1100を実行することである。   In FIG. 11, the same number is attached | subjected about the part which performs the same operation | movement as the flow demonstrated in FIG. 10, and description is abbreviate | omitted. The difference from the first embodiment is that when it is determined in step S1005 that the packet is not a return packet (NO in step S1005), step S1100 is executed instead of step S1002.

ステップS1005で返送パケット以外と判断された場合(ステップS1005でNO)、本実施形態の場合は、要求されたパケットのみ返送するため、なにも処理しないで単にステップS1006を進むように動作すればよい。   If it is determined in step S1005 that the packet is not a return packet (NO in step S1005), in the case of this embodiment, only the requested packet is returned. Therefore, if only the operation proceeds to step S1006 without any processing. Good.

ステップS1100では、ステップS803及びステップS1001の結果から符号データのメインヘッダを変更する処理を実行する。メインヘッダの変更について図12乃至14を参照して説明する。図12はメインヘッダ301のマーカセグメントの構成を模式的に示した図である。   In step S1100, processing for changing the main header of the code data from the results of steps S803 and S1001 is executed. The change of the main header will be described with reference to FIGS. FIG. 12 is a diagram schematically showing the configuration of the marker segment of the main header 301.

図12のように、メインヘッダ301は、必須のマーカセグメントとして、SOCマーカ、SIZマーカセグメント1201、COD1202、QCD、POCを含む。図12におけるその他のマーカはオプションであり、エンコードオプションに基づいて挿入される場合がある。   As shown in FIG. 12, the main header 301 includes an SOC marker, SIZ marker segment 1201, COD 1202, QCD, and POC as essential marker segments. Other markers in FIG. 12 are optional and may be inserted based on the encoding option.

ステップS1100では、図12に示すメインヘッダ内のSIZマーカセグメント1201と、CODマーカセグメント1202内の該当するフィールドを変更する。   In step S1100, the corresponding fields in the SIZ marker segment 1201 and the COD marker segment 1202 in the main header shown in FIG. 12 are changed.

SIZマーカセグメント1201には画像データの画像サイズ、リファレンスグリッドの縦横長、タイルの縦横長、コンポーネント数等の情報が記述される。図13はSIZマーカセグメントの詳細な構成を模式的に示した図である。図13において、”Xsiz”1301と“Ysiz”1302が画像データの画像サイズを記入するフィールドである。ステップS1100では、この2つのフィールドを変更する。これ以外のフィールドは変更する必要はない。   The SIZ marker segment 1201 describes information such as the image size of the image data, the vertical and horizontal length of the reference grid, the vertical and horizontal length of the tile, and the number of components. FIG. 13 is a diagram schematically showing a detailed configuration of the SIZ marker segment. In FIG. 13, “Xsiz” 1301 and “Ysiz” 1302 are fields for entering the image size of the image data. In step S1100, these two fields are changed. No other fields need to be changed.

CODマーカセグメント1202には分割レベル数、符号化スタイル、レイヤ化の情報等が記述される。図14はCODマーカセグメントの詳細な構成を模式的に示した図である。   The COD marker segment 1202 describes the number of division levels, encoding style, layering information, and the like. FIG. 14 is a diagram schematically showing the detailed configuration of the COD marker segment.

この図の中の、”Number of decomposition levels”(分割レベル数)1401が解像度方向の階層数が記入されるフィールドである。ステップS1100では、適宜この値を変更する。CODマーカセグメントの他のフィールドは変更する必要はない。   In this figure, “Number of decomposition levels” 1401 is a field in which the number of layers in the resolution direction is entered. In step S1100, this value is changed as appropriate. The other fields of the COD marker segment need not be changed.

例えば、上記に例示した画像データの場合、各フィールドにセットする値は次のようになる。即ち、SIZマーカ・セグメント内のXsizフィールド1301には”512”を、Ysizフィールド1302には”512”をセットする。そして、CODマーカ・セグメント内の”Number of decomposition levels”(分割レベル数)フィールド1401には、”1”をセットする。ステップS1100では、このように値をセットした後、新しいメインヘッダとして出力する。   For example, in the case of the image data exemplified above, the values set in each field are as follows. That is, “512” is set in the Xsiz field 1301 and “512” is set in the Ysiz field 1302 in the SIZ marker segment. Then, “1” is set in the “Number of decomposition levels” field 1401 in the COD marker segment. In step S1100, after setting the value in this way, it is output as a new main header.

この符号データを受け取ったクライアント102は、このメインヘッダを解析し、画像サイズが512×512で、階層数が1の符号データとして識別する。そして、この識別結果に基づいて画像データをデコードする。メインヘッダに続くデータは、この識別結果に合致して配列されているためクライアント102は画像データをデコードし、表示することができる。   The client 102 that has received the code data analyzes the main header and identifies it as code data having an image size of 512 × 512 and a layer number of 1. Then, the image data is decoded based on the identification result. Since the data following the main header is arranged in accordance with the identification result, the client 102 can decode and display the image data.

本実施形態の場合でも、符号データの再エンコードを行っていないため、画質劣化はない。また、本実施形態に係る構成によって生成される返送データはクライアント102から要求されたパケットのみから構成されZLPを含まないため、第1実施形態の構成に比較して、返送データのサイズを更に小さくすることができる。   Even in this embodiment, since the code data is not re-encoded, there is no deterioration in image quality. Further, since the return data generated by the configuration according to the present embodiment is configured only from the packet requested by the client 102 and does not include the ZLP, the size of the return data is further reduced as compared with the configuration of the first embodiment. can do.

また、サーバ101の処理は、基本的に、必要な部分のパケットを返送データに追加し、メインヘッダ内の固定フィールドのみを変更するだけであり、サーバ101に要する処理の負荷は比較的小さい。   Further, the processing of the server 101 basically adds only a necessary part of the packet to the return data and changes only the fixed field in the main header, and the processing load required for the server 101 is relatively small.

<<第3実施形態>>
第1、第2実施形態に係る構成において生成される返送データには、解像度方向の階層は残ったままであった。これは、要求された画像データをデコードするための必要な部分のパケットデータを、基本的には、サーバ101に格納されている構造のまま返送データを構成するからである。
<< Third Embodiment >>
In the return data generated in the configurations according to the first and second embodiments, the hierarchy in the resolution direction remains. This is because the packet data of a necessary part for decoding the requested image data is basically composed of return data with the structure stored in the server 101.

本実施形態に係る構成は、画像データの、クライアント102から要求された部分を再エンコードし、最低解像度データのみの構造、すなわちLLサブバンドのみの形式で返送する。即ち、指定された解像度レベル及び指定された解像度レベルよりも低い解像度レベルに含まれるパケットを合成して、指定された解像度レベルの画像データを生成する処理を実行して、返送データを生成する。   The configuration according to the present embodiment re-encodes the portion of the image data requested from the client 102 and returns it in the structure of only the lowest resolution data, that is, the format of only the LL subband. In other words, the packet included in the designated resolution level and the resolution level lower than the designated resolution level is synthesized, and processing for generating image data of the designated resolution level is executed to generate return data.

なお、本実施形態に係る構成においても、第2実施形態と同様に、返送データがクライアント102から要求された部分のみの符号データになるようにメインヘッダなどを変更する。また、クライアント102からのJPIPコマンドは、第2実施形態と同様に、第1実施形態で示したもの(JPIPコマンド1)と同じとする。   Also in the configuration according to the present embodiment, the main header and the like are changed so that the return data is only the code data requested from the client 102, as in the second embodiment. Further, the JPIP command from the client 102 is the same as the one shown in the first embodiment (JPIP command 1) as in the second embodiment.

本実施形態に係る構成は特に断らない限り第1実施形態の構成と同様であり、構成や処理の相違点についてのみ説明を行う。本実施形態に係る構成が実行する全体処理と返送符号データ作成処理は第2実施形態と同様であり、それぞれ図8,9のフローチャートで示される処理を実行する。   The configuration according to the present embodiment is the same as the configuration according to the first embodiment unless otherwise specified, and only differences in configuration and processing will be described. The overall processing and return code data creation processing executed by the configuration according to this embodiment are the same as those in the second embodiment, and the processing shown in the flowcharts of FIGS.

図15は、本実施形態に係る構成が実行するキャッシュレスデータ作成処理の流れを示したフローチャートである。図15中、図11で説明したフローと同じ動作をする部分については、同一の番号を付けてある。   FIG. 15 is a flowchart showing the flow of the cacheless data creation process executed by the configuration according to the present embodiment. In FIG. 15, the same numbers are assigned to portions that perform the same operation as the flow described in FIG. 11.

まず、ステップS1000では、第1実施形態および第2実施形態と同様に、ターゲットファイルのJPEG2000符号データのメインヘッダをリード、解析し、エンコード条件等の情報を取得する。   First, in step S1000, as in the first and second embodiments, the main header of the JPEG2000 code data of the target file is read and analyzed, and information such as the encoding condition is acquired.

次に、ステップS1500では、ステップS1000で解析したターゲットファイルのメインヘッダとステップS803での解析結果に基づいて、要求された画像データを取得するためにデコードが必要なターゲットファイルの部分を特定する。具体的には、デコードが必要な解像度方向の階層や、要求された画像データの領域が含まれるタイル等の情報を取得する。第1実施形態で取り上げたJPIPコマンドの例の場合、デコードするタイルは全てのタイルであり、デコードする解像度方向の階層数は1までである。   Next, in step S1500, based on the main header of the target file analyzed in step S1000 and the analysis result in step S803, the portion of the target file that needs to be decoded to acquire the requested image data is specified. More specifically, information such as a hierarchy in the resolution direction that needs to be decoded and tiles including the requested image data area is acquired. In the example of the JPIP command taken up in the first embodiment, the tiles to be decoded are all tiles, and the number of layers in the resolution direction to be decoded is one.

次に、ステップS1501、S1502において、指定された解像度レベル及び指定された解像度レベルよりも低い解像度レベルに含まれるパケットを合成して、指定された解像度レベルの画像データを生成する処理を実行する。   Next, in steps S1501 and S1502, a process of generating image data of a designated resolution level by combining packets included in the designated resolution level and a resolution level lower than the designated resolution level is executed.

ステップS1501ではステップS1500で特定したパラメータに基づいてターゲットファイルをデコードし、画像データを取得する。   In step S1501, the target file is decoded based on the parameters specified in step S1500, and image data is acquired.

次に、ステップS1502において、ステップS1501で得た画像データをLLサブバンドのみの形式でエンコードする。即ち、「タイル分割なし」、「画像サイズは要求された領域を含むタイル境界のサイズ」、「解像度方向の階層数はなし」のエンコード条件でエンコードする。そして、エンコードして取得されたデータを返送する符号データ(返送データ)とする。   In step S1502, the image data obtained in step S1501 is encoded in the LL subband only format. That is, encoding is performed under the encoding conditions of “no tile division”, “the image size is the size of the tile boundary including the requested area”, and “there is no number of layers in the resolution direction”. And it is set as the code data (return data) which returns the data acquired by encoding.

尚、エンコード時には、メインヘッダ内のパラメータも返送データの特性に合わせて適宜修正されるようにエンコードのパラメータを設定してエンコードを行う。例えば、上述した例の場合、SIZマーカセグメント1201内のXsizフィールド1301には”512”を、Ysizフィールド1302には”512”を、XTsizフィールドには”512”を、YTsizフィールドには”512”をセットする。これにより、クライアント102から要求された画像データを、LLサブバンドで再エンコードした符号データとして作成することができる。   At the time of encoding, encoding is performed by setting the encoding parameters so that the parameters in the main header are appropriately modified according to the characteristics of the return data. For example, in the above-described example, “512” is set in the Xsiz field 1301 in the SIZ marker segment 1201, “512” is set in the Ysiz field 1302, “512” is set in the XTsiz field, and “512” is set in the YTsiz field. Set. Thereby, the image data requested from the client 102 can be created as code data re-encoded with the LL subband.

本実施形態の場合は、クライアント102側のデコード処理対象は、LLサブバンドのみでかつ、タイル分割もない符号データである。このため、クライアント102はデコード処理を高速に実行することができる。またサーバ101が実行するエンコード処理はLLサブバンドについてのみであるため、高速に実行することができる。   In the case of this embodiment, the decoding processing target on the client 102 side is code data that includes only the LL subband and does not have tile division. For this reason, the client 102 can execute the decoding process at high speed. Also, since the encoding process executed by the server 101 is only for the LL subband, it can be executed at high speed.

以上説明したように、本発明に係る実施形態の構成においては、クライアント102側のコンピュータの性能、特に一時ファイルとして作成できる記憶装置の容量に応じて、“RAW”あるいは、”JP2”モードの返送データを作成する。具体的には、クライアント102の記憶容量がターゲットファイルのファイルサイズ以上(具体的には2倍以上のバイト数)確保できない場合は、JPIPコマンドに指定された返送画像タイプに関係なく、必ず“RAW”あるいは、”JP2”モードで返送する。これにより、クライアント102はデータをキャッシュする必要が無く、サーバ101から受け取った符号データを直接デコードし、表示することが可能となる。この結果、クライアント102側の処理を軽減することができる。   As described above, in the configuration of the embodiment according to the present invention, the return of the “RAW” or “JP2” mode depends on the performance of the computer on the client 102 side, particularly the capacity of the storage device that can be created as a temporary file. Create data. Specifically, if the storage capacity of the client 102 cannot secure the file size of the target file or more (specifically, the number of bytes more than twice), the “RAW” is always used regardless of the return image type specified in the JPIP command. "Or return in" JP2 "mode. As a result, the client 102 does not need to cache data, and can directly decode and display the code data received from the server 101. As a result, processing on the client 102 side can be reduced.

一方、サーバ101側の処理に係る負荷も上記のように小さい。このため、サーバ101側での処理が多少増えても、従来の、クライアント102側でキャッシュデータからJPEG2000の符号データを再構築した後にデコード、表示する場合の構成よりも、本発明に係る実施形態の構成のスループットのほうが良好である。即ち、クライアント102が、サーバ101に対して要求を発行してから、通信し、結果を表示するまでの時間を短縮することが可能となる。   On the other hand, the load related to the processing on the server 101 side is also small as described above. For this reason, even if the processing on the server 101 side slightly increases, the embodiment according to the present invention is more preferable than the conventional configuration in which the client 102 side decodes and displays the JPEG2000 code data after reconstructing it from the cache data. The throughput of this configuration is better. That is, it is possible to shorten the time from when the client 102 issues a request to the server 101 to when the client 102 communicates and displays the result.

また、本発明に係る実施形態の構成によれば、クライアント102のデコードに係る負荷を軽減することができるため、CPU性能等の演算能力が低いクライアント102も高速に画像データのデコード、表示を行うことができる。   Further, according to the configuration of the embodiment of the present invention, it is possible to reduce the load related to the decoding of the client 102, so that the client 102 having a low computing capability such as CPU performance also decodes and displays the image data at high speed. be able to.

特に、サーバ101側でLLサブバンドのみの符号データに変換する場合は、クライアント102側でのデコード時間を、階層デコードする場合に比べ、大幅に短縮することが可能となる。例えば、サムネイル表示を行うようなアプリケーションにおいては、画像の全体を高速で表示する必要がある。このようなアプリケーションにおいては、タイル分割されておらずLLサブバンドのみの符号データを提供することが特に有効である。   In particular, when converting to code data of only the LL subband on the server 101 side, the decoding time on the client 102 side can be significantly shortened compared to the case of hierarchical decoding. For example, in an application that performs thumbnail display, it is necessary to display the entire image at high speed. In such an application, it is particularly effective to provide code data of only LL subbands that are not divided into tiles.

<<その他の実施形態>>
以上、本発明の実施形態例について詳述したが、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施態様を取ることが可能である。具体的には、複数の機器から構成されるシステムに適用しても良いし、また、一つの機器からなる装置に適用しても良い。
<< Other Embodiments >>
The exemplary embodiments of the present invention have been described in detail above. However, the present invention can take embodiments as, for example, a system, apparatus, method, program, or storage medium. Specifically, the present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of a single device.

尚、本発明は、前述した実施形態の機能を実現するプログラムを、システムあるいは装置に直接あるいは遠隔から供給し、そのシステムあるいは装置のコンピュータが該供給されたプログラムコードを読み出して実行することによっても達成される場合を含む。   The present invention can also be achieved by supplying a program that realizes the functions of the above-described embodiment directly or remotely to a system or apparatus, and the computer of the system or apparatus reads and executes the supplied program code. Including the case where it is achieved.

従って、本発明の機能処理をコンピュータで実現するために、該コンピュータにインストールされるプログラムコード自体も本発明の技術的範囲に含まれる。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含む。   Therefore, since the functions of the present invention are implemented by a computer, the program code installed in the computer is also included in the technical scope of the present invention. That is, the present invention includes a computer program itself for realizing the functional processing of the present invention.

その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等の形態であっても良い。   In that case, as long as it has the function of a program, it may be in the form of object code, a program executed by an interpreter, script data supplied to the OS, or the like.

プログラムを供給するための記録媒体としては、例えば、次のものが含まれる。即ち、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM,DVD−R)等が含まれる。   Examples of the recording medium for supplying the program include the following. Namely, floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD-) R) and the like are included.

その他、プログラムの供給形態としては、次のようなものも考えられる。即ち、クライアント装置のブラウザを用いてインターネットのホームページに接続し、該ホームページから本発明に係るコンピュータプログラム、或いは、圧縮され自動インストール機能を含むファイルをHD等の記録媒体にダウンロードする形態も考えられる。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明に含まれるものである。   In addition, the following types of programs may be considered. That is, it is also possible to connect to a homepage on the Internet using a browser of a client device and download a computer program according to the present invention or a compressed file including an automatic installation function from the homepage to a recording medium such as an HD. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the present invention.

また、次のような供給形態も考えられる。即ち、まず、本発明に係るプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布する。そして、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせ、その鍵情報の使用により暗号化されたプログラムを実行してコンピュータにインストールさせて本発明に係る構成を実現する。このような供給形態も可能である。   The following supply forms are also conceivable. That is, first, the program according to the present invention is encrypted, stored in a storage medium such as a CD-ROM, and distributed to users. Further, the present invention allows a user who has cleared a predetermined condition to download key information to be decrypted from a homepage via the Internet, execute a program encrypted by using the key information, and install the program on a computer. The structure which concerns on is implement | achieved. Such a supply form is also possible.

また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される他次のような実現形態も想定される。即ち、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。   In addition, the following realization modes in which the functions of the above-described embodiments are realized by the computer executing the read program are also assumed. In other words, based on the instructions of the program, the OS running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can be realized by the processing.

さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムの指示に基づいも前述した実施形態の機能が実現される。即ち、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現される。   Furthermore, after the program read from the recording medium is written in the memory provided in the function expansion board inserted into the computer or the function expansion unit connected to the computer, the program of the above-described embodiment is also based on the instructions of the program. Function is realized. That is, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.

ネットワーク上に複数のコンピュータが接続されている様子を示した図である。It is the figure which showed a mode that the some computer was connected on the network. サーバのハードウェア構成を示したブロック図である。It is the block diagram which showed the hardware constitutions of the server. JPEG2000の符号化データの概略図である。It is the schematic of the encoding data of JPEG2000. 解像度とサブバンドの関係を模式的に示した図である。It is the figure which showed typically the relationship between resolution and a subband. 画像データに係るリクエストとレスポンスの対応を示した概念図である。It is the conceptual diagram which showed the response | compatibility with the request which concerns on image data, and a response. precinct data-binの構造の概略図である。It is the schematic of the structure of precinct data-bin. JPIP Response Dataの一例を示した図である。It is the figure which showed an example of JPIP Response Data. サーバ処理の全体のフローを示したフローチャートである。It is the flowchart which showed the flow of the whole server process. 返送符号データ作成処理の流れを示したフローチャートである。It is the flowchart which showed the flow of return code data creation processing. 第1実施形態におけるキャッシュレスデータ作成処理の流れを示したフローチャートである。It is the flowchart which showed the flow of the cashless data creation process in 1st Embodiment. 第2実施形態におけるキャッシュレスデータ作成処理の流れを示したフローチャートである。It is the flowchart which showed the flow of the cashless data creation process in 2nd Embodiment. メインヘッダのマーカセグメントの構成を模式的に示した図である。It is the figure which showed typically the structure of the marker segment of a main header. SIZマーカセグメントの詳細な構成を模式的に示した図である。It is the figure which showed typically the detailed structure of the SIZ marker segment. CODマーカセグメントの詳細な構成を模式的に示した図である。It is the figure which showed typically the detailed structure of the COD marker segment. 第3実施形態におけるキャッシュレスデータ作成処理の流れを示したフローチャートである。It is the flowchart which showed the flow of the cashless data creation process in 3rd Embodiment.

Claims (9)

1以上のパケットから構成された画像データを解像度レベル毎に記憶する記憶手段と、
外部装置から、少なくとも前記画像データの前記解像度レベルの指定が含まれる送信要求と、該外部装置の記憶可能容量に係る容量情報とを受信する受信手段と、
前記画像データのサイズと前記容量情報との比較に基づいて前記画像データに対して所定の処理を実行するか否かを決定する決定手段と、
前記決定手段において処理を実行すると決定された場合、指定された前記解像度レベル及び当該指定された解像度レベルよりも低い解像度レベルに含まれる前記パケットを返送データに追加し、前記解像度レベルに含まれない前記パケットを長さが0であることを示すパケットで置き換えて該返送データに追加することによって、返送データを生成する処理を実行する生成手段と、
生成された前記返送データを前記外部装置へ送出する送出手段と、を備えることを特徴とするサーバ装置。
Storage means for storing image data composed of one or more packets for each resolution level;
Receiving means for receiving, from an external device, a transmission request including at least the designation of the resolution level of the image data, and capacity information relating to the storable capacity of the external device;
Determining means for determining whether to execute a predetermined process on the image data based on a comparison between the size of the image data and the capacity information;
When the determination means determines to execute the process, the packet included in the specified resolution level and the resolution level lower than the specified resolution level is added to the return data, and is not included in the resolution level. Generation means for executing processing for generating return data by replacing the packet with a packet indicating that the length is 0 and adding the packet to the return data;
Sending means for sending the generated return data to the external device.
1以上のパケットから構成された画像データを解像度レベル毎に記憶する記憶手段と、
外部装置から、少なくとも前記画像データの前記解像度レベルの指定が含まれる送信要求と、該外部装置の記憶可能容量に係る容量情報とを受信する受信手段と、
前記画像データのサイズと前記容量情報との比較に基づいて前記画像データに対して所定の処理を実行するか否かを決定する決定手段と、
前記決定手段において処理を実行すると決定された場合、指定された前記解像度レベル及び当該指定された解像度レベルよりも低い解像度レベルに含まれる前記パケットを返送データに追加することによって、返送データを生成する処理を実行する生成手段と、
生成された前記返送データを前記外部装置へ送出する送出手段と、を備えることを特徴とするサーバ装置。
Storage means for storing image data composed of one or more packets for each resolution level;
Receiving means for receiving, from an external device, a transmission request including at least the designation of the resolution level of the image data, and capacity information relating to the storable capacity of the external device;
Determining means for determining whether to execute a predetermined process on the image data based on a comparison between the size of the image data and the capacity information;
When the determination means determines to execute the process, return data is generated by adding the packet included in the specified resolution level and the resolution level lower than the specified resolution level to the return data. Generating means for executing processing;
Sending means for sending the generated return data to the external device.
1以上のパケットから構成された画像データを解像度レベル毎に記憶する記憶手段と、
外部装置から、少なくとも前記画像データの前記解像度レベルの指定が含まれる送信要求と、該外部装置の記憶可能容量に係る容量情報とを受信する受信手段と、
前記画像データのサイズと前記容量情報との比較に基づいて前記画像データに対して所定の処理を実行するか否かを決定する決定手段と、
前記決定手段において処理を実行すると決定された場合、指定された前記解像度レベル及び当該指定された解像度レベルよりも低い解像度レベルに含まれる前記パケットを合成して、指定された前記解像度レベルの画像データを生成する処理を実行する生成手段と、
生成された前記返送データを前記外部装置へ送出する送出手段と、を備えることを特徴とするサーバ装置。
Storage means for storing image data composed of one or more packets for each resolution level;
Receiving means for receiving, from an external device, a transmission request including at least the designation of the resolution level of the image data, and capacity information relating to the storable capacity of the external device;
Determining means for determining whether to execute a predetermined process on the image data based on a comparison between the size of the image data and the capacity information;
When the determination means determines to execute the process, the packets included in the specified resolution level and the resolution level lower than the specified resolution level are combined to generate image data of the specified resolution level. Generating means for executing processing for generating
Sending means for sending the generated return data to the external device.
前記複数のレイヤから構成された画像データは、JPEG2000方式に基づく符号化データであることを特徴とする請求項1乃至3のいずれか1項に記載のサーバ装置。   The server apparatus according to claim 1, wherein the image data composed of the plurality of layers is encoded data based on a JPEG2000 system. 前記受信手段、及び、前記送出手段は、JPIPに基づいて前記外部装置と通信を行うことを特徴とする請求項1乃至4のいずれか1項に記載のサーバ装置。   5. The server device according to claim 1, wherein the receiving unit and the sending unit communicate with the external device based on JPIP. 前記送出手段により送出される前記返送データのデータ形式は、JPIPのRAW又はjp2の形式であることを特徴とする請求項5記載のサーバ装置。   6. The server apparatus according to claim 5, wherein a data format of the return data sent by the sending means is a JPIP RAW or jp2 format. 1以上のパケットから構成された画像データを解像度レベル毎に記憶する記憶手段を備えたサーバ装置の制御方法であって、
外部装置から、少なくとも前記画像データの前記解像度レベルの指定が含まれる送信要求と、該外部装置の記憶可能容量に係る容量情報とを受信する受信工程と、
前記画像データのサイズと前記容量情報との比較に基づいて前記画像データに対して所定の処理を実行するか否かを決定する決定工程と、
前記決定工程において処理を実行すると決定された場合、指定された前記解像度レベル及び当該指定された解像度レベルよりも低い解像度レベルに含まれる前記パケットを返送データに追加し、前記解像度レベルに含まれない前記パケットを長さが0であることを示すパケットで置き換えて該返送データに追加することによって、返送データを生成する処理を実行する生成工程と、
生成された前記返送データを前記外部装置へ送出する送出工程と、を備えることを特徴とするサーバ装置の制御方法。
A control method for a server device comprising storage means for storing image data composed of one or more packets for each resolution level,
A receiving step of receiving from the external device a transmission request including at least the specification of the resolution level of the image data, and capacity information relating to the storable capacity of the external device;
A determination step for determining whether or not to execute a predetermined process on the image data based on a comparison between the size of the image data and the capacity information;
If it is determined to execute the process in the determining step, the packet included in the designated resolution level and the resolution level lower than the designated resolution level is added to the return data, and is not included in the resolution level. A generation step of executing processing for generating return data by replacing the packet with a packet indicating that the length is 0 and adding the packet to the return data;
And a sending step for sending the generated return data to the external device.
コンピュータを請求項1乃至7のいずれかに記載のサーバ装置として機能させるためのコンピュータプログラム。   A computer program for causing a computer to function as the server device according to claim 1. 請求項8に記載のコンピュータプログラムを格納したコンピュータで読み取り可能な記憶媒体。   A computer-readable storage medium storing the computer program according to claim 8.
JP2005235487A 2005-08-15 2005-08-15 Server and its control method, computer program, storage medium Withdrawn JP2007053445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005235487A JP2007053445A (en) 2005-08-15 2005-08-15 Server and its control method, computer program, storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005235487A JP2007053445A (en) 2005-08-15 2005-08-15 Server and its control method, computer program, storage medium

Publications (1)

Publication Number Publication Date
JP2007053445A true JP2007053445A (en) 2007-03-01

Family

ID=37917615

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005235487A Withdrawn JP2007053445A (en) 2005-08-15 2005-08-15 Server and its control method, computer program, storage medium

Country Status (1)

Country Link
JP (1) JP2007053445A (en)

Similar Documents

Publication Publication Date Title
JP4165668B2 (en) Method and apparatus for compressing continuous, non-separated data streams
US9635373B2 (en) System and method for low bandwidth display information transport
KR101120796B1 (en) Session description message extensions
US8145779B2 (en) Dynamic server-side media transcoding
US7627886B2 (en) Systems and methods for displaying video streams
US20060294125A1 (en) Adaptive video compression of graphical user interfaces using application metadata
JP4377103B2 (en) Image processing for JPEG2000 in a server client environment
US20060140494A1 (en) Image processing method and image processing apparatus
US20010049715A1 (en) Method and apparatus for increasing the effective bandwidth of video sequences transmitted over a network by using cached data
US7558430B2 (en) Apparatus method and computer-readable medium for processing hierarchical encoded image data
JP2004274760A (en) Communication method for compressed digital image, and product
US7260614B2 (en) Methods and systems for scalable streaming of images with client-side control
JP2006101482A (en) Image communications system, server apparatus, and image communication method
JP2002533012A (en) Web-based video editing method and system using high performance multimedia software library
JP2004274758A (en) Method and apparatus for converting jpp-stream into jpeg-2000 code stream
JP2004274759A (en) Communication method and device for compressed digital image with limited access and server/client transfer
US8577157B2 (en) Conditional replenishment for motion JPEG2000
JP2007053445A (en) Server and its control method, computer program, storage medium
CA2352962A1 (en) Web-based video-editing method and system
JP4065535B2 (en) Code data creation method and apparatus
JP2004199291A (en) Scroll display method and device
JP2006339972A (en) Image processing apparatus and its control method, computer program, and storage medium
JP2007053444A (en) Server and its control method, computer program, storage medium
JP2006345452A (en) Information processing device, its controlling method, computer program, and storage medium
Chi et al. Pervasive web content delivery with efficient data reuse

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20081104