Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Processing Tip- Stretch method to control stars and retain contrast and colors

  • Please log in to reply
29 replies to this topic

#1 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 11 October 2017 - 07:17 PM

I've been fooling around with arcsinh tool in PI for a couple of months now.  It's superior to maskedstretch in every way doing a better job of retaining star color and size while not resulting in a very flat image.  Another benefit of arcsinh is that unlike HT, arcsinh does a remarkable job at retaining color saturation during the stretch.  It's so good at retaining color saturation that sometimes there is too much color to effectively process the stretched image! 

 

While HT has a tough time contolling stars and retaining color saturation, one thing it does a great job at is producing a nice contrasty image.  Nebula detail is easily drawn out of the ether, but at the detriment of color and star size.

 

Tonight, I decided to try a combination of the two to see what would happen.  With only one attempt at the following method I was really pleasantly surprised with the result!  With some effort optimizing the settings of each method before combination I think even superior results can be achieved.  You can have your cake and eat it too. 

 

I'm posting about this in hopes it helps as a starting point for others who struggle with finding a balance between star size, image contrast and color saturation when stretching.  With some fiddling, you might find this useful. 

 

Here is what I did:

 

1) Prepared my channels for combination (Ha, Sii, Oiii). I combined with PM using a custom PM blend.  (Here it is in case you care:  R= .4Ha+.6sii      G= .4Oiii+.3Ha+.3Sii      B=Oiii)

2) Created clone of the resulting RGB image

3) Applied a maximum arcsinh stretch to one of the clones.  (below on the left)

4) Applied a custom HT stretch to the other clone.  (below in the center)

5) Combined the two stretched images with the PM expression pictured below, which resulted in a NEW RGB (below on the right)

 

The new RGB had much better color, contrast, and star control than either of the other methods. Stars also retained color. 

 

Combining_Stretches.JPG

 

Here is a very fast process on the resulting image to show you what I was able to easily achieve.  I plan to go back and do a careful process with Decon, NR, colors, etc.... Just wanted a quick and dirty to show what I was able to get with this combined stretching method. 

 

get.jpg

 

 

 


  • Weiserone, kingjamez, Woodbridge_Dave and 9 others like this

#2 NorthField

NorthField

    Viking 1

  • *****
  • Posts: 933
  • Joined: 01 Jun 2017
  • Loc: SW Missouri

Posted 11 October 2017 - 10:07 PM

Very cool idea and result!

I’ve tried many time to use arcsinh but I seem to alwtend up with star core issues ( pink core mainly )

Regardless, I’m gonna try this trick on my m45 wip tomorrow

Thanks Chris!
  • ChrisWhite likes this

#3 NorthField

NorthField

    Viking 1

  • *****
  • Posts: 933
  • Joined: 01 Jun 2017
  • Loc: SW Missouri

Posted 11 October 2017 - 10:17 PM



( while I wait for my replacement asi071mc to arrive so I can play that lotto game again )

#4 gundark

gundark

    Messenger

  • *****
  • Posts: 480
  • Joined: 07 Jun 2015
  • Loc: Southern California

Posted 12 October 2017 - 12:45 AM

Chris,

 

Where can i find this arcsinh tool in PI?



#5 sharkmelley

sharkmelley

    Vanguard

  • *****
  • Posts: 2325
  • Joined: 19 Feb 2013

Posted 12 October 2017 - 03:33 AM

Chris,

 

Where can i find this arcsinh tool in PI?

Currently you need to download the tool and install it yourself:

https://www.cloudyni...etch/?p=8034861

 

However, you can expect it to be better supported in the near future wink.gif

 

 

Very cool idea and result!

I’ve tried many time to use arcsinh but I seem to alwtend up with star core issues ( pink core mainly )

Regardless, I’m gonna try this trick on my m45 wip tomorrow

Thanks Chris!

 

Pink star cores are a symptom of saturated stars.  The RGB channels have saturated during acquisition and when the white balance is applied, this typically scales down the green channel (or scales up the red and blue) leaving pink.  The Arcsinh color preserving stretch faithfully preserves this pink color.

 

Either:

   Adjust the Highlights slider in HistogramTransformation before using Arcsinh Stretch (this is my preferred approach)

Or:

   Desaturate the star cores with the help of a star mask after using Arcsinh Stretch 

 

Mark


Edited by sharkmelley, 12 October 2017 - 03:33 AM.

  • gundark and NorthField like this

#6 rockstarbill

rockstarbill

    Fly Me to the Moon

  • *****
  • Posts: 6318
  • Joined: 16 Jul 2013
  • Loc: Snohomish, WA

Posted 12 October 2017 - 03:38 AM

I've been fooling around with arcsinh tool in PI for a couple of months now.  It's superior to maskedstretch in every way doing a better job of retaining star color and size while not resulting in a very flat image.  Another benefit of arcsinh is that unlike HT, arcsinh does a remarkable job at retaining color saturation during the stretch.  It's so good at retaining color saturation that sometimes there is too much color to effectively process the stretched image! 

 

While HT has a tough time contolling stars and retaining color saturation, one thing it does a great job at is producing a nice contrasty image.  Nebula detail is easily drawn out of the ether, but at the detriment of color and star size.

 

Tonight, I decided to try a combination of the two to see what would happen.  With only one attempt at the following method I was really pleasantly surprised with the result!  With some effort optimizing the settings of each method before combination I think even superior results can be achieved.  You can have your cake and eat it too. 

 

I'm posting about this in hopes it helps as a starting point for others who struggle with finding a balance between star size, image contrast and color saturation when stretching.  With some fiddling, you might find this useful. 

 

Here is what I did:

 

1) Prepared my channels for combination (Ha, Sii, Oiii). I combined with PM using a custom PM blend.  (Here it is in case you care:  R= .4Ha+.6sii      G= .4Oiii+.3Ha+.3Sii      B=Oiii)

2) Created clone of the resulting RGB image

3) Applied a maximum arcsinh stretch to one of the clones.  (below on the left)

4) Applied a custom HT stretch to the other clone.  (below in the center)

5) Combined the two stretched images with the PM expression pictured below, which resulted in a NEW RGB (below on the right)

 

The new RGB had much better color, contrast, and star control than either of the other methods. Stars also retained color. 

 

 

Here is a very fast process on the resulting image to show you what I was able to easily achieve.  I plan to go back and do a careful process with Decon, NR, colors, etc.... Just wanted a quick and dirty to show what I was able to get with this combined stretching method. 

 

 

Great post, although what is causing those halos on those stars? Those are quite large. Is that caused by the speed of that Newt? 


  • ChrisWhite likes this

#7 sharkmelley

sharkmelley

    Vanguard

  • *****
  • Posts: 2325
  • Joined: 19 Feb 2013

Posted 12 October 2017 - 05:06 AM

 

Chris,

 

Where can i find this arcsinh tool in PI?

Currently you need to download the tool and install it yourself:

https://www.cloudyni...etch/?p=8034861

 

However, you can expect it to be better supported in the near future wink.gif

 

Actually if you are running PixInsight version 1.8.5 then ArcsinhStretch is already available as an official update and it has documentation:

http://pixinsight.co...inhStretch.html  smile.gif

 

Mark


Edited by sharkmelley, 12 October 2017 - 08:00 AM.

  • Stelios, dragracingdan, Jon Rista and 4 others like this

#8 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 12 October 2017 - 06:52 AM

Great tip on how to handle the star cores Mark! I had not thought of that.

Fyi to everyone else in case you don't know. Mark is the author of this wonderful tool arcsinh. Great to see PI embedding it in New releases!
  • sharkmelley likes this

#9 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 12 October 2017 - 06:56 AM

At bill:

This image was taken with my esprit 80. Im testing out the zwo 7nm nb filters. They work pretty well...except the halos. Granted, the entire set costs a little over half of only 1 Astrodon 5nm filter. I have also used the adon filters with this scope and no halos.

One bonus of those halos is that it clearly shows that I need to tweak my backspacing a little. :-)

Edited by ChrisWhite, 12 October 2017 - 07:05 AM.


#10 BenKolt

BenKolt

    Surveyor 1

  • *****
  • Posts: 1967
  • Joined: 13 Mar 2013

Posted 12 October 2017 - 12:10 PM

Great job, Chris and thank you very much for detailing how this works compared with HT.  I just heard about the arcsinh tool this very morning in an e-mail, and I'll try it out this evening.

 

Ben



#11 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 12 October 2017 - 12:50 PM

Great job, Chris and thank you very much for detailing how this works compared with HT. I just heard about the arcsinh tool this very morning in an e-mail, and I'll try it out this evening.

Ben

Ben,

Arcsinh is a great tool. There is an arcsinh thread over in dslr imaging that will give you more info on how to use it. I didn't dig into the features much of the tool itself.

In PI there are often different tools that can be used to achieve similar goals or results. More often than not a combination of tools can allow you to take advantage of the strengths of each of them, getting the best of both worlds. In this case, arcsinh and HT.

I think stretching is probably the most difficult step in image processing. It can be the step where data is either preserved or lost, exploited or ignored, cultivated or corrupted. I would love to see more detailed sharing on how people stretch data.

Edited by ChrisWhite, 12 October 2017 - 12:52 PM.


#12 David Ault

David Ault

    Gemini

  • -----
  • Posts: 3424
  • Joined: 25 Sep 2010
  • Loc: Georgetown, TX

Posted 12 October 2017 - 12:54 PM

Very nice Chris.

 

I've clearly been out of the loop for a while and wasn't aware someone had made an arcsinh tool.  I've been using arcsinh via PixelMath for years to stretch images (in a blend with other stretch types) so I'm glad someone wrapped it up in an easy to use tool.  By the way, you don't need to use the separate channels in PixelMath you can simply do R/K: 0.5*Image19 + 0.5*Image19_clone.  This will do a per channel 50% blend of the two images.  I typically do something like this: R/K: a*Image19 + ~a*Image19_clone, a=0.5.  This makes it easy to vary the blend amount.

 

Regards,

David Ault


  • entilza, ChrisWhite, ecorm and 1 other like this

#13 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 12 October 2017 - 01:04 PM

Very nice Chris.

I've clearly been out of the loop for a while and wasn't aware someone had made an arcsinh tool. I've been using arcsinh via PixelMath for years to stretch images (in a blend with other stretch types) so I'm glad someone wrapped it up in an easy to use tool. By the way, you don't need to use the separate channels in PixelMath you can simply do R/K: 0.5*Image19 + 0.5*Image19_clone. This will do a per channel 50% blend of the two images. I typically do something like this: R/K: a*Image19 + ~a*Image19_clone, a=0.5. This makes it easy to vary the blend amount.

Regards,
David Ault


Yes, good point David.

I did it the way I did illustrating that you could use different balances of the combined images for each channel. Say you wanted more saturation in blue relative to contrast and resolution in red or green.

I have not tried this, so I don't know if it would work as intended. If not, one could always split the channels of each image, make the custom blends and recombine.

There are so many possibilities with this technique of blending different stretch methods especially if you start doing it channel by channel.

#14 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 5178
  • Joined: 14 Jun 2009

Posted 12 October 2017 - 01:58 PM

one thing worth pointing out is that mark has written excellent documentation for the ArcSinh tool, so when you install it via pixinsight's update system, don't forget to click the dog-eared tab on the process and read the documentation!

 

rob


  • sharkmelley likes this

#15 NorthField

NorthField

    Viking 1

  • *****
  • Posts: 933
  • Joined: 01 Jun 2017
  • Loc: SW Missouri

Posted 12 October 2017 - 04:05 PM

quit work early cause i couldn't wait to try Chris's half&half method

 

i like it!!!

 

nothin fancy here, but all i had to do was figure out a way to handle the pink cores ( which i still need MUCH practice at.. or, learn to avoid )

 

this was with my canon t6i since the 071 is in the graveyard.. just 80 150sec iso800

 

thanks Chris! i'll be re-re-re-processing some other stuff now

Attached Thumbnails

  • New.jpg


#16 RDBeck

RDBeck

    Ranger 4

  • -----
  • Posts: 302
  • Joined: 13 Feb 2017
  • Loc: Katy, TX USA

Posted 12 October 2017 - 05:08 PM

Here is an OSC (ASI 224MC) image of M13.  The only stretching was ArcSinh.

get.jpg

 

In many ways I like this better than my previous attempts.  I think I'm going to like this toollaugh.gif


  • ChrisWhite and NorthField like this

#17 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 12 October 2017 - 07:16 PM

quit work early cause i couldn't wait to try Chris's half&half method
 
i like it!!!
 
nothin fancy here, but all i had to do was figure out a way to handle the pink cores ( which i still need MUCH practice at.. or, learn to avoid )
 
this was with my canon t6i since the 071 is in the graveyard.. just 80 150sec iso800
 
thanks Chris! i'll be re-re-re-processing some other stuff now


Looks great Northfield!  I like how you were able to retain colors across even the saturated stars and the faint wisps of reflection nebula.


  • NorthField likes this

