JP4757162B2 - Image encoding device, image decoding device, mobile phone, image encoding method, image decoding method, image encoding program, and image decoding program - Google Patents

Image encoding device, image decoding device, mobile phone, image encoding method, image decoding method, image encoding program, and image decoding program Download PDF

Info

Publication number
JP4757162B2
JP4757162B2 JP2006268149A JP2006268149A JP4757162B2 JP 4757162 B2 JP4757162 B2 JP 4757162B2 JP 2006268149 A JP2006268149 A JP 2006268149A JP 2006268149 A JP2006268149 A JP 2006268149A JP 4757162 B2 JP4757162 B2 JP 4757162B2
Authority
JP
Japan
Prior art keywords
image data
character
encoding
data
character image
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
JP2006268149A
Other languages
Japanese (ja)
Other versions
JP2008092089A (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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2006268149A priority Critical patent/JP4757162B2/en
Publication of JP2008092089A publication Critical patent/JP2008092089A/en
Application granted granted Critical
Publication of JP4757162B2 publication Critical patent/JP4757162B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

この発明は画像符号化装置、画像復号装置、携帯電話、画像符号化方法、画像復号方法、画像符号化プログラム、および画像復号プログラムに関し、特に、少ない計算量で復号することのできる画像符号化装置、画像復号装置、携帯電話、画像符号化方法、画像復号方法、画像符号化プログラム、および画像復号プログラムに関する。   The present invention relates to an image encoding device, an image decoding device, a mobile phone, an image encoding method, an image decoding method, an image encoding program, and an image decoding program, and in particular, an image encoding device capable of decoding with a small amount of calculation. The present invention relates to an image decoding apparatus, a mobile phone, an image encoding method, an image decoding method, an image encoding program, and an image decoding program.

近年、携帯機器を含む、種々の機器で、画面の解像度が向上しており、高度な文字の表示品位が要求されている。そのため、従来のようなビットマップフォント(以下、「フォント」と略する)であれば、文字を構成するドット数を増加させる必要がある。   In recent years, screen resolution has been improved in various devices including portable devices, and high-level character display quality has been demanded. Therefore, if it is a conventional bitmap font (hereinafter abbreviated as “font”), it is necessary to increase the number of dots constituting the character.

さらに、上記機器の普及に伴って、機器の取り扱う文字の種類が増加してきており、機器において処理される文字画像のデータ量は増大している。   Furthermore, with the widespread use of the above devices, the types of characters handled by the devices have increased, and the amount of character image data processed by the devices has increased.

このため、文字画像のデータ量を効率よく圧縮することのできる符号化方法の必要性が高まっている。   For this reason, the necessity of the encoding method which can compress the data amount of a character image efficiently is increasing.

2値画像を符号化する規格として、近年は、JBIG(Joint Bi-level Image experts Group)の提案する方式(IS11544)のように、算術符号化を取り入れた、符号化効率が高い方式が考案されている。   In recent years, as a standard for encoding binary images, a method with high encoding efficiency incorporating arithmetic encoding has been devised, such as a method proposed by JBIG (Joint Bi-level Image experts Group) (IS11544). ing.

また、単純に2値画像を符号化する技術として、特開昭63−155957号公報(以下、特許文献1)に開示されているような技術もある。特許文献1に開示されている技術は、通常の画像では、隣接したライン間が類似していることを利用して符号化する技術であって、排他的論理和を算出することで0の値を持つビットを増やし、可逆性を保ちつつ、符号化効率を高める技術である。
特開昭63−155957号公報
Further, as a technique for simply encoding a binary image, there is a technique disclosed in Japanese Patent Laid-Open No. 63-155957 (hereinafter referred to as Patent Document 1). The technique disclosed in Patent Document 1 is a technique of encoding using the fact that adjacent lines are similar in a normal image, and a value of 0 is calculated by calculating an exclusive OR. This is a technique for increasing the coding efficiency while increasing the number of bits having, and maintaining reversibility.
JP-A 63-155957

しかしながら、特許文献1に開示されているような従来の符号化の技術には、ワードの値の分布が、文字に占めるワードやバイト(以降、「バイト」は8ビットからなるワードであるものとし、「ワード」という語は、特に限定しない限りは「バイト」をも含むものとして用いる)の位置によって大きく異なるという、文字画像データ(フォントデータ)の2値画像としての特徴が生かされていないため、ビットマップフォントを通常の2値画像として符号化するためにこのような技術をそのまま利用した場合、必ずしも効率よく処理が行なわれない場合があるという問題がある。   However, in the conventional encoding technique disclosed in Patent Document 1, it is assumed that the distribution of word values is a word or byte occupying characters (hereinafter, “byte” is a word consisting of 8 bits). The word “word” is used depending on the position of the character image data (font data) unless it is specifically limited. When such a technique is used as it is in order to encode a bitmap font as a normal binary image, there is a problem that the processing may not always be performed efficiently.

また、上述のJBIG方式はある程度普及してはいるものの、処理が複雑なために計算量が多く、小型機器で復号する必要があるような、文字画像データの符号化には使いにくいという問題がある。   In addition, although the above-mentioned JBIG method has been spread to some extent, there is a problem that it is difficult to use for encoding character image data that requires a large amount of calculation due to complicated processing and needs to be decoded by a small device. is there.

本発明はこのような問題に鑑みてなされたものであって、所定の特徴を持った画像データを高効率に符号化することのできる画像符号化装置、画像符号化方法、および画像符号化プログラム、ならびに符号化されたデータを少ない計算量で復号することのできる画像復号装置、携帯電話、画像復号方法、および画像復号プログラムを提供することを目的とする。   The present invention has been made in view of such a problem, and is an image encoding device, an image encoding method, and an image encoding program capable of encoding image data having a predetermined characteristic with high efficiency. Another object of the present invention is to provide an image decoding apparatus, a mobile phone, an image decoding method, and an image decoding program capable of decoding encoded data with a small amount of calculation.

上記目的を達成するために、本発明のある局面に従うと、画像符号化装置は画像データに含まれる、文字識別情報で特定される文字画像データを符号化するための画像符号化装置であって、画像データから1文字分ずつの文字画像データを読出す読出手段と、上記1文字分の文字画像データを、それぞれ、第1の方向のサイズの整数分の1である処理単位のサイズで第1の方向に直交する第2の方向に分割し、分割単位画像データを生成する画像分割手段と、上記分割単位画像データに含まれる、第1の方向に平行な第nラインの値と第nラインに第2の方向に隣接する第(n−1)ラインの値との間のドット位置ごとの差分を所定の方法で算出してn≧1の各ラインについては差分を第nラインの値とし、第0ライン(n=0のライン)については分割単位画像データの第0ラインの値をそのまま用いた加工分割単位画像データを生成する加工分割単位画像データ作成手段と、1文字分ずつの文字画像データから得られた加工分割単位画像データを、複数の文字画像データ分連続させて符号化し、符号化データを生成する符号化手段とを備える。 In order to achieve the above object, according to one aspect of the present invention, an image encoding device is an image encoding device for encoding character image data specified by character identification information included in image data. Reading means for reading out character image data for each character from the image data, and the character image data for one character in a processing unit size that is an integral number of a size in the first direction. An image dividing means for generating divided unit image data by dividing in a second direction orthogonal to the direction of 1, and the value of the nth line parallel to the first direction and nth included in the divided unit image data; The difference for each dot position between the value of the (n−1) th line adjacent to the line in the second direction is calculated by a predetermined method, and the difference is the value of the nth line for each line of n ≧ 1. and then, in the 0 line (n = 0 of the line) In its a processing division unit image data generating means for generating a processed divided unit image data is used as it is the value of the zeroth line division unit image data, processing the divided unit image data obtained from the character image data of one character minute Encoding means for continuously encoding a plurality of character image data and generating encoded data.

好ましくは、画像符号化装置は、1文字分の文字画像データを特定する情報と、符号化データ上の当該文字画像データに対応する位置との対応を示すアクセステーブルを生成するアクセステーブル生成手段をさらに備える。 Preferably, the image encoding device includes an access table generating unit configured to generate an access table indicating correspondence between information specifying character image data for one character and a position corresponding to the character image data on the encoded data. Further prepare.

ましくは、文字識別情報は、文字コード、または文字コードおよび書体識別情報を含む。 Good Mashiku is character identification information includes a character code or a character code and font identification information.

また好ましくは、画像符号化装置は、文字識別情報とグリフとの対応を取得する取得手段をさらに備え、アクセステーブル生成手段は、文字画像データの文字識別情報から内部文字コードを取得する手段と、取得された内部文字コード、および取得された文字識別情報とグリフとの対応より、取得された内部文字コードに対応するグリフを特定する手段と、符号化データを検索して加工分割単位画像データのそれぞれに対応した境界位置を抽出することで、グリフと符号化データ上の当該グリフに対応した文字識別情報で表わされた文字画像データの位置との対応関係を生成するための手段と、特定されたグリフより、上記対応関係を参照することで符号化データ上の上記文字画像データに対応する位置を特定する手段とを含む。 Preferably, the image encoding device further includes an acquisition unit that acquires correspondence between the character identification information and the glyph, and the access table generation unit acquires an internal character code from the character identification information of the character image data; Based on the acquired internal character code and the correspondence between the acquired character identification information and the glyph, a means for specifying the glyph corresponding to the acquired internal character code, the encoded data is searched, and the processing divided unit image data Means for generating a correspondence between the position of the character image data represented by the character identification information corresponding to the glyph on the encoded data by extracting the boundary position corresponding to each Means for specifying a position corresponding to the character image data on the encoded data by referring to the correspondence relationship from the glyph.

好ましくは、画像符号化装置は、上記文字画像データから得られる第1分割単位画像データから得られる第1加工分割単位画像データの、符号化後のデータ量を算出する算出手段と、上記文字画像データを90度回転させて回転画像データを生成する回転手段と、回転画像データを第1の方向に分割して得られる第2分割単位画像データについて、第2分割単位画像データに含まれる第nラインの値と第(n−1)ラインの値との差分を算出し、その差分を第nラインの値とした第2加工分割単位画像データの、符号化後のデータ量を予測する予測手段とをさらに備え、符号化手段は、第1加工分割単位画像データと第2加工分割単位画像データとのうち、符号化後のデータ量が小さい方の加工分割単位画像データを符号化する。 Preferably, the image encoding device includes a calculating unit that calculates a data amount after encoding of the first processed divided unit image data obtained from the first divided unit image data obtained from the character image data, and the character image. Rotation means for generating rotated image data by rotating the data by 90 degrees, and second divided unit image data obtained by dividing the rotated image data in the first direction, the nth included in the second divided unit image data A predicting unit that calculates a difference between the value of the line and the value of the (n−1) -th line, and predicts the encoded data amount of the second processed division unit image data using the difference as the value of the n-th line. The encoding means encodes the processed divided unit image data having the smaller data amount after the encoding among the first processed divided unit image data and the second processed divided unit image data.

さらに好ましくは、符号化手段において、第1加工分割単位画像データと第2加工分割単位画像データとのいずれの加工分割単位画像データを符号化したのかを示す情報を生成する手段をさらに備える。   More preferably, the encoding means further includes means for generating information indicating which of the first processed division unit image data and the second processed division unit image data is encoded.

本発明の他の局面に従うと、画像復号装置は上記画像符号化装置によって生成された符号化データに対して復号処理を実行して1文字分の文字画像データを得るための画像復号装置であって1文字分の文字画像データを特定する情報を取得する取得手段と、文字画像データを特定する情報と、符号化データ上の当該文字画像データに対応する位置との対応を示すアクセステーブルにアクセスし、取得された文字画像データを特定する情報に対応した、符号化データ上の位置を特定する特定手段と、上記画像符号化装置によって複数の文字画像データを連続して符号化処理することで生成された符号化データ上の、特定された位置にあるデータを復号して、複数の加工分割単位画像データを生成する復号手段と、各々の分割単位画像データの第(n−1)ラインの値と、各々の加工分割単位画像データの第nラインの値とを用いて、各々の分割単位画像データの第nラインの値を算出し、上記複数の加工分割単位画像データから、各々、分割単位画像データを生成する作成手段と、作成手段で上記複数の加工分割単位画像データから作成された複数の分割単位画像データを統合して1文字分の文字画像データを生成する統合手段とを備える。 According to another aspect of the present invention, an image decoding device is an image decoding device for performing decoding processing on encoded data generated by the image encoding device to obtain character image data for one character. Te, an acquiring unit that acquires information specifying the character image data of one character, and information specifying the character image data, the access table showing the correspondence between the position corresponding to the character image data in the encoded data The specifying means for specifying the position on the encoded data corresponding to the information for specifying the character image data that is accessed and acquired, and the character encoding data is successively encoded by the image encoding device. in on the generated encoded data, it decodes the data in a specific location, and decoding means for generating a plurality of processing the divided unit image data, for each of the divided unit image data Using the value of the (n-1) th line and the value of the nth line of each processed division unit image data, the value of the nth line of each divided unit image data is calculated, and the plurality of processed divisions Character image data for one character by integrating a creation unit that generates division unit image data from unit image data, and a plurality of division unit image data created from the plurality of processed division unit image data by the creation unit. And an integration means for generating.

好ましくは、画像復号装置は、文字画像データが符号化時に90度回転されたものであるか否かを示す情報にアクセスし、上記文字画像データが符号化時に90度回転されたものである場合、生成された文字画像データを符号化時の回転の向きに対して逆向きに90度回転させる手段をさらに備える。 Preferably, the image decoding apparatus, if the character image data to access the information indicating whether or not that is rotated 90 degrees at the time of coding, in which the character image data is rotated 90 degrees at the time of encoding And a means for rotating the generated character image data by 90 degrees in the opposite direction to the rotation direction at the time of encoding.

本発明のさらに他の局面に従うと、携帯電話は、上記画像復号装置を搭載する。
本発明のさらに他の局面に従うと、画像符号化方法は、画像符号化装置において画像データに含まれる、文字識別情報で特定される文字画像データを符号化する方法であって、画像データから1文字分ずつの文字画像データを読出す読出ステップと、1文字分の文字画像データを、それぞれ、第1の方向のサイズの整数分の1である処理単位のサイズで第1の方向に直交する第2の方向に分割し、分割単位画像データを生成する画像分割ステップと、分割単位画像データに含まれる、第1の方向に平行な第nラインの値と第nラインに第2の方向に隣接する第(n−1)ラインの値との間のドット位置ごとの差分を所定の方法で算出してn≧1の各ラインについては差分を第nラインの値とし、第0ライン(n=0のライン)については分割単位画像データの第0ラインの値をそのまま用いた加工分割単位画像データを生成する加工画像作成ステップと、1文字分ずつの文字画像データから得られた加工分割単位画像データを、複数の文字画像データ分連続させて符号化し、符号化データを生成する符号化ステップとを備える。
According to still another aspect of the present invention, a mobile phone is equipped with the image decoding device.
According to still another aspect of the present invention, an image encoding method is a method of encoding character image data specified by character identification information included in image data in an image encoding device, the image encoding method comprising: A reading step for reading character image data for each character; and character image data for one character , each orthogonal to the first direction at a processing unit size that is an integral number of the size in the first direction . second dividing direction, an image dividing step of generating a divided unit image data, included in the divided unit image data, the value of the n-th line parallel to the first direction the second direction to the n-th line to The difference for each dot position between the value of the (n−1) th line adjacent to the line is calculated by a predetermined method, and for each line of n ≧ 1, the difference is set to the value of the nth line, and the 0th line ( for n = 0) A processed image creation step for generating processed divided unit image data using the value of the 0th line of the divided unit image data as it is, and processed divided unit image data obtained from character image data for each character, An encoding step for continuously encoding the image data and generating encoded data.

好ましくは、画像符号化方法は、文字画像データから得られる第1分割単位画像データから得られる第1加工分割単位画像データの、符号化後のデータ量を算出する算出ステップと、文字画像データを90度回転させて回転画像データを生成する回転ステップと、回転画像データを第1の方向に分割して得られる第2分割単位画像データについて、第2分割単位画像データに含まれる第nラインの値と第(n−1)ラインの値との差分を算出し、その差分を第nラインの値とした第2加工分割単位画像データの、符号化後のデータ量を予測する予測ステップとをさらに備え、符号化ステップにおいては、第1加工分割単位画像データと第2加工分割単位画像データとのうち、符号化後のデータ量が小さい方の加工分割単位画像データを符号化する。 Preferably, the image encoding method, the first processing division unit image data obtained from the first division unit image data obtained from the character image data, a calculation step of calculating a data amount after coding, character image data A rotation step for generating rotated image data by rotating 90 degrees, and second divided unit image data obtained by dividing the rotated image data in the first direction, the nth line included in the second divided unit image data. Calculating a difference between the value and the value of the (n−1) -th line, and predicting the encoded data amount of the second processed division unit image data using the difference as the value of the n-th line. Further, in the encoding step, of the first processed division unit image data and the second processed division unit image data, the processed divided unit image data having a smaller data amount after encoding is encoded. That.

本発明のさらに他の局面に従うと、画像復号方法は、上述の画像符号化方法によって複数の文字画像データを連続して符号化処理することで生成された符号化データに対して復号処理を実行して、1文字分の文字画像データを方法であって、上記1文字分の文字画像データを特定する情報を取得する取得ステップと、文字画像データを特定する情報と、符号化データ上の当文字像データに対応する位置との対応を示すアクセステーブルにアクセスし、取得された文字画像データを特定する情報に対応した、符号化データ上の位置を特定する特定ステップと、上述の画像符号化方法によって複数の文字画像データを連続して符号化処理することで生成された符号化データ上の、特定された位置にあるデータを復号して、複数の加工分割単位画像データを生成する復号ステップと、各々の分割単位画像データの第(n−1)ラインの値と、各々の加工分割単位画像データの第nラインの値とを用いて、各々の分割単位画像データの第nラインの値を算出し、上記複数の加工分割単位画像データから、各々、分割単位画像データを生成する作成ステップと、作成ステップにおいて上記複数の加工分割単位画像データから作成された複数の分割単位画像データを統合して1文字分の文字画像を生成する統合ステップとを備える。 According to still another aspect of the present invention, an image decoding method performs a decoding process on encoded data generated by sequentially encoding a plurality of character image data by the above-described image encoding method. and, 1 a the characters of the character image data method, an acquisition step of acquiring information specifying the character image data of the one character, and information specifying the character image data, on the encoded data equivalent access the access table showing the correspondence between the position corresponding to the character image data, corresponding to the information specifying the character image data acquired, a specifying step of specifying a position on the encoded data, the above-described image coding of the generated encoded data by performing encoding processing in succession a plurality of character image data by a method, and decodes the data in a specific position, a plurality of processing division unit image Using the decoding step for generating data, the value of the (n-1) th line of each division unit image data, and the value of the nth line of each processed division unit image data, each division unit image data A n-th line value is calculated, and a creation step for generating division unit image data from each of the plurality of processing division unit image data, and a plurality of pieces created from the plurality of processing division unit image data in the creation step An integration step of integrating the division unit image data to generate a character image for one character .

好ましくは、画像復号方法は、文字画像データが符号化時に90度回転されたものであるか否かを示す情報にアクセスし、文字画像データが符号化時に90度回転されたものである場合、生成された文字画像データを符号化時の回転の向きに対して逆向きに90度回転させるステップをさらに備える。 Preferably, the image decoding method, when the character image data in which access information indicating whether or not that is rotated 90 degrees at the time of encoding, the character image data is rotated 90 degrees at the time of encoding, The method further includes the step of rotating the generated character image data by 90 degrees in the opposite direction to the rotation direction at the time of encoding.

本発明のさらに他の局面に従うと、画像符号化プログラムは、画像データに含まれる、文字識別情報で特定される文字画像データを符号化する処理をコンピュータに実行させるプログラムであって、上記画像データから1文字分ずつの文字画像データを読出す読出ステップと、1文字分の文字画像データを、それぞれ、第1の方向のサイズの整数分の1である処理単位のサイズで第1の方向に直交する第2の方向に分割し、分割単位画像データを生成する画像分割ステップと、分割単位画像データに含まれる、第1の方向に平行な第nラインの値と第nラインに第2の方向に隣接する第(n−1)ラインの値との間のドット位置ごとの差分を所定の方法で算出してn≧1の各ラインについては差分を第nラインの値とし、第0ライン(n=0のライン)については分割単位画像データの第0ラインの値をそのまま用いた加工分割単位画像データを生成する加工画像作成ステップと、1文字分ずつの文字画像データから得られた加工分割単位画像データを、複数の文字画像データ分連続させて符号化し、符号化データを生成する符号化ステップとを実行させる。 According to still another aspect of the present invention, an image encoding program is a program for causing a computer to execute a process of encoding character image data specified by character identification information included in image data , the image data A reading step of reading character image data for each character from the character image data, and each character image data for one character in the first direction with a size of a processing unit that is an integral number of the size in the first direction . An image dividing step for dividing the image in the second direction orthogonal to generate divided unit image data; a value of the nth line parallel to the first direction and a second value included in the divided unit image data ; The difference for each dot position between the values of the (n−1) th line adjacent in the direction is calculated by a predetermined method, and for each line of n ≧ 1, the difference is the value of the nth line, and the 0th line (N = 0 A processed image generation step for generating processed divided unit image data using the value of the 0th line of the divided unit image data as it is, and processed divided unit image data obtained from character image data for each character. Are sequentially encoded for a plurality of character image data , and an encoding step for generating encoded data is executed.

好ましくは、画像符号化プログラムは、文字画像データから得られる第1分割単位画像データから得られる第1加工分割単位画像データの、符号化後のデータ量を算出する算出ステップと、文字画像データを90度回転させて回転画像データを生成する回転ステップと、回転画像データを第1の方向に分割して得られる第2分割単位画像データについて、第2分割単位画像データに含まれる第nラインの値と第(n−1)ラインの値との差分を算出し、その差分を第nラインの値とした第2加工分割単位画像データの、符号化後のデータ量を予測する予測ステップとをさらに実行させ、符号化ステップにおいては、第1加工分割単位画像データと第2加工分割単位画像データとのうち、符号化後のデータ量が小さい方の加工分割単位画像データを符号化する。 Preferably, the image coding program, the first processing division unit image data obtained from the first division unit image data obtained from the character image data, a calculation step of calculating a data amount after coding, character image data A rotation step for generating rotated image data by rotating 90 degrees, and second divided unit image data obtained by dividing the rotated image data in the first direction, the nth line included in the second divided unit image data. Calculating a difference between the value and the value of the (n−1) -th line, and predicting the encoded data amount of the second processed division unit image data using the difference as the value of the n-th line. Further, in the encoding step, the processed divided unit image data having the smaller encoded data amount out of the first processed divided unit image data and the second processed divided unit image data. The encoding.

本発明のさらに他の局面に従うと、画像復号プログラムは、上述の画像符号化プログラムを実行することによって複数の文字画像データを連続して符号化処理することで生成された符号化データに対して復号処理を実行して、1文字分の文字画像データを得る処理をコンピュータに実行させるプログラムであって、1文字分の文字画像データを特定する情報を取得する取得ステップと、文字画像データを特定する情報と、符号化データ上の文字画像データに対応する位置との対応を示すアクセステーブルにアクセスし、取得された文字画像データを特定する情報に対応した、符号化データ上の位置を特定する特定ステップと、上述の画像符号化プログラムを実行することによって複数の文字画像データを連続して符号化処理することで生成された符号化データ上の、特定された位置にあるデータを復号して、複数の加工分割単位画像データを生成する復号ステップと、各々の分割単位画像データの第(n−1)ラインの値と、各々の加工分割単位画像データの第nラインの値とを用いて、各々の分割単位画像データの第nラインの値を算出し、複数の加工分割単位画像データから、各々、分割単位画像データを生成する作成ステップと、作成ステップにおいて上記複数の加工分割単位画像データから作成された複数の分割単位画像データを統合して単位画像を生成する統合ステップとを実行させる。 According to still another aspect of the present invention, an image decoding program executes encoded image data generated by sequentially encoding a plurality of character image data by executing the above-described image encoding program . A program for causing a computer to execute a decoding process to obtain character image data for one character , an acquisition step for acquiring information for specifying character image data for one character, and specifying character image data and information, accessing the access table showing the correspondence between the position corresponding to the character image data in the encoded data, corresponding to the information specifying the character image data acquired, identifying the location on the encoded data It is generated by encoding a plurality of character image data continuously by executing the specific step and the above-described image encoding program. On encoded data, decodes the data in a specific position, a decoding step of generating a plurality of processing the divided unit image data, the (n-1) of each of the divided unit image data line values And the value of the nth line of each of the processed divided unit image data, the value of the nth line of each divided unit image data is calculated, and each divided unit image is obtained from the plurality of processed divided unit image data. A creation step for generating data, and an integration step for generating a unit image by integrating a plurality of division unit image data created from the plurality of processed division unit image data in the creation step are executed.

好ましくは、画像復号プログラムは、文字画像データが符号化時に90度回転されたものであるか否かを示す情報にアクセスし、文字画像データが符号化時に90度回転されたものである場合、生成された文字画像データを符号化時の回転の向きに対して逆向きに90度回転させるステップをさらに実行させる。 Preferably, the image decoding program, if the character image data in which access information indicating whether or not that is rotated 90 degrees at the time of encoding, the character image data is rotated 90 degrees at the time of encoding, A step of rotating the generated character image data by 90 degrees in the opposite direction to the rotation direction at the time of encoding is further executed.

本発明にかかる画像符号化装置では、文字画像(文字画像データ)に代表される、似たサイズのデータが、一定周期で配置されている特徴を持った画像データ、特に漢字に顕著なようにデータによって特定の方向の線分が多く含まれているという特徴を持った画像データを、少ない計算量で高効率に符号化することができる。   In the image coding apparatus according to the present invention, data of a similar size, represented by a character image (character image data), is conspicuous in image data having a characteristic that is arranged at a constant period, particularly in Chinese characters. Image data having a feature that a lot of line segments in a specific direction are included in the data can be encoded with a small amount of calculation with high efficiency.

また、本発明にかかる画像復号装置では、上記画像符号化装置で符号化されたデータを、少ない計算量で復号することができる。   In the image decoding apparatus according to the present invention, the data encoded by the image encoding apparatus can be decoded with a small amount of calculation.

以下に、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。   Embodiments of the present invention will be described below with reference to the drawings. In the following description, the same parts and components are denoted by the same reference numerals. Their names and functions are also the same.

本実施の形態にかかる画像符号化装置および画像復号装置は、情報処理装置としてのパーソナルコンピュータ等のコンピュータによって実現されるものであってもよいし、テキスト処理装置としての携帯機器に搭載されるものであってもよい。本実施の形態においては、画像符号化装置は、情報処理装置としてのパーソナルコンピュータ(以下、PCと略する)に搭載されているものとする。また、画像復号装置は、テキスト処理装置としての携帯機器の一例としての、携帯電話に搭載されているものとする。テキスト処理装置の他の具体例としては、PDA(Personal Digital Assistants)や携帯ゲーム装置や表示装置を備えた家電などが該当する。   The image encoding device and the image decoding device according to the present embodiment may be realized by a computer such as a personal computer as an information processing device, or mounted in a portable device as a text processing device. It may be. In the present embodiment, it is assumed that the image encoding apparatus is mounted on a personal computer (hereinafter abbreviated as a PC) as an information processing apparatus. Further, the image decoding device is assumed to be mounted on a mobile phone as an example of a mobile device as a text processing device. Other specific examples of the text processing device include PDAs (Personal Digital Assistants), portable game devices, and home appliances equipped with display devices.

<1.画像符号化装置>
[第1の実施の形態]
図48は、本実施の形態にかかる画像符号化装置を搭載する、情報処理装置としてのPC3のハードウェア構成の具体例を示す図であり、一般的なPCのハードウェア構成の具体例を示すブロック図である。
<1. Image Encoding Device>
[First Embodiment]
FIG. 48 is a diagram illustrating a specific example of the hardware configuration of the PC 3 as the information processing apparatus equipped with the image encoding device according to the present embodiment, and illustrates a specific example of the general hardware configuration of the PC. It is a block diagram.

図48を参照して、PC3は、装置全体を制御するCPU101と、ROM103と、RAM105と、ハードディスクドライブ107と、フレキシブルディスクドライブ(FDD:Flexible Disk Drive)やCD−ROM(Compact Disk-Read Only Memory)ドライブなど記録媒体2から情報を読取る読取部109と、キーボードやマウスなどにより構成される入力部111と、外部と通信行なうための通信部113と、表示部115とを含んで構成される。   Referring to FIG. 48, the PC 3 is a CPU 101 for controlling the entire apparatus, a ROM 103, a RAM 105, a hard disk drive 107, a flexible disk drive (FDD), a CD-ROM (Compact Disk-Read Only Memory). ) A reading unit 109 that reads information from the recording medium 2 such as a drive, an input unit 111 configured by a keyboard, a mouse, and the like, a communication unit 113 for communicating with the outside, and a display unit 115 are configured.

本実施の形態にかかる画像符号化装置は、PC3のハードウェア、およびROM103等の記憶部に記憶されCPU101により実行されるソフトウェアにより構成され、後述する画像符号化処理を行なうための機能は、CPU101がROM103等の記憶部に記憶されるプログラムを読出して実行することによって、主にCPU101に形成される。または、上記機能の少なくとも一部は図48に示されたPC3のハードウェアによって構成されてもよい。   The image encoding apparatus according to the present embodiment is configured by hardware of the PC 3 and software that is stored in a storage unit such as the ROM 103 and executed by the CPU 101. A function for performing an image encoding process to be described later is the CPU 101. Is mainly formed in the CPU 101 by reading and executing a program stored in a storage unit such as the ROM 103. Alternatively, at least a part of the above functions may be configured by the hardware of the PC 3 shown in FIG.

図2は、本実施の形態にかかるPC3において画像符号化装置として機能し、画像符号化処理を行なうための機能構成の具体例を示すブロック図である。第1の実施の形態にかかる画像符号化装置は、異なる文字コードに対応する文字画像データの系列を、ワードの系列ごとに、ライン間差分を用いて符号化する。   FIG. 2 is a block diagram illustrating a specific example of a functional configuration for functioning as an image encoding device in the PC 3 according to the present embodiment and performing image encoding processing. The image encoding device according to the first embodiment encodes a sequence of character image data corresponding to different character codes using a difference between lines for each sequence of words.

図2を参照して、画像符号化装置の上記機能は、コントローラ1201、画像データメモリ1202、加工分割画像データメモリ1203、エントロピー符号化部1204、符号化データメモリ1205、アクセステーブルデータ生成部1206、アクセステーブルデータメモリ1207、文字識別情報・グリフ番号対応ルールメモリ1208、および画像処理部1209を含んで構成され、それぞれの構成要素は、データバス1210を介して互いに、また外部に接続される。   Referring to FIG. 2, the above-described functions of the image encoding device include a controller 1201, an image data memory 1202, a processed divided image data memory 1203, an entropy encoding unit 1204, an encoded data memory 1205, an access table data generation unit 1206, An access table data memory 1207, a character identification information / glyph number correspondence rule memory 1208, and an image processing unit 1209 are configured, and each component is connected to each other and the outside via a data bus 1210.

さらに、図3は、画像処理部1209の構成の具体例を示すブロック図である。図3を参照して、画像処理部1209は、画像演算部3801、文字画像データメモリ3802、分割文字画像データメモリ3803、および加工分割文字画像データメモリ3804を含んで構成され、各構成要素はデータバス3805を介して互いに、また外部に接続される。   FIG. 3 is a block diagram illustrating a specific example of the configuration of the image processing unit 1209. Referring to FIG. 3, image processing unit 1209 includes an image calculation unit 3801, a character image data memory 3802, a divided character image data memory 3803, and a processed divided character image data memory 3804. Each component is a data They are connected to each other and the outside via a bus 3805.

さらに、図4は、アクセステーブルデータ生成部1206の構成の具体例を示すブロック図である。図4を参照して、アクセステーブルデータ生成部1206は、文字識別情報・グリフ番号変換データ生成部2201、およびグリフ番号・オフセット情報変換データ生成部2202を含んで構成され、各構成要素はデータバス2203を介して互いに、また外部に接続される。   Further, FIG. 4 is a block diagram showing a specific example of the configuration of the access table data generation unit 1206. Referring to FIG. 4, access table data generation unit 1206 includes a character identification information / glyph number conversion data generation unit 2201 and a glyph number / offset information conversion data generation unit 2202, and each component is a data bus. They are connected to each other and to the outside through 2203.

画像データメモリ1202はROM103等の記憶部の所定領域で構成され、図示されない取得部によって取得された画像データは、画像データメモリ1202に入力(ロード)される。上記取得部は本発明において特定の手段に限定されず、CD−ROMなどの記録媒体からデータを読取る読取部109や、他の装置から送信されるデータを受信する通信部113などが挙げられる。   The image data memory 1202 includes a predetermined area of a storage unit such as the ROM 103, and image data acquired by an acquisition unit (not shown) is input (loaded) to the image data memory 1202. The acquisition unit is not limited to a specific means in the present invention, and examples include a reading unit 109 that reads data from a recording medium such as a CD-ROM, and a communication unit 113 that receives data transmitted from another device.

ここで、データをメモリに読出す単位としてワードが用いられる。ワードまたはワードの倍数と1文字を構成する画像データ(以降、文字画像データと呼ぶ)のサイズとは一致していない場合がある。そのため、たとえば2ワードで1文字分の文字画像データが読出される場合、メモリに書込まれるデータにおいて、ワードの境目(ワードバウンダリ)と文字の中心とが一致しない。具体的に図5を用いて説明する。なお、図5および以下の実施の形態においては、ワードが水平方向に配置されているものとする。また、文字画像データの縦・横ドット数は一定であるものとする。しかしながら、本発明において、処理対象の画像データのサイズや文字データのサイズは特定のサイズに限定されず、以下の例では、1つの具体例として、ワードサイズを8ビットとする。また、1文字を構成する文字画像データのサイズは、縦・横ドット数とも11ドットとする(以下11×11フォントと呼ぶことがある)。そして、図5に示されるように、左に1ドットオフセットして横2バイト、縦11ドットの2値画像で個々の文字データが格納されているものとする。なお、以下では、画像ラインを数える際は0から始めるものとする。したがって、先頭のラインは「0ライン目」となる。図5は11ドット×11ドットのサイズの、2値画像である文字画像データ101の具体例を表わしている。図5に示される1文字分の文字画像データ101は、2ワード分に相当する16ビット×11ラインで構成されており、左側は常に1ビット以上空けて11ドット×11ドットのサイズの文字が表わされる。なお、文字の形状によっては、1文字を構成する文字画像データに文字を構成するドット(以下「黒ドット」)がほとんど、あるいはまったく入っていないこともあり得る。なお、ここでは、2値画像のバイトの値として、左端のドットをMSB(Most Significant Bit)とするものとする。また、以下の説明を通じて、黒ドットを1、それ以外のドットを0とする。たとえば、後述する図12のデータ102の場合、0ライン目の値は、16進数で0X02となる。   Here, a word is used as a unit for reading data into the memory. A word or a multiple of a word and the size of image data (hereinafter referred to as character image data) constituting one character may not match. Therefore, for example, when character image data for one character is read in two words, the boundary between words (word boundary) does not coincide with the center of the character in the data written in the memory. This will be specifically described with reference to FIG. In FIG. 5 and the following embodiments, it is assumed that words are arranged in the horizontal direction. The number of vertical and horizontal dots in the character image data is assumed to be constant. However, in the present invention, the size of the image data to be processed and the size of the character data are not limited to a specific size, and in the following example, the word size is 8 bits as one specific example. The size of the character image data constituting one character is 11 dots in both vertical and horizontal dots (hereinafter, sometimes referred to as 11 × 11 font). Then, as shown in FIG. 5, it is assumed that individual character data is stored as a binary image of 2 bytes wide and 11 dots long by offsetting 1 dot to the left. In the following, it is assumed that the image line starts from 0 when counting. Therefore, the first line is “0th line”. FIG. 5 shows a specific example of character image data 101 which is a binary image having a size of 11 dots × 11 dots. The character image data 101 for one character shown in FIG. 5 is composed of 16 bits × 11 lines corresponding to two words, and characters on the left side are always 11 bits × 11 dots at least 1 bit apart. Represented. Depending on the shape of the character, there may be little or no dot (hereinafter “black dot”) constituting the character in the character image data constituting one character. Here, the leftmost dot is assumed to be MSB (Most Significant Bit) as the byte value of the binary image. In the following description, black dots are set to 1 and other dots are set to 0. For example, in the case of data 102 in FIG. 12 described later, the value of the 0th line is 0X02 in hexadecimal.

図6は、画像データメモリ1202に格納される、2値画像である画像データの具体例を示す図である。画像データメモリ1202に格納される画像データは、図5に示された、縦方向に1文字を構成する文字画像データが、複数個連結されてなる画像データであるものとする。   FIG. 6 is a diagram illustrating a specific example of image data that is a binary image stored in the image data memory 1202. It is assumed that the image data stored in the image data memory 1202 is image data formed by connecting a plurality of character image data constituting one character in the vertical direction as shown in FIG.

文字識別情報・グリフ番号対応ルールメモリ1208はROM103等の記憶部の所定領域で構成され、後述する文字識別情報とグリフ番号との対応を示す文字識別情報・グリフ番号対応ルールを記憶する。   The character identification information / glyph number correspondence rule memory 1208 includes a predetermined area of a storage unit such as the ROM 103, and stores character identification information / glyph number correspondence rules indicating correspondence between character identification information and glyph numbers, which will be described later.

文字識別情報は文字を識別する情報を指し、具体的には、文字コードや書体などを指す。グリフ番号は画像データメモリ1202に格納されている文字画像データを特定する情報を指し、具体的には画像データメモリ1202に格納されている各文字画像データに付加された0から始まる番号を指す。以下の説明では、グリフ番号は、各文字画像データが、符号化される順序にもなっている。なお、ここでは、「グリフ」は、文字画像で表現される字形という意味で用いられる。   Character identification information indicates information for identifying a character, and specifically indicates a character code, a typeface, and the like. The glyph number indicates information specifying character image data stored in the image data memory 1202, and specifically indicates a number starting from 0 added to each character image data stored in the image data memory 1202. In the following description, the glyph number is also the order in which each character image data is encoded. Here, “glyph” is used to mean a character shape represented by a character image.

文字識別情報・グリフ番号対応ルールは画像データメモリ1202に格納されている各文字画像データと文字識別情報との対応を規定するものであり、具体的には、図7に示されるように、文字識別情報としての文字コードと、文字識別情報としての書体識別情報と、画像データメモリ1202に格納されている各文字画像データを特定するグリフ番号との対応を示すテーブルである。なお、以降の具体例では、文字識別情報は2バイトのシフトJISコードと、1ビットの書体指定情報(ゴシック体が0で表わされ、明朝体が1で表わされる)とする。また、この具体例では、フォントサイズが異なる文字は符号化データ自体が異なっているものとする。したがって、フォントサイズについては文字識別情報には含まれないものとする。   The character identification information / glyph number correspondence rule specifies the correspondence between each character image data stored in the image data memory 1202 and the character identification information. Specifically, as shown in FIG. 10 is a table showing correspondences between character codes as identification information, typeface identification information as character identification information, and glyph numbers that specify character image data stored in the image data memory 1202. In the following specific examples, the character identification information is a 2-byte shift JIS code and 1-bit typeface designation information (Gothic type is represented by 0 and Mincho type is represented by 1). In this specific example, it is assumed that characters having different font sizes have different encoded data. Therefore, the font size is not included in the character identification information.

図7に示されるテーブルに規定されるように、文字コードが同じであっても書体が異なる場合には異なるグリフに対応する場合がある。または、異なる文字コードであっても、同一のグリフに対応する場合があってもよい。   As specified in the table shown in FIG. 7, even if the character code is the same, if the typeface is different, it may correspond to a different glyph. Alternatively, different character codes may correspond to the same glyph.

画像処理部1209の文字画像データメモリ3802、分割文字画像データメモリ3803、および加工分割文字画像データメモリ3804はROM103等の記憶部の所定領域で構成される。   The character image data memory 3802, the divided character image data memory 3803, and the processed divided character image data memory 3804 of the image processing unit 1209 are configured by predetermined areas of a storage unit such as the ROM 103.

画像データメモリ1202に格納された画像データから、画像演算部3801によって1文字分の文字画像データが読出され、文字画像データメモリ3802に格納される。文字画像データメモリ3802に格納された文字画像データは、画像演算部3801によって、横方向のバイト境界で縦方向に分割され、「分割文字画像データ」として、分割文字画像データメモリ3803に格納される。画像は一般にラスタ順にアドレスが配置されているので、バイト境界で分割した場合には、文字画像データでアドレスが不連続な、上下方向に隣接するバイトが1つの分割文字画像データ上でアドレスが連続するようになる。   Character image data for one character is read from the image data stored in the image data memory 1202 by the image calculation unit 3801 and stored in the character image data memory 3802. The character image data stored in the character image data memory 3802 is divided in the vertical direction at the byte boundary in the horizontal direction by the image calculation unit 3801 and stored in the divided character image data memory 3803 as “divided character image data”. . Since images are generally arranged in raster order, when they are divided at byte boundaries, the addresses are discontinuous in character image data, and the addresses adjacent in the vertical direction are continuous on one divided character image data. Will come to do.

なお、本発明において文字画像データの分割方法は特定の方法に限定されず、上記方法は1つの具体例である。分割方法は上記具体例のように、文字画像データのドット構成を考慮した方法であることが好ましい。このような分割方法で文字画像データを分割することで、後述するように、符号化にあたってより特定の値に分布を集中させることができるようになる。   In the present invention, the character image data dividing method is not limited to a specific method, and the above method is one specific example. The division method is preferably a method that considers the dot configuration of the character image data as in the above specific example. By dividing the character image data by such a dividing method, the distribution can be concentrated on a specific value in encoding as will be described later.

また、本実施の形態における分割方法はバイト(8ビット)単位で区切るものであるため、通常のバイト単位でCPUで処理がしやすいものとなっている。もちろん、この分割方法の具体例は画像上でのバイト配置が、水平方向にバイトを構成するビットが並んでいることが前提とされている。そのため、この前提が異なれば、分割方法は本具体例の分割方法に替えて、CPUでの処理がしやすい分割方法とすることが好ましい。   Further, since the division method in the present embodiment is divided in units of bytes (8 bits), the CPU can easily perform processing in units of normal bytes. Of course, a specific example of this division method is based on the premise that the byte arrangement on the image is arranged with the bits constituting the byte in the horizontal direction. Therefore, if this premise is different, the dividing method is preferably a dividing method that can be easily processed by the CPU, instead of the dividing method of this specific example.

分割文字画像データメモリ3803に格納されている分割文字画像データについて、画像演算部3801において排他的論理和が算出され、算出結果が「加工分割文字画像データ」として加工分割文字画像データメモリ3804に格納される。   For the divided character image data stored in the divided character image data memory 3803, an exclusive OR is calculated in the image calculation unit 3801, and the calculation result is stored in the processed divided character image data memory 3804 as “processed divided character image data”. Is done.

なお、ここでは排他的論理和は、広く知られているように、2つのビットが一致すれば0、不一致であれば1とする演算である。ここでは、1文字ごとに閉じたものとするため、最初のラインは排他的論理和を用いずに、入力データである分割文字画像データから取出した0ライン目をそのまま用いる。   Here, as is widely known, exclusive OR is an operation that sets 0 when two bits match and 1 when they do not match. Here, since each character is closed, the first line uses the 0th line extracted from the divided character image data as the input data without using the exclusive OR.

したがって、AとBとの排他的論理和を記号「^」で表わすものとすると、
n=0について、
(加工分割文字画像データのnライン目)=(分割文字画像データのnライン目)
n≧1について、
(加工分割文字画像データのnライン目)=(分割文字画像データの(n−1)ライン目)^(分割文字画像データのnライン目)
となる。
Therefore, if the exclusive OR of A and B is represented by the symbol “^”,
For n = 0,
(Nth line of processed divided character image data) = (nth line of divided character image data)
For n ≧ 1,
(Nth line of processed divided character image data) = ((n-1) th line of divided character image data) ^ (nth line of divided character image data)
It becomes.

このように、分割文字画像データの0ライン目はそのまま加工分割画像データにコピーされ、残りのラインについて排他的論理和が算出されることで、ある文字を復号するにあたって他の文字を復号する必要がなく、各文字を独立して復号することができる。   In this way, the 0th line of the divided character image data is copied to the processed divided image data as it is, and the exclusive OR is calculated for the remaining lines, so that it is necessary to decode other characters when decoding one character. Each character can be decoded independently.

ここでは差分を得る方法として、隣接するライン間の排他的論理和を用いたが、もちろんこの方法は1つの具体例であり、本発明においては特定の方法に限定されるものではない。差分を得る方法は、元の情報を失うことなく(可逆性を損なうことなく)、特定の値の頻度を大きくするような変換であれば排他的論理和でなくてもよいし、画像データの内容によっては、互いに隣接するラインの代わりに、離れたライン間の排他的論理和でも構わない。特に後者は、そのようにすることで、(たとえば周期的に類似した内容のラインが現れることがわかっている場合)特定の値の頻度をより大きくする(値の分布の偏りを大きくする)ことができれば有効である。   Here, an exclusive OR between adjacent lines is used as a method for obtaining a difference, but this method is, of course, a specific example, and the present invention is not limited to a specific method. The method of obtaining the difference may not be exclusive OR as long as the conversion increases the frequency of a specific value without losing the original information (without losing reversibility). Depending on the contents, an exclusive OR between distant lines may be used instead of adjacent lines. In particular, the latter can be used to increase the frequency of a specific value (for example, to increase the bias in the distribution of values) (for example, when it is known that a line with similar contents appears periodically). It is effective if possible.

加工分割画像データメモリ1203はROM103等の記憶部の所定領域で構成される。加工分割文字画像データメモリ3804に格納された加工分割文字画像データは、画像演算部3801によって加工分割画像データメモリ1203に出力されて、格納される。   The processed divided image data memory 1203 includes a predetermined area of a storage unit such as the ROM 103. The processed divided character image data stored in the processed divided character image data memory 3804 is output to the processed divided image data memory 1203 by the image calculation unit 3801 and stored therein.

符号化データメモリ1205はROM103等の記憶部の所定領域で構成される。加工分割画像データメモリ1203に格納された加工分割画像はエントロピー符号化部1204においてエントロピー符号化され、「符号化データ」として符号化データメモリ1205に格納される。   The encoded data memory 1205 includes a predetermined area of a storage unit such as the ROM 103. The processed divided image stored in the processed divided image data memory 1203 is entropy encoded by the entropy encoding unit 1204 and stored in the encoded data memory 1205 as “encoded data”.

なお、エントロピー符号化部1204における符号化方式は本発明において特定の方式に限定されず、公知のあらゆる技術が採用され得る。符号化方式の具体例としては固定ハフマン符号化(以下、単に「ハフマン符号化」と表現する)、算術符号化などが挙げられ、本実施の形態にかかる画像符号化装置ではハフマン符号化が行なわれるものとする。ハフマン符号化の利点は復号のための計算量が少ないことである。また、エントロピー符号化を行なう単位としては、加工分割文字画像データではなく、文字単位より大きい加工分割画像データとすることが好ましい。一般に、一塊のデータとして符号化される範囲(ハフマン符号化では、ハフマンテーブルを共有して符号化されるデータの範囲)を文字画像データとすると、総データ量に対してオーバヘッドが大きくなりやすいためである。ここではオーバヘッドとは、元のデータに対応する符号以外に必要なデータ量を意味する。たとえばハフマン符号化を採用する場合であればハフマンテーブルのデータ量がオーバヘッドに相当する。言うまでもなく、オーバヘッドが総データ量に対して充分に小さな符号化方式が採用される場合には、一塊のデータとして符号化される範囲は加工分割文字画像データとしてもよい。   Note that the encoding method in the entropy encoding unit 1204 is not limited to a specific method in the present invention, and any known technique may be employed. Specific examples of the encoding method include fixed Huffman encoding (hereinafter simply referred to as “Huffman encoding”), arithmetic encoding, and the like. The image encoding apparatus according to the present embodiment performs Huffman encoding. Shall be. The advantage of Huffman coding is that the amount of calculation for decoding is small. Further, it is preferable that the unit for performing entropy encoding is not the processed divided character image data but the processed divided image data larger than the character unit. In general, if character image data is a range encoded as a lump of data (in Huffman encoding, the range of data encoded by sharing a Huffman table), the overhead tends to increase with respect to the total amount of data. It is. Here, the overhead means a necessary data amount other than the code corresponding to the original data. For example, if Huffman coding is employed, the amount of data in the Huffman table corresponds to overhead. Needless to say, when an encoding method in which the overhead is sufficiently small with respect to the total amount of data is adopted, the range encoded as a lump of data may be processed divided character image data.

アクセステーブルデータメモリ1207はROM103等の記憶部の所定領域で構成される。アクセステーブルデータ生成部1206は符号化データメモリ1205に格納された符号化データにアクセスするためのアクセステーブルデータを生成して、アクセステーブルデータメモリ1207に格納する。   The access table data memory 1207 is configured with a predetermined area of a storage unit such as the ROM 103. The access table data generation unit 1206 generates access table data for accessing the encoded data stored in the encoded data memory 1205 and stores it in the access table data memory 1207.

アクセステーブルデータは、文字識別情報と、当該文字識別情報で特定される文字が符号化データ上のどこからどこまでの符号に対応するかを示す情報(この情報をオフセット情報と称する)との対応を規定するデータであり、符号化データと共に格納される。アクセステーブルデータは後述する復号処理において用いられる。具体例としては、図8に示されるように、アクセステーブルデータは、文字識別情報を、符号化データ上の何番目(以下先頭を0番目とする)のグリフであるかを示す、グリフ番号に変換するための文字識別情報・グリフ番号変換データ1401と、グリフ番号をオフセット情報に変換するためのグリフ番号・オフセット情報変換データ1402とを含むデータとする。   The access table data defines the correspondence between the character identification information and information indicating where the character specified by the character identification information corresponds to the code from where to where on the encoded data (this information is referred to as offset information). And is stored together with the encoded data. The access table data is used in the decryption process described later. As a specific example, as shown in FIG. 8, the access table data includes character identification information in a glyph number indicating the number of glyphs in the encoded data (hereinafter referred to as the 0th glyph). The data includes character identification information / glyph number conversion data 1401 for conversion and glyph number / offset information conversion data 1402 for converting the glyph number into offset information.

一般に、データ容量を削減するための符号化では、同じデータ長の画像データであっても符号化後のデータ長は異なる。そのため、グリフ番号から、個々の文字に対応するデータに対応する符号化データ上のデータ位置を単純な計算で得ることができず、オフセット情報が必要とされる。   In general, in encoding for reducing the data capacity, the encoded data length differs even for image data having the same data length. Therefore, the data position on the encoded data corresponding to the data corresponding to each character cannot be obtained from the glyph number by simple calculation, and offset information is required.

より詳しくは、アクセステーブルデータ生成部1206の文字識別情報・グリフ番号変換データ生成部2201は、文字識別情報に基づいて内部文字コードを取得する(なお、ここでいう「取得」とは算出することも含むとする。以下同様)。内部文字コードとは、データアクセスを効率化するため、文字識別情報で特定される文字が、当該画像符号化装置における何番目の文字コードであるかを示す値を指す。ここでは、文字コードが同一であっても、書体指定情報が異なれば内部文字コードも異なるものとする。   More specifically, the character identification information / glyph number conversion data generation unit 2201 of the access table data generation unit 1206 acquires an internal character code based on the character identification information (note that “acquisition” here is calculated) The same applies hereinafter). The internal character code refers to a value indicating which character code in the image encoding device is the character specified by the character identification information in order to improve data access efficiency. Here, even if the character code is the same, the internal character code is different if the typeface designation information is different.

アクセステーブルデータ生成部1206のグリフ番号・オフセット情報変換データ生成部2202はグリフ番号・オフセット情報変換データを生成し、アクセステーブルデータメモリ1207に書込む。グリフ番号・オフセット情報変換データとは、グリフ番号から、各グリフに対応する符号データを探し出すための、グリフ番号と、符号化データ上でのオフセット情報との対応を表わす値を指す。   The glyph number / offset information conversion data generation unit 2202 of the access table data generation unit 1206 generates glyph number / offset information conversion data and writes it into the access table data memory 1207. The glyph number / offset information conversion data refers to a value representing the correspondence between the glyph number and the offset information on the encoded data for finding the code data corresponding to each glyph from the glyph number.

図9は、本実施の形態にかかる画像符号化装置における符号化処理を示すフローチャートである。図9のフローチャートに示される処理は、制御部120がROM103等の記憶部に記憶されるプログラムを読出して実行し、コントローラ1201が図2等に示された各部を制御することによって実現される。   FIG. 9 is a flowchart showing an encoding process in the image encoding apparatus according to the present embodiment. The processing shown in the flowchart of FIG. 9 is realized by the control unit 120 reading and executing a program stored in the storage unit such as the ROM 103, and the controller 1201 controlling each unit shown in FIG.

