How to determine volume from a picture?

In summary, the conversation discusses a problem where the volume of a balloon before it explodes needs to be determined. The method of using a program to export coordinates and then calculating the volume using an integral is discussed, but the accuracy of this method is questioned. Other suggestions, such as fitting a curve or considering the physics of the experiment, are also brought up. The idea of using the vector from the first point to the last point as the x-axis and projecting the points onto the y-axis to calculate the volume is also mentioned.
  • #1
skrat
748
8
Hello,

It's my first time here on this forum and if my English is bad, than I at least hope I have chosen the right topic.

Well, let me describe my problem: Imagine a .jpg with a balloon. What I have to do is determine a volume of it in the moment before it blows up. So in reality I have a movie, but I used a program where I can move frame by frame to get the last frame before the balloon explodes.

Now, how can I determine the volume from surface? I tried to use this http://getdata-graph-digitizer.com/ , a program that can export .txt file of coordinates. But when I put this .txt file into "homemade" program written in Java to calculate the proper integral, the volumes don't make any sense and I am 100% sure that my program works properly and I even checked the units 25 times.

Is there any other way to do is more elegant and as precise as possible? (Let's say that balloon is totally symmetrical).

Please help!
 

Attachments

  • Capture.JPG
    Capture.JPG
    22.4 KB · Views: 415
Mathematics news on Phys.org
  • #2
When you say "surface" you mean the surface seen projected onto the plane, not the surface of the three dimensional balloon, right? Let's start with a simpler version. A sphere, with radius R, has volume [itex](4/3)\pi R^3[/itex] and projects onto any plane as a circle of radius R, having area [itex]\pi R^2[/itex]. Therefore the volume is [itex]((4/3)\pi R^3)/(\pi R^2)= (4/3)R[/itex] times the area.

For the more complicated version, approximate the volume as a sum of spheres of differing radii.
 
  • #3
HallsofIvy said:
When you say "surface" you mean the surface seen projected onto the plane, not the surface of the three dimensional balloon, right?

Yes, I mean surface seen projected onto the plane.

hmmm... It's a good idea. But the problem is that I have to calculate the volume of 20 balloons. As you probably know, the difference between the volumes before explosion should be zero if the balloons were ideal, since they are not, I expect some difference. However, I am afraid that this approximation with spheres is not good enough to "detect" the small difference, unless of course , I try to minimize the spheric radius as much as possible.

Your idea works in theory, but honestly said, I have no idea how to write that in java or c+.
 
  • #4
Do you mean by surface the purple curve? If yes, you could rotate this curve around the "x-axis" as shown here. You would have to adjust the jpeg to make the balloon symmetrical around the x-axis.

The idea is to http://calculus-geometry.hubpages.com/hub/Disk-Method-Volume-of-Solid-of-Revolution to get the volume.
 
Last edited by a moderator:
  • #5
Using the grid, you could select some representative points on the boundary of the balloon (say, on the pink like) and fit a curve to them. Rotating the curve around the x-axis by the usual integration should give you a pretty good approximation.
 
  • #6
Edgardo said:
Do you mean by surface the purple curve? If yes, you could rotate this curve around the "x-axis" as shown here. You would have to adjust the jpeg to make the balloon symmetrical around the x-axis.

The idea is to http://calculus-geometry.hubpages.com/hub/Disk-Method-Volume-of-Solid-of-Revolution to get the volume.

Well yes, that is exactly what I did. This purple curve is full of points which I can manually put there with the program written above (Graph Digitzer). This program than exports X and Y coordinates of all the points in .txt file.
Later I used my own program written in .java to calculate the integral: [tex]V=\pi \int_{a}^{b}f(x)^{2}dx[/tex] where for [tex]f(x)=\frac{f(x_{n+1})+f(x_{n})}{2} [/tex] and [tex]dx=x_{n+1}-x_{n} [/tex]

I hope this sounds good?

I was just wondering if there is a better method to do this? Because for this, I had to use a lot of photoshop to rotate the picture until the balloon was perfectly horizontal ( because all balloons were not straight - see attachment) in order to get the integral as precise as possible. If anybody is thinking that was silly, well he is right, I could simply define new coordinate system but, sadly software I used - Graph Digitizer, does not have that option and even if it did, it would be extremely hard to determine units.

So is there a simpler and faster version how to do this with the same or even better precision. Fitting a curve? Well yes, another option too, but the fact is that the difference between the volumes is so small that the software might use the same functions for every balloon - meaning the same volume for all of them
 

Attachments

  • balon3.jpg
    balon3.jpg
    12.5 KB · Views: 429
Last edited by a moderator:
  • #7
skrat said:
Is there any other way to do is more elegant and as precise as possible?

I don't claim to have a definite method, but I'll suggest that you consider several frames preceeding the blow up. Sometimes you get a better estimate of the final value of a process by fitting a formula to an interval of it instead of just trying to estimate the final value by itself.

You might be able to bring more physics into the analysis. For example, is the balloon being inflated by a source that is roughly at constant pressure over several frames just before the balloon blows up? Is there a known solution to an idealized version of the experiment? (e.g. blowing up a perfectly spherical ballon). Does the formula for the idealized version suggest fitting some linear or quadratic formulat for V(t) to several frames of data?
 
  • #8
skrat said:
Well yes, that is exactly what I did. This purple curve is full of points which I can manually put there with the program written above (Graph Digitzer). This program than exports X and Y coordinates of all the points in .txt file.

Since the vector from the first point (of all the purple points) to the last point is more-or-less the principle axis of your balloon you could take that vector as your x-axis and take the 2D vector orthogonal to that as your y-axis. Just project each of your purple points onto that y-axis then square and multiply by pi and add it all up (and you probably want to just linearly interpolate in between any two subsequent purple points).
 

1. How can I calculate volume from a picture?

The process of determining volume from a picture involves using mathematical formulas to measure the dimensions of the object in the picture and then calculating the volume using those measurements.

2. What tools do I need to determine volume from a picture?

To determine volume from a picture, you will need a ruler or measuring tape to determine the dimensions of the object in the picture, as well as a calculator to perform the necessary mathematical calculations.

3. Can I determine the volume of any object from a picture?

In most cases, yes. As long as the picture provides a clear and accurate representation of the object's dimensions, you should be able to determine its volume using the appropriate formulas and measurements.

4. Are there any limitations to determining volume from a picture?

One limitation to determining volume from a picture is that the object must have a regular shape. If the object has an irregular shape, it may be more difficult to accurately measure its dimensions and calculate its volume.

5. Are there any tips for accurately determining volume from a picture?

To ensure accuracy when determining volume from a picture, it is important to use precise measuring tools, take multiple measurements to account for any irregularities, and double-check your calculations. It may also be helpful to use a software or app specifically designed for calculating volume from pictures.

Similar threads

Replies
47
Views
3K
  • Astronomy and Astrophysics
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Chemistry
Replies
8
Views
3K
  • Cosmology
Replies
24
Views
2K
  • Special and General Relativity
Replies
12
Views
807
  • Special and General Relativity
Replies
3
Views
1K
  • Special and General Relativity
Replies
23
Views
2K
Replies
10
Views
950
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top