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?
Asked
Active
Viewed 132 times
2
-
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. – user1118321 Oct 26 '17 at 04:57
-
Does the transformation need to be perspective correct ? – PaulHK Oct 26 '17 at 12:27
-
@PaulHK what do you mean by perspective correct? – Lincoln Bergeson Oct 26 '17 at 15:38
-
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. – PaulHK Oct 27 '17 at 02:40
1 Answers
0
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.
Lincoln Bergeson
- 171
- 4