Hello, help me please understand the fitgeotrans funcion in Matlab.
I have different images of various sizes of a square object, and in different perspective views; in all of this images I have detected the object and found its 4 corners. Now what I want to do is to make a perspective rectification of these images so that after I can get a "plan view" of this object and then crop the image around this object.
I have implemented this code in Matlab based on some search in the Web:
movingPoints = corners;
fixedPoints = [0 0; 500 0; 500 500; 0 500];
tform = fitgeotrans(movingPoints,fixedPoints,'projective');
warp = imwarp(image,tform);
And it's working, I get my object in "plan view". However the object rectified sometimes is very big(or near), and sometimes is small(or distant can we say); I suppose it's because of how much "work" has done the transformation.
How do I choose the fixedPoints so that after I can crop my object knowing the new corners position in the image rectified ?