Author Topic: Question about combining two RGB images  (Read 257 times)

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 761
    • View Profile
    • Imaging at Dogwood Ridge Observatory
Question about combining two RGB images
« on: 2019 March 06 11:39:13 »
I have two images, same data but processed differently and no would like to take these two and combine. What is the simplest means of doing so with Pixel Math? Or should I use another method. Both are nonlinear RGB images.
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 617
    • View Profile
    • Astronomy Pages G.W.
Re: Question about combining two RGB images
« Reply #1 on: 2019 March 06 11:57:21 »
Hi,
it depends what you want to achieve.
The simplest Form in Pixelmath to mix
Image A and Image B  is:     avg(A,B)     creates the average of image A and image B
or                    max(A,B)   takes the brighter pixels from each image
or                    min(A,B)   takes the darker pixels of each image
or                    (A * 0.9) + (B * 0.1)  takes 10% brightness  from image B and 90% from image A
instead of % you can uses masks
                       (A * Mask01)  +  (B * ~Mask01)
or                    (A * Mask01)  +  (B * Mask02)

etc....
Gerald

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 761
    • View Profile
    • Imaging at Dogwood Ridge Observatory
Re: Question about combining two RGB images
« Reply #2 on: 2019 March 06 12:13:01 »
Thanks Gerald, I figured you'd be one of the respondents. Averaging the two seems to improve. Something I've been playing with is doing a histogram stretch based on a preview of the main object itself. I'll draw a preview around the object that is central to the image and then with the preview active do an STF stretch. I'll open HST and drag the instance icon over to HST and drop it. Then I'll execute the stretch. I get much better results this way then just an auto stretch on the whole image. In this case it's the Owl Nebula and the result is much nicer but I also like the star profiles from using Masked stretch but that leaves the image flat, with little contrast. So I was looking for a way to get the best of both methods by means of combining them. The question at this point is what the proper expression is to achieve the star profile and the nice contrast together. In that "other" program you could stack (layer) the images and adjust the opacity of one or the other among other means as well. But I'm committed to PI and am looking for the best means to achieve this.

Thanks for the pointers on Pixel Math, I really need to spend more time understanding the process.
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 617
    • View Profile
    • Astronomy Pages G.W.
Re: Question about combining two RGB images
« Reply #3 on: 2019 March 06 14:49:46 »
Hi,
The expression for mixing Image A and Image B:
 (A * 0.9) + (B * 0.1) 
is already a layering technic, using 2 layers;  the main difference to the "other" program is,  you have the layers
horizontally positioned instead of having them positioned vertically underneath.

So, mixing 3 layers  (Image A, B, C)
than looks like:
 (A * 0.5) + (B * 0.1) + (C * 0.4)  takes 50% brightness  from image A, 10% from image B, 40% from image C)

etc....
Gerald


Offline drmikevt

  • PixInsight Addict
  • ***
  • Posts: 112
    • View Profile
Re: Question about combining two RGB images
« Reply #4 on: 2019 March 06 18:21:41 »
Since you're used to the program that shall not be named, there is also this:  https://pixinsight.com/forum/index.php?topic=3902.msg26785#msg26785

Mike