Single-Channel Stuck Pixel Cleanup

Maybe these have shown up in one of your images: A tiny trail of saturated red, green or blue pixels (sometimes all three). These are sometimes referred to as "stuck pixels." These can be cleaned up manually, but it can be time consuming to do so. Bear in mind that in your final image stuck pixels may be larger than a single pixel due to processing, so it's best to clean them up as early as possible while they're still small. In the outling below we start with red stuck pixels, then do the other channels. You need only perform this on channels that have problems.

  1. Open your image
  2. Create a duplicate layer (drag the background layer to the duplication mini-icon)
  3. Enlarge the image (Shift-+) large enough that you can find a stuck pixel easily select it
  4. Choose the eyedropper tool and set it to Point Sample
  5. Select the stuck red pixels: Select > Color Range and click on one of the red wild pixels. Set the Fuzziness to around 40 and click OK.
  6. Scroll around your image to see if you selected enough of the stuck red pixels. Not enough were selected? Repeat Step 5 with a larger Fuzziness. Too many were selected? Use a smaller Fuzziness. Remember that you can also deselect objects by using the Lasso tool in Alt-drag mode.
  7. Expand the selections: Select > Modify > Expand... with a size of N pixels, where N is large enough to select all of a typical stuck pixel
  8. Median filter the selections: Filter > Noise > Median... with a radius of 1.5N pixels or so.
  9. Repeat Steps 5-8 for Blue and Green stuck pixels. You may even see some white pixels; this method won't work well for those because they resemble the centers of saturated stars.
  10. Merge the layers and save

This method has the advantage of being able to clean up stuck pixels without creating dark haloes even if they're within a bright area of your target object. The price you pay is a slight smoothing around the errant pixel, which is why you want to keep N as small as possible in Step 7. If the stuck pixel is indeed a single pixel you can set N = 1 and use a radius of 1 in Step 8.

Return to main Processing page