図9を参照して、始めに、コントローラ1201によって、画像データが画像データメモリ1202に入力(ロード)される(ステップS1301)。ここでは、具体例として図6に示された画像データ(11×11フォント)がロードされたものとして以下の説明を行なう。さらに、コントローラ1201によって、先述の文字識別情報・グリフ番号対応ルールが文字識別情報・グリフ番号対応ルールメモリ1208に入力(ロード)される(ステップS1302)。ここでは、具体例として図7に示された文字識別情報・グリフ番号対応ルールがロードされたものとして以下の説明を行なう。   Referring to FIG. 9, first, image data is input (loaded) to image data memory 1202 by controller 1201 (step S1301). Here, the following description will be made assuming that the image data (11 × 11 font) shown in FIG. 6 is loaded as a specific example. Further, the controller 1201 inputs (loads) the aforementioned character identification information / glyph number correspondence rule to the character identification information / glyph number correspondence rule memory 1208 (step S1302). Here, the following description will be given on the assumption that the character identification information / glyph number correspondence rule shown in FIG. 7 is loaded as a specific example.

コントローラ1201の画像演算部3801は、ステップS1301で画像データメモリ1203に格納された画像データから取出された文字画像データを横方向のバイト境界によって縦方向に分割して分割文字画像データを得る(ステップS1303)。ステップS1303で得られた分割文字画像データより、画像処理部1209において排他的論理和が算出され、算出結果が加工分割文字画像データとして加工分割画像データメモリ1203に格納される(ステップS1304)。加工分割画像データと加工分割画像データメモリ1203とには、すでに処理が終わった文字画像データに対応する、加工分割文字画像データがすでに格納されている。ステップS1303では、加工分割文字画像データは、すでに格納されている、加工分割文字画像データの末尾に追加されて加工分割画像データメモリ1203に格納される。「加工分割画像データ」とはこのようにして蓄積された加工分割文字画像データのことであり、その作られ方から、文字画像データをステップS1303で分割する数だけ存在する。したがって、図6に示された画像データがロードされた場合には加工分割画像データは2つ存在することになる。図49および図50は、すでに2文字分の加工分割文字画像データが格納されているところに、ステップS1304で、1文字分の加工分割文字画像データが追加される前および後の具体例を示す図である。上で述べたように、加工分割画像データは、文字画像データをステップS1303で2分割することに対応して、2つ存在するが、もう1つの加工分割画像データについて、1文字分の加工分割文字画像データが追加される前および後の具体例を示す図が図51および図52である。   The image calculation unit 3801 of the controller 1201 obtains divided character image data by dividing the character image data extracted from the image data stored in the image data memory 1203 in step S1301 in the vertical direction by the horizontal byte boundary (step S1301). S1303). From the divided character image data obtained in step S1303, an exclusive OR is calculated in the image processing unit 1209, and the calculation result is stored in the processed divided image data memory 1203 as processed divided character image data (step S1304). The processed divided image data and the processed divided image data memory 1203 already store processed divided character image data corresponding to the character image data that has already been processed. In step S1303, the processed divided character image data is added to the end of the already stored processed divided character image data and stored in the processed divided image data memory 1203. “Processed divided image data” refers to the processed divided character image data stored in this manner, and there are as many character image data as the number of characters image data divided in step S1303. Therefore, when the image data shown in FIG. 6 is loaded, two processed divided image data exist. FIG. 49 and FIG. 50 show specific examples before and after the addition of one character of processed divided character image data in step S1304, where two characters of processed divided character image data have already been stored. FIG. As described above, there are two pieces of processed divided image data corresponding to the division of character image data into two in step S1303. However, one piece of processed divided image data is processed for the other processed divided image data. FIGS. 51 and 52 show specific examples before and after the character image data is added.

ステップS1301でロードされた画像データに含まれるすべての文字が処理されていれば(ステップS1305でYES)処理はステップS1306に進み、処理されていなければ(ステップS1305でNO)処理はステップS1302に戻る。   If all the characters included in the image data loaded in step S1301 have been processed (YES in step S1305), the process proceeds to step S1306. If not processed (NO in step S1305), the process returns to step S1302. .

ステップS1306では、エントロピー符号化部1204が、加工分割画像データメモリ1203に格納された加工分割画像データに対してエントロピー符号化処理を実行し、符号化データを符号化データメモリ1205に格納する。   In step S <b> 1306, the entropy encoding unit 1204 performs entropy encoding processing on the processed divided image data stored in the processed divided image data memory 1203 and stores the encoded data in the encoded data memory 1205.

ステップS1301でロードされた画像データから得られたすべての加工分割画像データに対して処理が終了していれば(ステップS1307でYES)、処理はステップS1308に進み、そうでなければ(ステップS1307でNO)、処理はステップS1306に戻る。   If processing has been completed for all the processed divided image data obtained from the image data loaded in step S1301 (YES in step S1307), the process proceeds to step S1308; otherwise (in step S1307). NO), the process returns to step S1306.

ステップS1308では、アクセステーブルデータ生成部1206が符号化データメモリ1205に格納された符号化データにアクセスするためのアクセステーブルデータを生成して、アクセステーブルデータメモリ1207に格納する。   In step S 1308, the access table data generation unit 1206 generates access table data for accessing the encoded data stored in the encoded data memory 1205, and stores it in the access table data memory 1207.

符号化データメモリ1205に格納されている符号化データは画像データの符号化結果としてコントローラ1201によって当該画像符号化装置より出力される(ステップS1309)。また、アクセステーブルデータメモリ1207に格納されているアクセステーブルデータも符号化データと共に当該画像符号化装置より出力され(ステップS1310)、処理が終了する。   The encoded data stored in the encoded data memory 1205 is output from the image encoding apparatus by the controller 1201 as the encoding result of the image data (step S1309). Further, the access table data stored in the access table data memory 1207 is also output from the image encoding apparatus together with the encoded data (step S1310), and the process ends.

図10は、上記ステップS1303における画像データの分割処理を示すフローチャートである。   FIG. 10 is a flowchart showing the image data dividing process in step S1303.

図10を参照して、始めに、画像演算部3801は、上記ステップS1301で画像データメモリ1202にロードされた画像データから1文字分の文字画像データを読出し、文字画像データメモリ3802に格納する(ステップS3901)。   Referring to FIG. 10, first, image calculation unit 3801 reads character image data for one character from the image data loaded in image data memory 1202 in step S1301, and stores it in character image data memory 3802 (see FIG. 10). Step S3901).

画像データメモリ1202にロードされた画像データが図6に示される画像データである場合、上記ステップS3901では、図11の(A)〜(C)に示される文字画像データが順次、文字画像データメモリ3802に格納される。   When the image data loaded in the image data memory 1202 is the image data shown in FIG. 6, in step S3901, the character image data shown in FIGS. 3802.

次に、画像演算部3801は、文字画像データメモリ3802に格納された文字画像データを縦方向に分割して、分割文字画像データを分割文字画像データメモリ3803に格納し(ステップS3902)、処理をステップS1304に進める。   Next, the image calculation unit 3801 divides the character image data stored in the character image data memory 3802 in the vertical direction, stores the divided character image data in the divided character image data memory 3803 (step S3902), and performs processing. The process proceeds to step S1304.

具体的には、上記ステップS3901で得られた文字画像データが図11の(A)で示された、ロードされた画像データを分割して得られた文字画像データ、つまり先に説明された図5に示されるデータ101である場合、上記ステップS3902で画像演算部3801によって分割されることで、分割文字画像データは図12に示されるデータ102と図13に示されるデータ103となる。図5に示される構成の文字画像データの場合、左端のビットに値が入ることはないため、図12および図13に示されるように、このような方向に分割することで、分割文字画像データは左側のデータ102と右側のデータ103とで、画像を構成する、横方向のラインに含まれるドットからなる個々のバイトの値の分布は大きく異なることとなる。   Specifically, the character image data obtained in step S3901 is the character image data obtained by dividing the loaded image data shown in FIG. 11A, that is, the diagram described above. In the case of the data 101 shown in FIG. 5, the divided character image data becomes the data 102 shown in FIG. 12 and the data 103 shown in FIG. 13 by being divided by the image calculation unit 3801 in step S3902. In the case of the character image data having the configuration shown in FIG. 5, no value is entered in the leftmost bit. Therefore, as shown in FIGS. 12 and 13, the divided character image data is divided in such a direction. The left-side data 102 and the right-side data 103 differ greatly in the distribution of the values of the individual bytes comprising the dots included in the horizontal line constituting the image.

図13のデータ103のバイトの値については、上述のように文字が配置されているため、下位の4ビットは値が常に0となる。すなわち、データ103のバイトの値の種類は最大限16種類しかない。そのため、画像演算部3801において文字画像データを縦方向に分割することで、符号化効率向上に寄与する。   As for the byte value of the data 103 in FIG. 13, since the characters are arranged as described above, the lower 4 bits always have a value of 0. That is, there are only 16 types of byte values of the data 103 at the maximum. Therefore, dividing the character image data in the vertical direction in the image calculation unit 3801 contributes to the improvement of the encoding efficiency.

また、図14は、23ドット×23ドットのサイズを持った文字画像データの例であるが、ここでは左側のバイト201は、MSBが常に0であり、したがってバイトの値の種類は128種類しかない。すなわち、左側のバイト201は中央のバイト202や右側のバイト203とは値の分布が異なるため、画像演算部3801において文字画像データを縦方向に分割することで、符号化効率向上に寄与する。   FIG. 14 shows an example of character image data having a size of 23 dots × 23 dots. Here, the left byte 201 has an MSB of 0 at all times, and therefore there are only 128 types of byte values. Absent. That is, since the left byte 201 has a different value distribution from the central byte 202 and the right byte 203, dividing the character image data in the vertical direction in the image calculation unit 3801 contributes to improving the coding efficiency.

なお、文字画像データを縦方向に分割することが特に好ましいのは、上記具体例のように、特に、文字がワード(バイト)バウンダリ(境界)にしたがって文字画像データ上に配置されている場合である。そうなっていない画像データの具体例を図15に示す。図15に示される画像データ上では、ワードバウンダリ701、702をまたいで文字画像データが配置されている。ただし、このような場合も、適切なビットオペレーション(シフトなど)によって、文字がワードバウンダリをまたいで配置しないように変換することは可能である。   It is particularly preferable to divide the character image data in the vertical direction, particularly when the characters are arranged on the character image data according to the word (byte) boundary (boundary) as in the above specific example. is there. A specific example of image data that is not so is shown in FIG. On the image data shown in FIG. 15, character image data is arranged across the word boundaries 701 and 702. However, even in such a case, it is possible to convert the character so that it does not cross the word boundary by an appropriate bit operation (shift or the like).

図16は、上記ステップS1304における排他的論理和の算出処理を示すフローチャートである。   FIG. 16 is a flowchart showing the exclusive OR calculation process in step S1304.

図16を参照して、始めに、画像演算部3801は、上記ステップS3901で分割文字画像データメモリ3803に格納された分割文字画像データについて排他的論理和を算出し、加工分割文字画像データを加工分割文字画像データメモリ3804に格納する(ステップS4001)。具体的には、図12に示される分割文字画像データ102の排他的論理和が算出されると、図17に示される加工分割文字画像データ601が得られる。そして、画像演算部3801は、加工分割文字画像データメモリ3804に格納された加工分割文字画像データを加工分割画像データメモリ1203に出力する(ステップS4002)。   Referring to FIG. 16, first, image operation unit 3801 calculates an exclusive OR for the divided character image data stored in divided character image data memory 3803 in step S3901, and processes the processed divided character image data. The divided character image data memory 3804 is stored (step S4001). Specifically, when the exclusive OR of the divided character image data 102 shown in FIG. 12 is calculated, the processed divided character image data 601 shown in FIG. 17 is obtained. Then, the image calculation unit 3801 outputs the processed divided character image data stored in the processed divided character image data memory 3804 to the processed divided image data memory 1203 (step S4002).

ステップS1301でロードされた画像データから得られたすべての分割文字画像データについて排他的論理和を算出する処理が終了していれば(ステップS4003でYES)、処理を終了して上記ステップS1305に進める。そうでなければ(ステップS4003でNO)、処理はステップS4001に戻る。   If the process of calculating the exclusive OR for all the divided character image data obtained from the image data loaded in step S1301 has been completed (YES in step S4003), the process is terminated and the process proceeds to step S1305. . Otherwise (NO in step S4003), the process returns to step S4001.

図18のフローチャートを用いて、上記ステップS1308におけるアクセステーブルの生成処理を説明する。   The access table generation processing in step S1308 will be described with reference to the flowchart of FIG.

アクセステーブルに含まれる文字識別情報・グリフ番号変換データ1401の、最も単純な構成は、文字コードとグリフ番号との対応を規定するテーブルとする構成である。しかし、文字識別情報・グリフ番号変換データ1401をこのような構成とすると、文字識別情報・グリフ番号変換データ1401のデータサイズが(文字数)×(文字コードを格納するのに必要なビット長)となって効率的な符号化が達成され得ないため、次のように構成されることが好ましい。   The simplest configuration of the character identification information / glyph number conversion data 1401 included in the access table is a configuration that defines a correspondence between a character code and a glyph number. However, when the character identification information / glyph number conversion data 1401 has such a configuration, the data size of the character identification information / glyph number conversion data 1401 is (number of characters) × (bit length necessary to store the character code). Since efficient encoding cannot be achieved, the following configuration is preferable.

ここで、以下のことを仮定する:
(仮定1)文字識別情報とグリフとは必ずしも1対1に対応付けられておらず、1つのグリフが複数のコードに対応付けられていてもよい、
(仮定2)グリフが対応付けられていない文字識別情報も存在する可能性がある、
(仮定3)大多数のグリフは、文字識別情報と1対1に対応付けられている、
(仮定4)文字コードは、局所的には連続している、
(仮定5)グリフデータは、対応する内部文字コード(後述)の昇順(小さいものから大きなものの順)に並んでいる。ただし、対応する内部文字コードが複数ある場合は、そのようなもので最小のものを取るとする。
Now assume the following:
(Assumption 1) Character identification information and glyphs are not necessarily associated one-to-one, and one glyph may be associated with a plurality of codes.
(Assumption 2) There may be character identification information not associated with glyphs.
(Assumption 3) The majority of glyphs are associated with the character identification information on a one-to-one basis.
(Assumption 4) The character codes are locally continuous.
(Assumption 5) The glyph data is arranged in ascending order (from smallest to largest) of the corresponding internal character codes (described later). However, when there are a plurality of corresponding internal character codes, the smallest one is taken.

上記(仮定1)は、ギリシャ文字の「Ρ(ロー)」およびラテンアルファベットの「P」など、文字識別情報(文字コード)では区別できても、対象とする表示装置でフォントデータを表示する場合にグリフとして区別できない場合に、グリフデータを共通とすることで符号化データが削減される可能性を考慮した仮定である。   The above (Assumption 1) is the case where font data is displayed on the target display device even though it can be distinguished by the character identification information (character code) such as the Greek letter “L” and the Latin alphabet “P”. This is an assumption in consideration of the possibility that the encoded data can be reduced by using the common glyph data when it cannot be distinguished as glyphs.

上記(仮定2)は、サイズによってはグリフが存在しないケースなどを想定したものである(たとえば、特定のサイズでのみ存在する複雑な文字、つまり、ある程度のサイズがないと表示され得ない複雑な形状の文字などが該当する)。   The above (Assumption 2) assumes the case where there is no glyph depending on the size (for example, complex characters that exist only at a specific size, that is, complex characters that cannot be displayed without a certain size) Applicable to shape characters).

上記(仮定3)は、(仮定1),(仮定2)の仮定の下でも、大半の文字識別情報がグリフデータと1対1に対応付けられているという仮定である。   The above (Assumption 3) is an assumption that most character identification information is associated with glyph data on a one-to-one basis even under the assumptions of (Assumption 1) and (Assumption 2).

上記(仮定4)は、シフトJISコードで典型的に見られるように、文字コードはすべて不連続なのではなく、連続したコードに文字が対応付けられているという仮定である。この仮定は、後述するように、比較的少数の条件式によって、文字コードと書体識別情報とから、内部文字コードに変換することが容易にできることを示している。   The above (Assumption 4) is an assumption that the character codes are not all discontinuous, as is typically seen in the shift JIS code, but the characters are associated with continuous codes. This assumption indicates that a character code and typeface identification information can be easily converted into an internal character code with a relatively small number of conditional expressions, as will be described later.

上記(仮定5)は、そのように構成すれば満たされる条件であり、後述する、符号化でデータに高速にアクセスできるためのアクセステーブルデータを作りやすくするためのものである。図7で示した文字識別情報・グリフ番号対応ルールの例もこの仮定を満たしたものとなっている。   The above (Assumption 5) is a condition that is satisfied if configured in such a manner, and is intended to make it easy to create access table data that can be accessed at high speed by encoding, which will be described later. The example of the character identification information / glyph number correspondence rule shown in FIG. 7 also satisfies this assumption.

以上の仮定に基づいて、本実施の形態において、文字識別情報・グリフ番号変換データ1401は図19に示される構成であるものとする。すなわち、図19を参照して、文字識別情報・グリフ番号変換データ1401は、ステータステーブル1501、第1補助テーブル1502、および第2補助テーブル1503を含んで構成される。   Based on the above assumptions, in this embodiment, it is assumed that the character identification information / glyph number conversion data 1401 has the configuration shown in FIG. That is, referring to FIG. 19, the character identification information / glyph number conversion data 1401 includes a status table 1501, a first auxiliary table 1502, and a second auxiliary table 1503.

ここで図18を参照して、アクセステーブルデータを生成する際、始めに、文字識別情報・グリフ番号変換データ生成部2201は、文字識別情報に基づいて対象の文字について内部文字コードを取得する(ステップS2301)。ここで、文字識別情報としての文字コードと内部文字コードとの具体的な対応を図20に示される対応とする。図20においては、説明の便宜上、文字コードは0x8250〜0x8251、0x8260〜0x8262の6通りのみとする。なお、図20においては、上記(仮定4)が成立っていることが読取られ得る。   Referring to FIG. 18, when generating access table data, first, the character identification information / glyph number conversion data generation unit 2201 acquires an internal character code for the target character based on the character identification information ( Step S2301). Here, the specific correspondence between the character code as the character identification information and the internal character code is the correspondence shown in FIG. In FIG. 20, for convenience of explanation, there are only six character codes of 0x8250 to 0x8251 and 0x8260 to 0x8262. In FIG. 20, it can be read that the above (Assumption 4) is established.

