Author Topic: How to make the sky background consistent across different images?  (Read 2956 times)

Offline siovene

  • Newcomer
  • Posts: 28
Hi,
I'm shooting mostly luminance only these days, and I'd like all my images to be consistent as to how dark the sky background is.

Is there a way to achieve this in a systematic fashion?

Thanks!
Salvatore.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi Salvatore,

Let's say you have two images A and B. If the sky background is the dominant feature in both images, this PixelMath expression does what you want if you apply it to B with the rescale result option disabled:

$T - med( $T ) + med( A )

Alternatively, you can impose a particular background value; for example, this expression:

$T - med( $T ) + 0.05

fixes a background value of 0.05 when applied to any image, again with rescale result disabled. This expression assumes that the original background is less than 0.05; otherwise the expression would lead to negative values, which would be truncated to zero.

You can also set the background in a more adaptive way. For example:

$T - med( $T ) + max( med( A ), med( B ) )

forces the largest background of A and B in both images.

Hope this helps.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline siovene

  • Newcomer
  • Posts: 28
Thanks Juan, that worked beautifully!  :moneyinmouth: