JP4068199B2 - Image processing method, image processing system to which the method is applied, and recording medium - Google Patents

Image processing method, image processing system to which the method is applied, and recording medium Download PDF

Info

Publication number
JP4068199B2
JP4068199B2 JP34937097A JP34937097A JP4068199B2 JP 4068199 B2 JP4068199 B2 JP 4068199B2 JP 34937097 A JP34937097 A JP 34937097A JP 34937097 A JP34937097 A JP 34937097A JP 4068199 B2 JP4068199 B2 JP 4068199B2
Authority
JP
Japan
Prior art keywords
data
image data
register
rotation
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 - Lifetime
Application number
JP34937097A
Other languages
Japanese (ja)
Other versions
JPH11185032A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP34937097A priority Critical patent/JP4068199B2/en
Publication of JPH11185032A publication Critical patent/JPH11185032A/en
Application granted granted Critical
Publication of JP4068199B2 publication Critical patent/JP4068199B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は画像処理方法および同方法が適用される画像処理システム並びに記録媒体に関し、特にコンピュータを用いて2値画像の回転などの処理を行う画像処理方法および同方法が適用される画像処理システム並びに記録媒体に関する。
【0002】
【従来の技術】
近年、ペーパーレスの推進や、コンピュータを用いた画像処理技術の発展に伴い、文字のみならず、文字と図面などの画像とが混在した文書データの管理・運用が進められており、企業間や官公庁との間で受け渡される文書についても、文字と画像を含む文書データの流通が開始されている。
【0003】
この場合、図面データのサイズは文書の書式に合わせて規定されることが多く、例えば、文書書式としてA4縦長の用紙が用いられる場合には、図面データについてもそのA4縦長の用紙に収まるようなサイズが求められる。一方、図面データの向きについては特に定められておらず、A4用紙を横および縦のどちらの向きに配することも可能である。このため、流通文書の中には、文書の書式として用いられる例えば縦長のA4用紙上に横書きで書かれた図面データと、縦書きで書かれた図面データとが混在している文書が多数存在する。
【0004】
このような図面データをコンピュータの画面上に表示して参照する場合には、その図面データが横書きであるか横書きかであるかに応じてその画像の向きを90度回転させることが必要となる。特に、同一文書に複数の図面データが挿入されている場合には、図面毎にその向きが異なることもあるので、画像の回転処理は比較的頻繁に行われる。したがって、画像の回転処理を高速に行うことが要求されている。
【0005】
コンピュータを用いた従来の典型的な画像回転処理方法について以下説明する。
ここでは、図4に示されているように、横Wバイト、縦8Hラインのピクセルサイズを有する2値画像をソースデータとしてメモリから読み出し、これを90度回転してデスティネーションデータとしてメモリに格納する場合を想定する。
【0006】
この場合のアルゴリズムの全体の流れは次の通りである。

