Raoul
Raoul

Reputation: 1902

OpenCV circle distortion detection

OpenCV has capapabilities to compensate for distortion in patterns, such as a this board, for example:

enter image description here

Every example I ever saw for this process does it with grids or squares. I would like to know if something similar exists for a single circle. My practical case is that I detect an ellipse, and I need to calculate the angle between the plane of this ellipse and the projection plane where the ellipse is projected as a circle. I managed to achieve that in my own code, but I would like to know if there is something built into the library to that purpose.

Upvotes: 3

Views: 1576

Answers (1)

Jiby
Jiby

Reputation: 1885

Use the ellipse axes to your advantage

I don't know of any "circular projection" as you name it, but I'm thinking that you can rephrase your problem into having the solution already.

enter image description here Images make any answer SO cool.

Forget the ellipse, take the axes

A circle can be thought of as 2 vectors with unit norm defining a plane.

The projected circle's axes you estimate are the projection of the unit referential into the 3D plane

Then for projecting back and forth is just an affair of applying the transformation described by the estimated axes vectors

Upvotes: 3

Related Questions