JP2009076989A - Image rotation processing method, image processing apparatus, image rotation processing program and storage medium - Google Patents

Image rotation processing method, image processing apparatus, image rotation processing program and storage medium Download PDF

Info

Publication number
JP2009076989A
JP2009076989A JP2007241589A JP2007241589A JP2009076989A JP 2009076989 A JP2009076989 A JP 2009076989A JP 2007241589 A JP2007241589 A JP 2007241589A JP 2007241589 A JP2007241589 A JP 2007241589A JP 2009076989 A JP2009076989 A JP 2009076989A
Authority
JP
Japan
Prior art keywords
pixel
image
rotation
post
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007241589A
Other languages
Japanese (ja)
Inventor
Masaaki Ishikawa
雅朗 石川
Takayuki Nishimura
隆之 西村
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2007241589A priority Critical patent/JP2009076989A/en
Publication of JP2009076989A publication Critical patent/JP2009076989A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image rotation processing method capable of achieving rotation processing of a digital image at a 90° unit with a smaller memory area, and to provide an image processing apparatus, an image rotation processing program and a storage medium. <P>SOLUTION: The image rotation processing method in the image processing apparatus applies rotation processing to the input image data at 90° unit and outputs the image data. The processing method has: a step of calculating the post-rotation position of a predetermined rotation start pixel on the image data; a step of storing the pixel value of the pixel of the post-rotation position in a pixel value temporary storing section; a step of changing the pixel value of the pixel at the post-rotation position into the pixel value of the predetermined rotation start pixel; and a chain processing step of sequentially repeating the post-rotation position calculating step, the pixel value storing step and the pixel value changing step while replacing the predetermined rotation start pixel by the pixel at the post-rotation position. All the pixels on the image data each move to the post-rotation positions by one movement. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像回転処理方法、画像処理装置、画像回転処理プログラム及び記憶媒体に関する。   The present invention relates to an image rotation processing method, an image processing apparatus, an image rotation processing program, and a storage medium.

従来、スキャナ等の読み取り装置により読み取られたデジタル画像を、読取り方向補正の為に読み取り後に90度回転処理して出力する画像処理装置がある。   2. Description of the Related Art Conventionally, there is an image processing apparatus that outputs a digital image read by a reading device such as a scanner by rotating it 90 degrees after reading for correcting the reading direction.

図1は、従来の画像回転処理の一例を説明するための図である。ここでは、左から右の読み取り方向で読み取られたデジタル画像データが、90度回転処理を施される場合の処理について簡単に説明する。なお、90度回転処理を行う画像処理装置には、予め90度回転処理に係るデータの退避等のための記憶領域であるワークメモリ(RAM (Random Access Memory)等)(図1ではワークエリア)が設けられているものとする。   FIG. 1 is a diagram for explaining an example of conventional image rotation processing. Here, a process when digital image data read in the reading direction from left to right is subjected to a 90-degree rotation process will be briefly described. Note that an image processing apparatus that performs 90-degree rotation processing includes a work memory (RAM (Random Access Memory) or the like) that is a storage area for saving data related to 90-degree rotation processing in advance (work area in FIG. 1). Is provided.

まず、図1(1)に示すように、読み取られたデジタル画像データ(ここでは8ライン単位を2回)は、回転処理を施されワークメモリに収まるだけ格納される。そうすると、図1(2)に示すように、デジタル画像データでは、ワークメモリに格納されていない画像データ(図1では白色部)が残される。続いて、図1(3)に示すように、残った画像は後詰めされ、空いたメモリが先頭に集められる。さらに、ワークメモリに格納された回転処理済みの画像データは、空いたメモリにコピーされる。   First, as shown in FIG. 1A, the read digital image data (here, the unit of 8 lines is twice) is subjected to rotation processing and stored as long as it fits in the work memory. Then, as shown in FIG. 1 (2), in the digital image data, image data (white portion in FIG. 1) that is not stored in the work memory is left. Subsequently, as shown in FIG. 1 (3), the remaining images are back-packed, and free memory is collected at the top. Further, the rotated image data stored in the work memory is copied to an empty memory.

以上の図1(1)〜(3)で示される処理を繰り返すことにより、90度回転処理は実施される。   By repeating the processes shown in FIGS. 1A to 1C, the 90-degree rotation process is performed.

このような画像回転処理に関する従来技術として、特許文献1に開示された画像回転処理装置では、予め、入力画像全体が退避できる領域だけでなく、入力画像を複数のブロックに分割する際の分割ブロックが正方形となる様に補間する領域が確保されていて、かつ回転後の画像を格納する領域は、別に確保されている。即ち、画像回転は効率良く、及び回転後の画像格納時に入力画像との領域確保の競合になることが無く、処理効率化する為に、格納領域を増加して対処する方式を採用している。   As a conventional technique related to such image rotation processing, in the image rotation processing device disclosed in Patent Document 1, not only an area where the entire input image can be saved in advance, but also a divided block when the input image is divided into a plurality of blocks An area to be interpolated is secured so as to become a square, and an area for storing the rotated image is secured separately. In other words, the image rotation is efficient, and there is no competition for securing the area with the input image when storing the image after the rotation, and a method of dealing with an increase in the storage area is adopted in order to improve processing efficiency. .

これにより、少ない画像メモリで入力画像データの回転処理を行って効率的に回転処理後の画像データを転送出力することができ、入力画像データに残余のデータが生じても回転処理能力を低下せずに効率的に回転処理された画像データを出力することを可能としている。
特許第3147567号公報
As a result, the rotation processing of the input image data can be performed with a small amount of image memory, and the image data after the rotation processing can be efficiently transferred and output, and even if residual data is generated in the input image data, the rotation processing capability is reduced. Thus, it is possible to output image data that has been efficiently rotated.
Japanese Patent No. 3147567

ところで、従来及び特許文献1に開示された発明のようにデジタル画像を90度回転処理する上での課題の一つに、画像の一部を退避させる等のために必要なメモリ領域をいかに小さくするか及び90度回転処理をいかに高速にするか等の課題がある。   By the way, as one of the problems when the digital image is rotated by 90 degrees as in the invention disclosed in the prior art and Patent Document 1, how small the memory area necessary for saving a part of the image is reduced. There is a problem such as how to perform the 90-degree rotation processing and how to increase the speed.

本発明は、上記の点に鑑みて、この課題を解決するために発明されたものであり、デジタル画像の90度単位での回転処理を、より小さなメモリ領域で実現することができる画像回転処理方法、画像処理装置、画像回転処理プログラム及び記憶媒体を提供することを目的とする。   The present invention has been invented in order to solve this problem in view of the above points, and an image rotation process capable of realizing a rotation process of a digital image in units of 90 degrees in a smaller memory area. It is an object to provide a method, an image processing apparatus, an image rotation processing program, and a storage medium.

上記の目的を達成するために、本発明における画像回転処理方法は、入力された画像データを90度単位に回転処理して出力する画像処理装置における画像回転処理方法であって、前記画像データ上の所定の回転開始画素の回転後位置を算出する回転後位置算出工程と、前記回転後位置の画素の画素値を、画素値一時格納部に格納する画素値格納工程と、前記回転後位置の画素の画素値を、前記所定の回転開始画素の画素値に変更する画素値変更工程と、前記所定の回転開始画素を前記回転後位置の画素に置き換えて前記回転後位置算出工程、画素値格納工程及び画素値変更工程の処理を順次繰り返す連鎖処理工程とを有し、前記画像データ上の全画素はそれぞれ一回の移動により回転後位置に移動されるように構成することができる。   In order to achieve the above object, an image rotation processing method according to the present invention is an image rotation processing method in an image processing apparatus that outputs and outputs input image data in units of 90 degrees. A post-rotation position calculating step of calculating a post-rotation position of the predetermined rotation start pixel, a pixel value storage step of storing a pixel value of the pixel at the post-rotation position in a pixel value temporary storage unit, and a post-rotation position of the post-rotation position A pixel value changing step of changing the pixel value of the pixel to a pixel value of the predetermined rotation start pixel, the post-rotation position calculating step by replacing the predetermined rotation start pixel with the pixel at the post-rotation position, and pixel value storage A chain processing step that sequentially repeats the steps of the step and the pixel value changing step, and all the pixels on the image data can be moved to the post-rotation position by one movement.

また、上記の目的を達成するために、本発明における画像回転処理方法では、前記連鎖処理工程の終了後に、前記画像データ上の未移動画素がある場合には、該未移動画素を前記所定の回転開始画素として再設定する再設定工程をさらに有するように構成することができる。   In order to achieve the above object, in the image rotation processing method according to the present invention, if there is an unmoved pixel on the image data after the end of the chain processing step, the unmoved pixel is set as the predetermined pixel. It can be configured to further include a resetting step for resetting as the rotation start pixel.

また、上記の目的を達成するために、本発明における画像回転処理方法では、前記画像処理装置は、前記画像データ上の各々の画素について未移動か移動済かの移動情報を格納する移動情報格納部を備え、前記再設定工程では、再設定すべき前記未移動画素を、前記移動情報格納部に格納された各々の画素の移動情報に基づいて決定するように構成することができる。   In order to achieve the above object, in the image rotation processing method according to the present invention, the image processing device stores movement information storage that stores movement information indicating whether each pixel on the image data is unmoved or moved. A non-moving pixel to be reset may be determined based on movement information of each pixel stored in the movement information storage unit.

また、上記の目的を達成するために、本発明における前記再設定工程では、前記画像データが縦/横の画素数が同一の画像データである場合には、前記画像データを四の正方形領域に分割したいずれか一の領域に属する画素から、再設定すべき前記未移動画素を検索するように構成することができる。   In order to achieve the above object, in the resetting step according to the present invention, when the image data is image data having the same number of vertical / horizontal pixels, the image data is divided into four square areas. The non-moving pixel to be reset can be searched from the pixels belonging to any one of the divided areas.

また、上記の目的を達成するために、本発明における前記再設定工程では、前記画像データ上の左上端から右下端の順番に、再設定すべき前記未移動画素を検索するように構成することができる。   In order to achieve the above object, in the resetting step in the present invention, the unmoved pixels to be reset are searched in the order from the upper left end to the lower right end on the image data. Can do.

