Is it possible to calculate the distance of an object with known size? I would like to do this with an ball which has 7cm diamater. Now for the first calculation I would put him in 30cm distance to the webcam and in the second 50cm. Is there a linear function or formular to calculate somehow the distance? Lets say in the first measure it has a diamater of 6 pixel and in the second only 4. There must be a formular for this?
Best regards