Morphological operation like erosion and dilation are very useful for for image isolation. However these types of treatments often disfigure the image that it becomes of little use for further processing. Binary operations were based on these basic functions were developed to compensate for this flaw.
Opening is where one erodes the image then dilates it using the same structuring element. What it does is is that it removes all white regions whose dimensions don't fit the structuring element. If we consider the regions with a value of zero as holes, the operator would 'open' those holes, hence the name.
Closing on the other hand is an erosion followed by a dilation using the same structuring element. It removes black regions smaller than the structuring element. It is like the closing of the holes in an image.
For this activity, we will use these operators to estimate the area of simulated cells. We will also try to isolate cancer cells inserted with the normal cells.
First we cut up the image into 12 256 x 256 pixel images. this is to reduce the burden of the program to the computer. Then we convert them into binary images as shown below.
As we can see the images formed are very noisy. This can be fixed by opening the image using a circle that is a bit smaller than the cells as a structuring element. The images produced is shown below.
We then recombine these images back into one image:
We can see that although the noise has been dealt with, many of the cells are clumped together which may cause our average to have large error. To obtain the area we use bwlabel to index each structure and hen created a program to count for each pixel in each structure. the value we obtained was 710.28 ± 522.88 pixels. As expected, the standard deviation of the area was large.
Using the average we obtained, we will try to isolate the simulated cancer cells from the image below.
Using a structuring element that is a bit larger than the radius of the original cells we obtain the image below:
As you can see, I was able to isolate the circles larger than the original cells(cancer cells). Since this was an easy activity, I give myself a 10/10
No comments:
Post a Comment