また、上記の目的を達成するために、本発明における画像回転処理方法は、入力された縦/横の画素数が同一の画像データを90度単位に回転処理して出力する画像処理装置における画像回転処理方法であって、前記画像データを複数の正方形領域に分割する領域分割工程と、分割された各々の正方形領域内において、該正方形領域の中心を回転中心とした場合の所定の回転開始画素の回転後位置を算出する回転後位置算出工程と、前記回転後位置の画素の画素値を、画素値一時格納部に格納する画素値格納工程と、前記回転後位置の画素の画素値を、前記所定の回転開始画素の画素値に変更する画素値変更工程と、前記所定の回転開始画素を前記回転後位置の画素に置き換えて前記回転後位置算出工程、画素値格納工程及び画素値変更工程の処理を順次繰り返す連鎖処理工程と、上記各工程により各々の正方形領域内の全画素が回転後位置に移動された前記複数の正方形領域を、当該回転処理における回転角に応じて平行移動する平行移動工程と、とを有するように構成することができる。   In order to achieve the above object, the image rotation processing method according to the present invention is an image in an image processing apparatus that rotates and outputs input image data having the same number of vertical / horizontal pixels in units of 90 degrees. A rotation processing method, a region dividing step of dividing the image data into a plurality of square regions, and a predetermined rotation start pixel when the center of the square region is the rotation center in each of the divided square regions A post-rotation position calculating step for calculating the post-rotation position, a pixel value storing step for storing the pixel value of the pixel at the post-rotation position in a pixel value temporary storage unit, and a pixel value of the pixel at the post-rotation position, A pixel value changing step for changing to a pixel value of the predetermined rotation start pixel; and a post-rotation position calculating step, a pixel value storing step, and a pixel value changing step by replacing the predetermined rotation start pixel with a pixel at the post-rotation position. A chain processing step that sequentially repeats the processing, and a parallel movement that translates the plurality of square regions in which all the pixels in each square region have been moved to the post-rotation position by the respective steps according to the rotation angle in the rotation processing. It can comprise so that a process may be included.

また、上記の目的を達成するために、本発明における画像処理装置は、上記の画像回転処理方法の各工程を実現するように構成することができる。   In order to achieve the above object, the image processing apparatus according to the present invention can be configured to realize each step of the above image rotation processing method.

また、上記の目的を達成するために、本発明における画像回転処理プログラムは、コンピュータに、上記の画像回転処理方法を実現させるための画像回転処理プログラムであるように構成することができる。   In order to achieve the above object, the image rotation processing program according to the present invention can be configured to be an image rotation processing program for causing a computer to realize the above image rotation processing method.

また、上記の目的を達成するために、本発明における記憶媒体は、上記の画像回転処理プログラムを記録したコンピュータ読み取り可能な記憶媒体であるように構成することができる。   In order to achieve the above object, the storage medium in the present invention can be configured to be a computer readable storage medium storing the above image rotation processing program.

本発明によれば、デジタル画像の90度単位での回転処理を、より小さなメモリ領域で実現することができる画像回転処理方法、画像処理装置、画像回転処理プログラム及び記憶媒体を提供することができる。   According to the present invention, it is possible to provide an image rotation processing method, an image processing apparatus, an image rotation processing program, and a storage medium that can realize rotation processing of a digital image in units of 90 degrees with a smaller memory area. .

以下、本発明を実施するための最良の形態について図面を参照して説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

(装置構成例)
図2は、本発明の一実施形態に係る画像処理装置の一例を示す図である。図2において、画像処理装置1は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、時計回路14、磁気ディスク装置15、画像90度回転処理部16、ソースデータ符号化部17、画像領域ノイズ除去部18、画像領域内グラデーション化部19、画像領域内面積算出部20、画像領域内変更後の活用部21、CRT(Cathode Ray Tube)画面表示装置22、表示制御部23、キーボード装置24、画面指示装置25、入力制御部26、ネットワークI/F27、ネットワーク伝送制御部28等を有する。
(Device configuration example)
FIG. 2 is a diagram illustrating an example of an image processing apparatus according to an embodiment of the present invention. 2, the image processing apparatus 1 includes a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a clock circuit 14, a magnetic disk device 15, and an image 90-degree rotation processing unit 16. , Source data encoding unit 17, image region noise removing unit 18, image region in-gradation unit 19, image region in-area calculation unit 20, utilization unit 21 after image region change, CRT (Cathode Ray Tube) screen display device 22, a display control unit 23, a keyboard device 24, a screen instruction device 25, an input control unit 26, a network I / F 27, a network transmission control unit 28, and the like.

CPU11は、当該画像処理装置1の動作制御を行う中央演算処理装置である。ROM12は、CPU11が起動時に実行するプログラムや必要なデータ等を記憶するための記憶装置である。   The CPU 11 is a central processing unit that controls the operation of the image processing apparatus 1. The ROM 12 is a storage device for storing a program executed by the CPU 11 at startup, necessary data, and the like.

RAM13は、CPU11のワークエリア等を構成する記憶装置である。時計回路14は、現在日時情報を出力する出力回路である。磁気ディスク装置15は、種々のアプリケーションプログラム、ワークデータ、ファイルデータ、画像データなどの種々のデータを記憶するための記憶装置である。また、本実施形態における画像回転処理プログラムが、当該画像回転処理プログラムを記録したCD(Compact Disc)等の記憶媒体から、非図示のCDドライブ等の記録媒体読取装置を介してインストールされる。   The RAM 13 is a storage device that constitutes a work area or the like of the CPU 11. The clock circuit 14 is an output circuit that outputs current date and time information. The magnetic disk device 15 is a storage device for storing various data such as various application programs, work data, file data, and image data. Further, the image rotation processing program in the present embodiment is installed from a storage medium such as a CD (Compact Disc) on which the image rotation processing program is recorded via a recording medium reading device such as a CD drive (not shown).

画像90度回転処理部16は、磁気ディスク装置15に格納されている画像データに対して右回り又は左回りに90度単位で回転処理を施す画像回転処理手段であり、回転処理が施された画像データは、磁気ディスク装置15に保存された後、後述の画像領域内変更後の活用部21に送信される。   The image 90-degree rotation processing unit 16 is an image rotation processing unit that performs rotation processing in units of 90 degrees clockwise or counterclockwise with respect to the image data stored in the magnetic disk device 15. The image data is stored in the magnetic disk device 15 and then transmitted to the utilization unit 21 after the change in the image area described later.

ソースデータ符号化部17は、後述する入力制御部26で入力された暗号化又は符号化指示に基づき、磁気ディスク装置15に格納された画像データに対して暗号化または符号化を行う。ソースデータ符号化部17により暗号化又は符号化された画像データは、磁気ディスク装置5に保存された後、画像90度回転処理部16、後述の画像領域ノイズ除去部18、画像領域内グラデーション化部19、又は画像領域内面積算出部20などに送信される。   The source data encoding unit 17 encrypts or encodes image data stored in the magnetic disk device 15 based on an encryption or encoding instruction input by an input control unit 26 described later. The image data encrypted or encoded by the source data encoding unit 17 is stored in the magnetic disk device 5, and then the image 90 degree rotation processing unit 16, an image area noise removing unit 18 described later, and gradation in the image area. Is transmitted to the unit 19 or the image area inner area calculation unit 20.

画像領域ノイズ除去部18は、磁気ディスク装置15に格納されている画像データに対して特定画像領域のノイズ除去を行う手段である。ノイズ除去されたデータは、磁気ディスク装置15に保存された後、後述の画像領域内変更後の活用部21に送信される。   The image area noise removing unit 18 is means for removing noise in a specific image area from image data stored in the magnetic disk device 15. The noise-removed data is stored in the magnetic disk device 15 and then transmitted to the utilization unit 21 after being changed in the image area, which will be described later.

画像領域内グラデーション化部19は、磁気ディスク装置15に格納されている画像データに対して特定画像領域内をグラデーション化する手段である。特定画像領域内をグラデーション化されたデータは、磁気ディスク装置15に保存された後、後述の画像領域内変更後の活用部21に送信される。   The in-image area gradation unit 19 is means for gradationizing the inside of the specific image area with respect to the image data stored in the magnetic disk device 15. The gradation data in the specific image area is stored in the magnetic disk device 15 and then transmitted to the utilization unit 21 after the change in the image area described later.

画像領域内面積算出部20は、磁気ディスク装置15に格納されている画像データに対して特定画像領域内のドット面積を算出する手段である。特定画像領域内のドット面積を算出した算出データは、磁気ディスク装置15に保存された後、後述の画像領域内変更後の活用部21に送られる。   The image area inner area calculation unit 20 is a means for calculating the dot area in the specific image area for the image data stored in the magnetic disk device 15. The calculated data obtained by calculating the dot area in the specific image area is stored in the magnetic disk device 15 and then sent to the utilization unit 21 after the change in the image area described later.

画像領域内変更後の活用部21は、画像90度回転処理部16、画像領域ノイズ除去部18、画像領域内グラデーション化部19、又は画像領域内面積算出部20などで変更(加工)又は算出された画像データや算出データを使用して、応用処理を行う。応用処理とは、例えば画像編集、画像圧縮或いは符号化などである。   The utilization part 21 after the change in the image area is changed (processed) or calculated by the image 90 degree rotation processing part 16, the image area noise removal part 18, the gradation part 19 in the image area, or the area calculation part 20 in the image area. Application processing is performed using the image data and the calculated data. The application process is, for example, image editing, image compression, or encoding.

CRT画面表示装置22は、当該画像処理装置1を操作するための画面を表示するための表示装置である。なお、表示装置であれば、CRT画面表示装置に限らないものとする。表示制御部23は、CRT画面表示装置22の表示内容を制御する等の表示に係る制御を行う。   The CRT screen display device 22 is a display device for displaying a screen for operating the image processing apparatus 1. The display device is not limited to the CRT screen display device. The display control unit 23 performs display-related control such as controlling the display contents of the CRT screen display device 22.

キーボード装置24は、当該画像処理装置1に種々のキー操作を行うためのものである。画面指示装置25は、CRT画面表示装置22の任意の点を指示する等の操作作業を行うための指示装置である。例えば、操作パネル等である。入力制御部26は、キーボード装置24および画面指示装置25の入力情報を取り込む等の入力に係る制御を行う。   The keyboard device 24 is for performing various key operations on the image processing apparatus 1. The screen instruction device 25 is an instruction device for performing an operation such as instructing an arbitrary point on the CRT screen display device 22. For example, an operation panel or the like. The input control unit 26 performs control related to input such as capturing input information of the keyboard device 24 and the screen instruction device 25.

ネットワークI/F27は、当該画像処理装置1を非図示の外部ネットワーク等に接続するためのネットワークインタフェース回路等のインタフェース装置である。ネットワーク伝送制御部28は、当該画像処理装置1がネットワークI/F27を介して外部に接続された非図示の他の端末装置との間で種々の情報をやりとりするための伝送に係る制御を行う。   The network I / F 27 is an interface device such as a network interface circuit for connecting the image processing apparatus 1 to an external network (not shown). The network transmission control unit 28 performs control related to transmission for exchanging various information with other terminal devices (not shown) connected to the outside via the network I / F 27 by the image processing apparatus 1. .

以上説明してきたCPU11、ROM12、RAM13、時計回路14、磁気ディスク装置15、画像90度回転処理部16、ソースデータ符号部17、画像領域ノイズ除去部18、画像領域内グラデーション化部19、画像領域内面積算出部20、画像領域内変更後活用部21、表示制御部23、入力制御部26、及び、ネットワーク伝送制御部28は、バス29に接続されており、各要素間のデータのやりとりは主としてバス29を介して行われる。   CPU 11, ROM 12, RAM 13, clock circuit 14, magnetic disk device 15, image 90 ° rotation processing unit 16, source data encoding unit 17, image region noise removing unit 18, image region in-gradation unit 19, image region described above The inner area calculation unit 20, the after-change-in-image-use unit 21, the display control unit 23, the input control unit 26, and the network transmission control unit 28 are connected to a bus 29, and exchange of data between each element is performed. This is mainly done via the bus 29.

また、表示制御部23、入力制御部26は、それぞれCRT画面表示装置22、キーボード装置24(或いは画面指示装置25)によりユーザに対する各種ユーザ・インタフェース機能を実現している。   Further, the display control unit 23 and the input control unit 26 realize various user interface functions for the user by the CRT screen display device 22 and the keyboard device 24 (or the screen instruction device 25), respectively.

表示制御部23は、例えばキーボード装置24におけるキー操作等により、磁気ディスク装置15に格納された(処理前の)画像データと処理後の画像データとを重ね合わせて表示させたり、何れか一方のみを選択して表示させたりするような表示操作機能も実現するものとする。   The display control unit 23 displays the image data stored in the magnetic disk device 15 (before processing) and the processed image data in a superimposed manner by, for example, key operation on the keyboard device 24 or the like. It is also assumed that a display operation function for selecting and displaying is selected.

入力制御部26は、例えば各種操作指示、機能選択指令、編集データ等を入力したり、画像データに対する処理(例えば90度回転処理部16による画像90度回転処理や画像領域ノイズ除去部18によるノイズ除去)を画像ブロック単位で行うためのブロックサイズを入力したり、処理後の画像データを隠蔽する目的で暗号化するとき又は暗号化された画像データを解読するときに、秘密キーを入力したりする。   The input control unit 26 inputs, for example, various operation instructions, function selection commands, editing data, etc., or processes the image data (for example, the image 90 ° rotation processing by the 90 ° rotation processing unit 16 and the noise by the image area noise removal unit 18). Enter the block size for performing (Removal) in units of image blocks, or enter the secret key when encrypting the image data after processing or decrypting the encrypted image data To do.

また、前述してきた各機能部において用いられる画像データは、磁気ディスク装置5に保存されたものに限らない。例えば、ネットワークI/F27を介して外部に接続された非図示の他の端末装置等から受信した画像データであってもよい。また、画像データは、交換可能な記憶媒体を適用できる非図示の光学ディスク装置(例えば、CD−ROM駆動装置、DVD駆動装置等)や、デジタルスチルカメラ装置、スキャナ装置により入力された(取得した)ものであってもよい。   Further, the image data used in each functional unit described above is not limited to that stored in the magnetic disk device 5. For example, it may be image data received from another terminal device (not shown) connected to the outside via the network I / F 27. The image data is input (obtained) by an optical disk device (not shown) to which an exchangeable storage medium can be applied (for example, a CD-ROM drive device, a DVD drive device, etc.), a digital still camera device, or a scanner device. ).

以上の装置構成により、本実施形態における画像処理装置1では、磁気ディスク装置5に格納されている(或いは入力された)画像データは、画像90度回転処理部16により90度単位の回転処理を施される。回転処理が施された画像データは、例えば表示制御部23によってCRT画面表示装置22へ表示される等の出力処理が施される。   With the above apparatus configuration, in the image processing apparatus 1 according to the present embodiment, the image data stored (or input) in the magnetic disk device 5 is subjected to a rotation process in units of 90 degrees by the image 90-degree rotation processing unit 16. Applied. The image data subjected to the rotation process is subjected to an output process such as being displayed on the CRT screen display device 22 by the display control unit 23, for example.

(画像回転処理の動作例)
図3は、本発明の一実施形態に係る画像回転処理の一例を示すフローチャートである。ここでは、画像回転処理の一例として画像データを左回り90度単位で回転する処理を例に説明する。
(Image rotation processing example)
FIG. 3 is a flowchart showing an example of image rotation processing according to an embodiment of the present invention. Here, as an example of the image rotation process, a process of rotating the image data by 90 degrees counterclockwise will be described as an example.

まず、各種設定を入力する(S1)。ここでは、画像処理装置1は、例えばキーボード装置24におけるキー入力に基づき、各種設定情報を入力する。各種設定情報とは、(1)画像回転処理の対象画像データ(2)処理の種類(ここでは、左回り90度など90度単位の回転処理)(3)後述する連鎖処理(ステップS9〜S13)の最初の開始画素(例えば画像データの先頭を基準とした相対アドレスで示す:オフセット値a=0)(4)2回目以降の連鎖処理の開始画素の順番(例えば画像データの先頭を基準とした相対アドレス順)等である。なお、ここでは(4)の2回目以降の連鎖処理の開始画素の順番は、画像データの左上端の画素から右下端の画素の順番であるとする。   First, various settings are input (S1). Here, the image processing apparatus 1 inputs various setting information based on, for example, key input on the keyboard device 24. Various setting information includes (1) target image data for image rotation processing, (2) type of processing (here, rotation processing in units of 90 degrees such as counterclockwise 90 degrees), and (3) chain processing described later (steps S9 to S13). ) Of the first start pixel (for example, indicated by a relative address with respect to the head of the image data: offset value a = 0) (4) The order of the start pixels of the second and subsequent chain processes (for example, the head of the image data is used as a reference) Relative address order). Here, it is assumed that the order of the starting pixels of the second and subsequent chain processes in (4) is the order of the pixels from the upper left corner to the lower right pixels in the image data.

ステップS2へ移って、各種初期設定を行う(S2)。ここでは、画像処理装置1は、ステップS1で入力された各種設定情報に基づき、初期設定を行う。例えば、予め用意した連鎖処理の開始画素のアドレスを格納するアドレス変数Asに、上記(3)で入力された最初の開始画素を設定する(As=a=0)。   Moving to step S2, various initial settings are made (S2). Here, the image processing apparatus 1 performs initial setting based on the various setting information input in step S1. For example, the first start pixel input in the above (3) is set in the address variable As that stores the address of the start pixel of the chain process prepared in advance (As = a = 0).

ステップS3へ移って、全画素を開始画素にした連鎖処理は終了したか否かを判定する(S3)。ステップS3では、画像処理装置1は、画像回転処理の終了を判定している。ここでは、アドレス変数Asに設定された開始画素が対象画像データの最後尾(ここでは右下端)に達したか否かにより判定している。即ち、画像回転処理の終了は、対象画像データ中の上記(4)で入力された順番において最後の画素に対する処理が済んだときとしている。   It moves to step S3 and it is determined whether the chain process which made all the pixels the start pixel was complete | finished (S3). In step S3, the image processing apparatus 1 determines the end of the image rotation process. Here, the determination is made based on whether or not the start pixel set in the address variable As has reached the end of the target image data (here, the lower right end). That is, the end of the image rotation processing is when the processing for the last pixel in the order input in (4) in the target image data is completed.

ステップS3においてYESの場合(S3、YES)、画像回転処理は正常に終了したため、ステップS4へ移って、後処理を行う(S4)。ステップS4では、画像処理装置1は、対象画像データの90度回転処理の実施/未実施判断結果を報告したり、実施の場合には処理後の対象画像データを磁気ディスク装置15に格納したりする等の後処理を行う。   In the case of YES in step S3 (S3, YES), the image rotation process has been completed normally, so the process proceeds to step S4 and post-processing is performed (S4). In step S4, the image processing apparatus 1 reports the execution / non-execution determination result of the 90 ° rotation processing of the target image data, or stores the processed target image data in the magnetic disk device 15 in the case of execution. Perform post-processing such as

ステップS3においてNOの場合(S3、NO)、画像回転処理は終了していないので、ステップS5へ移る。   If NO in step S3 (S3, NO), the image rotation process has not ended, and the process proceeds to step S5.

ステップS5へ移った場合、ステップS2又は後述のステップS14で設定された連鎖処理の開始画素を、現注目画素に設定する(S5)。ここでは、ステップS2又は後述のステップS14でアドレス変数Asに設定された位置の画素を、現注目画素に設定する。現注目画素とは画像処理装置1が現に処理対象とする一画素である。具体的には、予め用意した現注目画素のアドレスを格納する現注目画素位置Aにアドレス変数Asを設定することにより行う(A=As)。これにより、現に処理対象とする一画素を特定すると共に、以降のステップS6〜S8に示す連鎖処理のチェック処理を行う。   When the process proceeds to step S5, the start pixel of the chain process set in step S2 or step S14 described later is set as the current target pixel (S5). Here, the pixel at the position set in the address variable As in step S2 or step S14 described later is set as the current target pixel. The current pixel of interest is one pixel that is currently processed by the image processing apparatus 1. Specifically, it is performed by setting an address variable As at the current target pixel position A that stores the address of the current target pixel prepared in advance (A = As). As a result, one pixel that is actually to be processed is specified, and the check process of the chain process shown in the following steps S6 to S8 is performed.

