Author Topic: How to use background from one image and target from another?  (Read 3244 times)

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
I'd like to use the target galaxy from this image:

http://www.pbase.com/skybox/image/163594492

with the background from this image:

http://www.pbase.com/skybox/image/163594489

so that the registration edges don't show in the final image.  As you might guess, I changed the camera orientation after the first of the three imaging sessions.  But I'd like to use data from all three nights for the galaxy.  I'm sure there's a way to do this - PixelMath with a mask? - but I can't quite figure out how.  Any help would be appreciated.

Kevin

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Nobody knows?  Is the only solution to process both images, then combine them in Photoshop with a mask?

Kevin

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Hi Kevin, I don't know if there is any trick with PixelMath but you may be able to remove the lines and gradient using DBE. I did a quick test in the jpg image and seems to work.
Saludos, Alejandro.

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Alejandro, can you post the DBE settings you used?  I can get DBE to remove gradients, but I've never gotten it to work on sharp lines like this.

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Hi Kevin, attached the process.
Note that I did a quick test, you can yet improve it placing more samples in the critical areas.
Saludos, Alejandro

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Alejandro

I am impressed. I would have never thought of that. More old images to try again :o


Mike

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Whoa.  I never would have thought of that either.  Did you just click a zillion times along the lines, or did you somehow generate those sample points automatically?  Either way, thanks a lot.  That's a huge insight for me.

Kevin

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 204
    • Skypixels - Astrophotography by Herbert Walter
Hi,

The method and result from Alejandro is astonishing - as always!!

With Pixelmath: max(img1, img2)  -  works quite good for your images.



You can restrict the range of pixelvalues - only to operate to the background and protect
the fainter arms of the galaxy: iif ($T>0.3,$T,max(img1,img2))

0.3 - try also other values to get an suitable result.

Best regards!

Herbert, Austria
« Last Edit: 2016 July 05 06:25:42 by Herbert_W »

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Hi Herbert, excellent, that is a much more elegant solution  :)
Hi Kevin, yes I clicked a couple of times!  >:D
Saludos, Alejandro

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Hi Herbert,

I thought about using the Max operation in PixelMath.  That operation will certainly get rid of the dark lines, because the image with only two nights data is brighter in those places.  But how do we know that the max operation will use the image with three nights of data for the target itself? 

Alejandro, thanks as always for all your help.  I don't know much about PI, but I'd know far less without your tutorials.

Kevin

Offline tommy_nawratil

  • Member
  • *
  • Posts: 53
Re: How to use background from one image and target from another?
« Reply #10 on: 2016 July 05 12:37:57 »
hello,

actually it would be preferable to average the different backgrounds to get best S/N level on weak signal there.
Overwriting by a brighter background from another night would not really achieve this,
but copying another nights data (partly) over it.
Alejandros method to get an even background from one picture itself is therefore prefereable IMHO.
Later on we could mix and average, using Pixelmath or Geralds Blend script.
As far as I can see Alejandro sets the smoothing factor to zero, to allow the background model fit structures sharply.
I never played with this factor, and was often stuck in problems with harsh contrast gradients in my raw stacks.
It will be a huge benefit for me. Yeah!

Thanks Kevin for posting that example, and thanks Alejandro to show us how you cope with it.
Vienna and Austria is grateful to you :-)

Tommy, Vienna
« Last Edit: 2016 July 05 12:53:37 by tommy_nawratil »