Inverse Perspective Mapping (newbie)

asked Nov 25 '15

johnfulgor gravatar image

updated Nov 26 '15

Hello all, I have a picture containing two geometric shapes on the same plane. The picure is taken from some unknown point of view. One shape is a square of know size, the other is unknown. Is it possible to revert the perspective transform, and measure the size of the unknown shapes? I am new to OpenCV, and I've only understood that this has to do with Inverse Perspective Mapping. What is the sequence of function calls? image description Thank you

I've tryed both affine and perspective transform, but the result is not what I want. The arch is still distorted, even if the square is not.

ORIGINAL

image description

AFFINE

image description

PERSPECTIVE

image description

Any idea?

Preview: (hide)

Comments

1

show your picture ;)

berak gravatar imageberak (Nov 25 '15)edit

Are you looking for a tutorial?

thdrksdfthmn gravatar imagethdrksdfthmn (Nov 25 '15)edit

It is possible! You should detect the known object (threshold + find contours then find the approximation of the 2 quadrilaterals), do perspective transformation (with the 4 corners on scale you know), then detect the second object (unknown one) on the transformed image and do the calculus (based on ratios) to find its size

thdrksdfthmn gravatar imagethdrksdfthmn (Nov 26 '15)edit

Is your arch always the same? Have you tried the features then perspective transformation, like here, and then do the correction of the image instead of detection of the arch? This should return the arch with no deformations. But then, you should see if the paper is the same, or the square...

thdrksdfthmn gravatar imagethdrksdfthmn (Nov 27 '15)edit