Author Topic: Get histogram values for Astrophotography  (Read 3238 times)

dareius

  • New to the forum
  • *
  • Posts: 6
Get histogram values for Astrophotography
« on: March 20, 2017, 11:01:59 AM »
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

  • Freshman
  • **
  • Posts: 57
Re: Get histogram values for Astrophotography
« Reply #1 on: September 27, 2017, 06:03:36 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 12420
Re: Get histogram values for Astrophotography
« Reply #2 on: September 29, 2017, 04:33:39 PM »
Is this request something raw_diag doesn't do already?

dareius

  • New to the forum
  • *
  • Posts: 6
Re: Get histogram values for Astrophotography
« Reply #3 on: December 15, 2017, 10:09:42 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 12420
Re: Get histogram values for Astrophotography
« Reply #4 on: December 15, 2017, 11:16:42 PM »
Try the lua_fix build.

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

edit2: solved, please try and report back.

dareius

  • New to the forum
  • *
  • Posts: 6
Re: Get histogram values for Astrophotography
« Reply #5 on: December 16, 2017, 10:06:20 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 12420
Re: Get histogram values for Astrophotography
« Reply #6 on: December 16, 2017, 11:08:58 AM »
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

  • New to the forum
  • *
  • Posts: 6
Re: Get histogram values for Astrophotography
« Reply #7 on: December 16, 2017, 04:00:17 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 12420
Re: Get histogram values for Astrophotography
« Reply #8 on: December 16, 2017, 05:09:32 PM »
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

  • New to the forum
  • *
  • Posts: 6
Re: Get histogram values for Astrophotography
« Reply #9 on: December 18, 2017, 06:38:48 PM »
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.