Uneven illumination of background

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Uneven illumination of background

rtas
Hello,

I have serial histological sections (RGB image) and there are uneven
illumination in the background of images.
Uneven illumination is mostly shown in the only one corner of the image as
yellow color.
Essentially i want to remove the uneven illumination of the images and so
later i can do color deconvolution on the background corrected images.
I have captured the image without any sample, and i call it brightfield in
here.
I divide the histological images by the brightfield and multiply the mean
of the brightfield and made a macro for this as below.
All the images are processed in RGB format, not in three separate channels.
Mostly the mean of the brightfield is around 252.

inputDir1 = getDirectory("Choose image");
outputDir = getDirectory ("Choose output");
fileList1 = getFileList(inputDir1);
for(i=0; i<fileList1.length; i++) { // repeat this process till the
filrList ends and increment by one
if (endsWith(fileList1[i], ".tif")) {
file1 = fileList1[i];
open(inputDir1 + file1);
id1= getImageID();
run("Image Sequence...", "open=[D:\\Histology_2013\\BG correction\\bright
field image\\brightfield.tif] number=1 starting=1 increment=1 scale=100
file=[] sort");//meake sure use the bright field image
id2= getImageID();
run("Select All");//measuring mean of bright field image
run("Measure");
meanvalue=getResult("Mean");
print(meanvalue);
run("Calculator Plus", "id1 id2 operation=[Divide: i2 = (i1/i2) x k1 + k2]
k1=meanvalue k2=0 create");//If i erase i1=file1 i2=[bright field image]
works the same
OutName = "corrected3_" + File.getName(file1); //resulting image is named
as "fused_filename1". Does not matter if _1 in the name because name needs
to be changed from anterior to positero in order later.
saveAs("tiff", outputDir + "/" + OutName);
close();
close();
close();
}
}

However, I can see the background of images seems bit better but still see
the uneven illumination in the background.
Is this because the mean of the brightfield is too close to white color?
I also tried the background subtraction using simply the histological
images minus brightfield using Image Calculator the but it does not remove
the uneven illumination.
How can i completely remove the uneven illumination?
Also another note, should i process images in RGB channels not in RGB?
I have tried to do the same image processing in RGB channels and later
those are composite to RGB, but the resulting image shows still the uneven
illumination.

I appreciate any suggestion.

Rui

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Uneven illumination of background

Gabriel Landini
On Monday 11 Nov 2013 03:01:25 thr rui wrote:
> I appreciate any suggestion.

That approach will, unfortunately, not work.
Images need to be corrected using the original background illumination as you
do not know what are the characteristics of the illumination source. Not only
intensity but you get a change of colour which is most likely not homogeneous
across the field.

See this:
http://imagejdocu.tudor.lu/doku.php?id=howto:working:how_to_correct_background_illumination_in_brightfield_microscopy

If you do post-hoc correction, you will end up with something that might look
better, but colour deconvolution is sensitive to this and will give you wrong
results.

Cheers
Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Uneven illumination of background

rtas
Hi,

I guess i am confused between the intensity of illumination and color of illumination.
Is the code that i posted for correcting the intensity of illumination, isn't it?

I saw some published paper used similar code that i posted previously but image was divided by the brightfield and multiply 255 instead of mean of brightfield. They said it is for correcting the background and then applied the color deconvolution. So I assumed that what i was doing for correcting background was correct despite of giving the result not what i wanted.

I tried the subtracting background on my histological sections.
Probably i should be more clear what i want to do first. I'm focused on the tissue level segmentation not cell level, so the histological images are taken not-high magnification, like 1X (see attached image).
So the rolling ball radius is difficult to apply because the radius become large and does not seem to effectively remove uneven illumination.
Also i am not interested in quantifying the data, also due to bit of variability of staining I would probably end up manually segmenting the region of interests, cartilages in blue and mineralized bone in dark blown.

Is it wrong to process the color deconvolution for uncorrected background images to just "help" segment specific stain color regions? If this is fine, I could reduce the time of manual segmentation later on.

Rui




Reply | Threaded
Open this post in threaded view
|

Re: Uneven illumination of background

Gabriel Landini
On Tuesday 12 Nov 2013 19:21:19 you wrote:
> Is it wrong to process the color deconvolution for uncorrected background
> images to just "help" segment specific stain color regions?

No it is not right. As explained here:
http://www.dentistry.bham.ac.uk/landinig/software/cdeconv/cdeconv.html
you need to correct the images.

I hope you read the link I sent last time. That explains everything you need
to do a transmittance background correction.

If you are following that method and still the images have the wrong colour,
one reason could be using a camera in auto exposure mode? That was also
explained in the link I posted.

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html