いくつかの条件文を用いることで文字コードと書体識別情報とから内部文字コードに変換する技術の1つの具体例として、図21に、文字コードを示す変数codeと書体識別情報を示す変数typeとから、内部文字コードを示す変数internal_codeに変換するC言語ソースコードを示す。上記ステップS2301で用いられる技術は特定の技術に限定されず、たとえば図21に示されたような技術を用いて内部文字コードが取得される。   As one specific example of the technique for converting a character code and typeface identification information into an internal character code by using some conditional statements, FIG. 21 shows a variable code indicating a character code and a variable type indicating typeface identification information. To C-language source code to be converted into a variable internal_code indicating the internal character code. The technique used in step S2301 is not limited to a specific technique. For example, an internal character code is obtained using a technique as shown in FIG.

次に、文字識別情報・グリフ番号変換データ生成部2201は、文字識別情報・グリフ番号対応ルールメモリ1208に記憶されている文字識別情報・グリフ番号対応ルールと内部文字コードとからステータステーブルを生成して、アクセステーブルデータメモリ1207に書込む(ステップS2302)。   Next, the character identification information / glyph number conversion data generation unit 2201 generates a status table from the character identification information / glyph number correspondence rule stored in the character identification information / glyph number correspondence rule memory 1208 and the internal character code. The data is written in the access table data memory 1207 (step S2302).

文字識別情報・グリフ番号対応ルールが図7に示されたものであり、文字識別情報としての文字コードと内部文字コードとの対応が図20に示されたものである場合、上記ステップS2302では、図22に示されるステータステーブルが生成される。ステータステーブルとは、昇順に並べられた内部文字コードに対応した、グリフの割当て状態を示すテーブルであり、具体的には、図22を参照して、ステータステーブル1501には、以下の3種類の値のうちのいずれかの値が各内部文字コードに対して規定されている:
0…当該内部文字コードに割当てられているグリフはない、
1…当該内部文字コードに割当てられているグリフに対応する文字コードは1つだけ存在する、または2つ以上存在するがステータステーブル1501でそのグリフが出てくるのは1回目である、
2…当該内部文字コードに割当てられているグリフに対応する内部文字コードは2つ以上存在する。
When the character identification information / glyph number correspondence rule is as shown in FIG. 7, and the correspondence between the character code as the character identification information and the internal character code is as shown in FIG. 20, in step S2302, The status table shown in FIG. 22 is generated. The status table is a table indicating glyph allocation states corresponding to the internal character codes arranged in ascending order. Specifically, referring to FIG. 22, the status table 1501 includes the following three types. One of the values is specified for each internal character code:
0 ... No glyph is assigned to the internal character code,
1 ... There is only one character code corresponding to the glyph assigned to the internal character code, or there are two or more character codes, but the glyph appears in the status table 1501 for the first time.
2... There are two or more internal character codes corresponding to the glyphs assigned to the internal character code.

図22に示されるステータステーブルでは、内部文字コード3,9,4,10,5,11に対して値として1が与えられていることより、図20を併せて参照すれば、それぞれゴシック体「A」,明朝体「A」,ゴシック体「B」,明朝体「B」,ゴシック体「C」,明朝体「C」には、独立したグリフが存在する(当該内部文字コードに対応するグリフは1つだけ存在する)ことが分かる。また、内部文字コード6,8に対してそれぞれ2が与えられていることより、他の内部文字コードと共通したグリフが使われていることが示されている。どの内部文字コードと共通したグリフが使われているのかは、このテーブル単独からでは判断できないが、図7および図20も併せて参照すれば、それぞれ内部文字コード0,2と共通したグリフが使われていることが分かる。したがって、内部文字コード0,2に対応するテーブルの値が1になっているのは、先述の「当該内部文字コードに割当てられているグリフに対応する文字コードは2つ以上存在するがステータステーブル1501でそのグリフが出てくるのは1回目である」によるものである。また、内部文字コード7については「0」が与えられていることより、ゴシック体「2」のグリフは存在しないことが示されている。     In the status table shown in FIG. 22, 1 is given as a value to the internal character codes 3, 9, 4, 10, 5, and 11, and therefore, referring to FIG. A ”, Mincho“ A ”, Gothic“ B ”, Mincho“ B ”, Gothic“ C ”, and Mincho“ C ”have independent glyphs (in the internal character code). It can be seen that there is only one corresponding glyph). Further, since 2 is assigned to the internal character codes 6 and 8, it is indicated that a glyph common to other internal character codes is used. It cannot be determined from this table alone whether the glyph common to the internal character code is used. However, referring to FIGS. 7 and 20 together, the glyph common to the internal character codes 0 and 2 is used. You can see that Therefore, the value of the table corresponding to the internal character codes 0 and 2 is 1 because the above-mentioned “there are two or more character codes corresponding to the glyphs assigned to the internal character code but the status table This is the first time the glyph comes out at 1501 ". Further, since “0” is given to the internal character code 7, it is indicated that there is no Gothic “2” glyph.

次に、文字識別情報・グリフ番号変換データ生成部2201は第1補助テーブルを生成してアクセステーブルデータメモリ1207に書込む(ステップS2303)。ここで、第1補助テーブルとは、内部文字コードのいくつかについて対応するグリフ番号を記述したテーブルである。図19の第1補助テーブル1502の具体例としては、図23に示された、内部文字コードのうちのいくつかとグリフ番号との対応を記述したテーブルである。第1補助テーブル1502は当該符号化データを復号する際に用いられるテーブルであり、用いられ方については後述する。   Next, the character identification information / glyph number conversion data generation unit 2201 generates a first auxiliary table and writes it in the access table data memory 1207 (step S2303). Here, the first auxiliary table is a table describing glyph numbers corresponding to some of the internal character codes. A specific example of the first auxiliary table 1502 in FIG. 19 is a table describing the correspondence between some of the internal character codes and glyph numbers shown in FIG. The first auxiliary table 1502 is a table used when decoding the encoded data, and how it is used will be described later.

第1補助テーブル1502の構成について説明する。ステータステーブル1501の値に1が割当てられている場合は、それまでにそのようなデータがいくつあったかを調べて、得られた結果が、対応するグリフ番号となる(上記(仮定5)があるためである。)。第1補助テーブルには、内部文字コードのいくつかについて、上記のようにして対応するグリフ番号を計算した結果が格納されている。   The configuration of the first auxiliary table 1502 will be described. When 1 is assigned to the value of the status table 1501, the number of such data has been checked so far, and the obtained result is the corresponding glyph number (because there is the above (Assumption 5)). .) The first auxiliary table stores the result of calculating the corresponding glyph number as described above for some of the internal character codes.

図23に示された第1補助テーブル1502では、当該第1補助テーブルへのアクセスを効率化するために、等間隔(具体例として5刻み)の内部文字コードについてグリフ番号との対応が記述されているものとしているが、言うまでもなく、その間隔は不均等であってもよい。また、その間隔が具体例よりも短い場合であっても、第1補助テーブルのデータサイズが十分に小さければ、アクセス効率化のメリットはある。また、第1補助テーブルに記載するべき内部文字コードに対してステータステーブル1501で「0」または「2」が規定されている場合の対処については特定の対処に限定されないが、たとえば、当該内部文字コードの1つ前の内部文字コードであって、有効な値が規定されている内部文字コードを用いるなどすればよい。   In the first auxiliary table 1502 shown in FIG. 23, in order to make the access to the first auxiliary table more efficient, the correspondence between glyph numbers is described for internal character codes at equal intervals (as a specific example, in increments of 5). Needless to say, the intervals may be uneven. Even if the interval is shorter than the specific example, if the data size of the first auxiliary table is sufficiently small, there is a merit in improving access efficiency. Further, the countermeasure when “0” or “2” is defined in the status table 1501 for the internal character code to be described in the first auxiliary table is not limited to a specific countermeasure. What is necessary is just to use the internal character code | cord | chord which is an internal character code before the code | symbol and in which the effective value was prescribed | regulated.

また、図22に示されるステータステーブル1501に替えて、図24に示されるように、ステータステーブルを予めグリフ番号が記載される構成とすることで、上記ステップS2303での第1補助テーブルの生成を不要とすることができる。しかしながら、ステータステーブルの構成を図24に示されるような構成とすると、そのデータ量が(グリフ番号を表わすビット数)×(ステータステーブルで「1」が規定される文字数)となり、そのデータサイズのステータステーブルが符号化データに付加されることになって好ましくない。   Also, instead of the status table 1501 shown in FIG. 22, the status table is configured in advance so that the glyph number is described as shown in FIG. 24, so that the first auxiliary table is generated in step S2303. It can be unnecessary. However, if the status table is configured as shown in FIG. 24, the amount of data is (the number of bits representing the glyph number) × (the number of characters in which “1” is defined in the status table). A status table is not preferable because it is added to the encoded data.

次に、文字識別情報・グリフ番号変換データ生成部2201は第2補助テーブル1503を生成してアクセステーブルデータメモリ1207に書込む(ステップS2304)。ここで、第2補助テーブルとは、ステータステーブル1501で「2」が規定された内部文字コード、つまり割当てられているグリフに対応する文字コードは2つ以上存在する内部文字コードについて、対応するグリフ番号を記述したテーブルである。図22のステータステーブル1501の場合の第2補助テーブル1503の具体例としては、図25に示されたテーブルである。第2補助テーブルは当該符号化データを復号する際に用いられるテーブルであり、具体的には、用いられ方については後述する。上記仮定(3)により、ステータステーブル1501で「2」が規定される内部文字コードは少ないと仮定されるため、「2」が規定されるすべての内部文字コードについての対応するグリフ番号を記述したテーブルが生成されても符号化の効率性は保たれるものと考えられる。   Next, the character identification information / glyph number conversion data generation unit 2201 generates the second auxiliary table 1503 and writes it in the access table data memory 1207 (step S2304). Here, the second auxiliary table refers to an internal character code in which “2” is defined in the status table 1501, that is, an internal character code corresponding to an assigned glyph, with respect to the corresponding glyph. This is a table describing numbers. A specific example of the second auxiliary table 1503 in the case of the status table 1501 of FIG. 22 is the table shown in FIG. The second auxiliary table is a table used when decoding the encoded data, and specifically how to use will be described later. According to the above assumption (3), it is assumed that there are few internal character codes in which “2” is defined in the status table 1501, so that the corresponding glyph numbers for all the internal character codes in which “2” is defined are described. Even if the table is generated, it is considered that the coding efficiency is maintained.

なお、上記具体例では、第2補助テーブル1503で内部文字コードとグリフ番号との対応が記述されるものとしているが、アクセスのキーとして、内部文字コードに替えて文字識別情報とし、文字識別情報とグリフ番号との対応が記述されてもよい。これは第1補助テーブル1502についても同様である。   In the above specific example, the correspondence between the internal character code and the glyph number is described in the second auxiliary table 1503. However, as the access key, the character identification information is used instead of the internal character code. And the glyph number may be described. The same applies to the first auxiliary table 1502.

なお、上述の文字識別情報・グリフ番号変換データ生成部2201で生成される文字識別情報・グリフ番号変換データは1つの具体例であって、ここで生成される変換データは上述のような文字識別情報・グリフ番号変換データには限定されない。ここでのポイントは、文字識別情報(またはそこから一意に決定される内部文字コード)とグリフ番号またはグリフとの対応関係が1対1であるか、そうでないか(あるいはグリフ番号またはグリフがいくつの文字識別情報に対応するか、逆に文字識別情報がいくつのグリフ番号またはグリフに対応するか)を示すデータを生成することである。また、もう1つの重要な点は、生成されるデータを後述する画像復号装置が、判定結果に応じて異なるテーブルを参照するように構成することで、それ自身のために必要となるデータ容量を小さく保ちながら、文字識別情報(または内部文字コード)を高速にグリフ番号に変換する(グリフデータを特定する)ことができるように文字識別情報・グリフ番号変換データを構成したことである。具体的には、本実施の形態では、文字識別情報(内部文字コード)がグリフと1対1対応している場合には第1補助テーブル1502を参照し、そうでない場合には第2補助テーブル1503を参照することができるように構成された文字識別情報・グリフ番号変換データを、文字識別情報・グリフ番号変換データ生成部2201が生成している。さらにその第1補助テーブル1502は、文字識別情報(または内部文字コード)とグリフ番号との対応テーブルのサブセットとなっている。   The character identification information / glyph number conversion data generated by the character identification information / glyph number conversion data generation unit 2201 is one specific example, and the conversion data generated here is the character identification as described above. It is not limited to information / glyph number conversion data. The point here is whether the correspondence between the character identification information (or the internal character code uniquely determined therefrom) and the glyph number or glyph is one-to-one or not (or how many glyph numbers or glyphs are The number of glyph numbers or glyphs corresponding to the character identification information) is generated. Another important point is that the image decoding apparatus, which will be described later, refers to a different table according to the determination result for the generated data, thereby reducing the data capacity required for itself. Character identification information / glyph number conversion data is configured so that character identification information (or internal character code) can be converted to glyph numbers at high speed (glyph data is specified) while keeping small. Specifically, in the present embodiment, the first auxiliary table 1502 is referred to when the character identification information (internal character code) has a one-to-one correspondence with the glyph, and the second auxiliary table otherwise. The character identification information / glyph number conversion data generation unit 2201 generates character identification information / glyph number conversion data configured to be able to refer to 1503. Further, the first auxiliary table 1502 is a subset of a correspondence table between character identification information (or internal character codes) and glyph numbers.

次に、ついでグリフ番号・オフセット情報変換データ生成部2202は、加工分割画像データごとにグリフ番号・オフセット情報変換データを生成してアクセステーブルデータメモリ1207に書込む(ステップS2305)。文字識別情報・オフセット情報変換データは分割に無関係であるが、符号化データ上のオフセットを示すグリフ番号・オフセット情報変換データは符号化されているグリフの数×分割の個数だけのデータをアクセスする情報を持っている。   Next, the glyph number / offset information conversion data generation unit 2202 generates glyph number / offset information conversion data for each processed divided image data and writes it in the access table data memory 1207 (step S2305). The character identification information / offset information conversion data is not related to the division, but the glyph number / offset information conversion data indicating the offset in the encoded data accesses data corresponding to the number of encoded glyphs × the number of divisions. I have information.

以上の構成の具体例では、グリフ番号・オフセット情報変換データは、符号化された分割加工文字データに対応するデータの符号化データ上での位置を、グリフ番号から変換することを通して、文字画像データの符号化データ上での位置を特定している。さらに一般化すれば、グリフ情報・オフセット情報変換データとは、グリフ番号から、符号化された文字画像データの符号化データ上での位置を得るための情報であるといえる。実際、(符号化された)加工分割画像データごとでなく、個々の(符号化された)文字画像データに対応する部分ごとにまとめて符号化データを配置すれば、グリフ番号・オフセット情報変換データは、グリフ番号から符号化された文字画像文字画像データの符号化データ上での位置を直接得るための情報となる。なお、ここで、グリフ番号・オフセット情報変換データの作成方法について詳細に述べていないが、たとえば先頭から各分割に対応する符号化データをサーチして、加工分割文字画像の境目となる位置をオフセット情報として記録すればよいので、特定の方法には限定されないものとする。もちろん、復号時の処理を高速に行なうことのできる工夫をグリフ番号・オフセット情報変換データについて行なうことも考えられる。   In the specific example of the above configuration, the glyph number / offset information conversion data is obtained by converting the position on the encoded data of the data corresponding to the encoded divided processed character data from the glyph number, thereby converting the character image data. The position on the encoded data is specified. More generally, it can be said that the glyph information / offset information conversion data is information for obtaining the position of the encoded character image data on the encoded data from the glyph number. In fact, if the encoded data is arranged for each part corresponding to each (encoded) character image data instead of each (encoded) processed divided image data, the glyph number / offset information conversion data Is information for directly obtaining the position on the encoded data of the character image character image data encoded from the glyph number. Here, although the creation method of the glyph number / offset information conversion data is not described in detail, for example, the encoded data corresponding to each division is searched from the beginning, and the position that becomes the boundary of the processed divided character image is offset. Since the information may be recorded, it is not limited to a specific method. Of course, it is also conceivable to devise a glyph number / offset information conversion data so that processing at the time of decoding can be performed at high speed.

そして、ステップS1301でロードされた画像データから得られたすべての分割画像データに対して処理が終了していれば(ステップS2306でYES)、処理はステップS1309に進み、そうでなければ(ステップS2306でNO)、ステップS2307は次の分割画像データに処理を移し、処理はステップS2305に戻る。   If the process has been completed for all the divided image data obtained from the image data loaded in step S1301 (YES in step S2306), the process proceeds to step S1309; otherwise (step S2306). In step S2307, the process moves to the next divided image data, and the process returns to step S2305.

本実施の形態にかかる画像符号化装置で上述の処理が実行されることで、文字画像データに見られる、似たサイズのデータが、一定周期で配置されるという特徴を利用して、少ない計算量で高効率の符号化を行なうことができる。つまり、符号化対象の文字画像データのドット構成に対応した方向に文字画像データを分割することで、バイトの値の分布確率がより反映され、符号化効率を向上させることができる。   By performing the above-described processing in the image coding apparatus according to the present embodiment, a small amount of calculation is performed using the feature that data of similar size, which is found in character image data, is arranged at a fixed period. Highly efficient encoding can be performed in a quantity. That is, by dividing the character image data in the direction corresponding to the dot configuration of the character image data to be encoded, the distribution probability of the byte value is more reflected, and the encoding efficiency can be improved.

また、符号化データと内部文字コード、文字識別情報との対応を、サイズの小さいテーブルとして符号化データに付加することで、以下の説明する画像復号装置において、少ない計算量で復号することができる。   Further, by adding the correspondence between the encoded data, the internal character code, and the character identification information to the encoded data as a small-size table, the image decoding apparatus described below can perform decoding with a small amount of calculation. .

なお、以上の説明では、各文字画像データごとにライン方向に直交する分割を行ない、符号化するものとしたが、上記方法は本発明の1つの具体例であって、他の具体例として、ライン方向に直交する分割を行なって「分割画像データ」を作成してから、各文字画像データに対応する部分ごとに、ライン間の差分を取って「加工分割画像データ」を作成する方法も挙げられる。このような方法を採用した実施の形態も本発明のバリエーションの1つである。   In the above description, each character image data is divided and encoded perpendicular to the line direction. However, the above method is one specific example of the present invention, and another specific example is as follows. There is also a method of creating “divided image data” by performing division perpendicular to the line direction, and then creating “processed divided image data” by taking the difference between the lines for each portion corresponding to each character image data. It is done. An embodiment employing such a method is also one of variations of the present invention.

また、本実施の形態では、画像データは文字画像データからなる、フォントデータであるものとしているが、本発明にかかる情報処理装置で処理対象とする画像データは文字画像データには限定されず、一定の大きさからなる、単位画像データが連続してなる画像データであればよい。特に、その場合、上記実施の形態における「文字画像データ」は「単位画像データ」に、「分割文字画像データ」は「分割単位画像データ」に、「加工分割文字画像データ」は「加工分割単位画像データ」に、など、それぞれ適切に置換えることで、文字画像データ以外の画像データを処理対象としたときの動作・構成の説明とされ得る。これは他の実施の形態でも同様である。   In this embodiment, the image data is font data composed of character image data. However, the image data to be processed by the information processing apparatus according to the present invention is not limited to character image data. Any image data may be used as long as the unit image data has a constant size and is continuous. In particular, in that case, the “character image data” in the above embodiment is “unit image data”, the “divided character image data” is “divided unit image data”, and the “processed divided character image data” is “processing divided unit”. By appropriately replacing “image data” or the like, it is possible to explain the operation / configuration when image data other than character image data is processed. The same applies to other embodiments.

[第2の実施の形態]
文字画像データの2値画像に見られるさらなる特徴として、図26のように主に縦線から構成される文字画像データや、図27のように主に横線から構成される文字画像データがある。これらの特徴は、特に文字が漢字である場合に顕著である。
[Second Embodiment]
As further features seen in the binary image of the character image data, there are character image data mainly composed of vertical lines as shown in FIG. 26 and character image data mainly composed of horizontal lines as shown in FIG. These features are particularly noticeable when the characters are Chinese characters.

入力データが図26に示された文字画像データである場合、水平に配置されたワードごとの排他的論理和を算出すると、図28に示される出力データが得られる。図28に示されるように、図26に示されたような文字画像データの場合、排他的論理和が算出されると0ワード(すべてのビットが0のワード)になるワードが多い。そのため、排他的論理和によって情報が失われることなく0ワードの頻度を高めることができ、符号化効率を高めることができる。   When the input data is the character image data shown in FIG. 26, the output data shown in FIG. 28 is obtained by calculating the exclusive OR for each word arranged horizontally. As shown in FIG. 28, in the case of the character image data as shown in FIG. 26, when the exclusive OR is calculated, there are many words that become 0 words (words in which all bits are 0). Therefore, the frequency of 0 words can be increased without losing information by exclusive OR, and the encoding efficiency can be increased.

一方、入力データが図27に示された文字画像データである場合、水平に配置されたワードごとの排他的論理和を算出しても、出力データは、図29に示されるように、上述のような、特定のワードの値の頻度を大きくする効果はない。   On the other hand, when the input data is the character image data shown in FIG. 27, even if the exclusive OR for each word arranged horizontally is calculated, the output data is as described above as shown in FIG. There is no effect of increasing the frequency of the value of a specific word.

本発明の第2の実施の形態にかかる画像符号化装置は、異なる文字コードに対応する文字フォントデータの系列を、ワードの系列ごとに、ライン間差分を用いて符号化する装置であって、文字画像データの上記特徴を利用して符号化する。そのため、本発明の第2の実施の形態にかかる画像符号化装置は、符号化にあたって、符号化データのデータ量がより小さくなるように、文字画像データを回転させることを特徴とし、その点が第1の実施の形態にかかる画像符号化装置との相違点である。そこで、以下においては、主にその相違点について説明する。   An image encoding apparatus according to a second embodiment of the present invention is an apparatus that encodes a series of character font data corresponding to different character codes using a difference between lines for each series of words. Encoding is performed using the above characteristics of character image data. For this reason, the image coding apparatus according to the second embodiment of the present invention is characterized in that the character image data is rotated so that the data amount of the coded data becomes smaller at the time of coding. This is a difference from the image coding apparatus according to the first embodiment. Therefore, the difference will be mainly described below.

図30は、本実施の形態にかかるPC3において画像符号化装置として機能し、画像符号化処理を行なうための機能構成の具体例を示すブロック図である。   FIG. 30 is a block diagram showing a specific example of a functional configuration for functioning as an image encoding device in the PC 3 according to the present embodiment and performing image encoding processing.

図30を参照して、本実施の形態にかかる画像符号化装置の上記機能は、図2に示された第1の実施の形態にかかる画像符号化装置の上記機能に含まれる各機能に加えて、フラグデータメモリ2410を含んで構成される。   Referring to FIG. 30, the functions of the image coding apparatus according to the present embodiment are added to the functions included in the functions of the image coding apparatus according to the first embodiment shown in FIG. The flag data memory 2410 is included.

さらに、図31は、本実施の形態にかかる画像処理部1209の構成の具体例を示すブロック図である。図31を参照して、本実施の形態にかかる画像処理部1209は、画像演算部2701、第1文字画像データメモリ2702、第2文字画像データメモリ2703、第1分割文字画像データメモリ2704、第2分割文字画像データメモリ2705、第1加工分割文字画像データメモリ2706、第2加工分割文字画像データメモリ2707、および容量予測部2708を含んで構成され、各構成要素はデータバス2709を介して互いに、また外部に接続される。   Further, FIG. 31 is a block diagram showing a specific example of the configuration of the image processing unit 1209 according to the present embodiment. Referring to FIG. 31, an image processing unit 1209 according to the present embodiment includes an image calculation unit 2701, a first character image data memory 2702, a second character image data memory 2703, a first divided character image data memory 2704, The divided character image data memory 2705, the first processed divided character image data memory 2706, the second processed divided character image data memory 2707, and the capacity predicting unit 2708 are configured, and each component is mutually connected via the data bus 2709. Also connected to the outside.

