Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.48k stars 809 forks source link

Incorrect ocular rectangle for a photo lens #3249

Closed 10110111 closed 1 year ago

10110111 commented 1 year ago

Expected Behaviour

When choosing focal length of the lens and the sensor corresponding to my camera, and choosing perspective projection (which is what most non-fisheye lenses try to simulate), the red rectangle that's turned on by the Image sensor frame button should be roughly the same as the rectangle of the photo I'd take with my camera, up to distortions of the lens.

Actual Behaviour

Steps to reproduce

System

alex-w commented 1 year ago

Please share a photo and a screenshot

gzotti commented 1 year ago

A rectangular box certainly cannot represent the distorted field of view of a 10mm lens. This is for aiming and getting a rough guide, and works well for long focal widths. For overlaying wide-angle shots, somebody has to rewrite that part. The different angle per pixel looks weird. Have you configured sensor dimensions and pixel count correctly? (Maybe sensor dimensions from data sheets have been rounded?)

10110111 commented 1 year ago

A rectangular box certainly cannot represent the distorted field of view of a 10mm lens.

If we assume that the lens is an ideal perspective lens (we don't simulate actual objectives, so this is a sensible approximation), then a rectangular box in perspective projection is perfectly capable of representing the field of view of this lens.

The different angle per pixel looks weird. Have you configured sensor dimensions and pixel count correctly?

I took the stock EOS 80D, whose parameters seem correct. The problem with this part appears to be that the calculation takes the whole FoV of the lens and divides it by the number of pixels, which is bound to be wrong due to non-uniform angular resolution in different parts of the frame (the center being the densest). If I compute just the resolution of the pixels from the center, it's isotropic.

10110111 commented 1 year ago

Please share a photo and a screenshot

Here's my attempt at matching the photo and the Stellarium render. I made vertical sizes of the frame equal, and put Sirius at the same spot on the screen.

Photo (taken at 20.427°S, 57.36°E) photo

Screenshot screenshot

axd1967 commented 1 year ago

related to #3015?