続いてステップS6へ移って、現注目画素の回転後位置A1を算出する(S6)。ここでは、画像処理装置1は、ステップS5で設定された現注目画素の回転後位置A1を算出する。具体的には、A1=(Floor(A/W)+1)×(W×L+1)―1―L×(1+A)(但し、A:現注目画素の位置、W:回転前の対象画像データの横幅画素数、L:回転前の対象画像データの縦幅画素数)で示される計算をすることにより算出する。   Subsequently, the process proceeds to step S6, and a post-rotation position A1 of the current target pixel is calculated (S6). Here, the image processing apparatus 1 calculates the post-rotation position A1 of the current pixel of interest set in step S5. Specifically, A1 = (Floor (A / W) +1) × (W × L + 1) −1−L × (1 + A) (where A: the position of the current target pixel, W: the target image data before rotation It is calculated by performing a calculation represented by the number of horizontal pixels, L: the number of vertical pixels of the target image data before rotation).

ステップS7へ移って、ステップS6で算出された回転後位置A1にある画素は回転済みか否かを判定する(S7)。ステップS7では、連鎖処理を二重に行うことを防ぐために、回転後位置A1にある画素が回転済みか否かを判定している。具体的には、画像処理装置1は、ステップS6で算出した回転後位置A1が、アドレス変数Asのアドレス値も上位アドレスになっている(即ちA1<As)か否かにより判定する。これは、アドレス変数Asのアドレス値よりも上位アドレスにある画素については既に連鎖処理されたものであるとみなすことができるからである。   Moving to step S7, it is determined whether or not the pixel at the post-rotation position A1 calculated in step S6 has been rotated (S7). In step S7, it is determined whether or not the pixel at the post-rotation position A1 has been rotated in order to prevent the chain processing from being performed twice. Specifically, the image processing apparatus 1 determines whether or not the post-rotation position A1 calculated in step S6 is an upper address (that is, A1 <As) as the address value of the address variable As. This is because it can be considered that the pixel at the higher address than the address value of the address variable As has already been subjected to chain processing.

ステップS7においてYESの場合(S7、YES)、回転後位置A1にある画素は既に回転済みであり、当該連鎖処理空間(ステップS5で設定された現注目画素を開始画素として行う一連の連鎖処理)は既に連鎖処理が済んでいるものとみなして、当該連鎖処理空間のこれ以上の連鎖処理を回避するために、ステップS14へ移る。   In the case of YES in step S7 (S7, YES), the pixel at the post-rotation position A1 has already been rotated, and this chain processing space (a series of chain processes performed using the current pixel of interest set in step S5 as a start pixel) Assuming that the chain processing has already been completed, the flow proceeds to step S14 in order to avoid further chain processing in the chain processing space.

ステップS7においてNOの場合(S7、NO)、回転後位置A1にある画素はまだ未回転であり、当該連鎖処理空間は未だ対称画像データの90度回転処理の為のデータ移動がなされていないと判断して、ステップS8へ移る。   If NO in step S7 (S7, NO), the pixel at the post-rotation position A1 has not yet been rotated, and the chain processing space has not yet been moved for 90 ° rotation processing of symmetric image data. After judging, the process proceeds to step S8.

ステップS8へ移った場合、現在処理中の連鎖処理が終わりかどうかを判定する(S8)。ここでは、画像処理装置1は、回転後位置A1と開始画素のアドレスAsとが同一か否かにより、現在処理中の連鎖処理が終わりかどうかを判定している。これは、回転後位置A1と開始画素のアドレスAsとが同一である場合は、回転後位置が開始画素のアドレスに戻ってきたと判断するためである。   When the process proceeds to step S8, it is determined whether or not the chain process currently being processed is finished (S8). Here, the image processing apparatus 1 determines whether or not the chain process currently being processed is complete depending on whether or not the post-rotation position A1 and the start pixel address As are the same. This is because when the post-rotation position A1 and the address As of the start pixel are the same, it is determined that the post-rotation position has returned to the start pixel address.

ステップS8においてYESの場合(S8、YES)、ステップS9へ移る。ステップS8においてNOの場合(S8、NO)、ステップS6へ戻る。   If YES in step S8 (S8, YES), the process moves to step S9. If NO in step S8 (S8, NO), the process returns to step S6.

以上説明してきたステップS5〜S8の一連の処理は、当該連鎖処理空間が90度回転処理に係る画素の移動を終えているかどうかを判定する処理である。   The series of processes in steps S5 to S8 described above are processes for determining whether or not the chain processing space has finished moving the pixels related to the 90-degree rotation process.

なお、予め対象画像データの画素毎に、回転後位置に移動されたか否か(未移動か移動済)の移動情報を示す例えば1ビットの指標領域(移動情報格納部)を設けて、回転処理が施された画素の移動情報は未移動(例えばビット値0)から移動済(例えばビット値1)に変更するようにしてもよい。この場合、ステップS6〜S8に係る繰り返し工程の代わりにステップS5で設定された現注目画素の移動情報を確認する工程を設けることにより、当該連鎖処理空間が90度回転処理に係る画素の移動を終えているかどうかを更に高速に判定することができる。   In addition, for example, a 1-bit indicator area (movement information storage unit) indicating movement information indicating whether or not the pixel has been moved to the post-rotation position (not moved or moved) is provided for each pixel of the target image data, and rotation processing is performed. The movement information of the pixels that have been subjected to may be changed from unmoved (for example, bit value 0) to moved (for example, bit value 1). In this case, by providing a step of confirming the movement information of the current pixel of interest set in step S5 instead of the repetition step relating to steps S6 to S8, the chain processing space moves the pixels related to the 90-degree rotation process. Whether or not it is finished can be determined at higher speed.

これは、1ビット/ドットの画像データの90度回転処理には向かない(係る領域が確保できれば、回転後の画像データを直接この領域に格納できる為)。一方、2ビット/ドット以上の画像データの90度回転処理では、この領域以外には回転時の画素値退避用として作業領域を1画素データ分だけしか確保(90度回転して1画素ずつ移動する時の移動先の画素値を格納する)出来ない条件下では、最大に高速化が可能となる方法である。   This is not suitable for 90-degree rotation processing of 1-bit / dot image data (because if such a region can be secured, the rotated image data can be directly stored in this region). On the other hand, in the 90-degree rotation processing of image data of 2 bits / dot or more, only a work area for one pixel data is reserved for saving pixel values during rotation in addition to this area (rotated 90 degrees and moved one pixel at a time) This is a method capable of maximizing the speed under conditions in which the pixel value of the movement destination when storing is not possible.

高速化が最大になる理由は、左上端から右下端までなどの順番に全画素に連鎖処理を施す途中で、それぞれの画素を移動処理する前に、この移動情報格納部を確認することにより、既に移動処理が施されていれば、移動処理を回避できるためである。即ち、連鎖処理による複数画素(同一連鎖内)の位置確認を行なう必要が無いことによる。   The reason for the maximum speed is that by checking this movement information storage unit before moving each pixel while performing chain processing on all pixels in the order from the upper left end to the lower right end, etc., This is because the movement process can be avoided if the movement process has already been performed. That is, it is not necessary to confirm the positions of a plurality of pixels (within the same chain) by chain processing.

ところで、このような連鎖処理と、左上端から右下端までなどの順番に全画素に適用する方法、との両方同時に行うと、画素位置の重複が出現する。この重複を避けるために、画像データ全体の全画素に個別に対応する90度回転のための変換済みフラグビット(画素数分のビット数を持ち、初期値はOFFとする)を設け、左上端から右下端までなどの順番に全画素を連鎖処理規則の開始画素として適用する過程において、それぞれの開始画素から連鎖処理によって経る途中の点のフラグビットをONにしていく。その過程で、変換済みフラグビットが既にONの場合は、以前の開始画素からの連鎖処理が既に行われた途中の点であるとみなして現在の開始画素からの連鎖処理を行わないよう回避する効率のよい回避処理が実現できる。   By the way, when both the chain processing and the method of applying to all pixels in the order from the upper left end to the lower right end are performed at the same time, overlapping of pixel positions appears. In order to avoid this duplication, a converted flag bit for 90 degree rotation corresponding to all the pixels of the entire image data (having the number of bits corresponding to the number of pixels and the initial value is OFF) is provided, and the upper left corner In the process of applying all the pixels as the start pixel of the chain processing rule in the order from the right to the lower right, etc., the flag bit at a point halfway through the chain processing from each start pixel is turned ON. In the process, if the converted flag bit is already ON, it is assumed that the chain processing from the previous start pixel is already being performed, and the chain processing from the current start pixel is not performed. Efficient avoidance processing can be realized.

図3に戻り、ステップS9へ移って、連鎖処理を開始する(S9)。ここでは、ステップS2又は後述のステップS14でアドレス変数Asに設定された位置の画素を、現注目画素に設定する。現注目画素とは前述したように画像処理装置1が現に処理対象とする一画素である。具体的には、現注目画素位置Aにアドレス変数Asを設定し(A=As)、さらにここでは、予め用意した現注目画素の画素値を格納するための現注目画素値格納用変数NowDotに、アドレス変数Asに設定された位置の画素の画素値を設定する。   Returning to FIG. 3, the process proceeds to step S9 to start a chain process (S9). Here, the pixel at the position set in the address variable As in step S2 or step S14 described later is set as the current target pixel. As described above, the current pixel of interest is one pixel that is actually processed by the image processing apparatus 1. Specifically, an address variable As is set at the current target pixel position A (A = As), and here, a current target pixel value storage variable NowDot for storing the pixel value of the current target pixel prepared in advance is stored here. The pixel value of the pixel at the position set in the address variable As is set.

ステップS10へ移って、現注目画素の回転後位置を算出する(S10)。ここでは、画像処理装置1は、ステップS9で設定された現注目画素Aの回転後位置A1を算出する。具体的には、A1=(Floor(A/W)+1)×(W×L+1)―1―L×(1+A)(但し、A:現注目画素の位置、W:回転前の対象画像データの横幅画素数、L:回転前の対象画像データの縦幅画素数)で示される計算をすることにより算出する。ステップS10に係る処理は、前述したステップS6に係る処理と同様である。   Moving to step S10, the post-rotation position of the current pixel of interest is calculated (S10). Here, the image processing apparatus 1 calculates the post-rotation position A1 of the current pixel of interest A set in step S9. Specifically, A1 = (Floor (A / W) +1) × (W × L + 1) −1−L × (1 + A) (where A: the position of the current target pixel, W: the target image data before rotation It is calculated by performing a calculation represented by the number of horizontal pixels, L: the number of vertical pixels of the target image data before rotation). The process according to step S10 is the same as the process according to step S6 described above.

