I am trying to map a captured image quadrangle to deskewed view as if viewed from top. My image contains an A4 sheet of paper with some text on it. I have calculated the Homography Matrix H using the corner points and corresponding deskewed points ( 0,0 0,h w,0 & w,h ).
I am expecting an image as output as per imwarp documentation but I am getting a single integer. What am i doing wrong?
Here is the code for doing transformation:
Trial>> H
H =
1.4827 0.1074 -508.2923
0.0122 0.9982 -387.1204
0.0000 0.0000 1.0000
Trial>> tf = projective2d(H);
Trial>> tf
tf =
projective2d with properties:
T: [3×3 double]
Dimensionality: 2
Trial>> imwarp(Image, tf)
ans =
uint8
213
Trial>>