JP3958198B2 - Image processing method - Google Patents

Image processing method Download PDF

Info

Publication number
JP3958198B2
JP3958198B2 JP2002356736A JP2002356736A JP3958198B2 JP 3958198 B2 JP3958198 B2 JP 3958198B2 JP 2002356736 A JP2002356736 A JP 2002356736A JP 2002356736 A JP2002356736 A JP 2002356736A JP 3958198 B2 JP3958198 B2 JP 3958198B2
Authority
JP
Japan
Prior art keywords
data
encoded data
image
command
server 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.)
Expired - Fee Related
Application number
JP2002356736A
Other languages
Japanese (ja)
Other versions
JP2004193752A (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 JP2002356736A priority Critical patent/JP3958198B2/en
Publication of JP2004193752A publication Critical patent/JP2004193752A/en
Application granted granted Critical
Publication of JP3958198B2 publication Critical patent/JP3958198B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、スケーラビリティを有する画像符号化データを保持するサーバ装置から、指示された画像符号化データを受信し、受信した画像符号化データを1つの画像ファイルに作成する技術に関するものである。
【0002】
【従来技術】
インターネット上では、WWWサーバにWeb(ウエブ)ブラウザを用いてアクセスして文書データや画像データ等を閲覧することが盛んに行われている。このシステムはインターネット上に情報を公開するWWWサーバと、その情報を閲覧するクライアント装置(端末装置)とを含み、各端末装置上ではウェブブウザが実行されており、各端末装置のユーザはこのウエブブラウザを用いてWWWサーバによって公開された情報を閲覧することができる。このWWWサーバには、ホームページと呼ばれる公開対象の情報をHTMLで記述したファイルが保存されており、上述の通り端末装置のユーザはウェブブウザを用いてこれにアクセスすることで端末装置の表示装置の表示画面上に上記ファイルによって表現される内容を表示することができる。
【0003】
また端末装置側のウエブブラウザを用いることで、表示装置の表示画面上に表示しているページ内のリンクを辿っていくことができ、これにより必要な情報を得ることができる。更に、WWWサーバが管理しているファイルを端末装置にダウンロードするためには、File Transfer Protocol(以下、FTPと略す)を用いるのが一般的である。このFTPとは、ネットワークを通してWWWサーバが管理するファイルを一度に端末装置に転送する技術である。
【0004】
また上記ファイルには画像ファイルも含まれており、端末装置からWWWサーバが管理する画像ファイルへ複数回に分けてアクセスし、アクセスした画像ファイルの内容(画像)を表示装置に表示するために使用するプロトコルとしてFlashpix/IIPがある。このIIPはFlashpixと呼称される画像データファイルのフォーマットに最適なプロトコルになっており、画像データへ複数回に分けてアクセスする際において1回のアクセス単位は、このFlashpixのタイル単位に行うものである。
【0005】
ここで、このIIPをそのままJPEG2000に適用した場合を考える。JPEG2000では、各スケイラビリティを有する符号化データにおいて、夫々の符号化データは、自身が有するスケーラビリティよりも1つ下のスケイラビリティのデータからの差分データで構成されている。WWWサーバがJPEG2000に従った符号化データを保持しており、端末装置からウェブブウザを用いてこの符号化データに対して複数回に分けてアクセスし、夫々のアクセスにおいて受信した各スケーラビリティの符号化データをデコードして表示装置にデコード結果を表示する場合、端末装置は受信した各スケーラビリティの符号化データをメモリにキャッシュしておき、全ての符号化データを受信するとこれらの全ての符号化データをデコーダに送り、デコードする方法や、各符号化データ毎にデコードし、新たに符号化データを受信すると、これを前回の続きからデコードする方法がある。
【0006】
このような状況に鑑みて、マルチ解像度を有する画像符号化データの中から必要な部分のデータのみを取り出して別の符号化データに変換する方法として従来から様々な方法が提案されている(例えば特許文献1を参照)。この種の技術として従来では、ソースとなる画像データは、ウェーブレット変換等のようなマルチ解像度のデータを管理するための符号化方式を用いて符号化されている。そして、このソースとなる符号化データ(オリジナル符号化データ)の中から、クライアントが選択した空間的な領域に対応する符号化データ(部分符号化データ)を取り出し、1つの独立した符号化データに変換するものである。この時、ソオリジナル符号化データから取り出される部分符号化データはJPEG2000のコードブロックに対応しており、部分符号化データの全ての階層で、かつ全てのサブバンドから部分符号化データに該当する、もしくは関係する全ての符号化データを含むものである。
【0007】
また他の従来技術としては、ソースとなる画像データは、マルチ解像度のデータを有する画像データであって、サーバと端末装置との間で画質とデータ量のトレードオフを決めるための調停を行う手段を有し、最終的にはサーバ側で転送するデータ量を決め、この調停で決められたデータ量で且つ論理的な符号データの単位まで、サーバが端末装置に対してデータを転送するものである(例えば特許文献2を参照)。
【0008】
【特許文献1】
米国特許第6041143号(「MULTIRESOLUTION COMPRESSED IMAGE MANAGEMENT SYSTEM AND METHOD」)
【特許文献2】
米国特許第5764235号(「COMPUTER IMPLEMENTED METHOD AND SYSTEM FOR TRANSMITTING GRAPHICAL IMAGES FROM SERVER TO CLIENT AT USER SELECTABLE RESOLUTION」)
【0009】
【発明が解決しようとする課題】
端末装置が受信した各スケーラビリティの符号化データをメモリにキャッシュしておき、全ての符号化データを受信するとこれらの全ての符号化データをデコーダに送り、デコードする場合、サーバ側から送られてくる各スケーラビリティの符号化データを、直接JPEG2000準拠の1つの符号化データファイルに作り直すことは可能である。
【0010】
しかし、サーバ側から送られてくる各符号化データは、端末装置側から要求する順に送られてくるため、端末装置が受信した符号化データをJPEG2000準拠の1本の符号化データに変換することは、端末装置側の処理が煩雑になり、コストがかかるという問題点がある。
【0011】
又、サーバから送られてきた各符号化データを独自形式のキャッシュファイルとして構成し、端末装置側のJPEG2000デコーダが直接このキャッシュファイルをリードすることも可能であるが、この場合、JPEG2000のデコーダは、この独自のキャッシュファイルをリードするための処理が必要となる。このため、処理が複雑になると共に、汎用のJPEG2000デコーダが使えないという問題点がある。
【0012】
そこで、JPEG2000の画像をパケット単位で受信し、それらパケットデータをキャッシュしておく。そして、デコーダへデータを渡す際に、まだ受信していないパケットデータ部分に、zero length packet(以下、ZLPと略す)データを挿入し、既に受信したパケットデータと合せて、一つのファイルを作成することで、メインヘッダの書き換えなど煩雑な処理を行わずに、一般的なJPEG2000デコーダで処理できるJPEG2000ファイルを作成する方法もある。
【0013】
また、端末装置からサーバに画像符号化データを送信する旨の要求を示すコマンドが、サーバが保持するファイルを構成する論理的な固まりの単位のみを示す場合には、サーバに対して要求を発行しなければ転送される画像符号化データのサイズを判断することはできない。それによって画像符号化データを端末装置に転送する時間が、端末装置側で予想される時間以上に要していまい、転送にリアルタイム性が要求される場合、例えば端末装置において画像サイズの大きい画像に対して高速にパンニングを行うなどの操作を行い、パンニングに応じた画像符号化データをサーバから受信する場合には不向きである。
【0014】
更に、上述の従来技術には以下の問題がある。すなわち端末装置がある画像符号化データのうち、既にいくつかの部分画像符号化データを受信している場合であっても、端末装置からサーバに要求を送信する度に、サーバから端末装置に対して全ての階層の全コードブロックの符号化データが送られる。すなわち、サーバは端末装置が既に受信済みの符号化データまでも送信することになる。更に、送信する符号化データのヘッダ部分は、今回要求した画像データの情報(画像サイズ、階層情報など)に書き換えられており、元々サーバで管理している符号化データの情報を取ることができない。
【0015】
また、上述の別の従来技術には以上の問題に加え、画質と量のトレードオフによって、ユーザが要求した画質を表示/印刷できない場合もある。また、サーバ、端末装置間での調停のため通信コストがかかる上、サーバの処理が多くなり、サーバの負荷が増大し、ひいてはユーザの要求から表示までの時間がかかるという問題点がある。
【0016】
本発明は以上の問題に鑑みてなされたものであり、複数の解像度の画像を有する符号化データの受信形態を、目的に応じて切り替える技術を提供することを目的とする。
【0017】
【課題を解決するための手段】
本発明の目的を達成するために、例えば本発明の画像処理装置は以下の構成を備える。
【0018】
即ち、スケーラビリティを有する画像符号化データを保持するサーバ装置から、指示された当該画像符号化データを受信する画像処理装置であって、
ユーザからの入力操作を受け付ける入力手段と、
当該入力操作の種別に応じて、該入力操作に対応した処理が高速に行われるべきか、若しくは高速に行う必要はないか、を判断する判断手段と、
前記判断の結果、高速に行う必要はないと判断した場合には、前記指示された画像符号化データのうち、デコードすることで所望のレベルの画像を形成するために必要な部分画像符号化データを1回の受信処理で受信するために前記サーバ装置に送信する第1のコマンドを前記サーバ装置に対して送信し、
前記判断の結果、高速に行われるべきと判断した場合には、前記指示された画像符号化データにおける前記部分画像符号化データの位置情報、及び前記サーバ装置から一度に受信するデータのサイズ、を含む第2のコマンドを前記サーバ装置に対して送信する送信手段と、
前記サーバ装置から送信される、当該送信手段により送信されたコマンドに応じた画像符号化データを受信してデコードし、デコード結果を出力装置に出力する出力手段とを備え
前記送信手段が前記第2のコマンドを前記サーバ装置に対して送信した場合、前記出力手段は更に、受信すべき部分画像符号化データのうち、受信したデータのサイズと、まだ受信していないデータのサイズとを示す情報を受信し、
前記出力手段が前記情報を受信した場合、前記送信手段は前記部分画像符号化データのうちまだ受信していないデータを、予め設定された単位毎に前記サーバ装置から受信するためのコマンドを前記第2のコマンドとして前記サーバ装置に対して送信することを特徴とする。
【0019】
【発明の実施形態】
以下、添付図面を参照して本発明の好適な実施の形態を詳細に説明する。なお、本発明は、端末装置がサーバ装置からネットワークを介して受信した断片的な画像データを、一つの画像ファイルに作成し直す方法に関するものである。特に、ISO/IEC−15444に準拠したJPEG2000符号化データ(以下、単に画像符号化データと呼称する)をサーバ装置からインターネット・イメージング・プロトコル(IIP)などで画像符号化データの断片的な領域、或いは、断片的な画像符号化データを受信し、それらの断片化された画像符号化データを独自の方式でキャッシュするクライアントの端末装置(以下、単に端末装置と呼称する)において本発明は実施可能である。
【0020】
更には本発明は、端末装置において実行されるアプリケーションプログラムにより要求される表示要求に応じて、端末装置側で受信した断片化された画像符号化データのキャッシュデータから1つのJPEG2000準拠の符号化データファイルを生成するものである。
【0021】
[第1の実施形態]
図1は、インターネットやLANに代表されるネットワーク上に複数のコンピュータが接続されている本実施形態におけるシステムの概略構成を示す図である。
【0022】
図1において、100はインターネットやLANに代表されるネットワークである。101,103はサーバ装置であり、それぞれ画像データを送信するためのJPEG2000用のIIPサーバ機能、WWWサーバ機能に必要なソフトウェアを保持すると共に実行している。また、これらサーバ101,103はそれぞれ大容量のハードディスク101a,103aを接続しており、そのハードディスクに大量の画像データも格納している。102a,102bはクライアント側の端末装置であり、ウェブ(Web)ブラウザ、JPEG2000デコーダなどのソフトウェアを保持していと共に、必要に応じてこれを実行することが出来る。同図にはサーバ装置、端末装置は夫々2台ずつ示しているが、本実施形態におけるシステムを構成するサーバ装置、端末装置の数はこれに限定されるものではない。
【0023】
図2は、サーバ装置101,103、端末装置102a,102bの基本構成を示すブロック図である。なお、サーバ装置と端末装置とは基本的には同じ構成を備えるが、構成する各部が行う処理が異なる部分もある。
【0024】
図2において、201はCPUで、ROM204やRAM205が保持するプログラムやデータを用いて装置全体の制御を行うと共に、後述の画像符号化データの送受信に係る処理を行う。なお同図の構成がサーバ装置のものである場合にはCPU201は画像符号化データの送信に係る処理、同図の構成が端末装置のものである場合にはCPU201は画像符号化データの受信に係る処理を行うことになる。また、キーボード202,マウス202aから入力された指示に従った処理も行う。
【0025】
202、202aは夫々キーボード、マウスで、夫々ポインティングデバイスとして用いられ、各種の指示(各種のデータ、コマンド等)をCPU201に対して入力することが出来る。203は表示部で、CRTや液晶画面などにより構成されており、画像や文字などの各種の情報を表示することが出来る。なお同図の構成がサーバ装置のものである場合には、例えばサーバ装置のシステム情報や、画像符号化データの要求の受信状況などを表示する。また同図の構成が端末装置ものである場合には、例えば要求する画像符号化データを選択するためのGUIや受信した画像符号化データをデコードした結果などを表示する。
【0026】
204はROMで、装置を制御するためのプログラムやデータなどを保持する。205はRAMで、ハードディスク206や記憶媒体ドライブ207からロードされるプログラムやデータを一時的に保持するエリアを備えると共に、CPU201が各種の処理を行うために必要なワークエリアも備える。206はハードディスクで、OS(オペレーティングシステム)や、後述の画像符号化データの送受信に係る処理プログラムやデータ等を格納する。
【0027】
なおハードディスク206は、同図の構成がサーバ装置のものである場合には画像符号化データの送信に係る処理をCPU201が実行するためのプログラムやデータや、IIPサーバ機能、WWWサーバ機能をCPU201が実行するためのプログラムやデータ、例えば端末装置のユーザがウェブブウザを用いてアクセスすることにより閲覧できるホームページのデータ、閲覧する複数の画像の符号化データ等を保持する。なお、同図の構成がサーバ装置のものである場合にはハードディスク206は図1における101a、101bに対応するものである。
【0028】
またハードディスク206は、同図の構成が端末装置のものである場合には画像符号化データの受信に係る処理をCPU201が実行するためのプログラムやデータ、ウェブブラウザのプログラムやデータ、JPEG2000デコーダのプログラムやデータを保持する。
【0029】
207は記憶媒体ドライブで、CD−ROMやDVD−ROMなどの記憶媒体に記憶保持されているプログラムやデータを読み取り、RAM205やハードディスク206に読み出したプログラムやデータを出力する。なお、ハードディスク206が記憶保持する上述の各プログラムやデータの一部、もしくは全部を記憶媒体に記憶保持させておき、必要に応じて読み出しても良い。208はプリンタである。209はネットワークインターフェースで、図1に示したネットワーク100と本装置を接続するためのもので、ネットワークインターフェース209を介して各種のデータの送受信を行うことが出来る。
【0030】
なお同図の構成がサーバ装置のものである場合にはネットワークインターフェース209を介して、端末装置からの画像符号化データの送信要求を受信したり、要求に応じた画像符号化データの一部、もしくは全部を送信する。また同図の構成が端末装置のものである場合には、ネットワークインターフェース209を介して、サーバ装置に対して画像符号化データの送信要求を送信したり、サーバ装置から要求に応じた画像符号化データの一部、もしくは全部を受信する。
【0031】
本実施形態では、JPEG2000に従って圧縮符号化された画像データがサーバ装置のハードディスク206、もしくは不図示の(サーバ装置の記憶媒体ドライブ207が読み取り可能な)記憶媒体に複数記憶保持されており、端末装置から1つの画像符号化データを送信する要求を受けると、ハードディスク206から対象の画像符号化データが読み出され、端末装置に対して送信することが出来る。
【0032】
また端末装置は、画像表示/印刷アプリケーションを用いてサーバ装置に対してJPEG2000ファイル内の必要な部分のみをJPEG2000用のIIPを用いて要求することができ、要求に応じてサーバ装置から断片的に送信されてくる画像符号化データタ受信する。そしてこの受信した断片的な画像符号化データは端末装置のRAM205やハードディスク206に格納(キャッシュ)される。そして端末装置はハードディスク206にキャッシュされた断片的な画像符号化データから、JPEG2000のデコーダに渡すためのJPEG2000準拠の画像符号化データに変換する。
【0033】
次に、上記構成を備えるシステムにおいて、端末装置からサーバ装置に対して所望の画像符号化データを要求した場合に、サーバ装置、端末装置の夫々が行う処理について説明する。
【0034】
すなわち以下では、図1に示した端末装置102a,102bのユーザは、上述のウェブブウザを用いてサーバ装置101もしくは103の何れかにアクセスし、表示部203に画像を閲覧するためのホームページを表示させる。そしてユーザが画像を閲覧するためのホームページにおいて、1つの画像をキーボード202やマウス202を用いて指示することで、端末装置はサーバ装置から送信される指示された画像の符号化データ、すなわちJPEG2000に従って圧縮符号化された画像符号化データを断片的に(画像符号化データを複数回に分けて)RAM205にキャッシュする。そして、これらキャッシュデータから一本のビットストリームを作り出してデコードし、表示するという処理においてサーバ装置、端末装置の夫々が行う処理について説明する。
【0035】
次に図3を参照して一般的なJPEG2000ファイルについて説明する。図3は、Layer-resolution level-component-position progression(以下、SNR Progressionと記す)に従って生成されたJPEG2000ファイルの概略構成を示す図である。
【0036】
JPEG2000ファイルはメインヘッダ(Main Header)、タイルヘッダ(Tile Header)、データ(Data)が含まれており、このデータの部分に画像符号化データが記録されることになる。またタイルヘッダは、圧縮符号化元の画像を所定のサイズの矩形(タイル)毎に分割し、夫々のタイルの圧縮符号化データを生成した場合に、夫々のタイルの圧縮符号化データに対して作成されるものである。メインヘッダ、タイルヘッダについては公知の技術によるものであるのでここでの説明は省略する。
【0037】
このSNR Progressionに準じた場合、画像符号化データは、(レイヤ)Layer/(解像度)Resolution/(成分)Component/(位置)Positionの順に記録される。次に、解像度(画像サイズ)とResolution番号との関係を図4に示す。
【0038】
図4において、最も小さい解像度の画像の解像度(resolution)番号を「0」とし、resolution番号が一つ増加するごとに画像の幅と高さが共に倍になっていく。この解像度毎の符号データは、解像度番号の小さいものから順に、プログレッション・オーダに従って格納されている。
【0039】
一方、レイヤは、復元する画像の原画に対するS/N比に対応し、レイヤ番号が小さいほどS/N比が悪くなる。レイヤ毎の符号データも解像度毎の符号データと同様に、レイヤ番号の小さい順にプログレッション・オーダに従って格納されている。
【0040】
また各Resolutionには所定の順番で各色成分等のデータ(Componentデータ)が記録されており、各Componentデータには順番通りに番号(コンポーネント番号)が付けられている。また各Componentデータには圧縮符号化元の画像において空間的な各位置におけるコードブロック(符号化対象の最小単位)のデータ(Positionデータ)が順番に記録されており、各Positionデータにはコードブロックの空間的な順番通りに番号(ポジション番号)が付けられている(例えば画像の左上隅を0として画像の右方向に1つずつ番号が増加し、右端に達したら1つ下、且つ左端からまた画像右方向に番号が増加する)。
【0041】
一つのJPEG2000ファイル内でのResolution番号とレイヤ番号、コンポーネント番号の最大値は、エンコーダによって予め設定されており、圧縮符号化元の画像はそのパラメータに従ってエンコードされており、その情報はメインヘッダに記録されている。また各パケット(packet)は、そのパケットに格納されているコードブロック(code-block)の情報を管理しているパケットヘッダ(packet header)部と、各コードブロックの符号化データから構成されている。同図では1つのPositionデータがパケットに相当する。
【0042】
このような構造を有するJPEG2000ファイルがサーバ装置に保持されていれば、端末装置は必要な解像度等、要求する部分の画像のみをサーバ装置から受信することができる。受信するデータの単位としては、JPEG2000のパケット(packet)、或はパケットよりも更に小さい符号化単位であるコードブロック単位が考えられる。本実施形態では、端末装置がサーバ装置から受信するデータ単位としてパケット単位を想定する。このパケット単位でのリクエスト及びレスポンスの概念図を図5に示す。同図ではサーバ装置101、端末装置102a間のリクエスト、レスポンスについて示しているが、サーバ装置103、端末装置102bを適用しても良いことはいうまでもない。
【0043】
同図は、画像がタイル分割されており、各タイルの符号化データ(同図ではTile0〜TileNまでの各データ)がJPEG2000ファイル503としてサーバ装置101に接続されているハードディスク101aに格納されている状態で、端末装置102aから所望のタイル、所望の解像度、所望のレイヤ、所望のコンポーネント、そして所望の空間的な位置の符号化データを要求する場合に、サーバ装置101と端末装置102aとの間で行われる通信を示すものである。
【0044】
ここで例えば端末装置102aがタイル番号は「1」、解像度番号は「0」、レイヤ番号は「0」、コンポーネント番号は「0」、そしてポジション番号は「0」である符号化データをサーバ装置101に要求した場合、サーバ装置101はハードディスク101aに保存しているJPEG2000ファイル503を解析して、要求に相当する部分(要求されたタイル番号、解像度番号、レイヤ番号、コンポーネント番号、ポジション番号に相当する部分)をパケットデータとして抜き出し、パケット0として端末装置102aに返信する。
【0045】
図6は、本実施形態におけるサーバ装置101(もしくは103)に接続されたハードディスクに保持されているJPEG2000ファイルの構成の一例を示す図である。図3に示すとおりJPEG2000ファイルはメインヘッダ、タイルヘッダ、そしてデータ(画像符号化データ)に大別される。同図では画像符号化データは2つのレイヤデータ「0」、「1」に大別される。夫々のレイヤデータは「0」〜「5」の6種類の解像度データに大別される。またコンポーネントデータ、ポジションデータは夫々「0」の1種類である。ここで説明を簡単にするために、サーバ装置101で管理しているJPEG2000の画像符号化データの最大解像度の画像サイズを4096×4096画素とする。よって6種類の解像度があると、各解像度での画像サイズは、4096x4096,2048x2048,1024×1024,512×512,256×256,128×128画素となる。また夫々の符号化データに対して括弧書きで示している数値は各画像符号化データのバイト数を示す。
【0046】
図7は、端末装置102a(端末装置102bも同様)におけるウェブブウザが行う、サーバ装置101(サーバ装置103でも良い)に対してJPEG2000ファイルの送信を要求し、要求したJPEG2000ファイルをデコードして表示部203に表示する処理のフローチャートである。同処理はウェブブウザのプログラムをCPU201が実行することで行われるものである。なお同図のフローチャートでは、端末装置102aにおいてユーザがキーボード202やマウス202aを用いて予め送信を要求する画像を選択している。選択方法としては例えば、サーバ装置101が提供するホームページ上でサーバ装置101が保持する複数の画像のサムネイルが表示されており、ユーザはキーボード202やマウス202aを用いてこれらのうち1つのサムネイルを指示する。よって同図に示したフローチャートに従った処理では、選択した画像のJPEG2000ファイルの送信要求を行う。
【0047】
ステップS1では、ユーザからの操作入力を受け付ける。操作入力しては例えば選択している画像の拡大、縮小、パンニング等を行うための操作入力をキーボード202やマウス202aを用いて入力する。
【0048】
次にステップS2では、ステップS1で入力された操作入力から、必要なパケットを特定する。その後ステップS3において、ステップS1にてユーザが入力した操作の内容を判断し、予めウェブブウザが保持する複数のコマンドから判断した操作の内容に応じたコマンドを選択する。ステップS3における処理の詳細については後述する。次にステップS4では、ステップS3で選択されたコマンドをサーバ装置に対して送信する。ステップS4における処理の詳細については後述する。
【0049】
ステップS5では、ステップS4におけるサーバ装置への送信に対するレスポンス、即ち要求に応じた画像符号化データを受信し、RAM205にキャッシュする。ステップS6では、ステップS5でRAM205にキャッシュした画像符号化データからJPEG2000準拠のビットストリームを作成する。ステップS6における処理の詳細については後述する。その後ステップS7においてステップS6で作成したビットストリームを上記JPEG2000デコーダソフトによりデコードし、表示部203上に表示する。ステップS8では、本アプリケーションにより処理の終了が入力されたか否かを判断し、終了しない場合には処理をステップS1に戻す。
【0050】
次に、上記ステップS3における、処理の詳細について説明する。図8はステップS3における処理の詳細を示すフローチャートである。以下、同図のフローチャートを参照して、ステップS3における処理の詳細について説明する。
【0051】
まずステップS80は、ステップS1入力された操作の内容を解析する。具体的には、入力された操作に対して高速にレスポンスを返すべきであるか否かを判断する。例えば、連続的な拡大表示や、表示ウィンドウに画像全体を1度に表示できない場合の、画像のパンニングに対しては、高速にレスポンスを返すべきである。これらの操作は、ユーザが連続して行う可能性があり、各操作に対応した処理が高速に行われることが要求されるからである。
【0052】
よってステップS80では上記各操作が入力された場合には、高速にレスポンスを返すべきと判断て処理をステップS82に進め、上記各操作以外が入力された場合には、高速にレスポンスを返す必要がないと判断して処理をステップS81に進める。
【0053】
ステップS81では、ステップS2で特定したパケットの画像符号化データを全てサーバ装置から受信するためにサーバ装置に対して送信するコマンドを用意する。一方ステップS82では、ステップS2で特定したパケットの画像符号化データの内、一部分のみを物理的なバイト数で指定してサーバ装置から受信するために、サーバ装置に対して送信するコマンドを用意する。
【0054】
具体的にステップS82で用いるコマンドの仕様は以下の通りである。
【0055】
Tile/Reso/Layer/Compo番号 先頭オフセット 最大要求バイト数
このコマンドの中で「Tile/Layer/Compo番号」は、要求するパケットを特定するためのTile番号、Resolution番号, Layer番号, Component番号を示す。その次の「先頭オフセット」は、要求したパケットのJPEG2000ファイル内における記録位置の先頭からのオフセットであり、このパケットを最初に要求する場合は「0」である。最後の「最大要求バイト数」は今回の要求で転送するパケットデータの最大バイト数である。
【0056】
本実施形態ではステップS1で入力する操作内容として高速レスポンスを要求する操作を入力するものとし、またこの操作として画像の拡大表示を行う操作を例に取り以下、説明する。
【0057】
一般に、表示部203に表示された画像を拡大、縮小する手段として、マウスのホイールを使う場合がある。ホイールの場合、連続して上下に回転するため、短時間の間に、連続して拡大、縮小の倍率が入力され、これに応じて、連続して拡大画像や縮小画像をサーバ装置に対して要求することになる。
【0058】
例えば複数の画像がサムネイル表示されており、これら複数のサムネイル画像の中から1枚を選択してその画像の詳細な画像を表示、すなわち拡大表示する場合には、上述の通りホイールを回転させて表示画像を拡大させる。本実施形態ではホイールの回転により連続的に2回の拡大表示が要求された場合を説明する。
【0059】
この場合、サムネイル画像を指示すると、指示したサムネイル画像が所定の解像度の画像として表示部203に1枚表示される。この段階で表示される画像の解像度レベルを「0」とする。ここで、ホイールの回転により1回目の拡大操作が入力されたとすると、表示部203は1つ上の解像度レベル、即ち解像度レベル「1」の画像が表示されるよう、サーバ装置に対して解像度レベル「1」の画像を表示するための画像符号化データを送信する要求(コマンド)を送信する。更にホイールの回転により2回目の拡大操作が入力されたとすると、表示部203に更に1つ上の解像度レベル、即ち解像度レベル「2」の画像が表示されるよう、サーバ装置に対して解像度レベル「2」の画像を表示するための画像符号化データを送信する要求(コマンド)を送信する。
【0060】
図9は、この場合にサーバ装置と端末装置との間でのコマンド送信、レスポンス返信のシーケンスを示す図である。本実施形態では例として、1度に要求するパケットのバイト数を128バイトとする。
【0061】
図中900はサーバ装置、901は端末装置を示す。まず端末装置901において解像度レベル「1」の画像を表示するために必要な画像符号化データ(パケット)を要求するためのコマンド902をパケット要求1としてサーバ装置900に送信する。コマンド902の詳細を同図の下部に示す。
【0062】
コマンド902は端末装置901の表示部に現在表示している画像(サムネイル画像を指示することで表示される解像度レベル「0」の画像)の解像度レベルより1つ上の解像度レベルの画像の画像符号化データをサーバ装置に要求するためのコマンドで、図6に示した各符号化データにおいて、レイヤ番号0、解像度番号1、コンポーネント番号0、ポジション番号0の符号データの先頭から最大128バイトを要求するコマンドである。サーバ装置900は後者の画像符号化データをレスポンスとして端末装置901に返信する。このレスポンスが図9におけるレスポンス1として示されている。
【0063】
レスポンス1、即ちパケットの詳細を同図の下部に示す。レイヤ番号0、解像度番号1、コンポーネント番号0の画像符号化データのデータサイズは図6に示すとおり96バイトであり、最大で128バイトの要求であったため、今回の要求であるパケットデータは、最大バイト数よりも小さいため1回の要求で要求されたパケットデータを全て送信することができる。そのため、96(今回送信したデータサイズ)/0(後送信すべきデータサイズ)を示す情報もレスポンス1として端末装置901に送信する。
【0064】
端末装置901はこの画像符号化データを受信すると、CPU201による制御の下でRAM205にキャッシュすると共に、JPEG2000デコーダによりデコードし、デコード結果である解像度レベル1の画像を表示部203に表示する。また上記96/0の情報をも受信しているので、CPU201はこの情報を参照することで、今回受信したパケットは完全なパケット(要求に対する全てのパケット)であると判断することができ、解像度レベル「1」に画像を表示するための処理を終了することが出来る。
【0065】
次にCPU201は解像度レベル「2」の画像を表示するために必要な画像符号化データをサーバ装置900に要求するためのコマンド904をパケット要求2としてサーバ装置900に送信する。コマンド904の詳細を同図の下部に示す。
【0066】
コマンド904は端末装置901の表示部に現在表示している画像(解像度レベル「1」の画像)の解像度レベルより1つ上の解像度レベルの画像の画像符号化データをサーバ装置に要求するためのコマンドで、図6に示した各符号化データにおいて、レイヤ番号0、解像度番号2、コンポーネント番号0、ポジション番号0の符号データの先頭から最大128バイトを要求するコマンドである。
【0067】
サーバ装置900はこの要求に対応する画像符号化データをレスポンスとして端末装置901に返信する。このレスポンスが図9におけるレスポンス2として示されている。
【0068】
レスポンス2、即ちパケットの詳細を同図の下部に示す。レイヤ番号0、解像度番号2、コンポーネント番号0の画像符号化データのデータサイズは図6に示すとおり384バイトであり、あとサーバ装置900が端末装置901に送信すべき画像符号化データのサイズは256バイトとなる。そこでレスポンス2として128(今回送信したデータサイズ)/256(後送信すべきデータサイズ)を示す情報をもレスポンス2として端末装置901に送信する。よってこの情報を受信した端末装置901は、更に受信すべき画像符号化データがあると判断し、特に端末装置901のユーザからの入力がなければ、次の128バイトの画像符号化データを送信するよう、サーバ装置900に対してコマンドを送信する(パケット要求3)。
【0069】
また端末装置901は画像符号化データを受信すると、CPU201による制御の下でRAM205にキャッシュすると共に、JPEG2000デコーダによりデコードする。ここでまた受信していない部分のデータとしてはこの部分に相当するDWT(離散ウェーブレット変換)を0として公知のJPEG2000に従ったデコード処理を行い、デコード結果である解像度レベル2の画像を表示部203に表示する。
【0070】
なお、上述のステップS81で用いるコマンド仕様は以下の通りである。
【0071】
packet要求コマンド Tile/Reso/Layer/Compo番号
このコマンドの中で「Tile/Layer/Compo番号」は、要求するパケットを特定するためのTile番号、Resolution番号、Layer番号、Component番号を示す。このコマンドは、指定したパケットのデータを1回でサーバ装置から端末装置に転送させるためのコマンドである。
【0072】
なお、本実施形態ではレスポンスとしてサーバ装置から端末装置が受信する画像符号化データは指定されたもののみであったが、サーバ装置が端末装置に送信するパケットのデータサイズが、最大送信サイズ以下で事足りる場合には、その差分(最大送信データサイズ−送信したパケットのデータサイズ)として他のデータを送信しても良い。
【0073】
例えば図9に示した通信を例に取ると、解像度レベル1の画像符号化データのサイズは96バイトであるが、端末装置は最大128バイト受信可能であるので、この時点で後32バイト分のデータをサーバ装置は端末装置に対して送信可能である。そこでサーバ装置は96バイトの画像符号化データを端末装置に対して送信すると共に、残りの32バイト分を次の解像度レベル(解像度レベル2)の画像符号化データを送信しても良い。このようにすることで、毎回の通信に無駄が無くデータを送信することが出来る。
【0074】
また本実施形態では、パケットデータ要求コマンドは、通常のパケットデータ要求コマンドとは別の、「部分的なパケット要求コマンド」で説明したが、これに限るものではなく、コマンドとしては同一で、パラメータの数で判断することも可能である。
【0075】
また上記説明では1度に転送するパケットのバイト数を128バイトとしたが、これに限るものではない。
【0076】
次に、キャッシュ管理をするためのテーブルのデータ構造を図10を用いて説明する。同図のテーブルは端末装置のRAM205上に形成されるものである。同図のテーブルはタイル毎に存在するものであるが、本実施形態では画像はタイル分割されていないので、同図のテーブルは1つのみ存在することになる。
【0077】
同図に示すテーブルの中には、受信したパケットの数を格納する領域1001や、各パケットのデータを格納する領域1002が存在する。各パケットの個数(同図ではN)が領域1001に格納されている。更に領域1002において1つのパケット管理テーブルには領域1003乃至1005が存在する。領域1003はパケットの全バイト数を管理するフィールドであり、まだ1度もこのパケットを要求していない場合は「−1」、1度でも要求すると、そのパケットの全バイト数が入る。よって領域1003には「−1」(未要求)、「0」(元々Zero length packet)、「0以上の値」(パケットの全バイト数)の何れかの値が格納されていることになる。
【0078】
よって、キャッシュした夫々のパケットからJPEG2000の画像符号化データを作成する場合には、この領域1003には「−1」や、「0」の時、zero length packetのコードを入れる。次に領域1004は、現在キャッシュしているパケットデータの実際のバイト数であり、通常のパケット要求コマンドで要求した場合は、領域1003に記録されたバイト数と領域1004に記録されたバイト数とは一致することになる。しかし部分的なパケット要求コマンドを発行した場合は、一致しないことがある。領域1005は実際のパケットデータのRAM205におけるアドレスを格納する。1006は対応するパケットデータである。
【0079】
このような管理テーブルを用いて、CPU201がユーザからの要求から必要なパケットを計算した時に、キャッシュ上にデータがあるか否かを判断し、コマンドを発行するかどうかを判断する処理のフローチャートを図11に示す。
【0080】
ステップS1100では、図10に示す領域1003に格納されている値が「0」未満であるか否かをチェックする。「0」未満の場合は処理をステップS1104に進め、ユーザの要求から判断に基づいて「部分的なパケット要求コマンド」、「通常のパケット要求コマンド」の何れかのコマンドを発行、送信する。一方ステップS1100で「0」以上である場合には処理をステップS1101に進め、領域1003に記録されたバイト数と、領域1004に記録されたバイト数とを比較し、同じであるか否かを判断する。同じである場合には、これ以上受信すべきパケットデータがないものと判断できるので(言い換えれば、必要なパケットデータは全てRAM205上に格納されているので)、コマンドを発行しないようにする。一方ステップS1101における判断処理において、同じでないと判断された場合には処理をステップS1103に進め、「部分的なパケット要求コマンド」をサーバ装置に対して送信する。
【0081】
以上の説明により、「通常のパケット要求」のためのコマンドと「部分的なパケット要求」のためのコマンドとをユーザからの要求に応じて切り替えることにより、各ユーザの要求に最適な画像表示を行うことができる。
【0082】
[第2の実施形態]
本実施形態では、端末装置において表示部203に表示された画像の拡大表示時に表示ウィンドウサイズより大きい画像をパンニングしながら表示する場合について説明する。この場合も第1の実施形態における拡大表示と同様に、ユーザは連続的に表示領域をパンニングし、希望する位置の画像を表示することになる。このときの動作の基本は、第1の実施形態と同じであるため、この説明は割愛する。
【0083】
そして、ユーザの操作の連続性を判断して、「部分的なパケット要求コマンド」において1度に転送するバイト数を動的に決定する方法を説明する。この処理のフローチャートを図12に示す。またこのフローチャートに従った処理はCPU201により行われるものとする。
【0084】
ステップS1201では、まず1つ目のユーザからの操作入力(操作入力1)を検知し、検知した操作に対するIIPのコマンドを決めると共に、そのときの時刻をCPU201内部の不図示のタイマにより求め、RAM205に保存する。次にステップS1202では、2つ目のユーザからの操作入力(操作入力2)を検知し、検知した操作に対するIIPのコマンドを決めると共に、そのときの時刻をCPU201内部の不図示のタイマにより求め、RAM205に保存する。そしてステップS1203では、ステップS1201,S1202で求めた夫々の時刻の差分を求め、求めた差分時間が所定の時間内を示すものであるか否かを求める。これは操作入力1と操作入力2とが連続してなされたものであるかを判断する処理である。なお、連続して操作が行われたか否かを判断するための処理は第1の実施形態で説明した方法を本実施形態に適用しても良いし、同図に示した処理方法を第1の実施形態に適用しても良い。
【0085】
そして所定の時間内に操作入力1と操作入力2とが連続してなされたものであると判断された場合には処理をステップS1204に進め、操作入力1と操作入力2とが同じ操作入力であるか否かを判断する。同じ操作入力である場合とは、例えばマウスのホイールを連続して回転させた場合であって、この場合には所定に時間内に同じ操作入力がなされる。よって同じ操作入力がなされた場合には処理をステップS1205に進め、ステップS1203で求めた差分時間に応じた、部分パケット要求コマンドを送信する際に要求するパケットのバイト数を決定する。これは例えば予め所定のバイト数を決めておき、差分時間が長ければ長いほど、そのバイト数を比例させて大きくするように決定しても良い。
【0086】
そしてステップS1206では、決定したバイト数と共に、要求する画像符号化データを指定するコマンドを部分パケット要求コマンドとしてサーバ装置に対して送信する。
【0087】
このような「部分的なパケット要求」は、画像のサムネイルを表示するときにも利用できる。例えば、1度に表示するサムネイル(すなわち画像)の枚数がいくら多くなろうとも、ある一定時間内で、全サムネイルを表示することを保証することが可能になる。これを実現する場合は、全サムネイル表示用に受信するバイト数を予め決めておき、このバイト数を枚数で割った値を各画像データを要求するコマンドの最大バイト数にすることで可能である。
【0088】
あるいは、サーバ装置に格納されているJPEG2000の画像符号化データに対して、画像符号化データが格納されている外部記憶装置内における位置と読み出すバイト数を部分パケット要求コマンドとして指定しても良い。
【0089】
また論理的な単位は、JPEG2000のパケットで説明したが、その他の単位、例えばタイル、プリシンクトあるいは、code-blockなどでも良いことは容易に推察できる。
【0090】
[第3の実施形態]
上記実施形態における端末装置からサーバ装置に対して要求する画像の解像度は例えばマウスのホイールを用いて表示部において拡大縮小などを行う場合に、マウスのホイールにより入力される指示に基づいたものであるが、他にも例えば、端末装置の外部記憶装置にプリンタ208のドライバをインストールしておき、ウェブブウザ上で表示される画像をプリンタ208を用いてプリントする場合、プリンタ208がプリント可能な解像度をプリンタドライバから取得し、取得した解像度の画像符号化データをサーバ装置に対して要求しても良い。
【0091】
またプリント可能な解像度が複数種存在する場合には、表示部にその一覧を表示し、ユーザにより選択しても良い。
【0092】
[第4の実施形態]
サーバ装置が保持する画像符号化データのうち端末装置から指示された画像符号化データにおいて、端末装置からの指示に応じた所望の解像度の画像を形成するために必要となるパケット群(部分画像符号化データ)を受信する場合、本実施形態では、指示された画像符号化データにおいて既に受信した部分画像符号化データのサイズ、受信対象外の部分画像符号化データのサイズ、そして今回受信する部分画像符号化データのサイズとを用いた比較結果に応じて、その受信形態を異ならせるよう制御するものである。以下、本実施形態における端末装置、サーバ装置が行う処理について説明する。
【0093】
なお本実施形態におけるサーバ装置、端末装置により構成されるシステムの形態、及びそれらの装置の構成については第1の実施形態と同じであるのでその説明を省略する。また本実施形態においてもサーバ装置が保持する画像符号化データはJPEG2000に従ってエンコードされたものであるので、その構成については第1の実施形態で説明したような、図3、4、6に示した内容に従ったものである。また本実施形態におけるサーバ装置と端末装置とのパケット単位でのリクエスト及びレスポンスについても第1の実施形態と同様に図5に示すとおりである。
【0094】
また本実施形態の端末装置102a(端末装置102bも同様)におけるウェブブウザは、第3の実施形態に様に、サーバ装置101(サーバ装置103でも良い)に対して要求したJPEG2000ファイルのデコード結果を表示部203だけでなく、プリンタ208にも出力する処理を行う。同処理はウェブブウザのプログラムをCPU201が実行することで行われるものである。よって本実施形態におけるCPU201が行うメインの処理のフローチャートは図7に示したものに加えて、デコード結果をプリンタ208に出力する指示をユーザが入力した場合には、第3の実施形態で説明したように、プリンタドライバからプリント可能な解像度を取得し、この解像度に従った画像符号化データの受信要求をサーバ装置に対して送信する。そして受信した画像符号化データをデコードし、デコード結果をプリンタ208に出力する。また本実施形態ではステップS4において部分画像符号化データを受信するので、ステップS5における処理は省く。
【0095】
上述の通り、本実施形態では受信形態を、端末装置から指示した画像符号化データのサイズと今回受信するデータのサイズとの比較結果に応じて異ならせるよう、制御を行う。よってこの比較結果に応じて当然発行するコマンドも異なる。以下ではこの比較結果に応じたコマンドの発行処理について、同処理のフローチャートを示す図13を用いて説明する。なお本実施形態では、端末装置が所望の解像度の画像を得るために、予め指示した画像符号化データにおいて、「Layer0/Reso0/Comp0/Pos0」のパケットと、「Layer0/Reso1/Comp0/Pos0」のパケットとによる部分画像符号化データをサーバ装置に対して要求する場合について説明する。
【0096】
まずステップS1310で、サーバ装置101に対して行う要求が最初(1回目)のものであるかあるか否かを判断する。1回目であれば処理をステップS1311に進める。そしてステップS1311では上記指示した画像符号化データのサイズを送信するよう、サーバ装置101に対して要求を送信する。例えば図6に示した画像符号化データの場合、取得するサイズは「Layer0/Reso0/Comp0/Pos0」から「Layer1/Reso5/Comp0/Pos0」までの各パケットのサイズの総和で、その総和は65536バイトとなる。
【0097】
この総和サイズを取得する、もしくはステップS1310においてサーバ装置101に対して要求するのが最初ではないと判断された場合には、次にステップS1312においてRAM205に既にキャッシュされている部分画像符号化データのサイズの総和を求める。
【0098】
次にステップS1313では、今回端末装置102aがサーバ装置101に対して要求する部分画像符号化データ(「Layer0/Reso0/Comp0/Pos0」のパケットと「Layer0/Reso1/Comp0/Pos0」のパケット)のサイズの総和を送信するよう、サーバ装置101に対して要求を送信する。本実施形態ではいずれのパケットのサイズも32バイトであるので、その総和は64バイトとなる。そしてこの総和をサーバ装置101から受信すると、次にステップS1314において、発行するコマンドを決定する。その決定方法について説明する。
【0099】
この決定方法としては本実施形態では、「既に受信した部分画像符号化データのサイズの総和+受信していない部分画像符号化データのサイズ」と「今回要求する部分画像符号化データのサイズの総和」との比較を行い、前者≧後者(等号はなくても良い)の場合には、サーバ装置からパケット単位で部分画像符号化データを受信するためにサーバ装置に対して送信するコマンドを発行する。一方、前者<後者(等号がついていても良い)の場合には、サーバ装置から1回で要求する全てのパケット(すなわち要求する部分画像符号化データ)を受信するためにサーバ装置に対して送信するコマンドを発行する(ステップS1316における処理)。
【0100】
例えば今回が初めてのサーバ装置に対しての部分画像符号化データの要求である場合、今回要求する部分画像符号化データのサイズの総和は64バイト、既に受信した部分画像符号化データのサイズの総和は0バイト、そして受信していない部分画像符号化データのサイズの総和は(指示した画像符号化データ全体のサイズ)−(既に受信した部分画像符号化データのサイズ+今回要求する部分画像符号化データのサイズ)であるので65536−(64+0)=65472となる。よって65472>64となるので、ステップS1315ではパケット単位で部分画像符号化データを受信するためにサーバ装置に対して送信するコマンドを発行する。
【0101】
そしてステップS1315,S1316のいずれの場合においても、夫々の受信形態に従って要求した部分画像符号化データを受信する。
【0102】
以上の処理により、所望の解像度の画像を得るための画像符号化データ(部分画像符号化データ)を受信することが出来るので、以降は第1の実施形態と同様の処理を行うことで、所望の画質の画像を表示部203に表示させることが出来る。
【0103】
次に、第1の実施形態と同様の操作により、表示部203に表示された画像に対する拡大指示が入力された場合について説明する。なお拡大された画像を形成するためには上記JPEG2000ファイルにおいて、「Reso2」までのレベルの部分画像符号化データが必要であるとする。すなわち、「Layer0/Reso1/Comp0/Pos0」、「Layer1/Reso1/Comp0/Pos0」、「Layer0/Reso2/Comp0/Pos0」、「Layer1/Reso2/Comp0/Pos0」の各パケットが必要となる。
【0104】
この場合も同様に図7に示すフローチャートに従った処理が行われるので、当然、図13に示すフローチャートに従った処理も行われる。この場合、ステップS1310では端末装置102aからサーバ装置101に対して部分画像符号化データの要求は1回目ではないので、処理は直接ステップS1312に進む。
【0105】
そしてステップS1312では上述の通り受信済みの部分画像符号化データの総和のサイズを取得するが、これは1回目に取得した部分画像符号化データの総和のサイズであるので、96バイトとなる。次に、ステップS1313では要求するパケットの総和のサイズを取得するが、上記4パケットのサイズは夫々96バイト,96バイト,384バイト,384バイトであるので、その総和は960バイトとなる。次に、ステップS1314では上記の説明の通りの計算を行う。すると、
(64+64512)>960となり、「既に受信した部分画像符号化データのサイズの総和+受信していない部分画像符号化データのサイズ」>「今回要求する部分画像符号化データのサイズの総和」となるので、端末装置は、パケット単位で部分画像符号化データを受信するためにサーバ装置に対して送信するコマンドを発行する。
【0106】
以上の処理により、第1の実施形態と同様の操作により、表示部203に表示された画像に対する拡大指示が入力された場合であっても、その拡大画像を形成するための画像符号化データをサーバ装置から受信することができるので、受信した画像符号化データをデコードすることで得られる画像を表示部203に表示させることができる。
【0107】
この状態で更にユーザから表示部203に表示されている画像を所定のサイズ、例として4096画素×4096画素の画像としてプリンタ208を用いてプリントする指示が入力された場合について説明する。4096画素×4096画素のサイズの画像を形成するために必要となる部分画像符号化データは「Layer0/Reso3/Comp0/Pos0」、「Layer1/Reso3/Comp0/Pos0」、「Layer0/Reso4/Comp0/Pos0」、「Layer1/Reso4/Comp0/Pos0」、「Layer0/Reso5/Comp0/Pos0」、「Layer1/Reso5/Comp0/Pos0」の各パケットが必要となる。
【0108】
この場合も同様に図7に示すフローチャートに従った処理が行われるので、当然、図13に示すフローチャートに従った処理も行われる。この場合、ステップS1310では端末装置102aからサーバ装置101に対して部分画像符号化データの要求は1回目ではないので、処理は直接ステップS1312に進む。
【0109】
そしてステップS1312では上述の通り受信済みの部分画像符号化データの総和のサイズを取得するが、これは1回目、そして2回目に取得した部分画像符号化データの総和のサイズであるので、1056バイトとなる。次に、ステップS1313では要求するパケットの総和のサイズを取得する。その総和は64512バイトとなる。次に、ステップS1314では上記の説明の通りの計算を行う。すると、
(1056+0)<64512となり、「既に受信した部分画像符号化データのサイズの総和+受信していない部分画像符号化データのサイズ」<「今回要求する部分画像符号化データのサイズの総和」となるので、端末装置は、サーバ装置に管理されている符号化データ全部、言い換えるとファイル全体を送信するコマンドを発行する。
【0110】
以上の処理により、所定のサイズの画像をプリンタ208に出力したい場合であっても、所定のサイズの画像を形成するための画像符号化データをサーバ装置から受信することができるので、受信した画像符号化データをデコードし、プリンタドライバを介してプリンタ208に出力することで、所定サイズの画像をプリントすることができる。
【0111】
次に、本実施形態におけるステップS6の処理、すなわち、RAM205にキャッシュした部分画像符号化データからJPEG2000準拠のビットストリーム(画像符号化データ)を作成する処理について、同処理のフローチャートである図14を用いて以下説明する。
【0112】
まずステップS1400では、以上説明した処理により発行されたコマンドが、部分画像符号化データをパケット単位で受信要求するものであるのか否かを判断する。この判断の結果、パケット単位で部分画像符号化データを要求するコマンドである場合には処理をステップS1402に進め、RAM205にキャッシュしている各部分画像符号化データから1つのJPEG2000準拠のビットストリームを作成する。ステップS1402における処理の詳細については後述する。
【0113】
一方、ステップS1400における判断の結果、パケット単位で部分画像符号化データを要求するコマンドではない場合には処理をステップS1401に進め、この時点でRAM205にキャッシュされている全ての部分画像符号化データを削除すると共に、新たにユーザから指示が入力されてもこの指示に従った処理を行わないようにする。例えば、ステップS1400からステップS1402への処理の分岐を行わないようにする。
【0114】
次に、ステップS1402における処理の詳細について、同処理の詳細を示すフローチャートである図15を用いて説明する。まずRAM205にキャッシュしている各部分画像符号化データを参照して、ステップS900ではタイル数を、そしてステップS901ではパケット数をチェックし、夫々変数iTMax,iPMaxに代入する。次に、ステップS902でJPEG2000のMainヘッダを出力する。次にステップS903では、後述の処理で用いる変数iTを0に初期化する。次にステップS904では、Tileヘッダ(SOTマーカコード)を生成し、仮出力する。次にステップS905では後述の処理で用いる変数iPを、ステップS906では後述の処理に用いる変数iLを夫々0に初期化する。
【0115】
上記変数iPは各パケットを特定するためのインデックスとして用いる変数である。よって次にステップS907ではこの変数iPで表されるパケットがRAM205にキャッシュされているかをチェックする。このチェックの結果、変数iPで表されるパケットデータがRAM205にキャッシュ済み、すなわちサーバ装置から送信済みである場合には処理をステップS908に進め、変数iPに対応するパケットデータを出力し、ステップS909ではステップS908で出力したパケットデータのサイズを変数iLが保持する値に加算し、その結果を再度変数iLに記憶保持させる。
【0116】
一方、ステップS907におけるチェックの結果、変数iPで表されるパケットデータがRAM205にキャッシュ済みでない、すなわちサーバ装置から送信済みでない場合には処理をステップS910に進め、ZLP(Zero Length Packet)データを出力し、ステップS911では変数iLが保持する値に1を加算し、その結果を再度変数iLに記憶保持させる。そしてステップS912では変数iPが保持する値に1を加算し、その結果を再度変数iPに記憶保持させる。
【0117】
次にステップS913では上記変数iPと変数iPMaxとを比較する。本ステップにおける処理は1つのタイルに含まれる全てのパケットデータに対して処理を行ったか否かをチェックする処理である。
【0118】
そして変数iP<変数iPMaxの場合、すなわち1つのタイルに含まれる全てのパケットデータに対する処理が終了していない場合には処理をステップS906に戻し、以上の処理を行う。一方、変数iP≧変数iPMaxの場合、即ち1つのタイルに含まれる全てのパケットデータに対する処理が終了した場合には処理をステップS914に進め、タイル全体のデータ数を管理しているフィールドの値を変数iLから更新し、ステップS904で出力したSOTマーカコード内のタイルに含まれるパケットデータの数を出力する。
【0119】
次にステップS915では変数iTが保持する値に1を加算し、その結果を再度変数iTに記憶保持させる。変数iTは各タイルの数をカウントするための変数である。よってステップS916では、全てのタイルを処理したか否かをチェックする。全てのタイルを処理していなければ処理をステップS904に戻し、上記処理を行う。
【0120】
一方、全てのタイルを処理している場合には処理をステップS917に進め、JPEG2000準拠の符号化データを完成させるための公知の処理を行う。
例えばEOCマーカコードなどを出力する。
【0121】
以上の説明により、本実施形態によって、要求する部分画像符号化データのサイズが上記比較処理により比較的大きい場合には高速に受信することができ、円滑に部分画像符号化データを受信することが出来る。
【0122】
[第5の実施形態]
本実施形態では、ネットワークの使用状況に応じて、上記2つのコマンドのいずれを使用するのかを決定する。よって本実施形態における端末装置上で実行されるウェブブウザが行う、サーバ装置に対してJPEG2000ファイルの送信を要求し、要求したJPEG2000ファイルをデコードして表示部203に表示する処理は、ステップS4におけるコマンド発行処理のみが第4の実施形態とは異なる。
【0123】
図16は本実施形態におけるコマンド発行処理のフローチャートである。図13と同じステップには同じステップ番号を付けており、その説明を省略する。
【0124】
まずステップS1600において、ネットワークの利用状況を検知する。これは例えば公知の”ping”コマンドを例えば以下のようにして用いる。
【0125】
ping ホスト名(サーバ名)
これはこのコマンドを発行した装置からホスト名(サーバ名)で指定した装置までのネットワークを利用したタイムレスポンスを調べることができる。よって本実施形態では端末装置において、上記ホスト名にサーバ装置を指定した上記pingコマンドを用いることで、端末装置とサーバ装置との間のネットワークを利用したタイムレスポンスを調べることができる。このタイムレスポンスが一定時間以上を要するものであればこのネットワークは非常に混んでいる(多くの装置によって使用されている)と判断することができ、タイムレスポンスが一定時間以上要さないものであればこのネットワークはそれほど混んでいない(あまり多くの装置は使用していない)と判断することができる。よって、端末装置とサーバ装置との間のネットワークの使用状況が分かる。
【0126】
次にステップS1601において、上記調査によりネットワークが混んでいないと判断する場合、処理をステップS1316に進め、上記ステップS1316と同じ処理、ファイル全体の転送要求コマンドを発行する。
【0127】
一方、ステップS1601において、ネットワークが混んでいると判断された場合には、処理をステップS1315に進め、上記ステップS1315と同じ処理、パケット単位で部分画像符号化データを受信するためにサーバ装置に対して送信するコマンドを発行する。
【0128】
以上の処理により、ネットワークの使用状況、言い換えると混み具合に応じて部分画像符号化データの受信形態を異ならせることができる。これはすなわち、ネットワークがそれほど混んでいない場合にはファイル全体をサーバから受信し、逆にネットワークが混んでいる場合にはより短い時間で部分画像符号化データを受信できるようにパケット単位のコマンドを発行する。これによりより円滑に部分画像符号化データを受信することができる。
【0129】
[第6の実施形態]
第4の実施形態では端末装置は、これからサーバ装置に対して要求しようとする部分画像符号化データのサイズは、サーバ装置から送信してもらうことで知ることができた。本実施形態では、これからサーバ装置に対して要求しようとする部分画像符号化データのサイズを端末装置において推定する。
【0130】
図17はJPEG2000に従って符号化された画像符号化データにおける各解像度の符号化データを示す図である。一般に矩形1700、矩形1701a、1701b、1701c、矩形1702a、1702b、1702c、矩形1703a、1703b、1703cの4種類の矩形のそれぞれにはそれぞれ異なる解像度の画像の周波数成分を示すDWT係数が含まれている。
【0131】
例えば矩形1700内に含まれるDWT係数のみを用いて復号すると、最も低い解像度(解像度レベル0)の画像が復元される。更にこれに加えて矩形1701a、1701b、1701c内に含まれるDWT係数を復号することで、より高い解像度(解像度レベル1)の画像が復元される。更にこれに加えて矩形1702a、1702b、1702c内に含まれるDWT係数を復号することで、より高い解像度(解像度レベル2)の画像が復元される。更にこれに加えて矩形1703a、1703b、1703c内に含まれるDWT係数を復号することで、より高い解像度(解像度レベル3)の画像が復元される。
【0132】
ここで、一般にJPEG2000においてロスレスモードで画像を符号化した場合、矩形の面積比はそのまま矩形に含まれるDWT係数のデータ量の比に正比例している。例えば矩形1700、矩形1701a、矩形1701b、矩形1701cのそれぞれはすべて同じ面積であるので、矩形1700と矩形1701a、1701b、1701cとの面積比は1:3であって、矩形1700に含まれるDWT係数のデータ量と、矩形1701a、1701b、1701cに含まれるDWT係数のデータ量との比はほぼ1:3となる。
【0133】
また矩形1700と矩形1702a(1702b、1702c)との面積比は1:4となる。また矩形1700と矩形1703a(1703b、1703c)との面積比は1:8となる。
【0134】
JPEG2000に従った画像符号化データのパケットはDWT係数により構成されているので、各矩形に対応するパケットのサイズもまた、各矩形の面積比に正比例している。
【0135】
これを利用して、ロスレスモードで符号化された部分画像符号化データを要求する場合には、すでに受信している部分画像符号化データのデータ量から、これから要求する部分画像符号化データのデータ量や、ファイル全体のバイト数を推測することができる。例えばすでに解像度レベル0の部分画像符号化データを受信しているとする。すなわち図17において、矩形1770に対応する部分画像符号化データを受信しているとする。
【0136】
この部分画像符号化データのデータサイズを64バイトとすると、上記説明により、矩形1701a、1701b、1701cに対応する部分画像符号化データのサイズは64×3=192バイトとなる。また、矩形1702a、1702b、1702cに対応する画像符号化データのサイズは64×4×3=768バイトとなる。また、矩形1703a、1703b、1703cに対応する画像符号化データのサイズは64×4×4×3=3072バイトとなる。このようにして、各面積比は予め把握しておくことができるので、すでに受信している部分画像符号化データのデータサイズから、これから受信しようとするデータのサイズを推測することができる。
【0137】
以下ではウェブブラウザに表示されている複数の画像から1つを指示した場合に、指示した画像において端末装置から要求する部分画像符号化データのサイズ、及び指示した画像の画像符号化データのサイズの推測結果に応じて端末装置がコマンドを発行する処理について、同処理のフローチャートを示す図18を用いて説明する。同図のフローチャートに従った処理は上記ステップS4における処理のサブルーチンの処理を示すものである。なお図18に示す処理は、上記第4の実施形態におけるコマンド発行処理において、指示した画像において端末装置から要求するパケット群(所望の解像度の画像を得るために必要な部分画像符号化データを構成するパケット群)のサイズ、指示した画像の画像符号化データのサイズをサーバ装置から受信せずに、端末装置側で推測する以外は同じである。よって同図において図13と同じステップについては同じステップ番号を付けている。
【0138】
まず画像を1つ指示した時点で、指示した画像の解像度レベル0の部分画像符号化データはRAM205にすでにキャッシュされているので、ステップS1800ではこの部分画像符号化データのサイズから、指示した画像に対応する画像符号化データ全体のサイズを推定する。推定する方法については上述の通りである。
【0139】
次に、キャッシュされている解像度レベル0の部分画像符号化データのサイズを用いて、これから要求しようとする部分画像符号化データのサイズを推定する。そして推定した画像符号化データのサイズ、これから要求しようとする部分画像符号化データのサイズを用いると、受信していない部分画像符号化データのサイズを求めることができるので、これら3つのサイズに従ってステップS1314以降の処理を行う。ステップS1314以降の処理については上述の通りであるので、ここでの説明は省略する。
【0140】
なお、上述の、これから要求する部分画像符号化データのサイズをサーバ装置に要求することなく、端末装置側で推定する処理は上述の実施形態に適用しても良い。
【0141】
[第7の実施形態]
上記実施形態では、部分画像符号化データを要求する場合に、パケット単位で要求するコマンドと、部分画像符号化データ全体を一度に要求するためのコマンドを様々な状態に応じて使い分けてきた。
【0142】
本実施形態では、タイルに分割された画像の符号化データがタイル毎にサーバ装置に保持されている場合に、タイル単位で、パケット要求コマンドと、タイル全体の符号化データを要求するコマンドとを使い分ける。
【0143】
図19に、本実施形態におけるコマンド発行処理のフローチャートを示す。なお同図のフローチャートに従った処理は、上記ステップS4における処理のサブルーチンである。なお、図13,図18と同じステップについては同じステップ番号を付けており、その説明を省略する。
【0144】
まずステップS1900では、変数iTMaxにタイルの総数を代入すると共に、角田イルに対して付けられたインデックスを表す変数iTを0に初期化する。次にステップS1901では、変数iTをインデックスとするタイルが、ユーザから要求されたものであるか否かを判断する。要求されたタイルである場合には処理をステップS1904に進め、上記ステップS1800と同じ処理行う。ただしサイズを求める対象は受信済みのパケットのデータサイズではなく、受信済みの1つのタイルのデータサイズである。
【0145】
次に、ステップS1801と同じ処理を行う。すなわち、今回要求するパケットのサイズを求める。そしてステップS1314以降の処理、すなわち、第4の実施形態で説明したようなコマンド決定処理を行う、ただし、決定するコマンドは、部分画像符号化データを1回の送信で要求するコマンドを、1つのタイルを1回の要求で受信するためのコマンドと読み替える必要がある。また、パケット単位で要求するコマンドは、1つのタイルをパケット単位で受信するためのコマンドと読み替える必要がある。
【0146】
次に、本実施形態におけるステップS6の処理、すなわち、RAM205にキャッシュした符号化データからJPEG2000準拠のビットストリーム(画像符号化データ)を作成する処理について、同処理のフローチャートである図20を用いて以下説明する。尚、図14,図19と同じステップについては同じステップ番号を付けており、その説明を省略する。
【0147】
ステップS1400では、以上説明した処理により発行されたコマンドが、タイルをパケット単位で受信要求するものであるのか否かを判断する。この判断の結果、パケット単位で要求するコマンドである場合には処理をステップS2001に進め、RAM205にキャッシュしているタイルの符号化データから1つのJPEG2000準拠のビットストリームを作成する。ステップS2001における処理の詳細については後述する。
【0148】
一方、ステップS1400における判断の結果、パケット単位でタイルを要求するコマンドではない場合には処理をステップS1401に進め、この時点でRAM205にキャッシュされている全てのデータを削除すると共に、新たにユーザから指示が入力されてもこの指示に従った処理を行わないようにする。例えば、ステップS1400からステップS1402への処理の分岐を行わないようにする。そして次に、ステップS2002において、発行したコマンドに基づいてサーバ装置から受信したタイルのデータをそのまま作成すべきビットストリームとする。
【0149】
ステップS2001における処理のフローチャートは図21に示すとおりである。同図のフローチャートは、図15において、ステップS904からステップS914までの処理を示すものであって、その説明は上述の通りであるのでここでの説明を省略する。
【0150】
[他の実施形態]
本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0151】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0152】
また上記記憶媒体には、インターネットやLANなどのネットワークに使用される通信ケーブルなどの通信媒体が含まれる。すなわち、前述した実施形態のプログラムコードがネットワーク上のサーバ装置に保持されている場合には、このサーバ装置から上記ネットワークを介してコンピュータにダウンロードすることで、コンピュータにプログラムを導入することができる。よって、導入されたプログラムはコンピュータ上のCPUやMPUなどの制御回路により実行され、その結果、コンピュータは前述した実施形態に機能が実現されるわけであるから、前述した記憶媒体に上記ネットワークに使用される通信ケーブルなどの通信媒体が含まれることはいうまでもない。
【0166】
【発明の効果】
以上の説明により、本発明によって、複数の解像度の画像を有する符号化データの受信形態を、目的に応じて切り替える技術を提供することができ、これにより、より快適に画像符号化データの受信を行うことができる。
【図面の簡単な説明】
【図1】インターネットやLANに代表されるネットワーク上に複数のコンピュータが接続されている本発明の第1の実施形態におけるシステムの概略構成を示す図である。
【図2】サーバ装置101,103、端末装置102a,102bの基本構成を示すブロック図である。
【図3】 Layer-resolution level-component-position progressionに従って生成されたJPEG2000ファイルの概略構成を示す図である。
【図4】解像度(画像サイズ)とResolution番号との関係を示す図である。
【図5】パケット単位でのリクエスト及びレスポンスの概念図である。
【図6】本発明の第1の実施形態におけるサーバ装置101(もしくは103)に接続されたハードディスクに保持されているJPEG2000ファイルの構成の一例を示す図である。
【図7】端末装置102a(端末装置102bも同様)におけるウェブブウザが行う、サーバ装置101(サーバ装置103でも良い)に対してJPEG2000ファイルの送信を要求し、要求したJPEG2000ファイルをデコードして表示部203に表示する処理のフローチャートである。
【図8】ステップS3における処理の詳細を示すフローチャートである。
【図9】サーバ装置と端末装置との間でのコマンド送信、レスポンス返信のシーケンスを示す図である。
【図10】キャッシュ管理をするためのテーブルのデータ構造を示す図である。
【図11】CPU201がユーザからの要求から必要なパケットを計算した時に、キャッシュ上にデータがあるか否かを判断し、コマンドを発行するかどうかを判断する処理のフローチャートである。
【図12】ユーザの操作の連続性を判断して、「部分的なパケット要求コマンド」において1度に転送するバイト数を動的に決定する処理のフローチャートである。
【図13】端末装置から指示した画像符号化データのサイズと今回受信するデータのサイズとの比較結果に応じて発行するコマンドの発行処理のフローチャートである。
【図14】本発明の第4の実施形態におけるステップS6の処理のフローチャートである。
【図15】ステップS1402における処理の詳細を示すフローチャートである。
【図16】本発明の第5の実施形態におけるコマンド発行処理のフローチャートである。
【図17】JPEG2000に従って符号化された画像符号化データにおける各解像度の符号化データを示す図である。
【図18】ウェブブラウザに表示されている複数の画像から1つを指示した場合に、指示した画像において端末装置から要求する部分画像符号化データのサイズ、及び指示した画像の画像符号化データのサイズの推測結果に応じて端末装置がコマンドを発行する処理のフローチャートである。
【図19】本発明の第7の実施形態におけるコマンド発行処理のフローチャートである。
【図20】本発明の第7の実施形態におけるステップS6の処理のフローチャートである。
【図21】ステップS2001における処理のフローチャートである。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for receiving instructed image encoded data from a server apparatus that holds image encoded data having scalability, and creating the received image encoded data in one image file.
[0002]
[Prior art]
On the Internet, browsing a document data or image data by accessing a WWW server using a Web browser is actively performed. This system includes a WWW server that publishes information on the Internet, and a client device (terminal device) that browses the information. A web browser is executed on each terminal device, and the user of each terminal device uses this web browser. Can be used to browse information published by the WWW server. In this WWW server, a file describing information to be disclosed, called a home page, is stored in HTML. As described above, the user of the terminal device accesses the display using the web browser to display the display device of the terminal device. The contents expressed by the file can be displayed on the screen.
[0003]
Further, by using a web browser on the terminal device side, it is possible to follow links in the page displayed on the display screen of the display device, thereby obtaining necessary information. Furthermore, in order to download a file managed by a WWW server to a terminal device, it is common to use File Transfer Protocol (hereinafter abbreviated as FTP). FTP is a technique for transferring files managed by a WWW server to a terminal device at once through a network.
[0004]
In addition, the above file includes an image file, which is used to access the image file managed by the WWW server in a plurality of times from the terminal device and display the contents (image) of the accessed image file on the display device. There is Flashpix / IIP as a protocol to perform. This IIP is an optimal protocol for the format of the image data file called Flashpix, and when accessing image data in multiple times, one access unit is performed in units of tiles of this Flashpix. is there.
[0005]
Here, consider the case where this IIP is applied to JPEG2000 as it is. In JPEG2000, in each encoded data having scalability, each encoded data is composed of difference data from the scalability data one level lower than the scalability of the encoded data. The WWW server holds the encoded data according to JPEG2000, and the encoded data is accessed in multiple times from the terminal device using a web browser, and received for each scalability encoded data. When the decoding device is decoded and the decoding result is displayed on the display device, the terminal device caches the received encoded data of each scalability in the memory, and when all the encoded data is received, the terminal device decodes all the encoded data. There is a method of decoding the data, and a method of decoding each encoded data, and a method of decoding newly received encoded data from the previous continuation.
[0006]
In view of such a situation, various methods have been conventionally proposed as a method for extracting only necessary part of data from encoded image data having multi-resolution and converting it into other encoded data (for example, (See Patent Document 1). Conventionally, as this type of technology, source image data is encoded using an encoding method for managing multi-resolution data such as wavelet transform. Then, the encoded data (partial encoded data) corresponding to the spatial area selected by the client is extracted from the encoded data (original encoded data) as the source, and is converted into one independent encoded data. To convert. At this time, the partial encoded data extracted from the so-original encoded data corresponds to the JPEG2000 code block, and corresponds to the partial encoded data from all the sub-bands of all the partial encoded data. Alternatively, it includes all related encoded data.
[0007]
As another conventional technique, the source image data is image data having multi-resolution data, and mediating means for determining a trade-off between image quality and data amount between the server and the terminal device Finally, the amount of data to be transferred is determined on the server side, and the server transfers data to the terminal device up to the data amount determined by the arbitration and the logical code data unit. Yes (see, for example, Patent Document 2).
[0008]
[Patent Document 1]
US Pat. No. 6,041,143 ("MULTIRESOLUTION COMPRESSED IMAGE MANAGEMENT SYSTEM AND METHOD")
[Patent Document 2]
US Pat. No. 5,764,235 (“COMPUTER IMPLEMENTED METHOD AND SYSTEM FOR TRANSMITTING GRAPHICAL IMAGES FROM SERVER TO CLIENT AT USER SELECTABLE RESOLUTION”)
[0009]
[Problems to be solved by the invention]
The coded data of each scalability received by the terminal device is cached in the memory, and when all the coded data is received, all the coded data is sent to the decoder, and when decoding, it is sent from the server side. It is possible to regenerate the encoded data of each scalability directly into one encoded data file compliant with JPEG2000.
[0010]
However, since each encoded data sent from the server side is sent in the order requested from the terminal device side, the encoded data received by the terminal device should be converted into one piece of encoded data compliant with JPEG2000. However, there is a problem that the processing on the terminal device side becomes complicated and expensive.
[0011]
It is also possible to configure each encoded data sent from the server as a cache file of a unique format, and the JPEG2000 decoder on the terminal device side can directly read this cache file. In this case, the JPEG2000 decoder Therefore, a process for reading this unique cache file is required. For this reason, there are problems that the processing becomes complicated and that a general-purpose JPEG2000 decoder cannot be used.
[0012]
Therefore, JPEG2000 images are received in packet units, and the packet data is cached. Then, when passing data to the decoder, zero length packet (hereinafter abbreviated as ZLP) data is inserted into the packet data portion that has not yet been received, and a single file is created together with the already received packet data. Thus, there is a method of creating a JPEG2000 file that can be processed by a general JPEG2000 decoder without performing complicated processing such as rewriting of the main header.
[0013]
In addition, when a command indicating a request for transmitting image encoded data from the terminal device to the server indicates only a logical unit of a file held by the server, a request is issued to the server. Otherwise, the size of the encoded image data to be transferred cannot be determined. As a result, the time for transferring the encoded image data to the terminal device does not take longer than the time expected on the terminal device side, and when real-time performance is required for the transfer, for example, an image with a large image size in the terminal device. On the other hand, it is not suitable when an operation such as panning at high speed is performed and image encoded data corresponding to the panning is received from the server.
[0014]
Furthermore, the above-described conventional technology has the following problems. In other words, even when a terminal device has already received some partial image encoded data among certain image encoded data, every time a request is transmitted from the terminal device to the server, the server sends a request to the terminal device. Thus, encoded data of all code blocks of all layers is sent. That is, the server transmits even encoded data that has already been received by the terminal device. Furthermore, the header portion of the encoded data to be transmitted is rewritten with the information (image size, hierarchy information, etc.) of the requested image data, and the encoded data information originally managed by the server cannot be taken. .
[0015]
In addition to the above-described problems, the other prior art described above may not be able to display / print the image quality requested by the user due to the trade-off between image quality and quantity. In addition, there is a problem that communication costs are increased due to arbitration between the server and the terminal device, the server processing increases, the load on the server increases, and it takes time from the user request to display.
[0016]
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 switching the reception mode of encoded data having images of a plurality of resolutions according to the purpose.
[0017]
[Means for Solving the Problems]
In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement.
[0018]
That is, an image processing apparatus that receives instructed encoded image data from a server apparatus that stores encoded image data having scalability.
An input means for accepting an input operation from a user;
A determination means for determining whether the processing corresponding to the input operation should be performed at high speed or not necessary according to the type of the input operation;
As a result of the determination, if it is determined that it is not necessary to perform at high speed, among the instructed image encoded data, partial image encoded data necessary for forming an image of a desired level by decoding A first command to be sent to the server device in order to receive it in a single reception process, to the server device,
As a result of the determination, if it is determined that it should be performed at high speed, the position information of the partial image encoded data in the instructed image encoded data, and the size of data received at one time from the server device, Transmitting means for transmitting a second command including the server command to the server device;
Output means for receiving and decoding image encoded data transmitted from the server apparatus according to the command transmitted by the transmission means, and outputting a decoding result to the output apparatus.
When the transmission means transmits the second command to the server device, the output means further includes the size of the received data and the data not yet received among the partial image encoded data to be received. Receive information indicating the size of the
When the output unit receives the information, the transmission unit receives a command for receiving, from the server device, data that has not been received from the partial image encoded data for each preset unit. The second command is transmitted to the server device.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
Preferred embodiments of the present invention will be described below in detail with reference to the accompanying drawings. The present invention relates to a method for recreating fragmented image data received by a terminal device from a server device via a network into one image file. In particular, JPEG2000 encoded data (hereinafter, simply referred to as image encoded data) compliant with ISO / IEC-15444 is transmitted from a server device to a fragmented area of image encoded data using the Internet Imaging Protocol (IIP), Alternatively, the present invention can be implemented in a client terminal device (hereinafter simply referred to as a terminal device) that receives fragmented image encoded data and caches the fragmented image encoded data by a unique method. It is.
[0020]
Furthermore, the present invention provides a piece of JPEG2000-compliant encoded data from cache data of fragmented image encoded data received on the terminal device side in response to a display request requested by an application program executed in the terminal device. Generate a file.
[0021]
[First Embodiment]
FIG. 1 is a diagram showing a schematic configuration of a system in the present embodiment in which a plurality of computers are connected on a network represented by the Internet or a LAN.
[0022]
In FIG. 1, reference numeral 100 denotes a network represented by the Internet or a LAN. Reference numerals 101 and 103 denote server apparatuses, which hold and execute software necessary for the JPEG2000 IIP server function and WWW server function for transmitting image data, respectively. The servers 101 and 103 are connected to large-capacity hard disks 101a and 103a, respectively, and a large amount of image data is also stored on the hard disks. Reference numerals 102a and 102b denote client side terminal devices that hold software such as a web browser and a JPEG2000 decoder, and can execute them as necessary. Although two server devices and two terminal devices are shown in the figure, the number of server devices and terminal devices constituting the system in the present embodiment is not limited to this.
[0023]
FIG. 2 is a block diagram showing the basic configuration of the server apparatuses 101 and 103 and the terminal apparatuses 102a and 102b. Note that the server device and the terminal device basically have the same configuration, but there are also portions where the processing performed by each component is different.
[0024]
In FIG. 2, a CPU 201 controls the entire apparatus using programs and data stored in the ROM 204 and RAM 205, and performs processing related to transmission / reception of image encoded data, which will be described later. If the configuration shown in FIG. 9 is that of the server device, the CPU 201 performs processing related to transmission of encoded image data. If the configuration shown in FIG. 9 is that of the terminal device, the CPU 201 receives image encoded data. Such processing is performed. Also, processing is performed in accordance with instructions input from the keyboard 202 and mouse 202a.
[0025]
Reference numerals 202 and 202a denote a keyboard and a mouse, which are used as pointing devices, respectively, and can input various instructions (various data, commands, etc.) to the CPU 201. A display unit 203 includes a CRT, a liquid crystal screen, and the like, and can display various information such as images and characters. If the configuration shown in FIG. 6 is that of the server device, for example, system information of the server device, a reception status of a request for encoded image data, and the like are displayed. If the configuration shown in the figure is a terminal device, for example, a GUI for selecting requested image encoded data, a result of decoding the received image encoded data, and the like are displayed.
[0026]
Reference numeral 204 denotes a ROM which holds programs and data for controlling the apparatus. A RAM 205 includes an area for temporarily storing programs and data loaded from the hard disk 206 and the storage medium drive 207, and also includes a work area necessary for the CPU 201 to perform various processes. A hard disk 206 stores an OS (Operating System) and processing programs and data related to transmission / reception of image encoded data described later.
[0027]
In the case where the hard disk 206 is of the server device, the hard disk 206 has a program and data for the CPU 201 to execute processing related to transmission of encoded image data, an IIP server function, and a WWW server function. A program and data to be executed, for example, homepage data that can be browsed by a user of a terminal device using a web browser, encoded data of a plurality of images to be browsed, and the like are held. If the configuration shown in FIG. 10 is that of the server device, the hard disk 206 corresponds to 101a and 101b in FIG.
[0028]
When the configuration shown in FIG. 5 is that of a terminal device, the hard disk 206 is a program or data for the CPU 201 to execute processing related to reception of encoded image data, a web browser program or data, or a JPEG2000 decoder program. And keep data.
[0029]
A storage medium drive 207 reads a program or data stored in a storage medium such as a CD-ROM or DVD-ROM, and outputs the read program or data to the RAM 205 or the hard disk 206. Note that some or all of the above-described programs and data stored and held in the hard disk 206 may be stored and held in a storage medium and read as necessary. Reference numeral 208 denotes a printer. Reference numeral 209 denotes a network interface for connecting the network 100 shown in FIG. 1 and the present apparatus, and various data can be transmitted / received via the network interface 209.
[0030]
If the configuration of FIG. 5 is that of the server device, a request for transmission of image encoded data from the terminal device is received via the network interface 209, or part of the image encoded data according to the request, Or send everything. If the configuration shown in FIG. 6 is that of a terminal device, a request for transmitting image encoded data is transmitted to the server device via the network interface 209, or image encoding in response to a request from the server device. Receive some or all of the data.
[0031]
In this embodiment, a plurality of pieces of image data compressed and encoded according to JPEG2000 are stored and held in the hard disk 206 of the server device or a storage medium (not shown) (readable by the storage medium drive 207 of the server device). When a request for transmitting one piece of image encoded data is received from the hard disk 206, the target image encoded data can be read from the hard disk 206 and transmitted to the terminal device.
[0032]
In addition, the terminal device can request only a necessary part in the JPEG2000 file to the server device using the IPEG for JPEG2000 using the image display / print application, and in response to the request from the server device in a fragmentary manner. Receive the encoded image data. The received fragmented image encoded data is stored (cached) in the RAM 205 or the hard disk 206 of the terminal device. Then, the terminal device converts the fragmented image encoded data cached in the hard disk 206 into JPEG 2000-compliant image encoded data to be passed to the JPEG 2000 decoder.
[0033]
Next, processing performed by each of the server device and the terminal device when a desired image encoded data is requested from the terminal device to the server device in the system having the above configuration will be described.
[0034]
That is, in the following, the users of the terminal apparatuses 102a and 102b shown in FIG. 1 access either the server apparatus 101 or 103 using the above-described web browser, and display a home page for browsing images on the display unit 203. . Then, by instructing one image using the keyboard 202 or the mouse 202 on the home page for the user to browse the image, the terminal device follows the encoded data of the instructed image transmitted from the server device, that is, JPEG2000. The compression-encoded image encoded data is cached in the RAM 205 in pieces (dividing the image encoded data into a plurality of times). A process performed by each of the server device and the terminal device in the process of creating, decoding, and displaying one bit stream from the cache data will be described.
[0035]
Next, a general JPEG2000 file will be described with reference to FIG. FIG. 3 is a diagram showing a schematic configuration of a JPEG2000 file generated according to Layer-resolution level-component-position progression (hereinafter referred to as SNR Progression).
[0036]
The JPEG2000 file includes a main header (Main Header), a tile header (Tile Header), and data (Data), and encoded image data is recorded in this data portion. In addition, the tile header divides the compression encoding source image into rectangles (tiles) of a predetermined size, and generates compression encoded data of each tile. Is to be created. Since the main header and the tile header are based on a known technique, a description thereof is omitted here.
[0037]
When conforming to this SNR Progression, encoded image data is recorded in the order of (layer) Layer / (resolution) Resolution / (component) Component / (position) Position. Next, FIG. 4 shows the relationship between the resolution (image size) and the Resolution number.
[0038]
In FIG. 4, the resolution number of the image with the smallest resolution is set to “0”, and the width and height of the image both double as the resolution number increases by one. The code data for each resolution is stored according to the progression order in order from the smallest resolution number.
[0039]
On the other hand, the layer 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. Similarly to the code data for each resolution, the code data for each layer is stored according to the progression order in ascending order of the layer number.
[0040]
In each Resolution, data (Component data) such as each color component is recorded in a predetermined order, and numbers (component numbers) are assigned in order to each Component data. In addition, each Component data is recorded in order with data (Position data) of code blocks (minimum units to be encoded) at spatial positions in the compression encoding source image. The numbers (position numbers) are assigned in the spatial order (for example, the upper left corner of the image is 0, and the number increases one by one in the right direction of the image. Also, the number increases to the right of the image).
[0041]
The maximum resolution number, layer number, and component number in a single JPEG2000 file are preset by the encoder, and the compression encoding source image is encoded according to the parameters, and the information is recorded in the main header. Has been. Each packet is composed of a packet header section that manages information of a code block (code-block) stored in the packet, and encoded data of each code block. . In the figure, one Position data corresponds to a packet.
[0042]
If the JPEG2000 file having such a structure is held in the server device, the terminal device can receive only the requested part of the image, such as the required resolution, from the server device. As a unit of data to be received, a JPEG2000 packet or a code block unit which is an encoding unit smaller than the packet can be considered. In the present embodiment, a packet unit is assumed as a data unit received by the terminal device from the server device. FIG. 5 shows a conceptual diagram of requests and responses in units of packets. Although the request and response between the server apparatus 101 and the terminal apparatus 102a are shown in the figure, it goes without saying that the server apparatus 103 and the terminal apparatus 102b may be applied.
[0043]
In the figure, the image is divided into tiles, and the encoded data of each tile (each data from Tile0 to TileN in the figure) is stored as a JPEG2000 file 503 in the hard disk 101a connected to the server apparatus 101. In the state, when requesting encoded data of a desired tile, a desired resolution, a desired layer, a desired component, and a desired spatial position from the terminal device 102a, between the server device 101 and the terminal device 102a It shows the communication performed in.
[0044]
Here, for example, the terminal device 102a converts the encoded data having the tile number “1”, the resolution number “0”, the layer number “0”, the component number “0”, and the position number “0” to the server device. When requested to 101, the server apparatus 101 analyzes the JPEG2000 file 503 stored in the hard disk 101a, and corresponds to the request (corresponding to the requested tile number, resolution number, layer number, component number, and position number). To be extracted as packet data and returned as a packet 0 to the terminal device 102a.
[0045]
FIG. 6 is a diagram illustrating an example of a configuration of a JPEG2000 file held on a hard disk connected to the server apparatus 101 (or 103) in the present embodiment. As shown in FIG. 3, the JPEG2000 file is roughly divided into a main header, a tile header, and data (image encoded data). In the figure, the encoded image data is roughly divided into two layer data “0” and “1”. Each layer data is roughly classified into six types of resolution data “0” to “5”. The component data and the position data are each one type of “0”. Here, to simplify the description, it is assumed that the maximum resolution image size of JPEG2000 image encoded data managed by the server apparatus 101 is 4096 × 4096 pixels. Therefore, when there are six types of resolution, the image size at each resolution is 4096 × 4096, 2048 × 2048, 1024 × 1024, 512 × 512, 256 × 256, 128 × 128 pixels. A numerical value indicated in parentheses for each encoded data indicates the number of bytes of each encoded image data.
[0046]
FIG. 7 shows a display unit that requests the server apparatus 101 (or the server apparatus 103) to transmit a JPEG2000 file, decodes the requested JPEG2000 file, and is displayed by a web browser on the terminal apparatus 102a (also the terminal apparatus 102b). 20 is a flowchart of processing to be displayed in 203. This process is performed by the CPU 201 executing a web browser program. In the flowchart of FIG. 5, the user selects an image to be transmitted in advance using the keyboard 202 or mouse 202a in the terminal device 102a. As a selection method, for example, thumbnails of a plurality of images held by the server apparatus 101 are displayed on a home page provided by the server apparatus 101, and the user designates one of these thumbnails using the keyboard 202 or the mouse 202a. To do. Therefore, in the process according to the flowchart shown in FIG. 9, a transmission request for the JPEG 2000 file of the selected image is made.
[0047]
In step S1, an operation input from the user is accepted. As the operation input, for example, an operation input for enlarging, reducing or panning the selected image is input using the keyboard 202 or the mouse 202a.
[0048]
Next, in step S2, a necessary packet is specified from the operation input input in step S1. Thereafter, in step S3, the content of the operation input by the user in step S1 is determined, and a command corresponding to the content of the operation determined in advance from a plurality of commands held by the web browser is selected. Details of the processing in step S3 will be described later. Next, in step S4, the command selected in step S3 is transmitted to the server device. Details of the processing in step S4 will be described later.
[0049]
In step S5, a response to the transmission to the server apparatus in step S4, that is, image encoded data corresponding to the request is received and cached in the RAM 205. In step S6, a JPEG2000-compliant bit stream is created from the encoded image data cached in the RAM 205 in step S5. Details of the processing in step S6 will be described later. Thereafter, in step S7, the bit stream created in step S6 is decoded by the JPEG2000 decoder software and displayed on the display unit 203. In step S8, it is determined whether or not the end of the process has been input by this application. If not, the process returns to step S1.
[0050]
Next, details of the processing in step S3 will be described. FIG. 8 is a flowchart showing details of the processing in step S3. The details of the processing in step S3 will be described below with reference to the flowchart of FIG.
[0051]
First, in step S80, the contents of the operation input in step S1 are analyzed. Specifically, it is determined whether or not a response should be returned at high speed with respect to the input operation. For example, a response should be returned at high speed with respect to continuous panning or panning of an image when the entire image cannot be displayed at once in the display window. This is because these operations may be performed continuously by the user, and processing corresponding to each operation is required to be performed at high speed.
[0052]
Therefore, in step S80, when each operation is input, it is determined that a response should be returned at high speed, and the process proceeds to step S82. When other operations are input, it is necessary to return a response at high speed. If not, the process proceeds to step S81.
[0053]
In step S81, a command to be transmitted to the server device is prepared in order to receive all of the encoded image data of the packet specified in step S2 from the server device. On the other hand, in step S82, a command to be transmitted to the server apparatus is prepared so that only a part of the image encoded data of the packet specified in step S2 is designated by the physical byte number and received from the server apparatus. .
[0054]
Specifically, the command specifications used in step S82 are as follows.
[0055]
Tile / Reso / Layer / Compo number Start offset Maximum number of requested bytes
In this command, “Tile / Layer / Compo number” indicates a Tile number, Resolution number, Layer number, and Component number for specifying the requested packet. The next “start offset” is an offset from the start of the recording position in the JPEG 2000 file of the requested packet, and is “0” when this packet is requested for the first time. The last “maximum requested number of bytes” is the maximum number of bytes of packet data transferred by the current request.
[0056]
In the present embodiment, an operation requesting a high-speed response is input as the operation content input in step S1, and an operation for enlarging an image as an example of this operation will be described below.
[0057]
In general, a mouse wheel may be used as means for enlarging or reducing the image displayed on the display unit 203. In the case of a wheel, since it continuously rotates up and down, a magnification for continuous enlargement / reduction is input in a short time, and in response to this, an enlarged image or a reduced image is continuously sent to the server device. Will be required.
[0058]
For example, when a plurality of images are displayed as thumbnails, and one of the plurality of thumbnail images is selected and a detailed image of the image is displayed, that is, when an enlarged image is displayed, the wheel is rotated as described above. Enlarge the displayed image. In the present embodiment, a case will be described in which the enlarged display is continuously requested twice by the rotation of the wheel.
[0059]
In this case, when a thumbnail image is designated, the designated thumbnail image is displayed on the display unit 203 as an image having a predetermined resolution. The resolution level of the image displayed at this stage is set to “0”. Here, if the first enlargement operation is input by the rotation of the wheel, the display unit 203 displays the resolution level one higher, that is, the resolution level for the server device so that the image of the resolution level “1” is displayed. A request (command) for transmitting encoded image data for displaying an image of “1” is transmitted. Further, when the second enlargement operation is input by the rotation of the wheel, the resolution level “2” is displayed on the server device so that the display unit 203 displays an image of the next higher resolution level, that is, the resolution level “2”. A request (command) for transmitting encoded image data for displaying an image of “2” is transmitted.
[0060]
FIG. 9 is a diagram showing a sequence of command transmission and response return between the server device and the terminal device in this case. In this embodiment, as an example, the number of bytes of a packet requested at one time is 128 bytes.
[0061]
In the figure, 900 indicates a server device, and 901 indicates a terminal device. First, a command 902 for requesting image encoded data (packet) necessary for displaying an image of resolution level “1” in the terminal device 901 is transmitted to the server device 900 as a packet request 1. Details of the command 902 are shown in the lower part of the figure.
[0062]
The command 902 is an image code of an image having a resolution level one higher than the resolution level of an image currently displayed on the display unit of the terminal device 901 (an image having a resolution level “0” displayed by designating a thumbnail image). A request for requesting encoded data to the server device. Requests a maximum of 128 bytes from the beginning of the encoded data of layer number 0, resolution number 1, component number 0, and position number 0 in each encoded data shown in FIG. It is a command to do. The server apparatus 900 returns the latter encoded image data as a response to the terminal apparatus 901. This response is shown as response 1 in FIG.
[0063]
Details of the response 1, that is, the packet are shown in the lower part of FIG. The data size of the encoded image data of layer number 0, resolution number 1, and component number 0 is 96 bytes as shown in FIG. 6, and the maximum request is 128 bytes. Since it is smaller than the number of bytes, all requested packet data can be transmitted in one request. Therefore, information indicating 96 (data size transmitted this time) / 0 (data size to be transmitted later) is also transmitted to the terminal device 901 as the response 1.
[0064]
When the terminal device 901 receives the encoded image data, the terminal device 901 caches it in the RAM 205 under the control of the CPU 201, decodes it by the JPEG2000 decoder, and displays an image of resolution level 1 as a decoding result on the display unit 203. Since the 96/0 information is also received, the CPU 201 can determine that the packet received this time is a complete packet (all packets corresponding to the request) by referring to this information. The process for displaying an image at level “1” can be terminated.
[0065]
Next, the CPU 201 transmits to the server apparatus 900 a command 904 for requesting the server apparatus 900 for image encoded data necessary for displaying an image of the resolution level “2”. Details of the command 904 are shown in the lower part of FIG.
[0066]
A command 904 is used to request the server apparatus for image encoded data of an image having a resolution level that is one higher than the resolution level of the image currently displayed on the display unit of the terminal device 901 (image having the resolution level “1”). This command is a command for requesting a maximum of 128 bytes from the head of the code data of layer number 0, resolution number 2, component number 0, and position number 0 in each encoded data shown in FIG.
[0067]
The server apparatus 900 returns the encoded image data corresponding to this request to the terminal apparatus 901 as a response. This response is shown as response 2 in FIG.
[0068]
Details of the response 2, that is, the packet are shown in the lower part of FIG. The data size of the encoded image data of the layer number 0, the resolution number 2, and the component number 0 is 384 bytes as shown in FIG. 6, and the size of the encoded image data that the server apparatus 900 should transmit to the terminal apparatus 901 is 256. It becomes a byte. Therefore, information indicating 128 (data size transmitted this time) / 256 (data size to be transmitted later) as response 2 is also transmitted as response 2 to the terminal device 901. Accordingly, the terminal device 901 that has received this information determines that there is further image encoded data to be received, and transmits the next 128-byte image encoded data unless there is an input from the user of the terminal device 901 in particular. Thus, a command is transmitted to the server apparatus 900 (packet request 3).
[0069]
In addition, when receiving the encoded image data, the terminal device 901 caches it in the RAM 205 under the control of the CPU 201 and decodes it with the JPEG2000 decoder. Here, as the data of the part not received, DWT (Discrete Wavelet Transform) corresponding to this part is set to 0, decoding processing according to the well-known JPEG 2000 is performed, and an image of resolution level 2 as a decoding result is displayed on the display unit 203. To display.
[0070]
The command specifications used in step S81 described above are as follows.
[0071]
packet request command Tile / Reso / Layer / Compo number
In this command, “Tile / Layer / Compo number” indicates a Tile number, a Resolution number, a Layer number, and a Component number for specifying a requested packet. This command is a command for transferring data of a designated packet from the server device to the terminal device at a time.
[0072]
Note that in this embodiment, the encoded image data received by the terminal device from the server device as a response is only specified, but the data size of the packet transmitted by the server device to the terminal device is less than or equal to the maximum transmission size. If it is sufficient, other data may be transmitted as the difference (maximum transmission data size−data size of transmitted packet).
[0073]
For example, taking the communication shown in FIG. 9 as an example, the size of the encoded image data of resolution level 1 is 96 bytes, but the terminal device can receive a maximum of 128 bytes. The server device can transmit data to the terminal device. Therefore, the server apparatus may transmit the encoded image data of 96 bytes to the terminal apparatus and transmit the encoded image data of the next resolution level (resolution level 2) for the remaining 32 bytes. By doing so, data can be transmitted without waste in each communication.
[0074]
In this embodiment, the packet data request command has been described as “partial packet request command”, which is different from the normal packet data request command. However, the present invention is not limited to this, and the command is the same as the parameter. It is also possible to judge by the number of.
[0075]
In the above description, the number of bytes of a packet to be transferred at one time is 128 bytes, but the present invention is not limited to this.
[0076]
Next, the data structure of a table for cache management will be described with reference to FIG. The table shown in the figure is formed on the RAM 205 of the terminal device. The table shown in the figure exists for each tile. However, in this embodiment, since the image is not divided into tiles, only one table shown in the figure exists.
[0077]
In the table shown in the figure, there are an area 1001 for storing the number of received packets and an area 1002 for storing data of each packet. The number of packets (N in the figure) is stored in area 1001. Further, in the area 1002, areas 1003 to 1005 exist in one packet management table. An area 1003 is a field for managing the total number of bytes of the packet. If the packet has not been requested yet, “−1” is entered, and if requested, the total number of bytes of the packet is entered. Therefore, the area 1003 stores one of “−1” (unrequested), “0” (originally zero length packet), and “value greater than or equal to 0” (total number of bytes of the packet). .
[0078]
Therefore, when JPEG2000 encoded image data is created from each cached packet, a zero length packet code is entered in this area 1003 when “−1” or “0”. Next, the area 1004 is the actual number of bytes of packet data currently cached. When requested by a normal packet request command, the number of bytes recorded in the area 1003 and the number of bytes recorded in the area 1004 Will match. However, if a partial packet request command is issued, it may not match. An area 1005 stores an address of actual packet data in the RAM 205. Reference numeral 1006 denotes corresponding packet data.
[0079]
Using such a management table, when the CPU 201 calculates a necessary packet from a request from a user, it determines whether there is data on the cache and determines whether to issue a command. As shown in FIG.
[0080]
In step S1100, it is checked whether or not the value stored in the area 1003 shown in FIG. 10 is less than “0”. If it is less than “0”, the process proceeds to step S1104, and either a “partial packet request command” or a “normal packet request command” is issued and transmitted based on the determination from the user request. On the other hand, if “0” or more in step S1100, the process proceeds to step S1101, and the number of bytes recorded in the area 1003 is compared with the number of bytes recorded in the area 1004 to determine whether or not they are the same. to decide. If they are the same, it can be determined that there is no more packet data to be received (in other words, all necessary packet data is stored in the RAM 205), so that no command is issued. On the other hand, if it is determined in step S1101 that they are not the same, the process proceeds to step S1103, and a “partial packet request command” is transmitted to the server apparatus.
[0081]
As described above, by switching between a command for “normal packet request” and a command for “partial packet request” according to a request from the user, an image display optimum for each user's request can be achieved. It can be carried out.
[0082]
[Second Embodiment]
In the present embodiment, a case will be described in which an image larger than the display window size is displayed while panning when an image displayed on the display unit 203 is enlarged in the terminal device. In this case as well, as in the enlarged display in the first embodiment, the user continuously pans the display area and displays an image at a desired position. Since the basic operation at this time is the same as that of the first embodiment, this description is omitted.
[0083]
A method of determining the continuity of user operations and dynamically determining the number of bytes to be transferred at one time in the “partial packet request command” will be described. A flowchart of this process is shown in FIG. Further, it is assumed that the processing according to this flowchart is performed by the CPU 201.
[0084]
In step S1201, firstly, an operation input (operation input 1) from the first user is detected, an IIP command for the detected operation is determined, and the time at that time is obtained by a timer (not shown) in the CPU 201, and the RAM 205 Save to. Next, in step S1202, an operation input (operation input 2) from the second user is detected, an IIP command for the detected operation is determined, and the time at that time is obtained by a timer (not shown) in the CPU 201, Save in the RAM 205. In step S1203, a difference between the times obtained in steps S1201 and S1202 is obtained, and it is obtained whether or not the obtained difference time indicates a predetermined time. This is a process for determining whether the operation input 1 and the operation input 2 are made continuously. Note that the process described in the first embodiment may be applied to the present embodiment for the process for determining whether or not the operation has been performed continuously, and the processing method shown in FIG. You may apply to this embodiment.
[0085]
If it is determined that the operation input 1 and the operation input 2 are made continuously within a predetermined time, the process proceeds to step S1204, and the operation input 1 and the operation input 2 are the same operation input. Judge whether there is. The case of the same operation input is, for example, a case where the mouse wheel is continuously rotated. In this case, the same operation input is made within a predetermined time. Therefore, if the same operation input is made, the process proceeds to step S1205, and the number of bytes of the packet requested when transmitting the partial packet request command is determined according to the difference time obtained in step S1203. For example, a predetermined number of bytes may be determined in advance, and the longer the difference time, the larger the number of bytes may be proportionally increased.
[0086]
In step S1206, a command for specifying the requested encoded image data is transmitted to the server apparatus as a partial packet request command together with the determined number of bytes.
[0087]
Such a “partial packet request” can also be used when displaying thumbnails of images. For example, it is possible to ensure that all thumbnails are displayed within a certain period of time, no matter how many thumbnails (ie, images) are displayed at one time. In order to realize this, the number of bytes to be received for displaying all thumbnails is determined in advance, and a value obtained by dividing the number of bytes by the number is used as the maximum number of bytes of a command requesting each image data. .
[0088]
Alternatively, for the JPEG 2000 image encoded data stored in the server device, the position in the external storage device storing the image encoded data and the number of bytes to be read may be specified as the partial packet request command.
[0089]
Although the logical unit has been described with JPEG2000 packets, it can be easily guessed that other units such as tiles, precincts, or code-blocks may be used.
[0090]
[Third Embodiment]
The resolution of the image requested from the terminal device to the server device in the above embodiment is based on an instruction input by the mouse wheel when, for example, the display unit is enlarged or reduced using the mouse wheel. However, for example, when the driver of the printer 208 is installed in the external storage device of the terminal device and an image displayed on the web browser is printed using the printer 208, the resolution that the printer 208 can print is set to the printer. You may acquire from the driver and request | require the image coding data of the acquired resolution with respect to a server apparatus.
[0091]
If there are a plurality of printable resolutions, the list may be displayed on the display unit and selected by the user.
[0092]
[Fourth Embodiment]
A group of packets (partial image code) required to form an image with a desired resolution according to an instruction from the terminal device in the image encoded data instructed from the terminal device among the image encoded data held by the server device. In the present embodiment, the size of the partial image encoded data that has already been received in the instructed image encoded data, the size of the partial image encoded data that is not to be received, and the partial image that is received this time The reception form is controlled to be different according to the comparison result using the size of the encoded data. Hereinafter, processing performed by the terminal device and the server device in the present embodiment will be described.
[0093]
In addition, since the form of the system comprised by the server apparatus in this embodiment and a terminal device, and the structure of those apparatuses are the same as 1st Embodiment, the description is abbreviate | omitted. Also in this embodiment, the encoded image data held by the server device is encoded according to JPEG2000, and the configuration is shown in FIGS. 3, 4, and 6 as described in the first embodiment. It is according to the contents. Further, requests and responses in units of packets between the server device and the terminal device in the present embodiment are as shown in FIG. 5 as in the first embodiment.
[0094]
Further, the web browser in the terminal device 102a (same as the terminal device 102b) of the present embodiment displays the decoding result of the requested JPEG2000 file to the server device 101 (or the server device 103) as in the third embodiment. Output processing is performed not only on the unit 203 but also on the printer 208. This process is performed by the CPU 201 executing a web browser program. Therefore, in addition to the flowchart of the main processing performed by the CPU 201 in this embodiment, the case where the user inputs an instruction to output the decoding result to the printer 208 is described in the third embodiment. As described above, the printable resolution is acquired from the printer driver, and the reception request of the encoded image data according to this resolution is transmitted to the server apparatus. The received encoded image data is decoded, and the decoding result is output to the printer 208. Further, in the present embodiment, the partial image encoded data is received in step S4, so the processing in step S5 is omitted.
[0095]
As described above, in the present embodiment, the control is performed so that the reception mode differs according to the comparison result between the size of the encoded image data instructed from the terminal device and the size of the data received this time. Therefore, the commands to be issued naturally differ depending on the comparison result. In the following, command issue processing according to the comparison result will be described with reference to FIG. 13 showing a flowchart of the processing. In the present embodiment, in order to obtain an image with a desired resolution, the terminal device uses the “Layer0 / Reso0 / Comp0 / Pos0” packet and the “Layer0 / Reso1 / Comp0 / Pos0” in the encoded image data designated in advance. A case will be described in which partial image encoded data based on the packet is requested to the server device.
[0096]
First, in step S1310, it is determined whether or not the request made to the server apparatus 101 is the first (first) request. If it is the first time, the process proceeds to step S1311. In step S1311, a request is transmitted to the server apparatus 101 so as to transmit the size of the instructed image encoded data. For example, in the case of the encoded image data shown in FIG. 6, the size to be acquired is the sum of the sizes of each packet from “Layer0 / Reso0 / Comp0 / Pos0” to “Layer1 / Reso5 / Comp0 / Pos0”, and the sum is 65536. It becomes a byte.
[0097]
If it is determined that it is not the first time to acquire the total size or to request to the server apparatus 101 in step S1310, next, in step S1312, the partial image encoded data already cached in the RAM 205 is stored. Find the total size.
[0098]
Next, in step S1313, the partial image encoded data ("Layer0 / Reso0 / Comp0 / Pos0" packet and "Layer0 / Reso1 / Comp0 / Pos0" packet) requested by the terminal apparatus 102a to the server apparatus 101 this time. A request is transmitted to the server apparatus 101 to transmit the total size. In this embodiment, since the size of any packet is 32 bytes, the total sum is 64 bytes. When this sum is received from the server apparatus 101, a command to be issued is determined in step S1314. The determination method will be described.
[0099]
As this determination method, in this embodiment, “the sum of the sizes of already received partial image encoded data + the size of the partial image encoded data not received” and “the sum of the sizes of the partial image encoded data requested this time” If the former is equal to or greater than the latter (the equal sign may not be required), a command to be transmitted to the server device is issued to receive the partial image encoded data in units of packets from the server device. To do. On the other hand, in the case of the former <the latter (which may be followed by an equal sign), the server apparatus receives all packets requested from the server apparatus at one time (that is, requested partial image encoded data). A command to be transmitted is issued (processing in step S1316).
[0100]
For example, when this is the first request for the partial image encoded data to the server device, the total size of the partial image encoded data requested this time is 64 bytes, and the total size of the already received partial image encoded data is 64 bytes. Is 0 byte, and the sum of the sizes of the partial image encoded data not received is (the size of the entire specified image encoded data) − (the size of the already received partial image encoded data + the partial image encoding requested this time) Since the data size is 65536- (64 + 0) = 65472. Therefore, since 65472> 64, in step S1315, a command to be transmitted to the server device is issued in order to receive the partial image encoded data in units of packets.
[0101]
In any case of steps S1315 and S1316, the requested partial image encoded data is received according to the respective reception modes.
[0102]
With the above processing, it is possible to receive image encoded data (partial image encoded data) for obtaining an image with a desired resolution. Henceforth, by performing the same processing as in the first embodiment, Can be displayed on the display unit 203.
[0103]
Next, a case where an enlargement instruction for an image displayed on the display unit 203 is input by the same operation as in the first embodiment will be described. In order to form an enlarged image, it is assumed that partial image encoded data of a level up to “Reso2” is necessary in the JPEG2000 file. That is, the packets “Layer0 / Reso1 / Comp0 / Pos0”, “Layer1 / Reso1 / Comp0 / Pos0”, “Layer0 / Reso2 / Comp0 / Pos0”, and “Layer1 / Reso2 / Comp0 / Pos0” are required.
[0104]
In this case as well, the process according to the flowchart shown in FIG. 7 is similarly performed, so that the process according to the flowchart shown in FIG. 13 is also performed. In this case, in step S1310, since the request for partial image encoded data is not the first request from the terminal apparatus 102a to the server apparatus 101, the process directly proceeds to step S1312.
[0105]
In step S1312, the total size of the received partial image encoded data is acquired as described above. Since this is the total size of the partial image encoded data acquired for the first time, the total size is 96 bytes. Next, in step S1313, the size of the sum total of the requested packets is acquired. Since the sizes of the four packets are 96 bytes, 96 bytes, 384 bytes, and 384 bytes, respectively, the sum total is 960 bytes. Next, in step S1314, the calculation as described above is performed. Then
(64 + 64512)> 960, so that “total size of already received partial image encoded data + size of partial image encoded data not received”> “total size of partial image encoded data requested this time”. Therefore, the terminal device issues a command to be transmitted to the server device in order to receive the partial image encoded data in units of packets.
[0106]
With the above processing, even when an enlargement instruction for the image displayed on the display unit 203 is input by the same operation as in the first embodiment, the encoded image data for forming the enlarged image is obtained. Since it can be received from the server device, an image obtained by decoding the received encoded image data can be displayed on the display unit 203.
[0107]
In this state, a case where the user further inputs an instruction to print an image displayed on the display unit 203 as a predetermined size, for example, an image of 4096 pixels × 4096 pixels using the printer 208 will be described. The partial image encoded data required to form an image with a size of 4096 pixels × 4096 pixels are “Layer0 / Reso3 / Comp0 / Pos0”, “Layer1 / Reso3 / Comp0 / Pos0”, and “Layer0 / Reso4 / Comp0 / Packets “Pos0”, “Layer1 / Reso4 / Comp0 / Pos0”, “Layer0 / Reso5 / Comp0 / Pos0”, and “Layer1 / Reso5 / Comp0 / Pos0” are required.
[0108]
In this case as well, the process according to the flowchart shown in FIG. 7 is similarly performed, so that the process according to the flowchart shown in FIG. 13 is also performed. In this case, in step S1310, since the request for partial image encoded data is not the first request from the terminal apparatus 102a to the server apparatus 101, the process directly proceeds to step S1312.
[0109]
In step S1312, the total size of the received partial image encoded data is acquired as described above. Since this is the total size of the partial image encoded data acquired the first time and second time, it is 1056 bytes. It becomes. In step S1313, the total size of the requested packets is acquired. The total is 64512 bytes. Next, in step S1314, the calculation as described above is performed. Then
(1056 + 0) <64512, and “total size of already received partial image encoded data + size of partial image encoded data not received” <“total size of partial image encoded data requested this time” Therefore, the terminal device issues a command for transmitting all the encoded data managed by the server device, in other words, the entire file.
[0110]
With the above processing, even when it is desired to output an image of a predetermined size to the printer 208, the encoded image data for forming the image of the predetermined size can be received from the server device. By decoding the encoded data and outputting it to the printer 208 via the printer driver, an image of a predetermined size can be printed.
[0111]
Next, FIG. 14 which is a flowchart of the processing in step S6 in the present embodiment, that is, processing for creating a JPEG2000-compliant bit stream (image encoded data) from the partial image encoded data cached in the RAM 205 is shown in FIG. This will be described below.
[0112]
First, in step S1400, it is determined whether or not the command issued by the processing described above is a request to receive partial image encoded data in units of packets. As a result of this determination, if the command requests partial image encoded data in units of packets, the process proceeds to step S1402, and one JPEG2000-compliant bit stream is obtained from each partial image encoded data cached in the RAM 205. create. Details of the processing in step S1402 will be described later.
[0113]
On the other hand, if it is determined in step S1400 that the command is not a command requesting partial image encoded data in units of packets, the process proceeds to step S1401, and all partial image encoded data cached in the RAM 205 at this time are stored. In addition to deleting, even if an instruction is newly input from the user, processing according to this instruction is not performed. For example, the process is not branched from step S1400 to step S1402.
[0114]
Next, details of the processing in step S1402 will be described using FIG. 15 which is a flowchart showing details of the processing. First, referring to each partial image encoded data cached in the RAM 205, the number of tiles is checked in step S900, and the number of packets is checked in step S901, and is substituted into variables iTMax and iPMax, respectively. In step S902, a JPEG2000 Main header is output. In step S903, a variable iT used in processing to be described later is initialized to zero. In step S904, a Tile header (SOT marker code) is generated and temporarily output. In step S905, a variable iP used in a process described later is initialized to 0, and in step S906, a variable iL used in a process described later is initialized to 0.
[0115]
The variable iP is a variable used as an index for specifying each packet. Therefore, in step S907, it is checked whether the packet represented by the variable iP is cached in the RAM 205. As a result of this check, if the packet data represented by the variable iP has been cached in the RAM 205, that is, has been transmitted from the server device, the process proceeds to step S908, the packet data corresponding to the variable iP is output, and step S909 is performed. In step S908, the size of the packet data output in step S908 is added to the value held in the variable iL, and the result is stored and held in the variable iL again.
[0116]
On the other hand, as a result of the check in step S907, if the packet data represented by the variable iP is not cached in the RAM 205, that is, not transmitted from the server device, the process proceeds to step S910, and ZLP (Zero Length Packet) data is output. In step S911, 1 is added to the value held in the variable iL, and the result is stored and held in the variable iL again. In step S912, 1 is added to the value held by the variable iP, and the result is stored and held in the variable iP again.
[0117]
In step S913, the variable iP is compared with the variable iPMax. The processing in this step is processing for checking whether or not processing has been performed on all packet data included in one tile.
[0118]
If variable iP <variable iPMax, that is, if the processing for all packet data included in one tile has not been completed, the process returns to step S906, and the above processing is performed. On the other hand, if variable iP ≧ variable iPMax, that is, if processing for all packet data included in one tile is completed, the process proceeds to step S914, and the value of the field managing the number of data of the entire tile is set. The variable iL is updated, and the number of packet data included in the tile in the SOT marker code output in step S904 is output.
[0119]
In step S915, 1 is added to the value held in the variable iT, and the result is stored and held in the variable iT again. The variable iT is a variable for counting the number of each tile. Therefore, in step S916, it is checked whether all tiles have been processed. If all the tiles have not been processed, the process returns to step S904 to perform the above process.
[0120]
On the other hand, if all the tiles are processed, the process proceeds to step S917, and a known process for completing JPEG2000-compliant encoded data is performed.
For example, an EOC marker code is output.
[0121]
As described above, according to the present embodiment, when the required size of the partial image encoded data is relatively large by the comparison process, it can be received at high speed, and the partial image encoded data can be received smoothly. I can do it.
[0122]
[Fifth Embodiment]
In the present embodiment, which of the above two commands is used is determined according to the network usage status. Therefore, the process performed by the web browser executed on the terminal device in the present embodiment to request the server device to transmit the JPEG2000 file, decode the requested JPEG2000 file, and display it on the display unit 203 is performed by the command in step S4. Only the issuing process is different from the fourth embodiment.
[0123]
FIG. 16 is a flowchart of command issue processing in this embodiment. The same steps as those in FIG. 13 are denoted by the same step numbers, and the description thereof is omitted.
[0124]
First, in step S1600, the use status of the network is detected. For example, a known “ping” command is used as follows, for example.
[0125]
ping host name (server name)
This can check the time response using the network from the device that issued this command to the device specified by the host name (server name). Therefore, in this embodiment, the terminal device can check the time response using the network between the terminal device and the server device by using the ping command specifying the server device as the host name. If this time response requires more than a certain time, it can be judged that this network is very crowded (used by many devices), and the time response does not require more than a certain time. It can be determined that this network is not so busy (not using too many devices). Therefore, the use status of the network between the terminal device and the server device can be known.
[0126]
If it is determined in step S1601 that the network is not crowded as a result of the investigation, the process proceeds to step S1316, and the same process as in step S1316, a transfer request command for the entire file is issued.
[0127]
On the other hand, if it is determined in step S1601 that the network is congested, the process proceeds to step S1315, and the same process as in step S1315, in order to receive the partial image encoded data in packet units, the server apparatus. Issue a command to send.
[0128]
Through the above processing, the reception form of the partial image encoded data can be varied according to the network usage status, in other words, the degree of congestion. This means that if the network is not so busy, the entire file is received from the server, and conversely, if the network is busy, a command for each packet is received so that the partial image encoded data can be received in a shorter time. Issue. Thereby, the partial image encoded data can be received more smoothly.
[0129]
[Sixth Embodiment]
In the fourth embodiment, the terminal device can know the size of the partial image encoded data to be requested from the server device by sending it from the server device. In the present embodiment, the size of the partial image encoded data to be requested from the server device is estimated in the terminal device.
[0130]
FIG. 17 is a diagram showing encoded data of each resolution in the encoded image data encoded according to JPEG2000. In general, each of four types of rectangles 1700, 1701a, 1701b, and 1701c, 1702a, 1702b, and 1702c, and 1703a, 1703b, and 1703c includes a DWT coefficient indicating a frequency component of an image having a different resolution. .
[0131]
For example, when decoding is performed using only the DWT coefficient included in the rectangle 1700, an image with the lowest resolution (resolution level 0) is restored. In addition to this, by decoding the DWT coefficients included in the rectangles 1701a, 1701b, and 1701c, an image with a higher resolution (resolution level 1) is restored. In addition to this, by decoding the DWT coefficients included in the rectangles 1702a, 1702b, and 1702c, an image with a higher resolution (resolution level 2) is restored. In addition to this, by decoding the DWT coefficients included in the rectangles 1703a, 1703b, and 1703c, an image with a higher resolution (resolution level 3) is restored.
[0132]
Here, in general, when an image is encoded in the lossless mode in JPEG 2000, the area ratio of the rectangle is directly proportional to the ratio of the data amount of the DWT coefficient included in the rectangle. For example, since the rectangle 1700, the rectangle 1701a, the rectangle 1701b, and the rectangle 1701c all have the same area, the area ratio of the rectangle 1700 to the rectangles 1701a, 1701b, and 1701c is 1: 3, and the DWT coefficient included in the rectangle 1700 And the ratio of the data amount of the DWT coefficient included in the rectangles 1701a, 1701b, and 1701c is approximately 1: 3.
[0133]
The area ratio between the rectangle 1700 and the rectangle 1702a (1702b, 1702c) is 1: 4. The area ratio between the rectangle 1700 and the rectangle 1703a (1703b, 1703c) is 1: 8.
[0134]
Since a packet of encoded image data according to JPEG2000 is composed of DWT coefficients, the size of the packet corresponding to each rectangle is also directly proportional to the area ratio of each rectangle.
[0135]
Using this, when requesting partial image encoded data encoded in the lossless mode, the data of the partial image encoded data to be requested from the amount of partial image encoded data already received. You can guess the amount and the total number of bytes in the file. For example, assume that partial image encoded data having a resolution level of 0 has already been received. That is, in FIG. 17, it is assumed that the partial image encoded data corresponding to the rectangle 1770 is received.
[0136]
If the data size of the partial image encoded data is 64 bytes, the size of the partial image encoded data corresponding to the rectangles 1701a, 1701b, and 1701c is 64 × 3 = 192 bytes as described above. The size of the encoded image data corresponding to the rectangles 1702a, 1702b, and 1702c is 64 × 4 × 3 = 768 bytes. The size of the encoded image data corresponding to the rectangles 1703a, 1703b, and 1703c is 64 × 4 × 4 × 3 = 3072 bytes. In this way, each area ratio can be grasped in advance, so that the size of data to be received can be estimated from the data size of the partial image encoded data already received.
[0137]
In the following, when one of a plurality of images displayed on the web browser is designated, the size of the partial image encoded data requested from the terminal device in the designated image and the size of the image encoded data of the designated image are set. A process in which the terminal device issues a command according to the estimation result will be described with reference to FIG. 18 showing a flowchart of the process. The process according to the flowchart of FIG. 4 shows a subroutine of the process in step S4. The process shown in FIG. 18 is a packet group requested from the terminal device in the instructed image in the command issuance process in the fourth embodiment (partially encoded partial data necessary for obtaining an image with a desired resolution). This is the same except that the size of the packet group) and the size of the encoded image data of the instructed image are estimated on the terminal device side without receiving from the server device. Therefore, the same step numbers are assigned to the same steps in FIG.
[0138]
First, when one image is specified, the partial image encoded data of resolution level 0 of the specified image is already cached in the RAM 205, so in step S1800, the size of the partial image encoded data is changed to the specified image. The size of the entire corresponding image encoded data is estimated. The estimation method is as described above.
[0139]
Next, the size of the partial image encoded data to be requested is estimated using the cached size of the partial image encoded data of resolution level 0. If the estimated size of the encoded image data and the size of the partial image encoded data to be requested are used, the size of the partial image encoded data that has not been received can be obtained. The process after S1314 is performed. Since the processing after step S1314 is as described above, description thereof is omitted here.
[0140]
Note that the above-described process of estimating on the terminal device side without requesting the server device for the size of the partial image encoded data to be requested from now on may be applied to the above-described embodiment.
[0141]
[Seventh Embodiment]
In the above-described embodiment, when requesting partial image encoded data, a command requested in units of packets and a command for requesting the entire partial image encoded data at a time have been selectively used according to various states.
[0142]
In the present embodiment, when encoded data of an image divided into tiles is held in the server device for each tile, a packet request command and a command for requesting encoded data of the entire tile are provided for each tile. Use properly.
[0143]
FIG. 19 shows a flowchart of command issue processing in this embodiment. The process according to the flowchart of FIG. 9 is a subroutine for the process in step S4. Note that the same steps as those in FIGS. 13 and 18 are given the same step numbers, and description thereof is omitted.
[0144]
First, in step S1900, the total number of tiles is substituted into a variable iTMax, and a variable iT representing an index attached to Kakuda Il is initialized to zero. Next, in step S1901, it is determined whether the tile having the variable iT as an index is requested by the user. If it is the requested tile, the process advances to step S1904 to perform the same process as in step S1800. However, the target of obtaining the size is not the data size of the received packet, but the data size of one received tile.
[0145]
Next, the same processing as step S1801 is performed. That is, the size of the packet requested this time is obtained. Then, the processing after step S1314, that is, the command determination processing as described in the fourth embodiment is performed. However, the command to be determined is a command for requesting partial image encoded data in one transmission. The command needs to be read as a command for receiving a tile in one request. In addition, a command requested in units of packets needs to be read as a command for receiving one tile in units of packets.
[0146]
Next, the process of step S6 in this embodiment, that is, the process of creating a JPEG2000-compliant bit stream (image encoded data) from the encoded data cached in the RAM 205 will be described with reference to FIG. This will be described below. The same steps as those in FIGS. 14 and 19 are given the same step numbers, and the description thereof is omitted.
[0147]
In step S1400, it is determined whether the command issued by the above-described processing is a request for receiving a tile in units of packets. As a result of this determination, if it is a command requested in units of packets, the process proceeds to step S2001, and one JPEG2000-compliant bit stream is created from the encoded data of the tile cached in the RAM 205. Details of the processing in step S2001 will be described later.
[0148]
On the other hand, if the result of determination in step S1400 is not a command requesting tiles in packet units, processing proceeds to step S1401, where all data cached in RAM 205 at this point is deleted, and a new one is received from the user. Even if an instruction is input, processing according to the instruction is not performed. For example, the process is not branched from step S1400 to step S1402. In step S2002, the tile data received from the server device based on the issued command is used as a bit stream to be generated as it is.
[0149]
The flowchart of the process in step S2001 is as shown in FIG. The flowchart of FIG. 15 shows the processing from step S904 to step S914 in FIG. 15, and the description thereof is the same as described above.
[0150]
[Other Embodiments]
An object of the present invention is to supply a storage medium (or recording medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus. Needless to say, this can also be achieved by reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0151]
Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is determined based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0152]
The storage medium includes a communication medium such as a communication cable used for a network such as the Internet or a LAN. That is, when the program code of the above-described embodiment is held in a server device on a network, the program can be introduced into the computer by downloading from the server device to the computer via the network. Therefore, the installed program is executed by a control circuit such as CPU or MPU on the computer, and as a result, the computer realizes the function in the above-described embodiment. Needless to say, a communication medium such as a communication cable is included.
[0166]
【The invention's effect】
From the above description, according to the present invention, it is possible to provide a technique for switching the reception mode of encoded data having images of a plurality of resolutions according to the purpose, thereby receiving the encoded image data more comfortably. It can be carried out.
[Brief description of the drawings]
FIG. 1 is a diagram showing a schematic configuration of a system according to a first embodiment of the present invention in which a plurality of computers are connected on a network represented by the Internet or a LAN.
FIG. 2 is a block diagram showing a basic configuration of server apparatuses 101 and 103 and terminal apparatuses 102a and 102b.
FIG. 3 is a diagram showing a schematic configuration of a JPEG2000 file generated in accordance with Layer-resolution level-component-position progression.
FIG. 4 is a diagram illustrating a relationship between resolution (image size) and Resolution number.
FIG. 5 is a conceptual diagram of requests and responses in units of packets.
FIG. 6 is a diagram illustrating an example of a configuration of a JPEG2000 file held on a hard disk connected to the server apparatus 101 (or 103) according to the first embodiment of the present invention.
FIG. 7: Requests transmission of a JPEG2000 file to the server apparatus 101 (or the server apparatus 103) performed by a web browser on the terminal apparatus 102a (same as the terminal apparatus 102b), decodes the requested JPEG2000 file, and displays the display unit. 20 is a flowchart of processing to be displayed in 203.
FIG. 8 is a flowchart showing details of processing in step S3.
FIG. 9 is a diagram illustrating a sequence of command transmission and response return between the server device and the terminal device.
FIG. 10 is a diagram illustrating a data structure of a table for cache management.
FIG. 11 is a flowchart of processing for determining whether or not there is data on a cache and determining whether or not to issue a command when a CPU 201 calculates a necessary packet from a request from a user.
FIG. 12 is a flowchart of processing for determining the continuity of user operations and dynamically determining the number of bytes to be transferred at one time in a “partial packet request command”;
FIG. 13 is a flowchart of a command issuance process that is issued according to a comparison result between the size of encoded image data instructed from a terminal device and the size of data received this time.
FIG. 14 is a flowchart of processing in step S6 according to the fourth embodiment of the present invention.
FIG. 15 is a flowchart showing details of processing in step S1402.
FIG. 16 is a flowchart of command issue processing according to the fifth embodiment of the present invention;
FIG. 17 is a diagram showing encoded data of each resolution in encoded image data encoded according to JPEG2000.
FIG. 18 shows the size of the partial image encoded data requested from the terminal device in the specified image and the image encoded data of the specified image when one of the plurality of images displayed on the web browser is specified. It is a flowchart of the process in which a terminal device issues a command according to a size estimation result.
FIG. 19 is a flowchart of command issue processing according to the seventh embodiment of the present invention;
FIG. 20 is a flowchart of the process of step S6 in the seventh embodiment of the present invention.
FIG. 21 is a flowchart of processing in step S2001.

