hi,
i have to rotate an image. the image is stored in an image[rows][cols] array..
i am trying to rotate it using trignometric functions.
i am not sure what happens when i rotate the image,
does the address of the pixel vary or the value of the pixel vary.
and when i rotate an image by say 45 degrees, then wont it fall out of the gird?
please clear my doubts :-|
dalaharp
0
Light Poster
Recommended Answers
Jump to Post>>does the address of the pixel vary or the value of the pixel vary.
Depends how you see this matter: let's assume the rotation center is the center of the image. So, rotating the image means the pixel p[x][y] will have the value that was allocated to the pixel p[x1][y1] …
Jump to PostI think the correct relations are more like
r1 = iorig + (i - iorig)sin(angle)
c1 = jorig + (j - jorig)cos(angle)
where iorig, jorig are th ecoordinates of the rotation center.
(but I'm not too sure - it's a long time since I did some trigonometry:(()
And, also, there …
Jump to PostIf you rotate a square image about it's center, clipping will occur on all sides. The most clipping will occur when the image is rotated by a multiple of 45 degress. At a multiple of 45 degrees, any part of the image extending past the original boundries will clip, which …
Jump to PostIf its' on Windows, just use win32 api
(1 line of code..)Go ahead then, tell us how to do it in one line.
Jump to PostI have a problem i wanted to rotate a picture and calculate the time taken using "C" programming language ..Its really very urgent .. Please help me out ..
Start a new thread, and show your current effort. It might be 'urgent' for you, but it's not for anybody else.
All 19 Replies
frrossk
2
Posting Whiz in Training
dalaharp
0
Light Poster
frrossk
2
Posting Whiz in Training
glSuccinct
3
Newbie Poster
sarinsukumar
-6
Newbie Poster
Salem
commented:
Pointless 4-year dredging of the bottom of the pond
-6
mj_crookshanks
-6
Newbie Poster
Salem
commented:
"me too" should try harder with a search engine first
-6
marco93
-87
Junior Poster
William Hemsworth
1,339
Posting Virtuoso
mitrmkar
commented:
marco93 seems to be such a "one-liner", If I recall right. Let's see whether he will answer ...
+6
Karan_111
0
Newbie Poster
William Hemsworth
1,339
Posting Virtuoso
sarinsukumar
-6
Newbie Poster
mahana
0
Newbie Poster
sarinsukumar
-6
Newbie Poster
arielbernal
0
Newbie Poster
xenonscreams
0
Newbie Poster
arielbernal
0
Newbie Poster
xenonscreams
0
Newbie Poster
arielbernal
0
Newbie Poster
arielbernal
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.