image warp
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!