1 | initial version |
You should utilize a constant, such as a marker object... i.e. a QR code or some such unique symbol to be used as reference. Without leveraging a depth sensor or some known variable there is no telling. Is the circle the constant... the glass? It's a hall of mirrors otherwise, so you need an extra "variable", such as a ruler in every picture, to extrapolate.
Also, the javascript blueimp LoadImage is helpful for image alignment. It will rotate images using EXIF/orientation codes (using the canvas option). You may also set min/max width/height, which should help relative comparison*. I think it does not mirror front/back camera though.
*OpenCV images read as responsive size, whereas canvas will maintain original size..?