Author Topic: How do I combine two master lights  (Read 21322 times)

Offline Jim_

  • Newcomer
  • Posts: 30
How do I combine two master lights
« on: 2012 October 29 07:54:48 »
I searched the forums but couldn't find an answer.
I have two light frames I want to combine.
They're resized and aligned now, but how do I combine them???

Jim

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: How do I combine two master lights
« Reply #1 on: 2012 October 29 07:57:36 »
Hi,

what do you mean with 'combine'? You want to average them? Assign each to a channel?
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 Jim_

  • Newcomer
  • Posts: 30
Re: How do I combine two master lights
« Reply #2 on: 2012 October 29 08:00:53 »
Hi,

what do you mean with 'combine'? You want to average them? Assign each to a channel?

I guess average them would the best way to put it.
In PS you just need to copy and paste one image on top of another one and adjust the opaqueness to taste and then flatten the image.
I can't seem to find anything like this in PI...I'm know it's there, I just don't know what it would be called.

Jim

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: How do I combine two master lights
« Reply #3 on: 2012 October 29 08:12:35 »

Hi,

well there are at least two ways:

- use pixel math to add your images and then divide them, something like this: (img1 + img2) / 2
- use ImageIntegration

I hope you understand that 'combine' can also refer to combining monochrome lights into an RGB image. That is done differently. That's why I needed that clarified first.
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 mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How do I combine two master lights
« Reply #4 on: 2012 October 29 08:22:00 »
Pixel math works fine for layering but it is not easy to use. It also has no easy preview capability to help adjust weighting parameters. IMO lack of layering is a weakness of PI. For example I often want to apply a HDRWT but don't want it applied "full strength". So I apply the process to a copy and then blend the original with the result of the process in pixel math. Very inconvenient. If there is an easy way to layer in PI please post, maybe I am missing something.
Mike

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: How do I combine two master lights
« Reply #5 on: 2012 October 29 08:43:00 »
yes, make a luminance mask with the desired strength and have it active when you apply the HDRWT (or any other process for that matter.)

this is the 'right' way to do it in PI. i can see why you are frustrated with having to do it with pixelmath.

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: How do I combine two master lights
« Reply #6 on: 2012 October 29 09:01:36 »
Thanks that makes sense. If I want to do a 50%/50% blend what is the best way to make the mask?
Mike

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: How do I combine two master lights
« Reply #7 on: 2012 October 29 09:12:16 »
in pixel math say "0.5" and create a new image. I can't try it right now but pretty sure that will get you a uniform 0.5 image. I can see how it would be useful to have a linear 'power' slider for processes. I haven't ever needed it but that doesn't mean it's not useful of course :-)

I suspect at least some processes where a power slider makes sense already have such a control even if it's not called 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 Jim_

  • Newcomer
  • Posts: 30
Re: How do I combine two master lights
« Reply #8 on: 2012 October 29 10:09:10 »

Hi,

well there are at least two ways:

- use pixel math to add your images and then divide them, something like this: (img1 + img2) / 2
- use ImageIntegration

I hope you understand that 'combine' can also refer to combining monochrome lights into an RGB image. That is done differently. That's why I needed that clarified first.


Thanks Sander,

Well, I did get that to work.
It seems like a complex way of adding data from one image session to another one.
ImageIntegration wouldn't work with less than three images.


yes, make a luminance mask with the desired strength and have it active when you apply the HDRWT (or any other process for that matter.)

this is the 'right' way to do it in PI. i can see why you are frustrated with having to do it with pixelmath.


You lost me there  = ))
I'm still new with PI so everything is a learning experience.

Jim


Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: How do I combine two master lights
« Reply #9 on: 2012 October 29 10:13:49 »
Quote
Well, I did get that to work.
It seems like a complex way of adding data from one image session to another one.
ImageIntegration wouldn't work with less than three images.

Perhaps it's complex but it's very flexible. You can also add 3 or 4 of 8 images that way. It also takes only a few seconds so it's not -that- complex :-)

To be fair I'm not sure why you'd want to combine lights that way anyway, just pile all your lights into imageintegration and get the result in one shot. Can you explain what workflow leads to having 2 stacked lights that need combining? Whenever I have lights from multiple sessions I stack the whole thing.

I didn't know ImageIntegration requires 3 images at least, thanks for letting me know.
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 topboxman

  • PixInsight Addict
  • ***
  • Posts: 292
    • Peter's Gallery
Re: How do I combine two master lights
« Reply #10 on: 2012 October 29 10:14:31 »
You can try use ImageIntegration by including the same image twice. Using the same image twice should not be any different than using once.

Peter

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: How do I combine two master lights
« Reply #11 on: 2012 October 29 10:24:35 »
In that case you should include each image twice otherwise one image will have double the weight of the other one and it won't be an average.

Good trick though :-)
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 Jim_

  • Newcomer
  • Posts: 30
Re: How do I combine two master lights
« Reply #12 on: 2012 October 29 10:37:00 »
Quote
Can you explain what workflow leads to having 2 stacked lights that need combining? Whenever I have lights from multiple sessions I stack the whole thing.

Sure, in this case I just finished modding a 350D and wanted to combine it with an image from my 60Da.
I'm more playing around trying to learn PI better.

Thanks for the help all
Jim

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: How do I combine two master lights
« Reply #13 on: 2012 October 29 10:49:41 »
Ah, more useful information :-)

You may have to experiment with different weights for each image to get the best result. Averaging two lights to increase SNR only makes sense when they are from the same distribution. So your cameras would need to have the same light response for that to be true. A bit unlikely I'm sure you'll agree. If you average two numbers that are not from the same Poisson distribution you simply get the average and there's really no telling if that average is 'better' or not. If one image has worse SNR than the other the combined image will be worse than the better of the originals.

I am suspicious of the benefits of combining unrelated images. Ask me about HaRGB and other combinations some day :-)

I recommend you keep an honest eye on the result and see if the combined image is really better than either one of the originals. Experiment with weights in the pixel math formula. Simply multiply one image with a factor to weigh it more or less. You actually don't need to divide by two. Simply check the 'rescale' box in pixelmath. Addition is the same as averaging from an SNR perspective.
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 pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: How do I combine two master lights
« Reply #14 on: 2012 October 29 13:17:44 »
Thanks that makes sense. If I want to do a 50%/50% blend what is the best way to make the mask?
Mike

i'm not sure this is any easier than pixelmath, but maybe. if you want to apply any process at a 50% strength (or any strength) then you can just create an image with all pixel values = 0.5 and use that as a mask.

generally though i like to do the HDR transforms and LocalContrastEqualization only on the high-SNR parts of an image. so i just extract the Lightness from the image, then adjust the histogram so that the background is clipped off and the high-SNR parts are pretty bright (like maybe 0.75 or so). then i'll smooth the mask by removing the first 4 wavelet scales with AtrousWavelets and then maybe touch up the histogram again. i suppose you could do the wavelets first and then do the HT, though.

so then i apply this new L image as the mask, and then run the contrast enhancement stuff. seems to work pretty well.

Jim_, i think this answers your question also?

masks are pretty fundamental in PI; they are the most basic way of controlling what a process does to what parts of your image.