IMAGE ROTATING SYSTEM BY AN ARBITRARY ANGLE

Abstract: An image rotating system by an arbitrary angle which is effective in image processing techniques using terminal equipments such as a workstation, and will not distort a rotated image even with a rotation angle theta increasing. Skew transformation is implemented for respective skew angles in horizontal and vertical directions corresponding to a desired rotation angle three times alternately, so that affine transformation for image rotation may be replaced by triple skew transformations. Thus, arbitrary two-dimensional image data is precisely rotated by any desired angle at high speeds without resorting to approximation of the arithmetic equation.

Description: SPECIFICATION TITLE OF THE INVENTION IMAGE ROTATING SYSTEM BY AN ARBITRARY ANGLE FIELD OF ART This invention relates to an image rotating system by an arbitrary angle for use in image processing techniques. BACKGROUND OF ART Heretofore, a system resorting to affine transfor¬ mation has been usual in an attempt to rotate two-dimensional image data. Rotating an image through affine transformation requires arithmetic operations based on the following . equation (1) ; -sinθλ where X, Y are coordinates of the original pixel, x, y are coordinates after transformation, and 0 is an rotated angle of image data. When handling image data such as a displayed image, the above transformation requires to implement arithmetic operations of the equation (1) pixel-by-pixel. Thus, the large amount of computation is needed, particularly, in case of rotating an image of large area and, therefore, it was considered very difficult to obtain a rotated image at high speeds. Accordingly, as disclosed in Japanese Patent Laid- Open No.55-94145 (1980) by way of example, there has been proposed a system that an image is skewed to obtain a rotated image in a pseudo manner, i.e., that an image is first subjected to skew transformation by an angle 0 in a hori¬ zontal direction and then another skew transformation by an angle θ in a vertical direction. Such a system resorting to skew transformation by an angle θ will be described with reference to Fig. 4. Referring to the figure, disignated at 400 is an original image, 401 is an image resulted after skew transformation in a horizontal direction, and 402 is an image resulted from 401, which was resulted from the original image after the skew transformation in a horizontal direction, after another skew transformation in a vertical direction. These skew transformations can be achieved at high speeds by a suitable method such as skew scan. The skew transformation method can be described by the following equation (2) : where θ; minute angle Because the conventional image rotating system by an arbitrary angle was implemented as mentioned above, approximation of the equation (2) will lose its effective¬ ness and the rotated image will be distorted, with a rotation angle θ increasing. As a result, there accompanies a problem that the conventional system can be applied only while the rotation angle is within a range of certain minute angles. DISCLOSURE OF THE INVENTION This invention is to provide an image rotating system by an arbitrary angle which enagles to produce a precise rotated image at high speeds without resorting to approximation of the arithmetic equation, the system being featured in that skew transformation is implemented for respective skew angles in horizontal and vertical directions corresponding to a desired rotation angle three times alternately, so that affine transformation of an image requiring large amount of computation ma ' be replaced by triple skew transformations, thereby rotating any two- dimensional image data by a desired angle. In accordance with the invention, since skew transformation is implemented for respective skew angles in X- and Y-directions corresponding to a desired rotation angle three times alternately, image rotation can be performed without needing arithmetic operations of affine transforma¬ tion, at high speeds. The invention can also offer an effect that two-dimensional image data rotated by an arbitrary angle is obtainable more precisely than the conventional system which resorts to double skew trans¬ formations. BRIEF DESCRIPTION OF DRAWING Fig. 1 is a diagram showing the procedure of skew transformations according to one embodiment of the invention; Fig. 2 is an illustration showing a two-dimensional image according to one embodiment of skew transformation . in an X-direction; Fig. 3 is a diagram showing the process of image rotation according-to one embodiment of the invention; and Fig. 4 is a diagram for explaining a conventional image rotating system by an arbitrary angle. BEST MODE OF THE PRESENT INVENTION Hereinafter, one embodiment of the invention will be described with reference to the drawings. It is to be noted that the description will be made for X-Y rectangular coordinates with the X-direction representing a horizontal direction and the Y-direction representing a vertical direction. Referring to Fig. 1 there is shown one embodiment the invention, designated at 100 is a data unit, 110 is a processing unit composed of four processing blocks, and 120 is an image memory (hereinafter abbreviated to as IMM) for storing two-dimensional image data. Furthermore, designated at 101 is a rotation angle θ of the two- dimensional image data, 102 is a skew angle θ x of the two-dimensional image data in the X-direction, 103 is a skew angle θy of the two-dimensional image data in the Y-direction, 111 is a transformation angle determining section, 112 is a (first) X-axis skew transformation section (or a second Y-axis skew transformation section) , 113 is a Y-axis skew transformation section (or a third X-axis skew transformation section) , 114 is a (second) X-axis skew transformation section, 121 is a (first) original two-dimensional image data, 122, 123 are (second and third) two-dimensional data (or fifth and sixth two- dimensional data) gained during the process of image rotation, and 124 is (fourth) two-dimensional image data (or seventh two-dimensional image data) gained after image rotation. Operation of the system will now be described. First, when the image rotation angle θ 101 is given as indicated by arrow A, the skew angle θx 102 in the X-direction and the skew angle θy in the Y- direction are both determined in the transformation angle determining section 111 as indicated by arrows B and C, respectively. Then, the X-axis skew transformation section 112 subjects the first two-dimensional image data 121, which is loaded in the IMM 120 as the original two- dimensional image data, to skew transformation in the X-direction for the given transformation angle 0 102 as indicated by arrow D, thereby producing the second two-dimensional image data 122 which is again written into the IMM 120. Subsequently, the Y-axis skew trans¬ formation section 113 subjects the second two-dimensional image data 122 to skew transformation in the Y-direction for the given transformation angle y as indicated by arrow e, thereby producing the third two-dimensional image data 123. After that, the X-axis skew transforma¬ tion section 114 subjects the third two-dimensional image data 123 to skew transformation in the X-direction for the given transformation angle θ x 102 as indicated by arrow F, thereby finally producing the two-dimensional image data 124 which was obtained by rotating the original two-dimensional data through the angle θ. There will now be described one embodiment of a method by which the transformation angle determining section 111 shown in Fig. 1 determines the skew angles of skew transformations in the X- and Y-directions corresponding to the given rotation angle. In accord¬ ance with the present system, skew transformations for the respective coordinate axes are implemented in the directions of X-, Y- and X-axis, or Y-, X- and X-axis in this order. However, both schemes are essentially identical to each other, so only the former scheme will be described herein. As stated in connection with the equation (1) , a transformation matrix adapted to implement the rotation processing is represented by: This transformation matrix can be divided into the fallowing three matrices. Assuming ξ = £ f -£ f . 3 where £τ_, 3 represent skew transformation in the X- direction, and ζ 2 represents skew transformation in the Y-direction. Accordingly, the transformation angle θx in the X-direction and the transformation angle θy in the Y-direction both necessary for rotating the two- dimensional image by an angle θ are given by the equations (4) below: f θ x = θ/2 ... (4) ■ θ γ = tan -1 (sinθ) It is thus possible to obtain a rotated image by imple¬ menting skew transformations in the directions of X-, Y- and X-axis in this order for the above respective angles. There will now be described one embodiment of skew transformation in the X-direction, with reference to Fig. 2, which is to be implemented by the X-axis skew transformation section 112 shown in Fig. 1. In the figure, designated at 200 is an original two-dimensional image data stored in the IMM 120, 201-205 are two- dimensional image data resulted from dividing the original two-dimensional image data 200 into a plurality of blocks, 206-210 are two-dimensional image data resulted from transferring the divided two-dimensional image data 201- 205, respectively, and 211 is two-dimensional image data resulted after transformation which image data consists of the transferred two-dimensional image data 206-210. First, the original two-dimensional image data 200 is divided into plural blocks of the two-dimensional image data 201-205, each block including several rows in accordance with the angle of skew transformation. Practically, when the transformation angle is assumed to be θχ r the number of rows included in each block is given by 1/tanθχ. After that, the divided two-dimensional image data are transferred sequentially. The block of two- dimensional image data 201 is first transferred to a position of the block of two-dimensional image data 206 corresponding to another area within the IMM 120. The block of two-dimensional image data 202 is then transferred to a position of the block of two-dimensional image data 207 which is shifted from the block 206 by one dot. In this respect, when the image data in the IMM 120 is accessed on a word-byword basis, bit shift, masking or any appropriate operation is made during transfer of the image data, to thereby shift the transferred data by one dot from one another. The above process will be repeated until the block of two-dimensional image data 205 for each of the divided .blocks, so that those blocks of two-dimensional image data are transferred to their respective positions shifted from one another by one ' dot. Skew transformation is thus implemented throughout the original two-dimensional image data 200, resulting in two-dimensional image data whose entire image has been skewed as represented by the two-dimensional image data 211. Skew transformation in the X-direction to be imple¬ mented by the X-axis skew transformation section 114 shown in Fig. 1 can be achieved in the same manner as the above. Further, skew transformation in the Y-direction to be implemented by the Y-axis skew transformation section 113 can be achieved by applying the above process to the vertical direction, so the description thereof will be omitted. Next, Fig. 3 illustrates the transformation process of practical rotation of two-dimensional image data according to the invention, in case of the rota¬ tion angle of 45° by way of example. The number of picture elements is assumed to be given by 5x5 pixels for convenience of the description. In the figure, ' desigbated at 300 is a first image storage area within the IMM 120, 301 is a second image storage area within the IMM 120, 302 is a- third image storage area within the IMM 120, 303 is a fourth image storage area within the IMM 120, 304 is an original two-dimensional image data, 305, 306 are two-dimensional image data gained during the process of rotation, 307 is two-dimensional image data gained after rotation, and 308-310 are digital skew angles each of which indicates a gradient correspond¬ ing to the transformation angle of skew transformation in a digital fashion. Operation of such skew transformation will now be described. First, the skew angles in the X- and Y- directions are determined to be 22.5° and 35.3° from the rotation angle of 45°, respectively, based on the equations (4) . First skew transformation in the X- direction for 22.5° is implemented in accordance with the method described in connection with Fig. 2. Specifically, the image data is shifted one dot-by-one dot in a stepwise manner as indicated by the digital skew angle 308 in Fig. 3. The original two-dimensional image data 304 is thus transformed to the two-dimensional image data skewed at the skew angle of 22.5°. After that, the two-dimensional image data 305 during the process of rotation is shifted one dot-by-one dot in the vertical di-rection in a stepwise manner as.indicated by the digital skew angle 309, so that Y-axis skew transformation is implemented for the skew angle of 35.3° to obtain the two- dimensional image data 306 during the process of rotation. Subsequently, using the similar operation, the above two- dimensional image data 306 subjected to skew transformation in the X-direction for 22.5°, thereby obtaining the objective two-dimensional image data 307 which was resulted from rotating the original two-dimensional image data 304 - by 45°. Industrial Applicability This invention is not only available in a workstation for use in offices, etc., but also applicable to terminal equipments of the office automation system such as personal computers.

