Calculating distance from camera (webcam in this case) to object using opencv library.
Minimum distance it can calculate is 20 cm, afterwards frame does not fit the screen and hence incorrect values. Values are correct to order of 3-4 cm.
I am using python 3.9 as of now and Cvzone and mideapipe library files. If you want to change some values in the code and it does not run. Try re-downloading this library files. Thanks!