Author Topic: Rejection of tree shadows in Lights  (Read 2985 times)

Offline cs_pixinsight

  • PixInsight Addict
  • ***
  • Posts: 156
Rejection of tree shadows in Lights
« on: 2013 June 03 13:30:29 »
I have a set of light frames that have varying amounts of tree shadows in them due to a tree blocking the sky at the end of some imaging sessions.  They cover less than 10% (worst case) of the frame, so I would like to use them in the full stack, but ImgInt doesn't seem to reject them fully.  There is always a residual pattern after DBE that becomes apparent after stretching.

My theory,at this point, is the edges of the shadow area aren't dark enough so the shadows aren't fully rejected even when setting the rejection thresholds down to a value of 1 (which ruins the SNR of the entire stack anyway).  The stack is 72 light frames with masters for darks, flats and bais.  There are only 10 frames which have a portion of their frame covered by a tree shadow, so I'm wondering if there's a way to force this area to be rejected while still using the remaining 90%+ of the frame.

I was thinking a clone stamp of the affected area with black (ie. 0) might be a way to do it, but where do I get a source of something completely black to use as the source of the stamp?  Is there a way to "paint" black over a random area in these 10 frames?

Is this idea worth pursuing or are there other ways to accomplish this?

Thanks, Craig

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Rejection of tree shadows in Lights
« Reply #1 on: 2013 June 03 15:35:41 »
you can experiment with pixelmath expressions of the form:

iif($T<x,0,$T)

meaning if target pixels are < some amount, then replace those pixels with 0, otherwise keep the target pixel value.

i suppose if you want to get fancy you can restrict the area it operates on with xpos() and ypos()

iif(($T<x)&&(xpos()>foo)&&(ypos()>bar), 0, $T). you'd have to get fancier to describe non-square areas...

rob

Offline Geoff

  • PixInsight Padawan
  • ****
  • Posts: 908
Re: Rejection of tree shadows in Lights
« Reply #2 on: 2013 June 03 15:43:11 »
See here http://pixinsight.com/forum/index.php?topic=5624.0 for making masks with pixelmath. Juan's comments later in the thread are also interesting and relevant to this particular case.
Geoff
Don't panic! (Douglas Adams)
Astrobin page at http://www.astrobin.com/users/Geoff/
Webpage (under construction) http://geoffsastro.smugmug.com/

ruediger

  • Guest
Re: Rejection of tree shadows in Lights
« Reply #3 on: 2013 June 03 23:39:00 »
I was thinking a clone stamp of the affected area with black (ie. 0) might be a way to do it, but where do I get a source of something completely black to use as the source of the stamp?  Is there a way to "paint" black over a random area in these 10 frames?
I often do the same like you --- clone stamping away unwanted parts (trees etc.) from the lights.
The Clone Stamp Tool works across different pictures, so just create a new black picture, use this as reference and paint all unwanted areas in the lights black.

RĂ¼diger

Offline cs_pixinsight

  • PixInsight Addict
  • ***
  • Posts: 156
Re: Rejection of tree shadows in Lights
« Reply #4 on: 2013 June 04 11:48:15 »
Thanks for the ideas everyone.  I didn't even try using a different image for the CloneStamp tool  ::) 

I think that will be the easiest method and the one which will only remove exactly what I want.

Craig