This is a common problem in imaging analysis and CellProfiler can help. You will need to experiment with the “background” or “regular” method–for deciding which is best, please refer to the CorrectIllumination_Calculate help.Depending on your images, if your illumination is consistent among all of your images, you can calculate the illumination function using “All”; this will use all of your images in your group to create the illumination function, rather than on a per image basis. If you have a small number of images, or if your objects in the images are not evenly dispersed, you may want to consider using the “each” method. The block size should be large enough to cover one object and include pixels of background. The smoothing can be used to create a smoother illumination function. I would experiment with “Automatic” and “median filtering” first.
If you are using the “all” method, be sure to add a SaveImages module to save the Illumination Correction Function as a .mat file. (A typical “All” Illum Correction pipeline would have Load Images, Illumination Correction_Calculate, and Save Images for each channel you are measuring.) For the “each” method, you can use “CorrectIllumination_Calculate” and “CorrectIllumination_Apply” in the same pipeline.
To address the batch method in your posting, add the CreateBatchFiles to the end of your pipeline.