Computing the shape of the Earth as seen by a camera

In summary, the conversation discusses a problem with computing the shape of the Earth's curvature as seen by a camera. The individual asks for help with finding an error in their calculations and discusses their findings so far. They also provide a visualization of the problem and ask for clarification on the setup.
  • #1
Thomas Kundera
11
0
AS: If this is not the right place to ask this question, please let me know where I could try. Thanks.
AS: I had to validate the fact I used the template to post my assignment, however I didn't (but it wouldn't post otherwise - btw it's not an "assignment").

Hello everyone.
I need help with a problem I have and couldn't find the error in made in it.

The goal is to compute the shape of the Earth curvature as saw by a camera.
First, I computed the shape of the horizon itself.
Using the attached figure for notation.
FBwvpNXVJiD_capture-d-%C3%A9cran2.png


I found a circle of equation:

\begin{equation}
\left\{ \begin{array}{l}
x^2 + z^2 = l^2\\
y = h'
\end{array} \right.
\end{equation}

With
$$h' = \frac{rh}{r + h}$$
and $$ l = r \frac{\sqrt{h (2 r + h)}}{r + h} $$

Then I define an ideal pinhole camera:
FBwvt7wnDYD_capture-d-%C3%A9cran6.png


The hole is at $$P(0,h,0)$$ (yes, the projection plane is front, but apart of a sign, shouldn't change anything).

I found:
$$
M (x, y, z) \Rightarrow M' \left\{ \begin{array}{l}
x' = \varepsilon x / z\\
y' = \frac{y - h}{z} \varepsilon + h\\
z' = \varepsilon
\end{array} \right. $$

I rewrite it to be able to express the constraint for the circle:

$$
M' \left\{ \begin{array}{l}
x = x' \frac{y - h}{y' - h}\\
z = \varepsilon \frac{y - h}{y' - h}
\end{array} \right.
$$

So, my projected circle should fulfill:

$$
\begin{array}{lll}
M' & & \left\{ \begin{array}{l}
x = x' \frac{y - h}{y' - h}\\
z = \varepsilon \frac{y - h}{y' - h}\\
z \in [\varepsilon, l]\\
x^2 + z^2 = l^2\\
y = h'
\end{array} \right.
\end{array}$$

Posing
$$H = h' - h$$ and $$Y' = y' - h$$:

I get:
$$ \frac{Y'^2}{\left( \frac{\varepsilon^{} H^{}}{l^{}} \right)^2} -
\frac{x'^2}{\varepsilon^2} = 1 $$

This is the equation of an hyperbole of parameters $$a = \frac{\varepsilon
H}{l}$$ and $$b = \varepsilon$$

So for now I'm happy (seems fine).

Then I just rewrite it to plot:

$$
y' = \frac{H}{l} \sqrt{\varepsilon^2 + x'^2} + h
$$

And halas, gnuplot draw:
FBwvFEX4DMD_capture-d-%C3%A9cran12.png

Obviously wrong.

If the math are fine, I'll post my gnuplot script.
Buf first, did I made an error above?

Thanks for any help!

Thomas.
 
Physics news on Phys.org
  • #2
Thomas Kundera said:
And halas, gnuplot draw:
FBwvFEX4DMD_capture-d-%C3%A9cran12.png

Obviously wrong.

If the math are fine, I'll post my gnuplot script.
Buf first, did I made an error above?

Thanks for any help!

Thomas.

It's hard to tell, but the view in Figure 10 above seems to be really tiny, like looking at the horizon thru a keyhole.

In such a small viewport, I wouldn't expect to see much curvature on the horizon.
 
  • #3
Perhaps I've not understood the set-up. Let O be the centre of the Earth and P the pinhole. The projection of the Earth through the pinhole forms a cone with axis the continuation of OP. The image plane intersects this in a conic, the type of which depends on the angle between the plane and the axis (in relation to the angle of the cone).
If the camera is a rectangular box, with P opposite to the centre of the image area, A, I do not see how this can produce a hyperbola. That would require O and A to be on the same side of the panel where P is located. I.e., the Earth is inside the camera. The only result I can imagine is an ellipse.
 
  • #4
Thanks for your answer.

SteamKing said:
It's hard to tell, but the view in Figure 10 above seems to be really tiny, like looking at the horizon thru a keyhole."

Numerical application used $$\epsilon=50mm$$ and viewport $$24 \times 36mm$$ which are pretty standard camera setting (default for any so called "full-frame" DSLD).

That's what I want to simulate.

NB: both axis should be in mm, would be nicer, but I didnt yet fixed that detail in gnuplot, so x-axis is still in m.
 
Last edited:
  • #5
I'm not sure I understand the problem.
Are you looking for the points of the sphere (earth) limited below by a horizontal plane and above by its tangent planes meeting ##A## ? Is it something like this ?
 
  • #6
Hi,

Thanks, for your remark.

haruspex said:
Perhaps I've not understood the set-up. Let O be the centre of the Earth and P the pinhole. The projection of the Earth through the pinhole forms a cone with axis the continuation of OP. The image plane intersects this in a conic, the type of which depends on the angle between the plane and the axis (in relation to the angle of the cone).
If the camera is a rectangular box, with P opposite to the centre of the image area, A, I do not see how this can produce a hyperbola. That would require O and A to be on the same side of the panel where P is located. I.e., the Earth is inside the camera. The only result I can imagine is an ellipse.

Imagine you standing by the sea, holding a camera body straight, and taking a picture. You won't see an ellipse as horizon, but something that looks like a straight line, that is in fact a very large hyperbola.

The higher you get, the more you'll see it curved. It will never form an ellipse in those conditions. But at some point, you'll tend to point your camera "down" (as the horizon lower) and then the plane of projection change, and you can get an ellipse or a circle. But I'm not there yet.

Thanks.
 
  • #7
Hi,

geoffrey159 said:
I'm not sure I understand the problem.
Are you looking for the points of the sphere (earth) limited below by a horizontal plane and above by its tangent planes meeting ##A## ? Is it something like this ?

I'm trying to simulates how the horizon looks at different altitude, first using a camera hold "'straight" (plane of projection is vertical).
So I first computed the horizon shape from a given altitude (it's a circle), and then trying to project that circle on my camera focal plane.

Seems fine? Thanks.
 
  • #8
But explain what is to be understood by "horizon", in geometrical terms.
 
  • #9
geoffrey159 said:
But explain what is to be understood by "horizon", in geometrical terms.

I believe that's pretty standard, should be the same definition as the one you'll find on Wikipedia (https://en.wikipedia.org/wiki/Horizon) : horizon at point P is the union of points of intersections of the tangent to the Earth passing by P with the Earth (the Earth being assimilated to a perfect sphere here).
 
  • #10
Thomas Kundera said:
I believe that's pretty standard, should be the same definition as the one you'll find on Wikipedia (https://en.wikipedia.org/wiki/Horizon) : horizon at point P is the union of points of intersections of the tangent to the Earth passing by P with the Earth (the Earth being assimilated to a perfect sphere here).

So at this point we have an equation for this set of points, looking like :
## xx_A + yy_A + zz_A + \alpha (x + x_A) + \beta ( y + y_A) + \gamma (z+z_A) + \delta = 0##

What are we supposed to do next ?
 
  • #11
geoffrey159 said:
So at this point we have an equation for this set of points, looking like :
## xx_A + yy_A + zz_A + \alpha (x + x_A) + \beta ( y + y_A) + \gamma (z+z_A) + \delta = 0##

What are we supposed to do next ?

I'm not sure about your general form above (shouldn't there be some squared terms somewhere?).
Anyway, once you have this set (that I computed as being a circle as said above), you want to find it's image by a central projection defined by the point P and the plane as seen of figure above.
And find the shape of this projection.

I understand that all of this seems to be related to conics, and there are certainly better ways that what I'm doing to get there...
 
  • #12
Thomas Kundera said:
Hi,

Thanks, for your remark.
Imagine you standing by the sea, holding a camera body straight, and taking a picture. You won't see an ellipse as horizon, but something that looks like a straight line, that is in fact a very large hyperbola.

The higher you get, the more you'll see it curved. It will never form an ellipse in those conditions. But at some point, you'll tend to point your camera "down" (as the horizon lower) and then the plane of projection change, and you can get an ellipse or a circle. But I'm not there yet.

Thanks.
I don't think we're at odds here. If the image plane is vertical then the Earth's centre is in that plane, so the image is a parabola. If you tip the camera up slightly, the centre of the Earth is now on the 'inside' of the camera, giving a hyperbola. That's the set-up I had not considered.
 
  • #13
Thomas Kundera said:
I'm not sure about your general form above (shouldn't there be some squared terms somewhere?).

Well if you consider the the sphere
##S|x^2 + y^2 + z^2 + 2\alpha x + 2\beta y + 2\gamma z + \delta = 0##,
center: ##(-\alpha,-\beta,-\gamma)##
radius: ##\sqrt{\alpha ^2 + \beta ^2 + \gamma ^2 -\delta}##

then its tangent planes are the ## T_{(x,y,z)} | xX+yY+zZ + \alpha (x+X) + \beta (y+Y) + \gamma (z+Z) + \delta = 0##.

But if you are only interested by those planes passing through ##A##, you are left with two equations :

## x^2 + y^2 + z^2 + 2\alpha x + 2\beta y + 2\gamma z + \delta = 0 ## and ## xx_A+yy_A+zz_A+ \alpha (x+x_A) + \beta (y+y_A) + \gamma (z+z_A) + \delta = 0##

How does it fit to your answer ?
 
  • Like
Likes Thomas Kundera
  • #14
geoffrey159 said:
Well if you consider the the sphere
##S|x^2 + y^2 + z^2 + 2\alpha x + 2\beta y + 2\gamma z + \delta = 0##,
center: ##(-\alpha,-\beta,-\gamma)##
radius: ##\sqrt{\alpha ^2 + \beta ^2 + \gamma ^2 -\delta}##

then its tangent planes are the ## T_{(x,y,z)} | xX+yY+zZ + \alpha (x+X) + \beta (y+Y) + \gamma (z+Z) + \delta = 0##.

But if you are only interested by those planes passing through ##A##, you are left with two equations :

## x^2 + y^2 + z^2 + 2\alpha x + 2\beta y + 2\gamma z + \delta = 0 ## and ## xx_A+yy_A+zz_A+ \alpha (x+x_A) + \beta (y+y_A) + \gamma (z+z_A) + \delta = 0##

How does it fit to your answer ?

Yes, thanks.
 
  • #15
geoffrey159 said:
## x^2 + y^2 + z^2 + 2\alpha x + 2\beta y + 2\gamma z + \delta = 0 ## and ## xx_A+yy_A+zz_A+ \alpha (x+x_A) + \beta (y+y_A) + \gamma (z+z_A) + \delta = 0##
How does it fit to your answer ?

Would you suggest me to use this forme instead of the one I used above ? It's more general and flexible, I agree.
 
  • #16
I don't suggest anything at this point. We've just talked about some equations that must satisfy the horizon points (at A) according to the definition you wrote in post #9. The only thing I understand for the moment is that a subset of these points must appear on final screen.
What do we need to determine this subset ? Some other equations missing ? I feel that there should be at least one more equation relating the camera position to the horizon points, am I right ?
Once we have this subset of points that should appear on the screen, you have to explain how the scene is mapped to a TV screen, you talked about central projection, maybe you can start with this.
 
  • #17
geoffrey159 said:
I don't suggest anything at this point. We've just talked about some equations that must satisfy the horizon points (at A) according to the definition you wrote in post #9.

I used that equation for the same thing, so I ask:\begin{equation}
\left\{ \begin{array}{l}
x^2 + z^2 = l^2\\
y = h'
\end{array} \right.
\end{equation}

With
$$h' = \frac{rh}{r + h}$$
and $$ l = r \frac{\sqrt{h (2 r + h)}}{r + h} $$
geoffrey159 said:
What do we need to determine this subset ? Some other equations missing ? I feel that there should be at least one more equation relating the camera position to the horizon points, am I right ?
Once we have this subset of points that should appear on the screen, you have to explain how the scene is mapped to a TV screen, you talked about central projection, maybe you can start with this.

Yes, I defined this centra projection in the document above:
Then I define an ideal pinhole camera:
FBwvt7wnDYD_capture-d-%C3%A9cran6.png


The hole is at $$P(0,h,0)$$ (yes, the projection plane is front, but apart of a sign, shouldn't change anything).

I found:
$$
M (x, y, z) \Rightarrow M' \left\{ \begin{array}{l}
x' = \varepsilon x / z\\
y' = \frac{y - h}{z} \varepsilon + h\\
z' = \varepsilon
\end{array} \right. $$

I rewrite it to be able to express the constraint for the circle:

$$
M' \left\{ \begin{array}{l}
x = x' \frac{y - h}{y' - h}\\
z = \varepsilon \frac{y - h}{y' - h}
\end{array} \right.
$$

So, my projected circle should fulfill:

$$
\begin{array}{lll}
M' & & \left\{ \begin{array}{l}
x = x' \frac{y - h}{y' - h}\\
z = \varepsilon \frac{y - h}{y' - h}\\
z \in [\varepsilon, l]\\
x^2 + z^2 = l^2\\
y = h'
\end{array} \right.
\end{array}$$

Posing
$$H = h' - h$$ and $$Y' = y' - h$$:

I get:
$$ \frac{Y'^2}{\left( \frac{\varepsilon^{} H^{}}{l^{}} \right)^2} -
\frac{x'^2}{\varepsilon^2} = 1 $$

This is the equation of an hyperbole of parameters $$a = \frac{\varepsilon
H}{l}$$ and $$b = \varepsilon$$

That's how I did it.
 
  • #18
Lol this is just a copy paste of your post #1!
I think that since your camera can move vertically, if man holding the camera has position ##M_0(x_0,y_0,z_0)## at the surface of the earth, the position of the camera is ##M_c(t) = M_0 + t \begin{pmatrix} x_0 + \alpha \\ y_0 + \beta \\ z_0 + \gamma \end{pmatrix}##, ##t\ge 0##.
Should the camera be aligned with ##A## ?
 
Last edited:
  • #19
Hi,
Thanks again for your answer. Got some time again, so I'm back on the subject.

geoffrey159 said:
Lol this is just a copy paste of your post #1!

Because I felt I answered already, seems I'm not clear enough.

geoffrey159 said:
I think that since your camera can move vertically, if man holding the camera has position ##M_0(x_0,y_0,z_0)## at the surface of the earth, the position of the camera is ##M_c(t) = M_0 + t \begin{pmatrix} x_0 + \alpha \\ y_0 + \beta \\ z_0 + \gamma \end{pmatrix}##, ##t\ge 0##.
Should the camera be aligned with ##A## ?

My camera position is fully described by the single parameter "h" that gives its altitude to the surface, as I'm only considering a camera hold "straight".

Straight means that the projection plane is vertical. In he computation, I put the pinhole on the vertical axis considered, the projection plane being a bit front (so not exactly locally "vertical", it is at the same vertical than pinhole P).

I don't think that anything is missing.

Once I have defined what is the horizon at a given point P at an altitude h (this is a know set of points), I just want to project this set using a central projection of center P on a plane that is parallel to the vertical at P at a distance ##\epsilon## from that vertical.

I wish I could be more precise...

Hum, maybe like this:

Let a sphere S of center O (0,0,0) and radius r.
Let a point P(0,r+h,0) h>0
Let H being the set of horizon points of the sphere as seen from P (that is the intersection between (the tangents to S that pass by P) and S).
Let F be a plane parallel to OP at a distance ##\epsilon## of that line, ##\epsilon## < r (so you don't have ton consider cases
when the plane would not intersect the sphere) F could be defined fully by a point F0(0,0,##\epsilon##), and two vectors: vx(1,0,0) and vy(0,1,0)
Let C be the central projection of center P on the plane F

The question is: what is the image of H by C?

Maybe that's better now ?

(of course, 0,x,y,z is an orthonormal referential in an euclidean space, etc.)
 
  • #20
Hi,

Thanks everyone. I finally found my error. Now my result is compatible with Povray rendering of a similar scene and looks comparable to some ISS picts showing Earth shape from orbit.

Thanks again.

PS:
Error is stupid: y=-h in the circle equation, not y=+h...
 
  • #21
Ok, it's good you explain, it was needed :-)

So with your notations the horizon points that are to be projected are

##H = \{ M(x,y,z),\ \vec{PM}.\vec{OM} = 0,\ ||\vec{OM}||^2 = r^2,\ z\ge \epsilon \} = \{ M(x,y,z),\ y = \frac{r^2}{ r+h }, z \ge \epsilon, x^2 + z^2 = r^2 (1 - \frac{1}{r+h}) \}##

EDIT: ##H## is a portion of a circle centered in ##(0,\frac{r^2}{ r+h },0)## with radius ##r \sqrt{ 1 - \frac{1}{r+h}}##

Do we agree ?

Then what is the definition of a central projection ? For exemple, if it was an orthoprojection we would have ##\pi (M) = F_0 + \vec{\pi_{ {Oz}, \vec F}}(\vec {F_0 M }) = F_0 + \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix} \vec{F_0 M} ##
 
Last edited:
  • Like
Likes Thomas Kundera

1. What is the process of computing the shape of the Earth as seen by a camera?

The process of computing the shape of the Earth as seen by a camera involves using mathematical algorithms and data from the camera's perspective to create a three-dimensional representation of the Earth's surface. This can be done through techniques such as photogrammetry, where multiple images are used to calculate the shape and size of objects in the photos.

2. How accurate is the shape of the Earth as seen by a camera?

The accuracy of the shape of the Earth as seen by a camera depends on the quality of the camera and the techniques used in the computation process. Generally, modern cameras and advanced algorithms can produce accurate representations of the Earth's shape with a margin of error of just a few centimeters.

3. Can this method be used to determine the exact size and location of objects on the Earth's surface?

Yes, computing the shape of the Earth as seen by a camera can be used to determine the exact size and location of objects on the Earth's surface. By using precise measurements and advanced techniques, scientists can accurately determine the size and location of objects such as mountains, buildings, and other features.

4. Are there any limitations to using a camera to compute the shape of the Earth?

There are some limitations to using a camera to compute the shape of the Earth. One major limitation is that the camera's perspective can be affected by factors such as atmospheric conditions, lens distortion, and camera position. This can result in slight inaccuracies in the computed shape of the Earth.

5. How is the computed shape of the Earth as seen by a camera used in scientific research?

The computed shape of the Earth as seen by a camera is used in various scientific research fields, such as geography, geology, and cartography. It can provide valuable information about the Earth's surface and help in the creation of accurate maps and models. It is also used in fields such as remote sensing and disaster management to gather information about the Earth's surface from a distance.

Similar threads

  • Advanced Physics Homework Help
Replies
5
Views
668
  • Precalculus Mathematics Homework Help
Replies
4
Views
856
  • Linear and Abstract Algebra
Replies
19
Views
2K
  • Thermodynamics
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
5
Views
762
  • Precalculus Mathematics Homework Help
Replies
19
Views
980
  • Differential Equations
Replies
1
Views
624
  • Precalculus Mathematics Homework Help
Replies
16
Views
4K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
13
Views
164
Back
Top