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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
h=double(imread('evening.jpg'));
[x,y]=meshgrid(1:size(h,1), 1:size(h,2));
result=[x(:),y(:),h(:)];
0 Kommentare
Antworten (2)
Anuj
am 28 Jan. 2014
The number of rows in x,y,h are not same, so they cannot be concatenated. check your matrix dimensions.
Image Analyst
am 28 Jan. 2014
Bearbeitet: Image Analyst
am 28 Jan. 2014
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 Kommentare
Image Analyst
am 28 Jan. 2014
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)
Siehe auch
Kategorien
Mehr zu Geometric Transformation and Image Registration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!