Claims (5)

スケーラビリティを有する画像符号化データを保持するサーバ装置から、指示された当該画像符号化データを受信する画像処理装置であって、
ユーザからの入力操作を受け付ける入力手段と、
当該入力操作の種別に応じて、該入力操作に対応した処理が高速に行われるべきか、若しくは高速に行う必要はないか、を判断する判断手段と、
前記判断の結果、高速に行う必要はないと判断した場合には、前記指示された画像符号化データのうち、デコードすることで所望のレベルの画像を形成するために必要な部分画像符号化データを1回の受信処理で受信するために前記サーバ装置に送信する第1のコマンドを前記サーバ装置に対して送信し、
前記判断の結果、高速に行われるべきと判断した場合には、前記指示された画像符号化データにおける前記部分画像符号化データの位置情報、及び前記サーバ装置から一度に受信するデータのサイズ、を含む第2のコマンドを前記サーバ装置に対して送信する送信手段と、
前記サーバ装置から送信される、当該送信手段により送信されたコマンドに応じた画像符号化データを受信してデコードし、デコード結果を出力装置に出力する出力手段とを備え
前記送信手段が前記第2のコマンドを前記サーバ装置に対して送信した場合、前記出力手段は更に、受信すべき部分画像符号化データのうち、受信したデータのサイズと、まだ受信していないデータのサイズとを示す情報を受信し、
前記出力手段が前記情報を受信した場合、前記送信手段は前記部分画像符号化データのうちまだ受信していないデータを、予め設定された単位毎に前記サーバ装置から受信するためのコマンドを前記第2のコマンドとして前記サーバ装置に対して送信することを特徴とする画像処理装置。
An image processing apparatus that receives the instructed image encoded data from a server apparatus that holds the image encoded data having scalability,
An input means for receiving an input operation from a user;
A determination means for determining whether the processing corresponding to the input operation should be performed at high speed or not necessary according to the type of the input operation ;
As a result of the determination, if it is determined that it is not necessary to perform at high speed, among the instructed image encoded data, partial image encoded data necessary for forming an image of a desired level by decoding A first command to be transmitted to the server device in order to receive it in a single reception process, to the server device,
As a result of the determination, if it is determined that it should be performed at high speed, the position information of the partial image encoded data in the instructed image encoded data , and the size of data received at one time from the server device, Transmitting means for transmitting a second command including the server command to the server device;
Output from the server device, receiving and decoding the encoded image data according to the command transmitted by the transmission unit, and outputting the decoding result to the output device ,
When the transmission means transmits the second command to the server device, the output means further includes the size of the received data and the data not yet received among the partial image encoded data to be received. Receive information indicating the size of the
When the output unit receives the information, the transmission unit receives a command for receiving, from the server device, data that has not been received from the partial image encoded data for each preset unit. An image processing apparatus that transmits to the server apparatus as a second command .
前記入力手段は、ユーザからの連続した操作入力を受け付け可能であって、
前記送信手段は、前記入力手段から入力された夫々の操作入力が同じであって、且つ当該夫々の操作入力が予め設定された時間内になされたものである場合には、前記第2のコマンドを、それ以外の場合には前記第1のコマンドを生成して前記サーバ装置に対して送信することを特徴とする請求項1に記載の画像処理装置。
The input means can accept continuous operation input from a user,
When the operation input input from the input unit is the same and the operation input is performed within a preset time, the transmission unit transmits the second command. The image processing apparatus according to claim 1, wherein in other cases, the first command is generated and transmitted to the server apparatus.
スケーラビリティを有する画像符号化データを保持するサーバ装置から、指示された当該画像符号化データを受信する画像処理方法であって、
ユーザからの入力操作を受け付ける入力工程と、
当該入力操作の種別に応じて、該入力操作に対応した処理が高速に行われるべきか、若しくは高速に行う必要はないか、を判断する判断工程と、
前記判断の結果、高速に行う必要はないと判断した場合には、前記指示された画像符号化データのうち、デコードすることで所望のレベルの画像を形成するために必要な部分画像符号化データを1回の受信処理で受信するために前記サーバ装置に送信する第1のコマンドを前記サーバ装置に対して送信し、
前記判断の結果、高速に行われるべきと判断した場合には、前記指示された画像符号化データにおける前記部分画像符号化データの位置情報、及び前記サーバ装置から一度に受信するデータのサイズ、を含む第2のコマンドを前記サーバ装置に対して送信する送信工程と、
前記サーバ装置から送信される、当該送信工程で送信されたコマンドに応じた画像符号化データを受信してデコードし、デコード結果を出力装置に出力する出力工程とを備え
前記送信工程で前記第2のコマンドを前記サーバ装置に対して送信した場合、前記出力工程では更に、受信すべき部分画像符号化データのうち、受信したデータのサイズと、まだ受信していないデータのサイズとを示す情報を受信し、
前記出力工程で前記情報を受信した場合、前記送信工程では前記部分画像符号化データのうちまだ受信していないデータを、予め設定された単位毎に前記サーバ装置から受信するためのコマンドを前記第2のコマンドとして前記サーバ装置に対して送信することを特徴とする画像処理方法。
An image processing method for receiving instructed image encoded data from a server device that holds image encoded data having scalability,
An input process for receiving an input operation from a user;
A determination step of determining whether processing corresponding to the input operation should be performed at high speed or not necessary according to the type of the input operation ;
As a result of the determination, if it is determined that it is not necessary to perform at high speed, among the instructed image encoded data, partial image encoded data necessary for forming an image of a desired level by decoding A first command to be transmitted to the server device in order to receive it in a single reception process, to the server device,
As a result of the determination, if it is determined that it should be performed at high speed, the position information of the partial image encoded data in the instructed image encoded data , and the size of data received at one time from the server device, A transmission step of transmitting to the server device a second command including :
An output step of receiving and decoding image encoded data corresponding to the command transmitted in the transmission step, transmitted from the server device, and outputting a decoding result to an output device ;
When the second command is transmitted to the server device in the transmission step, the output step further includes the size of the received data and the data not yet received among the partial image encoded data to be received. Receive information indicating the size of the
When the information is received in the output step, a command for receiving data that has not been received from the partial image encoded data in the transmission step from the server device for each preset unit. An image processing method comprising: transmitting to the server device as a second command .
コンピュータに請求項に記載の画像処理方法を実行させるためのコンピュータプログラム。 A computer program for causing a computer to execute the image processing method according to claim 3 . 請求項に記載のコンピュータプログラムを格納したことを特徴とするコンピュータ読み取り可能な記憶媒体。And characterized by storing a computer program according to claim 4, a computer-readable storage medium.
JP2002356736A 2002-12-09 2002-12-09 Image processing method Expired - Fee Related JP3958198B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002356736A JP3958198B2 (en) 2002-12-09 2002-12-09 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002356736A JP3958198B2 (en) 2002-12-09 2002-12-09 Image processing method

