Answer the question
In order to leave comments, you need to log in
How in OpenCV to force warpPerspective to display the entire image plane, and not crop it?
Greetings!
I find 4 points on the image,
through getPerspectiveTransform I get the transformation matrix , I
restore the image through warpPerspective
and it turns out cropped in the upper left corner, since I set the original points [0,0][0,100][100,0][100,100]
how to do what would warpPerspective gave out the rest of the image?
Answer the question
In order to leave comments, you need to log in
In general, in short:
you need to shift the target points in
order to find where to shift - you need to find out where the corners of the image will be after transformation
using them; find the bounding box
by its position; shift all target points in the opposite direction ;
recalculate the transformation
matrix . /opencv-warpperspective-bez-obrezki-whole...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question