Get histogram values for Astrophotography

Started by dareius, March 20, 2017, 11:01:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dareius

Hi, all.
First of all i wanna say tanks to all community of ML. your firmware rock!

I am new in astrophotography and sometime I got wrong pictures because I over exposure the subs. So, to take good subs in astrophotography, the luminosity histogram should be placed 1/4-1/3rd from the left (range 0 to 255). How can I get the mean and dev.St value of the luminosity peak?

thanks for your suggestion

calypsob

That is a great idea, I think a RAW image statistics function would be great.  Mean, median, std deviation, MAD would all be superb for astrophotography and other scientific applications.   
Full spectrum T2i
T3i

a1ex


dareius

the function of the raw.diagn is not too easy....moreover. it does not work on 1100D with the latest build....
it requires V6 (of what?) instead of version 7.

a1ex

Try the lua_fix build.

edit: hm, it's broken on 1100D...

edit2: solved, please try and report back.

dareius

now the module is working properly....but its functioning is not so easy.
What I am would like is something more easy to achieve....I mean...after taking a shoot, in the preview mode, i would like to see image statistics (mean, SD of luminosity) below the istogram.....
it is a function extremely useful for astrophotograpy guys

and......this module gives results as mean and SD in ADUs.....for more practical use, we should have information in 0-255 scale and/or percentage.
Best

a1ex

Very low priority from my side, but you now know what to use as a starting point. Maybe I should provide a Lua API for the histogram instead.

0-255 (or any other linear scale) for interpreting a raw-based histogram*) doesn't sound right to me, but... the code is open source ;)

*) assuming you are not capturing JPG/H.264 for astrophotography.

dareius

0-255 because it is the common scale used in photography/colour science. 0 is completely black, while 266 is completely white.
Considering the luminosity histrogram, by having a value in the range 0-255 (even better percentage) and standard deviation of where the peak relies is meaningful in astrophotography field.
For that reason I was asking to implement this function.
No more need for laptoop in the field

a1ex

Increase the exposure by 1 stop => the standard deviation will be doubled (unless the image is extremely dark). How's that useful?

To me, displaying the median and the quartiles (or other percentiles more relevant for exposure) on the histogram would make a LOT more sense; these are independent of X scaling (linear, log, picture style or whatever) and they are robust statistics (e.g. not biased by very bright pixels in the image, such as stars or hot pixels), unlike mean and stdev.

Somewhat related: http://www.magiclantern.fm/forum/index.php?topic=20882.0

dareius

In astrophotography it doesn't matter how dark is the picture....everything will pups up after alignment and stacking.
I am reporting the brief explanation why it is important in astrophotography http://www.samirkharusi.net/sub-exposures.html

"We need to capture that skyfog mountain in a nice, clean fashion on a portion of the histogram that displays good linearity. Its width corresponds to the Poisson statistical noise of any photo-electric signal. The upper end (slope on the right side of the mountain) will also include the effect of bright stars or any bright regions of the fuzzy we are trying to image. We then stack a huge number of frames/subs, i.e. increase the integration time, to narrow this statistical mountain (that square root business) until we reach a stage that we can surgically subtract out the fog and we are left only with our precious image signal pertaining to our faint fuzzy. The aim, therefore is to keep our skyfog mountain unadulterated by any noise lurking at or near the origin of the histogram, in any sub-exposure, in any of the 3 R, G, B channels. Always keep a clear gap between the trailing edge of the skyfog mountain (the beginning of the slope on the left of the mountain) and the origin!How close can you let that skyfog mountain get to the origin? Do not get too greedy. Just because the back-of-camera histogram shows a gap does not imply that you do indeed have a gap in all the 3 RGB channels, especially if you use a logarithmic display for your histogram. So aim for a healthy gap (say, 10% of the X-axis on the back-of-camera histogram), but a zero gap implies that one or 2 of the RGB channels is probably not quite yet detached from the origin."

your Full-screen histogram WIP function will be very useful....I suggest to add some numbers on screen....this will help a lot in the dark.