Publications (2)

Publication Number Publication Date
JP2004193752A JP2004193752A (en) 2004-07-08
JP3958198B2 true JP3958198B2 (en) 2007-08-15

Family

ID=32756986

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002356736A Expired - Fee Related JP3958198B2 (en) 2002-12-09 2002-12-09 Image processing method

Country Status (1)

Country Link
JP (1) JP3958198B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4738869B2 (en) * 2005-04-07 2011-08-03 株式会社リコー Image transmission method, image transmission program, recording medium, and image transmission apparatus
US9641846B2 (en) * 2010-10-22 2017-05-02 Qualcomm Incorporated Adaptive scanning of transform coefficients for video coding
KR102222871B1 (en) * 2019-02-22 2021-03-04 삼성전자주식회사 Display apparatus and Method of displaying image thereof

Also Published As

Publication number Publication date
JP2004193752A (en) 2004-07-08

Similar Documents

Publication Publication Date Title
JP4377103B2 (en) Image processing for JPEG2000 in a server client environment
US7580577B2 (en) Methods, apparatus and computer products for generating JPEG2000 encoded data in a client
JP4716645B2 (en) Document viewing method
JP4603947B2 (en) Image communication system, server apparatus and control method therefor, and computer program
JP4709493B2 (en) Method and product for communicating compressed digital images
JP4934462B2 (en) Method, server and computer program for accessing partial document images
EP3333715A1 (en) Cache system and method for generating uncached objects from cached and stored object components
US20030067627A1 (en) Image processing method and its data cache method
JP2004274759A (en) Communication method and device for compressed digital image with limited access and server/client transfer
US7558430B2 (en) Apparatus method and computer-readable medium for processing hierarchical encoded image data
JP2005130470A (en) Image processing method and apparatus
US7721971B2 (en) Image processing system, image processing method and computer readable information recording medium
JP2005012685A (en) Image processing method and image processing apparatus
JP4789192B2 (en) Code processing apparatus, program, and information recording medium
JP3958198B2 (en) Image processing method
JP2004199291A (en) Scroll display method and device
JP4065535B2 (en) Code data creation method and apparatus
JP3768866B2 (en) Method and apparatus for creating encoded data
JP5146145B2 (en) Image processing apparatus, image processing method, computer program, and information recording medium
JP4125087B2 (en) Image processing method
JP2004145759A (en) Image processing method
JP2003224704A (en) Image processing method and image processor
JP2007142581A (en) Image processing method and image processing unit
JP5141886B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP2006319482A (en) Image processor and its control method, computer program, and computer-readable storage medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070327

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070509

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100518

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110518

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120518

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120518

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130518

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140518

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees