A
A
AlexRas2020-03-10 21:15:21
ImageMagick
AlexRas, 2020-03-10 21:15:21

How can you straighten the perspective of images?

Hello, there are such images:

5e67d862d67a6629337124.jpeg
5e67d869daf00611946363.jpeg
The main task is to align the perspective, imagemagick seems to be able to handle this, but for this, as I understand it, you need to get the coordinators of all 4 labels. With this difficulty, I have no idea how this can be done. Tell me where to go next, how you can get marks and align the perspective.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2020-03-10
@gbg

Gaussian blur - binarize - find boundaries - Hough transform - eggsbasket - find 4 maxima (these will be angles) - convert coordinates back - congratulations, you are great.
Hough transformation - two straight lines turned into two bright points
1200px-Hough-example-result-en.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question