A total NOOB to photography here. I was in Tromsø, Norway this weekend and was lucky enough to capture some pictures of the lights. Now, when I say I'm a noob, I actually mean that I know very, VERY little about photography and mainly use my Canon 70D to shoot up-close videos. I set my aperture to the lowest it would go (3.5 with the kit lens) and the shutter speed to 10 seconds, ISO to 1250. I captured some dramatic lights but unfortunately these two are just out of focus. Is there any way to sharpen them without too much distortion / noise? I don't own photoshop or any other photoediting tool really. What I mainly am looking to do is just have the stars appear sharper/clearerenter image description here.


3 Answers 3


This is an easy task using deconvolution, as the stars in the image should be sharp points but they are blurred. This means that the stars in the image can be used as the point spread function that you need to perform deconvolution with. You can do this using the free of charge program ImageJ and the plugin parallel iterative deconvolution or DeconvolutionLab. The image must first be converted to linear colorspace and split into the color channels. You then perform the deconvolution on the color channels separately and then recompose the color image. And then you convert the deconvolved image back to sRGB colorspace.

I'll update this answer later with the result using your jpeg, you can try to do it yourself using a tiff file compiled from the original raw file.


I've attempted to sharpen the picture using deconvolution, but to get really good results requires a lot more work and also one has to use the raw file because the jpeg file has degraded information about the high frequency components. There are three major problems one faces in this particular case. The first is posterization effects (visible discrete jumps in brightness) which are also due to working with the 8 bit jpeg instead of the 16 bit tiff file (which is actually just obtained from the usually 14 bit raw files).

Another problem is caused by the sharpening of the stars causing them to exceed the maximum brightness for 8 bit images. While the stars in the original image were not overexposed, they will become de-facto overexposed if you use the standard method of clipping brightness values higher than 255. If you just led the brightness be whatever it becomes, the entire picture will become way too dark. Now, clipping the brightness values at 255 leads to two problems, one is that you lose the color of the stars.

Clipping also leads to another problem. The stars which after deconvolution had a sharp brightness profile will now appear to have a flat brightness profile, not all that different from how they appeared in the original image. Note that the whole point of this exercise as requested by the OP was to sharpen the stars!

The first problem can be dealt with by transforming the image from sRGB to 32 but linear RGB (so, we make sure not to transform to 8 bit linear RGB) and then when transforming back this is better done using a custom made gamma correction instead of the standard transform.

The problems caused by the brightness of the stars after deconvolution can be dealt with using tone mapping methods similar to what one does when processing HDR images to 8 bit images. This doesn't fully correct for the problems, the brighter the star the less sharp and the more white it will appear. Also deconvolution artifacts will become visible.

The steps using ImageJ in detail:

Load the image

Change image type to RGB Stack

convert it from the current 8 bit to 32 bit.

Then convert from sRGB to (linear) RGB by first dividing by 255, running the math macro:

if(v<0.040445) v = v/12.92; if(v>0.04044) v = pow((v+0.055)/1.055,2.4)

and multiply by 255.

Zoom into the image and select a bright star somewhere in the middle of the image, duplicate the image (which in ImageJ will create a new image with just the selection). Then measure the background in the color channels by selecting a part of the background and using the "measure" function. If the background is reasonably uniform you can subtract this value from the gray values in some color channel and you have a reasonably accurate point spread function. To do this really accurately, you should repeat this for a few stars nearby, align the images and take the average.

Also, due to part of the unsharpness coming from the long exposure time causing the stars to become star trails, the point spread function is not uniform throughout the image. This requires the use of many different point spread functions for different parts of the image. The mountains in the distance should be sharpened using a different point spread function based on the width of the blurry stars.

I just compiled my point spread function based on the image of just one star, so a there is a lot of room for improvement here. Then the next step is to split the 32 bit RGB image into its color components, by selecting "images to stack" and then you run "parallel iterative deconvolution", I selected the MRSND method as this gives the best results for dim images (leads to less artifacts which combined with posterization can look really ugly), for preconditioner select "none", the boundary can be taken to be zero as the boundaries are quite dark, this won't lead to artifacts (otherwise selecting reflexive will usually be better). The we want to do the calculations as accurately as possible, so it's best to select "next power of two" for resizing, output "float" but in this case this is the same as selecting "same as source". Precision should be set to double. For MRSND the maximum number of iterations should be quite large, I've taken this to be 50. The maximum number of threads depends on your computer, it's usually preset to the right value for your computer.

Then you click on "deconvolve", things may then go wrong due to an out of memory error. In that case you can reduce the precision from double to single, or you can cut the image in parts, deconvolve the parts separately and at the end stitch everything together. 8 GB RAM is sufficient for this image, but for slightly larger images you can bump into this problem with only 8 GB RAM.

Then I've processed the result as follows. I've done a tone mapping; brightness values lower than 212 were divided in half while larger were mapped to the range 106 till 255 using the function 71.03109*log(v) - 274.48416 using the math macro. You can experiment with different functions, the logarithmic function chosen here is probably not the best choice. What you need to do is to measure the brightest gray value using the "measure" function and then calculate a continuous function that will map the brightness range of the stars onto some decently large interval.

You can then combine the 3 pictures into one color picture. Then instead of using the standard transform back to sRGB, you can experiment with gamma corrections. In this case, dividing the gray values 255 apply a gamma of 0.4 and multiply by 255, leads to a decently brightened image that looks a lot better than the standard transform to sRGB (there are no severe artifacts visible).

The final step is to convert the 32 bit color image to 8 bit.

Sharpened image using deconvolution

  • \$\begingroup\$ Thanks Count Iblis. Problem is I am such a noob I'm not sure to begin with half of what you said :) How would I compile a tiff from the raw fall? All I know is that I pop in my SD card and import my pics into iPhone. I suppose I could save it as a tiff in GIMP but not sure if that's the right way to go. I will have a play around in the programs you mentioned, so thank you for sharing those! Would love to see what your result would be, I'm sure it would far surpass mine. \$\endgroup\$
    – Aditee
    Feb 29, 2016 at 23:07
  • \$\begingroup\$ Looking at the image, I don't think it is a matter of deconvolution of the lens, but rather that the stars (or rather the Earth) was moving over the duration of the photograph. The 'blur' of the stars may be really short star trails. \$\endgroup\$
    – user13451
    Mar 3, 2016 at 23:21

I don't own photoshop or any other photoediting tool really.

You'll need to obtain some kind of photo editing tool, but there are a number of free tools you could use. If you're a Mac user, the Photos application included with MacOS X will sharpen a photo. Gimp is available on any of the three main desktop platforms and can also easily sharpen. Finally, the Canon Digital Photo Professional software that came with your camera will also easily sharpen photos.


You can use DPP (comes with canon cameras) to edit this picture. I am hoping you shot in RAW, not JPEG.

  • 3
    \$\begingroup\$ How can DPP be used on this picture? Please edit the answer to include some suggested steps. \$\endgroup\$
    – user
    Mar 3, 2016 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.