After some trial and error for finding the distance in pixel, a (potentially tentative) solution has been found. Actually, two different solutions were found which yielded me different results with the picture I was testing:distance

In this screenshot I used a method widely recommended by stackoverflow and other sources for finding the distance between two points, which can be seen in the code. To find the center of the two circles in the first place, a small and probably inefficient algorithm was used.

The current result from the image that I’m going to go with for now is 266.27 pixels.

The next task is to figure out the width in pixels of the image itself to determine whether this is a plausible solution, as the other solution I was getting was 92485 pixels.

Once that is figured out, I should very soon be able to begin with the cardboard detection and conversion values to find distance in mm. I will try to accomplish this with a picture of my own face.