Author Topic: Visualizing saturated / zero pixels  (Read 2642 times)

Offline mstriebeck

  • Member
  • *
  • Posts: 58
Visualizing saturated / zero pixels
« on: 2016 July 06 12:55:23 »
Hi,

I'm sure that this is trivial, but can't figure it out: how can I easily see which pixels in an image are either saturated or zero?

Background: I am fighting with an image where I keep clipping the histogram at the lower end. And I can't figure out where in the image that happens.

Thanks
     Mark

Offline aworonow

  • PixInsight Addict
  • ***
  • Posts: 258
    • Faint Light Photography
Re: Visualizing saturated / zero pixels
« Reply #1 on: 2016 July 06 13:45:02 »
Probably other answers, but you could use pixelmath. Something like

iif(CIEL($T)>.999,1,0)

set pixelmath a single RGB/K equation and to make a new image and drop its triangle on the image of interest . Could use, I suppose, 1.0 rather than .999, or a lesser value to see what is pushing the limit.

For this to function, all colors (RGB) must be saturated simultaneously (="diffused white")

alex

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Visualizing saturated / zero pixels
« Reply #2 on: 2016 July 06 14:01:40 »
Enter in PixelMath the expression
iif($T<1,0,1)
drag the triangle over the image -
this creates an image which shows the saturated pixel only and sets all other pixel to Zero.

Or enter in PixelMath the expression
iif($T>0,0,1)
drag the triangle over the Image -
this creates an image which shows the pixels with Zero as bright pixels an the rest is set to black for better visibility.

This 2 Versions show very simple where either the black or white pixels are located.

Gerald

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Visualizing saturated / zero pixels
« Reply #3 on: 2016 July 06 15:04:54 »
You may also use the Binarize process.
Regards,

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

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Visualizing saturated / zero pixels
« Reply #4 on: 2016 July 07 02:46:59 »
Quote
iif($T<1,0,1)

This is equivalent to:

$T >= 1

since a relational operator always evaluates to a Boolean value, which in the context of PixelMath corresponds to 0=false, 1=true.

A PixelMath expression that tells you which pixels are saturated at both ends of the histogram is simply:

$T <= 0 || $T >= 1

which can be read as if this pixel is zero or negative, or one or greater. For color images, more sophisticated results can be achieved if you use a different expression for each channel, but this is probably unnecessary for the task you are performing.

All of these expressions will create a binary image, that is, an image where a pixel can be either zero or one.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: Visualizing saturated / zero pixels
« Reply #5 on: 2016 July 07 07:46:44 »
Just a note that saturation (the condition where the well becomes filled) may occur at a value less than 1. On my QSI683 binned 2x2, on a long exposure of a bright star whose image is slightly bloomed in the uncalibrated frame, the maximum pixel value in the frame is ~0.83. This maximum varies slightly frame to frame about ~0.01.

Also note as the pixel value approaches saturation, the linear relationship between light intensity and signal degrades on CCD's with anti-blooming hardware. Several processes like DynamicPSF and MureDenoise don't work well on non-linear data near saturation.

Thanks,
Mike
« Last Edit: 2016 July 07 09:56:01 by mschuster »