Overview
- Introduction
- Thresholding
- Segmentation
- Otsu's Method
- Edge Detection
- Canny Edge
- Outlook and Conclusion
1: Thresholding and Illumination-Correction
1.1: Introduction
Your first task consists of implementing an ImageJ-Plugin capable of performing a classic thresholding operation, as well as correcting for uneven illumination within an image.
To get you started, you have been provided with an incomplete class called Task_1_Threshold
.
1.2: Thresholding
The concept of thresholding - as the name implies - is based on evaluating an image pixel by pixel and checking each time, whether it falls above or below a given threshold-value. If the pixel value in question is above the specified value, it will be set to white. If not it will be set to black.
To do:
-
Create a new method:
public ByteProcessor threshold ( ImageProcessor ip , int threshold ){}
-
Create a new
ByteProcessor
to store your result -
Iterate over the entire input image and check the threshold-condition for each pixel
-
Set each pixel in the output - ByteProcessor according to your evaluation
-
Return your result
Do not use inbuilt methods provided by ImageJ to perform the thresholding operation
1.3: Illumination-Correction
For cases where the illumination of the image is uneven, you will now add the functionality to perform Illumination-Correction.
To do:
-
Create a new method:
public ByteProcessor correctIllumination ( ImageProcessor ip ){}
-
Convert the input image to a
FloatProcessor
(make sure, that the original image remains unchanged) -
Apply a
Gaussian Filter
to the newly created image ($\sigma$ = 75) by using theblurGaussian()
-function provided by ImageJ. -
Divide the original image by the filtered image (result should also be a
FloatProcessor
) -
Convert your result to a
ByteProcessor
and return it
The division of two images can simply be performed by iterating over them and performing it "pixelwise".
There is however a method provided by ImageJ, which allows you to move (copy) the entire image-data of one image to another, while applying a simple operation (such as division) to every pixel of both images in one go. Check the ImageJ-API in case you want to use this method.
To allow you to test your results, the run
-method already contains code for a simple user interface, which gives you the option to select a value for your threshold, as well as let you choose whether or not you want to correct the illumination before thresholding. This code has been commented out to avoid causing errors by calling methods you had not implemented yet.
It pays to have a look at this code now, as you will eventually be creating a few dialogues of your own in later tasks.
Consider using the "Cells" image to try out your code, since it will be the image you will be working with for the rest of your project.
1.4: Project Introduction
To begin the written section of your Final Project, you will first need to come up with an introduction. This introduction should:
- Capture the readers interest with a short motivation of the project
- Summarize and contextualize the approach to other research methods
- Position your approach with respect to other approaches
- Define the research problem and problem statement
- Give an overview of the paper's structure
1.5: Project-Report
The part of your report concerning Task_1 should contain the following:
- A brief description of the methods you implemented
- Provide a mathematically sound formulation of the thresholding operation
- A short discussion on why it may be necessary to correct the illumination in microscopy-images
- Images you generated with your code, that showcase what you described
- Create a figure that shows a few examples of the image before and after thresholding. What does
correctIllumination
do?