続いてステップ11へ移って、ステップS10で算出された回転後位置A1にある画素の画素値を更新する(S11)。ここでは、画像処理装置1は、回転後位置A1の画素値を現注目画素の画素値に変換する処理を行う。具体的には、回転後位置A1にあった画素の画素値を画素値一時格納用変数DotSaveに格納する(退避させる)、と共に、回転後位置A1の画素の画素値を現注目画素の画素値(現注目画素値格納用変数NowDotに格納された画素値)に変更する。これにより、回転後位置A1にある画素の画素値を更新する。   Subsequently, the process proceeds to step 11 where the pixel value of the pixel at the post-rotation position A1 calculated in step S10 is updated (S11). Here, the image processing apparatus 1 performs a process of converting the pixel value at the post-rotation position A1 into the pixel value of the current target pixel. Specifically, the pixel value of the pixel at the post-rotation position A1 is stored (saved) in the pixel value temporary storage variable DotSave, and the pixel value of the pixel at the post-rotation position A1 is set to the pixel value of the current target pixel. (Pixel value stored in the current pixel value storage variable NowDot). Thereby, the pixel value of the pixel at the post-rotation position A1 is updated.

続いてステップS12へ移って、ステップS10で算出された回転後位置A1にあった画素を現注目画素に変換する(S12)。ステップS12は、画像処理装置1が連鎖処理を行うために現注目画素を置き換える処理である。具体的には、現注目画素位置AにステップS10で算出された回転後位置A1を設定する、と共に、ステップS11で画素値一時格納用変数DotSaveに格納されている回転後位置A1にあった画素の画素値を現注目画素値格納用変数NowDotに格納する。   Subsequently, the process proceeds to step S12, and the pixel at the post-rotation position A1 calculated in step S10 is converted to the current target pixel (S12). Step S12 is processing for replacing the current pixel of interest in order for the image processing apparatus 1 to perform chain processing. Specifically, the post-rotation position A1 calculated in step S10 is set to the current target pixel position A, and the pixel at the post-rotation position A1 stored in the pixel value temporary storage variable DotSave in step S11. Are stored in the current pixel value storage variable NowDot.

以上説明してきたステップS11及びS12に係る処理は、90度単位の回転処理のための画素データ移動での連鎖処理でデータが失われることが無いよう、最少量の画素データ(ここでは一画素)を退避させる処理と回復処理を行っている。続いて、ステップS13へ移る。   The processing according to steps S11 and S12 described above is the smallest amount of pixel data (here, one pixel) so that data is not lost in the chain processing in the pixel data movement for the rotation processing in units of 90 degrees. Evacuation processing and recovery processing. Then, it moves to step S13.

ステップS13へ移って、現在処理中の連鎖処理が終わりかどうかを判定する(S13)。ステップS13で具体的には、画像処理装置1は、回転後位置A1とアドレス変数Asのアドレスとが同一か否かにより、現在処理中の連鎖処理が終わりかどうかを判定している。これは、回転後位置A1と開始画素のアドレス変数Asとが同一である場合は、回転後位置A1が開始画素のアドレスに戻ってきたと判断するためである。   The process moves to step S13, and it is determined whether the chain process currently being processed is completed (S13). More specifically, in step S13, the image processing apparatus 1 determines whether or not the chain process currently being processed is complete based on whether or not the post-rotation position A1 and the address of the address variable As are the same. This is because when the post-rotation position A1 and the address variable As of the start pixel are the same, it is determined that the post-rotation position A1 has returned to the start pixel address.

ステップS13においてYESの場合(S13、YES)、現在処理中の連鎖処理は終わったので、ステップS14へ移って、次の連鎖処理の為の開始画素のアドレスを設定する(S14)。ここでは、例えばAs=As+1(例えば、前回の連鎖処理の開始画素の右隣りの画素。それが右端の場合は、次の行の左端の画素)によりアドレス変数Asを再設定する。ステップS14は、次に続く連鎖処理空間の処理を行うために、次の連鎖処理空間の処理開始画素を再設定する処理である。ステップS14に係る処理が終了すると、ステップS3へ戻る。なお、再設定される次の連鎖処理空間の処理開始画素は、画像データ上の未移動画素であるようにすることもできる。未移動の画素の決定は、ステップS5〜8において補足説明した移動情報格納部に格納された移動情報に基づいて行われてもよい。   If YES in step S13 (S13, YES), the chain process currently being processed has been completed, and the process proceeds to step S14 to set the address of the start pixel for the next chain process (S14). Here, the address variable As is reset by, for example, As = As + 1 (for example, the pixel immediately adjacent to the start pixel of the previous chain process. If it is the right end, the address variable As is the left end pixel of the next row). Step S14 is a process of resetting the process start pixel of the next chain process space in order to perform the process of the next chain process space. When the process related to step S14 is completed, the process returns to step S3. Note that the processing start pixel in the next chain processing space to be reset may be an unmoved pixel on the image data. The determination of the unmoved pixel may be performed based on the movement information stored in the movement information storage unit supplementarily described in steps S5 to S8.

ステップS13においてNOの場合(S13、NO)、現在処理中の連鎖処理は終わっていないので、ステップS10へ戻って、ステップS12で変換された現注目画素についてのステップS10〜S12に係る処理を繰り返す。   If NO in step S13 (S13, NO), the chain process currently being processed has not been completed, so the process returns to step S10 and the processes related to steps S10 to S12 are repeated for the current pixel of interest converted in step S12. .

以上で示される処理により、本実施形態に係る画像処理装置1は、画像データを左回り90度単位に回転する処理を行う。   Through the processing described above, the image processing apparatus 1 according to the present embodiment performs processing for rotating the image data counterclockwise by 90 degrees.

なお、上記動作例では、入力された画像データを90度単位(右回り又は左回り)に回転処理して出力する画像回転処理を行うために、1画素ずつの回転後の画素位置を座標変換して求め、その位置の画素値を回転後の画素値として変更している。また、この求めた先の座標位置の変更(回転)前の画素値についても、同様にして回転後の画素位置を算出し、求まった座標位置の画素値を回転後の画素値として変更していく連鎖処理を規則とし(以降、このような規則を「連鎖処理規則」という)、この規則を左上端位置の画素から右下端までなどの順番に全画素に適用して全画素を1回ずつ移動する。これにより、画像回転の為の部分画像領域の一時退避用作業領域を1画素分の領域量だけで可能にしている。   In the above operation example, in order to perform image rotation processing that outputs and outputs input image data in units of 90 degrees (clockwise or counterclockwise), the pixel position after rotation for each pixel is coordinate-transformed. The pixel value at that position is changed as the pixel value after rotation. Further, for the pixel value before the change (rotation) of the previous coordinate position, the pixel position after the rotation is calculated in the same manner, and the pixel value at the obtained coordinate position is changed as the pixel value after the rotation. A chain process is defined as a rule (hereinafter, such a rule is referred to as a “chain process rule”), and this rule is applied to all pixels in the order from the pixel at the upper left position to the lower right position, etc. Moving. As a result, the temporary save work area of the partial image area for image rotation is made possible only by the area amount for one pixel.

