필터 지우기
필터 지우기

heres my code.... getting an error ? Error using ==> horzcat CAT arguments dimensions are not consistent. Error in ==> practice at 3 result=[x(:),y(:),h(:)]; please help????????

조회 수: 1 (최근 30일)
h=double(imread('evening.jpg'));
[x,y]=meshgrid(1:size(h,1), 1:size(h,2));
result=[x(:),y(:),h(:)];

답변 (2개)

Anuj
Anuj 2014년 1월 28일
The number of rows in x,y,h are not same, so they cannot be concatenated. check your matrix dimensions.
  댓글 수: 1
Prasad
Prasad 2014년 1월 28일
sorry.. but im completely new to matlab. can u pls help me out finding the co ordinates of an image. my ultimate aim is to perform skewing!!!

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2014년 1월 28일
편집: Image Analyst 2014년 1월 28일
Why? You don't need to do that (call meshgrid). You don't need to get the row, column coordinate of every single pixel in your image. Why not just call imtransform() to do skewing? By the way, you didn't even call it correctly. You mixed up x and y with rows and columns. x is columns, not rows and not gotten from size(h, 1).
  댓글 수: 2
Prasad
Prasad 2014년 1월 28일
편집: Prasad 2014년 1월 28일
ohh.. thanx. i would be very grateful if u could provide me with a sample code werin imtransform() has been utilized to perform skewing... thank you in advance!!!
Image Analyst
Image Analyst 2014년 1월 28일
Did you look at it yet? Don't you want what they call shear in their first example in the help?
I = imread('cameraman.tif');
tform = maketform('affine',[1 0 0; .5 1 0; 0 0 1]);
J = imtransform(I,tform);
imshow(I), figure, imshow(J)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by