Figure 0004068199
このアルゴリズムは、ソースデータを左上から右上に向けて走査しながら8ドットx8ドットのデータ単位でそのソースデータの読み出しおよび回転処理を順次行い、その回転結果をデスティネーションデータの左下から左上に向けて順次書き込んでいくという処理を、ソースデータの縦方向サイズ分だけ繰り返し行うというものである。
【0007】
ここで、「CPUレジスタ内での回転処理」の部分の詳細を以下に示す。
CPUレジスタ(バイト)r0、r2、r3、r4、r5、r6、r7にそれぞれ、
アドレスsource_addressのデータ(a0,a1,a2,a3,a4,a5,a6,a7),
source_address+Wのデータ(b0,b1,b2,b3,b4,b5,b6,b7),
source_address+2Wのデータ(c0,c1,c2,c3,c4,c5,c6,c7),
source_address+3Wのデータ(d0,d1,d2,d3,d4,d5,d6,d7),
source_address+4Wのデータ(e0,e1,e2,e3,e4,e5,e6,e7),
source_address+5Wのデータ(f0,f1,f2,f3,f4,f5,f6,f7),
source_address+6Wのデータ(g0,g1,g2,g3,g4,g5,g6,g7),
source_address+7Wのデータ(h0,h1,h2,h3,h4,h5,h6,h7) が入っており、
そして、
アドレスdestination_address のデータ(a0,b0,c0,d0,e0,f0,g0,h0),
destination_address-H のデータ(a1,b1,c1,d1,e1,f1,g1,h1),
destination_address-2Hのデータ(a2,b2,c2,d2,e2,f2,g2,h2),
destination_address-3Hのデータ(a3,b3,c3,d3,e3,f3,g3,h3),
destination_address-4Hのデータ(a4,b4,c4,d4,e4,f4,g4,h4),
destination_address-5Hのデータ(a5,b5,c5,d5,e5,f5,g5,h5),
destination_address-6Hのデータ(a6,b6,c6,d6,e6,f6,g6,h6),
destination_address-7Hのデータの(a7,b7,c7,d7,e7,f7,g7,h7),
をそれぞれCPUレジスタ(バイト)r8、r9、r10、r11、r12、r13、r14、r15に作成するとする。
【0008】
この場合、8ドットx8ドットの64ビットの画像データの回転は次のアルゴリズムによって行われる。
start
rotate left with carry r0
rotate left with carry r8
rotate left with carry r1
rotate left with carry r8
rotate left with carry r2
rotate left with carry r8
rotate left with carry r3
rotate left with carry r8
rotate left with carry r4
rotate left with carry r8
rotate left with carry r5
rotate left with carry r8
rotate left with carry r6
rotate left with carry r8
rotate left with carry r7
rotate left with carry r8
以下同様にr9からr15にデータを転送
end
ここで「rotate left with carry」の処理を図6に示す。
【0009】
「rotate left with carry」の処理では、転送元のレジスタのデータ(a0,a1,a2,a3,a4,a5,a6,a7)が1ビットシフトされ、その先頭の1ビットが転送先のレジスタのLSB側から入力される。
【0010】
したがって、上記の回転アルゴリズムでは、2ステップを1組としてソースからデスティネーションへのデータ転送が1ビット単位で行われる。
すなわち、デスティネーションデータの左下から右下に向かって8ビットまでのデータを格納するために用いられるレジスタ(r8)の内容は、次のように変化する。
【0011】
(1) rotate left with carry r0
(2) rotate left with carry r8
によって、レジスタ(r8)にレジスタ(r0)の先頭の1ビットデータ(a0)が設定される。
【0012】
(3) rotate left with carry r1
(4) rotate left with carry r8
によって、レジスタ(r8)にレジスタ(r1)の先頭の1ビットデータ(b0)が追加設定される。
【0013】
(5) rotate left with carry r2
(6) rotate left with carry r8
によって、レジスタ(r8)にレジスタ(r2)の先頭の1ビットデータ(c0)が追加設定される。
【0014】
(7) rotate left with carry r3
(8) rotate left with carry r8
によって、レジスタ(r8)にレジスタ(r3)の先頭の1ビットデータ(d0)が追加設定される。
【0015】
(9) rotate left with carry r4
(10) rotate left with carry r8
によって、レジスタ(r8)にレジスタ(r4)の先頭の1ビットデータ(e0)が追加設定される。
【0016】
(11) rotate left with carry r5
(12) rotate left with carry r8
によって、レジスタ(r8)にレジスタ(r5)の先頭の1ビットデータ(f0)が追加設定される。
【0017】
(13) rotate left with carry r6
(14) rotate left with carry r8
によって、レジスタ(r8)にレジスタ(r6)の先頭の1ビットデータ(g0)が追加設定される。
【0018】
(15) rotate left with carry r7
(16) rotate left with carry r8
によって、レジスタ(r8)にレジスタ(r7)の先頭の1ビットデータ(h0)が追加設定される。
【0019】
これにより、レジスタ(r8)の内容はa0,b0,c0,d0,e0,f0,g0,h0 となる。
以下同様にして、レジスタ(r 9)から(r 15)についても同様の処理が行われる。したがって、8ビットのデータ毎に16ステップの処理が必要となるので、8x8ドットの画像の回転に128ステップ(=16x8)要することになる。
【0020】
【発明が解決しようとする課題】
上述したように、従来の画像回転処理では1ビットずつの処理となっているため、8x8ドットの画像の回転に128ステップもの演算が必要となり、画像の回転に多くの時間が必要とされるという問題があった。
【0021】
本発明はこのような点に鑑みてなされたものであり、回転などの画像変換処理の処理前と処理後のデータ間には画素が一致する点が何点かあることに着眼し、1ビットずつの処理ではなく何ビットかを同時に処理できるようにし、回転などの画像処理を高速に行うことができる画像処理方法および同方法が適用される画像処理システム並びに記録媒体を提供することを目的とする。
【0022】
【課題を解決するための手段】
上述の課題を解決するため、本発明は、処理対象画像をmxn画素の画像データ単位で処理して前記処理対象画像の変換画像を生成する画像処理方法において、処理前の画像データと処理後の画像データとの間のデータ配列の一致点に基づいて、前記処理前のmxn画素の画像データのデータ列中から前記一致点に対応する画素データを抽出し、前記処理前の画像データのデータ列をシフトさせながら、前記抽出処理を繰り返し実行することを特徴とする。
【0023】
この画像処理方法によれば、例えば回転や鏡像などの処理を行う場合には、処理前の画像データと処理後の画像データとの間のデータ配列の一致点に基づいて予め準備されたマスクデータなどを用いることにより、処理前のmxn画素の画像データのデータ列中から一致点に対応する画素データが何画素か単位で同時に抽出される。このように、処理前と処理後の画像データ間の変換規則を利用して処理前データから各一致点に対応する画素データを同時に抽出する処理を行うことにより、1ビットずつの処理ではなく、何ビットか単位で同時に画像処理のための演算を行うことが可能となり、回転などの画像処理を高速に行うことが可能となる。
【0024】
特に、マスクデータを用いた抽出処理は、mxnビット幅以上のレジスタを用いた演算処理を用いて行うことが好ましい。これにより、より多くの一致点について同時に処理を行うことが可能となる。
【0025】
【発明の実施の形態】
以下、図面を参照して本発明の実施形態を説明する。
図1には、本発明の一実施形態に係る画像処理システムのシステム構成が示されている。この画像処理システムは、画像処理プログラムが実装されたパーソナルコンピュータやワークステーションなどのコンピュータによって実現されるものであり、CPU11、主メモリ12、表示コントローラ13、画像メモリ(VRAM)14、ディスプレイモニタ15、およびハードディスクなどのファイル記憶装置16から構成される。
【0026】
CPU11は、主メモリ12にロードされた画像処理プログラムを実行することにより、文字および画面などの画像が混在した文書データをファイル記憶装置16から読み出し、それを表示コントローラ13を用いてディスプレイモニタ15上に表示する。画像処理プログラムには、画面表示された画像に対して回転、鏡像変換などの変換処理を施すための各種編集ツールが用意されており、その画像変換のための演算処理はCPU11による64ビット演算によって実行される。
【0027】
画像の回転処理の基本手順は、主メモリ12上の処理対象画像を転送元アドレスで指定される8x8画素のブロック単位で切り出し、その8x8画素の画像データを回転させた後に、それを主メモリ12上の転送先アドレスで指定される位置に書き込むことによって行われる。この場合、CPU11によって行われる8x8ドットの画像データの回転処理は、回転前データと回転後データのデータ配列の一致点を有効利用することによって、次のように行われる。
【0028】
すなわち、まず、回転前と回転後の画像データとの間のデータ配列の一致点に基づいて回転前データから各一致点に対応する画素データを抽出するためのマスクデータが準備される(ステップS101)。
【0029】
次いで、回転前データとマスクデータとの演算処理により、回転前データから各一致点に対応する画素データが回転後データとして抽出される(ステップS102)。次いで、回転前データをシフトさせながら、回転前データから画素データを抽出する処理(ステップS103)およびその抽出結果に基づく回転後データのデータ更新(ステップS104)が繰り返し実行される。
【0030】
このように、回転前と回転後の画像データ間の変換規則を利用して回転前データから各一致点に対応する画素データを同時に抽出する処理を行うことにより、1ビットずつの処理ではなく、何ビットか単位で同時に画像処理のための演算を行うことが可能となり、回転処理を高速に行うことが可能となる。
【0031】
次に、図2を参照して、本実施形態の画像回転処理の手順を具体的に説明する。
以下では、図4および図5で前述したように、横Wバイト、縦8Hラインのピクセルサイズを有する2値画像をソースデータとして主メモリ12から読み出し、これを90度左に回転してデスティネーションデータとして主メモリ12に格納する場合を想定する。
【0032】
この場合のアルゴリズムの全体の流れは次の通りである。
Figure 0004068199
このアルゴリズムは、ソースデータを左上から右上に向けて走査しながら8ドットx8ドットのデータ単位でそのソースデータの読み出しおよび回転処理を順次行い、その回転結果をデスティネーションデータの左下から左上に向けて順次書き込んでいくという処理を、ソースデータの縦方向サイズ分だけ繰り返し行うというものである。
【0033】
ここで、「CPUレジスタ内での回転処理」の部分の詳細を以下に示す。
CPU11の64ビットレジスタR0のビット63−56、55−48、47−40、39−32、31−24、23−16、15−8、7−0にそれぞれ、
アドレスsource_addressのデータ(a0,a1,a2,a3,a4,a5,a6,a7),
source_address+Wのデータ(b0,b1,b2,b3,b4,b5,b6,b7),
source_address+2Wのデータ(c0,c1,c2,c3,c4,c5,c6,c7),
source_address+3Wのデータ(d0,d1,d2,d3,d4,d5,d6,d7),
source_address+4Wのデータ(e0,e1,e2,e3,e4,e5,e6,e7),
source_address+5Wのデータ(f0,f1,f2,f3,f4,f5,f6,f7),
source_address+6Wのデータ(g0,g1,g2,g3,g4,g5,g6,g7),
source_address+7Wのデータ(h0,h1,h2,h3,h4,h5,h6,h7) が入っており、
そして、
アドレスdestination_address のデータ(a0,b0,c0,d0,e0,f0,g0,h0),
destination_address-H のデータ(a1,b1,c1,d1,e1,f1,g1,h1),
destination_address-2Hのデータ(a2,b2,c2,d2,e2,f2,g2,h2),
destination_address-3Hのデータ(a3,b3,c3,d3,e3,f3,g3,h3),
destination_address-4Hのデータ(a4,b4,c4,d4,e4,f4,g4,h4),
destination_address-5Hのデータ(a5,b5,c5,d5,e5,f5,g5,h5),
destination_address-6Hのデータ(a6,b6,c6,d6,e6,f6,g6,h6),
destination_address-7Hのデータの(a7,b7,c7,d7,e7,f7,g7,h7),
を、それぞれCPU11の64ビットレジスタR1のビット63−56、55−48、47−40、39−32、31−24、23−16、15−8、7−0に作成するとする。
【0034】
この場合、回転前後のビット配置は図2の様になる。このときビット配置を見ると移動していないビット(a0、b1、c2、d3、e4、f5、g6、h7)が存在する。また、図3の様に元データ(source)を7ビット右シフトすると、同様にビット配置の一致するビット(a1、b2、c3、d4、e5、f6、g7)が存在する。本実施形態では、このような一致点を利用して一度に何点かが同時に処理される。
【0035】
作業用のCPUレジスタ(64ビット)をR2とすると、8ドットx8ドットの64ビットの画像データの回転は次のアルゴリズムによって行われる。
start
(1) R0をR1にコピー
(2) R1 AND マスクデータ8040201008040201(h) をR1に格納
(3) R0をR2にコピー
(4) R2を7ビット右シフト
(5) R2 AND マスクデータ0080402010080402(h) をR2に格納
(6) R1 OR R2をR1に格納
(7) R0をR2にコピー
(8) R2を14ビット右シフト
(9) R2 AND マスクデータ0000804020100804(h) をR2に格納
(10) R1 OR R2 をR1に格納
(11) R0 をR2にコピー
(12) R2 を21ビット右シフト
(13) R2 AND マスクデータ0000008040201008(h) をR2に格納
(14) R1 OR R2 をR1に格納
(15) R0 をR2にコピー
(16) R2 を28ビット右シフト
(17) R2 AND マスクデータ0000000080402010(h) をR2に格納
(18) R1 OR R2 をR1に格納
(19) R0 をR2にコピー
(20) R2 を35ビット右シフト
(21) R2 AND マスクデータ0000000000804020(h) をR2に格納
(22) R1 OR R2 をR1に格納
(23) R0 をR2にコピー
(24) R2 を42ビット右シフト
(25) R2 AND マスクデータ0000000000008040(h) をR2に格納
(26) R1 OR R2 をR1に格納
(27) R0 をR2にコピー
(28) R2 を49ビット右シフト
(29) R2 AND マスクデータ0000000000000080(h) をR2に格納
(30) R1 OR R2 をR1に格納
(31) R0 をR2にコピー
(32) R2 を49ビット左シフト
(33) R2 AND マスクデータ0100000000000000(h) をR2に格納
(34) R1 OR R2 をR1に格納
(35) R0 をR2にコピー
(36) R2 を42ビット左シフト
(37) R2 AND マスクデータ0201000000000000(h) をR2に格納
(38) R1 OR R2 をR1に格納
(39) R0 をR2にコピー
(40) R2 を35ビット左シフト
(41) R2 AND マスクデータ0402010000000000(h) をR2に格納
(42) R1 OR R2 をR1に格納
(43) R0 をR2にコピー
(44) R2 を28ビット左シフト
(45) R2 AND マスクデータ0804020100000000(h) をR2に格納
(46) R1 OR R2 をR1に格納
(47) R0 をR2にコピー
(48) R2 を21ビット左シフト
(49) R2 AND マスクデータ1008040201000000(h) をR2に格納
(50) R1 OR R2 をR1に格納
(51) R0 をR2にコピー
(52) R2 を14ビット左シフト
(53) R2 AND マスクデータ2010080402010000(h) をR2に格納
(54) R1 OR R2 をR1に格納
(55) R0 を7ビット左シフト
(56) R0 AND マスクデータ4020100804020100(h) をR0に格納
(57) R1 OR R0 をR1に格納
end
以上の処理においては、
(1) R0をR1にコピー
(2) R1 AND マスクデータ8040201008040201(h) をR1に格納
によって、24ビットの回転前データの中から64ビットのマスクデータ8040201008040201(h) のビット配列(1000 0000 0100 0000 0010 0000 0001 0000 0000 1000 0000 0100 0000 0010 0000 0001)の中のデータ1に対応するビット位置の画素データ、つまり8ビットのデータ(a0,b1,c2,d3,e4,f5,g6,h7)が回転前データから抽出され、それが回転後データとしてレジスタR1に格納される。
【0036】
同様にして、
(3) R0をR2にコピー
(4) R2を7ビット右シフト
(5) R2 AND マスクデータ0080402010080402(h) をR2に格納
(6) R1 OR R2をR1に格納
においては、回転前データからa1,b2,c3,d4,e5,f6,g7が抽出されて、レジスタR1のデータ更新が行われる。
【0037】
(7) R0をR2にコピー
(8) R2を14ビット右シフト
(9) R2 AND マスクデータ0000804020100804(h) をR2に格納
(10) R1 OR R2 をR1に格納
においては、回転前データからa2,b3,c4,d5,e6,f7が抽出され、レジスタR1のデータ更新が行われる。
【0038】
以下、同様にして、後続する4ステップ毎に以下のデータについての抽出およびその抽出データに基づくレジスタR1の更新が行われる。
ステップ(11)-(14); a3,b4,c5,d6,e7
ステップ(15)-(18); a4,b5,c6,d7
ステップ(19)-(22); a5,b6,c7
ステップ(23)-(26); a6,b7
ステップ(27)-(30); a7
ステップ(31)-(34); h0
ステップ(35)-(38); g0,h1
ステップ(39)-(42); f0,g1,h2
ステップ(43)-(46); e0,f1,g2,h3
ステップ(47)-(50); d0,e1,f2,g3,h4
ステップ(51)-(54); c0,d1,e2,f3,g4,h5
そして、最後の3ステップ(55)-(57) にて
ステップ(55)-(57); b0,c1,d2,e3,f4,g5,h6
の抽出が行われ、レジスタR1の内容は、
a0,b0,c0,d0,e0,f0,g0,h0,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3,a4,b4,c4,d4,e4,f4,g4,h4,a5,b5,c5,d5,e5,f5,g5,h5,a6,b6,c6,d6,e6,f6,g6,h6,a7,b7,c7,d7,e7,f7,g7,h7 となる。
【0039】
以上のように、57stepにて8x8ドットの2値画像の回転が可能となり、従来方式の128stepに対して大幅に処理速度の向上を図ることが可能となる。
【0040】
なお、以上の57stepの回転処理を、米インテル社によって製造販売されているプロセッサ“MMX Pentium”用にコーディングすると、以下のようになる。
【0041】
すなわち、まず、アドレス0,16,24,32,40,48,56,64,72,80,88,96,104,112の位置にそれぞれ前述のマスクデータが次のように定義される。
【0042】
Figure 0004068199
そして、前述のステップ(1)−(57)は、MMX0=R0,MMX1=R1,MMX2=R2、MMX[N]のNをマスクデータのアドレスであるとすると、次のようになる。
【0043】
Figure 0004068199
Figure 0004068199
Figure 0004068199
Figure 0004068199
以上説明したように、本実施形態の画像回転処理方法によれば、処理前の8x8ドットの画像データを一列に並べた64ビットのデータ配列と処理後の8x8ドットの画像データを一列に並べた64ビットのデータ配列との間の一致点に基づいて予めマスクデータが準備され、対応するマスクデータとの間の演算によって、処理前の64ビットのデータ列中から各一致点に対応する画素データが何画素か単位で同時に抽出される。このように、処理前と処理後の画像データ間の変換規則を利用して処理前データから各一致点に対応する画素データを同時に抽出する処理を行うことにより、1ビットづつの処理ではなく、何ビットか単位で同時に画像処理のための演算を行うことが可能となり、回転処理を高速に行うことが可能となる。
【0044】
なお、ある特定の変換規則に従って画像処理を行うものであれば、回転だけに限らず、例えば鏡像変換などのような変換処理についても、それに対応するマスクデータを準備することにより、回転の場合と同様の手順で変換後の画像を得ることができる。
【0045】
なお、本実施形態の画像回転処理方法の手順が記述された画像処理プログラム121は、コンピュータ読み取り可能なCD−ROMなどの記録媒体に記録して流通することができるので、その記録媒体からコンピュータに画像処理プログラム121をインストールするだけでそのコンピュータを高速画像処理可能なシステムとして使用することが可能となる。
【0046】
また、本実施形態の画像回転処理方法の手順は、シフト、AND、およびOR演算の繰り返しにて実現されているので、専用のハードウェアを用いてその為の演算を行ったり、また表示コントローラ13のアクセラレータ機能を用いて実現することも可能である。表示コントローラ13のアクセラレータ機能を使用する場合には、処理対象の画像データはVRAM14に格納されているので、CPU11はソースアドレス、デスティネーションアドレス、および回転処理命令を表示コントローラ13に発行するだけでよく、実際の回転処理は、VRAM14上において表示コントローラ13により実行されることになる。
【0047】
【発明の効果】
以上説明したように、本発明によれば、回転などの画像変換処理の処理前と処理後のデータ間の画素の一致点を有効利用することにより、1ビットづつの処理ではなく何ビットかを同時に処理できるようになり、回転などの画像処理を高速に行うことが可能となる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る画像処理システムの構成およびそのシステムで実行される画像処理プログラムによる回転処理の手順を示す図。
【図2】同実施形態の画像回転処理の原理を説明するための図。
【図3】同実施形態の画像回転処理で使用されるシフト動作の原理を説明するための図。
【図4】従来の画像回転処理を説明するための図。
【図5】従来の画像回転処理における画素データの並び替えの様子を示す図。
【図6】従来の画像回転処理で用いられるシフト動作の原理を説明するための図。
【符号の説明】
11…CPU
12…主メモリ
13…表示コントローラ
14…画像メモリ
15…ディスプレイモニタ
16…ファイル記憶装置
R0…ソースデータ書き込み用64ビットレジスタ
R1…デスティネーションデータ書き込み用64ビットレジスタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method, an image processing system to which the method is applied, and a recording medium, and more particularly to an image processing method for performing processing such as rotation of a binary image using a computer, an image processing system to which the method is applied, and The present invention relates to a recording medium.
[0002]
[Prior art]
In recent years, along with the promotion of paperless and the development of image processing technology using computers, management and operation of document data that includes not only characters but also images such as characters and drawings has been promoted. As for documents delivered to and from the document, distribution of document data including characters and images has started.
[0003]
In this case, the size of the drawing data is often specified in accordance with the document format. For example, when A4 portrait paper is used as the document format, the drawing data can also fit on the A4 portrait paper. Size is required. On the other hand, the orientation of the drawing data is not particularly defined, and it is possible to arrange A4 paper in either horizontal or vertical orientation. For this reason, there are many documents in the distribution document that include both drawing data written in horizontal writing on vertical A4 paper used as the document format and drawing data written in vertical writing. To do.
[0004]
When such drawing data is displayed on a computer screen for reference, it is necessary to rotate the orientation of the image by 90 degrees depending on whether the drawing data is horizontal writing or horizontal writing. . In particular, when a plurality of drawing data is inserted in the same document, the direction of the drawing may be different for each drawing, so that the image rotation processing is performed relatively frequently. Therefore, it is required to perform image rotation processing at high speed.
[0005]
A conventional typical image rotation processing method using a computer will be described below.
Here, as shown in FIG. 4, a binary image having a pixel size of horizontal W bytes and vertical 8H lines is read from the memory as source data, rotated 90 degrees and stored in the memory as destination data. Assume that
[0006]
The overall flow of the algorithm in this case is as follows.
Figure 0004068199
This algorithm sequentially reads and rotates the source data in units of 8 dots x 8 dots while scanning the source data from the upper left to the upper right, and the rotation result is directed from the lower left to the upper left of the destination data. The process of sequentially writing is repeated for the size of the source data in the vertical direction.
[0007]
Details of the “rotation process in the CPU register” will be described below.
CPU registers (bytes) r0, r2, r3, r4, r5, r6, r7 respectively
Data of address source_address (a0, a1, a2, a3, a4, a5, a6, a7),
source_address + W data (b0, b1, b2, b3, b4, b5, b6, b7),
source_address + 2W data (c0, c1, c2, c3, c4, c5, c6, c7),
source_address + 3W data (d0, d1, d2, d3, d4, d5, d6, d7),
source_address + 4W data (e0, e1, e2, e3, e4, e5, e6, e7),
source_address + 5W data (f0, f1, f2, f3, f4, f5, f6, f7),
source_address + 6W data (g0, g1, g2, g3, g4, g5, g6, g7),
source_address + 7W data (h0, h1, h2, h3, h4, h5, h6, h7)
And
Data of address destination_address (a0, b0, c0, d0, e0, f0, g0, h0),
destination_address-H data (a1, b1, c1, d1, e1, f1, g1, h1),
destination_address-2H data (a2, b2, c2, d2, e2, f2, g2, h2),
destination_address-3H data (a3, b3, c3, d3, e3, f3, g3, h3),
destination_address-4H data (a4, b4, c4, d4, e4, f4, g4, h4),
destination_address-5H data (a5, b5, c5, d5, e5, f5, g5, h5),
destination_address-6H data (a6, b6, c6, d6, e6, f6, g6, h6),
destination_address-7H data (a7, b7, c7, d7, e7, f7, g7, h7),
Are created in CPU registers (bytes) r8, r9, r10, r11, r12, r13, r14, r15, respectively.
[0008]
In this case, rotation of 64-bit image data of 8 dots × 8 dots is performed by the following algorithm.
start
rotate left with carry r0
rotate left with carry r8
rotate left with carry r1
rotate left with carry r8
rotate left with carry r2
rotate left with carry r8
rotate left with carry r3
rotate left with carry r8
rotate left with carry r4
rotate left with carry r8
rotate left with carry r5
rotate left with carry r8
rotate left with carry r6
rotate left with carry r8
rotate left with carry r7
rotate left with carry r8
Similarly, transfer data from r9 to r15 end
Here, the processing of “rotate left with carry” is shown in FIG.
[0009]
In the process of “rotate left with carry”, the data (a0, a1, a2, a3, a4, a5, a6, a7) of the transfer source register is shifted by 1 bit, and the first 1 bit is transferred to the transfer destination register. Input from LSB side.
[0010]
Therefore, in the above rotation algorithm, data transfer from the source to the destination is performed in 1-bit units with two steps as one set.
That is, the contents of the register (r8) used to store up to 8 bits of data from the lower left to the lower right of the destination data change as follows.
[0011]
(1) rotate left with carry r0
(2) rotate left with carry r8
As a result, the first 1-bit data (a0) of the register (r0) is set in the register (r8).
[0012]
(3) rotate left with carry r1
(4) rotate left with carry r8
As a result, the first 1-bit data (b0) of the register (r1) is additionally set in the register (r8).
[0013]
(5) rotate left with carry r2
(6) rotate left with carry r8
As a result, the first 1-bit data (c0) of the register (r2) is additionally set in the register (r8).
[0014]
(7) rotate left with carry r3
(8) rotate left with carry r8
As a result, the first 1-bit data (d0) of the register (r3) is additionally set in the register (r8).
[0015]
(9) rotate left with carry r4
(10) rotate left with carry r8
As a result, the first 1-bit data (e0) of the register (r4) is additionally set in the register (r8).
[0016]
(11) rotate left with carry r5
(12) rotate left with carry r8
As a result, the first 1-bit data (f0) of the register (r5) is additionally set in the register (r8).
[0017]
(13) rotate left with carry r6
(14) rotate left with carry r8
As a result, the first 1-bit data (g0) of the register (r6) is additionally set in the register (r8).
[0018]
(15) rotate left with carry r7
(16) rotate left with carry r8
As a result, the first 1-bit data (h0) of the register (r7) is additionally set in the register (r8).
[0019]
As a result, the contents of the register (r8) become a0, b0, c0, d0, e0, f0, g0, h0.
Similarly, the same processing is performed for the registers (r 9) to (r 15). Therefore, since processing of 16 steps is required for each 8-bit data, 128 steps (= 16 × 8) are required to rotate an 8 × 8 dot image.
[0020]
[Problems to be solved by the invention]
As described above, since the conventional image rotation processing is performed on a bit-by-bit basis, as many as 128 steps are required to rotate an 8 × 8 dot image, and a lot of time is required to rotate the image. There was a problem.
[0021]
The present invention has been made in view of the above points, and pays attention to the fact that there are several points where pixels match between data before and after image conversion processing such as rotation. An object of the present invention is to provide an image processing method and an image processing system to which the method can be applied so that several bits can be processed simultaneously instead of each processing and image processing such as rotation can be performed at high speed, and a recording medium. To do.
[0022]
[Means for Solving the Problems]
In order to solve the above-described problem, the present invention provides an image processing method for processing a processing target image in units of image data of mxn pixels to generate a converted image of the processing target image. Based on the data array coincidence point with the image data, pixel data corresponding to the coincidence point is extracted from the data string of the mxn pixel image data before the processing, and the data sequence of the image data before the processing The extraction process is repeatedly executed while shifting the value.
[0023]
According to this image processing method, for example, when processing such as rotation or mirror image is performed, mask data prepared in advance based on data array matching points between the image data before processing and the image data after processing Etc., the pixel data corresponding to the coincidence point is simultaneously extracted in units of several pixels from the data string of the image data of mxn pixels before processing. In this way, by performing the process of simultaneously extracting the pixel data corresponding to each matching point from the pre-process data using the conversion rule between the pre-process and post-process image data, Calculations for image processing can be performed simultaneously in units of several bits, and image processing such as rotation can be performed at high speed.
[0024]
In particular, the extraction process using the mask data is preferably performed using an arithmetic process using a register having an mxn bit width or more. As a result, it is possible to perform processing for more matching points simultaneously.
[0025]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows a system configuration of an image processing system according to an embodiment of the present invention. This image processing system is realized by a computer such as a personal computer or a workstation on which an image processing program is installed, and includes a CPU 11, a main memory 12, a display controller 13, an image memory (VRAM) 14, a display monitor 15, And a file storage device 16 such as a hard disk.
[0026]
The CPU 11 executes the image processing program loaded in the main memory 12 to read document data in which images such as characters and screens are mixed from the file storage device 16 and uses the display controller 13 to read the document data on the display monitor 15. To display. The image processing program provides various editing tools for performing conversion processing such as rotation and mirror image conversion on the image displayed on the screen, and the arithmetic processing for the image conversion is performed by 64-bit calculation by the CPU 11. Executed.
[0027]
The basic procedure of image rotation processing is to cut out a processing target image on the main memory 12 in units of 8 × 8 pixel blocks designated by a transfer source address, rotate the 8 × 8 pixel image data, and then rotate the image data to the main memory 12. This is done by writing to the location specified by the upper transfer destination address. In this case, the rotation processing of the 8 × 8 dot image data performed by the CPU 11 is performed as follows by effectively using the coincidence point between the data arrays of the pre-rotation data and the post-rotation data.
[0028]
That is, first, mask data for extracting pixel data corresponding to each coincidence point from the pre-rotation data based on the coincidence point of the data array between the pre-rotation and post-rotation image data is prepared (step S101). ).
[0029]
Next, pixel data corresponding to each coincidence point is extracted from the pre-rotation data as post-rotation data by an arithmetic process of the pre-rotation data and the mask data (step S102). Next, while shifting the pre-rotation data, the process of extracting pixel data from the pre-rotation data (step S103) and the data update of the post-rotation data based on the extraction result (step S104) are repeatedly executed.
[0030]
In this way, by performing the process of simultaneously extracting the pixel data corresponding to each matching point from the pre-rotation data using the conversion rule between the pre-rotation and post-rotation image data, it is not a bit-by-bit process, Calculations for image processing can be performed simultaneously in units of several bits, and rotation processing can be performed at high speed.
[0031]
Next, with reference to FIG. 2, the procedure of the image rotation process of this embodiment is demonstrated concretely.
In the following, as described above with reference to FIGS. 4 and 5, a binary image having a pixel size of horizontal W bytes and vertical 8H lines is read from the main memory 12 as source data, and rotated to the left by 90 degrees to be the destination. It is assumed that data is stored in the main memory 12 as data.
[0032]
The overall flow of the algorithm in this case is as follows.
Figure 0004068199
This algorithm sequentially reads and rotates the source data in units of 8 dots x 8 dots while scanning the source data from the upper left to the upper right, and the rotation result is directed from the lower left to the upper left of the destination data. The process of sequentially writing is repeated for the size of the source data in the vertical direction.
[0033]
Details of the “rotation process in the CPU register” will be described below.
In bits 63-56, 55-48, 47-40, 39-32, 31-24, 23-16, 15-8, 7-0 of the 64-bit register R0 of the CPU 11, respectively
Data of address source_address (a0, a1, a2, a3, a4, a5, a6, a7),
source_address + W data (b0, b1, b2, b3, b4, b5, b6, b7),
source_address + 2W data (c0, c1, c2, c3, c4, c5, c6, c7),
source_address + 3W data (d0, d1, d2, d3, d4, d5, d6, d7),
source_address + 4W data (e0, e1, e2, e3, e4, e5, e6, e7),
source_address + 5W data (f0, f1, f2, f3, f4, f5, f6, f7),
source_address + 6W data (g0, g1, g2, g3, g4, g5, g6, g7),
source_address + 7W data (h0, h1, h2, h3, h4, h5, h6, h7)
And
Data of address destination_address (a0, b0, c0, d0, e0, f0, g0, h0),
destination_address-H data (a1, b1, c1, d1, e1, f1, g1, h1),
destination_address-2H data (a2, b2, c2, d2, e2, f2, g2, h2),
destination_address-3H data (a3, b3, c3, d3, e3, f3, g3, h3),
destination_address-4H data (a4, b4, c4, d4, e4, f4, g4, h4),
destination_address-5H data (a5, b5, c5, d5, e5, f5, g5, h5),
destination_address-6H data (a6, b6, c6, d6, e6, f6, g6, h6),
destination_address-7H data (a7, b7, c7, d7, e7, f7, g7, h7),
Are created in bits 63-56, 55-48, 47-40, 39-32, 31-24, 23-16, 15-8, and 7-0 of the 64-bit register R1 of the CPU 11, respectively.
[0034]
In this case, the bit arrangement before and after the rotation is as shown in FIG. At this time, when looking at the bit arrangement, there are bits (a0, b1, c2, d3, e4, f5, g6, h7) that have not moved. In addition, when the original data (source) is shifted 7 bits to the right as shown in FIG. 3, there are bits (a1, b2, c3, d4, e5, f6, g7) having the same bit arrangement. In the present embodiment, several points are processed simultaneously at the same time using such matching points.
[0035]
Assuming that the work CPU register (64 bits) is R2, rotation of 64-bit image data of 8 dots × 8 dots is performed by the following algorithm.
start
(1) Copy R0 to R1
(2) R1 AND mask data 8040201008040201 (h) is stored in R1
(3) Copy R0 to R2
(4) R2 is shifted 7 bits to the right
(5) R2 AND mask data 0080402010080402 (h) is stored in R2.
(6) R1 OR R2 is stored in R1
(7) Copy R0 to R2
(8) R2 is shifted 14 bits to the right
(9) R2 AND mask data 0000804020100804 (h) is stored in R2.
(10) R1 OR R2 is stored in R1
(11) Copy R0 to R2
(12) R2 is shifted 21 bits to the right
(13) R2 AND mask data 0000008040201008 (h) is stored in R2.
(14) R1 OR R2 is stored in R1
(15) Copy R0 to R2
(16) R2 is shifted 28 bits to the right
(17) R2 AND mask data 0000000080402010 (h) is stored in R2.
(18) R1 OR R2 is stored in R1
(19) Copy R0 to R2
(20) R2 is shifted right 35 bits
(21) R2 AND mask data 0000000000804020 (h) is stored in R2
(22) R1 OR R2 is stored in R1
(23) Copy R0 to R2
(24) R2 is shifted 42 bits to the right
(25) R2 AND mask data 0000000000008040 (h) is stored in R2.
(26) R1 OR R2 is stored in R1
(27) Copy R0 to R2
(28) R2 is shifted right by 49 bits
(29) R2 AND mask data 0000000000000080 (h) is stored in R2.
(30) R1 OR R2 is stored in R1
(31) Copy R0 to R2
(32) R2 is shifted left by 49 bits
(33) R2 AND Mask data 0100000000000000 (h) is stored in R2.
(34) R1 OR R2 is stored in R1
(35) Copy R0 to R2
(36) Shift R2 42 bits to the left
(37) R2 AND Mask data 0201000000000000 (h) is stored in R2.
(38) R1 OR R2 is stored in R1
(39) Copy R0 to R2
(40) Shift R2 35 bits to the left
(41) R2 AND mask data 042010000000000 (h) is stored in R2.
(42) R1 OR R2 is stored in R1
(43) Copy R0 to R2
(44) R2 is shifted left by 28 bits
(45) R2 AND Mask data 0804020100000000 (h) is stored in R2.
(46) R1 OR R2 is stored in R1
(47) Copy R0 to R2
(48) R2 is shifted 21 bits to the left
(49) R2 AND Mask data 1008040201000000 (h) is stored in R2.
(50) R1 OR R2 is stored in R1
(51) Copy R0 to R2
(52) R2 is shifted left by 14 bits
(53) R2 AND mask data 2010080402010000 (h) is stored in R2
(54) R1 OR R2 is stored in R1
(55) R0 is shifted 7 bits to the left
(56) R0 AND Mask data 4020100804020100 (h) is stored in R0
(57) R1 OR R0 is stored in R1 end
In the above processing,
(1) Copy R0 to R1
(2) By storing R1 AND mask data 8040201008040201 (h) in R1, the bit array (1000 0000 0100 0000 0010 0000 0001 0000 0000 1000 0000) of 64-bit mask data 8040201008040201 (h) from the 24-bit pre-rotation data 0100 0000 0010 0000 0001), pixel data at bit positions corresponding to data 1, that is, 8-bit data (a0, b1, c2, d3, e4, f5, g6, h7) is extracted from the pre-rotation data, It is stored in the register R1 as post-rotation data.
[0036]
Similarly,
(3) Copy R0 to R2
(4) R2 is shifted 7 bits to the right
(5) R2 AND mask data 0080402010080402 (h) is stored in R2.
(6) In storing R1 OR R2 in R1, a1, b2, c3, d4, e5, f6, and g7 are extracted from the pre-rotation data, and the data in the register R1 is updated.
[0037]
(7) Copy R0 to R2
(8) R2 is shifted 14 bits to the right
(9) R2 AND mask data 0000804020100804 (h) is stored in R2.
(10) In storing R1 OR R2 in R1, a2, b3, c4, d5, e6, f7 are extracted from the pre-rotation data, and the data in the register R1 is updated.
[0038]
In the same manner, the following data is extracted and the register R1 is updated based on the extracted data every four subsequent steps.
Step (11)-(14); a3, b4, c5, d6, e7
Step (15)-(18); a4, b5, c6, d7
Step (19)-(22); a5, b6, c7
Step (23)-(26); a6, b7
Step (27)-(30); a7
Step (31)-(34); h0
Step (35)-(38); g0, h1
Step (39)-(42); f0, g1, h2
Step (43)-(46); e0, f1, g2, h3
Step (47)-(50); d0, e1, f2, g3, h4
Step (51)-(54); c0, d1, e2, f3, g4, h5
And in the last three steps (55)-(57), steps (55)-(57); b0, c1, d2, e3, f4, g5, h6
Is extracted, and the contents of the register R1 are:
a0, b0, c0, d0, e0, f0, g0, h0, a1, b1, c1, d1, e1, f1, g1, h1, a2, b2, c2, d2, e2, f2, g2, h2, a3, b3, c3, d3, e3, f3, g3, h3, a4, b4, c4, d4, e4, f4, g4, h4, a5, b5, c5, d5, e5, f5, g5, h5, a6, b6, c6, d6, e6, f6, g6, h6, a7, b7, c7, d7, e7, f7, g7, h7.
[0039]
As described above, the binary image of 8 × 8 dots can be rotated at 57 steps, and the processing speed can be greatly improved compared to the conventional 128 steps.
[0040]
The above 57-step rotation process is coded as follows for the processor “MMX Pentium” manufactured and sold by Intel Corporation.
[0041]
That is, first, the above-described mask data is defined at the positions of addresses 0, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, and 112 as follows.
[0042]
Figure 0004068199
The above steps (1)-(57) are as follows, assuming that MMX0 = R0, MMX1 = R1, MMX2 = R2, and MMX [N] is the address of the mask data.
[0043]
Figure 0004068199
Figure 0004068199
Figure 0004068199
Figure 0004068199
As described above, according to the image rotation processing method of the present embodiment, a 64-bit data array in which 8 × 8 dot image data before processing is arranged in a row and an 8 × 8 dot image data after processing are arranged in a row. Mask data is prepared in advance based on the coincidence point with the 64-bit data array, and pixel data corresponding to each coincidence point in the 64-bit data string before processing is obtained by calculation with the corresponding mask data. Are extracted simultaneously in units of pixels. Thus, by performing the process of simultaneously extracting the pixel data corresponding to each matching point from the pre-process data using the conversion rule between the pre-process and post-process image data, Calculations for image processing can be performed simultaneously in units of several bits, and rotation processing can be performed at high speed.
[0044]
As long as image processing is performed according to a specific conversion rule, not only rotation but also conversion processing such as mirror image conversion is performed by preparing mask data corresponding to the rotation processing. A converted image can be obtained in the same procedure.
[0045]
Note that the image processing program 121 describing the procedure of the image rotation processing method of the present embodiment can be recorded and distributed on a computer-readable recording medium such as a CD-ROM. By simply installing the image processing program 121, the computer can be used as a system capable of high-speed image processing.
[0046]
Further, since the procedure of the image rotation processing method of the present embodiment is realized by repeating shift, AND, and OR operations, the dedicated controller is used to perform the operations for that purpose, and the display controller 13 It is also possible to implement this using the accelerator function. When using the accelerator function of the display controller 13, the image data to be processed is stored in the VRAM 14, so the CPU 11 only has to issue a source address, a destination address, and a rotation processing command to the display controller 13. The actual rotation process is executed by the display controller 13 on the VRAM 14.
[0047]
【The invention's effect】
As described above, according to the present invention, by effectively using the pixel coincidence point between the data before and after the image conversion process such as rotation, it is possible to calculate how many bits instead of one bit at a time. Processing can be performed simultaneously, and image processing such as rotation can be performed at high speed.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of an image processing system according to an embodiment of the present invention and a procedure of rotation processing by an image processing program executed in the system.
FIG. 2 is a view for explaining the principle of image rotation processing according to the embodiment;
FIG. 3 is a view for explaining the principle of a shift operation used in the image rotation process of the embodiment.
FIG. 4 is a view for explaining conventional image rotation processing;
FIG. 5 is a diagram illustrating how pixel data is rearranged in a conventional image rotation process;
FIG. 6 is a diagram for explaining the principle of a shift operation used in a conventional image rotation process.
[Explanation of symbols]
11 ... CPU
12 ... Main memory 13 ... Display controller 14 ... Image memory 15 ... Display monitor 16 ... File storage device R0 ... 64-bit register for writing source data R1 ... 64-bit register for writing destination data

Claims (3)

メモリ上の処理対象画像を転送元アドレスで指定される8x8画素の画像データ単位で切り出し、その8x8画素の画像データを回転して前記メモリ上の転送先アドレスで指定される位置に書き込む画像処理方法において、
前記8x8画素の回転前の画像データを64ビット幅以上の第1のレジスタに転送し、
前記第1のレジスタに転送された前記回転前の画像データを並べた64ビットのデータ列と64ビット幅以上の第2のレジスタに前記回転後の画像データを並べた64ビットのデータ列との間のデータ配列の一致点に対応する複数の各画素データを前記第1のレジスタ内の前記回転前の画像データから同時に抽出して、その抽出した各画素データを当該画素データが格納されている前記第1のレジスタ内のビット位置と同じ前記第2のレジスタ内のビット位置に書き込み、
前記回転前の画像データをシフトし、当該シフト後の回転前の画像データのデータ列と前記回転後の画像データのデータ列との間のデータ配列の一致点に対応する複数の各画素データを前記シフト後の回転前の画像データから同時に抽出する処理およびその抽出された各画素データを当該各画素データのシフト後のビット位置と同じ前記第2のレジスタ内のビット位置に書き込む処理を、前記回転前の画像データ内の全画素データが前記第2のレジスタに書き込まれるまで前記回転前の画像データをシフトしながら繰り返し実行し、
前記第2のレジスタに書き込まれた画像データを前記メモリ上の転送先アドレスで指定される位置に書き込むことを特徴とする画像処理方法。
An image processing method for extracting a processing target image on a memory in units of 8 × 8 pixel image data specified by a transfer source address, and rotating the 8 × 8 pixel image data and writing it at a position specified by a transfer destination address on the memory In
The image data before rotation of the 8 × 8 pixels is transferred to a first register having a 64-bit width or more,
A 64-bit data string in which the image data before rotation transferred to the first register is arranged, and a 64-bit data string in which the image data after rotation is arranged in a second register having a width of 64 bits or more. A plurality of pixel data corresponding to the coincidence points of the data array between them are simultaneously extracted from the pre-rotation image data in the first register, and the pixel data is stored as the extracted pixel data. Write to the same bit position in the second register as the bit position in the first register;
The image data before rotation is shifted , and a plurality of pixel data corresponding to the coincidence point of the data array between the data string of the image data before the rotation after the shift and the data string of the image data after the rotation are obtained. The process of simultaneously extracting from the image data before rotation after the shift and the process of writing the extracted pixel data in the bit position in the second register that is the same as the bit position after the shift of the pixel data Repetitively executing the image data before rotation until all pixel data in the image data before rotation is written in the second register ,
An image processing method, wherein the image data written in the second register is written at a position specified by a transfer destination address on the memory.
メモリ上の処理対象画像を転送元アドレスで指定される8x8画素の画像データ単位で切り出し、その8x8画素の画像データを回転して前記メモリ上の転送先アドレスで指定される位置に書き込む画像処理システムにおいて、An image processing system that cuts out a processing target image on a memory in units of 8 × 8 pixel image data specified by a transfer source address, and writes the image data of 8 × 8 pixel at a position specified by a transfer destination address on the memory In
前記8x8画素の回転前の画像データを64ビット幅以上の第1のレジスタに転送する手段と、Means for transferring the image data before rotation of the 8 × 8 pixels to a first register having a 64-bit width or more;
前記第1のレジスタに転送された前記回転前の画像データを並べた64ビットのデータ列と64ビット幅以上の第2のレジスタに前記回転後の画像データを並べた64ビットのデータ列との間のデータ配列の一致点に対応する複数の各画素データを前記第1のレジスタ内の前記回転前の画像データから同時に抽出して、その抽出した各画素データを当該画素データが格納されている前記第1のレジスタ内のビット位置と同じ前記第2のレジスタ内のビット位置に書き込む手段と、A 64-bit data string in which the image data before rotation transferred to the first register is arranged, and a 64-bit data string in which the image data after rotation is arranged in a second register having a width of 64 bits or more. A plurality of pixel data corresponding to the coincidence points of the data arrangement between them are simultaneously extracted from the image data before rotation in the first register, and the pixel data is stored as the extracted pixel data. Means for writing to the same bit position in the second register as the bit position in the first register;
前記回転前の画像データをシフトし、当該シフト後の回転前の画像データのデータ列と前記回転後の画像データのデータ列との間のデータ配列の一致点に対応する複数の各画素データを前記シフト後の回転前の画像データから同時に抽出する処理およびその抽出された各画素データを当該各画素データのシフト後のビット位置と同じ前記第2のレジスタ内のビット位置に書き込む処理を、前記回転前の画像データ内の全画素データが前記第2のレジスタに書き込まれるまで前記回転前の画像データをシフトしながら繰り返し実行する手段と、The image data before rotation is shifted, and a plurality of pixel data corresponding to the coincidence point of the data arrangement between the data string of the image data before rotation after the shift and the data string of the image data after the rotation are obtained. The process of simultaneously extracting from the image data before rotation after the shift and the process of writing each extracted pixel data in the same bit position in the second register as the bit position after the shift of each pixel data, Means for repeatedly executing the image data before rotation while shifting all the pixel data in the image data before rotation to the second register;
前記第2のレジスタに書き込まれた画像データを前記メモリ上の転送先アドレスで指定される位置に書き込む手段とを具備することを特徴とする画像処理システム。An image processing system comprising: means for writing image data written in the second register at a position specified by a transfer destination address on the memory.
メモリ上の処理対象画像を転送元アドレスで指定される8x8画素の画像データ単位で切り出し、その8x8画素の画像データを回転して前記メモリ上の転送先アドレスで指定される位置に書き込む画像処理をコンピュータに実行させるプログラムが格納されたコンピュータ読み取り可能な記憶媒体であって、Image processing is performed in which the processing target image on the memory is cut out in units of 8 × 8 pixel image data specified by the transfer source address, and the image data of 8 × 8 pixel is rotated and written at the position specified by the transfer destination address on the memory. A computer-readable storage medium storing a program to be executed by a computer,
前記プログラムは、The program is
前記8x8画素の回転前の画像データを64ビット幅以上の第1のレジスタに転送する手順と、Transferring the image data before rotation of the 8 × 8 pixels to a first register having a 64-bit width or more;
前記第1のレジスタに転送された前記回転前の画像データを並べた64ビットのデータ列と64ビット幅以上の第2のレジスタに前記回転後の画像データを並べた64ビットのデータ列との間のデータ配列の一致点に対応する複数の各画素データを前記第1のレジスタ内の前記回転前の画像データから同時に抽出して、その抽出した各画素データを当該画A 64-bit data string in which the image data before rotation transferred to the first register is arranged, and a 64-bit data string in which the image data after rotation is arranged in a second register having a width of 64 bits or more. A plurality of pixel data corresponding to the coincidence points of the data arrangement between them are simultaneously extracted from the image data before rotation in the first register, and the extracted pixel data are 素データが格納されている前記第1のレジスタ内のビット位置と同じ前記第2のレジスタ内のビット位置に書き込む手順と、Writing to the same bit position in the second register as the bit position in the first register where raw data is stored;
前記回転前の画像データをシフトし、当該シフト後の回転前の画像データのデータ列と前記回転後の画像データのデータ列との間のデータ配列の一致点に対応する複数の各画素データを前記シフト後の回転前の画像データから同時に抽出する処理およびその抽出された各画素データを当該各画素データのシフト後のビット位置と同じ前記第2のレジスタ内のビット位置に書き込む処理を、前記回転前の画像データ内の全画素データが前記第2のレジスタに書き込まれるまで前記回転前の画像データをシフトしながら繰り返し実行する手順と、The image data before rotation is shifted, and a plurality of pixel data corresponding to the coincidence point of the data arrangement between the data string of the image data before rotation after the shift and the data string of the image data after the rotation are obtained. The process of simultaneously extracting from the image data before rotation after the shift and the process of writing each extracted pixel data in the same bit position in the second register as the bit position after the shift of each pixel data, A procedure for repeatedly executing the pre-rotation image data while shifting until all the pixel data in the pre-rotation image data is written to the second register;
前記第2のレジスタに書き込まれた画像データを前記メモリ上の転送先アドレスで指定される位置に書き込む手順とをコンピュータに実行させることを特徴とする記憶媒体。A storage medium that causes a computer to execute a procedure for writing image data written in the second register to a position specified by a transfer destination address on the memory.
JP34937097A 1997-12-18 1997-12-18 Image processing method, image processing system to which the method is applied, and recording medium Expired - Lifetime JP4068199B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34937097A JP4068199B2 (en) 1997-12-18 1997-12-18 Image processing method, image processing system to which the method is applied, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34937097A JP4068199B2 (en) 1997-12-18 1997-12-18 Image processing method, image processing system to which the method is applied, and recording medium

