2
$\begingroup$

Suppose I took a picture of a whiteboard at an angle. If I could detect where the corners of the whiteboard are, what algorithms and linear projections could I use to convert this slanted view into a "head on" view?

$\endgroup$
4
  • $\begingroup$ Check out the answer to this question. You can take any 4 points and transform the quadrilateral between them into a unit square. From there you can simply scale in x and y to the size and shape you want. $\endgroup$ Oct 26, 2017 at 4:57
  • $\begingroup$ Does the transformation need to be perspective correct ? $\endgroup$
    – PaulHK
    Oct 26, 2017 at 12:27
  • $\begingroup$ @PaulHK what do you mean by perspective correct? $\endgroup$ Oct 26, 2017 at 15:38
  • $\begingroup$ For example, if the floor was a huge chess board, we would see squares vanish into the distance. When transforming back to 2d we need to take that perspective into account. $\endgroup$
    – PaulHK
    Oct 27, 2017 at 2:40

1 Answer 1

0
$\begingroup$

As @user1118321 mentioned, as well as @NathanReed in this answer to another question, you can do a perspective transform to transform any convex quadrilateral to any other.

OpenCV has a good library for doing perspective transformations if you don't want to roll your own.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.