また、上記した連鎖処理の規則と、左上端から右下端までなどの順番に全画素に適用する方法、との両方を同時に行なうと、画素位置の重複が出現する。そのため、この重複を避ける為に、全画素位置に漏れなく配置されている1個以上の連鎖処理空間(一つの連鎖処理空間は、スタート点を何処に取っても、連鎖処理して画素を辿って行くとスタート点に戻って来る閉じた特徴がある)に注目し、90度回転のための画素値移動済み(注目する1連鎖処理空間内の画素値ローテーション済み)かどうかを判断する為に、連鎖処理の開始画素を全画素の画素位置として、現注目画素を画像の端から順番に調べるようにすることもできる。   Further, if both the above-described chain processing rule and the method of applying to all the pixels in the order from the upper left end to the lower right end are performed at the same time, overlapping of pixel positions appears. Therefore, in order to avoid this duplication, one or more chain processing spaces that are arranged without omission at all pixel positions (one chain processing space follows a pixel by chain processing regardless of where the start point is taken. In order to determine whether or not the pixel value has been moved for 90 ° rotation (the pixel value has been rotated within the one-chain processing space of interest). Alternatively, the current pixel of interest can be examined in order from the end of the image, with the start pixel of the chain process as the pixel position of all pixels.

ここで、現在注目している画像座標上の画素に繋がる一つの連鎖処理空間が、これまで調べてきた画像座標(例えば上位位置)に繋がっていない場合は、90度回転用画素移動の為の内部データローテーションが行なわれていない連鎖処理空間とみなして、内部データローテーションを、一つの連鎖処理空間内の内部データローテーションを途中止めにして、次の連鎖処理空間を捜索することなく行う。   Here, when one chain processing space connected to the pixel on the image coordinates of interest is not connected to the image coordinates (for example, the upper position) examined so far, it is necessary to move the pixel for 90 degree rotation. Assuming that the internal data rotation is not performed, the internal data rotation is performed without stopping the internal data rotation in one chain processing space and searching for the next chain processing space.

そのため、以下に掲げる利点を奏する。その利点について以下説明を行う。   Therefore, the following advantages are exhibited. The advantages will be described below.

通常、スキャナやカメラで読取る画像は矩形で扱われ、矩形内の画像の特徴として、線形状や帯状(水平・地平線は横、柱は縦、床・天井は横など)のものが矩形の縦線又は横線に平行して存在することが多く、人が使う上で、縦と横を識別し画像の縦横を変更する用途は、日常発生している。   Normally, an image read by a scanner or camera is handled as a rectangle, and the image within the rectangle is characterized by a line shape or strip shape (horizontal / horizontal is horizontal, columns are vertical, floor / ceiling are horizontal), etc. It often exists in parallel with a line or a horizontal line, and for use by humans, an application for identifying the vertical and horizontal directions and changing the vertical and horizontal directions of an image has occurred daily.

本実施形態に係る画像回転処理方法によれば、画質の劣化が発生しない特徴を持つ画像の縦横を変更(画像を90度単位で回転)する機能が、画像回転を助ける為の作業領域を不要化又は最小化し、かつ、高速処理化することは、原画像が存在しさえすれば、その環境において新たな処理高速化設計不要で画像回転できることができるという利点を奏する。   According to the image rotation processing method according to the present embodiment, the function of changing the vertical / horizontal direction of the image having the characteristic that the image quality does not deteriorate (the image is rotated in units of 90 degrees) does not require a work area for assisting the image rotation. Minimization or minimization and high-speed processing have the advantage that as long as the original image exists, the image can be rotated in the environment without the need for a new processing speed-up design.

また、前述した図1の従来例では、画素値を移動するために画素値群の一部を作業領域に退避している間に、その退避していた画素値群が90度回転により収納されるべきアドレスを空ける為に、退避できなかった画素値群の位置をずらす処理をしていた。一方、本実施形態に係る画像回転処理方法では、このような処理を行う必要がないことにより、処理の高速可が可能になる。   Further, in the conventional example of FIG. 1 described above, while a part of the pixel value group is saved in the work area in order to move the pixel value, the saved pixel value group is stored by rotating 90 degrees. In order to make an address that should be saved, a process of shifting the position of the pixel value group that could not be saved was performed. On the other hand, in the image rotation processing method according to the present embodiment, since it is not necessary to perform such processing, high-speed processing is possible.

続いて、本動作例について以下に補足説明を行う。   Subsequently, supplementary explanation will be given below for this operation example.

上記した連鎖処理の規則を、矩形画像の中心を基準にして点対称位置関係にある、例えば、左上端画素と右下端画素に適用すると、両者が同一の連鎖処理上の中に存在しない場合を考えてみる。この場合、左上端から右下端までなどの順番に全画素を連鎖処理規則の開始画素として適用する過程において、点対称位置関係にある二点をそれぞれ別々の開始画素にする二系統の連鎖処理を回避すべきかどうかについての判断(「以前の開始画素からの連鎖処理が既に行なわれたものであるとみなして現在の開始画素からの連鎖処理を行わない」回避規制に関する判断)を同判断(二系統の内の一系統だけを調べるだけで済ませられる)できることによって、連鎖処理の重複を効率良く避けることができる。   When the above-described rule of chain processing is applied to a point-symmetric positional relationship with respect to the center of the rectangular image, for example, to the upper left pixel and the lower right pixel, both cases are not present in the same chain processing. I'll think about it. In this case, in the process of applying all the pixels as the start pixel of the chain processing rule in the order from the upper left end to the lower right end, etc. The same judgment (2) (determination regarding avoidance restriction that “a chain process from the previous start pixel is considered to have already been performed and the chain process from the current start pixel is not performed”) is determined (2) It is possible to efficiently avoid duplication of chain processing by being able to study only one of the systems).

即ち、連鎖処理の規則を、矩形画像の中心を基準にして点対称位置関係にある、例えば、左上端画素と右下端画素に適用すると、両者が同一の連鎖処理上の中に存在しない場合は、90度回転の重複を回避するための捜索において、約半分の捜索量で済ませられるため、より高速処理が実現できる。   That is, when the rule of the chain process is applied to the upper left pixel and the lower right pixel when the rule of the chain process is point-symmetrical with respect to the center of the rectangular image, for example, both are not present in the same chain process. In the search for avoiding the duplication of the 90-degree rotation, the search amount can be reduced by about half, so that higher-speed processing can be realized.

また、上記した連鎖処理の規則を、矩形画像の中心を基準にして点対称位置関係にある、例えば、左上端画素と右下端画素に適用すると、両者が同一の連鎖処理上の中に存在する場合を考えてみる。この場合、左上端から右下端までなどの順番に全画素を連鎖処理規則の開始画素として適用する過程において、点対称位置関係にある二点をそれぞれ別々の開始画素にする二系統の連鎖処理を回避すべきかどうか判断(以前の開始画素からの連鎖処理が既に行なわれたものであるとみなして現在の開始画素からの連鎖処理を行わない回避規制に関する判断)するための調査を行なう必要が無い(別々の二系統にはならず、一系統だけの意味になるので)ことによって、連鎖処理の重複を効率良く避けることができる。   In addition, when the above-described rule of chain processing is applied to a point-symmetric positional relationship with respect to the center of the rectangular image, for example, the upper left pixel and the lower right pixel, both exist in the same chain processing. Consider the case. In this case, in the process of applying all the pixels as the start pixel of the chain processing rule in the order from the upper left end to the lower right end, etc. There is no need to conduct an investigation to determine whether to avoid (determination regarding avoidance regulation that does not perform chain processing from the current start pixel, assuming that chain processing from the previous start pixel has already been performed) (Because it means only one system, not two separate systems), it is possible to efficiently avoid duplication of chain processing.

即ち、連鎖処理の規則を、矩形画像の中心を基準にして点対称位置関係にある、例えば、左上端画素と右下端画素に適用すると、両者が同一の連鎖処理上の中に存在する場合は、90度回転の重複を回避するための捜索に於いて、約半分の捜索量で済ませられるため、より高速処理が実現できる。   That is, when the rule of chain processing is applied to the upper left pixel and the lower right pixel, for example, when they are in a point-symmetrical positional relationship with respect to the center of the rectangular image, when both exist in the same chain processing, In the search for avoiding the overlap of 90 degree rotation, the search amount can be reduced by about half, so that higher speed processing can be realized.

また、以上に示す変形例において説明してきた両方法を適用すれば、全体で約半分の捜索量で済ませられ、より高速処理が実現できる。   Further, by applying both methods described in the modification examples described above, the search amount can be reduced to about half as a whole, and higher-speed processing can be realized.

ところで、連鎖処理の規則と、左上端から右下端までなどの順番に全画素に適用する方法、との両方を同時に行うと、画素位置の重複が出現するので、この重複を避ける為に連鎖処理を行わない回避規制について、対象画像データが正方形(回転対称矩形の縦横が素数が同じ)画像データの場合を考えてみる。この場合、原画像のどの位置を開始画素にしても位置連鎖処理に含まれる画素位置並びは、常に、この正方形の中心点を通る縦横方向それぞれの対称軸に関して対象の位置になる2点及び正方形の中心点に関して点対称の位置になる点を加えた4点となる。そのため、開始画素を、原画像の縦横それぞれ半分の画素数の大きさで原画像の左上又は右上又は左下又は右下に形成する4つの正方形のいずれかの範囲に限定することができる。   By the way, if both the rule of chain processing and the method of applying to all pixels in the order from the upper left end to the lower right end are performed at the same time, pixel position overlap appears. As for the avoidance regulation that does not perform the above, let us consider a case in which the target image data is image data that is square (the rotation symmetry rectangle has the same prime number in the vertical and horizontal directions). In this case, regardless of which position of the original image is the start pixel, the pixel position sequence included in the position chain process is always two points and a square that are the target positions with respect to the symmetry axes in the vertical and horizontal directions passing through the center point of the square. The number of points becomes a point that is symmetrical with respect to the center point. Therefore, the start pixel can be limited to one of four squares formed in the upper left, upper right, lower left, or lower right of the original image with half the number of pixels in the vertical and horizontal directions of the original image.

即ち、対象画像データが正方形の場合は、90度回転処理がかなり簡素に実行できることを表す。かつ、連鎖処理の開始画素を画像全体の1/4の面積を占める連続した領域に集中する。これにより、例えば、1ビット/ドット画像データなど、隣り合う複数の画素値が1バイト(=8ビット)や1ワード(=16ビットなど)内に詰め込まれている場合で、隣り合う複数の画素値を連続処理する時に、画像データの取り出し、又は格納に効率(処理速度を向上できる)が良いものとなる。   That is, when the target image data is a square, the 90-degree rotation process can be executed fairly simply. In addition, the start pixels of the chain process are concentrated on a continuous area that occupies a quarter of the entire image. Thereby, for example, when a plurality of adjacent pixel values such as 1 bit / dot image data are packed in 1 byte (= 8 bits) or 1 word (= 16 bits), a plurality of adjacent pixels When the values are continuously processed, the image data can be extracted or stored efficiently (processing speed can be improved).

また、対象画像データが正方形(回転対象矩形の縦横画素数が同じ)画像データの場合の画素移動の為に規制となる前述した(開始画素を、原画像の縦横それぞれ半分の画素数の大きさで原画像の左上又は右上又は左下又は右下に形成する4つの正方形のいずれかの範囲に限定する方法)では、画素移動の順番を、先に、上記4つの小正方形(原画像の縦横共に1/2の大きさの画像)内をそれぞれの中心点を固定してそれぞれ独立に90度回転移動し、その後で4つの小正方形単位にまとめて平行移動(ローテーション)する順番に変更することもできる。なお、小正方形単位は4つの場合に限らないものとする。   In addition, as described above, which is regulated for pixel movement when the target image data is square (the same number of vertical and horizontal pixels in the rotation target rectangle), the above-described restriction (the start pixel is half the number of pixels in the vertical and horizontal directions of the original image). In the upper left or upper right or the lower left or lower right of the original image), the order of pixel movement is set to the above four small squares (both vertically and horizontally in the original image). It is also possible to change the order in which each center point is fixed and rotated 90 degrees independently within a half size image and then translated into four small square units in parallel (rotation). it can. Note that the number of small square units is not limited to four.

即ち、対象画像データ全体の90度回転を、複数の大きさの領域に分けて多段処理するものであり、画像小領域を90度回転する処理を先に行なって、何らかの加工をしてから、画像全体大領域を形成する場合に有効である。   That is, the 90 degree rotation of the entire target image data is divided into a plurality of size areas and processed in multiple stages, and the processing for rotating the image small area by 90 degrees is performed first, and after some processing, This is effective when a large area of the entire image is formed.

ここで、画像データ全体の90度回転を、複数の大きさの領域に分けて多段処理する原理は、以下に説明する。   Here, the principle of performing multi-stage processing of the 90-degree rotation of the entire image data by dividing it into a plurality of size areas will be described below.

(画像全体の90度回転を処理する原理)
ここでは、本実施の形態に係る画像全体の90度回転処理を多段処理する原理について説明を行う。なお、一辺の長さ=L*8(画素数,'*'は掛け算を表す)の正方形を形成する画像データが、正方形の左上端から右上端に、その後1行下の左端から右端に向かって、以下同様に右下端まで順番に連続して格納されている場合に、左回りに90度回転する場合を例に説明する。
(Principle to process 90 degree rotation of entire image)
Here, the principle of performing multi-stage processing of 90 ° rotation processing of the entire image according to the present embodiment will be described. Note that image data forming a square of one side length = L * 8 (number of pixels, where “*” represents multiplication) is from the upper left end of the square to the upper right end, and then from the left end to the right end of one row below. In the same manner, a case where the image is rotated 90 degrees counterclockwise when sequentially stored in the order up to the lower right corner will be described below.

