Segmentation

Segmentation Methods

After the images had been interpolated, it was necessary to extract the nodule present in the image. The process of segmentation can be achieved in many ways, but the method used in this case needed to be able to pick a nodule out of various other articles in the image, as well as get rid of unwanted noise. To achieve this goal, a few steps were used:

Thresholding

Thresholding the images once they were interpolated was necessary for two main reasons. First, proper thresholding eliminated the noise and regions of non-interest, leaving behind the nodules. Initially, a simple threshold parameter was used, to allow experimentation with different thresholds. Soon, however, it became apparent that a more general approach was required. Many methods exist for automatic thresholding, including histogram peak detection, region growing, etc. We chose to go with an iterative thresholding algorithm that computes a threshold, then adaptively adjusts that threshold based on the average value of pixels that fall below and above the threshold. It incrementally approaches the ”true” threshold, as judged by this criteria, and finishes when it has reached a steady state threshold value. The basic idea is explained in detail in Sonka and Hlavac. This thresholding method ended up working very well for lung nodules. This makes sense because lung CT scans tend to have a sharp contrast between nodules and lung background. The nodules usually have a distinct pixel range, which allows easy segmentation. The second reason why thresholding was necessary is because our next step in the process of isolating lung nodules was morphological filtering. This filtering required binary images to work, and the adaptively thresholded image segmentation algorithm we used provided exactly that.

Filtering

Once the lung nodule had been converted to a thresholded binary image, it was necessary to get rid of leftover articles and noise. Morphological filtering was employed because of the properties such filtering has. Our goal was to take the binary lung image and remove any blood vessels, and small irregularities that were not part of the nodule in question. On a high level, the process of morphological opening, which is erosion followed by dilation, takes a kernel and removes any part of an object that the kernel does not fit into. Thus, if we could find a kernel that was larger than any vessels and artifacts in the image, but smaller than the actual nodule, our filtering would be successful. Since there is no ideal kernel in all circumstances, we had to leave the kernel size as something that could be passed to our program as a parameter. As we progressed with the project, we experimented with many different values for the kernel, and slowly built up intuition as to what worked best in each case. In all cases, we made our kernel spherical. Only the kernel size was changed from trial to trial.

Volume Calculation

The final part of our project was to calculate the volume of the interpolated, segmented, and filtered lung nodule. The volume was a metric by which we could judge the accuracy of our process, as well as a useful ”quick statistic” that in a larger scope could be relevant to a radiologist. Specifically for us, we used the volume program we wrote to calculate the volume of the input nodules after running our process on the input. We then ran the volume program on the same nodule images that had been interpreted by ”experts”. This gave us a best effort metric to compare our implementation with.

Visualization of Morphological Filtering Operations:

The erosion of the dark-blue square by a disk, resulting in the light-blue square.

The dilation of the dark-blue square by a disk, resulting in the light-blue square with rounded corners.

The opening of the dark-blue square by a disk, resulting in the light-blue square with round corners.