Interpolation between two 2D projective geometric transformations
이전 댓글 표시
Hello,
I need to interpolate between two 2-D projective geometric transformations, in order to obtain the tforms between the two limiting tforms. I have a 2-levels target to calibrate a camera and I use functions fitgeotrans and imwarp to obtain the transformation between the target and the camera image. As it is two levels, I have two t-forms, one for the initial state and the other for the final state.
Ltarget = imread('target.tif') ;
I = imread('image_camera.tif') ;
% Points_target : Centroids of target circles
% Points_initial: Coordinates of the centroids on the camera image in the initial state
% Points_final: Coordinates of the centroids on the camera image in the final state
t1 = fitgeotrans(Points_target, Points_initial,'projective'); %initial transform
t2 = fitgeotrans(Points_target, Points_final,'projective'); % final transform
J1 = imwarp( Ltarget , t1 , 'OutputView', imref2d(size(im2bw(I)))); % get the centroids coordinates on the image camera in the initial state
J2 = imwarp( Ltarget , t2 , 'OutputView', imref2d(size(im2bw(I))));% same but in the final state


The figure "target" shows Ltarget and the second figure shows the superposition of the centroids using respectively transforms t1 (red x) and t2 (green +).
I’d like to get the transformations allowing to find the interpolated positions between initial and final states, using a linear interpolation. Does someone know a function or a smart way to do that ?
I was thinking of doing it by hand by interpolating the trajectory between initial and final locations for the point (x,y) of interest, but it will be very heavy. The function transformtraj() might be what I mean but it takes 4-by-4 homogeneous transformations while my tform is :
projective2d with properties:
T: [3×3 double]
Dimensionality: 2
Thanks in advance,
Elsa
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
