I am developing an image processing algorithm / plugin for Fiji (ImageJ) that processes scanned microscope slide images (20x magnification) and extracts features from the slides.
The slides contain histological tumor sections that are stained immunohistochemically with an antibody that identifies nuclei positive with the Ki-67 protein, along with a counter-stain that identifies all nuclei. The so called proliferation index, which measures how fast the cells are dividing, is then calculated as the ratio of positive-to-negative nuclei. For the feature extraction, I basically need to extract two color components from the RGB image; the one corresponding to the positive nuclei (diaminobenzidine; brown color) and the other corresponding the negative cells (methyl green; light green color).
I am using Fiji's Color Deconvolution plugin (http://www.mecourse.com/landinig/software/cdeconv/cdeconv.html) for separating the two stains. This works remarkably well, except when the slide has been drawn onto with a marker pen. Pathologists sometimes mark regions of interest on the slide with a marker pen so that it would be easier to inspect the slide later on. My data set contains slides that have been drawn onto with a red/blue/green or a black marker. The problem is that the presence of colors other than the two stains fails the color deconvolution algorithm totally.
Above is an example of a slide at 20x magnification showing the edge of a line drawn with a black marker pen on the top-half of the image. The lower part of the image shows the brown positive nuclei and the light green negative nuclei.
Is there any chance for filtering out these marker pen artifacts? The effect is similar to looking through a welder's mask, and I'd wan't to somehow subtract the mask from the image. If I can't filter out the marker, I'll probably just need to manually crop out the portions having these artifacts.
Edit:
I've given high-pass filtering a try as suggested by Aaron. I used ImageJ's High-pass filter plugin, which creates a Gaussian blurred image from the source and then subtracts this blurred image from the original. The image is here (the radius / blur length or standard deviation of the Gaussian used was 20 pixels):
The artifact is almost gone and the nuclei are still recognizable, which is nice. The yellowish background color in the original (due to a calibration problem with the scanner) is also gone.
However, I'd also like to understand how this works. :) What does the Gaussian do to the RGB values of each pixel? How should I select the pixel radius for the Gaussian? Wikipedia's Gaussian Blur article wasn't all that clear to me. Are there other ways for implementing a high-pass filter for image data?