本実施の形態においては、画像データメモリ1202に格納された画像データから、画像演算部2701によって1文字分の文字画像データが読出され、「第1文字画像データ」として、第1文字画像データメモリ2702に格納される。第1文字画像データメモリ2702に格納された第1文字画像データは、画像演算部2701によって、横方向のバイト境界で縦方向に分割され、「第1分割文字画像データ」として、第1分割文字画像データメモリ2704に格納される。   In the present embodiment, character image data for one character is read out from the image data stored in the image data memory 1202 by the image calculation unit 2701, and the first character image data memory is stored as “first character image data”. 2702 is stored. The first character image data stored in the first character image data memory 2702 is divided in the vertical direction at the byte boundary in the horizontal direction by the image calculation unit 2701, and the first divided character image data is obtained as “first divided character image data”. It is stored in the image data memory 2704.

第1分割文字画像データメモリ2704に格納された第1分割文字画像データは、さらに、画像演算部2701によって、所定の向きに回転され、「第2文字画像データ」として、第2文字画像データメモリ2703に格納される。第2文字画像データメモリ2703に格納された第2文字画像データは、画像演算部2701によって、横方向のバイト境界で縦方向に分割され、「第2分割文字画像データ」として、第2分割文字画像データメモリ2705に格納される。ここでは「所定の向き」とは時計回りに90度とする。   The first divided character image data stored in the first divided character image data memory 2704 is further rotated in a predetermined direction by the image calculation unit 2701 to obtain “second character image data” as the second character image data memory. 2703 is stored. The second character image data stored in the second character image data memory 2703 is divided in the vertical direction at the byte boundary in the horizontal direction by the image calculation unit 2701, and the second divided character image data is obtained as “second divided character image data”. It is stored in the image data memory 2705. Here, the “predetermined direction” is 90 degrees clockwise.

画像データメモリ2409に格納されている1文字分の画像第1分割文字画像データメモリ2704に格納されている分割画像の排他的論理和を取り(以下「加工分割文字画像」と呼ぶことがある)、第1加工分割文字画像データメモリ2706に格納する。   The image of one character stored in the image data memory 2409 is XORed with the divided image stored in the first divided character image data memory 2704 (hereinafter sometimes referred to as “processed divided character image”). The first processed divided character image data memory 2706 is stored.

第1分割文字画像データメモリ2704に格納されている第1分割文字画像データについて、画像演算部2701において排他的論理和が算出され、算出結果が「第1加工分割文字画像データ」として第1加工分割文字画像データメモリ2706に格納される。   With respect to the first divided character image data stored in the first divided character image data memory 2704, an exclusive OR is calculated in the image calculation unit 2701, and the calculation result is “first processed divided character image data” as the first processed character. The divided character image data memory 2706 is stored.

同様に、第2分割文字画像データメモリ2705に格納されている第2分割文字画像データについて、画像演算部2701において排他的論理和が算出され、算出結果が「第2加工分割文字画像データ」として第2加工分割文字画像データメモリ2707に格納される。   Similarly, with respect to the second divided character image data stored in the second divided character image data memory 2705, an exclusive OR is calculated by the image calculation unit 2701, and the calculation result is “second processed divided character image data”. The second processed divided character image data memory 2707 is stored.

容量予測部2708は、第1文字画像データメモリ2702に格納された第1文字画像データの符号化後の容量と、第2加工分割文字画像データメモリ2707に格納された第2加工分割文字画像データの符号化後の容量とを予測し、予想結果を比較する。容量予測部2708での比較結果に従って、第1加工分割文字画像データメモリ2706に格納されている1加工分割文字画像データ、または第2加工分割文字画像データメモリ2707に格納されている第2加工分割文字画像データが出力される。また、容量予測部2708での比較結果を示すフラグが画像演算部2701によってフラグデータメモリ2410に格納される。   The capacity prediction unit 2708 encodes the capacity of the first character image data stored in the first character image data memory 2702 and the second processed divided character image data stored in the second processed divided character image data memory 2707. Are predicted, and the predicted results are compared. According to the comparison result in the capacity prediction unit 2708, the first processed divided character image data stored in the first processed divided character image data memory 2706 or the second processed divided character stored in the second processed divided character image data memory 2707 Character image data is output. In addition, a flag indicating the comparison result in the capacity prediction unit 2708 is stored in the flag data memory 2410 by the image calculation unit 2701.

図32は、第2の実施の形態にかかる画像符号化装置における符号化処理を示すフローチャートである。図32のフローチャートに示される処理もまた、CPU101がROM103等の記憶部に記憶されるプログラムを読出して実行し、コントローラ1201が図30等に示された各部を制御することによって実現される。なお、図32に示される第2の実施の形態における符号化処理は、図9のフローチャートに示された第2の実施の形態における符号化処理とほぼ同様であり、次の点が異なっている。すなわち、第1の実施の形態における符号化処理のステップS1303の処理およびステップS1304の処理に替えて、第2の実施の形態における符号化処理ではステップS2503の処理およびステップS2504の処理が実行される。また、以上の処理に加えて、ステップS2511の処理が実行される。   FIG. 32 is a flowchart illustrating an encoding process in the image encoding device according to the second embodiment. The processing shown in the flowchart of FIG. 32 is also realized by the CPU 101 reading out and executing a program stored in the storage unit such as the ROM 103, and the controller 1201 controlling each unit shown in FIG. Note that the encoding process in the second embodiment shown in FIG. 32 is substantially the same as the encoding process in the second embodiment shown in the flowchart of FIG. 9, and the following points are different. . That is, instead of the processing in step S1303 and the processing in step S1304 in the first embodiment, the processing in step S2503 and the processing in step S2504 are executed in the encoding processing in the second embodiment. . In addition to the above processing, the processing in step S2511 is executed.

図33は、上記ステップS2503における画像データの分割処理を示すフローチャートである。   FIG. 33 is a flowchart showing image data division processing in step S2503.

図33を参照して、始めに、画像演算部2701は、上記ステップS1301で画像データメモリ1202にロードされた画像データから1文字分の文字画像データを読出し、第1文字画像データを第1文字画像データメモリ2702に格納する(ステップS3701)。   Referring to FIG. 33, first, image calculation unit 2701 reads character image data for one character from the image data loaded into image data memory 1202 in step S1301, and converts the first character image data to the first character image data. The image data is stored in the image data memory 2702 (step S3701).

次に、画像演算部2701は、第1文字画像データメモリ2702に格納された第1文字画像データを横方向のバイト境界によって縦方向に分割して第1分割文字画像データを生成し、第1分割文字画像データメモリ2704に格納する(ステップS3702)。ここでの分割方法は、先に第1の実施の形態において説明された方法と同様の方法でよい。   Next, the image calculation unit 2701 generates the first divided character image data by dividing the first character image data stored in the first character image data memory 2702 in the vertical direction by the horizontal byte boundary. The divided character image data memory 2704 is stored (step S3702). The division method here may be the same method as described in the first embodiment.

次に、画像演算部2701は、第1文字画像データメモリ2702に格納された第1文字画像データを時計回りに90度回転して第2文字画像データを生成し、第2文字画像データメモリ2703に格納する(ステップS3703)。   Next, the image calculation unit 2701 rotates the first character image data stored in the first character image data memory 2702 by 90 degrees clockwise to generate second character image data, and the second character image data memory 2703. (Step S3703).

次に、画像演算部2701は、第2文字画像データメモリ2703に格納された第2文字画像データを横方向のバイト境界によって縦方向に分割して第2分割文字画像データを生成し、第2分割文字画像データメモリ2705に格納する(ステップS3704)。ここでの分割方法も、先に第1の実施の形態において説明された方法と同様の方法でよい。   Next, the image calculation unit 2701 generates the second divided character image data by dividing the second character image data stored in the second character image data memory 2703 in the vertical direction by the horizontal byte boundary. The divided character image data memory 2705 is stored (step S3704). The dividing method here may be the same method as described in the first embodiment.

以上で処理を終了し、処理をステップS2504に進める。
図34は、上記ステップS2504における排他的論理和の算出処理を示すフローチャートである。
Then, the process ends, and the process proceeds to step S2504.
FIG. 34 is a flowchart showing the exclusive OR calculation process in step S2504.

図34を参照して、始めに、画像演算部2701は、上記ステップS3702で第1分割文字画像データメモリ2704に格納された第1分割文字画像データについて排他的論理和を算出し、第1加工分割文字画像データを第1加工分割文字画像データメモリ2706に格納する(ステップS2801)。排他的論理和の算出方法は、先に第1の実施の形態において説明された方法と同様の方法でよい。   Referring to FIG. 34, first, image calculation unit 2701 calculates an exclusive OR for the first divided character image data stored in first divided character image data memory 2704 in step S3702, and performs first processing. The divided character image data is stored in the first processed divided character image data memory 2706 (step S2801). The exclusive OR calculation method may be the same as the method described in the first embodiment.

ステップS1301でロードされた画像データから得られたすべての第1分割文字画像データについて排他的論理和を算出する処理が終了していれば(ステップS2802でYES)、処理はステップS2803に進み、処理していなければ(ステップS2802でNO)、処理はステップS2801に戻る。   If the process of calculating the exclusive OR for all the first divided character image data obtained from the image data loaded in step S1301 has been completed (YES in step S2802), the process proceeds to step S2803. If not (NO in step S2802), the process returns to step S2801.

ステップS2803において、容量予測部2708は、第1文字画像データメモリ2702に格納された第1文字画像データの符号化後の容量を予測する(ステップS2803)。ステップS2803での予測方法は上記ステップS1306での符号化方式と整合性が取れていればよく、本発明において特定の方法に限定されない。具体例として、ここでは、上記ステップS1306でエントロピー符号化方式が採用されることより、第1文字画像データメモリ2702に格納された第1文字画像データから得られる第1加工分割文字画像データのエントロピーを合計する方法が挙げられる。予測すべきターゲットの値は、ステップS2803での予測方法として、個々の第1加工分割文字画像データを符号化することによる符号データ量の増加量(ここでは「限界符号量」と呼ぶ)であるが、本具体例では、一塊のデータとして符号化される範囲が加工分割文字画像データではなく、これを直接算出することが容易でないため、代わりに第1加工分割文字画像データのエントロピー予測値を用いているのである。いずれにしろ、重要なのは、ここで用いる予測値が上記ステップS1306での符号化方式と整合性が取れている(予測値がターゲットの値と十分に近いという根拠がある)ことである。本具体例では、符号化方法として、ハフマン符号化を用いているので、その限界符号量の予測値としてエントロピーを用いることで、十分に限界符号量と近い値が得られるという根拠があると言える。もちろん、予測すべきターゲットの値(限界符号量)が容易に得られるような符号化方法であれば、限界符号量を用いてもよく、本発明のバリエーションであることにも変わりはない。   In step S2803, the capacity prediction unit 2708 predicts the encoded capacity of the first character image data stored in the first character image data memory 2702 (step S2803). The prediction method in step S2803 only needs to be consistent with the encoding method in step S1306, and is not limited to a specific method in the present invention. As a specific example, the entropy of the first processed divided character image data obtained from the first character image data stored in the first character image data memory 2702 by adopting the entropy encoding method in step S1306 above. The method of summing up is mentioned. The target value to be predicted is the amount of increase in the code data amount (herein referred to as “limit code amount”) by encoding the individual first processed divided character image data as the prediction method in step S2803. However, in this specific example, the range encoded as a lump of data is not processed divided character image data, and it is not easy to directly calculate this, so instead, the entropy prediction value of the first processed divided character image data is set to It is used. In any case, what is important is that the predicted value used here is consistent with the encoding method in step S1306 (there is a reason that the predicted value is sufficiently close to the target value). In this specific example, since Huffman coding is used as the coding method, it can be said that there is a reason that a value sufficiently close to the limit code amount can be obtained by using entropy as the prediction value of the limit code amount. . Of course, as long as the encoding method is such that the target value to be predicted (limit code amount) can be easily obtained, the limit code amount may be used, and this is a variation of the present invention.

次に、画像演算部2701は、第2分割文字画像データメモリ2705に格納されている第2分割文字画像データの排他的論理和を算出し、得られた第2加工分割文字画像データを第2加工分割文字画像データメモリ2707に格納する(ステップS2804)。   Next, the image computing unit 2701 calculates an exclusive OR of the second divided character image data stored in the second divided character image data memory 2705, and the obtained second processed divided character image data is stored in the second. The processed divided character image data memory 2707 is stored (step S2804).

ステップS1301でロードされた画像データから得られたすべての第2分割文字画像データについて排他的論理和を算出する処理が終了していれば(ステップS2805でYES)、処理はステップS2806に進み、処理していなければ処理はステップS2804に戻る。   If the process of calculating the exclusive OR for all the second divided character image data obtained from the image data loaded in step S1301 has been completed (YES in step S2805), the process proceeds to step S2806, where If not, the process returns to step S2804.

ステップS2806において、容量予測部2708は、第2加工分割文字画像データメモリ2707に格納された第2加工分割文字画像データの符号化後の容量を予測する。ここでの予測方法はステップS2803での予測方法と同じ方法であり、上記ステップS1306での符号化方式と整合性が取れた方法であればよい。限界符号量とその予測とに関してすでに説明したこともそのまま該当する。   In step S2806, the capacity predicting unit 2708 predicts the encoded capacity of the second processed divided character image data 2707 stored in the second processed divided character image data memory 2707. The prediction method here is the same as the prediction method in step S2803, and may be any method that is consistent with the encoding method in step S1306. What has already been described with respect to the limit code amount and its prediction is also applicable.

次に、容量予測部2708は、ステップS2803で得られた第1文字画像データの符号化後の容量の予測値と、ステップS2806で得られた第2加工分割文字画像データの符号化後の容量の予測値とを比較し、後者が大きければ(ステップS2807でYES)、第2加工分割文字画像データメモリ2707に格納されている第2加工分割文字画像データ、つまり回転後の画像データを出力し(ステップS2808)、そうでなければ(ステップS2807でNO)、第1加工分割文字画像データメモリ2705に格納されている第1加工分割文字画像データ、つまり回転前の画像データを出力する(ステップS2809)。   Next, the capacity predicting unit 2708 predicts the capacity after encoding of the first character image data obtained in step S2803 and the capacity after encoding of the second processed divided character image data obtained in step S2806. If the latter is larger (YES in step S2807), the second processed divided character image data stored in the second processed divided character image data memory 2707, that is, image data after rotation is output. (Step S2808), otherwise (NO in Step S2807), the first processed divided character image data stored in the first processed divided character image data memory 2705, that is, the image data before rotation is output (Step S2809). ).

次に、画像演算部2701は、ステップS2807での判定結果、つまり、ステップS2808とステップS2809とのいずれの処理が実行されたかを示すフラグをフラグデータメモリ2410に格納する(ステップS2810)。フラグの値としては、たとえば、ステップS2803で得られた第1文字画像データの符号化後の容量の予測値が大きいことを表わす「1」、そうでないことを表わす「0」とすることができる。ステップS2810では文字ごとにフラグの値が決定される。フラグデータメモリ2708には、文字ごとのフラグが、アクセステーブルデータメモリ2407に格納されているアクセステーブルデータ、および符号化テーブルデータメモリ2405に格納されている符号化データと対応付けられて格納される。具体的には、フラグ、アクセステーブルデータ、および符号化データが処理の順序に蓄積されることでも対応付けられる。   Next, the image calculation unit 2701 stores the determination result in step S2807, that is, a flag indicating which processing in step S2808 or step S2809 has been executed in the flag data memory 2410 (step S2810). The value of the flag can be, for example, “1” indicating that the predicted capacity value of the first character image data obtained in step S2803 is large, and “0” indicating otherwise. . In step S2810, a flag value is determined for each character. In the flag data memory 2708, a flag for each character is stored in association with the access table data stored in the access table data memory 2407 and the encoded data stored in the encoding table data memory 2405. . Specifically, the flag, the access table data, and the encoded data are also associated with each other in the order of processing.

本実施の形態にかかる画像符号化装置で上述の処理が実行されることで、特に文字が漢字である文字画像データに見られる、主に縦線から構成される、または主に横線から構成されるという特徴を利用して、少ない計算量で高効率の符号化を行なうことができる。つまり、符号化対象の文字画像データが、図27に示された文字画像データのように、そのまま排他的論理和を算出しても図29に示されたように特定のワードの値の頻度を大きくする効果はない文字画像データである場合には、図35のように90度回転して排他的論理和が算出される。その結果、出力データは図36に示されるようになり、ゼロの値をとるバイトの頻度を増やすことができる。このため、エントロピー符号化が実行されると、元の画像データの情報を失うことなく(可逆性を損なうことなく)、値の分布を特定の値に集中させてから符号化でき、符号化効率の向上に寄与する。   When the above-described processing is executed by the image encoding device according to the present embodiment, the character encoding data is mainly composed of vertical lines or mainly composed of horizontal lines. By using this feature, highly efficient encoding can be performed with a small amount of calculation. That is, even if the character image data to be encoded is directly calculated as the character image data shown in FIG. 27, the frequency of the value of a specific word is obtained as shown in FIG. In the case of character image data that does not have the effect of increasing, the exclusive OR is calculated by rotating 90 degrees as shown in FIG. As a result, the output data is as shown in FIG. 36, and the frequency of bytes having a value of zero can be increased. For this reason, when entropy encoding is performed, encoding can be performed after concentrating the value distribution on a specific value without losing the information of the original image data (without losing reversibility), and encoding efficiency. It contributes to the improvement.

<2.画像復号装置>
[第3の実施の形態]
図1は、本実施の形態にかかる画像復号装置を搭載するテキスト処理装置としての携帯電話1のハードウェア構成の具体例を示す図であり、一般的な携帯電話のハードウェア構成の具体例を示すブロック図である。
<2. Image decoding device>
[Third Embodiment]
FIG. 1 is a diagram illustrating a specific example of the hardware configuration of a mobile phone 1 as a text processing device equipped with the image decoding device according to the present embodiment, and a specific example of the hardware configuration of a general mobile phone. FIG.

図1を参照して、携帯電話1は、ユーザとのインタフェースである入出力部140と、CPU(Central Processing Unit)等から構成されて、当該装置全体を制御する制御部120と、他の装置と通信するための通信部110と、ROM(Read Only Memory)やRAM(Random Access Memory)などから構成されて、制御部120において実行されるプログラムや、そのプログラムの中間データおよび他のコンピュータから受信したデータ等を記憶する記憶部130とを含んで構成される。   Referring to FIG. 1, a mobile phone 1 includes an input / output unit 140 that is an interface with a user, a CPU (Central Processing Unit), and the like, a control unit 120 that controls the entire device, and other devices. A communication unit 110 for communicating with a computer, a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, received from a program executed by the control unit 120, intermediate data of the program, and other computers And a storage unit 130 for storing the data and the like.

通信部110は、図示されない基地局を介して通信を行ない、他の携帯電話などの装置にデータの送受信を行なう。   The communication unit 110 performs communication via a base station (not shown) and transmits / receives data to / from other devices such as a mobile phone.

さらに上述の入出力部140は、「1」、「2」などの数字ボタンおよび「R」、「L」などの方向ボタンなどを含むキーコード入力デバイス(キー)142と、ユーザに情報を表示するLCD(Liquid Crystal Display)などのディスプレイ144と、音声を入力するマイクロフォン146と、音声を出力するスピーカ148と、画像を撮影して入力するカメラ149とを含む。   Further, the input / output unit 140 described above displays a key code input device (key) 142 including numeric buttons such as “1” and “2” and direction buttons such as “R” and “L”, and information to the user. A display 144 such as an LCD (Liquid Crystal Display), a microphone 146 that inputs sound, a speaker 148 that outputs sound, and a camera 149 that captures and inputs an image.

本実施の形態にかかる画像復号装置は、携帯電話1のハードウェア、および記憶部130に記憶され制御部120により実行されるソフトウェアにより構成され、後述する画像復号処理を行なうための機能は、制御部120が記憶部130に記憶されるプログラムを読出して実行することによって、主に制御部120に形成される。または、上記機能の少なくとも一部は携帯電話1のハードウェアによって構成されてもよい。なお、図1に示した携帯電話1の携帯電話機としての通常の動作は周知である。   The image decoding apparatus according to the present embodiment is configured by hardware of the mobile phone 1 and software stored in the storage unit 130 and executed by the control unit 120, and a function for performing an image decoding process to be described later is controlled. The unit 120 is mainly formed in the control unit 120 by reading and executing the program stored in the storage unit 130. Alternatively, at least a part of the above functions may be configured by the hardware of the mobile phone 1. The normal operation of the mobile phone 1 shown in FIG. 1 as a mobile phone is well known.

図37は本実施の形態にかかる画像復号装置を搭載するテキスト処理装置のハードウェア構成の概略図であり、図1に示された本実施の形態にかかる画像復号装置を搭載する携帯電話1のハードウェア構成を概略化したブロック図である。   FIG. 37 is a schematic diagram of a hardware configuration of a text processing apparatus in which the image decoding apparatus according to the present embodiment is mounted. The cellular phone 1 in which the image decoding apparatus according to the present embodiment shown in FIG. 2 is a block diagram schematically illustrating a hardware configuration. FIG.

図37を参照して、テキスト処理装置は、入出力部140に相当する指示装置4600、制御部120などに相当するコントローラ4601、記憶部130の所定領域に相当するテキストデータメモリ4602、画像復号装置4603、ディスプレイ144に相当する表示装置4604、および記憶部130に相当する記憶装置4606を含んで構成され、各要素はデータバス4605によって接続される。   Referring to FIG. 37, the text processing apparatus includes an instruction device 4600 corresponding to the input / output unit 140, a controller 4601 corresponding to the control unit 120 and the like, a text data memory 4602 corresponding to a predetermined area of the storage unit 130, and an image decoding device. 4603, a display device 4604 corresponding to the display 144, and a storage device 4606 corresponding to the storage unit 130, and each element is connected by a data bus 4605.

テキストデータメモリ4602には、テキストデータが、各文字の文字識別情報として格納されている。ここでは、文字識別情報は、第1の実施の形態と同様に、文字コードと書体識別情報とを含むものとする。通常、書体は頻繁に変更されるものではないので、テキストデータ上で直前の文字と同じ書体を用いているときには、書体識別情報は省略しておき、直前の文字から書体が変更されているときのみ書体識別情報を付加するようにしてもよい。   Text data is stored in the text data memory 4602 as character identification information of each character. Here, it is assumed that the character identification information includes a character code and typeface identification information, as in the first embodiment. Normally, the typeface is not changed frequently, so when using the same typeface as the previous character in the text data, the typeface identification information is omitted and the typeface is changed from the previous character. Only typeface identification information may be added.

記憶装置4605はコントローラ4601で実行されるプログラムや、その他のデータを記憶する。また、テキストデータメモリ4602は、記憶装置4605上に構成されてもよい。   The storage device 4605 stores a program executed by the controller 4601 and other data. The text data memory 4602 may be configured on the storage device 4605.

コントローラ4601は、指示装置4600からの指示を受取ると記憶装置4605に記憶されるプログラムを読出して実行し、画像復号装置4603に復号処理を実行させるよう制御する。画像復号装置4603は、指示装置4600からの指示信号に応じてコントローラ4601から文字識別情報が与えられるごとに、対応するグリフを復号する処理を実行する。つまり、本実施の形態にかかる画像復号装置は、テキスト処理装置のハードウェア、および記憶装置4606に記憶されコントローラ4601により実行されるソフトウェアにより構成される。また、後述する画像復号処理を行なうための機能は、コントローラ4601が記憶装置4606に記憶されるプログラムを読出して実行することによって形成される。または、上記機能の少なくとも一部はテキスト処理装置のハードウェアによって構成されてもよい。   When the controller 4601 receives an instruction from the instruction device 4600, the controller 4601 reads out and executes the program stored in the storage device 4605, and controls the image decoding device 4603 to execute the decoding process. The image decoding device 4603 executes a process of decoding the corresponding glyph each time character identification information is given from the controller 4601 in response to an instruction signal from the instruction device 4600. That is, the image decoding apparatus according to the present embodiment is configured by hardware of a text processing apparatus and software stored in the storage device 4606 and executed by the controller 4601. Further, a function for performing an image decoding process to be described later is formed by the controller 4601 reading and executing a program stored in the storage device 4606. Or at least one part of the said function may be comprised by the hardware of a text processing apparatus.

