Paul Pavlov Paul Pavlov - 10 months ago 52
Python Question

Linear extrapolation. How to find missed corners outside the image? (python OpenCV2)

StackOverflow! Thanks to everyone who will try to help me. I'm very beginner in OpenCV, so don't be very judgment :)

The task is: find all (4) corners of given red polygon on the image: red polygon

I know how to find all corners if all borders are visible (linear extrapolation, phew, easy).

The question is: how to find bottom corners if we don't see the bottom border?

Answer Source

The answer is quite simple. You can't.

If you don't have both dimensions of your rectangle you cannot find missing corners. You cannot know how far that rectangle extends outside your image.

For your example the only way would be to assume that corner 3 is on the image border. Then you can calculate the missing 4th corner.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download