Claims: CLAIMS : (1) An image rotating system by an arbitrary angle comprising; an image memory for storing two-dimensional image data; a transformation angle determining section for determining both a skew angle in a horizontal direction and a skew angle in a vertical direction of the original two-dimensional image data stored in said image memory, based on a desired rotation angle; a first X-axis skew transformation section for obtaining second two-dimensional image data which is resulted from skewing first two-dimensional image data stored in said image memory as the original two-dimensional image data in a horizontal direction by the angle as determined by said transformation angle determining section; a first Y-axis skew transformation section for obtaining third two- dimensional image data which is resulted from skewing said second two-dimensional image data in a vertical direction by the angle as determined by said transformation angle determining section; and a second X-axis skew transformation section for obtaining fourth two-dimensional image data which is resulted from skewing said third two-dimensional image data in a horizontal direction once again by the angle as determined by said transformation angle determing section. (2) An image rotating system by an arbitrary angle according to claim 1, comprising; an image memory for string two-dimensional image data; a transformation angle determining section for determining both a skew angle in a horizontal direction and a skew angle in a vertical direction based on a desired rotation angle; a second Y-axis skew transformation section for obtaining fifth two-dimensional image data which is resulted from skewing said first two-dimensional image data stored in said image memory as the original two-dimensional image data in a vertical direction by the angle as determined by said transformation angle determining section; a third X-axis skew transformation section for obtaining sixth two-dimensional image data which is resulted from skewing said fifth two-dimensional image data in a horizontal direction by the angle as determined by said transformation angle determining section; and a fourth X-axis skew trans¬ formation section for obtaining seventh two-dimensional image data which is resulted from skewing said sixth two-dimensional image data in a vertical direction once again by the angle as determined by said transformation angle determining section.

Inventors: KAMEYAMA MASATOSHI, TANAKA ATSUSHI, KAMEYAMA, MASATOSHI;, TANAKA, ATSUSHI;
Applicants: MITSUBISHI ELECTRIC CORP, MITSUBISHI DENKI KABUSHIKI KAISHA
Application year: 1986
Main classification: G06F15
IPC codes: G06T1, G06T3