Ask Your Question

Revision history [back]

How to detect object is perpendicular to camera optical axis?

I want to detect whether object is perpendicular to optical axis.

image description

Sample input will be an image that has and object (cylinder shape similar to a bottle) in it and a mostly plain background.

Output will be a boolean determining whether that object is perpendicular to camera axis. This does not require to have much accuracy.

For example following image is not perpendicular to camera axis

image description

Following image is not perpendicular too because camera angle is little bit from above

image description

Next image is perpendicular and in the correct position

image description

Is there any algorithm in OpenCV to do this?