I am trying to use a projective transformation to turn an isosceles trapezoid into a rectangle, and after the transformation, I'm left with excess regions and I'm stuck trying to crop out the rectangle I want. imwarp doesn't allow me to see where those vertices by which I defined my transformation went using fitgeotrans , so I don't know what vertices to put for imcrop . Below is an example.
I know the pixel size of the final picture I want, and the excess region lies outside of that pixel area so I just want to crop it out. Since the trapezoid is isosceles, I can crop it in the x-direction just by math, but the y-direction is stretched, and in my application could be stretched in many ways due to different trapezoid shapes. I'm not sure how to get those y-coordinates. Any ideas?