Yes, the settings in CorrectIllumCalc can be pretty confusing- we’re definitely working on this!
Am I correct to assume that this setting is used only as a specialized method for binary images? That is, for my grayscale images, I would not use this setting?[/quote]
Actually, this setting will not break if you use it on a grayscale image; it does what it says it does, which is dilating each object before averaging the images (which is really all ‘Regular’ is, if you don’t do any smoothing- averaging your images).
[quote]If I am using the ‘Regular’ option, then I imagine that I need to smooth out the actual cell structures in the image. Therefore should I enter the approximate cell width in pixels here?
If you want override the above width of artifacts …
I am curious how this setting differs from the one above.[/quote]
You are correct- when you enter the artifact width, that’s the same as setting the filter size. In reality, the settings are not used any differently in the code- we’re aware this is confusing and we’ve taken this into consideration in upcoming releases.
When using Regular, if you don’t smooth, all you’re doing is averaging together your images. Regular is usually a good option if you think that most of your image is foreground, and the illumination pattern in the foreground is representative (for example, if the cells at the edges always look dimmer than the ones in the middle). Averaging together your images (the ALL option) and then smoothing with a filter will generate a function that then represents this foreground illumination pattern and allows you to correct for it. Regular + EACH is a less robust, since if you didn’t do any smoothing this would be your original image! You want the illumination function to look like the actual pattern of illumination, not like the distribution of your cells. Generally with Regular, you rescale the function so it’s greater than 1, and select ‘Divide’ in the CorrectIllumApply.
When using Background, the module calculates the minimum pixel value in a block of size X (where X is what you enter under 'Enter the block size, which should be large enough…) and uses this as the illumination function (plus any smoothing). If you select ‘Each’ in this case, as you’d expect, this minimum calculation is just for one image; while ‘ALL’ cycles through your images to determine the minimum pixel value in some block size X for the whole set of images. What you end up with is the background level that you can ‘Subtract’ (in CorrectIllumApply) - so you don’t necessarily want to rescale. Background really doesn’t work if most of your image is foreground- because the minimum pixel value in any neighborhood that contains only foreground will be foreground.
These values correspond to min and max values in the illumination correction function, to let you get an idea of how severe the correction was.
To create a smoother function, try using a larger filter size, and selecting ‘All’ rather than ‘Each’. We usually recommend median filtering, though FitPolynomial will give the smoothest function. Illumination correction is definitely very tricky, so it may take some work to get a good function.