AU730778B2 - Method and apparatus for rotating digital images - Google Patents

Method and apparatus for rotating digital images Download PDF

Info

Publication number
AU730778B2
AU730778B2 AU20777/00A AU2077700A AU730778B2 AU 730778 B2 AU730778 B2 AU 730778B2 AU 20777/00 A AU20777/00 A AU 20777/00A AU 2077700 A AU2077700 A AU 2077700A AU 730778 B2 AU730778 B2 AU 730778B2
Authority
AU
Australia
Prior art keywords
pixels
digital image
sub
selecting
factor
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.)
Ceased
Application number
AU20777/00A
Other versions
AU2077700A (en
Inventor
Kieran Gerald Larkin
Michael Alexander Oldfield
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.)
Canon Inc
Original Assignee
Canon Inc
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
Priority claimed from AUPP9322A external-priority patent/AUPP932299A0/en
Application filed by Canon Inc filed Critical Canon Inc
Priority to AU20777/00A priority Critical patent/AU730778B2/en
Publication of AU2077700A publication Critical patent/AU2077700A/en
Application granted granted Critical
Publication of AU730778B2 publication Critical patent/AU730778B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Description

S&F Ref: 493171
AUSTRALIA
PATENTS ACT 1990 COMPLETE SPECIFICATION FOR A STANDARD PATENT
ORIGINAL
66.
*6 *f
A
6**t o 6* 6* 6**6 6 Name and Address of Applicant: Actual Inventor(s): Address for Service: Invention Title: Canon Kabushiki Kaisha 30-2 Shimomaruko 3-chome Ohta-ku Tokyo 146 Japan Michael Alexander Oldfield, Kieran Gerald Larkin Spruson Ferguson St Martins Tower 31 Market Street Sydney NSW 2000 Method and Apparatus for Rotating Digital Images ASSOCIATED PROVISIONAL APPLICATION DETAILS [33] Country [31] Applic. No(s) AU PP9322 The following statement is a full description of this invention, performing it known to me/us:- [32] Application Date 19 Mar 1999 including the best method of 5815c -1- Method and apparatus for rotating digital images Field of the Invention The present invention relates to the rotation of digital images represented on a rectangular grid, and in particular to a method which uses uniform re-scaling of an image parallel to the grid axes.
Background Art To rotate an image through multiples of 900 is relatively straightforward in that 10 mere row/column transformations are required. To rotate a point Po(xo,yo) represented on a rectangular axis through an angle 0 (other than 900) about an origin, as illustrated in Fig. 1, the point Po(xo,yo) is transformed into point P(x,y) as follows: _(cosO -sinO )x 0 sin cosO )y0 (1) However, when this technique is used on a discrete rectangular grid, the coordinates of the point P(x,y) do not correspond to valid grid positions as defined by the rectangular grid. For instance, when a point Po(1,0) is rotated through an angle of a new point P(0.707,0.707) (cos 450 sin 450 0.707) is created. Point P does not correspond with a valid point in the rectangular grid with grid spacing of 1, in that only x and y coordinates with integer values are defined.
Known methods of rotating digital images are based on the following two methods: Two-dimensional interpolation of pixels using (typically) bi-polynomial interpolation of known pixel values; Multiple-pass one-dimensional interpolations along pixel rows or columns to produce successive shearing of the image to produce a rotated image.
CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC -2- Direct interpolation methods, such as two-dimensional interpolation, are popular because of their simplicity and implementation speed whereas shearing methods are liked because they can be implemented so as to retain almost all the information of the original image.
Summary of the Present Invention It is an object of the present invention to substantially overcome, or at least ameliorate, one or more of the deficiencies of the above mentioned arrangements.
In accordance with one aspect of the present invention there is provided a 10 method for rotating a digital image through an angle wherein said digital image comprise V a set of pixels, said method comprising the steps of: re-sampling said digital image in a x -direction and in a y -direction; selecting a new set of basis vectors X and Y; selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions and re-scaling said sub-set of pixels in said x -direction.
In accordance with another aspect of the present invention there is provided a method for rotating a digital image through an angle 0 wherein said digital image comprise a set of pixels, said method comprising the steps of: re-sampling said digital image in a x -direction by a factor of p a(a b) and in a y -direction by a factor q b(a wherein a and b are integers such that a/b; selecting a new set of basis vectors and 1b selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions and re-scaling said sub-set of pixels in said x -direction by a factor 1/ab.
CFP1646AU MmediaM4 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC -3- In accordance with yet another aspect of the present invention there is provided an apparatus for rotating a digital image through an angle wherein said digital image comprise a set of pixels, said apparatus comprising: means for re-sampling said digital image; means for selecting a new set of basis vectors; means for selecting from said re-sampled digital image a sub-set of pixels; and means for re-scaling said sub-set of pixels.
In accordance with yet another aspect of the present invention there is provided an apparatus for rotating a digital image through an angle 0 wherein said digital image 10 comprise a set of pixels, said apparatus comprising: means for re-sampling said digital image in a x -direction by a factor of p a(a b) and in a y -direction by a factor q [b(a wherein a and b are integers such that tan 20 a b; Smeans for selecting a new set of basis vectors and 15 means for selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions ;and means for re-scaling said sub-set of pixels in said x -direction by a factor 1/ab.
In accordance with yet another aspect of the present invention there is provided a computer program product including a computer readable medium incorporating a computer program for rotating a digital image through an angle wherein said digital image comprise a set of pixels, said computer program product comprising: means for re-sampling said digital image; means for selecting a new set of basis vectors; means for selecting from said re-sampled digital image a sub-set of pixels; and means for re-scaling said sub-set of pixels.
In accordance with yet another aspect of the present invention there is provided a computer program product including a computer readable medium incorporating a CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC -4computer program for rotating a digital image through an angle wherein said digital image comprise a set of pixels, said computer program product comprising: means for re-sampling said digital image in a x -direction by a factor of p a(a b) and in a y -direction by a factor q b(a wherein a and b are integers such that tan 29 a b; means for selecting a new set of basis vectors and -1 b means for selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions and ky means for re-scaling said sub-set of pixels in said x -direction by a factor 1/ab.
Brief Description of the Drawings Preferred embodiments of the present invention is described hereinafter with reference to the drawings, in which: 15 Fig. 1: shows a rotation of a point through an angle 0; g Fig. 2: shows an image to be rotated consisting of values sampled at a set of discrete points at coordinate positions n); Fig. 3: shows the image of Fig. 2, and positions of a new set of sampling points; Fig. 4: shows the image of Fig. 3, with two pixels selected as a new grid basis; Fig. 5: is a 128 x 128 pixel image (The nude Maja (detail), Francisco de Goya y Lucientes 1801); Fig. 6: shows the image in Fig. 5 re-scaled by a factor of 1.41 in the x- and y directions; Fig. 7: shows the pixels of the image in Fig. 6 which satisfy iX'+jY' where i and j are integers; Fig. 8 shows the pixels of the image in Fig. 7 after re-indexing; Fig. 9 is a 128 x 128 pixel image (The Astronomer (detail), Jan Vermeer 1668); CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC Fig. 10 shows the image in Fig. 9 re-scaled by a factor of 2 in the x -direction and a factor of 3.46 in the y -direction; Fig. 11 shows the pixels of the image in Fig. 10 which satisfy iX'+jY' where i and j are integers; Fig. 12 shows the pixels of the image in Fig. 11 after re-indexing; Fig. 13 shows Fig. 12 after re-scaling in the x -direction by 1/ -f3; and Fig. 14 is a schematic block diagram of a general-purpose computer upon which the preferred embodiment of the present invention can be practiced.
10 Detailed Description -A digital image is composed of a set of pixels representing values sampled at discrete positions. These positions are defined as the coordinates of the pixels. Fig. 2 illustrates an 'image' and the positions at which it has been sampled. For reasons explained above, rotation of such a sampled two-dimensional data set normally requires re-sampling of the data.
If the image is scaled in the x -direction by a factor p and in the y -direction by a factor q, then the image is re-sampled at the positions (m p, n where m and n are integers. Fig. 3 illustrates the positions of the new samples for p 1, q 1.
A new sampling grid can now be defined by two sampling positions x' and y' selected as illustrated in Fig. 4. If p and q are chosen such that p= /rcosO, and q 1/ r sin then the pixel marked x' in Fig. 4 has the coordinates: (rcosO r sin O) and is the pixel placed at the position in the rotated image. A suitable value for r will be derived below.
The position y' is also selected so that its coordinates correspond with sampled positions as follows: CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC -6- Salp Sb/J (3) S b/q) where a and b are integers. By substituting the chosen p and q into Equation y' is represented by the coordinate position (arcosO\ _,brsin 4) It is necessary for the new axes to be orthogonal, otherwise a shear will be oo 10 imposed on the image. The coordinate positions x' and y' will represent orthogonal axes S. only if r 2 (a cos 2 bsin 2) 0, i.e. if o .0 a tan 2 b 15 The re-scaled image can only provide a useful set of function values if tan 2 is a rational number. Since any angle can be approximated by a rational number to any desired precision, this is not a severe restriction. Equation is therefore not defined for but a 900 rotation is trivial to perform by other methods.
In order to choose the smallest available basis vector integers a and b should be mutually prime. If Equation is satisfied then cosO b a+b (6) and sinO= a a+b CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC -7- The lengths of the two basis vectors x' and y' as given in Equations and (4) and, using Equation are: x' r 2 Cos20r 2 sin20 r (7) Iy' r2a2 cos 20 rb 2 sin 20 rab (8) In order to avoid under-sampling when using the new basis vectors x' and y', the value of r should be chosen so that: r ab, (9) By substituting the value of r in Equations and the magnitude of the new basis vectors are x' 1/ab and y' 1. This means that the sampling in the new xdirection is at a spacing of 1/ ab units. Once the pixels are re-indexed according to the new x' y' coordinate system, the resulting data must again be re-sampled enabling the sample spacing in the x'-direction to be 1.
In summary, the procedure for rotating the image through an angle 0 is as follows: 1. Calculate a suitable pair of integers, a and b, so that tan 20 a b; 2. Re-scale/re-sample the image in the x -direction by a factor of p ra(a+ b) and in the y -direction by a factor q Jb(a so that a new set of samples at positions (m p, n q) is obtained; 3. Select the pixels which are of the form iX'+jY' where i and j are integers where and and place them in positions 4. Re-scale the image in the x -direction by a factor 1 ab.
CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC -8- This method can be extended for rotation of multi-dimensional data about an arbitrary axis in the data space.
The re-scaling/re-sampling procedure step 2 can advantageously be performed in two separate one dimensional re-scaling/re-sampling operations, i.e. firstly a row-for-row re-scaling/re-sampling operation in the x-direction, followed by another one dimensional column-for-column re-scaling/re-sampling operation performed on the new sample values from the first re-sampling/re-scaling operation. These operations can be performed in any order. This allows any of a variety of one dimensional re-sampling methods to be applied i.e. chirp z, cubic interpolation, cubic convolution, adaptive non-linear methods etc.
10 Furthermore, because two independent operations are used, different rescaling/re-sampling methods can be used in the x and y directions.
The rotation procedure described above can be expanded for a three dimensional implementation.
As an illustration of the procedure described above, an image shown in Fig. will be rotated through an angle of 45°. Fig. 5 shows an image of 128 x 128 pixels. With the required rotation angle as 0 the procedure described above results in the 4 following: 1. tan 28 1 so that a suitable pair of integers are a 1, and b =1.
2. Calculate scaling factors p and q as p q The image can now be re-scaled to size 181x 181 pixels, the result of which is shown in Fig. 6.
3. The new basis vectors are and Fig. 7 shows the pixels which satisfy iX'+jY' for integer values of i and j. Fig. 8 shows the resultant image after those pixels have been re-indexed to the positions 4. Since 1 b 1 no further re-scaling is necessary for this example and Fig. 7 represents the rotated image.
CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171 .DOC -9- Another illustrative example follows where an image in Fig. 9 is rotated by The image in Fig. 9 consist of 128x128 pixels. With the required rotation angle of 0 7r 6, the procedure described above results in the following: 1. tan 2 0 1/ 3 so that a suitable pair of integers are a 1 and b 3.
2. Calculate scaling factors p and q asp 1(1 3) 2 and q 3(1 3) 12 The image is re-scaled to a size 256x443 pixels as shown in Fig. 3. The new basis vectors are calculated as and 3 Fig. 11 shows the pixels which satisfy iX'+jY' for integer values of i and j. Fig. 12 shows the i resultant image after those pixels have been re-indexed to the positions 4. Finally, Fig. 13 shows the result of re-scaling Fig. 12 in the x -direction by a factor of 1 The preferred embodiment of the present invention can be implemented as a computer application program using a conventional general-purpose computer system, such as the computer system 100 shown in Fig. 14, in which the application program described with reference to the other drawings is implemented as software executed on the computer system 100. The computer system 100 includes a computer module 102, an input devices such as a keyboard 110 and mouse 112, and output devices including a printer device 108 and a display device 104.
The computer module 102 typically includes at least one processor unit 114, a memory unit 118, for example formed from semiconductor random access memory (RAM) and read only memory (ROM). A number of input/output interfaces including a video interface 122, and an I/0 interface 116 for the keyboard 110 and mouse 112 are also included. A storage device 124 is provided and typically includes a hard disk drive 126 and a floppy disk drive 128. The components 114 to 128 of the computer module 102, typically communicate via an interconnected bus 130 and in a manner which results in a conventional mode of operation of the computer system 100 known to those in the relevant art. Examples of computers on which the embodiments can be practised CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC include IBM-PC's and compatibles, or alike computer systems. Typically, the application program of the preferred embodiment is resident on the hard disk drive 126 and read and executed using the processor 114. Intermediate storage of the program and any data processed can be accomplished using the semiconductor memory 118, possibly in concert with the hard disk drive 126. In some instances, the application program can be supplied to the user encoded on a floppy disk.
In an alternative embodiment, the method of present invention can be implemented in dedicated hardware such as one or more integrated circuits. Such dedicated hardware may include graphic processors, digital signal processors, or one or 10 more microprocessors and associated memories.
The foregoing only describes a small number of embodiments of the present 0ooo o*o invention, and modifications, can be made thereto without departing from the scope of the present invention.
the context of this specification, the word "comprising" means "including principally but not necessarily solely" or "having" or "including" and not "consisting only of'. Variations of the word comprising, such as "comprise" and "comprises" have corresponding meanings. oooo corresponding meanings.
CFP1646AU MmediaN4 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171 .DOC

Claims (7)

1. A method of rotating a digital image through an angle wherein said digital image comprise a set of pixels, said method comprising the steps of: re-sampling said digital image in a x -direction and in a y -direction; selecting a new set of basis vectors X and Y; selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions j; and Sre-scaling said sub-set of pixels in said x -direction.
2. A method for rotating a digital image through an angle 0 wherein said digital image comprise a set of pixels, said method comprising the steps of: re-sampling said digital image in a x -direction by a factor of p a(a b) and in a y -direction by a factor q Vb(a wherein a and b are integers such that tan 20 a b; (1 and Y'=a selecting a new set of basis vectors and Y'= selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions and re-scaling said sub-set of pixels in said x -direction by a factor 1/ab.
3. A method of claim 2, whereby the re-sampling step is performed in two separate one-dimensional re-sampling steps.
4. Apparatus for rotating a digital image through an angle wherein said digital image comprise a set of pixels, said apparatus comprising: means for re-sampling said digital image in a x -direction and in a y -direction; means for selecting a new set of basis vectors X and Y; CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC -12- means for selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions and means for re-scaling said sub-set of pixels in said x -direction.
Apparatus for rotating a digital image through an angle 0 wherein said digital image comprise a set of pixels, said apparatus comprising: means for re-sampling said digital image in a x -direction by a factor of p a(a b) and in a y -direction by a factor q ,b(a wherein a and b are integers such that tan 20 a b; means for selecting a new set of basis vectors and means for selecting from said re-sampled digital image a sub-set of pixels which "oo are of the form iX'+jY' where i and j are integers and place selected pixels in positions and 15 means for re-scaling said sub-set of pixels in said x -direction by a factor 1/ab.
6. A computer program product including a computer readable medium incorporating a computer program for rotating a digital image through an angle wherein said digital image comprise a set of pixels, said computer program product comprising: means for re-sampling said digital image in a x -direction and in a y -direction; means for selecting a new set of basis vectors X' and Y; means for selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions S and means for re-scaling said sub-set of pixels in said x -direction. CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171 .DOC -13-
7. A computer program product including a computer readable medium incorporating a computer program for rotating a digital image through an angle wherein said digital image comprises a set of pixels, said computer program product comprising: means for re-sampling said digital image in a x -direction by a factor of p a(a b) and in a y -direction by a factor q b(a wherein a and b are integers such that tan 20 a b; means for selecting a new set of basis vectors and 1 b means for selecting from said re-sampled digital image a sub-set of pixels which are of the form iX'+jY' where i and j are integers and place selected pixels in positions 10 and s means for re-scaling said sub-set of pixels in said x -direction by a factor 1/ab. sees DATED this Fourth Day of February 2000 sees Canon Kabushiki Kaisha 15 Patent Attorneys for the Applicant SPRUSON FERGUSON 04, 0 CFP1646AU Mmedia34 493171 I:\ELEC\CISRA\MMEDIA\MMEDIA34\493171.DOC
AU20777/00A 1999-03-19 2000-03-09 Method and apparatus for rotating digital images Ceased AU730778B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU20777/00A AU730778B2 (en) 1999-03-19 2000-03-09 Method and apparatus for rotating digital images

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
AUPP9322A AUPP932299A0 (en) 1999-03-19 1999-03-19 Method and apparatus for rotating digital images
AUPP9322 1999-03-19
AU20777/00A AU730778B2 (en) 1999-03-19 2000-03-09 Method and apparatus for rotating digital images

Publications (2)

Publication Number Publication Date
AU2077700A AU2077700A (en) 2000-10-12
AU730778B2 true AU730778B2 (en) 2001-03-15

Family

ID=25618006

Family Applications (1)

Application Number Title Priority Date Filing Date
AU20777/00A Ceased AU730778B2 (en) 1999-03-19 2000-03-09 Method and apparatus for rotating digital images

Country Status (1)

Country Link
AU (1) AU730778B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5295237A (en) * 1990-12-31 1994-03-15 Samsung Electronics Co., Ltd. Image rotation method and image rotation processing apparatus
US5412768A (en) * 1990-01-22 1995-05-02 Matsushita Graphic Communication Systems, Inc. Method and apparatus for rotating an image
JPH0918687A (en) * 1995-06-30 1997-01-17 Ono Sokki Co Ltd Image converter

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5412768A (en) * 1990-01-22 1995-05-02 Matsushita Graphic Communication Systems, Inc. Method and apparatus for rotating an image
US5295237A (en) * 1990-12-31 1994-03-15 Samsung Electronics Co., Ltd. Image rotation method and image rotation processing apparatus
JPH0918687A (en) * 1995-06-30 1997-01-17 Ono Sokki Co Ltd Image converter

Also Published As

Publication number Publication date
AU2077700A (en) 2000-10-12

Similar Documents

Publication Publication Date Title
EP3522105B1 (en) Method and device for performing mapping on spherical panoramic image
US6121978A (en) Method and apparatus for graphics scaling
US6184888B1 (en) Method and apparatus for rapidly rendering and image in response to three-dimensional graphics data in a data rate limited environment
US7545388B2 (en) Apparatus, method, and product for downscaling an image
US8106927B2 (en) Graphical user interfaces and occlusion prevention for fisheye lenses with line segment foci
US7626599B2 (en) Context map in computer display magnification
US7667699B2 (en) Fast rendering of pyramid lens distorted raster images
US20120063700A1 (en) System and method for scaling digital images
US7492376B2 (en) Graphics resampling system and method for use thereof
TWI315056B (en) Block-based rotation of arbitrary-shaped images
JP2000132704A (en) Image information processor and method
US20050068338A1 (en) Method and system for scaling images
Her et al. Resampling on a pseudohexagonal grid
US7400330B2 (en) Magnification of indirection textures
US6532009B1 (en) Programmable hardwired geometry pipeline
AU730778B2 (en) Method and apparatus for rotating digital images
JP2926637B2 (en) Volume rendering apparatus and method suitable therefor
JP2797320B2 (en) Image display device
CN108074281A (en) Pyramid panorama sketch model generating method and device, storage medium and electronic equipment
US6710775B1 (en) Animation technique
EP1351189A1 (en) Image processing
KR100270140B1 (en) Method and apparatus for generating and displaying hotlinks in a panoramic three dimensional scene
AU747582B2 (en) Universal linear kernal interpolation
US6510543B1 (en) Method and apparatus for rendering an IC design layout employing graphics files at low zoom-in factors
JPH11252353A (en) Image interpolation method and its device

Legal Events

Date Code Title Description
FGA Letters patent sealed or granted (standard patent)