Author Topic: Auto histogram outcome puzzling  (Read 2282 times)

Offline David Rodgers

  • Newcomer
  • Posts: 3
    • View Profile
Auto histogram outcome puzzling
« on: 2013 November 11 13:45:01 »
Hello, new to the forum, thanks in advance for any help.  Here is the scenario: I open a RGB fits file already partially processed with PI.  It's mostly black.  I do the STF and the image changes to a "normal" screen stretched view.  I open the auto histogram tool.  I apply.  Nothing happens to the image, it doesn't change. 

Thinking the image has now been made non-linear, I save under a new name and re-open.  It is black.  I have to do the STF again to make it appear normal.

So I open the original image again.  It's mostly black.  This time, I do NOT do the STF.  I open the auto histogram tool, click apply, nothing happens to the image.  It doesn't stretch it.  It's still mostly black. 

No comprende.  What am I missing or doing wrong?

Thanks!
David

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4161
    • View Profile
Re: Auto histogram outcome puzzling
« Reply #1 on: 2013 November 11 13:55:51 »
if you want to apply the results of STF to the image, you first compute the STF. then you copy the STF parameters to HistogramTransformation by dragging STF's triangle to the area next to HistogramTransformation's triangle (the bottom bar of HT).

then apply HistogramTransformation to the active view by clicking the rectangle in HT's bottom bar. or, drag HT's triangle to the image you want to apply it to.

note that this is HistogramTransformation, not AutoHistogram.

rob

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2173
  • Join the dark side... we have cookies
    • View Profile
    • http://www.astrophoto.cl
Re: Auto histogram outcome puzzling
« Reply #2 on: 2013 November 11 15:14:01 »
Hi David

The STF is an independent process from AutoHistogram. The STF works by creating LUTs, that are used to change the way images are displayed, so no data is changed. Tools (like AutoHistogram) doesn't know anything about the current STF state of the image, so their results are not affected by it.

Now, could you tell us what parameters are you using on AutoHistogram? Is the "Target Median Values" option checked? Have you tried changing the "Stretch Method"?
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2173
  • Join the dark side... we have cookies
    • View Profile
    • http://www.astrophoto.cl
Re: Auto histogram outcome puzzling
« Reply #3 on: 2013 November 11 15:14:44 »
I forgot to ask you to copy here the statistics of your image. Maybe there is something wrong in there.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline David Rodgers

  • Newcomer
  • Posts: 3
    • View Profile
Re: Auto histogram outcome puzzling
« Reply #4 on: 2013 November 11 16:34:14 »
Rob, thanks for explaining the alternate workflow of taking the STF settings over to the HistogramTransformation function and applying them to the image there.  I had seen that process in Warren Keller's tutorial but then he also demonstrated the Auto Histogram tool but I couldn't get it to change the image.  I'm not sure what is the purpose of the Auto Histogram tool.  I assumed the Auto Histogram tool would essentially do a "sticky" STF on the image, changing the image to non-linear once saved.  But it doesn't appear to work that way.

Carlos, yes, the Target Median Values option is checked, the dot for RGB channels is selected, all three channels have the same value and I've tried all three stretch options, none have any affect, neither on the pre-STF image nor the post-STF image.  I am not home but will post image statistics when I get there.  Thanks for your help.

David

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4161
    • View Profile
Re: Auto histogram outcome puzzling
« Reply #5 on: 2013 November 11 17:57:19 »
ok, sorry, since you were talking about the STF i thought maybe you were trying to transfer the STF to the HT.

the STF is just a "display pipeline" thing - this is what carlos means by LUTs (lookup tables). before the data is displayed PI transforms the data with the STF's LUT but that transformation is only part of the image display pipeline to the screen and does not change the image's actual data.

whether or not an STF is applied has no effect on how any process manipulate an image. it can however fool you in the real-time viewer; if an STF is applied to the image then the result in the realtime viewer will be the STF plus whatever the process that is feeding the RT viewer is about to do.

anyway as far as AT goes, i've never used it so i can't comment. you may need to post the image somewhere for someone else to look at.

rob

Offline David Rodgers

  • Newcomer
  • Posts: 3
    • View Profile
Re: Auto histogram outcome puzzling
« Reply #6 on: 2013 November 11 19:07:49 »
Well, I played with Auto Histogram a little more and finally got it to make changes to the image.  Here's how: open the fits, don't do a STF, uncheck Histogram clipping, check Target Median Values, choose stretch method, click "Set As Active Image."  The R/K, G and B values are already filled in when you open the tool.  Clicking on "Set As Active Image" doesn't change the values from those it initially displays.  My initial values read 0.01712 (and change) for all three channels.  I don't change the values.  Click apply, nothing happens.  Undo.  Then, click the "Joint RGB/K channels radio button so only the R/K slider is active, then move the slider to the right, increasing all three channel values an equal amount.  I increase my values to zero point 3.  Apply.  Image stretches and is brightened. 

The tool documentation says, "we can stretch the image nonlinearly with an automatically calculated mid-tones adjustment function to achieve a prescribed mean background value."  This would seem to imply that you don't have to make any changes to the initial Target Median Values for the tool to do its job, but that is not the case.  Watching Warren's tutorial video, I realized that he does say to adjust the sliders to between .12 and .20.  So that's how it works - you have to adjust the sliders but that wasn't evident to me at first. 

Sorry for the wild goose chase but maybe other beginners will make the same mistake as me and learn from our posts.

David

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2173
  • Join the dark side... we have cookies
    • View Profile
    • http://www.astrophoto.cl
Re: Auto histogram outcome puzzling
« Reply #7 on: 2013 November 11 19:45:27 »
Hi David

Glad to hear it worked for you. Maybe there is an old bug that surfaced again. I found in some cases that if both checkboxes where activated, then nothing changes or the middtones adjustment doesn't work.
Pressing the "Set as Active Image" button calculates the median value of the current image, and loads them to the tool. This is usefull for when you want a second image to look similar to the active one... If you apply AHT back to the active image, it won't do anything, because you are telling it to achieve the same aspect.

I'll take a deep look into the code of the tool next month, when I'm back to work in active development.

PS: The whole idea of AHT is to automatically modify the image so it gets the statistics that you want. I usually apply it in two steps. First, automatic clip (or manual clip in the HT where there is more control due the feedback). Then target the median value, changing the stretching method to see how the contrast is affected.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2129
    • View Profile
Re: Auto histogram outcome puzzling
« Reply #8 on: 2013 November 12 04:22:31 »
...Glad to hear it worked for you. Maybe there is an old bug that surfaced again. I found in some cases that if both checkboxes where activated, then nothing changes or the middtones adjustment doesn't work...
If that is a bug, can you file a bug report with Juan?
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)