Re: rotate image around all axes
- From: "benjamin m?ller" <pernell@xxxxxxx>
- Date: Thu, 27 Nov 2008 01:56:01 +0000 (UTC)
ImageAnalyst <imageanalyst@xxxxxxxxxxxxxx> wrote in message <df31a29f-0103-4c3a-b199-dbcd72196fb3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>...
On Nov 26, 8:25=A0pm, "benjamin m?ller" <pern...@xxxxxxx> wrote:
hi,taken from a camera which angle is not normal to the object plane. I got th=
at first sorry if my english is not perfect. I got pictures of an object =
e angles to rotate the image around the x,y and z axes. For that purpose i =
thought i can use maketform and imtransform. Now i got 2 problems. The rota=
tion of the Image around the Z axes works good with following rotation matr=
ix:
xes
T =3D [cosd(angle) -sind(angle) 0; sind(angle) cosd(angle) 0;0 0 1];
Problem 1:
when i try the same with the x and y axes with the following matrixs
T =3D [1 0 0; 0 cosd(angle) -sind(angle);0 sind(angle) cosd(angle)], %x-a=
T =3D [cosd(angle) 0 sind(angle); 0 1 0;-sind(angle) 0 cosd(angle)], %y-a=xes
0.5 degrees the result looks like it has been rotated with more than 45 deg=
it works too, but the result is not right. when im trying to rotate with =
rees.
le is normal to the image plane, but for this purpose I need the axes which=
Problem2:
I want the pictures to look like there were taken from a camera which ang=
i want to rotate around in the middle of the picture. Got anybody an idea =
how to realize that?
y
thank you very, very much for answering!!
at last: for testing i used following code:
I=3Dimread('testpic.jpg');
angle=3D0.05;
figure;
imshow(I)
% T =3D [1 0 0; 0 cosd(angle) -sind(angle);0 sind(angle) cosd(angle)], %x
=A0T =3D [cosd(angle) 0 sind(angle); 0 1 0;-sind(angle) 0 cosd(angle)], %=
% T =3D [cosd(angle) -sind(angle) 0; sind(angle) cosd(angle) 0;0 0 1], %z
t_proj =3D maketform('projective',T);
I_projective =3D imtrangleform(I,t_proj);
figure;
imshow(I_projective);
-----------------------------------
benjamin:
For problem #1, are you sure you're passing in radians? Sin and cos
want radians so if you pass in 0.5 you're not passing in half a degree
but .5 radians which would be around 30 degrees.
Regards,
ImageAnalyst
hello imageanalyst,
thanks for your answer! I used sind and cosd so i can give the arguments in degrees...so that shouldnt be the problem:/ thank you anyway:)
regards,
benjamin
.
- Follow-Ups:
- Re: rotate image around all axes
- From: benjamin m?ller
- Re: rotate image around all axes
- References:
- rotate image around all axes
- From: benjamin m?ller
- Re: rotate image around all axes
- From: ImageAnalyst
- rotate image around all axes
- Prev by Date: Re: rotate image around all axes
- Next by Date: need help urgently
- Previous by thread: Re: rotate image around all axes
- Next by thread: Re: rotate image around all axes
- Index(es):
Relevant Pages
|