このとき、画像データ上の任意の画素の位置座標(x,y)と、該任意の画素の90度回転移動後の位置座標(X、Y)の関係は、
X=y‥‥‥‥‥‥‥‥式(1)
Y=L*8−1−x‥‥式(2)
になる(但し、x,y,X,Yは0〜(L*8−1)の範囲の値である)。
At this time, the relationship between the position coordinates (x, y) of an arbitrary pixel on the image data and the position coordinates (X, Y) of the arbitrary pixel after being rotated 90 degrees is
X = y ………………………… Formula (1)
Y = L * 8-1-x Equation (2)
(However, x, y, X, and Y are values in the range of 0 to (L * 8-1)).

そこで、x=(x2×8)+x1 ,y=(y2×8)+y1として、
x2=Floor(x/8), x1=x mod 8
y3=Floor(y/8), y1=y mod 8
(但し、Floor(z)はzを超えない最大整数,(w)mod8は8を法とするwの剰余値)
とすると、
X1=y1,
Y1=L1−1−x1
となる。なお、L1=8であり、座標(x1,y1),(X1,Y1)はそれぞれ左回り90度回転する前と後の正方形(一辺の長さ=8)内の画素の座標値を表す。
Therefore, x = (x2 × 8) + x1, y = (y2 × 8) + y1,
x2 = Floor (x / 8), x1 = x mod 8
y3 = Floor (y / 8), y1 = y mod 8
(However, Floor (z) is the largest integer not exceeding z, (w) mod8 is the remainder of w modulo 8)
Then,
X1 = y1,
Y1 = L1-1-x1
It becomes. Note that L1 = 8, and the coordinates (x1, y1) and (X1, Y1) represent the coordinate values of the pixels in the square (length of one side = 8) before and after rotating 90 degrees counterclockwise.

同様にして
X2=y2,
Y2=L2−1−x2,
となる。なお、L2=Lであり、座標(x2,y2),(X2,Y2)はそれぞれ左回り90度回転する前と後の正方形(一辺の長さ=L)内の画素の座標値を表す。
Similarly, X2 = y2,
Y2 = L2-1-x2,
It becomes. Note that L2 = L, and the coordinates (x2, y2) and (X2, Y2) represent the coordinate values of the pixels in the square (length of one side = L) before and after rotating counterclockwise by 90 degrees.

X=(X2*8)+X1,Y=(Y2*8)+Y1とすると、
X=(y2*8)+y1=y‥‥即ち、式(1)と同じになる。
If X = (X2 * 8) + X1, Y = (Y2 * 8) + Y1,
X = (y2 * 8) + y1 = y In other words, it is the same as the equation (1).

Y=((L2−1−x2)*8)+L1−1−x1=L*8−1−((x2*8)+x1)=L*8−1−x‥‥即ち、式(2)と同じになる。   Y = ((L2-1-x2) * 8) + L1-1-x1 = L * 8-1-((x2 * 8) + x1) = L * 8-1-x... Be the same.

次に、上述してきた画像回転処理について、各具体例を挙げて説明する。   Next, the image rotation process described above will be described with specific examples.

(具体例1)
図4は、画像回転処理の第一の具体例を説明するための図である。図4では、2×2ドットの正方形画像データ(画素a,b,c,dにより構成される)を左回りに90度回転する場合の、移動前後の画素状態と移動で連鎖する点の位置関係を示している。
(Specific example 1)
FIG. 4 is a diagram for explaining a first specific example of the image rotation process. In FIG. 4, when 2 × 2 dot square image data (consisting of pixels a, b, c, and d) is rotated 90 degrees counterclockwise, the pixel state before and after the movement and the position of the chain linked by the movement Showing the relationship.

例えば、aの位置の画素は、90度回転移動後は、移動前のcの位置に移動することを表している。また、図中の矢印が示す位置関係を辿ると、移動前にaから開始した連鎖処理は、全てのの画素位置を通って、元のaの位置に戻ってきており、連鎖処理空間の数は1組であることが分かる。   For example, the pixel at the position “a” represents that the pixel moves to the position “c” before the movement after 90 degrees of rotation. Further, when following the positional relationship indicated by the arrows in the figure, the chain processing started from a before the movement returns to the original position a through all the pixel positions, and the number of chain processing spaces It turns out that is one set.

(具体例2)
図5は、画像回転処理の第二の具体例を説明するための図である。図5では、2×3ドットの矩形画像データ(上位アドレスから順にa,b,c,d,e,fの並び)を、左回りに90度回転する場合の、移動前後の画素状態と移動で連鎖する点の位置関係を示している。
(Specific example 2)
FIG. 5 is a diagram for explaining a second specific example of the image rotation processing. In FIG. 5, 2 × 3 dot rectangular image data (a, b, c, d, e, f in order from the higher address) is rotated 90 degrees counterclockwise, and the pixel state before and after the movement and the movement The positional relationship of the points linked by is shown.

この場合も矢印によって、移動前の画素の位置が90度回転した移動後にどこの位置になるかを表している。この90度回転処理は、2×3ドットの矩形画像データ(6ドット分)が格納出来る領域の大きさのままで、データの並び替えだけで、3×2ドットの矩形画像表現(上位アドレスから順にb,d,f,a,c,eの並び)に変更する方法である。また、図中の矢印が示す位置関係を辿ると、移動前にaから開始した連鎖処理は、a→d→b→aと辿って閉じていることから、a→d→bで一つの連鎖処理空間を形成し、同様に、c→e→fでもう一つの連鎖処理空間を形成して、併せて2組の連鎖処理空間で構成されていることが分かる。   Also in this case, the position of the pixel before the movement is indicated by the arrow, which is the position after the movement after being rotated by 90 degrees. This 90-degree rotation processing is a size of an area where 2 × 3 dot rectangular image data (6 dots) can be stored, and only by rearranging the data, a 3 × 2 dot rectangular image representation (from the upper address). (B, d, f, a, c, e). When the positional relationship indicated by the arrows in the figure is traced, the chain process started from a before the movement is closed by tracing from a → d → b → a. It can be seen that a processing space is formed, and similarly, another chain processing space is formed by c → e → f, and two sets of chain processing spaces are combined.

(具体例3)
図6は、画像回転処理の第三の具体例を説明するための図である。図6では、2×4ドットの矩形画像データ(上位アドレスから順にa,b,c,d,e,f,g,hの並び)を、左回りに90度回転し、4×2ドットの矩形画像データ(上位アドレスから順にb,d,f,h,a,c,e,gの並び)に変更する場合の、移動前後の画素状態と移動で連鎖する点の位置関係を示している。連鎖処理空間は、a→e→g→h→d→b→aの組と、c→f→cの組の2組であることが分かる。
(Specific example 3)
FIG. 6 is a diagram for explaining a third specific example of the image rotation process. In FIG. 6, 2 × 4 dot rectangular image data (a, b, c, d, e, f, g, h in order from the higher address) is rotated 90 degrees counterclockwise and 4 × 2 dots The positional relationship between the pixel state before and after the movement and the point chained by the movement when changing to rectangular image data (arrangement of b, d, f, h, a, c, e, g in order from the higher address) is shown. . It can be seen that there are two sets of chain processing space, a set of a → e → g → h → d → b → a and a set of c → f → c.

ここでは、前述した図3のフローチャートで示す画像回転処理において、上記した連鎖処理の規則を、矩形画像データの中心を基準にして点対称位置関係にある、例えば、左上端画素と右下端画素に適用してもよい。このとき、両者が同一の連鎖処理上の中に存在しない場合は、90度回転の重複を回避するための捜索において、約半分の捜索量で済ませられる。   Here, in the image rotation process shown in the flowchart of FIG. 3 described above, the above-described rule of the chain process is applied to, for example, the left upper end pixel and the right lower end pixel that are in a point-symmetric positional relationship with respect to the center of the rectangular image data. You may apply. At this time, if the two do not exist in the same chain process, about half of the search amount can be completed in the search for avoiding duplication of 90-degree rotation.

(具体例4)
図7は、画像回転処理の第四の具体例を説明するための図である。ここでは、具体例4として、4×3ドットの矩形画像データ(上位アドレスから順にa,b,c,d,e,f,g,h,i,j,k,lの並び)を、左回りに90度回転し、3×4ドットの矩形画像データ(上位アドレスから順にd,h,l,c,g,k,b,f,j,a,e,iの並び)に変更する場合の、移動前後の画素状態と移動で連鎖する点の位置関係を示しており、連鎖処理空間は、a→j→i→l→c→d→aの組と、b→g→e→k→f→h→bの組の2組であることが分かる。
(Specific example 4)
FIG. 7 is a diagram for explaining a fourth specific example of the image rotation processing. Here, as specific example 4, 4 × 3 dot rectangular image data (a, b, c, d, e, f, g, h, i, j, k, l in order from the higher address) When rotating 90 degrees around and changing to rectangular image data of 3 × 4 dots (d, h, l, c, g, k, b, f, j, a, e, i in order from the higher address) The positional relationship between the pixel state before and after the movement and the point chained by the movement is shown. The chain processing space includes a set of a → j → i → l → c → d → a and b → g → e → k. It can be seen that there are two sets of → f → h → b.

ここでも、具体例3と同様に、前述した図3のフローチャートで示す画像回転処理において、上記した連鎖処理の規則を、矩形画像データの中心を基準にして点対称位置関係にある、例えば、左上端画素と右下端画素に適用してもよい。このとき、両者が同一の連鎖処理上の中に存在しない場合は、90度回転の重複を回避するための捜索において、約半分の捜索量で済ませられる。   Here, as in the specific example 3, in the image rotation processing shown in the flowchart of FIG. 3 described above, the above-described chain processing rule is point-symmetrical with respect to the center of the rectangular image data. You may apply to an end pixel and a lower right pixel. At this time, if the two do not exist in the same chain process, about half of the search amount can be completed in the search for avoiding duplication of 90-degree rotation.

以上、実施形態に基づき本発明の説明を行ってきたが、上記実施形態にあげたその他の要素との組み合わせなど、ここで示した要件に本発明が限定されるものではない。これらの点に関しては、本発明の主旨をそこなわない範囲で変更することが可能であり、その応用形態に応じて適切に定めることができる。   As described above, the present invention has been described based on the embodiments, but the present invention is not limited to the requirements shown here, such as combinations with other elements listed in the above embodiments. With respect to these points, the present invention can be changed within a range that does not detract from the gist of the present invention, and can be appropriately determined according to the application form.