図38は本実施の形態にかかるテキスト処理装置での画像復号処理を示すフローチャートである。図38のフローチャートに示される処理は、コントローラ4601が記憶装置4606に記憶されるプログラムを読出して実行し、図37に示された各部を制御することによって実現される。   FIG. 38 is a flowchart showing image decoding processing in the text processing apparatus according to this embodiment. The processing shown in the flowchart of FIG. 38 is realized by the controller 4601 reading out and executing a program stored in the storage device 4606 and controlling each unit shown in FIG.

図38を参照して、始めに、コントローラ4601は、指示装置4600からの指示信号に従ってテキストデータメモリ4602から1文字分の文字識別情報を読出す(ステップS4701)。画像復号装置4603は、ステップS4701で読出された文字識別情報に対応するグリフを復号する(ステップS4702)。復号に成功すると(ステップS4703でYES)、処理はステップS4704に進み、そうでなければ(ステップS4703でNO)、処理はステップS4705に進む。   Referring to FIG. 38, first, controller 4601 reads character identification information for one character from text data memory 4602 in accordance with an instruction signal from instruction device 4600 (step S4701). The image decoding device 4603 decodes the glyph corresponding to the character identification information read in step S4701 (step S4702). If the decoding is successful (YES in step S4703), the process proceeds to step S4704, and if not (NO in step S4703), the process proceeds to step S4705.

ステップS4704で、コントローラ4601は、上記ステップS4702で復号されたグリフを表示装置4604に対して出力し、表示するための表示信号を生成させる(ステップS4704)。   In step S4704, the controller 4601 outputs the glyph decoded in step S4702 to the display device 4604 and generates a display signal for display (step S4704).

テキストデータメモリ4602にあるすべての文字が処理されていれば(ステップS4705でYES)処理が終了し、そうでなければ処理はステップS4701に戻る。   If all characters in text data memory 4602 have been processed (YES in step S4705), the process ends; otherwise, the process returns to step S4701.

図39は、本実施の形態にかかるテキスト処理装置である携帯電話1において画像復号装置4603として機能し、上記ステップS4702の画像復号処理を行なうための機能構成の具体例を示すブロック図である。本実施の形態にかかる画像復号装置は、第1の実施の形態にかかる画像符号化装置によって符号化された符号化データである文字フォントデータにアクセスして、必要なフォントデータを復号する。   FIG. 39 is a block diagram illustrating a specific example of a functional configuration that functions as the image decoding device 4603 in the mobile phone 1 that is the text processing device according to the present embodiment and performs the image decoding processing in step S4702. The image decoding apparatus according to the present embodiment accesses character font data that is encoded data encoded by the image encoding apparatus according to the first embodiment, and decodes necessary font data.

図39を参照して、画像復号装置の上記機能は、コントローラ3301、符号化データメモリ3302、エントロピー符号復号部3303、加工分割文字画像データメモリ3304、アクセステーブルデータ変換部3305、アクセステーブルデータメモリ3306、画像処理部3307、および文字画像データメモリ3308を含んで構成され、それぞれの構成要素は、データバス3309を介して互いに、また外部に接続される。   Referring to FIG. 39, the above functions of the image decoding apparatus are as follows: controller 3301, encoded data memory 3302, entropy code decoding unit 3303, processed divided character image data memory 3304, access table data conversion unit 3305, access table data memory 3306. The image processing unit 3307 and the character image data memory 3308 are included, and the respective components are connected to each other and to the outside via the data bus 3309.

さらに、図40は、画像処理部3307の構成の具体例を示すブロック図である。図40を参照して、画像処理部3307は、画像演算部4801、文字画像データメモリ4802、および分割文字画像データメモリ4803を含んで構成され、各構成要素はデータバス4804を介して互いに、また外部に接続される。   FIG. 40 is a block diagram illustrating a specific example of the configuration of the image processing unit 3307. Referring to FIG. 40, image processing unit 3307 includes an image calculation unit 4801, a character image data memory 4802, and a divided character image data memory 4803. Each component is connected to each other via a data bus 4804, or Connected externally.

さらに、図41は、アクセステーブルデータ変換部3305の構成の具体例を示すブロック図である。図41を参照して、アクセステーブルデータ変換部3305は、文字識別情報・グリフ番号変換部5101、およびグリフ番号・オフセット情報変換部5102を含んで構成され、各構成要素はデータバス5103を介して互いに、また外部に接続される。   FIG. 41 is a block diagram showing a specific example of the configuration of the access table data conversion unit 3305. Referring to FIG. 41, access table data conversion unit 3305 includes character identification information / glyph number conversion unit 5101 and glyph number / offset information conversion unit 5102, and each component is connected via data bus 5103. Connected to each other and to the outside.

符号化データメモリ3302、およびアクセステーブルデータメモリ3306は、記憶装置4604の所定領域で構成され、各々、第1の実施の形態にかかる画像符号化装置にて生成された符号化データ、およびアクセステーブルデータを記憶する。   The encoded data memory 3302 and the access table data memory 3306 are configured by a predetermined area of the storage device 4604, and are respectively encoded data generated by the image encoding device according to the first embodiment and the access table. Store the data.

アクセステーブルデータ変換部3305の文字識別情報・グリフ番号変換部5101は、コントローラ3301から受取った文字識別情報に基づいて内部文字コードを取得する。ここでの取得方法は、第1の実施の形態における取得方法と同様の方法が用いられ得る。また、文字識別情報・グリフ番号変換部5101は、アクセステーブルデータメモリ3306に格納されるアクセステーブルデータを参照し、内部文字コードに対応するグリフ番号を特定して、文字識別情報をグリフ番号に変換する。変換されたグリフ番号は、さらにアクセステーブルデータ変換部3305のグリフ番号・オフセット情報変換部5102によってオフセット情報に変換され、エントロピー符号復号部3303に入力される。   The character identification information / glyph number conversion unit 5101 of the access table data conversion unit 3305 acquires an internal character code based on the character identification information received from the controller 3301. As the acquisition method here, the same method as the acquisition method in the first embodiment may be used. The character identification information / glyph number conversion unit 5101 refers to the access table data stored in the access table data memory 3306, identifies the glyph number corresponding to the internal character code, and converts the character identification information into the glyph number. To do. The converted glyph number is further converted into offset information by the glyph number / offset information converting unit 5102 of the access table data converting unit 3305 and input to the entropy code decoding unit 3303.

エントロピー符号復号部3303は、アクセステーブルデータ変換部3305から入力された、符号化データ上での位置を特定する情報であるオフセット情報を用い、符号化データメモリ3302に格納された符号化データ上の、復号対象の文字識別情報に対応した分割文字画像データに対応する部分にアクセスする。そして、その部分の符号化データ(つまり、オフセット情報によって特定された位置にあるデータ)を復号し、「加工分割文字画像データ」として加工分割文字画像データメモリ3304に格納する。加工分割文字画像データメモリ3304もまた、記憶装置4604の所定領域で構成され、復号されたデータを記憶する。   The entropy code decoding unit 3303 uses offset information, which is input from the access table data conversion unit 3305 and is information for specifying a position on the encoded data, on the encoded data stored in the encoded data memory 3302. The part corresponding to the divided character image data corresponding to the character identification information to be decoded is accessed. Then, the encoded data of that portion (that is, data at the position specified by the offset information) is decoded and stored in the processed divided character image data memory 3304 as “processed divided character image data”. The processed divided character image data memory 3304 is also configured by a predetermined area of the storage device 4604 and stores the decoded data.

画像処理部3307の画像演算部4801は、加工分割文字画像データメモリ3304に格納された加工分割文字画像データのうちの1つのデータについての排他的論理和を算出し、「分割文字画像データ」として分割文字画像データメモリ4803に格納する。分割文字画像データメモリ4803もまた、記憶装置4604の所定領域で構成され、分割文字画像データを記憶する。   The image calculation unit 4801 of the image processing unit 3307 calculates an exclusive OR of one piece of the processed divided character image data stored in the processed divided character image data memory 3304, and obtains “divided character image data”. The divided character image data memory 4803 is stored. The divided character image data memory 4803 is also configured by a predetermined area of the storage device 4604 and stores the divided character image data.

ここでは、第1の実施の形態における差分の算出と同様に、出力データである分割文字画像データの0ライン目は、入力データである加工分割文字画像データから取出した0ライン目をそのまま用いる。また、1ライン目以降は、入力データである加工分割文字画像データのnライン目と、分割文字画像データのすでに復元されている(n−1)ライン目との排他的論理和を、出力データである分割文字画像データのnライン目の値とする。この処理を順次行なうことで、画像処理部3307において加工分割文字画像データから分割文字画像データが復元される。   Here, similarly to the calculation of the difference in the first embodiment, the 0th line extracted from the processed divided character image data that is the input data is used as it is as the 0th line of the divided character image data that is the output data. For the first and subsequent lines, the exclusive OR of the nth line of the processed divided character image data, which is the input data, and the (n-1) th line of the already restored divided character image data is output data. Is the value of the nth line of the divided character image data. By sequentially performing this process, the image processing unit 3307 restores the divided character image data from the processed divided character image data.

この処理で分割文字画像データが復元できるのは、排他的論理和を取るという操作が、それ自身の逆変換となっているからである。すなわち、
C=A^B
であれば
B=A^C
が成り立つためである。
The reason why the divided character image data can be restored by this processing is that the operation of taking the exclusive OR is the inverse transformation of itself. That is,
C = A ^ B
If B = A ^ C
This is because

したがって、n≧1について、第1の実施の形態に示された、
(加工分割文字画像データのnライン目)=(分割文字画像データの(n−1)ライン目)^(分割文字画像データのnライン目)
という関係から、
(分割文字画像データのnライン目)=(分割文字画像データの(n−1)ライン目)^(加工分割文字画像データのnライン目)
が成り立つ。つまり、分割文字画像データの第(n−1)ラインの値と加工分割文字画像データの第nラインの値とを用いて、分割文字画像データの第nラインの値が算出できる。
Therefore, for n ≧ 1, shown in the first embodiment,
(Nth line of processed divided character image data) = ((n-1) th line of divided character image data) ^ (nth line of divided character image data)
From the relationship
(Nth line of divided character image data) = ((n-1) th line of divided character image data) ^ (nth line of processed divided character image data)
Holds. That is, the value of the nth line of the divided character image data can be calculated using the value of the (n−1) th line of the divided character image data and the value of the nth line of the processed divided character image data.

n=0については、これも第1の実施の形態に示されたように、
(加工分割文字画像データのnライン目)=(分割文字画像データのnライン目)
であるため、加工分割文字画像データの0ライン目をそのまま分割文字画像データにコピーすれば復元できる。
As for n = 0, as also shown in the first embodiment,
(Nth line of processed divided character image data) = (nth line of divided character image data)
Therefore, it can be restored by copying the 0th line of the processed divided character image data directly to the divided character image data.

もちろん、符号化側での処理が、隣接するライン間の排他的論理和ではなくても、元の画像データの情報を失わない(可逆性を損なわない)変形であれば、これに対応した復号側の処理を行なって加工分割文字画像データから分割文字画像データを得ることが可能である。   Of course, if the processing on the encoding side is not exclusive OR between adjacent lines, if the transformation does not lose the information of the original image data (does not lose reversibility), decoding corresponding to this is possible. The divided character image data can be obtained from the processed divided character image data by performing the above process.

分割文字画像データメモリ4802に格納された分割文字画像データは画像処理部3307の画像演算部4801において統合されて、元の文字画像データが生成される。生成された文字画像データは文字画像データメモリ4802に格納される。文字画像データメモリ4802に格納された文字画像データは、画像演算部4801によって、文字画像データメモリ3308に格納される。文字画像データメモリ4802,3308もまた、記憶装置4604の所定領域で構成され、復号処理の結果得られた文字画像データを記憶する。   The divided character image data stored in the divided character image data memory 4802 is integrated in the image calculation unit 4801 of the image processing unit 3307 to generate original character image data. The generated character image data is stored in the character image data memory 4802. The character image data stored in the character image data memory 4802 is stored in the character image data memory 3308 by the image calculation unit 4801. The character image data memories 4802 and 3308 are also configured by a predetermined area of the storage device 4604, and store character image data obtained as a result of the decoding process.

図42は、上記ステップS4702での、画像復号装置で実行される復号処理を示すフローチャートである。なお、当該画像復号装置を搭載するテキスト処理装置のように、当該画像復号装置を利用する装置を、以下の説明で「本体モジュール」と称する。   FIG. 42 is a flowchart showing the decoding process executed by the image decoding apparatus in step S4702. Note that a device that uses the image decoding device, such as a text processing device equipped with the image decoding device, is referred to as a “main body module” in the following description.

図42を参照して、始めに、画像復号装置のコントローラ3301は、テキスト処理装置のコントローラ4601より文字識別情報を受取る(ステップS3401)。ステップS3401で取得された文字識別情報は、アクセステーブルデータ変換部3305によってグリフ番号に変換される(ステップS3402)。   Referring to FIG. 42, first, controller 3301 of the image decoding apparatus receives character identification information from controller 4601 of the text processing apparatus (step S3401). The character identification information acquired in step S3401 is converted into a glyph number by the access table data conversion unit 3305 (step S3402).

ステップS3402において文字識別情報の変換に成功すれば(ステップS3403でYES)、処理はステップS3405に進み、そうでない場合には(ステップS3403でNO)、処理はステップS3404に進む。ステップS3404においてコントローラ3301は、本体モジュールに、復号に成功しなかったことを知らせるエラー値を返す(ステップ3404)。エラー値が返された場合は、本体モジュールは、要求したグリフの代わりにスペースを表示する、代替となる文字を表示する、など適宜処理を実行すればよい。   If the character identification information is successfully converted in step S3402 (YES in step S3403), the process proceeds to step S3405. If not (NO in step S3403), the process proceeds to step S3404. In step S3404, the controller 3301 returns an error value notifying the main body module that the decoding has not been successful (step 3404). If an error value is returned, the main module may perform appropriate processing such as displaying a space instead of the requested glyph and displaying an alternative character.

ステップS3405においては、ステップS3402で変換されたグリフ番号は、アクセステーブル変換部3305によってオフセット情報に変換される(ステップS3405)。   In step S3405, the glyph number converted in step S3402 is converted into offset information by the access table conversion unit 3305 (step S3405).

次に、エントロピー符号復号部3303は、上記ステップS3405で変換されたオフセット情報を用いて、符号化データメモリ3302に格納された符号化データ上の、上記ステップS3401で取得された文字識別情報に対応した加工分割文字画像データに対応する部分にアクセスして、その部分の符号化データを復号する(ステップS3406)。そして、復号して得られた加工分割文字画像データを加工分割文字画像データメモリ3304に格納する。   Next, the entropy code decoding unit 3303 corresponds to the character identification information acquired in step S3401 on the encoded data stored in the encoded data memory 3302 using the offset information converted in step S3405. The part corresponding to the processed divided character image data is accessed, and the encoded data of that part is decoded (step S3406). Then, the processed divided character image data obtained by decoding is stored in the processed divided character image data memory 3304.

上記ステップS3401で取得された文字識別情報に対応したすべての加工分割文字画像データに対する処理が終了すると(ステップS3407でYES)、処理はステップS3408に進み、そうでなければ(ステップS3407でNO)、処理はステップS3405に戻る。   When the processing for all the processed divided character image data corresponding to the character identification information acquired in step S3401 is completed (YES in step S3407), the process proceeds to step S3408; otherwise (NO in step S3407), The process returns to step S3405.

ステップS3408で、画像処理部3307は、上記ステップS3406で復号された加工分割文字画像データの排他的論理和を算出し、分割文字画像データを得る。次いで、画像処理部3308が、ステップS3408で得られた分割文字画像データを統合して、元の文字画像データを作成する(ステップS3409)。作成された文字画像データは文字画像データメモリ3308に格納され、処理が終了する。   In step S3408, the image processing unit 3307 calculates an exclusive OR of the processed divided character image data decoded in step S3406 to obtain divided character image data. Next, the image processing unit 3308 integrates the divided character image data obtained in step S3408 to create original character image data (step S3409). The created character image data is stored in the character image data memory 3308, and the process ends.

図43は、上記ステップS3402における、グリフ番号への変換処理を示すフローチャートである。なお、第1の実施の形態と同様に、アクセスデータメモリ3306に格納されているアクセステーブルデータは、図8に示されたように、文字識別情報・グリフ番号変換データ1401と、グリフ番号・オフセット情報変換データ1402とを含み、さらに文字識別情報・グリフ番号変換データ1401は、図19に示されたように、ステータステーブル1501、第1補助テーブル1502、および第2補助テーブル1503を含むものとする。以下の説明においては、画像復号装置のアクセスデータメモリ3306に図8,図19に示されたアクセステーブルデータが格納されているものとする。   FIG. 43 is a flowchart showing the conversion process to the glyph number in step S3402. As in the first embodiment, the access table data stored in the access data memory 3306 includes character identification information / glyph number conversion data 1401, glyph number / offset, as shown in FIG. Further, the character identification information / glyph number conversion data 1401 includes a status table 1501, a first auxiliary table 1502, and a second auxiliary table 1503, as shown in FIG. In the following description, it is assumed that the access table data shown in FIGS. 8 and 19 is stored in the access data memory 3306 of the image decoding apparatus.

図43を参照して、始めに、文字識別情報・グリフ番号変換部5101は、上記ステップS3401で取得された文字識別情報に基づいて、対象の文字について内部文字コードを取得する(ステップS5201)。この取得方法については、第1の実施の形態における取得方法(ステップS2301)と同様である。   Referring to FIG. 43, first, the character identification information / glyph number conversion unit 5101 acquires an internal character code for the target character based on the character identification information acquired in step S3401 (step S5201). This acquisition method is the same as the acquisition method (step S2301) in the first embodiment.

