JP4065535B2 - Code data creation method and apparatus - Google Patents
Code data creation method and apparatus Download PDFInfo
- Publication number
- JP4065535B2 JP4065535B2 JP2003201162A JP2003201162A JP4065535B2 JP 4065535 B2 JP4065535 B2 JP 4065535B2 JP 2003201162 A JP2003201162 A JP 2003201162A JP 2003201162 A JP2003201162 A JP 2003201162A JP 4065535 B2 JP4065535 B2 JP 4065535B2
- Authority
- JP
- Japan
- Prior art keywords
- encoded data
- data
- unit
- tile
- code data
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、ネットワークを介して受信した断片的な画像データから符号データを作成する技術に関する。
【0002】
【従来の技術】
インターネット上では、WWWサーバにWeb(ウエブ)ブラウザからアクセスして文書データや画像データ等の情報を閲覧することが盛んに行われている。このように、インターネット上に情報を公開するWWWサーバと、その情報を閲覧するためのクライアントとを含むシステム環境において、各クライアントではウエブブラウザを使用して、WWWサーバによって公開された情報を閲覧することができる。
【0003】
WWWサーバには、通常、ホームページといわれる公開するための情報をHTMLで記述した文書が保存されており、それにクライアント側のウエブブラウザがアクセスしてクライアント側のコンピュータに表示する。また、クライアント側のウエブブラウザは、表示しているページ内のリンクを辿っていくことにより、必要な情報を得ることができる。さらに、WWWサーバが管理しているファイルをダウンロードする方法として、File Transfer Protocol (以下、「FTP」と略す。)という方法がある。このFTPとは、ネットワークを通して、WWWサーバ上にあるファイルの内容を一度にクライアント側のコンピュータに転送する仕組みのことである。
【0004】
また、サーバが管理する画像ファイルへ断片的にアクセスして、クライアントで表示するためのプロトコルとして、Flashpix/IIPがある。このインターネット・イメージング・プロトコル(IIP)は、Flashpixという画像データファイルフォーマットに最適なプロトコルになっており、ネットワークを通して画像データの一部分を要求できるものである。このときのアクセスは、Flashpixのタイル単位に行われる。
【0005】
一方、このFlashpix/IIPをそのままJPEG2000に適用した場合を考える。ここで、JPEG2000では、各スケーラビリティ(Scalability)の符号データは、そのスケーラビリティより1つ下のスケーラビリティのデータとの差分データで構成されている。そこで、クライアント側で受信した断片的な符号データをキャッシュしておき、全符号データをデコーダに引き渡して最初から再デコードする方法と、デコーダを途中で止めておいて今回受信した符号データをデコーダに渡し、前回の続きからデコードする方法とがある。
【0006】
このような方法のうち、マルチ解像度データを有する画像符号データの中から必要な部分のデータのみを取り出して別の符号データに変換する方法が従来から提案されている(例えば、特許文献1参照)。
【0007】
上記特許文献1においてソースとなる画像データは、ウェーブレット(Wavelet)変換、或いはWavelet-likeな変換を用いて、マルチ解像度のデータを管理することが可能な符号データである。そして、このソースとなる符号データの中から、ユーザが選択した空間的な領域のデータを処理するために必要な符号データを取り出し、1つの独立した符号データに変換する方法が記載されている。尚、この時ソースの符号データから取り出される部分的な符号データは、JPEG2000のコードブロックに対応しており、今回のユーザからの要求を処理するために必要な符号データを含んでいる。
【0008】
ここで、サーバから送られてくる符号データをクライアント側で最初から再デコードする場合、それらの断片的な符号データをキャッシュのような仕組みを持たないで、直接、JPEG2000準拠の1つの符号データファイルに作り直すことが可能である。
【0009】
【特許文献1】
米国特許第6041143号明細書
【0010】
【発明が解決しようとする課題】
しかしながら、サーバ側から送られてくる断片的な符号データは、クライアント側から要求する順に送られてくるため、クライアント側で受信した符号データをJPEG2000準拠の1つの符号データに変換するためには、クライアント側での煩雑な処理が必要であるという問題点がある。
【0011】
また、サーバから送られてきた断片的な符号データを独自形式のキャッシュファイルとして構成し、クライアント側のJPEG2000デコーダが直接このキャッシュファイルをリードすることも可能である。しかし、この場合、JPEG2000デコーダには独自のキャッシュファイルをリードするための処理が必要となり、処理が複雑になると共に、汎用のJPEG2000デコーダが使えないという問題点がある。
【0012】
そこで、JPEG2000符号データをパケット(packet)単位で受信し、それらのpacketデータをキャッシュしておいて、デコーダへ符号データを渡す際に、まだ受信していないpacketデータ部分に、zero length packet(以下、「ZLP」と略す。)データを挿入し、既に受信したpacketデータとあわせて、1つのJPEG2000準拠の符号ファイルを作成することで、メインヘッダの書き換えなどの煩雑な処理を行わずに、一般的なJPEG2000デコーダで処理可能なJPEG2000ファイルを作成することが考えられる。
【0013】
しかし、受信した全てのpacketデータを利用して作成された符号データは、クライアント側のアプリケーションを使っているユーザの要求した画像サイズ、画質及び画像領域等において、ユーザの望む表示形態を考慮していない。そのため、このような符号データを受け取ったデコーダでは、その一部のデータから生成されたデコード結果を利用して表示画面が作成されることがあり、キャッシュされている全ての符号データを使って1つのJPEG2000符号データファイルを作ることは、デコーダ自体の処理にも無駄な処理が生じるという問題がある。
【0014】
さらに、キャッシュされている符号データが多くなるほど、デコーダへ渡す符号データを作成するときに発生するデータのコピー作業が多くなる。これは、クライアントの表示に要するまでの時間が長くなることにつながり、パフォーマンス低下という問題が生じる。特に、画像の拡大やスクロールという命令をユーザが行うことで、表示に直接必要のないキャッシュデータが多くなり、上記の問題が頻繁に起こることになる。
【0015】
さらにまた、上記特許文献1には、以下のような問題点がある。すなわち、上記特許文献1に記載の技術をネットワークを通した通信であるIIPにそのまま適用した場合、クライアントからの要求毎に全階層の全コードブロックの符号データを送ることになり、クライアント側で既に受信済みの符号データまでも送信することになる。また、送信する符号データのヘッダ部分は、今回要求した画像データの情報(例えば、画像サイズ、階層情報等)に書き換えられてしまい、サーバで管理されている符号データの本来の情報を取得することができない。
【0016】
本発明は、このような事情を考慮してなされたものであり、クライアントにキャッシュされている断片化された符号データと、サーバから必要な分だけ受信した断片化された符号データとを用いて、クライアントにおいて汎用JPEG2000デコーダで使用可能な符号データであって、当該符号データのデコード及び画像データの表示処理を高速に行うことができる符号データを好適に作成することができる符号データ作成方法及び装置を提供することを目的とする。
【0017】
【課題を解決するための手段】
上記課題を解決するため、本発明の符号化データ作成方法は以下の構成を備える。すなわち、
複数のタイルに分割されてJPEG2000符号化された符号化画像データを、タイル、レイヤ、解像度、コンポーネント、ポジションで表わされる階層構造の要素の単位符号化データとして記憶管理するサーバから、前記単位符号化データをダウンロードし、復号用の新たな符号化データファイルを生成するクライアントにおける符号化データ作成方法であって、
復号すべき画像中の領域、及び、出力する画像サイズの指定に応じて、必要となる単位符号化データを特定し、特定した単位符号化データを前記サーバに要求する要求工程と、
単位符号化データが前記階層構造中のいずれに属するのかを、タイル単位に管理する管理テーブルを作成する作成工程と、
前記要求工程による要求結果、受信した単位符号化データを所定のメモリにキャッシュすると共に、キャッシュする単位符号化データの前記メモリ内の所在位置を示す情報で、該当するタイルの管理テーブルを更新する更新工程と、
該更新工程による前記管理テーブルの更新に応じて、前記メモリにキャッシュした単位符号化データと、未要求の単位符号化データについては該当する単位符号化データが存在しないことを示すコードとで構成されるJPEG2000形式の符号化データファイルを、タイル単位に生成する符号化データファイル生成工程とを備え、
前記要求工程は、復号すべき画像中の新たな領域、又は、新たな出力する画像サイズの指定があった場合、前記管理テーブルに基づき、復号に必要な単位符号化データ中の前記メモリに非キャッシュ状態にある単位符号化データを前記サーバに要求し、
更に、
前記管理テーブルに従い、全ての単位符号化データが前記メモリにキャッシュされているタイルが存在するか否かを判定する判定工程と、
該判定工程で全ての単位符号化データがキャッシュされているタイルが存在すると判定した場合、当該タイルに関するキャッシュされた単位符号化データに関する情報を管理テーブルから削除する削除工程とを備える。
【0018】
また、本発明に係る上記符号データ作成方法は、前記判定工程によって、前記独立した符号データを構成する全ての符号データが前記格納手段に格納されていると判定された場合、該格納手段に格納された該符号データを前記分割工程で分割された前記独立した符号データに置き換える置換工程をさらに有することを特徴とする。
【0019】
さらに、本発明は、第1のコンピュータが管理する符号データのうち、断片的な第1の符号データを格納した格納手段を備える第2のコンピュータにおける符号データ作成装置であって、
前記第1のコンピュータに管理された前記符号データのうち、断片的な第1の符号データを格納する第1の格納手段と、
前記第2のコンピュータにおいてJPEG2000符号データの作成に必要となる符号データと、前記格納手段に格納された前記第1の符号データとから、不足する第2の符号データを算出する算出手段と、
前記第1のコンピュータに対して、算出された前記第2の符号データを要求する要求手段と、
前記第1のコンピュータから、前記第2の符号データを取得する取得手段と、
取得された前記第2の符号データを格納する第2の格納手段と、
取得された前記第2の符号データのヘッダ情報を解析して、前記符号データを複数の独立した符号データに分割する分割手段と、
前記分割手段で分割された単位毎に、前記独立した符号データを構成する全ての符号データが前記第1又は第2の格納手段に格納されているか否かを判定する判定手段と、
前記独立した符号データを構成する全ての符号データが格納されていない場合、格納されていない部分にダミー符号データを格納する第3の格納手段と、
前記第1、第2及び第3の格納手段に格納された符号データを用いてJPEG2000符号データを作成する作成手段と
を備えることを特徴とする。
【0020】
【発明の実施の形態】
以下、図面を参照して、本発明の実施形態について詳細に説明する。
【0021】
<第1の実施形態>
図1は、ネットワーク上に複数のコンピュータが接続されている様子を示す図であり、本発明の第1の実施形態に係るサーバ及びクライアントを含むネットワークシステムの構成を示す概要図である。
【0022】
図1において、100はインターネットに代表されるネットワークである。101、103は、ネットワーク100に接続されているサーバ・コンピュータであり、画像データを送信するためのJPEG2000用のIIPサーバを始めとして、WWWサーバ機能に必要なソフトウェアが実行されている。また、大量の画像データも格納されている。また、102a、102bはクライアント・コンピュータであり、ウエブブラウザやJPEG2000デコーダ等のクライアント側で必要なソフトウェアが実行されている。
【0023】
図2は、図1のサーバ・コンピュータ101、103又はクライアント・コンピュータ102a、102bの各コンピュータシステムのハードウェア構成の一例を示す図である。図2において、201はCPUであり、システム全体の制御等を行っている。202はキーボードであり、マウス201aと共に本システムに対して情報等を入力するために使用される。また、203は表示部であり、CRTや液晶ディスプレイ等で構成されている。
【0024】
一方、204はROM、205はRAMであり、本システムにおける記憶装置を構成しており、システムが実行するプログラムやシステムが利用するデータ等を記憶する。また、206はハードディスク装置、207はフレキシブルディスクであり、本システムのファイルシステムに使用される外部記憶装置を構成している。さらに、208はプリンタである。さらにまた、209はネットワークを制御する部分であり、ここからネットワーク100(例えば、インターネット等)上に接続されているサーバ・コンピュータ等のネットワーク上の資源にアクセスする。
【0025】
本実施形態では、既に生成済みのJPEG2000ファイルがサーバ・コンピュータで管理されている。一方、クライアント・コンピュータでは、画像表示アプリケーション等を用いてユーザが要求したJPEG2000ファイル内の必要な部分のみを、JPEG2000用IIPを使用して上記サーバ・コンピュータにアクセスし、符号データを断片的に受信し、受信した断片的な符号データをクライアント・コンピュータ上の例えばハードディスク206等にキャッシュする。
【0026】
以下では、ハードディスク206等にキャッシュされた断片的なJPEG2000符号データを、JPEG2000のデコーダに渡すJPEG2000準拠の符号データに変換する部分について説明する。
【0027】
また、ユーザは、Windows(登録商標)マシン等を使用してホームページを開き、そこに書かれているJPEG2000の画像へのリンクをクリックすることで、JPEG2000の画像をユーザの用途に適した画像サイズや解像度で表示するために必要な断片的なデータを取得し、キャッシュする。そして、それらのキャッシュデータから一つのビットストリームを作り出し、デコードし、表示するという場合を想定する。
【0028】
ここで、一般的なJPEG2000の符号データについて説明する。図3は、Layer-resolution level-component-position progression(以下、「SNR Progression」と記す。)に沿って記録されたJPEG2000ファイルの構成を示す概念図である。SNR Progressionに準じた場合、layer/resolution/component/positionの順に記録される。このような符号データの並び方を規定することは、「progression order」と呼ばれる。
【0029】
また、図4は、JPEG2000の解像度スケーラビリティを説明する図である。すなわち、解像度(画像サイズ)とResolution番号との関係を示すための図である。図4では、最も小さい解像度の画像のresolution番号を0とし、resolution番号が1つ増加するごとに画像の幅と高さが2倍になっていく。また、各layer内は、resolution番号の小さい順にデータが格納されている。そして、Layer番号は、復元する画像の原画に対するS/N比に対応しており、layer番号が小さいほどS/N比が悪くなる。
【0030】
さらに、1つのJPEG2000ファイル内でのresolution番号、layer番号及びcomponent番号の最大値は、エンコーダによって予め設定されており、そのパラメータに従ってエンコードされており、その情報は符号データの中に格納されている。また各packetは、そのpacket内に格納されているcode-blockの情報を管理しているpacket header部と、各code-blockの符号データとから構成されている。
【0031】
このようなJPEG2000符号データを使うことによって、ユーザは、サーバにある全ての画像データを取得する必要がなく、クライアント側で表示等するために必要な部分の符号データのみをサーバから受信すればよい。尚、ユーザ側(クライアント・コンピュータ)の受信データの単位としては、JPEG2000のpacket、或いはpacketよりも更に小さい符号化単位であるコードブロック単位が考えられる。本実施形態では、ユーザがサーバから受信するデータ単位としてpacket単位を想定する。
【0032】
図5は、第1の実施形態におけるサーバとクライアント間でのpacket単位のデータのリクエスト及びレスポンスを説明するための概念図である。
【0033】
図5において、クライアント501はサーバ502に画像のタイル番号、resolution levelと、layer、component、position番号を指定して必要なデータを要求する。そして、サーバ502は、画像503のコードストリームを解析して、指定された画像のタイル番号、resolution levelとlayer、component、position番号に相当するpacketデータを抜き出してクライアント501に送り返す。
【0034】
次に、図6A及び図6Bを用いて本実施形態で使用するサーバ・コンピュータで管理されているJPEG2000ファイルの一例について説明する。図6Aは、サーバ・コンピュータに格納されている原画像データをタイルに分割した例を示す図である。図6Aでは、縦横とも各々4つのタイル、すなわち画像全体で16個のタイルに分割した例が示されている。
【0035】
また、図6Bは、図6Aで示したタイル分割された画像データに関するJPEG2000符号データ(すなわち、当該画像データを「SNR Progression」でエンコードしたデータ)のデータ構造を示す図である。図6Bに示される符号データは、layerは0〜2の3種類(Lay0、Lay1、Lay2)、resolution levelは、0〜3の4種類(Res0、Res1、Res2、Res3)、componentとpositionは各1種類(Com0、Pos0)である場合のJPEG2000で符号化した時の符号データの構成例である。
【0036】
例えば、JPEG2000の最大解像度の画像サイズを1024×1024画素とした場合、各タイルの画像サイズは256×256画素となる。また、各タイルが4種類のresolution levelを持つ場合の各解像度での画像サイズは、256×256、128×128、64×64、32×32画素となる。
【0037】
さらに、JPEG2000符号データ内のメインヘッダ部分については、図6Bに示すように、画像サイズを示すパラメータであるXsiz、Ysizが共に1024であり、画像全体の画像サイズを示している。一方、タイルのサイズを示すXTsiz、YTsizは、上述したタイルのサイズである256の値を持っている。これらのパラメータにより、このJPEG2000符号データは、16個のタイルに分割された符号データを有することになる。そして、これらの各タイルの符号データが、図6Bに示すように「Tile part Header」で区切られて格納されている。
【0038】
図7は、第1の実施形態におけるクライアント・コンピュータ上のアプリケーションでの処理手順の概要を説明するためのフローチャートである。本実施形態においては、クライアント側では、JPEG2000画像表示アプリケーションが起動しており、図7に示されるフローチャートは、表示したいJPEG2000ファイルをウエブ等の別の手段で指定した後、画像を表示する部分の処理フローである。
【0039】
まず、これからの処理を制御するための内部変数(パラメータ)を初期化する(ステップS707)。具体的には、指定されているJPEG2000ファイルの画像サイズや、エンコード・パラメータ等の情報をサーバに対して問い合わせ、図13に示すこれから表示する符号化データのキャッシュを管理するための情報をメモリやファイル上に作成し、その変数(パラメータ)等を初期化する。すなわち、図13は、クライアント側で制御している符号データのキャッシュの論理構造を説明するための図である。図13において、1300は、キャッシュファイル全体の論理構造であり、図に示すように、キャッシュ全体に関する画像管理情報フィールド1302、Main header dataフィールド1303、各Tileに関するデータフィールド1301に分けることができる。
【0040】
ここで、Tileに関するデータフィールド1301には、この画像データをTile分割した時のTileの個数分のフィールドが存在する。1304は、Tileに関するデータのフィールド1301の詳細を示したものである。この中には、Tileデータ管理用データフィールド1304a、Tile headerフィールド1304b、packetデータ管理用データ1304cに分けられる。尚、packetデータ管理用データフィールド1304cは、Tile内に存在するpacketの個数分のフィールドがある。
【0041】
次に、Tileデータ管理用データフィールド1304aの詳細を1305に示す。Tileデータ管理用データフィールド1304aは、1305に示すように、Tileのデータ長1305a、Tile番号1305b、packet数1305c、Resolution数1305d、Layer数1305e、Component数1305f、Position数1305gの各パラメータから成る。
【0042】
さらに、packetデータの管理用データ1304cの詳細を1306に示す。packetデータの管理用データ1304cは、1306に示すように、packetのデータ長1306a、ポインタ値1306b、packet番号1306c、packetの基本情報1306dから成る。サーバから受信した実際のpacketのデータは、ポインタ値1306bで示すポインタの先に保存される。
【0043】
図13からも分かるように、packetデータをフル充填した場合は、テーブルを管理するための情報等が数多く存在するため、サーバで管理している元の符号データのバイト数よりも大きくなってしまう。すなわち、クライアント側では、このキャッシュ情報と、キャッシュ情報から1つの符号データを生成するため、クライアント側で管理する符号データ関連のバイト数は、全タイルがフル充填されたときに最大となり、その時のサイズは、サーバで管理している元の符号データのサイズの2倍以上になる。尚、これらの各Tileに関するデータ1304は、ファイルに格納され、1300内の1301で示すフィールドには、ファイル名で該当するデータと関連付けを行っているものとする。
【0044】
ステップS707で内部変数が初期化された後、ユーザが表示のための操作を行う(ステップS700)。例えば、アプリケーション起動時の指定されたファイルの1回目の表示では、開いたウィンドウサイズに収まる画像サイズを計算して、当該ウィンドウサイズに一致する画像サイズで表示するようにする。そして、その後に本ステップS700でユーザの操作を受け付けるようにしてもよい。
【0045】
次に、上記ステップS700でのユーザ操作により新たに必要になったpacketを全て算出する(ステップS701)。その後、ステップS701で算出した新規に必要となったpacketのデータについてサーバに対して要求を発行する(ステップS702)。次いで、要求した全packetのデータをサーバから受信し、クライアント・コンピュータ上にキャッシュする(ステップS703)。
【0046】
さらに、高速読み出しが可能なようにキャッシュ形式で管理している符号データを複数のJPEG2000符号データ形式に変換することによって符号データの作成を行う(ステップS704)。この符号データの作成処理の詳細については後述する。その後、ステップS704で作成したJPEG2000符号データをデコードして表示する(ステップS705)。そして、ユーザが終了を要求したか否かを判定する(ステップS706)。その結果、ユーザが終了を要求した場合(Yes)、本アプリケーションを終了する。一方、ユーザが終了を要求せずに他の表示要求を行った場合(No)、ステップS701に戻って上記処理を実行する。
【0047】
以下では、上記クライアント・コンピュータ上のアプリケーションでの処理手順の具体的な処理内容について説明する。
【0048】
まず、クライアント・アプリケーションが起動した直後で、このアプリケーションの初期画像表示サイズを128×128画素とし、このサイズに入る画像データを表示することを考える。この場合、ステップS702で算出される必要なpacketは、最低解像度の画像サイズであってSNRが最大のデータを表示することを考えると、図6B内のタイル0からタイル15までの全16タイルにおける、「Lay0/Res0/Com0/Pos0」、「Lay1/Res0/Com0/Pos0」、「Lay2/Res0/Com0/Pos0」で示す3×16個のpacketが必要なpacketである。
【0049】
そこで、クライアント・プログラムは、これらのpacketをサーバ・プログラムに要求する。一方、サーバ・プログラムは、この全タイルの3×16個のpacketを切り出す処理を行う。その後、クライアント・プログラムは、これらのpacketを受信した後デコードして表示を行う。
【0050】
次に、図7のステップS704における符号データ作成についての詳細な説明を図8〜10を用いて行う。図8Aは、図7におけるステップS704符号データ作成処理の概要を説明するためのフローチャートである。まず、サーバから受信した必要なpacketに関するJPEG2000符号データのメインヘッダを解析する(ステップS800)。次に、ステップS800におけるメインヘッダを解析した結果から、符号データ内のタイルの個数を計算する(ステップS801)。本実施形態においては、タイルの個数の計算は、以下に示す式(1)で行うものとする。
【0051】
Xtiles = (Xsiz + XTsiz − 1) / XTsiz
Ytiles = (Ysiz + YTsiz − 1) / YTsiz (1)
Tiles = Xtiles × Ytiles
そして、式(1)で求められたタイルの個数だけ、ステップS802以下の処理が行われる。
【0052】
ステップS802は、各タイルの符号変換処理を行う部分である。この処理の詳細については後述する。そして、全タイルについての符号変換処理が終了したか否かを判断する(ステップS803)。その結果、未処理のタイルがある場合(No)、ステップS802に戻る。一方、全タイルについて符号変換処理が終了した場合(Yes)、本処理を終了してステップS705に進む。
【0053】
図8Bは、ステップS802における符号変換処理を詳細に説明するためのフローチャートである。まず、今回処理するタイルがフル充填、すなわち全packetデータがキャッシュされているか否かを判断する(ステップS804)。具体的には、図13に示すpacketのデータ長1306a、或いはpacketデータへのポインタ値1306bを見ることで判断できる。これらの値は、未受信の場合は「0」であり、packetデータを受信すると、packetデータのバイト数や、実際に格納されているアドレス或いはファイル名等の各値が格納される。これにより、このタイル内の全てのpacketに対して、データ長1306a或いはポインタ値1306bの値を判断し、各値が「0」でなければフル充填であると判断できる。逆に、1つでも「0」の値が存在すれば、まだフル充填ではないと判断することができる。その結果、フル充填されている場合(Yes)、ステップS805に進み、それ以外の場合(No)、ステップS807に進む。
【0054】
ステップS805では、フル充填状態の符号データを作成したか否かを判断する。その結果、まだ作成されていない場合(No)はステップS806に進み、作成済みの場合(Yes)は当該符号変換処理を終了する。ステップS806では、完全符号データを作成したことを示すフラグをセットする。当該フラグのセットに係る処理の詳細については後述する。そして、実際のキャッシュデータから符号データを作成する「符号ファイル作成」処理が行われる(ステップS807)。この符号ファイル作成処理の詳細については後述する。
【0055】
ここで、図8のステップS806の詳細な処理内容について説明する。図14は、図8のステップS806の完全符号データ作成済を示すフラグのセットを詳細に説明するためのフローチャートである。この処理は比較的容易であり、まず、フル充填されたタイルのTileデータ管理用データ1304のファイルを削除する(ステップS1400)。これにより、図13で示すTileに関するデータ1304、Tileデータの管理用データ1305、Packetデータの管理用データ1306の領域が削除される。次に、図11等で示すタイル毎の符号データファイルに置き換えて完全符号データをセットする(ステップS1401)。すなわち、完全符号データ作成済を示すフラグのセットとは、図13に示す1300内の1301で示すTileに関するデータの値を変更することである。
【0056】
上記処理を行うことにより、当該処理後にクライアントのアプリケーションがこのタイルのデータを必要とするときは、1301で示すフィールドに格納されているファイル名をアプリケーションに渡すだけでよく、データ変換等の処理は全く発生せず、高速に行うことができる。さらに、キャッシュとして保持しなければならないデータ量が、管理テーブルの形で保持する場合よりも符号データを直接持つことになるため、データ容量的に小さくて済む。
【0057】
また、タイルがフル充填されているか否かの判断は、キャッシュとして保持されているTileのデータ長のフィールド1305aを確認すればよい。図15は、タイルがフル充填されて完全な符号データに置き換わった時の状態を示す図である。具体的な確認方法は、図15に示されるフィールドを16ビット長の整数のフィールドとする場合、フル充填されて置き換えた場合は、符号データの先頭16ビットになる。この場合、符号データの先頭は、SOCマーカ・コード(0xFF4F)であり、整数でこの値を読むと先頭のビット(15ビット目)が"1"であるので、負の値になる。32ビット長の整数としても結果は同じであり、SOCマーカ・コード、SIZマーカ・コードであるので、(0xFF4FFF51)である。すなわち、Tileデータの管理用データの先頭を必要なビット数の整数としてリードした場合、正の整数の場合はまだ充填中であり、負の整数の場合は、フル充填で符号データに変換済みであると容易に判断することができる。
【0058】
上述したように、1度フル充填されたキャッシュデータから符号ファイルを生成した後は、再度符号ファイル作成処理(ステップS807)を行わないように制御することにより、キャッシュが充填されて行くに連れて、符号ファイル作成処理を高速に行うことができる。
【0059】
図9は、図8に示すステップS807の符号ファイル作成処理を詳細に説明するためのフローチャートである。まず、タイルに含まれるpacketの数をiPMaxにセットする(ステップS900)。次に、「Tile part Header」を仮出力する(ステップS901)。ここで仮出力するのは、この「Tile part Header」にはタイルの符号長を格納するフィールドがあり、このタイルの符号長は以下の処理を終了した時点で計算できる値であるためである。
【0060】
次に、変数iP、iLに初期値として「0」をセットする(ステップS902、S903)。ここで、変数iPはpacketのIDを示す変数であり、変数iLはタイルの符号長を示す変数である。次に、変数iPで示されるpacketがキャッシュされているか否かを判断する(ステップS904)。その結果、変数iPがキャッシュされている場合(Yes)はステップS905へ進み、変数iPがキャッシュされていない場合(No)はステップS907に進む。
【0061】
ステップS907では、該当するpacketデータが無いことを示す「Zero Length Packet」のコード(以下、「ZLPコード」と略す。)を出力する。そして、このZLPコードのバイト数である「1」を変数iLに加える(ステップS908)。一方、ステップS905では該当するpacketのデータを出力する。そして、そのバイト数を変数iLに足し込んで更新する(ステップS906)。
【0062】
ステップS906及びS908の処理の後、変数iPをインクリメントする(ステップS909)。そして、全packetについて処理したかを判断する(ステップS910)。その結果、まだ全packetを処理していない場合(No)、ステップS904に戻って上記処理を行う。一方、全packetを処理した場合(Yes)、変数iLから「Tile part Header」である「SOTマーカ」を更新して出力し(ステップS911)、当該符号ファイル生成処理を終了する。そして、前述したように当該符号ファイルを汎用のJPEG2000デコーダでデコードし、デコードされた画像データを表示する(ステップS705)。
【0063】
すなわち、上述したように、本実施形態に係るクライアントは、サーバが管理する符号データのうち、断片的な第1の符号データを格納した格納手段(例えば、ハードディスク206)を備え、JPEG2000符号データを作成する符号データ作成装置として機能する。本実施形態に係るクライアントでは、まず、当該クライアントにおいてJPEG2000符号データの作成に必要となる符号データと、予めハードディスク206等の格納手段に格納された第1の符号データ(例えば、現在表示部203に表示されている画像データについての符号データ)とから、不足する第2の符号データ(例えば、表示部203で拡大表示するために必要な画像データについての符号データであって、第1の符号データには含まれていないもの)を算出する。そして、サーバに対して、算出された第2の符号データを要求し、サーバから、第2の符号データを取得し、取得された第2の符号データをハードディスク206等の格納手段に格納する。次いで、取得された第2の符号データのヘッダ情報を解析して、対象となる符号データを複数の独立した符号データに分割する。さらに、分割された単位毎に、独立した符号データを構成する全ての符号データがハードディスク206等の格納手段に格納されているか否かを判定する。そして、独立した符号データを構成する全ての符号データが格納されていない場合、格納されていない部分にダミー符号データを格納し、格納された符号データをJPEG2000符号データとして出力することを特徴とする。
【0064】
また、上記クライアント(符号データ作成装置)では、符号データが、パケット単位で取り扱われることを特徴とする。さらに、上記クライアント(符号データ作成装置)では、ダミー符号データが、JPEG2000で規定されているzero length packetデータであることを特徴とする。さらにまた、上記サーバとクライアントが、ネットワークを介して互いに通信可能であることを特徴とする。
【0065】
さらに、上記クライアント(符号データ作成装置)は、画像データを表示する表示手段(例えば、表示部203)をさらに備え、上記第1の符号データが当該画像データの符号データであって、表示部203等の表示手段に表示された画像データの表示領域の移動又は拡大表示に応じて、上記第2の符号データの算出において必要となる符号データを設定する。また、上記クライアント(符号データ作成装置)は、出力された上記JPEG2000符号データをしてデコードし、デコードされた画像データを表示部203等の表示手段に画面表示することを特徴とする。
【0066】
ここで、具体例を用いて、上記フローチャートで示した符号ファイル作成処理を説明する。図10は、本発明の第1の実施形態における初期画面での符号ファイル処理後の各タイルの符号ファイルの構成を示す図である。ここで、クライアント・コンピュータから要求されるpacketは、前述のとおり全タイルの「Lay0/Res0/Com0/Pos0」、「Lay1/Res0/Com0/Pos0」、「Lay2/Res0/Com0/Pos0」である。
【0067】
従って、図10に示すように、全16個のタイルに対して、符号1001で示すように上記3つのpacketデータ以外のpacketについてはZLPが格納された符号データが作成される。また、各タイル毎に作成される符号データのメインヘッダ部分は、メインヘッダ内のSIZマーカコード内のXsiz、Ysizの各フィールドがタイルのサイズである256に変更されている。これにより、各タイル毎に独立した符号ファイルを作成することができる。
【0068】
すなわち、本実施形態に係るクライアント(符号データ作成装置)では、符号データ(画像データ)を所定サイズのタイル単位(例えば、式(1)に記載の方法で算出された単位)で分割することを特徴とする。また、同クライアントでは、独立した符号データのそれぞれのヘッダ情報を、分割されたタイル単位のサイズに変更することを特徴とする。
【0069】
次に、ステップS701でユーザから拡大表示が指示された場合について説明する。この拡大表示では、まず初期画面より2倍に拡大するものとする。この場合、表示ウィンドウサイズは128×128画素であるとすると、表示できるタイルは4個になる。例えば、図6Aに示すTile5、Tile6、Tile9、Tile10の4個のタイルのResolution1(画像サイズ:64×64画素)を表示するものとする。この場合、ステップS702では、Tile5、Tile6、Tile9、Tile10の4つのタイルの「Lay0/Res1/Com0/Pos0」、「Lay1/Res1/Com0/Pos0」、「Lay2/Res1/Com0/Pos0」がクライアント・コンピュータからサーバに対して要求される。
【0070】
さらに、ユーザから2倍に拡大する要求が発行された場合、表示ウィンドウサイズを128×128画素から256×256画素に変更すると、上記4タイルに対してさらに、「Lay0/Res2/Com0/Pos0」、「Lay1/Res2/Com0/Pos0」、「Lay2/Res2/Com0/Pos0」が要求される。
【0071】
その後、さらに、2倍に拡大する要求がユーザからあったとする。この場合、表示領域のウィンドウサイズを変更しないとすると、タイルが1つ分しか表示することができない。そこで、Tile5のみを表示するとすると、Tile5の「Lay0/Res3/Com0/Pos0」、「Lay1/Res3/Com0/Pos0」、「Lay2/Res3/Com0/Pos0」をサーバに要求し表示することになる。これにより、Tile5は完全にキャッシュが充填されたことになる。図11は、第1の実施形態における符号データの各タイル毎の符号ファイルの状態の一例を説明するための図である。
【0072】
図11に示すように、Tile0、Tile1、Tile2、Tile3、Tile4、Tile7、Tile8、Tile11、Tile12、Tile13、Tile14及びTile15の各タイルの符号ファイルは、図10に示したものと同様に符号1001で示す状態になっている。また、Tile6、Tile9及びTile10の各タイルは符号1101に示す状態に、Tile5は符号1102に示す状態になっている。この状態になるまでは、ステップS805における完全符号データを作成済みか否かの判断により全てステップS806に進むようになるが、Tile5の符号変換処理後はステップS805の判断後、ステップS806には進まずに処理を終了するようになる。これにより、Tile5については、これ以降、符号変換処理を行う必要がなくなる。これにより、キャッシュが充填されるほど符号ファイル作成処理を高速にすることができる。すなわち、本実施形態によれば、デコード/表示する領域をタイル単位で行う場合、デコード/表示に必要なタイルのみに対して処理を行うことができる。
【0073】
また、従来は、キャッシュファイルから1つのJPEG2000符号データファイルを生成する場合、表示するタイル毎のマルチスレッド化は困難であった。これは、1つの符号データファイルを生成するため、ここで処理をシリアライズすることが必須であったためである。しかし、本実施形態のように各タイル毎の符号データファイルを生成することにより、表示するタイル毎に必要なpacket要求からキャッシュファイルの生成、キャッシュファイルから符号データの作成、符号データのデコード及び表示までを各タイル毎スレッドとしてマルチスレッド化することができる。従って、これまでのシングルスレッドの場合に比べて、マルチスレッド化することによる高速化も図ることができる。
【0074】
さらに、ファイルI/Oの処理時間がかかるようなシステムにおいては、1つの大きな符号データファイルを作成する代わりに、小さな複数の符号ファイルを生成することで、ファイルI/Oによる時間のロスを最小限にすることも可能となる。
【0075】
<第2の実施形態>
上述した第1の実施形態では、キャッシュされている全てのタイルに対して符号変換処理を行うことを説明したが、本実施形態では、表示に必要な部分のタイルのみ符号変換処理を行うことにより、第1の実施形態よりもさらに高速に符号変換処理を行う場合について説明する。
【0076】
図12は、本発明の第2の実施形態に係る符号データ作成処理の概要を説明するためのフローチャートである。尚、上述した第1の実施形態における図8Aのフローチャートと同じ処理の部分には同一の番号を付けている。ここでは、第1の実施形態と異なる部分のみを説明する。
【0077】
ステップS801のタイル個数の計算の後、ステップS701でユーザが操作したコマンドを解析する(ステップS1200)。そして、この解析結果を使用して、これから処理しようとしているタイルが今回の表示で表示されるタイルか否かを判断する(ステップS1201)。その結果、ここで表示に使用しないタイルであると判断された場合(No)、ステップS803に進む。一方、表示に使用するタイルであると判断された場合(Yes)、ステップS1202に進む。
【0078】
ステップS1202では、ステップS703で新たにpacketを要求した場合に、今回処理しようとしているタイルのpacketを取得したか否かを判断する。その結果、新規packetを取得している場合(Yes)はステップS802に進み、新規packetを取得していない場合(No)はステップS803に進む。尚、これ以降の処理手順については、第1の実施形態で説明した手順と同様である。これらの処理により、表示に必要なタイルであって、まだ完全に充填されていないタイルのみ符号変換処理を行うことができるため、当該符号化処理を第1の実施形態よりも高速に行うことができる。
【0079】
<第3の実施形態>
以下、本発明の第3の実施形態に係る画像データ送信装置について、図面を参照して、詳細に説明する。本実施形態では、キャッシュから1本の符号データを作成する方法について説明する。尚、本実施形態に係るサーバ及びクライアントを含むネットワークシステムの構成は図1と同様であり、各コンピュータシステムのハードウェア構成も図2と同様である。また、クライアントコンピュータ上のアプリケーションでの処理手順についても図7に示すフローチャートと同様である。
【0080】
図16は、キャッシュから1本の符号データファイルを作成する場合の処理手順を説明するためのフローチャートである。図16に示すように、まず、キャッシュ内のフィールド1303で保持している情報をJPEG2000符号データ形式に則った形式に変換し、出力ファイルにメインヘッダ(Main Header)を出力する(ステップS1600)。次に、メインヘッダを解析した結果から、符号データ内のタイルの個数を計算する(ステップS1601)。尚、この際の計算式は、図8のステップS801の場合と同様である。そして、以下では、前述した式(1)で求められたタイルの個数だけ、ステップS1602以下の処理が行われる。
【0081】
そして、各タイルごとに、当該タイルがフル充填しており、タイルの完全な符号データがあるか否かを判断する(ステップS1602)。尚、この判断方法は、前述の通りである。その結果、フル充填されていると判断された場合(Yes)、ステップS1604へ進み、フル充填されていない場合(No)、ステップS1603へ進む。
【0082】
ステップ1603では、図9に示す符号ファイルの作成処理手順と同様にして符号ファイルを作成する。そして、この処理後はステップS1606へ移り、符号データを出力する。一方、ステップS1604以降では、タイルの完全な符号データからの変換が行われる。そこで、まず、メインヘッダ部分を読み飛ばす処理が行われる(ステップS1604)。この処理の具体例としては、例えば、図15に示す符号データの先頭からSOTマーカ・コードまでを読み飛ばせばよい。次に、タイルパートヘッダ(Tile part Header)内のタイルインデックス(Tile Index)の値を当該タイルのインデックス(Index)番号に置き換える(ステップS1605)。さらに、タイルパートヘッダ以降EOCマーカ・コードまで(但し、EOCマーカ・コードは含まない)をコピーする(ステップS1606)。そして、全タイルを処理したかどうかを判断し(ステップS1607)、未処理の場合(No)はステップS1602に戻って上記処理を繰り返す。一方、全タイルが処理された場合(Yes)は終了する。
【0083】
上述した処理によって、本実施形態に係る形式でのキャッシュファイルから、1本の符号データを簡単に、且つ、データ変換等の処理がないため高速に作成することができる。
【0084】
<その他の実施形態>
一般に、キャッシュファイルから1つのJPEG2000符号データファイルを生成する場合には、表示するタイル毎のマルチスレッド化は困難であった。なぜならば、1つの符号データファイルを生成するために、処理をシリアライズすることが必須であったからである。しかし、上述したように、各タイル毎の符号データファイルを生成することにより、表示のタイル毎に必要なpacket要求から、キャッシュファイルの生成、キャッシュファイルからの符号データの作成、符号データのデコード、表示までを各タイル毎スレッドとしてマルチスレッド化を行うことができる。そのため、これまでのシングルスレッドの場合に比べて、マルチスレッド化することによる高速化も図ることができる。
【0085】
尚、本発明は、複数の機器(例えば、ホストコンピュータ、インタフェース機器、リーダ、プリンタ等)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置等)に適用してもよい。
【0086】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体(または記憶媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記録した記録媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0087】
さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0088】
本発明を上記記録媒体に適用する場合、その記録媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。
【0089】
以上説明したように、本発明による上記実施形態で説明したファイル作成方法を用いれば、IIPを用いて送られてくるJPEG2000符号化データの断片的なデータをキャッシュし、このキャッシュファイルから通常のJPEG2000デコーダで処理できるJPEG2000符号化データを作る時に、今回のデコード及び表示に必要なタイル毎に独立したJPEG2000符号データファイルを生成することで、デコード/表示までの処理を高速に行うことができる。
【0090】
また、キャッシュを構成するための、或いはキャッシュから符号データを生成するためのデータ容量或いはファイル容量を最小限に抑えることが可能になる。さらに、キャッシュから符号データを生成する時も、データ変換等の処理を省略することができるため、高速に生成することができる。
【0091】
また、デコード/表示する領域をタイル単位で行う時、デコード/表示に必要なタイルのみに対して処理を行うことができる。さらに、マルチスレッド化による高速化も行うことができる。さらにまた、ファイルI/Oの処理時間がかかるようなシステムにおいては、1つの大きな符号データファイルを作る代わりに、小さな複数の符号ファイルを生成することで、ファイルI/Oによる時間のロスを最小限にすることも可能となる。あるいは、1つの符号データを作成するときでも、容易に変換を行うことができる。
【0092】
【発明の効果】
以上説明したように、本発明によれば、クライアントにキャッシュされている断片化された符号データと、サーバから必要な分だけ受信した断片化された符号データとを用いて、クライアントにおいて汎用JPEG2000デコーダで使用可能な符号データであって、当該符号データのデコード及び画像データの表示処理を高速に行うことができる符号データを好適に作成することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態に係るサーバ及びクライアントを含むネットワークシステムの構成を示す概要図である。
【図2】図1のサーバ・コンピュータ101、103又はクライアント・コンピュータ102a、102bの各コンピュータシステムのハードウェア構成の一例を示す図である。
【図3】 Layer-resolution level-component-position progression(SNR Progression)に沿って記録されたJPEG2000ファイルの構成を示す概念図である。
【図4】JPEG2000の解像度スケーラビリティを説明する図である。
【図5】第1の実施形態におけるサーバとクライアント間でのpacket単位のデータのリクエスト及びレスポンスを説明するための概念図である。
【図6A】サーバ・コンピュータに格納されている原画像データをタイルに分割した例を示す図である。
【図6B】図6Aで示したタイル分割された画像データに関するJPEG2000符号データのデータ構造を示す図である。
【図7】第1の実施形態におけるクライアント・コンピュータ上のアプリケーションでの処理手順の概要を説明するためのフローチャートである。
【図8A】図7におけるステップS704符号データ作成処理の概要を説明するためのフローチャートである。
【図8B】ステップS802における符号変換処理を詳細に説明するためのフローチャートである。
【図9】図8に示すステップS807の符号ファイル作成処理を詳細に説明するためのフローチャートである。
【図10】本発明の第1の実施形態における初期画面での符号ファイル処理後の各タイルの符号ファイルの構成を示す図である。
【図11】第1の実施形態における符号データの各タイル毎の符号ファイルの状態の一例を説明するための図である。
【図12】本発明の第2の実施形態に係る符号データ作成処理の概要を説明するためのフローチャートである。
【図13】クライアント側で制御している符号データのキャッシュの論理構造を説明するための図である。
【図14】図8のステップS806の完全符号データ作成済を示すフラグのセットを詳細に説明するためのフローチャートである。
【図15】タイルがフル充填されて完全な符号データに置き換わった時の状態を示す図である。
【図16】キャッシュから1本の符号データファイルを作成する場合の処理手順を説明するためのフローチャートである。
【符号の説明】
501 サーバ
502 クライアント[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for creating code data from fragmentary image data received via a network.
[0002]
[Prior art]
On the Internet, accessing a WWW server from a Web browser and browsing information such as document data and image data is actively performed. As described above, in a system environment including a WWW server for publishing information on the Internet and a client for browsing the information, each client uses a web browser to browse the information published by the WWW server. be able to.
[0003]
The WWW server normally stores a document describing information to be disclosed, which is called a home page, in HTML, which is accessed by a client-side web browser and displayed on a client-side computer. Also, the client-side web browser can obtain necessary information by following the links in the displayed page. Furthermore, as a method of downloading a file managed by the WWW server, there is a method called File Transfer Protocol (hereinafter abbreviated as “FTP”). FTP is a mechanism for transferring the contents of a file on a WWW server to a client computer at once through a network.
[0004]
Further, there is Flashpix / IIP as a protocol for fragmentally accessing an image file managed by a server and displaying it on a client. The Internet Imaging Protocol (IIP) is an optimal protocol for an image data file format called Flashpix, and can request a part of image data through a network. Access at this time is performed in units of tiles of Flashpix.
[0005]
On the other hand, consider the case where this Flashpix / IIP is applied to JPEG2000 as it is. Here, in JPEG2000, the code data of each scalability (Scalability) is composed of difference data from the scalability data one level lower than the scalability. Therefore, the code data received on the client side is cached, all the code data is transferred to the decoder and re-decoded from the beginning, and the code data received this time is stopped by stopping the decoder halfway. There is a method of passing and decoding from the previous continuation.
[0006]
Among such methods, a method has been conventionally proposed in which only a necessary portion of data is extracted from image code data having multi-resolution data and converted to another code data (see, for example, Patent Document 1). .
[0007]
The image data serving as a source in
[0008]
Here, when the code data sent from the server is re-decoded from the beginning on the client side, these pieces of code data do not have a mechanism like a cache, and directly, one code data file compliant with JPEG2000. It is possible to recreate it.
[0009]
[Patent Document 1]
US Pat. No. 6,041,143
[0010]
[Problems to be solved by the invention]
However, since fragmented code data sent from the server side is sent in the order requested from the client side, in order to convert the code data received on the client side into one code data compliant with JPEG2000, There is a problem that complicated processing on the client side is necessary.
[0011]
It is also possible to configure fragmented code data sent from the server as a cache file of a unique format, and the JPEG2000 decoder on the client side can directly read this cache file. However, in this case, the JPEG2000 decoder requires a process for reading an original cache file, which complicates the process and that a general-purpose JPEG2000 decoder cannot be used.
[0012]
Therefore, when JPEG2000 code data is received in units of packets, the packet data is cached, and when the code data is passed to the decoder, a zero length packet (hereinafter referred to as a zero length packet) This is abbreviated as “ZLP”.) By inserting data and creating a single JPEG2000-compliant code file together with the already received packet data, it is possible to perform general operations without rewriting the main header. It is conceivable to create a JPEG2000 file that can be processed by a typical JPEG2000 decoder.
[0013]
However, the code data created using all received packet data considers the display format desired by the user in the image size, image quality, and image area requested by the user using the client side application. Absent. Therefore, in a decoder that receives such code data, a display screen may be created by using a decoding result generated from a part of the data, and 1 using all the cached code data. Creating two JPEG2000 code data files has a problem that wasteful processing occurs in the processing of the decoder itself.
[0014]
Furthermore, the more code data that is cached, the more data copy operations that occur when creating code data to be passed to the decoder. This leads to an increase in the time required for display by the client, causing a problem of performance degradation. In particular, when the user issues a command for enlarging or scrolling the image, cache data that is not directly required for display increases, and the above problem frequently occurs.
[0015]
Furthermore, the above-mentioned
[0016]
The present invention has been made in view of such circumstances, and uses fragmented code data cached in the client and fragmented code data received from the server as much as necessary. Code data creation method and apparatus capable of suitably creating code data that can be used by a general-purpose JPEG2000 decoder in a client and capable of performing decoding processing of the code data and display processing of image data at high speed The purpose is to provide.
[0017]
[Means for Solving the Problems]
In order to solve the above problems, the present inventionThe encoded data creation method has the following configuration. That is,
Encoded image data divided into a plurality of tiles and encoded as JPEG2000 is stored in and managed as unit encoded data of hierarchical elements represented by tiles, layers, resolutions, components, and positions. In a client that downloads data and generates a new encoded data file for decodingAn encoded data creation method comprising:
According to the designation of the region in the image to be decoded and the image size to be output, the required unit encoded data is specified, and the requesting step of requesting the specified unit encoded data from the server;
A creation step of creating a management table for managing in units of tiles which unit encoded data belongs in the hierarchical structure;
Update of updating the corresponding tile management table with the information indicating the location of the unit encoded data to be cached in the predetermined memory as well as caching the received unit encoded data in the predetermined memory as a result of the request by the request step Process,
The unit encoded data cached in the memory in response to the update of the management table in the update step, and a code indicating that there is no corresponding unit encoded data for unrequested unit encoded data An encoded data file generation step for generating an encoded data file in JPEG2000 format in tile units,
In the requesting step, when a new area in the image to be decoded or a new output image size is designated, the requesting process is not performed in the memory in the unit encoded data necessary for decoding based on the management table. Request unit encoded data in cache state from the server,
Furthermore,
In accordance with the management table, a determination step of determining whether there is a tile in which all unit encoded data is cached in the memory;
A deletion step of deleting, from the management table, information on cached unit encoded data related to the tile when it is determined that there is a tile in which all the unit encoded data is cached in the determination step;Is provided.
[0018]
In the code data creation method according to the present invention, when it is determined by the determination step that all the code data constituting the independent code data is stored in the storage unit, the code unit is stored in the storage unit. The method further comprises a replacement step of replacing the code data thus obtained with the independent code data divided in the division step.
[0019]
Furthermore, the present invention is a code data creating device in a second computer comprising storage means for storing fragmented first code data among code data managed by the first computer,
Of the code data managed by the first computer, first storage means for storing fragmentary first code data;
Calculating means for calculating the second code data that is deficient from the code data required for creating JPEG2000 code data in the second computer and the first code data stored in the storage means;
Requesting means for requesting the calculated second code data to the first computer;
Obtaining means for obtaining the second code data from the first computer;
Second storage means for storing the acquired second code data;
Dividing means for analyzing the header information of the acquired second code data and dividing the code data into a plurality of independent code data;
Determining means for determining whether or not all the code data constituting the independent code data is stored in the first or second storage means for each unit divided by the dividing means;
A third storage means for storing dummy code data in a portion that is not stored, when not all code data constituting the independent code data is stored;
Creating means for creating JPEG2000 code data using code data stored in the first, second and third storage means;
It is characterized by providing.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0021]
<First Embodiment>
FIG. 1 is a diagram illustrating a state in which a plurality of computers are connected on a network, and is a schematic diagram illustrating a configuration of a network system including a server and a client according to the first embodiment of the present invention.
[0022]
In FIG. 1,
[0023]
FIG. 2 is a diagram illustrating an example of a hardware configuration of each computer system of the
[0024]
On the other hand, 204 is a ROM, and 205 is a RAM, which constitutes a storage device in this system, and stores programs executed by the system, data used by the system, and the like.
[0025]
In the present embodiment, already generated JPEG2000 files are managed by the server computer. On the other hand, the client computer uses the JPEG2000 IIP to access only the necessary parts in the JPEG2000 file requested by the user using an image display application or the like, and receives the encoded data in pieces. Then, the received fragmented code data is cached on, for example, the
[0026]
In the following, a part for converting fragmented JPEG2000 code data cached in the
[0027]
In addition, the user opens a homepage using a Windows (registered trademark) machine or the like, and clicks a link to a JPEG2000 image written therein, whereby the JPEG2000 image has an image size suitable for the user's application. Acquire and cache the fragmentary data necessary for display at high resolution. A case is assumed in which one bit stream is created from the cache data, decoded, and displayed.
[0028]
Here, general JPEG2000 code data will be described. FIG. 3 is a conceptual diagram showing a configuration of a JPEG2000 file recorded along a layer-resolution level-component-position progression (hereinafter referred to as “SNR Progression”). When conforming to SNR Progression, recording is performed in the order of layer / resolution / component / position. Defining the arrangement of such code data is called “progression order”.
[0029]
FIG. 4 is a diagram for explaining the resolution scalability of JPEG2000. That is, it is a diagram for illustrating the relationship between the resolution (image size) and the Resolution number. 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 double each time the resolution number increases by one. In each layer, data is stored in ascending order of resolution number. The layer number corresponds to the S / N ratio for the original image of the image to be restored, and the S / N ratio becomes worse as the layer number is smaller.
[0030]
Further, the maximum values of resolution number, layer number, and component number in one JPEG2000 file are preset by the encoder, encoded according to the parameters, and the information is stored in the code data. . Each packet is composed of a packet header part that manages information of code-blocks stored in the packet and code data of each code-block.
[0031]
By using such JPEG2000 code data, the user does not need to acquire all the image data in the server, and only receives the code data of the part necessary for display on the client side from the server. . As a unit of received data on the user side (client computer), a JPEG2000 packet or a code block unit which is a smaller encoding unit than the packet can be considered. In the present embodiment, a packet unit is assumed as a data unit received by the user from the server.
[0032]
FIG. 5 is a conceptual diagram for explaining a request and response of data in packet units between the server and the client in the first embodiment.
[0033]
In FIG. 5, the
[0034]
Next, an example of a JPEG2000 file managed by the server computer used in this embodiment will be described with reference to FIGS. 6A and 6B. FIG. 6A is a diagram illustrating an example in which original image data stored in the server computer is divided into tiles. FIG. 6A shows an example in which the image is divided into 4 tiles in each of the vertical and horizontal directions, that is, 16 tiles in the entire image.
[0035]
FIG. 6B is a diagram showing a data structure of JPEG2000 code data (that is, data obtained by encoding the image data with “SNR Progression”) related to the tile-divided image data shown in FIG. 6A. The code data shown in FIG. 6B includes three types of
[0036]
For example, when the maximum resolution image size of JPEG2000 is 1024 × 1024 pixels, the image size of each tile is 256 × 256 pixels. In addition, when each tile has four resolution levels, the image size at each resolution is 256 × 256, 128 × 128, 64 × 64, and 32 × 32 pixels.
[0037]
Further, for the main header portion in the JPEG2000 code data, as shown in FIG. 6B, Xsiz and Ysiz that are parameters indicating the image size are both 1024, indicating the image size of the entire image. On the other hand, XTsiz and YTsiz indicating the tile size have a value of 256 which is the tile size described above. With these parameters, this JPEG2000 code data has code data divided into 16 tiles. Then, the code data of each tile is stored by being separated by “Tile part Header” as shown in FIG. 6B.
[0038]
FIG. 7 is a flowchart for explaining an outline of a processing procedure in an application on the client computer in the first embodiment. In the present embodiment, a JPEG2000 image display application is activated on the client side, and the flowchart shown in FIG. 7 shows a part for displaying an image after designating a JPEG2000 file to be displayed by another means such as a web. It is a processing flow.
[0039]
First, an internal variable (parameter) for controlling future processing is initialized (step S707). Specifically, the server inquires about information such as the image size and encoding parameters of the designated JPEG2000 file, and stores information for managing the cache of encoded data to be displayed as shown in FIG. Create it on a file and initialize its variables (parameters). That is, FIG. 13 is a diagram for explaining the logical structure of the code data cache controlled on the client side. In FIG. 13,
[0040]
Here, in the
[0041]
Details of the Tile data
[0042]
Further, details of the packet
[0043]
As can be seen from FIG. 13, when the packet data is fully filled, there are a lot of information for managing the table, and the number of bytes of the original code data managed by the server becomes larger. . That is, since the client side generates one code data from the cache information and the cache information, the number of bytes related to the code data managed on the client side becomes maximum when all the tiles are fully filled. The size is at least twice the size of the original code data managed by the server. The
[0044]
After the internal variables are initialized in step S707, the user performs an operation for display (step S700). For example, in the first display of the designated file at the time of starting the application, an image size that fits in the opened window size is calculated and displayed with an image size that matches the window size. Then, the user's operation may be accepted thereafter in step S700.
[0045]
Next, all the packets that are newly required by the user operation in step S700 are calculated (step S701). Thereafter, a request is issued to the server for the newly required packet data calculated in step S701 (step S702). Next, the requested packet data is received from the server and cached on the client computer (step S703).
[0046]
Further, code data is generated by converting the code data managed in the cache format into a plurality of JPEG2000 code data formats so that high-speed reading is possible (step S704). Details of the code data creation processing will be described later. Thereafter, the JPEG2000 code data created in step S704 is decoded and displayed (step S705). Then, it is determined whether or not the user has requested termination (step S706). As a result, when the user requests termination (Yes), this application is terminated. On the other hand, when the user makes another display request without requesting termination (No), the process returns to step S701 to execute the above process.
[0047]
Hereinafter, specific processing contents of the processing procedure in the application on the client computer will be described.
[0048]
First, suppose that immediately after the client application is started, the initial image display size of this application is set to 128 × 128 pixels, and image data that falls within this size is displayed. In this case, considering that the necessary packet calculated in step S702 is to display data having the lowest resolution image size and the maximum SNR, in all 16 tiles from
[0049]
Therefore, the client program requests these packets from the server program. On the other hand, the server program performs a process of cutting out 3 × 16 packets of all tiles. After that, the client program receives these packets and then decodes and displays them.
[0050]
Next, detailed description of the code data creation in step S704 in FIG. 7 will be given with reference to FIGS. FIG. 8A is a flowchart for explaining an overview of the code data generation process in step S704 in FIG. First, the main header of JPEG2000 code data related to the necessary packet received from the server is analyzed (step S800). Next, the number of tiles in the code data is calculated from the result of analyzing the main header in step S800 (step S801). In the present embodiment, the calculation of the number of tiles is performed by the following equation (1).
[0051]
Xtiles = (Xsiz + XTsiz-1) / XTsiz
Ytiles = (Ysiz + YTsiz-1) / YTsiz (1)
Tiles = Xtiles × Ytiles
Then, the processes in and after step S802 are performed by the number of tiles obtained by Expression (1).
[0052]
Step S802 is a part that performs code conversion processing of each tile. Details of this processing will be described later. Then, it is determined whether or not the code conversion processing for all tiles has been completed (step S803). As a result, when there is an unprocessed tile (No), the process returns to step S802. On the other hand, if the code conversion process has been completed for all tiles (Yes), the process ends and the process proceeds to step S705.
[0053]
FIG. 8B is a flowchart for explaining in detail the code conversion processing in step S802. First, it is determined whether or not the tile to be processed this time is fully filled, that is, whether all packet data is cached (step S804). Specifically, it can be determined by looking at the
[0054]
In step S805, it is determined whether code data in a full filling state has been created. As a result, if it has not been created yet (No), the process proceeds to step S806, and if it has been created (Yes), the code conversion process ends. In step S806, a flag indicating that complete code data has been created is set. Details of the processing relating to the setting of the flag will be described later. Then, “code file creation” processing for creating code data from actual cache data is performed (step S807). Details of the code file creation processing will be described later.
[0055]
Here, the detailed processing content of step S806 of FIG. 8 is demonstrated. FIG. 14 is a flowchart for explaining in detail a set of flags indicating that complete code data has been created in step S806 of FIG. This process is relatively easy. First, the file of the Tile
[0056]
By performing the above processing, when the client application needs the data of this tile after the processing, it is only necessary to pass the file name stored in the field indicated by 1301 to the application. It does not occur at all and can be performed at high speed. Furthermore, since the amount of data that must be held as a cache directly has the code data as compared with the case where it is held in the form of a management table, the data capacity can be reduced.
[0057]
Whether or not the tile is fully filled may be determined by checking the Tile
[0058]
As described above, after the code file is generated from the cache data that has been full-filled once, the code file creation process (step S807) is controlled again so that the cache is filled. The code file creation process can be performed at high speed.
[0059]
FIG. 9 is a flowchart for explaining in detail the code file creation processing in step S807 shown in FIG. First, the number of packets included in the tile is set to iPMax (step S900). Next, “Tile part Header” is provisionally output (step S901). Here, the temporary output is because the “Tile part Header” has a field for storing the code length of the tile, and the code length of the tile is a value that can be calculated when the following processing is completed.
[0060]
Next, “0” is set as an initial value in the variables iP and iL (steps S902 and S903). Here, the variable iP is a variable indicating the packet ID, and the variable iL is a variable indicating the code length of the tile. Next, it is determined whether or not the packet indicated by the variable iP is cached (step S904). As a result, if the variable iP is cached (Yes), the process proceeds to step S905. If the variable iP is not cached (No), the process proceeds to step S907.
[0061]
In step S907, a “Zero Length Packet” code (hereinafter abbreviated as “ZLP code”) indicating that there is no corresponding packet data is output. Then, “1” which is the number of bytes of this ZLP code is added to the variable iL (step S908). On the other hand, in step S905, the corresponding packet data is output. Then, the number of bytes is added to the variable iL to be updated (step S906).
[0062]
After the processes of steps S906 and S908, the variable iP is incremented (step S909). And it is judged whether it processed about all the packets (step S910). As a result, when all the packets have not been processed yet (No), the process returns to step S904 and the above processing is performed. On the other hand, when all the packets have been processed (Yes), the “SOT marker” that is the “Tile part Header” is updated from the variable iL and output (step S911), and the code file generation process ends. Then, as described above, the code file is decoded by a general-purpose JPEG2000 decoder, and the decoded image data is displayed (step S705).
[0063]
That is, as described above, the client according to the present embodiment includes a storage unit (for example, the hard disk 206) that stores fragmentary first code data among the code data managed by the server, and stores JPEG2000 code data. It functions as a code data creation device to be created. In the client according to the present embodiment, first, code data necessary for creating JPEG2000 code data in the client and first code data (for example, in the current display unit 203) stored in the storage unit such as the
[0064]
In the client (code data creation device), code data is handled in units of packets. Further, the client (code data creation device) is characterized in that the dummy code data is zero length packet data defined by JPEG2000. Furthermore, the server and the client can communicate with each other via a network.
[0065]
Furthermore, the client (code data creation device) further includes display means (for example, a display unit 203) for displaying image data, and the first code data is code data of the image data, and the
[0066]
Here, the code file creation processing shown in the flowchart will be described using a specific example. FIG. 10 is a diagram showing the configuration of the code file of each tile after the code file processing on the initial screen in the first embodiment of the present invention. Here, the packet requested from the client computer is “Lay0 / Res0 / Com0 / Pos0”, “Lay1 / Res0 / Com0 / Pos0”, and “Lay2 / Res0 / Com0 / Pos0” for all tiles as described above. .
[0067]
Therefore, as shown in FIG. 10, for all 16 tiles, code data storing ZLP is created for packets other than the above three packet data, as indicated by
[0068]
That is, in the client (code data creation device) according to the present embodiment, code data (image data) is divided into tile units of a predetermined size (for example, units calculated by the method described in Expression (1)). Features. Further, the client is characterized in that each header information of independent code data is changed to a size of a divided tile unit.
[0069]
Next, a case where enlargement display is instructed by the user in step S701 will be described. In this enlarged display, it is assumed that the image is first enlarged twice as much as the initial screen. In this case, if the display window size is 128 × 128 pixels, four tiles can be displayed. For example, assume that Resolution 1 (image size: 64 × 64 pixels) of four tiles Tile5, Tile6, Tile9, and Tile10 illustrated in FIG. 6A is displayed. In this case, in step S702, “Lay0 / Res1 / Com0 / Pos0”, “Lay1 / Res1 / Com0 / Pos0”, and “Lay2 / Res1 / Com0 / Pos0” of the four tiles Tile5, Tile6, Tile9, and Tile10 are clients. Requested from the computer to the server.
[0070]
Further, when the user issues a request to double the size, if the display window size is changed from 128 × 128 pixels to 256 × 256 pixels, “Lay0 / Res2 / Com0 / Pos0” is further added to the four tiles. "Lay1 / Res2 / Com0 / Pos0" and "Lay2 / Res2 / Com0 / Pos0" are required.
[0071]
Thereafter, it is assumed that there is a request from the user to further double the size. In this case, if the window size of the display area is not changed, only one tile can be displayed. So, if only Tile5 is displayed, Tile5's "Lay0 / Res3 / Com0 / Pos0", "Lay1 / Res3 / Com0 / Pos0", and "Lay2 / Res3 / Com0 / Pos0" will be requested from the server and displayed. . As a result, Tile5 is completely filled with cache. FIG. 11 is a diagram for explaining an example of the state of the code file for each tile of the code data in the first embodiment.
[0072]
As shown in FIG. 11, the code files of the tiles Tile0, Tile1, Tile2, Tile3, Tile4, Tile7, Tile8, Tile11, Tile12, Tile13, Tile14, and Tile15 are denoted by
[0073]
Conventionally, when one JPEG2000 code data file is generated from a cache file, it is difficult to make a multithread for each tile to be displayed. This is because in order to generate one code data file, it is essential to serialize the processing here. However, by generating a code data file for each tile as in this embodiment, generation of a cache file from a packet request required for each tile to be displayed, creation of code data from the cache file, decoding and display of code data Can be multithreaded as threads for each tile. Therefore, the speed can be increased by multi-threading as compared with the conventional single thread.
[0074]
Furthermore, in a system that takes time to process file I / O, instead of creating one large code data file, generating a plurality of small code files minimizes time loss due to file I / O. It can also be limited.
[0075]
<Second Embodiment>
In the first embodiment described above, it has been described that the code conversion process is performed on all cached tiles. However, in the present embodiment, the code conversion process is performed only on the tiles necessary for display. A case in which code conversion processing is performed at a higher speed than in the first embodiment will be described.
[0076]
FIG. 12 is a flowchart for explaining the outline of the code data creation processing according to the second embodiment of the present invention. In addition, the same number is attached | subjected to the part of the same process as the flowchart of FIG. 8A in 1st Embodiment mentioned above. Here, only a different part from 1st Embodiment is demonstrated.
[0077]
After calculating the number of tiles in step S801, the command operated by the user in step S701 is analyzed (step S1200). Then, using this analysis result, it is determined whether or not the tile to be processed is a tile displayed in the current display (step S1201). As a result, when it is determined that the tile is not used for display (No), the process proceeds to step S803. On the other hand, if it is determined that the tile is used for display (Yes), the process proceeds to step S1202.
[0078]
In step S1202, when a new packet is requested in step S703, it is determined whether or not the packet of the tile to be processed this time has been acquired. As a result, if a new packet has been acquired (Yes), the process proceeds to step S802. If a new packet has not been acquired (No), the process proceeds to step S803. The subsequent processing procedure is the same as the procedure described in the first embodiment. By these processes, it is possible to perform the code conversion process only on tiles that are necessary for display and have not been completely filled. Therefore, the encoding process can be performed at a higher speed than in the first embodiment. it can.
[0079]
<Third Embodiment>
Hereinafter, an image data transmitting apparatus according to a third embodiment of the present invention will be described in detail with reference to the drawings. In the present embodiment, a method for creating one piece of code data from the cache will be described. The configuration of the network system including the server and the client according to the present embodiment is the same as that in FIG. 1, and the hardware configuration of each computer system is also the same as that in FIG. The processing procedure in the application on the client computer is also the same as the flowchart shown in FIG.
[0080]
FIG. 16 is a flowchart for explaining the processing procedure when one code data file is created from the cache. As shown in FIG. 16, first, the information held in the
[0081]
Then, for each tile, it is determined whether the tile is fully filled and there is complete code data of the tile (step S1602). This determination method is as described above. As a result, when it is determined that it is fully filled (Yes), the process proceeds to step S1604, and when it is not fully filled (No), the process proceeds to step S1603.
[0082]
In step 1603, a code file is created in the same manner as the code file creation processing procedure shown in FIG. After this processing, the process proceeds to step S1606, and the code data is output. On the other hand, in step S1604 and subsequent steps, conversion from complete code data of tiles is performed. Therefore, first, a process of skipping the main header portion is performed (step S1604). As a specific example of this processing, for example, it is only necessary to skip from the beginning of the code data shown in FIG. 15 to the SOT marker code. Next, the value of the tile index (Tile Index) in the tile part header (Tile part Header) is replaced with the index (Index) number of the tile (step S1605). Further, the tile part header and subsequent EOC marker codes (but not including the EOC marker code) are copied (step S1606). Then, it is determined whether or not all tiles have been processed (step S1607), and if not processed (No), the process returns to step S1602 and the above processing is repeated. On the other hand, if all the tiles have been processed (Yes), the process ends.
[0083]
Through the processing described above, one piece of code data can be easily created from the cache file in the format according to the present embodiment, and since there is no processing such as data conversion, it can be created at high speed.
[0084]
<Other embodiments>
In general, when one JPEG2000 code data file is generated from a cache file, it is difficult to make a multithread for each tile to be displayed. This is because it is essential to serialize the processing in order to generate one code data file. However, as described above, by generating a code data file for each tile, from a packet request necessary for each tile to be displayed, generation of a cache file, creation of code data from the cache file, decoding of code data, Multithreading can be performed with each tile as a thread until display. For this reason, it is possible to increase the speed by using multi-threading as compared with the case of single thread so far.
[0085]
Note that the present invention can be applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), but a device (for example, a copier, a facsimile machine, etc.) composed of a single device. You may apply to.
[0086]
Also, an object of the present invention is to supply a recording medium (or storage 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 CPU) of the system or apparatus. Needless to say, this can also be achieved when the MPU) reads and executes the program code stored in the recording medium. In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium on which the program code is recorded constitutes the present invention. 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.
[0087]
Further, after the program code read from the recording 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 expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the 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.
[0088]
When the present invention is applied to the recording medium, program code corresponding to the flowchart described above is stored in the recording medium.
[0089]
As described above, when the file creation method described in the above embodiment according to the present invention is used, fragmented data of JPEG2000 encoded data sent using IIP is cached, and normal JPEG2000 is stored from this cache file. When JPEG2000 encoded data that can be processed by the decoder is created, an independent JPEG2000 code data file is generated for each tile necessary for the current decoding and display, so that processing up to decoding / display can be performed at high speed.
[0090]
It is also possible to minimize the data capacity or file capacity for configuring the cache or generating code data from the cache. Furthermore, when code data is generated from the cache, since processing such as data conversion can be omitted, it can be generated at high speed.
[0091]
Further, when the area to be decoded / displayed is performed in units of tiles, it is possible to perform processing only on tiles necessary for decoding / display. Furthermore, the speed can be increased by multithreading. Furthermore, in a system that requires file I / O processing time, instead of creating one large code data file, a plurality of small code files are generated, thereby minimizing time loss due to file I / O. It can also be limited. Alternatively, conversion can be easily performed even when one piece of code data is created.
[0092]
【The invention's effect】
As described above, according to the present invention, a general-purpose JPEG2000 decoder is used in a client by using fragmented code data cached in the client and fragmented code data received from the server as much as necessary. Code data that can be used in the above-described process and that can decode the code data and display the image data at high speed.
[Brief description of the drawings]
FIG. 1 is a schematic diagram showing a configuration of a network system including a server and a client according to a first embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a hardware configuration of each computer system of the
FIG. 3 is a conceptual diagram illustrating a configuration of a JPEG2000 file recorded in accordance with Layer-resolution level-component-position progression (SNR Progression).
FIG. 4 is a diagram illustrating resolution scalability of JPEG2000.
FIG. 5 is a conceptual diagram for explaining a request and response for data in packet units between a server and a client in the first embodiment.
FIG. 6A is a diagram showing an example in which original image data stored in a server computer is divided into tiles.
6B is a diagram showing a data structure of JPEG2000 code data related to the tile-divided image data shown in FIG. 6A. FIG.
FIG. 7 is a flowchart for explaining an outline of a processing procedure in an application on a client computer in the first embodiment.
FIG. 8A is a flowchart for explaining the outline of the process of creating the code data in step S704 in FIG.
FIG. 8B is a flowchart for explaining in detail the code conversion processing in step S802.
FIG. 9 is a flowchart for explaining in detail the code file creation processing in step S807 shown in FIG. 8;
FIG. 10 is a diagram showing a configuration of a code file of each tile after code file processing on the initial screen in the first embodiment of the present invention.
FIG. 11 is a diagram for explaining an example of a state of a code file for each tile of code data in the first embodiment.
FIG. 12 is a flowchart for explaining an overview of code data creation processing according to the second embodiment of the present invention;
FIG. 13 is a diagram for explaining a logical structure of a cache of code data controlled on the client side.
FIG. 14 is a flowchart for explaining in detail a set of flags indicating that complete code data has been created in step S806 of FIG. 8;
FIG. 15 is a diagram illustrating a state when a tile is fully filled and replaced with complete code data.
FIG. 16 is a flowchart for explaining a processing procedure when one code data file is created from a cache;
[Explanation of symbols]
501 server
502 clients
Claims (6)
復号すべき画像中の領域、及び、出力する画像サイズの指定に応じて、必要となる単位符号化データを特定し、特定した単位符号化データを前記サーバに要求する要求工程と、
単位符号化データが前記階層構造中のいずれに属するのかを、タイル単位に管理する管理テーブルを作成する作成工程と、
前記要求工程による要求結果、受信した単位符号化データを所定のメモリにキャッシュすると共に、キャッシュする単位符号化データの前記メモリ内の所在位置を示す情報で、該当するタイルの管理テーブルを更新する更新工程と、
該更新工程による前記管理テーブルの更新に応じて、前記メモリにキャッシュした単位符号化データと、未要求の単位符号化データについては該当する単位符号化データが存在しないことを示すコードとで構成されるJPEG2000形式の符号化データファイルを、タイル単位に生成する符号化データファイル生成工程とを備え、
前記要求工程は、復号すべき画像中の新たな領域、又は、新たな出力する画像サイズの指定があった場合、前記管理テーブルに基づき、復号に必要な単位符号化データ中の前記メモリに非キャッシュ状態にある単位符号化データを前記サーバに要求し、
更に、
前記管理テーブルに従い、全ての単位符号化データが前記メモリにキャッシュされているタイルが存在するか否かを判定する判定工程と、
該判定工程で全ての単位符号化データがキャッシュされているタイルが存在すると判定した場合、当該タイルに関するキャッシュされた単位符号化データに関する情報を管理テーブルから削除する削除工程と
を備えることを特徴とする符号化データ作成方法。 The unit encoding is performed from a server that stores and manages encoded image data divided into a plurality of tiles and encoded as JPEG 2000 as unit encoded data of hierarchical elements represented by tiles, layers, resolutions, components, and positions. A method of creating encoded data in a client that downloads data and generates a new encoded data file for decoding ,
According to the designation of the region in the image to be decoded and the image size to be output, the required unit encoded data is specified, and the requesting step of requesting the specified unit encoded data from the server;
A creation step of creating a management table for managing in units of tiles which unit encoded data belongs in the hierarchical structure;
Update of updating the corresponding tile management table with the information indicating the location of the unit encoded data to be cached in the predetermined memory as well as caching the received unit encoded data in the predetermined memory as a result of the request by the request step Process,
The unit encoded data cached in the memory in response to the update of the management table in the update step, and a code indicating that there is no corresponding unit encoded data for unrequested unit encoded data An encoded data file generation step for generating an encoded data file in JPEG2000 format in tile units,
In the requesting step, when a new area in the image to be decoded or a new output image size is designated, the requesting process is not performed in the memory in the unit encoded data necessary for decoding based on the management table. Request unit encoded data in cache state from the server,
Furthermore,
In accordance with the management table, a determination step of determining whether there is a tile in which all unit encoded data is cached in the memory;
And a deletion step of deleting, from the management table, information on cached unit encoded data related to the tile when it is determined that there is a tile in which all the unit encoded data is cached in the determination step. Encoded data creation method.
前記符号化データファイル生成工程で生成された各タイル毎のJPEG2000の符号化データファイルをデコードするデコード工程と、
デコードされた画像データを前記表示手段に表示する表示工程と
をさらに有することを特徴とする請求項1又は2に記載の符号化データ作成方法。The client comprises display means for displaying image data;
A decoding step of decoding the JPEG2000 coded data file for each tile generated by the encoded data file generation step,
Encoded data creation method according to claim 1 or 2, characterized by further comprising a table Shimesuru display step the decoded image data to said display means.
復号すべき画像中の領域、及び、出力する画像サイズの指定に応じて、必要となる単位符号化データを特定し、特定した単位符号化データを前記サーバに要求する要求手段と、
単位符号化データが前記階層構造中のいずれに属するのかを、タイル単位に管理する管理テーブルを作成する作成手段と、
前記要求手段による要求結果、受信した単位符号化データを所定のメモリにキャッシュすると共に、キャッシュする単位符号化データの前記メモリ内の所在位置を示す情報で、該当するタイルの管理テーブルを更新する更新手段と、
該更新手段による前記管理テーブルの更新に応じて、前記メモリにキャッシュした単位符号化データと、未要求の単位符号化データについては該当する単位符号化データが存在しないことを示すコードとで構成されるJPEG2000形式の符号化データファイルを、タイル単位に生成する符号化データファイル生成手段とを備え、
前記要求手段は、復号すべき画像中の新たな領域、又は、新たな出力する画像サイズの指定があった場合、前記管理テーブルに基づき、復号に必要な単位符号化データ中の前記メモリに非キャッシュ状態にある単位符号化データを前記サーバに要求し、
更に、
前記管理テーブルに従い、全ての単位符号化データが前記メモリにキャッシュされているタイルが存在するか否かを判定する判定手段と、
該判定手段で全ての単位符号化データがキャッシュされているタイルが存在すると判定した場合、当該タイルに関するキャッシュされた単位符号化データに関する情報を管理テーブルから削除する削除手段と
を備えることを特徴とする符号化データ作成装置。 The unit encoding is performed from a server that stores and manages encoded image data divided into a plurality of tiles and encoded as JPEG 2000 as unit encoded data of hierarchical elements represented by tiles, layers, resolutions, components, and positions. An encoded data creation device that functions as a client that downloads data and generates a new encoded data file for decoding ,
A request unit that specifies the unit encoded data required according to the designation of the area in the image to be decoded and the image size to be output, and requests the specified unit encoded data from the server;
Creating means for creating a management table for managing in units of tiles which unit encoded data belongs in the hierarchical structure;
Update of updating the corresponding tile management table with the information indicating the location of the unit encoded data to be cached in the predetermined memory as well as caching the received unit encoded data as a result of the request by the request means Means,
It is composed of unit encoded data cached in the memory in response to the update of the management table by the updating means and a code indicating that there is no corresponding unit encoded data for unrequested unit encoded data. An encoded data file generating means for generating an encoded data file in JPEG2000 format for each tile,
When a new area in an image to be decoded or a new image size to be output is designated, the requesting unit is not stored in the memory in the unit encoded data necessary for decoding based on the management table. Request unit encoded data in cache state from the server,
Furthermore,
In accordance with the management table, a determination unit that determines whether there is a tile in which all unit encoded data is cached in the memory;
And a deletion unit that deletes, from the management table, information on cached unit encoded data related to the tile when the determination unit determines that there is a tile in which all the unit encoded data is cached. Encoded data creation device.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003201162A JP4065535B2 (en) | 2002-12-09 | 2003-07-24 | Code data creation method and apparatus |
| US10/729,007 US7580577B2 (en) | 2002-12-09 | 2003-12-08 | Methods, apparatus and computer products for generating JPEG2000 encoded data in a client |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002356738 | 2002-12-09 | ||
| JP2003201162A JP4065535B2 (en) | 2002-12-09 | 2003-07-24 | Code data creation method and apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2004242273A JP2004242273A (en) | 2004-08-26 |
| JP4065535B2 true JP4065535B2 (en) | 2008-03-26 |
Family
ID=32964453
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003201162A Expired - Fee Related JP4065535B2 (en) | 2002-12-09 | 2003-07-24 | Code data creation method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4065535B2 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4716949B2 (en) | 2005-09-02 | 2011-07-06 | 株式会社リコー | Image processing apparatus and image processing method |
| JP4907488B2 (en) * | 2007-10-24 | 2012-03-28 | 株式会社リコー | Image processing apparatus, image processing method, and computer-readable recording medium storing program for executing the method |
| JP4907487B2 (en) | 2007-10-24 | 2012-03-28 | 株式会社リコー | Image processing apparatus, image processing method, and computer-readable recording medium storing program for executing the method |
| JP5146035B2 (en) * | 2008-03-19 | 2013-02-20 | 株式会社リコー | Image processing system, image processing server, client device, image processing method, image processing program, recording medium |
| JP5181816B2 (en) * | 2008-05-12 | 2013-04-10 | 株式会社リコー | Image processing apparatus, image processing method, computer program, and information recording medium |
| CN112748925A (en) * | 2019-10-30 | 2021-05-04 | 北京国双科技有限公司 | Method, device and equipment for analyzing front-end code by using label |
-
2003
- 2003-07-24 JP JP2003201162A patent/JP4065535B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2004242273A (en) | 2004-08-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7580577B2 (en) | Methods, apparatus and computer products for generating JPEG2000 encoded data in a client | |
| US11747976B2 (en) | Method and system for ink data generation, ink data rendering, ink data manipulation and ink data communication | |
| JP4934462B2 (en) | Method, server and computer program for accessing partial document images | |
| US20030067627A1 (en) | Image processing method and its data cache method | |
| US20020059245A1 (en) | File system for distributing content in a data network and related methods | |
| JP2006101482A (en) | Image communication system, server apparatus, and image communication method | |
| JP2004510251A (en) | Configurable conversion of electronic documents | |
| JP4065535B2 (en) | Code data creation method and apparatus | |
| JP4371982B2 (en) | Image processing apparatus, control method therefor, computer program, and computer-readable storage medium | |
| JP3768866B2 (en) | Method and apparatus for creating encoded data | |
| JP3897691B2 (en) | Scroll display method and apparatus | |
| JP3768934B2 (en) | Image processing apparatus and data cache method thereof | |
| JP3958198B2 (en) | Image processing method | |
| JP4125186B2 (en) | Image processing method and image processing apparatus | |
| JP4125087B2 (en) | Image processing method | |
| JP3639616B2 (en) | Image processing method, apparatus and system | |
| JP5080325B2 (en) | Information processing apparatus, information processing method, information processing program, and recording medium | |
| JP4748672B2 (en) | Code processing apparatus, program, and information recording medium | |
| Christiansen | Data compression for thin client computing | |
| JP2007053445A (en) | Server apparatus, control method therefor, computer program, and storage medium | |
| JP2006319482A (en) | Image processing apparatus, control method therefor, computer program, and computer-readable storage medium | |
| JP2007142581A (en) | Image processing method and image processing apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060721 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070920 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070925 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071126 |
|
| 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: 20071221 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080105 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4065535 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110111 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120111 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130111 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140111 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |