Subtracting background as OD after calibration

I’m analyzing 16-bit TIFF files acquired by transmittance mode scanning (B/W) of western blots on PVDF, visualized with chromogenic HRP substrate (Opti-4CN), which gives dark grey bands on a white background.

After opening the image file in ImageJ, I calibrate using measurements from a neutral density step tablet (OD 0.05 - 2.8; the Epson V550 scanner is linear over this range) to convert the grayscale values to OD values. From Plot Profile analyses along the length of a typical lane, the background OD is ~1.4 and the peak ODs range up to ~2.2. Thus, the band ODs range up to 0.8 OD above background.

When I use the Subtract Background with rolling ball radius set ~50 pixels the background is removed very nicely, with the baseline OD near zero. However, the peak ODs range up only to ~0.12, about 15% of the actual value. Larger rolling ball radii give similar results, smaller radii decrease the peak heights.

My guess is that Subtract Background operates on the grayscale file, even after calibration to OD, and the difference in grayscale between baseline and peak is then converted to OD using the calibration equation.

Can anyone suggest a way to subtract background as OD values from the peaks as OD values?

Dear @richk,

could you provide an example image? That would make things a little easier.

That said, you should be careful with your approach. Subtract Background is a local operation, that does not necessarily mix well with a global calibration. You’ll have to re-calibrate after the background subtraction with 0 mapped to background OD and the old peak OD mapped to the new peak OD.



Hi, Stefan (@stelfrich)

Thanks for helping a first time poster!

I’m having trouble with the uploader (says can’t find the size of my files), so I’ll try attaching them to an email.

Your point on local use of Subtract Background is good- I apply it to just one image. I’ve found that conventional rolling ball sizes (25-50 pixels) grossly attenuate peak amplitudes, so I use 1000 pixels.

I did find what may be a workaround to the initial problem:

  1. Load the calibrated and cropped tiff image of the blot.
  2. Image > Transform > Image to Results
  3. Close just the image window
  4. Image > Transform > Results to Image
  5. Process > Subtract Background; 1000 pixels
    This gives a 32 bit file that has the expected delta OD amplitudes for the peaks, but I may be introducing unsuspected artifacts.


Let me try uploading the example tif files again. Same error trying to upload tif files saved by ImageJ or Fiji. Screen grabs uploaded ok. Any ideas on how to upload the tif files?


Should have asked that earlier: do you have uneven illumination in your image or is the background a constant (approximately) offset? Depending on your image size, Subtract background with a 1000px radius is somewhat equivalent to removing a constant offset.

Can you open the TIFFs in ImageJ and re-save them as TIFF (File > Save As > TIFF)? If that doesn’t work, maybe you have a file sharing service at your institution or you could use Dropbox (et al) and post a link to it.


1 Like

The example files are in a dropbox folder. The link is:

The background OD gradually increases towards the masked edges of the image. Subtract Background (1000px) seems to flatten this nicely.

The values are correct (at least from my judgement) when you convert your calibrated input image (TestImageRichkCalCrop.tif) to 32-bit (Image > Type > 32-bit) before doing the background subtraction. This basically generates an image where the pixel intensities are the calibrated values. This way you can’t go back to the grey values, however. Will that work for you, @richk?

Thanks for checking, Stefan. The conversion to 32-bit was actually indirect (Transform > Image-to-Result; close image window; Transform > Result-to-Image). The loss of greyscale info was the goal, as it forces Subtract Background to work with the OD values. Rich

Yes, I had completely ignored that. Sorry for my ignorance! :expressionless: But great that you have found a solution! Could you mark your post (or mine) as the solution?