次に、文字識別情報・グリフ番号変換部5101は、アクセスデータメモリ3306に格納されているステータステーブル1501にアクセスし(ステップS5202)、上記ステップS5201で取得された内部文字コードについてステータステーブル1501で規定された値を読出す。ステータステーブル1501で規定された値が「0」であれば(ステップS5203でYES)処理はステップS5205に進み、ステータステーブル1501で規定された値が「2」であれば(ステップS5203でNO、かつステップS5204でYES)処理はステップS5207に進み、そうでなければ、つまり規定された値が「1」であれば(ステップS5203でNO、かつステップS5204でNO)、処理はステップS5206に進む。   Next, the character identification information / glyph number conversion unit 5101 accesses the status table 1501 stored in the access data memory 3306 (step S5202), and the internal character code acquired in step S5201 is defined in the status table 1501. Read the value. If the value specified in status table 1501 is “0” (YES in step S5203), the process proceeds to step S5205. If the value specified in status table 1501 is “2” (NO in step S5203, and If YES in step S5204, the process advances to step S5207; otherwise, if the specified value is “1” (NO in step S5203 and NO in step S5204), the process advances to step S5206.

ステップS5205においては、つまり上記ステップS5201で取得された内部文字コードに対応するステータステーブル1501で規定された値が「0」であれば、その内部文字コードに対応するグリフがないことが規定されているため、文字識別情報・グリフ番号変換部5101は、エラーを返し、処理を上記ステップS3403に進める。   In step S5205, that is, if the value defined in the status table 1501 corresponding to the internal character code acquired in step S5201 is “0”, it is defined that there is no glyph corresponding to the internal character code. Therefore, the character identification information / glyph number conversion unit 5101 returns an error, and the process proceeds to step S3403.

ステータステーブルにて、「1」または「2」が規定された内部文字コードに対しては、対応するグリフ番号を取得する必要がある。   For an internal character code in which “1” or “2” is defined in the status table, it is necessary to obtain the corresponding glyph number.

ステータステーブルにて「1」が規定された内部文字コードに対しては、今までの復号処理において「1」が規定された内部文字コードがいくつあったかを調べて、得られた結果をグリフ番号とする。図23に示されたように、第1補助テーブル1502には、内部文字コードのいくつかについて対応するグリフ番号が記載されているため、このようなアクセスを高速にすることができる。   For the internal character code for which “1” is defined in the status table, the number of internal character codes for which “1” is defined in the past decoding processes is checked, and the obtained result is used as the glyph number. To do. As shown in FIG. 23, since the glyph numbers corresponding to some of the internal character codes are described in the first auxiliary table 1502, such access can be speeded up.

ステップS5206においては、つまり上記ステップS5201で取得された内部文字コードに対応するステータステーブル1501で規定された値が「1」であれば、文字識別情報・グリフ番号変換部5101は、第1補助テーブル1502とステータステーブル1501とから上記ステップS5201で取得された内部文字コードに対応するグリフ番号を特定して、処理を上記ステップS3403に進める。グリフ番号を特定する具体的な方法としては、文字識別情報・グリフ番号変換部5101は、第1補助テーブル1502から、その内部文字コードより大きくない、最も近い内部文字コードを抽出して、抽出された内部文字コードに対応するグリフ番号を特定する。そして、抽出された内部文字コードから、上記ステップS5201で取得された内部文字コードまでステータステーブル1501で「1」が規定されている内部文字コード数を数え、上記ステップS5201で取得された内部文字コードのグリフ番号とする。   In step S5206, that is, if the value defined in the status table 1501 corresponding to the internal character code acquired in step S5201 is “1”, the character identification information / glyph number conversion unit 5101 performs the first auxiliary table. The glyph number corresponding to the internal character code acquired in step S5201 is specified from 1502 and the status table 1501, and the process proceeds to step S3403. As a specific method for specifying the glyph number, the character identification information / glyph number conversion unit 5101 extracts the nearest internal character code that is not larger than the internal character code from the first auxiliary table 1502 and extracts it. Specifies the glyph number corresponding to the internal character code. Then, the number of internal character codes defined as “1” in the status table 1501 is counted from the extracted internal character code to the internal character code acquired in step S5201, and the internal character code acquired in step S5201 is counted. Glyph number.

具体的に、上記ステップS5201で取得された内部文字コードが、図22のステータステーブルにおいて内部文字コード「11」に対応するグリフ番号が「8」と記述されている、「11」であるものとする。上記ステップS5206で文字識別情報・グリフ番号変換部5101は、図23の第1補助テーブル1502から、まず「11」を超えない中で、最も「11」に近い値として「10」を抽出し、内部文字コード「10」に対応するグリフ番号「7」を特定する。これはグリフ番号の概算値を得ていることになる。そして、図22のステータステーブルを参照して、内部文字コードの10番目から1つ先までの、ステータステーブル1501で「1」が規定されている内部文字コード数「8」をカウントすることで、内部文字コード「11」に対応するグリフ番号「8」を得る。これは、図22のステータステーブル1501から得られるグリフ番号「8」と一致する。   Specifically, the internal character code acquired in step S5201 is “11” in which the glyph number corresponding to the internal character code “11” is described as “8” in the status table of FIG. To do. In step S5206, the character identification information / glyph number conversion unit 5101 first extracts “10” from the first auxiliary table 1502 of FIG. 23 as a value closest to “11” without exceeding “11”. The glyph number “7” corresponding to the internal character code “10” is specified. This gives you an estimate of the glyph number. Then, by referring to the status table of FIG. 22, by counting the number of internal character codes “8” defined as “1” in the status table 1501 from the 10th to the next internal character code, A glyph number “8” corresponding to the internal character code “11” is obtained. This matches the glyph number “8” obtained from the status table 1501 of FIG.

また、ステップS5207においては、つまり上記ステップS5201で取得された内部文字コードに対応するステータステーブル1501で規定された値が「2」であれば、文字識別情報・グリフ番号変換部5101は、第2補助テーブル5303を参照して、その内部文字コードに対応するグリフ番号を特定し、処理を上記ステップS3403に進める。   In step S5207, that is, if the value defined in the status table 1501 corresponding to the internal character code acquired in step S5201 is "2", the character identification information / glyph number conversion unit 5101 Referring to auxiliary table 5303, the glyph number corresponding to the internal character code is specified, and the process proceeds to step S3403.

なお、上述の文字識別情報・グリフ番号変換部5101で用いられる文字識別情報・グリフ番号変換データは1つの具体例であって、ここで生成される変換データは上述のような文字識別情報・グリフ番号変換データには限定されない。ここでのポイントは、文字識別情報(またはそこから一意に決定される内部文字コード)とグリフ番号またはグリフとの対応関係が1対1であるか、そうでないか(あるいはグリフ番号またはグリフがいくつの文字識別情報に対応するか、逆に文字識別情報がいくつのグリフ番号またはグリフに対応するか)を示すデータを保持し、それによって高速に、文字識別情報(または内部文字コード)とグリフ番号またはグリフとの対応関係が1対1であるかどうかを判定し、その判定結果に応じて異なるテーブルを参照するように構成することで、文字識別情報・グリフ番号変換データのために必要となるデータ容量を小さく保ちながら、文字識別情報(または内部文字コード)を高速にグリフ番号に変換する(グリフデータを特定する)ことができるようにした点にある。具体的には、本実施の形態では、文字識別情報がグリフと1対1対応しているかどうかをステータステーブル1501へのアクセスによって判定し、1対1対応している場合には第1補助テーブル1502を参照し、そうでない場合には第2補助テーブル1503を参照するようにしている。さらにその第1補助テーブル1502は、文字識別情報(または内部文字コード)とグリフ番号との対応テーブルのサブセットとなっており、画像復号装置は、この第1補助テーブル1502をアクセスして、グリフ番号の概算値を得て、この概算値を用いることによって、第1補助テーブル1502を用いないときと比較して、少ない回数のステータステーブル1501へのアクセスにより真のグリフ番号を得ることができるようになっているのである。   The character identification information / glyph number conversion data used in the character identification information / glyph number conversion unit 5101 is one specific example, and the conversion data generated here is the character identification information / glyph as described above. It is not limited to number conversion data. The point here is whether the correspondence between the character identification information (or the internal character code uniquely determined therefrom) and the glyph number or glyph is one-to-one or not (or how many glyph numbers or glyphs are Data indicating the number of glyph numbers or the number of glyphs corresponding to the character identification information, or conversely, the character identification information (or internal character code) and the glyph number at a high speed. Alternatively, it is necessary for the character identification information / glyph number conversion data by determining whether or not the correspondence relationship with the glyph is one-to-one and referring to a different table according to the determination result. Character identification information (or internal character code) can be converted to glyph numbers at high speed (specifying glyph data) while keeping the data capacity small. It lies in the fact that you kill so. Specifically, in this embodiment, whether or not the character identification information has a one-to-one correspondence with the glyph is determined by accessing the status table 1501, and if the character identification information has a one-to-one correspondence, the first auxiliary table. 1502 is referred to, and if not, the second auxiliary table 1503 is referred to. Further, the first auxiliary table 1502 is a subset of a correspondence table of character identification information (or internal character code) and glyph numbers, and the image decoding apparatus accesses the first auxiliary table 1502 to access the glyph number. By using this approximate value, a true glyph number can be obtained by accessing the status table 1501 a smaller number of times compared to when the first auxiliary table 1502 is not used. It has become.

図44は、上記ステップS3408における排他的論理和の算出処理を示すフローチャートである。   FIG. 44 is a flowchart showing the exclusive OR calculation processing in step S3408.

図44を参照して、始めに、画像演算部4801は、上記ステップS3406で加工分割文字画像データメモリ3304に格納された加工分割文字画像データの1つのデータについて排他的論理和を算出し、分割文字画像データを分割文字画像データメモリ4803に格納する(ステップS4901)。先述のように、符号化されたデータの排他的論理和を算出する処理は、データ符号化時の排他的論理和を算出する処理の逆向きの処理に該当するため、結果として復号する処理となり、符号化前の分割文字画像データが復元される。   Referring to FIG. 44, first, image calculation unit 4801 calculates an exclusive OR for one piece of processed divided character image data stored in processed divided character image data memory 3304 in step S3406, and performs division. Character image data is stored in the divided character image data memory 4803 (step S4901). As described above, the process of calculating the exclusive OR of the encoded data corresponds to the reverse process of the process of calculating the exclusive OR at the time of data encoding. The divided character image data before encoding is restored.

上記ステップS3401で取得された文字識別情報に対応したすべての加工分割文字画像データに対する排他的論理和を算出する処理が終了すると(ステップS4902でYES)、処理は上記ステップS3409に進める。そうでなければ(ステップS4902でNO)、処理はステップS4901に戻る。   When the process of calculating the exclusive OR for all the processed divided character image data corresponding to the character identification information acquired in step S3401 is completed (YES in step S4902), the process proceeds to step S3409. Otherwise (NO in step S4902), the process returns to step S4901.

図45は、上記ステップS3409における、分割文字画像データの統合処理を示すフローチャートである。   FIG. 45 is a flowchart showing the integration processing of divided character image data in step S3409.

図45を参照して、始めに、画像演算部4801は、上記ステップS3408の処理が実行された結果として分割文字画像データメモリ4802に格納されている分割文字画像データを統合して、文字画像データメモリ4802に格納する(ステップS5001)。そして、画像演算部4801は、文字画像データメモリ4802に格納された文字画像データを読出して文字画像データメモリ3308に出力し、文字画像データメモリ3308に格納する(ステップS5002)。以上で、処理を終了する。   Referring to FIG. 45, first, image calculation unit 4801 integrates the divided character image data stored in divided character image data memory 4802 as a result of the execution of the process of step S3408 to obtain character image data. The data is stored in the memory 4802 (step S5001). The image calculation unit 4801 reads the character image data stored in the character image data memory 4802, outputs it to the character image data memory 3308, and stores it in the character image data memory 3308 (step S5002). Thus, the process ends.

[第4の実施の形態]
第4の実施の形態にかかる画像復号装置は、上記第2の実施の形態にかかる画像符号化装置において符号化された符号化データを復号する装置である。
[Fourth Embodiment]
The image decoding apparatus according to the fourth embodiment is an apparatus that decodes the encoded data encoded by the image encoding apparatus according to the second embodiment.

図46は本実施の形態にかかるテキスト処理装置において画像復号装置として機能し、画像復号処理を行なうための機能構成の具体例を示すブロック図である。   FIG. 46 is a block diagram showing a specific example of a functional configuration for functioning as an image decoding device and performing image decoding processing in the text processing device according to the present embodiment.

図46を参照して、本実施の形態にかかる画像復号装置の上記機能は、図39に示された第3の実施の形態にかかる画像復号装置の上記機能に含まれる各機能に加えて、フラグデータメモリ3610を含んで構成される。   Referring to FIG. 46, the function of the image decoding apparatus according to the present embodiment includes, in addition to the functions included in the function of the image decoding apparatus according to the third embodiment shown in FIG. A flag data memory 3610 is included.

フラグデータメモリ3610は、記憶装置4604の所定領域で構成され、第2の実施の形態にかかる画像符号化装置にて生成されたフラグデータを予め記憶する。   The flag data memory 3610 includes a predetermined area of the storage device 4604, and stores in advance flag data generated by the image encoding device according to the second embodiment.

第3の実施の形態にかかる画像復号装置における復号処理は、第2の実施の形態において図42に示された復号処理と同様である。   The decoding process in the image decoding apparatus according to the third embodiment is the same as the decoding process shown in FIG. 42 in the second embodiment.

図47は、本実施の形態での、上記ステップS3409における、分割文字画像データの統合処理を示すフローチャートである。   FIG. 47 is a flowchart showing the division character image data integration processing in step S3409 according to the present embodiment.

図47を参照して、本実施の形態にかかる画像処理部3307の画像演算部4801は、分割文字画像データメモリ4803に格納されている分割文字画像データを統合して、文字画像データメモリ4802に格納する(ステップS5401)。   Referring to FIG. 47, the image calculation unit 4801 of the image processing unit 3307 according to the present embodiment integrates the divided character image data stored in the divided character image data memory 4803 and stores the divided character image data in the character image data memory 4802. Store (step S5401).

画像演算部4801は、フラグデータメモリ3610格納されているフラグデータのうち、上記ステップS5401での処理対象の文字画像データに対応するフラグの値を参照する(ステップS5402)。フラグの値が「0」であれば、つまり回転後の画像データが符号化処理されている場合には(ステップS5402でNO)処理はステップS5403に進み、フラグの値が「1」であれば、つまり回転前の画像データが符号化処理されている場合には(ステップS5402でYES)ステップS5403をスキップして、処理がステップS5404に進む。   The image calculation unit 4801 refers to the flag value corresponding to the character image data to be processed in step S5401 among the flag data stored in the flag data memory 3610 (step S5402). If the flag value is “0”, that is, if the rotated image data has been encoded (NO in step S5402), the process proceeds to step S5403, and if the flag value is “1”. That is, if the image data before rotation has been encoded (YES in step S5402), step S5403 is skipped, and the process proceeds to step S5404.

ステップS5403では、画像演算部4801は、文字画像データメモリ3502に格納された文字画像データを90度回転された後に、文字画像データメモリ3502に再度格納する(ステップS5403)。なお、ステップS5403では、画像演算部4801は、第2の実施の形態において画像演算部2701が、第1文字画像データに対して行なった回転(ステップS3703)の逆方向に文字画像データを回転させるものとする。したがって、第2の実施の形態にかかる画像符号化装置で文字画像データを時計回りに90度回転したことと対応して、ここではその逆向き、すなわち反時計回りに90度回転する(「時計回りに−90度」と表現してもよい。)ことになる。つまり、一般化すると、ここで実行される処理は、符号化時に文字画像データに施した変換(ここでは回転処理)の影響を打ち消すような、逆変換を施す処理である。   In step S5403, the image calculation unit 4801 rotates the character image data stored in the character image data memory 3502 by 90 degrees, and then stores it again in the character image data memory 3502 (step S5403). In step S5403, image calculation unit 4801 rotates the character image data in the opposite direction to the rotation (step S3703) performed by image calculation unit 2701 on the first character image data in the second embodiment. Shall. Accordingly, in correspondence with the fact that the character image data is rotated 90 degrees clockwise in the image encoding apparatus according to the second embodiment, here, it is rotated 90 degrees in the opposite direction, that is, counterclockwise (“clock” It may also be expressed as “-90 degrees around”). In other words, when generalized, the process executed here is a process of performing an inverse transformation so as to cancel the influence of the transformation (here, the rotation process) performed on the character image data at the time of encoding.

画像演算部4801は、上記ステップS5401または上記ステップS5403で文字画像データメモリ4802に格納された文字画像データを読出して文字画像データメモリ3308に出力し、文字画像データメモリ3308に格納する(ステップS5404)。以上で、処理を終了する。   The image calculation unit 4801 reads the character image data stored in the character image data memory 4802 in step S5401 or step S5403, outputs the character image data to the character image data memory 3308, and stores it in the character image data memory 3308 (step S5404). . Thus, the process ends.

さらに、上述の画像符号化処理および/または画像復号処理をコンピュータに実行させるプログラムを提供することもできる。このようなプログラムは、コンピュータに付属するフレキシブルディスク、CD−ROM、ROM、RAMおよびメモリカードなどのコンピュータ読取り可能な記録媒体にて記録させて、プログラム製品として提供することもできる。あるいは、コンピュータに内蔵するハードディスクなどの記録媒体にて記録させて、プログラムを提供することもできる。また、ネットワークを介したダウンロードによって、プログラムを提供することもできる。   Furthermore, it is possible to provide a program that causes a computer to execute the above-described image encoding process and / or image decoding process. Such a program can be recorded on a computer-readable recording medium such as a flexible disk, a CD-ROM, a ROM, a RAM, and a memory card attached to the computer and provided as a program product. Alternatively, the program can be provided by being recorded on a recording medium such as a hard disk built in the computer. A program can also be provided by downloading via a network.

なお、本発明にかかるプログラムは、コンピュータのオペレーションシステム(OS)の一部として提供されるプログラムモジュールのうち、必要なモジュールを所定の配列で所定のタイミングで呼出して処理を実行させるものであってもよい。その場合、プログラム自体には上記モジュールが含まれずOSと協働して処理が実行される。このようなモジュールを含まないプログラムも、本発明にかかるプログラムに含まれ得る。   The program according to the present invention is a program module that is provided as a part of a computer operating system (OS) and calls necessary modules in a predetermined arrangement at a predetermined timing to execute processing. Also good. In that case, the program itself does not include the module, and the process is executed in cooperation with the OS. A program that does not include such a module can also be included in the program according to the present invention.

また、本発明にかかるプログラムは他のプログラムの一部に組込まれて提供されるものであってもよい。その場合にも、プログラム自体には上記他のプログラムに含まれるモジュールが含まれず、他のプログラムと協働して処理が実行される。このような他のプログラムに組込まれたプログラムも、本発明にかかるプログラムに含まれ得る。   The program according to the present invention may be provided by being incorporated in a part of another program. Even in this case, the program itself does not include the module included in the other program, and the process is executed in cooperation with the other program. Such a program incorporated in another program can also be included in the program according to the present invention.

提供されるプログラム製品は、ハードディスクなどのプログラム格納部にインストールされて実行される。なお、プログラム製品は、プログラム自体と、プログラムが記録された記録媒体とを含む。   The provided program product is installed in a program storage unit such as a hard disk and executed. The program product includes the program itself and a recording medium on which the program is recorded.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

携帯電話1のハードウェア構成の具体例を示す図である。2 is a diagram illustrating a specific example of a hardware configuration of a mobile phone 1. FIG. 第1の実施の形態にかかる画像符号化装置の機能構成の具体例を示すブロック図である。It is a block diagram which shows the specific example of a function structure of the image coding apparatus concerning 1st Embodiment. 画像処理部1209の構成の具体例を示すブロック図である。FIG. 11 is a block diagram illustrating a specific example of a configuration of an image processing unit 1209. アクセステーブルデータ生成部1206の構成の具体例を示すブロック図である。5 is a block diagram showing a specific example of the configuration of an access table data generation unit 1206. FIG. 文字画像データの具体例を表わす図である。It is a figure showing the specific example of character image data. 画像データメモリ1202に格納される画像データの具体例を示す図である。5 is a diagram illustrating a specific example of image data stored in an image data memory 1202. FIG. 文字識別情報・グリフ番号対応ルールの具体例を表わす図である。It is a figure showing the specific example of a character identification information and a glyph number correspondence rule. アクセステーブルデータの具体例を表わす図である。It is a figure showing the specific example of access table data. 第1の実施の形態にかかる符号化処理を示すフローチャートである。It is a flowchart which shows the encoding process concerning 1st Embodiment. ステップS1303における画像データの分割処理を示すフローチャートである。It is a flowchart which shows the division process of the image data in step S1303. 文字画像データの具体例を表わす図である。It is a figure showing the specific example of character image data. 分割文字画像データの具体例を表わす図である。It is a figure showing the specific example of division | segmentation character image data. 分割文字画像データの具体例を表わす図である。It is a figure showing the specific example of division | segmentation character image data. 文字画像データの具体例を表わす図である。It is a figure showing the specific example of character image data. 文字画像データの配置を説明する図である。It is a figure explaining arrangement | positioning of character image data. ステップS1304における排他的論理和の算出処理を示すフローチャートである。It is a flowchart which shows the calculation process of exclusive OR in step S1304. 加工分割文字画像データの具体例を表わす図である。It is a figure showing the specific example of process division | segmentation character image data. ステップS1308におけるアクセステーブルの生成処理を示すフローチャートである。It is a flowchart which shows the production | generation process of the access table in step S1308. 文字識別情報・グリフ番号変換データの具体例を表わす図である。It is a figure showing the specific example of character identification information and glyph number conversion data. 文字コードと内部文字コードとの対応の具体例を表わす図である。It is a figure showing the specific example of a response | compatibility with a character code and an internal character code. 文字コードと書体識別情報とから内部文字コードに変換する技術を説明する図である。It is a figure explaining the technique converted into an internal character code from a character code and typeface identification information. ステータステーブルの具体例を表わす図である。It is a figure showing the specific example of a status table. 第1補助テーブルの具体例を表わす図である。It is a figure showing the specific example of a 1st auxiliary table. ステータステーブルの具体例を表わす図である。It is a figure showing the specific example of a status table. 第2補助テーブルの具体例を表わす図である。It is a figure showing the specific example of a 2nd auxiliary table. 文字画像データの特徴を説明する図である。It is a figure explaining the characteristic of character image data. 文字画像データの特徴を説明する図である。It is a figure explaining the characteristic of character image data. 文字画像データの排他的論理和の算出結果を説明する図である。It is a figure explaining the calculation result of the exclusive OR of character image data. 文字画像データの排他的論理和の算出結果を説明する図である。It is a figure explaining the calculation result of the exclusive OR of character image data. 第2の実施の形態にかかる画像符号化装置の機能構成の具体例を示すブロック図である。It is a block diagram which shows the specific example of a function structure of the image coding apparatus concerning 2nd Embodiment. 画像処理部1209の構成の具体例を示すブロック図である。FIG. 11 is a block diagram illustrating a specific example of a configuration of an image processing unit 1209. 第2の実施の形態にかかる符号化処理を示すフローチャートである。It is a flowchart which shows the encoding process concerning 2nd Embodiment. ステップS2503における画像データの分割処理を示すフローチャートである。16 is a flowchart illustrating image data division processing in step S2503. ステップS2504における排他的論理和の算出処理を示すフローチャートである。It is a flowchart which shows the calculation process of exclusive OR in step S2504. 回転操作を説明する図である。It is a figure explaining rotation operation. 文字画像データの排他的論理和の算出結果を説明する図である。It is a figure explaining the calculation result of the exclusive OR of character image data. テキスト処理装置のハードウェア構成の概略図である。It is the schematic of the hardware constitutions of a text processing apparatus. テキスト処理装置での画像復号処理を示すフローチャートである。It is a flowchart which shows the image decoding process in a text processing apparatus. 第3の実施の形態にかかる画像復号装置の機能構成の具体例を示すブロック図である。It is a block diagram which shows the specific example of a function structure of the image decoding apparatus concerning 3rd Embodiment. 画像処理部3307の構成の具体例を示すブロック図である。FIG. 20 is a block diagram illustrating a specific example of a configuration of an image processing unit 3307. アクセステーブルデータ変換部3305の構成の具体例を示すブロック図である。5 is a block diagram illustrating a specific example of a configuration of an access table data conversion unit 3305. FIG. ステップS4702での、画像復号装置で実行される復号処理を示すフローチャートである。It is a flowchart which shows the decoding process performed with an image decoding apparatus in step S4702. ステップS3402における、グリフ番号への変換処理を示すフローチャートである。It is a flowchart which shows the conversion process to a glyph number in step S3402. ステップS3408における排他的論理和の算出処理を示すフローチャートである。It is a flowchart which shows the calculation process of exclusive OR in step S3408. 第3の実施の形態での、ステップS3409における、分割文字画像データの統合処理を示すフローチャートである。It is a flowchart which shows the integration process of the division | segmentation character image data in step S3409 in 3rd Embodiment. 第4の実施の形態にかかる画像復号装置の機能構成の具体例を示すブロック図である。It is a block diagram which shows the specific example of a function structure of the image decoding apparatus concerning 4th Embodiment. 第4の実施の形態での、ステップS3409における、分割文字画像データの統合処理を示すフローチャートである。It is a flowchart which shows the integration process of the division | segmentation character image data in step S3409 in 4th Embodiment. PC3のハードウェア構成の具体例を示す図である。It is a figure which shows the specific example of the hardware constitutions of PC3. 加工分割文字画像データの追加を説明する図である。It is a figure explaining addition of process division | segmentation character image data. 加工分割文字画像データの追加を説明する図である。It is a figure explaining addition of process division | segmentation character image data. 加工分割文字画像データの追加を説明する図である。It is a figure explaining addition of process division | segmentation character image data. 加工分割文字画像データの追加を説明する図である。It is a figure explaining addition of process division | segmentation character image data.

符号の説明Explanation of symbols

1 携帯電話、2 記録媒体、3 PC、101 CPU、103 ROM、105 RAM、107 ハードディスクドライブ、109 読取部、110 通信部、111 入力部、113 通信部、115 表示部、120 制御部、130 記憶部、140 入出力部、142 キーコード入力デバイス、144 ディスプレイ、146 マイクロフォン、148 スピーカ、149 カメラ、1201 コントローラ、1202 画像データメモリ、1203 加工分割画像データメモリ、1204 エントロピー符号化部、1205 符号化データメモリ、1206 アクセステーブルデータ生成部、1207 アクセステーブルデータメモリ、1208 文字識別情報・グリフ番号対応ルールメモリ、1209 画像処理部、1210 データバス、2201 文字識別情報・グリフ番号変換データ生成部、2202 グリフ番号・オフセット情報変換データ生成部、2203 データバス、2410 フラグデータメモリ、2701 画像演算部、2702 第1文字画像データメモリ、2703 第2文字画像データメモリ、2704 第1分割文字画像データメモリ、2705 第2分割文字画像データメモリ、2706 第1加工分割文字画像データメモリ、2707 第2加工分割文字画像データメモリ、2708 容量予測部、2709 データバス、3301 コントローラ、3302 符号化データメモリ、3303 エントロピー符号復号部、3304 加工分割文字画像データメモリ、3305 アクセステーブルデータ変換部、3306 アクセステーブルデータメモリ、3307 画像処理部、3308 文字画像データメモリ、3309 データバス、3610 フラグデータメモリ、3801 画像演算部、3802 文字画像データメモリ、3803 分割文字画像データメモリ、3804 加工分割文字画像データメモリ、3805 データバス、4600 指示装置、4601 コントローラ、4602 テキストデータメモリ、4603 画像復号装置、4604 表示装置、4606 記憶装置、4605 データバス、4801 画像演算部、4802 文字画像データメモリ、4803 分割文字画像データメモリ、5101 文字識別情報・グリフ番号変換部、5102 グリフ番号・オフセット情報変換部、5103 データバス。   1 mobile phone, 2 recording medium, 3 PC, 101 CPU, 103 ROM, 105 RAM, 107 hard disk drive, 109 reading unit, 110 communication unit, 111 input unit, 113 communication unit, 115 display unit, 120 control unit, 130 storage , 140 input / output unit, 142 key code input device, 144 display, 146 microphone, 148 speaker, 149 camera, 1201 controller, 1202 image data memory, 1203 processed divided image data memory, 1204 entropy encoding unit, 1205 encoded data Memory, 1206 access table data generation unit, 1207 access table data memory, 1208 character identification information / glyph number correspondence rule memory, 1209 image processing unit, 1210 data bus, 201 Character identification information / glyph number conversion data generation unit 2202 Glyph number / offset information conversion data generation unit 2203 Data bus 2410 Flag data memory 2701 Image operation unit 2702 First character image data memory 2703 Second character image Data memory, 2704 first divided character image data memory, 2705 second divided character image data memory, 2706 first processed divided character image data memory, 2707 second processed divided character image data memory, 2708 capacity prediction unit, 2709 data bus, 3301 Controller, 3302 Encoded data memory, 3303 Entropy code decoding unit, 3304 Processed divided character image data memory, 3305 Access table data conversion unit, 3306 Access table data memory, 3307 Image processing unit, 3308 character image data memory, 3309 data bus, 3610 flag data memory, 3801 image operation unit, 3802 character image data memory, 3803 divided character image data memory, 3804 modified divided character image data memory, 3805 data bus, 4600 Pointing device, 4601 controller, 4602 text data memory, 4603 image decoding device, 4604 display device, 4606 storage device, 4605 data bus, 4801 image operation unit, 4802 character image data memory, 4803 divided character image data memory, 5101 character identification information Glyph number conversion unit, 5102 Glyph number / offset information conversion unit, 5103 Data bus.

Claims (17)

画像データに含まれる、文字識別情報で特定される文字画像データを符号化するための画像符号化装置であって、
前記画像データから1文字分ずつの文字画像データを読出す読出手段と、
前記1文字分の文字画像データを、それぞれ、第1の方向のサイズの整数分の1である処理単位のサイズで前記第1の方向に直交する第2の方向に分割し、分割単位画像データを生成する画像分割手段と、
前記分割単位画像データに含まれる、前記第1の方向に平行な第nラインの値と前記第nラインに前記第2の方向に隣接する第(n−1)ラインの値との間のドット位置ごとの差分を所定の方法で算出してn≧1の各ラインについては前記差分を前記第nラインの値とし、第0ライン(n=0のライン)については前記分割単位画像データの第0ラインの値をそのまま用いた加工分割単位画像データを生成する加工分割単位画像データ作成手段と、
前記1文字分ずつの文字画像データから得られた前記加工分割単位画像データを、前記複数の前記文字画像データ分連続させて符号化し、符号化データを生成する符号化手段とを備える、画像符号化装置。
An image encoding device for encoding character image data specified by character identification information included in image data,
And reading reading means the character image data of one character minute from the image data,
The character image data for one character is divided in a second direction orthogonal to the first direction at a processing unit size that is a fraction of an integer of the size in the first direction , and divided unit image data Image segmentation means for generating
Dots between the value of the nth line parallel to the first direction and the value of the (n−1) th line adjacent to the nth line in the second direction , included in the divided unit image data A difference for each position is calculated by a predetermined method, and for each line of n ≧ 1, the difference is set as the value of the nth line, and for the 0th line (n = 0 line), the difference of the divided unit image data. Processing division unit image data creating means for generating processing division unit image data using the value of 0 line as it is;
An image code comprising: encoding means for encoding the processed divided unit image data obtained from the character image data for each character and continuously encoding the plurality of the character image data to generate encoded data Device.
前記1文字分の文字画像データを特定する情報と、前記符号化データ上の前記文字画像データに対応する位置との対応を示すアクセステーブルを生成するアクセステーブル生成手段をさらに備える、請求項1に記載の画像符号化装置。 The apparatus according to claim 1, further comprising: an access table generating unit that generates an access table indicating correspondence between information specifying the character image data for one character and a position corresponding to the character image data on the encoded data. The image encoding device described. 前記文字識別情報は、文字コード、または文字コードおよび書体識別情報を含む、請求項に記載の画像符号化装置。 The image encoding apparatus according to claim 1 , wherein the character identification information includes a character code or a character code and typeface identification information. 前記文字識別情報とグリフとの対応を取得する取得手段をさらに備え、
前記アクセステーブル生成手段は、
前記文字画像データの文字識別情報から内部文字コードを取得する手段と、
取得された前記内部文字コード、および取得された前記文字識別情報とグリフとの対応より、前記内部文字コードに対応するグリフを特定する手段と、
前記符号化データを検索して前記加工分割単位画像データのそれぞれに対応した境界位置を抽出することで、グリフと前記符号化データ上の当該グリフに対応した前記文字識別情報で表わされた前記文字画像データの位置との対応関係を生成するための手段と、
特定された前記グリフより、前記対応関係を参照することで前記符号化データ上の前記文字画像データに対応する位置を特定する手段とを含む、請求項に記載の画像符号化装置。
An acquisition means for acquiring a correspondence between the character identification information and the glyph;
The access table generating means includes
Means for obtaining an internal character code from the character identification information of the character image data;
Means for identifying the glyph corresponding to the internal character code from the correspondence between the acquired internal character code and the acquired character identification information and the glyph;
By searching the encoded data and extracting the boundary position corresponding to each of the processed divided unit image data, the glyph and the character identification information corresponding to the glyph on the encoded data are represented by the character identification information. Means for generating a correspondence with the position of the character image data;
The image encoding apparatus according to claim 1 , further comprising: a unit that specifies a position corresponding to the character image data on the encoded data by referring to the correspondence relationship from the specified glyph.
前記文字画像データから得られる第1分割単位画像データから得られる第1加工分割単位画像データの、前記符号化後のデータ量を算出する算出手段と、
前記文字画像データを90度回転させて回転画像データを生成する回転手段と、
前記回転画像データを前記第1の方向に分割して得られる第2分割単位画像データについて、前記第2分割単位画像データに含まれる前記第nラインの値と前記第(n−1)ラインの値との差分を算出し、前記差分を前記第nラインの値とした第2加工分割単位画像データの、前記符号化後のデータ量を予測する予測手段とをさらに備え、
前記符号化手段は、前記第1加工分割単位画像データと前記第2加工分割単位画像データとのうち、前記符号化後のデータ量が小さい方の加工分割単位画像データを符号化する、請求項1に記載の画像符号化装置。
Calculating means for calculating the encoded data amount of the first processed divided unit image data obtained from the first divided unit image data obtained from the character image data;
Rotating means for rotating the character image data by 90 degrees to generate rotated image data;
Regarding the second divided unit image data obtained by dividing the rotated image data in the first direction, the value of the nth line and the (n−1) th line included in the second divided unit image data. A prediction means for calculating a data amount after the encoding of the second processed divided unit image data using the difference as a value of the n-th line.
The encoding means encodes the processed divided unit image data having a smaller data amount after the encoding among the first processed divided unit image data and the second processed divided unit image data. 2. The image encoding device according to 1.
前記符号化手段において、前記第1加工分割単位画像データと前記第2加工分割単位画像データとのいずれの加工分割単位画像データを符号化したのかを示す情報を生成する手段をさらに備える、請求項に記載の画像符号化装置。 The said encoding means is further provided with a means to produce | generate the information which shows which process division unit image data of the said 1st process division unit image data and the said 2nd process division unit image data were encoded. 5. The image encoding device according to 5. 請求項1〜6のいずれかに記載の画像符号化装置によって生成された符号化データに対して復号処理を実行して、1文字分の文字画像データを得るための画像復号装置であって、
前記1文字分の文字画像データを特定する情報を取得する取得手段と、
文字画像データを特定する情報と、符号化データ上の前記文字画像データに対応する位置との対応を示すアクセステーブルにアクセスし、取得された前記文字画像データを特定する情報に対応した、前記符号化データ上の位置を特定する特定手段と、
前記画像符号化装置によって複数の文字画像データを連続して符号化処理することで生成された、前記符号化データ上の、特定された前記位置にあるデータを復号して、複数の加工分割単位画像データを生成する復号手段と、
各々の分割単位画像データの第(n−1)ラインの値と、各々の前記加工分割単位画像データの第nラインの値とを用いて、各々の前記分割単位画像データの第nラインの値を算出し、前記複数の加工分割単位画像データから、各々、分割単位画像データを生成する作成手段と、
前記作成手段で前記複数の加工分割単位画像データから作成された複数の前記分割単位画像データを統合して前記1文字分の文字画像データを生成する統合手段とを備える、画像復号装置。
An image decoding device for executing a decoding process on the encoded data generated by the image encoding device according to claim 1 to obtain character image data for one character,
Obtaining means for obtaining information specifying the character image data for one character ;
The code corresponding to the information specifying the character image data obtained by accessing the access table indicating the correspondence between the information specifying the character image data and the position corresponding to the character image data on the encoded data Specifying means for specifying the position on the data,
A plurality of processing division units are decoded by decoding data at the specified position on the encoded data , which is generated by continuously encoding a plurality of character image data by the image encoding device. Decoding means for generating image data;
The value of the nth line of each of the divided unit image data using the value of the (n−1) th line of each of the divided unit image data and the value of the nth line of each of the processed divided unit image data. Generating means for generating divided unit image data from each of the plurality of processed divided unit image data;
An image decoding apparatus comprising: an integration unit that integrates a plurality of the division unit image data created from the plurality of processed division unit image data by the creation unit to generate character image data for one character .
前記文字画像データが符号化時に90度回転されたものであるか否かを示す情報にアクセスし、前記文字画像データが符号化時に90度回転されたものである場合、前記文字画像データを前記符号化時の前記回転の向きに対して逆向きに90度回転させる手段をさらに備える、請求項に記載の画像復号装置。 If the character image data to access the information indicating whether or not that is rotated 90 degrees at the time of encoding, the character image data were rotated 90 degrees at the time of coding, the said character image data The image decoding apparatus according to claim 7 , further comprising means for rotating 90 degrees in the opposite direction to the direction of rotation at the time of encoding. 請求項またはに記載の画像復号装置を搭載する、携帯電話。 A mobile phone equipped with the image decoding device according to claim 7 or 8 . 画像符号化装置において画像データに含まれる、文字識別情報で特定される文字画像データを符号化する方法であって、
前記画像データから1文字分ずつの文字画像データを読出す読出ステップと、
前記1文字分の文字画像データを、それぞれ、第1の方向のサイズの整数分の1である処理単位のサイズで前記第1の方向に直交する第2の方向に分割し、分割単位画像データを生成する画像分割ステップと、
前記分割単位画像データに含まれる、前記第1の方向に平行な第nラインの値と前記第nラインに前記第2の方向に隣接する第(n−1)ラインの値との間のドット位置ごとの差分を所定の方法で算出してn≧1の各ラインについては前記差分を前記第nラインの値とし、第0ライン(n=0のライン)については前記分割単位画像データの第0ラインの値をそのまま用いた加工分割単位画像データを生成する加工分割単位画像データ作成ステップと、
前記1文字分ずつの文字画像データから得られた前記加工分割単位画像データを、前記複数の前記文字画像データ分連続させて符号化し、符号化データを生成する符号化ステップとを備える、画像符号化方法。
In the image coding apparatus, it included in the image data, character image data specified by the character identification information A method of encoding,
A reading step of reading character image data for each character from the image data;
The character image data for one character is divided in a second direction orthogonal to the first direction at a processing unit size that is a fraction of an integer of the size in the first direction , and divided unit image data An image segmentation step for generating
Dots between the value of the nth line parallel to the first direction and the value of the (n−1) th line adjacent to the nth line in the second direction , included in the divided unit image data A difference for each position is calculated by a predetermined method, and for each line of n ≧ 1, the difference is set as the value of the nth line, and for the 0th line (n = 0 line), the difference of the divided unit image data. A processing division unit image data creation step for generating processing division unit image data using the value of 0 line as it is,
An encoding step of encoding the processed division unit image data obtained from the character image data for each character and continuously encoding the plurality of the character image data to generate encoded data. Method.
前記文字画像データから得られる第1分割単位画像データから得られる第1加工分割単位画像データの、前記符号化後のデータ量を算出する算出ステップと、
前記文字画像データを90度回転させて回転画像データを生成する回転ステップと、
前記回転画像を前記第1の方向に分割して得られる第2分割単位画像データについて、前記第2分割単位画像データに含まれる前記第nラインの値と前記第(n−1)ラインの値との差分を算出し、前記差分を前記第nラインの値とした第2加工分割単位画像データの、前記符号化後のデータ量を予測する予測ステップとをさらに備え、
前記符号化ステップにおいては、前記第1加工分割単位画像データと前記第2加工分割単位画像データとのうち、前記符号化後のデータ量が小さい方の加工分割単位画像データを符号化する、請求項10に記載の画像符号化方法。
A calculation step of calculating the encoded data amount of the first processed divided unit image data obtained from the first divided unit image data obtained from the character image data;
A rotation step of rotating the character image data by 90 degrees to generate rotated image data;
Regarding the second divided unit image data obtained by dividing the rotated image in the first direction, the value of the nth line and the value of the (n−1) th line included in the second divided unit image data. A prediction step of predicting the encoded data amount of the second processed division unit image data using the difference as the value of the n-th line,
In the encoding step, of the first processed division unit image data and the second processed division unit image data, the processed divided unit image data having a smaller data amount after the encoding is encoded. Item 15. The image encoding method according to Item 10 .
請求項11または12に記載の画像符号化方法によって複数の文字画像データを連続して符号化処理することで生成された符号化データに対して復号処理を実行して、1文字分の文字画像データを得る方法であって、
前記1文字分の文字画像データを特定する情報を取得する取得ステップと、
文字画像データを特定する情報と、符号化データ上の前記文字画像データに対応する位置との対応を示すアクセステーブルにアクセスし、取得された前記文字画像データを特定する情報に対応した、前記符号化データ上の位置を特定する特定ステップと、
前記画像符号化方法によって複数の文字画像データを連続して符号化処理することで生成された前記符号化データ上の、特定された前記位置にあるデータを復号して、複数の加工分割単位画像データを生成する復号ステップと、
各々の分割単位画像データの第(n−1)ラインの値と、各々の前記加工分割単位画像データの第nラインの値とを用いて、各々の前記分割単位画像データの第nラインの値を算出し、前記複数の加工分割単位画像データから、各々、分割単位画像データを生成する作成ステップと、
前記作成ステップにおいて前記複数の加工分割単位画像データから作成された複数の前記分割単位画像データを統合して前記1文字分の文字画像データを生成する統合ステップとを備える、画像復号方法。
A character image for one character by performing a decoding process on the encoded data generated by continuously encoding a plurality of character image data by the image encoding method according to claim 11 or 12. A method of obtaining data ,
An acquisition step of acquiring information specifying the character image data for one character ;
The code corresponding to the information specifying the character image data obtained by accessing the access table indicating the correspondence between the information specifying the character image data and the position corresponding to the character image data on the encoded data A specific step of identifying a position on the data,
By decoding the data at the specified position on the encoded data generated by sequentially encoding a plurality of character image data by the image encoding method , a plurality of processed division unit images A decryption step for generating data;
The value of the nth line of each of the divided unit image data using the value of the (n−1) th line of each of the divided unit image data and the value of the nth line of each of the processed divided unit image data. And a creation step of generating divided unit image data from each of the plurality of processed divided unit image data,
An image decoding method comprising: an integration step of generating character image data for one character by integrating the plurality of division unit image data generated from the plurality of processed division unit image data in the generation step.
前記文字画像データが符号化時に90度回転されたものであるか否かを示す情報にアクセスし、前記文字画像データが符号化時に90度回転されたものである場合、前記文字画像データを前記符号化時の前記回転の向きに対して逆向きに90度回転させるステップをさらに備える、請求項12に記載の画像復号方法。 If the character image data to access the information indicating whether or not that is rotated 90 degrees at the time of encoding, the character image data were rotated 90 degrees at the time of coding, the said character image data The image decoding method according to claim 12 , further comprising a step of rotating 90 degrees in the opposite direction to the direction of rotation at the time of encoding. 画像データに含まれる、文字識別情報で特定される文字画像データを符号化する処理をコンピュータに実行させるプログラムであって、
前記画像データから1文字分ずつの文字画像データを読出す読出ステップと、
前記1文字分の文字画像データを、それぞれ、第1の方向のサイズの整数分の1である処理単位のサイズで前記第1の方向に直交する第2の方向に分割し、分割単位画像データを生成する画像分割ステップと、
前記分割単位画像データに含まれる、前記第1の方向に平行な第nラインの値と前記第nラインに前記第2の方向に隣接する第(n−1)ラインの値との間のドット位置ごとの差分を所定の方法で算出してn≧1の各ラインについては前記差分を前記第nラインの値とし、第0ライン(n=0のライン)については前記分割単位画像データの第0ラインの値をそのまま用いた加工分割単位画像データを生成する加工画像作成ステップと、
前記1文字分ずつの文字画像データから得られた前記加工分割単位画像データを、前記複数の前記文字画像データ分連続させて符号化し、符号化データを生成する符号化ステップとを実行させる、画像符号化プログラム。
A program for causing a computer to execute processing for encoding character image data specified by character identification information included in image data,
A reading step of reading character image data for each character from the image data;
The character image data for one character is divided in a second direction orthogonal to the first direction at a processing unit size that is a fraction of an integer of the size in the first direction , and divided unit image data An image segmentation step for generating
Dots between the value of the nth line parallel to the first direction and the value of the (n−1) th line adjacent to the nth line in the second direction , included in the divided unit image data A difference for each position is calculated by a predetermined method, and for each line of n ≧ 1, the difference is set as the value of the nth line, and for the 0th line (n = 0 line), the difference of the divided unit image data. A processed image creation step for generating processed division unit image data using the value of 0 line as it is;
An encoding step of encoding the processed division unit image data obtained from the character image data for each character and continuously encoding the plurality of the character image data to generate encoded data; Encoding program.
前記文字画像データから得られる第1分割単位画像データから得られる第1加工分割単位画像データの、前記符号化後のデータ量を算出する算出ステップと、
前記文字画像データを90度回転させて回転画像データを生成する回転ステップと、
前記回転画像データを前記第1の方向に分割して得られる第2分割単位画像データについて、前記第2分割単位画像データに含まれる前記第nラインの値と前記第(n−1)ラインの値との差分を算出し、前記差分を前記第nラインの値とした第2加工分割単位画像データの、前記符号化後のデータ量を予測する予測ステップとをさらに実行させ、
前記符号化ステップにおいては、前記第1加工分割単位画像データと前記第2加工分割単位画像データとのうち、前記符号化後のデータ量が小さい方の加工分割単位画像データを符号化する、請求項14に記載の画像符号化プログラム。
A calculation step of calculating the encoded data amount of the first processed divided unit image data obtained from the first divided unit image data obtained from the character image data;
A rotation step of rotating the character image data by 90 degrees to generate rotated image data;
Regarding the second divided unit image data obtained by dividing the rotated image data in the first direction, the value of the nth line and the (n−1) th line included in the second divided unit image data. A prediction step of calculating a data amount after the encoding of the second processed divided unit image data using the difference as the value of the nth line,
In the encoding step, of the first processed division unit image data and the second processed division unit image data, the processed divided unit image data having a smaller data amount after the encoding is encoded. Item 15. The image encoding program according to Item 14 .
請求項15または16に記載の画像符号化プログラムを実行することによって複数の文字画像データを連続して符号化処理することで生成された符号化データに対して復号処理を実行して、1文字分の文字画像データを得る処理をコンピュータに実行させるプログラムであって、
前記1文字分の文字画像データを特定する情報を取得する取得ステップと、
文字画像データを特定する情報と、符号化データ上の前記文字画像データに対応する位置との対応を示すアクセステーブルにアクセスし、取得された前記文字画像データを特定する情報に対応した、前記符号化データ上の位置を特定する特定ステップと、
前記画像符号化プログラムを実行することによって複数の文字画像データを連続して符号化処理することで生成された前記符号化データ上の、特定された前記位置にあるデータを復号して、複数の加工分割単位画像データを生成する復号ステップと、
各々の分割単位画像データの第(n−1)ラインの値と、各々の前記加工分割単位画像データの第nラインの値とを用いて、各々の前記分割単位画像データの第nラインの値を算出し、前記複数の加工分割単位画像データから、各々、分割単位画像データを生成する作成ステップと、
前記作成ステップにおいて前記複数の加工分割単位画像データから作成された複数の前記分割単位画像データを統合して前記1文字分の文字画像データを生成する統合ステップとを実行させる、画像復号プログラム。
One character is obtained by executing a decoding process on encoded data generated by continuously encoding a plurality of character image data by executing the image encoding program according to claim 15 or 16. A program for causing a computer to execute processing for obtaining character image data of minutes ,
An acquisition step of acquiring information specifying the character image data for one character ;
The code corresponding to the information specifying the character image data obtained by accessing the access table indicating the correspondence between the information specifying the character image data and the position corresponding to the character image data on the encoded data A specific step of identifying a position on the data,
By decoding the data at the specified position on the encoded data generated by sequentially encoding a plurality of character image data by executing the image encoding program , A decoding step for generating processing division unit image data;
The value of the nth line of each of the divided unit image data using the value of the (n−1) th line of each of the divided unit image data and the value of the nth line of each of the processed divided unit image data. And a creation step of generating divided unit image data from each of the plurality of processed divided unit image data,
An image decoding program that executes an integration step of generating a character image data for one character by integrating a plurality of the division unit image data generated from the plurality of processed division unit image data in the generation step.
前記文字画像データが符号化時に90度回転されたものであるか否かを示す情報にアクセスし、前記文字画像データが符号化時に90度回転されたものである場合、前記文字画像データを前記符号化時の前記回転の向きに対して逆向きに90度回転させるステップをさらに実行させる、請求項16に記載の画像復号プログラム。 If the character image data to access the information indicating whether or not that is rotated 90 degrees at the time of encoding, the character image data were rotated 90 degrees at the time of coding, the said character image data The image decoding program according to claim 16 , further comprising a step of rotating 90 degrees in the opposite direction to the direction of rotation at the time of encoding.
JP2006268149A 2006-09-29 2006-09-29 Image encoding device, image decoding device, mobile phone, image encoding method, image decoding method, image encoding program, and image decoding program Expired - Fee Related JP4757162B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006268149A JP4757162B2 (en) 2006-09-29 2006-09-29 Image encoding device, image decoding device, mobile phone, image encoding method, image decoding method, image encoding program, and image decoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006268149A JP4757162B2 (en) 2006-09-29 2006-09-29 Image encoding device, image decoding device, mobile phone, image encoding method, image decoding method, image encoding program, and image decoding program

Publications (2)

Publication Number Publication Date
JP2008092089A JP2008092089A (en) 2008-04-17
JP4757162B2 true JP4757162B2 (en) 2011-08-24

Family

ID=39375797

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006268149A Expired - Fee Related JP4757162B2 (en) 2006-09-29 2006-09-29 Image encoding device, image decoding device, mobile phone, image encoding method, image decoding method, image encoding program, and image decoding program

Country Status (1)

Country Link
JP (1) JP4757162B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230229401A1 (en) * 2022-01-18 2023-07-20 Robert Lyden Computer language and code for application development and electronic and optical communication

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6447171A (en) * 1987-08-18 1989-02-21 Sanyo Electric Co System for coding picture data
JPH0870459A (en) * 1994-08-29 1996-03-12 Fuji Xerox Co Ltd Image data compressing device
JP3850006B2 (en) * 1999-04-05 2006-11-29 株式会社東芝 Image processing apparatus and image forming apparatus
JP2002300408A (en) * 2001-03-30 2002-10-11 Toshiba Corp Unit and method for filing image, and unit and method for recovering the image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230229401A1 (en) * 2022-01-18 2023-07-20 Robert Lyden Computer language and code for application development and electronic and optical communication
US11809839B2 (en) * 2022-01-18 2023-11-07 Robert Lyden Computer language and code for application development and electronic and optical communication

Also Published As

Publication number Publication date
JP2008092089A (en) 2008-04-17

Similar Documents

Publication Publication Date Title
US9363309B2 (en) Systems and methods for compressing packet data by predicting subsequent data
CN115918088A (en) Point cloud compression using octree with slices
US7958133B2 (en) Application conversion of source data
KR102606241B1 (en) Compressor and Method for Variable-Rate Texture Compression
US9058638B2 (en) Super resolution encoding screens that minimize affects of lossy compression and data variations
JP2022037900A (en) Parallel decompression of compressed data streams
US20200076924A1 (en) Security-oriented compression
US20040233197A1 (en) System and method for ink or handwriting compression
KR20030072574A (en) Large character set browser
CN111726615B (en) Point cloud coding and decoding method and coder-decoder
JP4757162B2 (en) Image encoding device, image decoding device, mobile phone, image encoding method, image decoding method, image encoding program, and image decoding program
US8928660B2 (en) Progressive mesh decoding apparatus and method
CN114328898A (en) Text abstract generating method and device, equipment, medium and product thereof
JP4776489B2 (en) Image encoding device, image decoding device, image encoding program, image decoding program, image encoding method, and image decoding method
CN1386247A (en) Generation and coding of animated images
US6624769B2 (en) Apparatus, and associated method, for communicating content in a bandwidth-constrained communication system
JPH10271013A (en) Compression method for data, compression method for picture data and compression device
JP2001502485A (en) Lossless compression and decompression of bitmaps
US6861963B1 (en) Encoding conversion fallback
JP2008124632A (en) Image encoding apparatus, image decoding apparatus, image encoding method, image decoding method, image encoding program, image decoding program, recording medium recording image encoding program, and recording medium recording image decoding program
CN116661707B (en) Data processing method and device and electronic equipment
US11928134B1 (en) Medoid-based data compression
WO2020187191A1 (en) Point cloud encoding and decoding method and codec
JP2003189108A (en) Image compression method
CN110825936B (en) Method, system and storage medium for generating reverse index and searching by reverse index

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090911

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110308

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110427

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110531

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

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees