help me plz

4 次查看(过去 30 天)
lama riad
lama riad 2012-2-2
编辑: Matt J 2013-9-27
Hi, I want to display all i did for the image (translation, scale, and rotation) but error is still appearing. Can any body help me :'(
this is the code i did:
I=imread('cameraman.jpg');
deg = -30;
I2 = imrotate(I, deg, 'bilinear', 'crop');
J=imresize(I,[900 900],'nearest');
T = [1 0 0; 0 1 0;70 70 1];
tform_translate = maketform('affine', T);
[I3,xdata,ydata] = imtransform(I,tform_translate);
all=I3+I2+J;
imshow(all)
  2 个评论
Walter Roberson
Walter Roberson 2012-2-2
Please edit the title to something relevant to the topic.
lama riad
lama riad 2012-2-3
rotation,scale,translation all in one image

请先登录,再进行评论。

采纳的回答

Wayne King
Wayne King 2012-2-2
You cannot resize the image and then add it to versions which are not resized.
Matrix addition is only defined for matrices of the same size.
I'm assuming that is your error since you do not give us the error you are getting.
  1 个评论
lama riad
lama riad 2012-2-3
you are right the error in the resizing but I don't know what 2 do

请先登录,再进行评论。

更多回答(2 个)

lama riad
lama riad 2012-2-2
ok, can u help me solving that?
  2 个评论
Walter Roberson
Walter Roberson 2012-2-2
What is your desired end result?
lama riad
lama riad 2012-2-3
my desired result is rotated,scaled, and translated image

请先登录,再进行评论。


fjnb86
fjnb86 2012-2-3
dont forget to put next time a title describing ur topic ;)
  1 个评论
lama riad
lama riad 2012-2-3
ok,sorry 4 that....I'll try not 2 do this fatal mistake in future :-P

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by