Author Topic: Compare two images and show pixels with same value  (Read 3894 times)

Offline tcpip

  • Newcomer
  • Posts: 6
Compare two images and show pixels with same value
« on: 2014 March 13 03:53:26 »
Hi,

I've a simple pixelmath question, I guess..

I want to compare two images (darks) and create a image with only the pixels which have the same value.
This way I hope to see only the hotpixels

Offline Phil Leigh

  • PixInsight Addict
  • ***
  • Posts: 220
Re: Compare two images and show pixels with same value
« Reply #1 on: 2014 March 13 04:03:38 »
create new image:

image with hot pixels - normal image


Offline tcpip

  • Newcomer
  • Posts: 6
Re: Compare two images and show pixels with same value
« Reply #2 on: 2014 March 13 04:14:02 »
I want an image with only the hot pixels created from darks.



Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: Compare two images and show pixels with same value
« Reply #3 on: 2014 March 13 04:29:04 »
Use the Binarize process on a copy the dark, binarize with a low value (just somewhat above the median level, some trial and error should get you there quickly).
You may also use PixelMath and and someting like if($t>Median() + sometuff, 1, 0), but I do not know the syntax from the opt of my head. Binarize should be ok
-- bitli


Offline Phil Leigh

  • PixInsight Addict
  • ***
  • Posts: 220
Re: Compare two images and show pixels with same value
« Reply #4 on: 2014 March 13 04:45:15 »
subtract bias image from dark image to leave dark containing just dark current/thermal signal then integrate the darks ... the integrated image will show only the pixels that are non zero across the stack of bias-subtracted darks.

Offline Phil Leigh

  • PixInsight Addict
  • ***
  • Posts: 220
Re: Compare two images and show pixels with same value
« Reply #5 on: 2014 March 13 04:49:29 »
Even after subtracting bias, darks have pixels of varying values, reflecting the fact that there are "warm" as well as "hot" pixels...

Offline tcpip

  • Newcomer
  • Posts: 6
Re: Compare two images and show pixels with same value
« Reply #6 on: 2014 March 13 06:18:32 »
Maybe I should explain myself more.

I want to create an image with only the hot pixels to subtract it from the darks so that only the noise remains.
This way I'm able to determine the noise with different ISO's, exposure lengths and temperatures (i have a setpoint cooling DSLR).

Offline bianry

  • PixInsight Enthusiast
  • **
  • Posts: 90
Re: Compare two images and show pixels with same value
« Reply #7 on: 2014 March 13 08:29:24 »
I tried with a master dark. You need to find what k-value a hot pixel has. Mine was about 0.00315. You can find this with the cursor in read-out mode.
Then in PixelMath input this iif($T >= 0.00315,$T,0)
Choose create New Image and drop the instance button on the dark frame. It will create a new image with mostly dark pixels and the hot pixels with a value greater than 0.00315 will be lighter.

Regards

Mats

Offline Phil Leigh

  • PixInsight Addict
  • ***
  • Posts: 220
Re: Compare two images and show pixels with same value
« Reply #8 on: 2014 March 13 08:42:52 »
Hmm... I have two (non setpoint) cooled DSLR's (CDS and JTW) and neither of them has any "hot" pixels at all even after 60 minute exposures. They also don't have any discernible dark current after master bias subtraction. I don't use darks anymore. My sensors are always running somewhere between -8C and -30C depending on ambient.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Compare two images and show pixels with same value
« Reply #9 on: 2014 March 13 09:30:02 »
well if you really want to see which pixels are exactly alike:

Code: [Select]
iif((image1==image2), 1, 0)

will create a map of pixels with identical value where 1 == pixels were identical and 0 == pixels differed.

if you need to do something more fancy, like add a tolerance, you'll have to modify the test…

rob