Publications (2)

Publication Number Publication Date
JPH11185032A JPH11185032A (en) 1999-07-09
JP4068199B2 true JP4068199B2 (en) 2008-03-26

Family

ID=18403304

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34937097A Expired - Lifetime JP4068199B2 (en) 1997-12-18 1997-12-18 Image processing method, image processing system to which the method is applied, and recording medium

Country Status (1)

Country Link
JP (1) JP4068199B2 (en)

Also Published As

Publication number Publication date
JPH11185032A (en) 1999-07-09

Similar Documents

Publication Publication Date Title
JP4194462B2 (en) Digital watermark embedding method, digital watermark embedding apparatus, program for realizing them, and computer-readable storage medium
US5889893A (en) Method and apparatus for the fast rotation of an image
JP4695815B2 (en) Drawing processing apparatus, drawing processing method, computer-readable storage medium, and program
JP4068199B2 (en) Image processing method, image processing system to which the method is applied, and recording medium
JP2004341914A (en) Document filing device, document filing method and program for allowing computer to execute its method
US8208167B2 (en) Information processing apparatus, image forming apparatus, print-data generation method, map-information generation method, and computer program product
JP2007122188A (en) Image forming device, image processing method and program
JPH041862A (en) Graphic selecting method
JPS6217236B2 (en)
JP4887761B2 (en) Image processing program and image processing apparatus
CN108734664B (en) Picture rotation processing method and system
US6240216B1 (en) Method and apparatus for processing an image, storage medium for storing an image processing program
JP2007034488A (en) Dma controller and method
JP3997808B2 (en) Drawing processing apparatus and drawing processing method
JP4022014B2 (en) Image data management method
JP2003178300A (en) Image processing method and image processor
JPH0785266A (en) Image rotating device
JP4419524B2 (en) Image processing apparatus and program
JPS623375A (en) Image editing device
JP2596204B2 (en) High-speed layout device for image data
JP2867482B2 (en) Image processing device
JPH04329482A (en) Image rotation processing method and processing device for relevant method
JP3147077B2 (en) Data copying apparatus and data copying method
JP2008226190A (en) Image processor and method for it
JP2019185209A (en) Image processing system and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070828

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071029

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080110

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

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120118

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140118

Year of fee payment: 6

EXPY Cancellation because of completion of term