Gimp tutorial: remove hot pixels
In this tutorial we'll see how to use Gimp to remove hot pixels from long exposure photos.
Hot pixels are red, blue or green dots, or more rarely white and yellow, that appear in digital photographs when you shoot with long exposures time. The phenomenon appears only in shots with a long exposure time, at least 15/20 seconds, such as night photographs. This problem doesn't affect everybody, because it is possible that a camera has a filter for the automatic removal of hot pixels, but it is not such an obvious thing. If you are editing old photographs or, as in my case, sometimes you shoot with an older camera, the problem could be pretty annoying.
In the picture below you can see a shot taken with my Canon 550D with an exposure time of 30 seconds, 100 ISO, in a completely dark room and with the lens cap inserted. Consider that the camera has been used a lot, it is almost 10 years old and we have never done a sensor calibration. Obviously there is no correction filter applied.
As you can see there are dozens of green, blue and red hot pixels. They appears as tiny colored dots, so if the picture seems completely black to you, make sure you zoom in.
The next picture is the same, but I've highlighted in red the positions of the hot pixels, in order to better make you see the points where the problem occurs. Consider that this is an absolutely normal defect, which tends to accentuate with an intense use of the camera and with the passing of the years. This camera have been used a lot and has many years, so the amount of hot pixels is huge. We have taken hundreds of thousands of shots, so the problem is much more acute than it normally should be, which is exactly the reason we used this camera for the photo of this tutorial.
Why Hot Pixels appears?
A camera's sensor consists of millions of photodiodes that capture light and convert it into an electrical signal, which is transmitted to the camera's processor, which turns it into an image. Unfortunately it is normal that, after some time, some of them stop working properly and start giving bad readings. When the problem is a wrong reading we have an hot pixel, in the case of total malfunction we have a dead pixel.
How to delete Hot Pixels with Gimp:
Gimp provides several solutions for eliminating Hot Pixels, although it does not have a specific tool:
- The best way to proceed is, as always, the manual correction, using the Gimp's clone tool. Here you can read a tutorial on how to use the clone tool. Using this method gives you the total control of the operation, but if you have to edit a large number of photographs it could become a huge job.
- To automate the operation you can use the Filters → Enhance → Despeckle... which works pretty well even at the default settings. Since during our tests we noticed some artifacts, we preferred to change the parameters as you can see below, to get a better result. You will notice that some details and sharpness will be lost in the operation.
None of the two methods we have seen, however, is free from problems: the defect of manual editing is the time needed to perform the operation, while for the Despeckle filter there is a significant loss of details, not to mention the fact that could be removed even details that we would like to keep, such as the stars, so let's see other methods.
There are two solutions to eliminate hot pixels with an additional program: the first is to use a Gimp plugin, called G'MIC, to eliminate hot pixels, the second option is to install a program called HotPixels Eliminator for Digital Cameras.
Install an additional plugin:
Gimp allows us to add functionality through Plugin installation. One of these plugins is called G'MIC and contains more than 500 filters and effects. Among these five hundred effects, in the Repair → Remove Hot Pixel section we can find the one for us. The installation and use of G'MIC is pretty easy, but you might want to read this tutorial where we explain in detail what is G'MIC and how to install and use it. It's about noise reduction, but the first paragraphs is a good generic explaination. The use of the filter is simple and intuitive, the default parameters already work well, but You can vary the values Mask Size and Threshold if you are not satisfied with the result.
Install an additional program:
There are some programs to eliminate hot pixels, among all the one that most impressed us is HotPixels Eliminator for Digital Cameras,
a very lightweight (only 530Kb) and freeware program available at the website
You can also download it directly from our website,
by clicking here.
The program may seem a little obsolete, but it runs perfectly on Windows 10 and also with high resolution photographs. Once installed open the photo with the Load button and, once verified the result, save it with the Save button. There is no setting, except one, that is a checker named Dark Night Shots. If you select this function the program will not only delete hot pixels, but will also delete the blue banding that appears in photographs with high ISO values. This kind of problem was more common some years ago, especially in lower-end cameras or phones. Although today it is no longer a problem, thanks to the technology improvement, we always recommend to select the function.
If you liked our tutorial about hot pixel deletion with Gimp, you could consider to support us: by clicking here you can see how. If you liked this tutorial here you can find all the other guides we wrote about photo editing with Gimp, or you can go there to take a look to our photography tutorials.