Problem with Polynomial Transformation using "imtransform"
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi there,
I am having a problem, that I have been not able to solve for quite a time:
I have a matrix representing a grayvalue image, this image is being transformed using a polynomial basis "PolynomialT" using imtransform:
xybase = reshape(randn(12,1),6,2);
t_poly = cp2tform(xybase,xybase,'polynomial',2);
t_poly.tdata = PolynomialT;
Iform = imtransform(I,t_poly,'FillValues',0,'Size',size(I),'XData',[1, size(I,2)],'YData',[1, size(I,1)]);
now i have two vectors representing positions in the image in X and Y (both of which with a lengtn of m). I would like to apply the transform to these points as well such, that I find the points in the transformed image. (the background is a validation of some deformation detection algorithm). I have tried to establish this in manual matter such as
V = [1 X(k) Y(k) X(k)*Y(k) X(k)^2 Y(k)^2] * PolynomialT;
Xform(k) = V(1);
Yform(k) = V(2);
but none of the attempts I tried did work out. I also considered changing the y-indices, as the image is indiced differently, but that didn't solve it either. Do one of you gudys have any idea how to solve that problem?
Kind regards Mathias
0 Kommentare
Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!