Monday, July 11, 2011

Tweaking Performance: Auto-contrast and Regions of Interest

To tweak the performance of the classifier, I have added two pre-processing steps to the feature extraction.

The first is auto-contrast, which is a means of "stretching" the histogram so that the last filled bin is now at location 255. We do this on each channel, here are some images before and after auto-contrast:

 
 
 
 
 
 

This process of auto-contrast helps to produce a better binary image for masking purposes.

Since the wings were producing inconsistent colors, the second pre-processing step I have added is to use a region of interest to extract the histograms. For this I chose a rectangular box located approximately around the center of the wasp. Histograms are extracted from this region, so not only is it more descriptive of the wasp class, but it is also more efficient to calculate (less pixels to iterate over).

Here are some images showing the ROI (Region of Interest). Also note that background pixels are not included in the histogram calculation as the binary image masks them out.
 

 

Results Analysis:
At first I considered making the rectangle a square so wasp orientation would not affect the feature space. When I did that the performance increased only about 2%, but since then I have removed the vertically oriented wasps to simplify the problem for now. The performance increased by about 5% on the nearest neighbor classifier after making these adjustments (may be due to the changing of the image set).











No comments:

Post a Comment