Apr 13, 2010

Removing sensor marks in Photoshop CS5

Divide-before-low divide-after-low

Photoshop CS5 was announced this week and we have seen a wealth of new features for photographers, more so than any other version of Photoshop I can think of. By now you may already have had a chance to see some of the star new features in action such as Content-Aware filling, Puppet Warp and the new Merge to HDR Pro. Tucked away in Photoshop CS5 are a bunch of other smaller features, which nevertheless can be put to good use. In this article I wanted to focus on the new Divide blend mode. It took me a while to work out what it could be useful for, until Chris Cox who helped point me in the right direction by explaining that it could be useful for carrying out what is usually referred to as a ‘flat field calibration’. In other words, you could use the Divide blend mode to remove lens vignetting and stubborn sensor spots.

Read more…

Some specialist digital capture systems, such as those used in astronomy and microscopy already offer their own software solutions to achieve this kind of sensor clean-up processing. However, with the new Divide blend mode you can carry out flat field calibrations for any type of digital camera system. Be warned that this is a tricky technique to get right. This method may in some circumstances help you cut down on the time spent retouching, providing you are able to capture a valid flat field calibration image close to the time when the other photos were shot.

1 The first step was to capture an image of an evenly lit white surface, exposed so that the center was 100% white. The key thing was to make sure the illumination was even and defocus the camera so as not to pick up any subject texture. It was also important to capture this image at the same aperture as I was going to shoot with since this would affect the definition of the sensor dust picked up by the camera. Since the high-end display I work with has uniform brightness, I got good results by photographing the computer display with a white desktop. I shot at a low ISO setting to keep the noise to a minimum. I also bracketed the exposures so that I had the opportunity to choose the most suitable image – one that was bright enough to apply a Divide blend mode calibration and required minimal further image adjustments to the brightness.

2 Shown here is the original image before adding the calibration layer in Divide blend mode.

3 I placed the flat field calibration layer above the background layer of an image shot with the same camera at the same lens aperture and set the blend mode to ‘Divide’ at 100%.


4 Here you can see the modified version where the divide blend mode calibration layer canceled out the lens vignetting and all the sensor spots. The net result was a modified image in which the added layer canceled out the sensor marks that were present in the original and removed any lens vignetting.

Divide-05a Divide-05b

5 However, it was important to fine-tune the brightness of this layer using a clipping Curves layer so that the calibration layer in Divide mode precisely canceled out the sensor marks on the layer below. Once I had got the adjustment right for this image. the same setting could be used on other subsequent photos.


6 One of the reasons I chose to include this technique was to show what the new Divide blend mode could be useful for. In all honesty, I think the easiest approach would be to use the Camera Raw Lens Corrections adjustments to take care of the vignetting and use the remove spots tool in Camera Raw to remove the dust marks and synchronize the spotting adjustments across all the other affected photos. This could certainly work well for an image like the one shown here. On the other hand, if you have a problem with a particularly dusty sensor or the dust marks fall on top of areas where it would be tricky to retouch, the flat field calibration technique might just save the day. As you can see in the close-up views shown here, I was able to do a good job of removing most of the spots. However, I was only able to partially remove the big dust mark in the top left corner. It would have been unrealistic to have expected a better result than this for such a large sensor mark.

Adobe Photoshop CS5 for Photographers (Focal Press).
ISBN: 0780240522005
This extract was taken from Adobe Photoshop CS5 for Photographers. This latest update in the Adobe Photoshop for Photographers series will contain 768 pages in full color, plus a DVD containing video tutorials. The book layout has been further improved to make navigation easier and contains updated advice on everything you need to know about using Photoshop, from digital capture to print output, as well as all that is new in Adobe Photoshop CS5.


The title will be stocked in most major bookstores throughout the world and also available to purchase from: as well as through the on-line bookstores: and

