Author Topic: HT Auto Clip does not work as expected in RGB/K mode  (Read 2911 times)

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
HT Auto Clip does not work as expected in RGB/K mode
« on: 2011 August 21 11:22:16 »
This has bugged me since I started using PI but it's time to get it addressed.

- open RGB image with some zero pixel values such as after applying ACDNR, preferably with histogram peaks for R G and B not aligned
- open HT
- open real time preview
- click 'zero shadows'
- note that the histogram sliders do not move
- note that the 'discard' count does not change to how many pixels were thrown away
- now look at the RT, the image did change
- check R, G and B histograms
- note that sliders have moved to remove all 0 pixels
- go back to RGB/K
- click the 'reset shadows clipping' button
- note that the RTP does not change
- note that the RGB histograms were not reset

To fix:

make the 'auto clip' feature work on RGB pixels rather than on just the individual planes. Zero clip in RGB should mean all pixels that have 0 for R, G and B.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: HT Auto Clip does not work as expected in RGB/K mode
« Reply #1 on: 2011 August 28 02:44:28 »
There is no bug here. The Auto Zero Shadows feature of HT does never clip pixels. It just removes a unused portion of the numeric range at the shadows, from zero up to the first nonzero histogram count, but excluding the latter. Similarly, the Auto Zero Highlights feature removes an unused portion at the right hand side of the numeric range, from one down to the last nonzero histogram count (excluded). Removal of unused sections is made by remapping all pixels to the [0,1] range linearly.

It is true that if you clip some pixels for a single channel, the corresponding clipped pixels count doesn't get updated for the RGB/K combined channel of HT. This is by design. The clipped pixels counts refer to the number of clipped pixels for the currently selected transformation, not for the whole set of four (or five if there is an alpha channel) transformations. There could be additional global clipping counts on HT, but I think they would add little benefit at the cost of clumsier interface. We can discuss this, naturally.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: HT Auto Clip does not work as expected in RGB/K mode
« Reply #2 on: 2011 September 07 09:04:07 »
I'll have to think a bit more about this. The way it works right now has always been confusing and years of PI indoctrination have not changed my opinion on that.

In any case, I did not ask for more text boxes with clipping counts. I want the auto clip feature in RGB/K to work following the principle of least confusion. Move the black (white) points such that no pixels get clipped. Right now it moves each individual channel and that makes little sense since we're looking at an interface with a single black/mid/white point applied to all channels at the same time. The zero (and auto) clip features should work as if the user is sliding the histogram points around in the RGB/K window.

If this can not be implemented then the auto-zero button should be disabled in RGB/K mode. Auto zero and auto clip work fine for mono images and for each individual channel.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity