Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Colour Preserving Stretch in Photoshop


Recommended Posts

18 hours ago, GraemeH said:

Mark,

I just wanted to say a huge thank you for sharing this method.  I am still taking my first baby-steps in astroimaging, and it's only because of people like yourself and others on here who are always happy to share tips and give advice that I've been able to start creating some images that I'm very happy with.

The attached image of the central part of M33 was processed by following your guidance.

Graeme

M33.jpg

Thanks for your kind comments.  Your image is looking good and I think that performing a bit of standard curves stretching would improve it further, making the arms a bit more visible.

Mark

Link to comment
Share on other sites

Hi Mark, thank you for a most interesting post!

I downloaded the excellent .tif and tried the method you suggest in Photoshop. My result was pretty close to what you achieved - almost as good. It was quite a bit of work, though, so I thought I'd suggest a method for when you want a quick result: use Topaz Adjust.

Here you see a screenshot of the 'raw' tif opened in Adjust with some adaptive exposure and adaptive saturation applied. The small window is the original, the large one is the preview of the result. Just move the sliders around till you're happy. It takes a minute or two.

Topaz Adjust runs in any program that can handle photoshop filters, like the freeware IrfanView for instance.

TopazAdjustSettings.thumb.png.15d621127bc3b46fdd6fdcc37bd3afba.png

 

Link to comment
Share on other sites

On ‎18‎/‎11‎/‎2017 at 21:12, Ruud said:

Hi Mark, thank you for a most interesting post!

I downloaded the excellent .tif and tried the method you suggest in Photoshop. My result was pretty close to what you achieved - almost as good. It was quite a bit of work, though, so I thought I'd suggest a method for when you want a quick result: use Topaz Adjust.

Here you see a screenshot of the 'raw' tif opened in Adjust with some adaptive exposure and adaptive saturation applied. The small window is the original, the large one is the preview of the result. Just move the sliders around till you're happy. It takes a minute or two.

Topaz Adjust runs in any program that can handle photoshop filters, like the freeware IrfanView for instance.

 

Thanks for the information on Topaz Adjust.  I downloaded the trial version and had a quick play.  For my example NGC7000 file I quickly obtained a result almost identical to the Arcsinh Stretch approach by setting Adaptive Exposure to 0.95 and increasing the Brightness and Contrast both to 1.5.  It's clear that Topaz Adjust stretches the data in colour preserving manner and for that reason it is worthy of being recommended.  My only slight complaint was that it increased the halo effect around the brighter stars.

The benefit of Topaz Adjust is that it behaves interactively - you see the results in real time as you adjust the slider.  I agree that my Photoshop method is a bit cumbersome but remember you can record it as an action - this is definitely the best way of doing it.  You can then open any image and replay the action on it - you might want to go back and select a different curve in the curve layer but that's all.  To work interactively it needs to be a plugin but I don't think I'll ever get round to writing a Photoshop plugin.

Mark

Edited by sharkmelley
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi Mark,

I'm just learning processing.  I've followed your instructions using the image you provided and below is what I'm getting, a very pixilated image.  It's obvious I'm doing something wrong but do you know what it is, I'm using Photoshop CC.

Regards

Doug

 

image.thumb.png.2a523832af8569d5afc76dfaf9a2b124.png

 

 

Link to comment
Share on other sites

58 minutes ago, Doug64 said:

Hi Mark,

I'm just learning processing.  I've followed your instructions using the image you provided and below is what I'm getting, a very pixilated image.  It's obvious I'm doing something wrong but do you know what it is, I'm using Photoshop CC.

Regards

Doug

 

The effect you're seeing is posterisation, not pixelation.  It might simply be the way Photoshop is displaying the image.  Try displaying at 100% scale instead of 66%.

Otherwise - maybe the file you are processing has a bit depth of only 8bits.  You need 16bits in order to have sufficient levels of brightness to prevent posterisation when stretching the data.

Mark

Link to comment
Share on other sites

22 hours ago, sharkmelley said:

The effect you're seeing is posterisation, not pixelation.  It might simply be the way Photoshop is displaying the image.  Try displaying at 100% scale instead of 66%.

Otherwise - maybe the file you are processing has a bit depth of only 8bits.  You need 16bits in order to have sufficient levels of brightness to prevent posterisation when stretching the data.

Mark

Hi Mark,

Thanks for the reply,

I was using the image provided with the initial post and upon checking it is 16bit.  I've increased the view to 100% but still no change, the posterisation is still there as shown in the below image.

Regards

Doug

 

image.thumb.png.800b8ee3a2854ee0c1a99e62e7aee501.png

 

Link to comment
Share on other sites

7 hours ago, Doug64 said:

Hi Mark,

Thanks for the reply,

I was using the image provided with the initial post and upon checking it is 16bit.  I've increased the view to 100% but still no change, the posterisation is still there as shown in the below image.

Regards

Doug

 

As far as I can see, you are doing everything correctly.  I've run out of ideas as to what might be going wrong. 

The only thing I can suggest is that you upload your psd file to DropBox, Google Drive or similar, then I can take a look.

Alternatively pick up my Photoshop PSD file from here and see how it displays on your machine:

https://drive.google.com/open?id=184TXqMlt8dXiC8IBNSlOAxigmF_ab5ZA

Mark

Edited by sharkmelley
Link to comment
Share on other sites

Hi Mark,

Thanks for the reply.  The image I was initially using was the one you posted in your first post of the North American Nebula.  I copied that image onto my computer then processed it following your instructions and the image I have shown you is what I got.

I've now copied over your Photoshop PSD file and have viewed this in my version of Photoshop and it looks good, see below image so I don't know what is happening.

Thanks for your help anyway and I'll try your process which I've saved as a complete action on another image when the clouds clear.

Regards

Doug  

 

image.thumb.png.07f563d154ec2e3d47ff743101747a52.png

Edited by Doug64
Link to comment
Share on other sites

  • 2 weeks later...

Hi All,

I have been experimenting with the Arcsinh Stretch in Photoshop as described by Mark. I am a very amateur processor but am really impressed by this new method. It really does seem to maintain star colours so much better. I have been struggling to get my images to a consistent state whereby I can apply the stretch. I understand that white balance etc are  critical but could someone kindly share some suggestions as to how best to prepare images for this stretch. Some of the images I have tried come out OK, others gain a pink hue or excessive noise. I have a reasonable grasp of the more convention flow but am trying to understand the suggested order for arcsinh, noise reduction, gradient removal, initial stretch etc. What flow do you use? :-)

Many thanks

Vern

Link to comment
Share on other sites

I use Arcsinh a lot but in PI. I perform gradient removal first followed by colour calibration and then noise reduction before applying Arcsinh incrementally. I then use PS to pull out the colours. I presume the same process might apply in PS.

Adrian

Edited by Adreneline
More concise answer.
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Adreneline said:

I use Arcsinh a lot but in PI. I perform gradient removal first followed by colour calibration and then noise reduction before applying Arcsinh incrementally. I then use PS to pull out the colours. I presume the same process might apply in PS.

Adrian

Thanks Adrian, that's exactly the king of info I was after. Much appreciated

Link to comment
Share on other sites

  • 3 years later...
On 19/10/2017 at 08:50, sharkmelley said:

Thanks everyone for your feedback - it's helped me to crystallise the way this should work.  To be honest I found using a gamma curve was just a bit too fierce for what I wanted. So with a bit of maths, I've now managed to find a way to actually use Arcsinh (Hyperbolic Arcsine) curves in Photoshop :) 

Firstly a couple of hints:

  • Always perform a levels adjustment on your image to subtract as much of the background as possible otherwise you won't achieve so much stretch and the colours you see in your stretched result will be the same colours (washed out by the background) that you started with.
  • If you are planning to use the colour preserving stretch frequently then it's well worth recording an action to create the layers for you.

I have worked out that it is possible to design preset curves that apply an Arcsinh curve.  However Photoshop doesn't have the granularity in the curve design to allow such a strong curve to be designed in one hit.  Therefore I have designed a curve that when applied twice in succession gives the correct Arcsinh shape.  Here's an example:

PS_Arcsinh_Curve.jpg.097d951c5cc4b48be5796a34d7366b7b.jpg

The above curve is not an Arcsinh curve of itself but will give an Arcsinh curve with a stretch factor of 300 when applied twice in succession.  Every single point on the curve has been carefully calculated in a spreadsheet to have the desired effect.  The way it is used is illustrated below:

PS_Arcsinh_Layers.jpg.ee78e2632f5c00368ef423fdeb847645.jpg

The intermediate Levels layer is there to allow some additional subtraction of background (if necessary) between the first and second curve layers.

I have calculated and built a set of preset curves: Arcsinh10, Arcsinh30, Arcsinh100, Arcsinh300, Arcsinh1000 which give stretch factors of 10x, 30x, 100x, 300x, 1000x.  Arcsinh100 is probably the most useful one in general.  You would use the same Arcsinh100 preset curve in both layers to achieve a stretch of 100x.  It is quite possible to "mix and match" them - for instance using Arcsinh100 in one layer and Arcsinh300 in the other layer would give a stretch somewhere between 100x and 300x.

If you want to use these curve I'm making them freely available here: PS_ArcsinhCurves.zip

You need to unzip them into the relevant Photoshop folder.  On my Windows machine that is C:\Users\Mark\AppData\Roaming\Adobe\Adobe Photoshop CC 2015\Presets\Curves  but if you don't know where your own folder is, just try to save any arbitrary curve as a preset and notice which folder Photoshop is using.

Enjoy!

Mark

Mark

Now that version 1.9 of Affinity Photo has been released it is possible to place points on a curve as x & y values between 0 & 1. Would it be possible to create arcsinh preset curves in Affinity Photo?

Regards

 

Darren

Link to comment
Share on other sites

I haven't used Affinity Photo but I'm happy to share the x,y values of the Photoshop curves, if that helps.  If you need them in the range 0-1, you can scale them.

x Arcsinh10 Arcsinh30 Arcsinh100 Arcsinh300 Arcsinh1000
0 0 0 0 0 0
4 12 22 34 51 65
8 25 39 52 70 84
14 41 57 71 89 103
22 59 76 90 107 120
32 78 95 108 124 136
44 97 113 125 139 151
62 120 134 145 158 168
82 142 154 163 174 183
105 163 173 181 190 197
130 182 191 197 204 210
155 200 206 211 217 221
180 215 220 224 228 231
205 230 233 235 238 240
230 243 244 245 247 248
255 255 255 255 255 255


Mark.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.