13 Responses to “Removing sensor marks in Photoshop CS5”

  1. willowsr Says:

    How long until the book is actually available? Amazon doesn’t yet project a shipping date. I’ll be making the jump from CS3 to CS5- any wisdom about making that leap?
    And lastly, will my Photokit Sharpener (an absolutely essential plug-in) play nice with CS5?
    Regards, and thanks for all your good work,

  2. ChrisCox Says:

    It’s more useful for mirror lenses, astronomy and microscopy where the vignetting isn’t nearly so uniform. And it can correct for other defects that ACR and Lens Correction can’t do yet.
    But mostly divide is a building block blend mode for calibrated imaging and compositing (and some people have come up with more creative uses already).

  3. Martin Evening Says:

    Now that Adobe have announced CS5 products, the actual release date of the program is not far off and all publishers should be allowed to start advertising their books. It usually takes a little while for Amazon and other on-line stores to get submitted books appearing on their sites, so I would suggest keep checking from time to time. All I can say is that my books are usually out within a week or two of the program release date and I don’t see this edition being any different.

    Regards Photokit products, Pixel Genius have to make sure that their products are compatible with subsequent versions of Photoshop and latest operating systems. All I can say here is to look for an announcement around the time CS5 ships.


  4. MichaelTapes Says:

    Hi Martin,

    Thanks for the tip on this obscure feature. My question is…why not use content-aware fill to get rid of sensor marks? You could store the selection(s) of where the marks are and then apply CAFill which should take care of any photo shot with the same dirty sensor. Of course the vignette would have to be handled separately.



  5. ChrisCox Says:

    CAF will completely replace what is underneath the dirt/smudge. Dividing by the white field brightens what was underneath, preserving the details.
    And are you going to CAF out vignetting or large smudges?

    While Martin showed small dirt, divide is useful for restoring any sort of darkening due to lens/sensor artifacts.

  6. MichaelTapes Says:

    Hi Chris,

    Dah! Of course CAF will not do the same. I think I got played out because of the simply blue background for the demo spots. I guess we call those a senior moment :>)

    Thanks for the correction and sorry for the bother..


  7. Martin Evening Says:

    Hi Michael,

    Content-Aware is a powerful new feature, but as Chris pointed out, doesn’t necessarily apply well for automated tasks. I have come up with some scenarios where the Content-Aware fill feature could be used to automate cleaning up an image, but the examples I have thought of so far are rather image-specific. One could make a great tutorial based around this, but it wouldn’t truthfully be that applicable to everyday retouching jobs.


  8. xiaopywsp Says:

    Thank you for sharing, this essay works for me. I hope you write more! gucci bags chanel bags

  9. Protection software Says:

    There seems to be a heap of new things in this version. Hopefully it’s not a ‘back-breaking’ stunt to master them!

    Protection software

  10. Steven Says:

    Hi Martin, could this technique also be used to eliminate lens casts, typical when using wide-angle lenses on view camera’s with medium format backs? I always take a second picture (+1 EVstop) with an opaque filter on the lens. You then have to calibrate everything in Capture One or Phocus (Hasselblad) software, but it would be nice if this was possible in PS.


  11. Martin Evening Says:

    Hi Steven,

    I am not so familiar with Capture One of Phocus, but if the raw processing software allows you to calibrate at the post-capture stage, that would be better than using Photoshop surely? By lens casts do you mean that certain lenses affect the overall white balance? I have seen this with other systems where different lenses can affect the colour. Surely, it is easy enough to use a white balance card to check the white point, or even carry out a fuller camera calibration which is really easy to do now with the Adobe DNG Profile editor.

  12. chriskohanek Says:


    Thanks for the article. I am using this technique on copystand work where I need an even paper white despite small differences in lighting and incidental sensor marks. A blank sheet of paper of the same type as the art being captured is imaged first, then the art is captured. The two images are then blended using the technique you describe. Divide is a very nice addition to the blend toolkit and I appreciate your article pointing it out.

  13. pho213 Says:

    Thank you for sharing, this essay works for me. I hope you write more!

Leave a Reply

You must be logged in to post a comment.