MATLAB: Calculating volume from a photo

Image Processing Toolboxvolume

Hi! I want to ask is there a way to calculate the volume of wine inside the wine glass like in this photo? Or do I need more photos of this wine glass from different perspectives?

Best Answer

We can't see your photo. But if you assume the glass is round, and if you've calibrated spatially, then you should be able to calculate approximate volume. You may need to throw in a small fudge factor to account for the refraction near the edges. To do that you could fill the glass with known volumes, then measure the area in pixels and calculate the volume. Prepare a function to transform the pixel volume into an actual volume in milliliters.
Related Question