従来の画像回転処理の一例を説明するための図である。It is a figure for demonstrating an example of the conventional image rotation process. 本発明の一実施形態に係る画像処理装置の一例を示す図である。It is a figure which shows an example of the image processing apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る画像回転処理の一例を示すフローチャートである。It is a flowchart which shows an example of the image rotation process which concerns on one Embodiment of this invention. 画像回転処理の第一の具体例を説明するための図である。It is a figure for demonstrating the 1st specific example of an image rotation process. 画像回転処理の第二の具体例を説明するための図である。It is a figure for demonstrating the 2nd specific example of an image rotation process. 画像回転処理の第三の具体例を説明するための図である。It is a figure for demonstrating the 3rd specific example of an image rotation process. 画像回転処理の第四の具体例を説明するための図である。It is a figure for demonstrating the 4th specific example of an image rotation process.

符号の説明Explanation of symbols

1 画像処理装置
11 CPU
12 ROM
13 RAM
14 時計回路部
15 磁気ディスク装置
16 画像90度回転処理部
17 ソースデータ符号部
18 画像領域ノイズ除去部
19 画像領域内グラデーション化部
20 画像領域内面積算出部
21 画像領域内変更後活用部
22 CRT画面表示装置
23 表示制御部
24 キーボード装置
25 画面指示装置
26 入力制御部
27 ネットワークインタフェース回路
28 ネットワーク伝送制御部
1 Image processing device 11 CPU
12 ROM
13 RAM
DESCRIPTION OF SYMBOLS 14 Clock circuit part 15 Magnetic disk apparatus 16 Image 90 degree | times rotation process part 17 Source data encoding part 18 Image area noise removal part 19 Image area gradation part 20 Image area area calculation part 21 Utilization part after change in image area 22 CRT Screen display device 23 Display control unit 24 Keyboard device 25 Screen instruction device 26 Input control unit 27 Network interface circuit 28 Network transmission control unit

Claims (9)

入力された画像データを90度単位に回転処理して出力する画像処理装置における画像回転処理方法であって、
前記画像データ上の所定の回転開始画素の回転後位置を算出する回転後位置算出工程と、
前記回転後位置の画素の画素値を、画素値一時格納部に格納する画素値格納工程と、
前記回転後位置の画素の画素値を、前記所定の回転開始画素の画素値に変更する画素値変更工程と、
前記所定の回転開始画素を前記回転後位置の画素に置き換えて前記回転後位置算出工程、画素値格納工程及び画素値変更工程の処理を順次繰り返す連鎖処理工程と、
を有し、
前記画像データ上の全画素はそれぞれ一回の移動により回転後位置に移動されることを特徴とする画像回転処理方法。
An image rotation processing method in an image processing apparatus that outputs and outputs input image data in units of 90 degrees,
A post-rotation position calculating step of calculating a post-rotation position of a predetermined rotation start pixel on the image data;
A pixel value storing step of storing the pixel value of the pixel at the post-rotation position in a pixel value temporary storage unit;
A pixel value changing step of changing the pixel value of the pixel at the post-rotation position to the pixel value of the predetermined rotation start pixel;
A chain processing step of sequentially replacing the post-rotation position calculation step, the pixel value storage step, and the pixel value change step by replacing the predetermined rotation start pixel with the post-rotation position pixel;
Have
An image rotation processing method, wherein all the pixels on the image data are moved to a post-rotation position by one movement.
前記連鎖処理工程の終了後に、前記画像データ上の未移動画素がある場合には、該未移動画素を前記所定の回転開始画素として再設定する再設定工程をさらに有することを特徴とする請求項1に記載の画像回転処理方法。   The method further comprises a resetting step of resetting the non-moving pixel as the predetermined rotation start pixel when there is a non-moving pixel on the image data after the chain processing step. 2. The image rotation processing method according to 1. 前記画像処理装置は、前記画像データ上の各々の画素について未移動か移動済かの移動情報を格納する移動情報格納部を備え、
前記再設定工程では、再設定すべき前記未移動画素を、前記移動情報格納部に格納された各々の画素の移動情報に基づいて決定することを特徴とする請求項2に記載の画像回転処理方法。
The image processing apparatus includes a movement information storage unit that stores movement information indicating whether each pixel on the image data is unmoved or moved,
3. The image rotation process according to claim 2, wherein in the resetting step, the unmoved pixel to be reset is determined based on movement information of each pixel stored in the movement information storage unit. Method.
前記再設定工程では、前記画像データが縦/横の画素数が同一の画像データである場合には、前記画像データを四の正方形領域に分割したいずれか一の領域に属する画素から、再設定すべき前記未移動画素を検索することを特徴とする請求項2又は3に記載の画像回転処理方法。   In the resetting step, when the image data is image data having the same number of vertical / horizontal pixels, the resetting is performed from pixels belonging to any one area obtained by dividing the image data into four square areas. 4. The image rotation processing method according to claim 2, wherein the unmoved pixel to be searched is searched. 前記再設定工程では、前記画像データ上の左上端から右下端の順番に、再設定すべき前記未移動画素を検索することを特徴とする請求項2乃至4のいずれか一項に記載の画像回転処理方法。   5. The image according to claim 2, wherein in the resetting step, the unmoved pixels to be reset are searched in order from the upper left end to the lower right end on the image data. 6. Rotation processing method. 入力された縦/横の画素数が同一の画像データを90度単位に回転処理して出力する画像処理装置における画像回転処理方法であって、
前記画像データを複数の正方形領域に分割する領域分割工程と、
分割された各々の正方形領域内の所定の回転開始画素の、対応する正方形領域の中心を回転中心としたときの回転後位置を算出する回転後位置算出工程と、
前記回転後位置の画素の画素値を、画素値一時格納部に格納する画素値格納工程と、
前記回転後位置の画素の画素値を、前記所定の回転開始画素の画素値に変更する画素値変更工程と、
前記所定の回転開始画素を前記回転後位置の画素に置き換えて前記回転後位置算出工程、画素値格納工程及び画素値変更工程の処理を順次繰り返す連鎖処理工程と、
上記各工程により各々の正方形領域内の全画素が回転後位置に移動された前記複数の正方形領域を、当該回転処理における回転角に応じて平行移動する平行移動工程と、
を有することを特徴とする画像回転処理方法。
An image rotation processing method in an image processing apparatus for rotating and outputting input image data having the same number of vertical / horizontal pixels in units of 90 degrees,
A region dividing step of dividing the image data into a plurality of square regions;
A post-rotation position calculating step for calculating a post-rotation position of the predetermined rotation start pixel in each divided square area when the center of the corresponding square area is the rotation center;
A pixel value storing step of storing the pixel value of the pixel at the post-rotation position in a pixel value temporary storage unit;
A pixel value changing step of changing the pixel value of the pixel at the post-rotation position to the pixel value of the predetermined rotation start pixel;
A chain processing step of sequentially replacing the post-rotation position calculation step, the pixel value storage step, and the pixel value change step by replacing the predetermined rotation start pixel with the post-rotation position pixel;
A parallel movement step of translating the plurality of square regions in which all the pixels in each square region have been moved to the post-rotation positions by the respective steps according to a rotation angle in the rotation processing;
An image rotation processing method characterized by comprising:
請求項1乃至6のいずれか一に記載の画像回転処理方法の各工程を実現することを特徴とする画像処理装置。   An image processing apparatus that implements each step of the image rotation processing method according to claim 1. コンピュータに、請求項1乃至6のいずれか一に記載の画像回転処理方法を実現させるための画像回転処理プログラム。   An image rotation processing program for causing a computer to realize the image rotation processing method according to any one of claims 1 to 6. 請求項8に記載の画像回転処理プログラムを記録したコンピュータ読み取り可能な記憶媒体。   A computer-readable storage medium in which the image rotation processing program according to claim 8 is recorded.
JP2007241589A 2007-09-18 2007-09-18 Image rotation processing method, image processing apparatus, image rotation processing program and storage medium Pending JP2009076989A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007241589A JP2009076989A (en) 2007-09-18 2007-09-18 Image rotation processing method, image processing apparatus, image rotation processing program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007241589A JP2009076989A (en) 2007-09-18 2007-09-18 Image rotation processing method, image processing apparatus, image rotation processing program and storage medium

Publications (1)

Publication Number Publication Date
JP2009076989A true JP2009076989A (en) 2009-04-09

Family

ID=40611575

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007241589A Pending JP2009076989A (en) 2007-09-18 2007-09-18 Image rotation processing method, image processing apparatus, image rotation processing program and storage medium

Country Status (1)

Country Link
JP (1) JP2009076989A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113344775A (en) * 2021-06-18 2021-09-03 北京澎思科技有限公司 Image processing method, image processing device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113344775A (en) * 2021-06-18 2021-09-03 北京澎思科技有限公司 Image processing method, image processing device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JPWO2017149591A1 (en) Image processing device
JP2007058614A (en) Slide-show generation device, data-generation device for slide show, their control methods, and their control programs
JP5703898B2 (en) Form management system, form image management method, and program
JP4380740B2 (en) Image processing device
JP2009076989A (en) Image rotation processing method, image processing apparatus, image rotation processing program and storage medium
JP5597175B2 (en) Image compression apparatus and image processing system
JP2016134005A (en) Image processor
JP6524644B2 (en) Image processing apparatus and electronic device
JP6278716B2 (en) Image processing apparatus, image processing method, and program
JP2012175164A (en) Image processing device, image processing method, program, and recording medium
JP2007249791A (en) Image processor, image processing method and program
JP2009042338A (en) Pixel number conversion method, device, and program
JP2012019315A (en) Image processor and image processing method
JP5708653B2 (en) Image data forming method, image data writing method, and image data processing circuit
JP6215861B2 (en) Image enlarging apparatus and image enlarging method
JP2005091871A (en) Image data compression method
US9501858B2 (en) Display device and computer
JP3637283B2 (en) Information embedding device
JP6241670B2 (en) Image processing device
WO2012011211A1 (en) Thumbnail image generation device, magnified image generation device, thumbnail image generation method, and magnified image generation method
JP2006165825A (en) Image processor, image processing method, image processing program and storage medium
JP2007293606A (en) Image processor
JP2006173876A (en) Image processor and processing method
JP2019074916A (en) Host device, system, method, and program
JP2012238154A (en) Image processing apparatus, image processing system and image processing method