2012/7/26 Jordi Gutiérrez Hermoso <jord...@octave.org>

> On 26 July 2012 04:36, pantxo diribarne <pantxo.diriba...@gmail.com>
> wrote:
> > I quickly wrote a draft cp2tform.m that I can develop and share if nobody
> > has a more advanced version.
>
> Any reason why you haven't shared it already? :-)
>
> - Jordi G. H.
>
Maybe because it's a draft (see attachement). I am currently trying to
figure out what inverse and forward transform means.

I only tested it with "x-sheared" point coordinates (cap) vs real
coordiantes (crw). A simple test :

cap = [1, 0; 2, 0; 3, 0; 1.1, 1; 2.1, 1; 3.1, 1];
crw = [1, 0; 2, 0; 3, 0; 1, 1; 2, 1; 3, 1];

plot (cap(:,1), cap(:,2), '+r;apparent;', crw(:,1), crw(:,2),'+k;real
world;')
axis ([.5 3.5 -.5 1.5])

T = cp2tform (cap, crw, 'Affine');
T.forward_fcn (cap, T.tdata(:,1)) - crw(:,1)
T.forward_fcn (cap, T.tdata(:,2)) - crw(:,2)

T = cp2tform (cap, crw, 'Polynomial', 4);
T.forward_fcn (cap, T.tdata(:,1)) - crw(:,1)
T.forward_fcn (cap, T.tdata(:,2)) - crw(:,2)

Pantxo

Attachment: cp2tform.m
Description: Binary data

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to