Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

3) Primer -How to stretch the histogram using levels and curves (long download)


Recommended Posts

I need to re upload the images but for now you can find the primers with images on my web site www.astropixels.co.uk Go to the resources section

WARNING – THIS IS A LONG AND QUITE INVOLVED PRIMER

BUT…IT COULD BE USEFUL!!!!

I learnt these routines reading Ron Wodaski's "Zone System for Astroimaging". The book and accompanying DVD is expensive but an absolute godsend for struggling processers like me http://www.newastro.com/newastro/default.asp

This primer will demonstrate an effective routine for stretching the histogram of your captured images. If followed you should be able to produce images which have a good range of bright and dim features. You will learn how to enhance features in the image by making small adjustments to curves and you will be able to avoid loss of detail resulting from clipping.

I will start off by explaining the principles underlining this technique, it isn’t actually essential that you understand this stuff. Just follow the routines!!

What you will need:

1) Images to work on – although these could be a single shot, combined images with a decent amount of overall exposure time will be much much better. The techniques discussed here wont put in information that isn’t there but they will pull out detail you didn’t know you had. So you will need capture and stacking software

2) Processing software that has curves. Photoshop elements is disastrously lacking in this department however there are plenty of cheap alternatives which come with curves. Obviously Photoshop is the daddy.

3) Processing software that can handle 16 bit images. The techniques described work best on 16bit images. However if your camera only captures 8 bit images you can still run through the routines

4) Preferably a well calibrated monitor. This is so important. The monitor I used for compiling this primer is very poor at displaying high and low contrast so apologies if the image looks awful on your set up.

Some Theory (with apologies to photographers who know much more about this stuff than I ever will)

Every pixel of your image will display a certain level of brightness. If it is an 8 bit image the range of brightness levels will be 2 to the power of 8 i.e 256. For a 16 bit greyscale image the figure is 65536. Photoshop handles 16bit images but the levels histogram only displays data in 8 bit mode i.e. 256 levels. When you use levels in Photoshop you will see a histogram showing the number of pixels allocated to each of the 256 levels. Since 16 bit images have 65536 levels each of the 256 photoshop levels can contain up to 256 16bit levels within it. The jist of this is that if we can broaden the histogram we can bring these levels into play and thus bring out more detail.

Hopefully you can see that the data contained within a 16 bit image is very precious and shouldn’t be lost by converting to an 8 bit image until all processing is completed. Astro images use a format called FITS (flexible image transport system). To edit FITs files in photoshop you will need a plug in. FITS liberator works very well and is free http://www.spacetelescope.org/projects/fits_liberator/ You can also use TIFF which is another lossless format.

Astro images are very dim. An unstretched image will have the great majority of its levels way over to the left of the histogram. Sometimes the histogram is so thin that you may think you can’t possibly have enough data however remember how many 16 bit levels are contained within each of those 256 levels displayed by photoshop. We are going to pull out that histogram and shift it over to the right so that is nice and bright and shows as much detail as possible.

Levels and Standard Curves Routine

So you have got your captured image open in photoshop or similar. Open the levels window (ctrl L in PS). You will see a black peak over to the left with a height of graph extending to the right. It may be that the graph comes up hard against the left end of the histogram however if it doesn’t move the slider at the bottom left of the graph to the right until it is just to the left of the start of the peak. You can fine tune this adjustment by entering the level numerically in the box above. Move the right hand slider to left until it comes to the right hand edge of the graph however quite often there is a very thin line extending all the way to the right hand end – it is very important not to move the slider over this, just leave it all the way over to the right.

image.jpg

Here is an example of an image of the Rosette nebula captured and combined using Maxim with no stretch applied. There is no sign of the nebula and the histogram is hard over to the left. You can’t see it on this screen shot but the histogram actually extends all the way over to the right so no adjustment is made to levels at this stage.

Now the magic starts! Bring up the curves dialogue box (ctrl M in PS)

image.jpg

Here a “standard curve” has been applied. To create this start well over to the left of the curve at a input level between 10 and 20. Raise this point so that the output level is 3-4 times that of the input.

The second point is used to fix the left hand part of the curve in place. Place it in a similar position to that shown perhaps pulling the curve a small way over to the right.

The 3rd and final point should adjust the right hand curve so that it travels in a straight line to the top right hand corner with a smooth curve over to the left, try to avoid the curve being too angular.

This curve pulls out the faint detail whilst controlling the highlights in the image and preventing them from becoming blown out.

You can now see that detail is starting to emerge.

Now return to levels

image.jpg

Compared with the first level you will see that the histogram is slightly broader (stretched) and has moved a little to the right (brighter). The curve is still touching the left hand edge so, again, no adjustment is made. Back to curves.

image.jpg

Another standard curve has been applied although a bit less aggressive this time with the stretch to the left hand point being a bit less – perhaps having the output 3times the value of the input. The rosette is starting to bloom. Look at the background though and you will see there is some grey brightness there, time for levels again.

image.jpg

Now you will see that the broadening histogram has parted company with the left hand edge. The gap between the edge and the histogram is dead space and needs to be eliminated by moving the L slider over to the left edge of the histogram. This has been done and you can see the effect it has had on the background. This adjustment to levels needs to be made after every adjustment to curves, use of gradient removal tools or cropping of the image. This is very important otherwise your curve adjustments will be working on dead space.

image.jpg

Another standard curve – getting gentler with each iteration

image.jpg

Look at how broad the histogram is now. You can also see that the left edge of the histogram falls off very steeply but that there is a small lump to the left of this. This often represents a gradient or irregularities at the edges of image due to the stacking process but can sometimes be produced by very faint nebulosity. Often it can be cut into but be careful to ensure that you aren’t loosing important faint detail. In this example I have cut a little bit of it.

image.jpg

Standard curves have pulled out the image. We can now move on to develop good contrast within the image. The first stage is to find the dim Always start with the left most point. This point is first used to find the dimmest part of the image. Put the point in well over to the left and drag it upwards so that the image is grossly over brightened. This will show up the dimmest portions. You want to measure the brightness level of these dim portions. Do this by clicking on these areas. As you do this a point will briefly appear on the curve and the level will show up in the input box. The above image shows the initial point on the curve along with the point brought up by clicking on a dim part of the image. CANCEL THIS CURVE and reopen.

image.jpg

Place a point near this brightness level. Lets say the level we are after is 10. Having placed the point on the curve enter 10 into the input and output boxes and the point will be moved to the appropriate point. Now enter different values into the output box using the lowest level which makes the faint details clearly visible. It needs to be as low as possible to give you room to preserve contrast in the brighter bits – 15 would be a typical sort of output to choose. You can now move onto the next level of brightness and pull that up a little and progress with 2 or 3 more points. This is very much a personal judgement matter and you will need to experiment to find what works best. The aim is to enhance contrast in a way which brings out detail across the brightness range of the image.

image.jpg

Although you can’t see it on these screen shots there was a black band along one edge of the image left over from stacking. This level is shown after cropping out this band. You will see that the little slope to the left of the peak has now disappeared. A further adjustment to the level needs to be made.

image.jpg

Next we can enhance detail by making local contrast enhancements. Look at the image for details you would like to bring out more. With the curves box open press ctrl and click on 2 adjacent parts of the image which have a difference in brightness level that you would like to enhance. This will place 2 point on the curve. Use ctrl and tab keys to move between these points. The active point on the curve is the black one, the inactive one is a tiny little box. Increase the output value of the upper point by 3or 4 and reduce the output value of the lower point by a similar amount. These adjustment values will obviously vary. You have now messed up the curve to the right and left of these points. To correct this you need to place point to the right and left and adjust these to recreate a straight line as shown.

Close curves, check levels and readjust the black point if necessary. You can repeat these local adjustments if necessary.

image.jpg

image.jpg

And that’s about it for histogram stretching. You can now go onto think about some sharpening of the brighter details, some blurring to the faint areas to reduce noise and do some work to trim and sharpen up the stars. In this final image a high pass filter has been applied to sharpen up brighter details. The filter has been partially masked so that it hasn’t increased noise in the darker areas.

Have a go and if there is anything you are confused by please shout out.

If anyone would like to have a play with my original image please pm me with your email address and I can email it to you. If you have a PS plug in to enable you to edit FITs I will send it as a FIT if not a TIFF, just state preference

  • Like 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • 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.