0

Given 9 original points, their coordinates and their corresponding moved points, I want to estimate their geometrical transformation matrix and then verify the matrix: I started with

p1 = [1,1; 1,50;    1,100;  50,1;   50,50;     50,100;      100,1; 100,50; 100,100];
p2 = [5,5; 17.5,80; 30,155; 55,5;  68.75,67.5; 82.5,130;   105,5; 120,55; 135,105];
figure(1), scatter(p2(:,1), p2(:,2));
t = estimateGeometricTransform2D(p2,p1,'projective');
p2p = [p1,ones(9,1)]*inv(t.T);
% or p2p = [p1,ones(9,1)]*t.T;
% or p2p = [p1,ones(9,1)]*t.A;

% verify the matrix t by comparing figures 1 and 2
figure(2), scatter(p2p(:,1), p2p(:,2));  

However, the result doesn't show the transform matrix t fitted to the two sets of points (p1 and p2). Later, I also tried the 'affine' instead of the 'projective' parameter, as well as the 'estimateFundamentalMatrix' function, the results are not shown as I expected.

Is there anything wrong with the codes? or Did I make some theoretical mistake in the projective transformation? I hope you can point out some errors!

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36

0 Answers0