Author Topic: PixInsight Pixel Math  (Read 7419 times)

Offline greeko

  • Newcomer
  • Posts: 16
PixInsight Pixel Math
« on: 2009 July 31 04:51:43 »
Greetings

I'd looking for some advice on how to handle brightening the pixels in an image.
While using a different piece of software prior to Pixinsight I would use Pixelmath to give the same bright pixel value to each pixel.
I may not be using the correct terminology so the End result is I'd like to brighten some dim areas.

Is Pixelmath the best solution and if so I've looked at the PIX Pixelmath solution however I'm not clear which values to use even after viewing the Pixel math example posted.
 

Thanks
Troy

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: PixInsight Pixel Math
« Reply #1 on: 2009 August 11 06:21:22 »
Histogram and curves transforms are the traditional way to brighten dim areas of your image. I've not seen anyone use pixelmath to do that.
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 greeko

  • Newcomer
  • Posts: 16
Re: PixInsight Pixel Math
« Reply #2 on: 2009 September 09 05:01:38 »
Sander thanks for the reply.

Maybe my choice of words wasnt the best.
Previously when using Maxim DL I watched a video Adam block put out on using the Pixelmath tool.my understanding is this gave each pixel in an image the same brightness value which in turn helped with certain post processing functions.

This seemed to help when using DDP or Devconvolution.

Troy

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: PixInsight Pixel Math
« Reply #3 on: 2009 September 09 08:01:31 »
I guess that you are talking about equalization among the color channels, right? I mean, rescale the brightness of each color channel, so you have the right color balance, or neutralize the background.

Since you are working with linear data (CCD raw images, reducted [bias, darks, flats]), all you need is a linear function that rescales them. This means, multiply each one of them with a different constant value.

This is the PixelMath expression:

For each channel (not a single expression):
R: $T*A
G: $T*B
B: $T*C

where A is: Maximum of medians / Median of red channel
(and so on for B and C)

The median of each channel can be obtained with the ImageStatistics process (look for it at the Image category).
Another way to get it, in PixelMath is: Median($T[c]) where c is a number from 0 to 2, the channel (0 = Red, 1 = Green, 2 = Blue).
So, the first expression becomes:

R: $T*Max(Median($T[0],$T[1],$T[2]))/Median($T[0])
G: $T*Max(Median($T[0],$T[1],$T[2]))/Median($T[1])
B: $T*Max(Median($T[0],$T[1],$T[2]))/Median($T[2])


Hope this helps
Regards,

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

Offline greeko

  • Newcomer
  • Posts: 16
Re: PixInsight Pixel Math
« Reply #4 on: 2009 September 14 16:08:31 »
If we can agree that not all pixels have the same value and some are brighter than others my objective is to define or locate the brightest pixel within an image and make all other pixels the same value as the brightest one.

This is what I used the Pixelmath feature in Maxim DL for.
The idea is if you make all pixels that are visible in your images the same value at the brightest this helps with certain post processing features such as enhancing gamma stretches, deconvolution and especially DDP.

This is explained in detail on one of the Adam block videos.

Troy

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: PixInsight Pixel Math
« Reply #5 on: 2009 September 14 17:50:53 »
If you do that, you'll end with a gray image... I'll better go to see Adam's video. :P
Regards,

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

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: PixInsight Pixel Math
« Reply #6 on: 2009 September 14 17:54:37 »
Is it one of the dvds he is selling? You'd better have to explain your question further :D I will not buy them ;)
Regards,

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

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: PixInsight Pixel Math
« Reply #7 on: 2009 September 14 17:56:11 »
Oh, I forgot to menction. What you are asking is (PixelMath expression): Max($T)
Regards,

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

Offline greeko

  • Newcomer
  • Posts: 16
Re: PixInsight Pixel Math
« Reply #8 on: 2009 September 17 20:32:29 »
Carlos yes this info is from the expensive DVD set. :sealed:


Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: PixInsight Pixel Math
« Reply #9 on: 2009 September 18 06:28:54 »
I'm afraid there is a mis-understanding somewhere. Adam's images wouldn't look so nice if he did what you say he's suggesting :)
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 Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: PixInsight Pixel Math
« Reply #10 on: 2009 September 18 07:49:36 »
;) Of course... making a flat gray image doesn't make much sense... ;)
Regards,

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