#18 rockstarbill

rockstarbill

    Fly Me to the Moon

  • *****
  • Posts: 6318
  • Joined: 16 Jul 2013
  • Loc: Snohomish, WA

Posted 12 October 2017 - 08:06 PM

And... The PI team just sent out an email stating that Arcsinh is now in the core code branch. Well done!



#19 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 13 October 2017 - 07:28 PM

Tonight I revisted a recent dataset I processed on the Pacman to try this new method.  My goal with this new method was to try to bring out the subtle Ha "pillars" to the lower left of the main pillars on the right side of the image.  I combined an arcsinh stretch and an HT stretch of the rgb, but this time I did not do a perfect 50/50 blend of the two. 

 

I bumped up the arcsinh portion of the red channel, hoping that the additional saturation would "push" the Ha through the dense Oiii field.  My blend was:

 

R= 0.7*arcsinh + 0.5*HT

G= 0.5*arcsinh + 0.5*HT

B= 0.5*arcsinh + 0.5*HT

 

The difference is subtle, but thats what I was going for.  It gave just a little more "natural" saturation so when I saturated the entire image I was able to just do an even saturation boost across the board.  I was also able to do a much lighter saturation pass to get the vibrant colors I wanted.   You can see that it also returned color to the dimmer areas of the nebula particularly in the left side of the image. 

 

As an added bonus it also added more color to my stars, and tightened them a little too. 

 

Link to high resolution version:

get.jpg

 

Here is an animation of my previous HT stretched compared to a blended arcsinh and HT stretch method. 

 

Pacman.gif


Edited by ChrisWhite, 13 October 2017 - 07:29 PM.

  • dragracingdan and sharkmelley like this

#20 NorthField

NorthField

    Viking 1

  • *****
  • Posts: 933
  • Joined: 01 Jun 2017
  • Loc: SW Missouri

Posted 13 October 2017 - 09:14 PM

Good stuff Chris!

I’ll be using this method as my first go to for stretching..

Will take me a lot of practice, but I really like the subtle differences that, duh, make a positive change...

Thanks again for a new way to put lipstick on a pig

( my images are mostly swine-like )

#21 miwitte

miwitte

    Apollo

  • *****
  • Posts: 1125
  • Joined: 28 Dec 2016
  • Loc: Charlotte NC

Posted 15 October 2017 - 07:39 AM

Chris a question;

so when doing combinations in Pixlemath, i had always applied a screen transfer function to all my masters then did a linear fit to get them all the same histogram wise. Then combine those masters. I was following Jons NB tutorial and linear fit seemed something that was necessary to balance the channels.

 

Here it would appear you are doing a combo on unstretched masters, duplicating, then applying a arcsin stretch on one a HT on the other then combining. Is that correct?


  • ChrisWhite likes this

#22 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 15 October 2017 - 08:09 AM

Yes. 

 

FYI: Linear fit should be performed while the data is still Linear. 

 

So first I crop and run DBE... then Linear Fit. 

 

One the data is fit, I prefer to combine the data and then stretch.  (This is for Narrowband and RGB Data).  If I apply Lum to RGB data I stretch the Lum and process it separately before combining with an already stretched RGB. 



#23 miwitte

miwitte

    Apollo

  • *****
  • Posts: 1125
  • Joined: 28 Dec 2016
  • Loc: Charlotte NC

Posted 15 October 2017 - 01:36 PM

Mmmm

 

so hence the name linear fit it should be on linear images. Apparently i was doing non linear fit!lol.gif lol.gif

 

so instead of using STF and applying it to HT then doing linear fit(or in my case non linear fit) i should look at which master  has lowest histogram and fit the others while its still linear.  Details details!


  • ChrisWhite likes this

#24 ChrisWhite

ChrisWhite

    Aurora

  • *****
  • topic starter
  • Posts: 4716
  • Joined: 28 Feb 2015
  • Loc: Colchester, VT

Posted 15 October 2017 - 03:51 PM

Don't worry about the histogram for linear fit.  Use the noiseevaluation script and figure out which channel has the lowest noise. Then linear fit the other channels to this one. (Most often I use the red channel as a reference). 



#25 miwitte

miwitte

    Apollo

  • *****
  • Posts: 1125
  • Joined: 28 Dec 2016
  • Loc: Charlotte NC

Posted 15 October 2017 - 03:53 PM

cool. I got some IC 1396 data im starting to process so im going to try this method looks nice.




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics