CN102750669B - Image rotation processing method - Google Patents

Image rotation processing method Download PDF

Info

Publication number
CN102750669B
CN102750669B CN201210170663.9A CN201210170663A CN102750669B CN 102750669 B CN102750669 B CN 102750669B CN 201210170663 A CN201210170663 A CN 201210170663A CN 102750669 B CN102750669 B CN 102750669B
Authority
CN
China
Prior art keywords
rotation
coordinate
image
pixel
rotational transform
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.)
Active
Application number
CN201210170663.9A
Other languages
Chinese (zh)
Other versions
CN102750669A (en
Inventor
许野平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Synthesis Electronic Technology Co Ltd
Original Assignee
SHANDONG SYNTHESIS ELECTRONIC TECHNOLOGY 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 SHANDONG SYNTHESIS ELECTRONIC TECHNOLOGY Co Ltd filed Critical SHANDONG SYNTHESIS ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN201210170663.9A priority Critical patent/CN102750669B/en
Publication of CN102750669A publication Critical patent/CN102750669A/en
Application granted granted Critical
Publication of CN102750669B publication Critical patent/CN102750669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention relates to an image rotation processing method, and in particular relates to an image rotation processing method by adopting a Cartesian plane coordinate system. The method comprises the following steps of: determining image rotation boundary parameters, determining a rotation key assignment set, generating a rotation key assignment matrix, determining a key assignment linear combination coefficient, and performing rotation transformation calculation to complete image rotation. According to the method disclosed by the invention, when a coordinate (x, y) to be transformed is discrete (namely, all values of the coordinate are integers) and bounded, the calculation of coordinate rotation transformation is accomplished completely by table look-up. when the use of a memory space is not limited, only two times of table look-up are needed to accomplish the calculation of coordinate rotation transformation; and when the memory space is limited, the calculation of coordinate rotation transformation is accomplished through composite iteration table look-up with relatively few times of iterative table look-up. The image rotation processing method provided by the invention has the beneficial effect that the computational efficiency of coordinate axis rotation transformation of singlechips, DSP (Digital Signal Processor) chips and the like with low floating-point operation capacity can be improved significantly, and the method can also be applied to general computers.

Description

A kind of image rotation processing method
Technical field
The present invention relates to a kind of image rotation processing method, particularly a kind of Cartesian plane coordinate system that adopts carries out image rotation processing method.
Background technology
Cartesian plane coordinate system coordinate axis rotational transform formula is as follows:
Figure 994444DEST_PATH_IMAGE001
Wherein,
Figure 236070DEST_PATH_IMAGE002
represent new coordinate, represent old coordinate,
Figure 511193DEST_PATH_IMAGE003
it is the anglec of rotation.In some applications, need to improve the execution speed of coordinate axis rotational transform formula, have at present following two schemes to improve counting yield:
One, calculate in advance
Figure 92347DEST_PATH_IMAGE004
,
Figure 427514DEST_PATH_IMAGE005
value
In some applications, as image rotation algorithm, value in the process of the each pixel coordinate axle rotation of computed image one by one, can not change.Handle in advance
Figure 343386DEST_PATH_IMAGE004
,
Figure 422200DEST_PATH_IMAGE005
value calculate and be saved to storer, can improve coordinate axis rotational transform formula computing velocity.Order
Figure 857861DEST_PATH_IMAGE006
, , coordinate axis rotational transform formula is revised as following form:
Figure 580146DEST_PATH_IMAGE008
Two, look-up table
In the computation process of some application, for example image rotation conversion,
Figure 151067DEST_PATH_IMAGE009
,
Figure 503551DEST_PATH_IMAGE010
span be the continuous integral number in a certain scope, when the coordinate axis rotational transform of the value of α each pixel in computed image, immobilize.In this case can be in computing formula
Figure 383783DEST_PATH_IMAGE011
,
Figure 821717DEST_PATH_IMAGE012
,
Figure 429285DEST_PATH_IMAGE013
, calculate in advance and be stored in list, utilize the method for Query List to realize rotational transform calculating.Utilize integer variable
Figure 15304DEST_PATH_IMAGE009
,
Figure 878218DEST_PATH_IMAGE010
do subscript index and set up following list:
Coordinate axis rotation computing formula becomes following form:
Figure 849508DEST_PATH_IMAGE016
The method replaces multiplying with table lookup operation in computation process, can improve computing velocity.
Summary of the invention
The invention provides a kind of image rotation processing method, at coordinate to be transformed
Figure 133859DEST_PATH_IMAGE002
during for discrete (being that coordinate value is all integer) bounded situation, realize coordinate axis rotational transform completely by tabling look-up and calculate, the counting yield machine that carries out coordinate axis rotational transform to significantly improve single-chip microcomputer, dsp chip etc. that floating-point operation ability is lower.
The present invention realizes by following measures:
1, an image rotation processing method, is characterized in that comprising following steps:
1.1, determine image rotation boundary parameter
1.1.1, the new setting coordinate after image rotation is , the old setting coordinate before image rotation is
Figure 512068DEST_PATH_IMAGE017
, the anglec of rotation of image is set as
Figure 693651DEST_PATH_IMAGE018
;
1.1.2, maximum radius of turn
Figure 70274DEST_PATH_IMAGE019
: set
Figure 970097DEST_PATH_IMAGE020
, wherein
Figure 473891DEST_PATH_IMAGE021
represent the coordinate of all participation coordinate axis rotational transform horizontal ordinate
Figure 824549DEST_PATH_IMAGE009
absolute value and ordinate
Figure 211668DEST_PATH_IMAGE022
the maximal value of absolute value;
1.1.3, rotational transform field of definition:
Figure 581469DEST_PATH_IMAGE023
1.1.4, rotation unit angle :
Figure 206803DEST_PATH_IMAGE025
;
1.2, determine rotation key value set
Adopt one of three kinds of modes below to determine rotation key value set:
1.2.1, enumeration methodology:
Figure 2589DEST_PATH_IMAGE026
;
1.2.2, binary radix method:
Figure 176082DEST_PATH_IMAGE027
, wherein,
Figure 186763DEST_PATH_IMAGE028
;
1.2.3, free radical method: select integer
Figure 92402DEST_PATH_IMAGE029
a finite subset do rotation key value set;
1.3, generate rotation key value matrix
1.3.1, one of three kinds of methods described in employing 1.2 generate rotation key value set:
Figure 188534DEST_PATH_IMAGE030
1.3.2, for each key assignments
Figure 579765DEST_PATH_IMAGE031
, generate its corresponding key assignments matrix:
Figure 444952DEST_PATH_IMAGE032
Figure 521493DEST_PATH_IMAGE033
Wherein
Figure 104921DEST_PATH_IMAGE034
,
Figure 354637DEST_PATH_IMAGE002
span comprises rotational transform field of definition
Figure 526861DEST_PATH_IMAGE035
;
1.3.3, utilize key assignments matrix to realize coordinate axis rotational transform: formula is realized according to the coordinate axis anglec of rotation below
Figure 836619DEST_PATH_IMAGE036
after new coordinate
Figure 845027DEST_PATH_IMAGE037
calculate old coordinate
Figure 898433DEST_PATH_IMAGE038
:
Figure 426629DEST_PATH_IMAGE039
In step, utilize this principle to realize rotational transform at any angle below;
1.4, determine key assignments linear combination coefficient
The given anglec of rotation
Figure 907289DEST_PATH_IMAGE040
, select integer
Figure 137413DEST_PATH_IMAGE041
or
Figure 994511DEST_PATH_IMAGE042
make
Figure 875748DEST_PATH_IMAGE043
minimum.In conjunction with the rotation key value set providing above
Figure 527309DEST_PATH_IMAGE044
, determine
Figure 510309DEST_PATH_IMAGE045
the linear combination expression formula of rotation key assignments:
Figure 905518DEST_PATH_IMAGE046
Obtain according to integer programming method for solving
Figure 139797DEST_PATH_IMAGE047
one group of feasible solution, integer programming equation is as follows:
Figure 227838DEST_PATH_IMAGE048
Figure 494872DEST_PATH_IMAGE049
1.5, carrying out rotational transform calculates
1.5.1, order
Figure 631455DEST_PATH_IMAGE050
;
1.5.2, following formula double counting
Figure 34754DEST_PATH_IMAGE051
inferior:
Figure 480648DEST_PATH_IMAGE052
1.5.3,
Figure 234978DEST_PATH_IMAGE053
if, , forward step 1.5.2 to, otherwise execution step 1.5.4;
1.5.4,
Figure 433058DEST_PATH_IMAGE038
for be rotated the result of conversion;
1.6, image rotation:
1.6.1, Cartesian plane coordinate system coordinate axis rotational transform formula is as follows:
1.6.2, suppose size constancy before and after image rotation, set image and be of a size of ; For preventing that rotating rear picture material is tailored because being beyond the boundary, can be centered by the geometric center of image outwards expand, with black, or white, or the region expanded of other color filling of specifying in advance; Be of a size of
Figure 649221DEST_PATH_IMAGE057
image expand be
Figure 984387DEST_PATH_IMAGE058
after, can avoid the phenomenon that occurs that content is tailored because of rotation;
1.6.3, taking image rotation center as true origin, set up Cartesian plane coordinate system, image rotation center is selected according to application requirements, if there is no special requirement, the geometric center of generally selecting image is rotation center;
1.6.4, for each pixel in target image
Figure 713309DEST_PATH_IMAGE059
, calculate its coordinate in original image according to coordinate transform formula
Figure 979074DEST_PATH_IMAGE060
;
If 1.6.5
Figure 477051DEST_PATH_IMAGE061
coordinate is integer, can directly get the color filling of this coordinate respective pixel to target image pixel
Figure 920802DEST_PATH_IMAGE059
place; If coordinate is not integer, can be according to conventional linear interpolation, or bilinear interpolation estimation
Figure 710870DEST_PATH_IMAGE062
point pixel color, and this color filling to target image pixel place; If
Figure 943586DEST_PATH_IMAGE062
coordinate exceeds original image scope, can use black, or white, or other color of specifying is in advance as the color of this place's pixel, and this color filling to target image pixel
Figure 381520DEST_PATH_IMAGE059
place.
2, the image rotation processing method of the invention described above, in described step 1.4, preferably adopts following either method to determine key assignments linear combination coefficient:
2.1, for the rotation key value set providing by enumeration methodology , there is unique optimum solution in equation:
Figure 461657DEST_PATH_IMAGE064
2.2, for the rotation key value set providing by binary radix method
Figure 309528DEST_PATH_IMAGE063
,
Figure 172442DEST_PATH_IMAGE065
be
Figure 396749DEST_PATH_IMAGE045
binary expression formula place value, following relation is set up:
Figure 412241DEST_PATH_IMAGE066
Wherein,
Figure 696592DEST_PATH_IMAGE067
, or
Figure 109119DEST_PATH_IMAGE068
,
Figure 809222DEST_PATH_IMAGE069
;
By handle
Figure 990804DEST_PATH_IMAGE045
expanding into binary expression formula can obtain
Figure 633007DEST_PATH_IMAGE065
optimum solution;
2.3, rotation angle
Figure 532830DEST_PATH_IMAGE070
linear combination formula
Figure 36623DEST_PATH_IMAGE046
for known, in this case key assignments linear combination coefficient directly from
Figure 72713DEST_PATH_IMAGE046
obtain.
Method of the present invention, at coordinate to be transformed
Figure 698866DEST_PATH_IMAGE037
during for discrete (being that coordinate value is all integer) bounded situation, realize coordinate axis rotational transform completely by tabling look-up and calculate.In the time that limited storage space is not used, only need twice table lookup operation just to complete coordinate axis rotational transform and calculate; Be subject in limited time, to table look-up by complex iteration at storage space, realize coordinate axis rotational transform and calculate with the less iteration number of times of tabling look-up.The present invention can significantly improve the counting yield that single-chip microcomputer, dsp chip etc. that floating-point operation ability is lower carry out coordinate axis rotational transform, also can be used for general computing machine.
Embodiment
embodiment 1
In the China second-generation identity card human image collecting equipment course of work, the tilt problem that may occur during for correction portrait, needs rotating image.According to the actual requirement of I.D., target photo size is
Figure 771471DEST_PATH_IMAGE071
the minimum anglec of rotation is
Figure 875693DEST_PATH_IMAGE072
.
1, problem
The image rotation of this application calculates can be summed up as following coordinate axis rotational transform problem:
Figure 969551DEST_PATH_IMAGE001
Wherein,
2, determine key parameter
Radius of turn is:
Figure 562392DEST_PATH_IMAGE074
, get
Figure 735885DEST_PATH_IMAGE075
;
Transform definition territory is: ;
Rotation unit angle is:
Figure 652205DEST_PATH_IMAGE077
;
3, determine rotation key value set: ;
4, determine rotation key value matrix
In the software of implementation algorithm, with floating number array U, V storage rotation key value matrix, provides array index span in square bracket:
U[0..359][-313..313][-313..313]
V[0..359]?[-313..313][-313..313]
Fill array
U[k][x][y]?=?x*cos(k*PI/180)?-?y*sin(k*PI/180)
V[k][x][y]?=?y*cos(k*?PI?/180)?+?x*sin(k*PI/180)
Wherein PI is circular constant.
5, coordinate transformation algorithm is realized
Given new coordinate (x, y) and anglec of rotation alpha, ask old coordinate (u, v).Require the anglec of rotation to meet 0 <=alpha < 2* PI herein.Exceed the angle of this scope, with [0,2* PI) the identical angle of transformation in interval interior whole limit.
K=Round (alpha * 180/ PI), (Round is round function)
u?=?U[k][x][y]
v?=?V[k][x][y]
6, adopt step carries out image Rotation Algorithm below:
(1) select target image pixel P (179,221) sets up plane cartesian coordinate system for true origin.
(2) for each the pixel P (x, y) in target image, to calculate its coordinate Q (u, v) in original image according to above-mentioned coordinate transform formula;
(3), if Q (u, v) does not exceed the scope of original image, obtain Q (u, v) and locate the estimated value of color with bilinear interpolation algorithm; If Q (u, v) exceeds coordinates of original image coordinates scope, the estimated value of this place's color is set as black;
(4) in target image, the color of pixel P (x, y) is set to Q (u, v) and locates the estimated value of color.
This algorithm approximately needs 560M memory headroom.
Embodiment 2
Vehicle mounted guidance software need to be realized real-time map Rotation Algorithm.Realize this algorithm and need a kind of high speed coordinate axis rotational transform computing method.Due to the restriction of mobile unit arithmetic speed and storer, this example provides the computing method based on binary radix.
1. problem
Navigator resolution is 320x240, and the minimum anglec of rotation is PI/8.Through arranging, the mapping algorithm that realize requires as follows:
Wherein,
Figure 13544DEST_PATH_IMAGE079
2, determine key parameter
Radius of turn is:
Figure 152402DEST_PATH_IMAGE080
, get
Figure 673513DEST_PATH_IMAGE081
;
Transform definition territory is:
Figure 923229DEST_PATH_IMAGE082
;
Rotation unit angle is:
Figure 95453DEST_PATH_IMAGE083
;
3, determine rotation key value set:
Figure 405212DEST_PATH_IMAGE084
;
4, determine rotation key value matrix
In the software of implementation algorithm, with floating number array U, V storage rotation key value matrix, provides array index span in square bracket:
U[0..3][-227..?227][?-227..?227]
V[0..3][-?227..?227][?-227..?227]
Fill array
U[k][x][y]?=?x*cos(2^k*PI/8)?-?y*sin(2^k*PI/8)
V[k][x][y]?=?y*cos(2^k*?PI?/8)?+?x*sin(2^k*PI/8)
Wherein PI is circular constant.
5, coordinate transformation algorithm is realized
Given new coordinate (x, y) and anglec of rotation alpha, ask old coordinate (u, v).Require the anglec of rotation to meet 0 <=alpha < 2* PI herein.Exceed the angle of this scope, with [0,2* PI) the identical angle of transformation in interval interior whole limit.
K=Round (alpha * 8/PI), (Round is round function), k is resolved into the form of binary expression:
k?=?w[0]?*?1?+?w[1]?*?2?+?w[2]?*?4?+?w[3]?*?8
Array w[] preserve each bit digital of the binary expression formula of k, value is 0 or 1.Because in this example, the value of k is 0..15, therefore maximum 4 of the binary expansion of k.
Obtain array w[] after, first carry out u=x, v=y operation, then for array index variable i, for each value in i=0..3, at w[i] value be to carry out following computing at 1 o'clock:
u?=?U[i][x][y]
v?=?V[i][x][y]
x?=?u
y?=?v
6, adopt step carries out image Rotation Algorithm below:
(1) select target image pixel P (160,120) sets up plane cartesian coordinate system for true origin.
(2) for each the pixel P (x, y) in target image, to calculate its coordinate Q (u, v) in original image according to above-mentioned coordinate transform formula;
(3), if Q (u, v) does not exceed the scope of original image, obtain Q (u, v) and locate the estimated value of color with bilinear interpolation algorithm; If Q (u, v) exceeds coordinates of original image coordinates scope, the estimated value of this place's color is set as black;
(4) in target image, the color of pixel P (x, y) is set to Q (u, v) and locates the estimated value of color.
This algorithm approximately needs 4M memory headroom.
embodiment 3
A several teaching software need to be rotated operation for panel computer display graphics, and institute's anglec of rotation is to be obtained by 30 °, 45 °, 60 ° linear combinations.Realize this algorithm and need a kind of high speed coordinate axis rotational transform computing method.Due to the restriction of panel computer arithmetic speed and storer, this example provides the computing method based on free radical.
1, problem
Navigator resolution is 1024 x 600, and the mapping algorithm that realize requires as follows:
Wherein,
Figure 467026DEST_PATH_IMAGE085
2, determine key parameter
Radius of turn is:
Figure 490529DEST_PATH_IMAGE087
, get
Figure 782970DEST_PATH_IMAGE088
;
Transform definition territory is:
Figure 577751DEST_PATH_IMAGE089
;
Rotation unit angle is:
Figure 272038DEST_PATH_IMAGE090
;
3, determine rotation key value set:
Figure 110550DEST_PATH_IMAGE091
;
4, determine rotation key value matrix
In the software of implementation algorithm, by shaping array, key defines rotation key value set:
key[0..5]?=?{-4,-3,-2,?2,?3,?4}
With floating number array U, V storage rotation key value matrix, provides array index span in square bracket:
U[0..5][-724..?724][?-724..?724]
V[0..5][-?724..?724][?-724..?724]
Fill array
U[k][x][y]?=?x*cos(key[k]*PI/12)?-?y*sin(key[k]*PI/12)
V[k][x][y]?=?y*cos(key[k]*PI/12)?+?x*sin(key[k]*PI/12)
Wherein PI is circular constant.
5, coordinate transformation algorithm is realized
The alpha combined method of given new coordinate (x, y) and the anglec of rotation:
alpha?=?w1*PI/3?+?w1*PI/4?+?w3?*?PI/6
Ask old coordinate (u, v).
Concrete calculation procedure below:
Step 1, m[0..5 defines arrays], according to regular assignment below:
If w1<0, carries out m[0]=-w1, m[5]=0, otherwise carry out m[0]=0, m[5]=w1;
If w2<0, carries out m[1]=-w2, m[4]=0, otherwise carry out m[1]=0, m[4]=w2;
If w3<0, carries out m[2]=-w3, m[3]=0, otherwise carry out m[2]=0, m[3]=w3;
Step 2, u=x is set, v=y;
Step 3, temporary variable i=0 is set;
If step 4 m[i] > 0, below instruction sequence repeat m[i] inferior:
u?=?U[i][x][y]
v?=?V[i][x][y]
x?=?u
y?=?v
Step 5, i=i+1
If step 6 i < 6 jumps to step 4, otherwise continue execution step 7;
Step 7, return to the value of u, v, finish computing.
6, adopt step carries out image Rotation Algorithm below:
(1) select target image pixel P (512,300) sets up plane cartesian coordinate system for true origin.
(2) for each the pixel P (x, y) in target image, to calculate its coordinate Q (u, v) in original image according to above-mentioned coordinate transform formula;
(3), if Q (u, v) does not exceed the scope of original image, obtain Q (u, v) and locate the estimated value of color with bilinear interpolation algorithm; If Q (u, v) exceeds coordinates of original image coordinates scope, the estimated value of this place's color is set as black;
(4) in target image, the color of pixel P (x, y) is set to Q (u, v) and locates the estimated value of color.

Claims (1)

1. an image rotation processing method, is characterized in that comprising following steps:
1.1, determine image rotation boundary parameter
1.1.1 the new setting coordinate, after image rotation is (x, y), and the old setting coordinate before image rotation is (u, v), and the anglec of rotation of image is set as α;
1.1.2, radius of turn R: set
Figure FDA0000504346890000011
wherein max (| x|, | y|) represents the maximal value of the absolute value of horizontal ordinate x and the absolute value of ordinate y of the coordinate (x, y) of all participation coordinate axis rotational transform;
1.1.3, rotational transform field of definition: D={ (x, y) | x 2+ y 2≤ R 2, x, y ∈ Z}
1.1.4, the rotation angle ω of unit:
Figure FDA0000504346890000012
1.2, determine rotation key value set
Adopt one of three kinds of modes below to determine rotation key value set:
1.2.1, enumeration methodology:
1.2.2, binary radix method: K={2 0, 2 1, 2 2..., 2 n-1, wherein,
Figure FDA0000504346890000014
1.2.3, free radical method: select a finite subset of integer Z to do rotation key value set;
1.3, generate rotation key value matrix
1.3.1, one of three kinds of methods described in employing 1.2 generate rotation key value set:
K={k 1,k 2,k 3,...k n},n∈N,n≥1
1.3.2, for each key assignments k i∈ K, generates its corresponding key assignments matrix:
U i=(u i,x,y)
V i=(v i,x,y)
u i,x,y=xcos(k iω)-ysin(k iω)
v i,x,y=xsin(k iω)+ycos(k iω)
Wherein 1≤i≤n, | x|≤R, | y|≤R, i, x, y ∈ Z, (x, y) span comprises rotational transform field of definition D;
1.3.3, utilize key assignments matrix to realize coordinate axis rotational transform: formula is realized according to coordinate axis anglec of rotation k below inew coordinate (x, y) after ω calculates old coordinate (u, v):
u=u i,x,y
v=v i,x,y
In step, utilize this principle to realize rotational transform at any angle below;
1.4, determine key assignments linear combination coefficient
Given anglec of rotation α, selects integer
Figure FDA0000504346890000021
or
Figure FDA0000504346890000022
make | s ω-α | minimum, in conjunction with the rotation key value set K={k providing above 1, k 3, k 3... k n, n ∈ N, n>=1, determine the linear combination expression formula of the rotation key assignments of s:
s = &Sigma; i = 1 n w i k i
Obtain w according to integer programming method for solving ione group of feasible solution, integer programming equation is as follows:
min ( z ) = &Sigma; i = 1 n | w i |
s = &Sigma; i = 1 n w i k i ;
Adopt following either method to determine key assignments linear combination coefficient:
1.4.1, for the rotation key value set K providing by enumeration methodology, there is unique optimum solution in equation:
w i = 1 , ( k i = s ) 0 , ( k i &NotEqual; s ) , ( 1 &le; i &le; n )
1.4.2, for the rotation key value set K providing by binary radix method, w ibe the binary expression formula place value of s, following relation is set up:
s=w 1×2 0+w 2×2 1+w 3×2 2+...+w n-1×2 n-1
Wherein, w i=0, or w i=1,1≤i≤n, i ∈ N;
Can obtain w by s being expanded into binary expression formula ioptimum solution;
1.4.3, the linear combination formula of rotation angle α=s ω for known, in this case key assignments linear combination coefficient directly from
Figure FDA0000504346890000033
obtain;
1.5, carrying out rotational transform calculates
1.5.1, make i=1, u=x, v=y;
1.5.2, following formula double counting w iinferior:
u=u i,x,y
v=v i,x,y
x=u
y=v
1.5.3, i=i+1, if i≤n forwards step 1.5.2 to, otherwise execution step 1.5.4;
1.5.4, (u, v) is the result that (x, y) is rotated conversion;
1.6, image rotation:
1.6.1, Cartesian plane coordinate system coordinate axis rotational transform formula is as follows:
u=xcosα-ysinα
v=xsinα+ycosα
1.6.2, suppose size constancy before and after image rotation, set image and be of a size of w × h; For preventing that rotating rear picture material is tailored because being beyond the boundary, outwards expansion centered by the geometric center of image, with black, or white, or the region of other color filling expansion of specifying in advance; The image expansion that is of a size of w × h is
Figure FDA0000504346890000041
avoid the phenomenon that occurs that content is tailored because of rotation;
1.6.3, taking image rotation center as true origin, set up Cartesian plane coordinate system, image rotation center is selected according to application requirements, if there is no special requirement, selecting the geometric center of image is rotation center;
1.6.4, for each the pixel P (x, y) in target image, calculate its coordinate Q (u, v) in original image according to coordinate transform formula;
If 1.6.5 Q (u, v) coordinate is integer, the color filling that can directly get this coordinate respective pixel is located to target image pixel P (x, y); If Q (u, v) coordinate is not integer, can be according to conventional linear interpolation, or the color of bilinear interpolation estimation Q (u, v) some pixel, and this color filling is located to target image pixel P (x, y); If Q (u, v) coordinate exceeds original image scope, can use black, or white, or other color of specifying is in advance as the color of this place's pixel, and this color filling is located to target image pixel P (x, y).
CN201210170663.9A 2012-05-29 2012-05-29 Image rotation processing method Active CN102750669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210170663.9A CN102750669B (en) 2012-05-29 2012-05-29 Image rotation processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210170663.9A CN102750669B (en) 2012-05-29 2012-05-29 Image rotation processing method

Publications (2)

Publication Number Publication Date
CN102750669A CN102750669A (en) 2012-10-24
CN102750669B true CN102750669B (en) 2014-07-09

Family

ID=47030819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210170663.9A Active CN102750669B (en) 2012-05-29 2012-05-29 Image rotation processing method

Country Status (1)

Country Link
CN (1) CN102750669B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550991A (en) * 2015-12-11 2016-05-04 中国航空工业集团公司西安航空计算技术研究所 Image non-polar rotation method
CN105719242A (en) * 2016-01-13 2016-06-29 广州市赛普电子科技有限公司 Picture rapid rotation method and system based on look-up table method
CN105739874A (en) * 2016-03-11 2016-07-06 沈阳聚德视频技术有限公司 EDMA achieving method in image rotation based on DSP
CN107784624B (en) * 2017-09-28 2020-12-04 北京华航无线电测量研究所 Method for making matching area image
CN110415177A (en) * 2019-07-26 2019-11-05 四川长虹电器股份有限公司 A kind of image rotation sanction drawing method based on Java
CN112085815B (en) * 2020-09-14 2024-05-24 深圳市先地图像科技有限公司 Transformation method of polar coordinate image

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937698A (en) * 2006-10-19 2007-03-28 上海交通大学 Image processing method for image distortion automatic correction
CN101227680A (en) * 2008-02-01 2008-07-23 嘉兴闻泰通讯科技有限公司 Mobile phone with dynamic switch interface and method of mobile phone interface dynamic switch

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060077211A1 (en) * 2004-09-29 2006-04-13 Mengyao Zhou Embedded device with image rotation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937698A (en) * 2006-10-19 2007-03-28 上海交通大学 Image processing method for image distortion automatic correction
CN101227680A (en) * 2008-02-01 2008-07-23 嘉兴闻泰通讯科技有限公司 Mobile phone with dynamic switch interface and method of mobile phone interface dynamic switch

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
坐标***变换在图像处理中的应用和实现;曹军 等;《计算机与数字工程》;20080731;第36卷(第7期);全文 *
曹军 等.坐标***变换在图像处理中的应用和实现.《计算机与数字工程》.2008,第36卷(第7期),

Also Published As

Publication number Publication date
CN102750669A (en) 2012-10-24

Similar Documents

Publication Publication Date Title
CN102750669B (en) Image rotation processing method
Jiao et al. Accelerating low bit-width convolutional neural networks with embedded FPGA
AU2010257305B2 (en) Techniques for density mapping
CN110411464B (en) Three-dimensional point cloud map generation method, device, equipment and storage medium
WO2016095749A1 (en) Method and device for querying spatial object and establishing spatial index of electronic map
CN109814836A (en) A kind of trigonometric function calculation method and device based on interval division and CORDIC
CN103530904B (en) A kind of underwater landform digital method for building up based on kriging method
CN102567950A (en) Image scaling method and system
WO2023221658A1 (en) Method for planning optimal path having minimum target positioning error of autonomous surface vehicle
CN110781446A (en) Method for rapidly calculating average vorticity deviation of ocean mesoscale vortex Lagrange
CN102393812A (en) Implementation method for rapid scalar multiplication algorithm in elliptic curve cryptosystem
US9151842B2 (en) Method and apparatus for time of flight sensor 2-dimensional and 3-dimensional map generation
JPH0522271B2 (en)
CN107067454B (en) Radar force diagram three-dimensional display method based on hypergraph component development platform
CN104123411A (en) Automobile powertrain system rotational inertia synthetic method
CN101697235B (en) Perspective drawing generation method and perspective drawing generation device
CN110633447B (en) Spherical distance fixed-point calculation method based on FPGA and calculation device thereof
Li et al. Boundedness of singular integrals associated to surfaces of revolution on Triebel–Lizorkin spaces
CN115489340A (en) Multi-motor torque distribution method and device, computer equipment and storage medium
US6647403B2 (en) Method and digital signal processing equipment for performing digital signal processing calculation
CN107527320B (en) Method for accelerating bilinear interpolation calculation
CN116405883B (en) Coverage searching method and device for unmanned equipment cluster and terminal equipment
CN110009549B (en) Computing method of rotational symmetry descriptor and hardware accelerator
CN108111086B (en) Method for improving instantaneity of direct torque control in switch meter mode
CN102968925A (en) Method for converting projection coordinate into geodetic coordinate

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: Shun high tech Zone of Ji'nan City, Shandong province 250101 China West Road No. 699

Patentee after: SYNTHESIS ELECTRONIC TECHNOLOGY CO., LTD.

Address before: 250101, No. 699, Shun Hua West Road, Lixia hi tech Zone, Lixia District, Shandong, Ji'nan

Patentee before: Shandong Synthesis Electronic Technology Co., Ltd.