image warp
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
hello , I have 2 RGB images
A= imread('fig146.png'); B= imread('fig147.png');
I take only green component of these images G1=A(:,:,2);% 9x15 size G2=B(:,:,2);% 9x15 size [m n]=size(G2);
I compute lucas kanade method and get velocity vector Vx and Vy , which are 6x12 matrices each. Now i need to warp G2 and get G2b which must be 9x15 size my code is as follows-
G2b=G2; for i=2:m-2 for j=2:n-2 X= j+Vy(i-1,j-1); Y= i+Vx(i-1,j-1); X(X < 1) = 1; X(X > n) = n; Y(Y < 1) = 1; Y(Y > m) = m; G2b(i,j)=G2(round(Y),round(X)); end end
I have scanned image fully here which is not so gud practice. Can i get some better code than this above ? provide me any code using matlab functions warp ,interp2 to warp G2 and get G2b .
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Read, Write, and Modify Image in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!