How to calculate the percentage of distoration

distortion
As the content picture denoted, I want to calculate the percentage of distortion from a image, which is the following formual:

`T=(H1-H2)/H`

I’m very new to the openCV, can someone give an assistance for this problem, thanks.

what information is given to you?

related:

There is an image from input.

and you think that’s enough?

Hi @silent-alexA

I don’t know why you need this percentage, but you can calculate it from distortion coefficients. You can learn about them in this tutorial (see first part of Theory until distortion_coefficient, just before the matrix).

If you have this coefficients, you don’t need an image, only its size. If you don’t have them, you need to calibrate the camera as explained in the same tutorial, with many images from a pattern.

Micka comment on your stackoverflow post tells you how to compute the percentage when you know the pixels coords.