# Thread: Image rotation without cropping....

1. ## Image rotation without cropping....

Hello Team,

I am new to image processing..... and I am learning the concepts.
Recently I have done image rotation of grey scale image using the following formula:
x' = xcos(theta)-ysin(theta)
y' = xsin(theta)+ycos(theta)

The problem i have faced is image is getting cropped.

I want to rotate an image without cropping.
I have searched a lot but I am not getting any algorithm based on C.
Can anyone please help me in getting the algorithm for image rotation without cropping.

Thanks in advance.....

2. We don't hand out solutions here. But if you make an attempt, and post your code, we can probably help you sort out your cropping problem. Remember, post your code in [code][/code] tags. make sure it's properly formatted and indented.

3. Originally Posted by chakriv
Hello Team,

I am new to image processing..... and I am learning the concepts.
Recently I have done image rotation of grey scale image using the following formula:
x' = xcos(theta)-ysin(theta)
y' = xsin(theta)+ycos(theta)

The problem i have faced is image is getting cropped.

I want to rotate an image without cropping.
I have searched a lot but I am not getting any algorithm based on C.
Can anyone please help me in getting the algorithm for image rotation without cropping.

Thanks in advance.....
You need to increase the width and height of the image to prevent cropping.
Rotate around the center of the image.
Add half of the increase width and height to the x result and y result.
There should be some simple trig equation to figure out the new width and height based on theta and old width and old height.

Tim S.

Popular pages Recent additions