You can calculate the height of an object using the distance and angle.
distance * cos(angle), where distance is the horizontal distance to the object, and angle is the angle above horizontal of the top of the object (from the viewer). The result will be the height above the viewer.
With a camera, you need more information because you don't necessarily have the angle.
You can estimate the angle by taking a similar photo at the same zoom with known angles, and compare the distance on the two photos between horizontal (or vertical) and the angles. It will be more accurate if you have horizontal (or vertical) in the same place on the two photos.
You might also be able to determine the angle in the photo by the alignment of two objects of different distances from the camera.
One possibility is a flat $3$-torus. This is the shape you get by taking a cube (or more generally, a parallelopiped) and declaring that the opposite faces of the cube are actually equal to each other. This means that when you walk far enough in one direction, you "wrap around" back to the other side. In particular, this means you can keep walking infinitely long in any direction, and room has no "edges". The total volume of the torus is the same as the volume of the cube you started with, so it is finite. And locally, the geometry is the same as the cube, so it is just ordinary Euclidean geometry, so it looks just like normal space as long as you don't look far enough to see things wrapping around.
However, this might not be very satisfying for the property of being able to "walk infinitely far", because while you can walk for an infinitely long time, after you walk a little bit, you'll find yourself right back where you started (or, technically, arbitrarily close to where you started, unless the direction you're walking is a rational linear combination of the edges of the cube). And there is a uniform bound on the length of the shortest path between any two points.
Alternatively, if you're willing to drop the assumption that you can move infinitely far in every direction and just want there to exist directions you can go infinitely far in, it is easy to get such a shape without having any sort of weird topology. Just take any nice ordinary subset of $\mathbb{R}^3$ like a ball, and attach some "tendrils" to it going out to infinity. If you make the tendrils get thinner and thinner fast enough as they go out, the volume will still be finite. I'm not sure this really captures your intuition though, as the directions in which you can go out to infinity are very restricted, and if you try to actually travel along them for very long, they will quickly become too thin for you to fit down them (assuming you are an actual physical object rather than a point with no volume). The latter problem seems unavoidable though: if you can move an object with positive volume down an infinitely long path that doesn't loop back around to itself (as happens in the torus), then by tracing its path, you can see that your space must have infinite volume.
By the way, I'm assuming here that when you say there are "no edges", you're including that there is no floor or ceiling to the room (so up and down are among the directions you can move in). If you want to have a floor and ceiling, you should probably just take the two-dimensional versions of these shapes (a flat $2$-torus, or a planar shape with tendrils), and let the vertical directions have ordinary geometry (in more mathematical terms, this means you take a product of the 2-dimensional shape with a closed interval, with the interval being the vertical direction).
Best Answer
You need to look up something called Snell's law and critical angle. If you are directly over your target, there is no refraction since the angle of incidence $\theta_i$, your divergence from perpendicular to the surface of the water, and the angle or refraction $\theta_r$, the object's divergence from perpendicular to the surface of the water, are both zero. When you are approaching your target, say in a boat, the relationship between $\theta_i$ and $\theta_r$ is Snell's Law: $$ \frac{n_1}{n_2}=\frac{\sin{\theta_i}}{\sin{\theta_r}} $$ where $n_1$ is the index of refraction of air (approximately equal to $1$) and $n_2$ is the index of refraction of water ($1.33$). These indices are actually measures of how much the speed of light slows down in the absence of a vacuum, such that $n=\frac{c}{v}$ where $c$ is the speed of light.
The difference between the angle of incidence and the angle of refraction makes an object under the water appear to be closer to the surface than it actually is. Suppose you are a spear-fisherman, your point of view is very close to the surface of the water, and your object is to skewer a large fish a meter or more underneath the water with an accurate throw.
Starting with your spear pointing straight down at the water, you would raise it an initial angle $\theta_i$ and then lower it by an amount $\theta_i-\sin^{-1}{(1.33\sin{\theta_i})}$ to hit your target. If you are looking at the water from a height which is within an order of magnitude to the depth of your target, the math gets much more complicated. It is somewhat indicative of the power of the human brain that fishmen in primitive cultures, with no formal knowledge of the effects of light refraction, are exceedingly good at this.
When the angle of refraction becomes very large, which happens as depth increases, the angle of incidence may exceed $90\,^\circ$. This is called the critical angle and it results in a total internal reflection of light under the water. Thus, as a target gets deeper into the water, the more nearly perpendicular your point of vantage needs to be. Suppose you have two fish, one at a depth of $1\,\rm m$ and the other directly under it at a depth of $2\,\rm m$. As you approach, you will see the shallower fish first, and even though the water may be glassy smooth and crystal clear the fish at lower depths will still be invisible to you until you get closer.
Light attenuation is the amount of light left after it has passed through a certain distance of absorbing media. For a complete description, you will want to look up the Beer-Lambert law. I'll give you the highlights. Liquid water quickly absorbs most wavelengths of electromagnetic radiation, but readily admits light in the $360-750\,\rm nm$ range (visible light). As you go deeper, the amount of available light undergoes an exponential decay. Even so, after $200\,\rm m$ there is virtually no transmission of light.
The longer wavelengths (red) not only deviate the most under diffraction but also are attenuated quickest, while the shorter (blue-violet) wavelengths diffract the least and penetrate the most (this is why the deep ocean appears blue and deep-sea creatures are so often red-colored: makes them invisible). The more light diffracts, the greater the distance it has to travel through a medium to reach your eye. This, combined with light intensity's exponential decay with respect to distance is what makes deep objects "disappear" so quickly.
So the answer to your question is YES, there is a relationship between refraction and attenuation. Although the two effects are separate, they work together to make red-colored items more difficult to see at great underwater distances. Also, you can see the deepest when you look straight down into the water, as previously noted.
Incidentally, if you've ever been scuba-diving or snorkeling, you may have noticed that there are "shafts of light" in the water. This is a good example of what you are talking about. Non-vertical light diffracts the most and is quickly attenuated, so the greatest penetration of light occurs in vertical shafts, an effect you also notice while looking up at moisture-laden rain clouds. (For me, understanding how this effect works only adds to their beauty.)