CS1430 Project 2: Pb-Lite: Boundary Detection

Bryan Tyler Parker

Overview

In this project, we developed a simplified version of pb, which stands for probability of boundary. This finds boundaries by examining brightness, color, and texture information across multiple scales. Our goal was to implement this algorithm with the intent of having it beat the baseline sobel and canny filter algorithms for edge detection.

Algorithm

For extra credit, I split the image into rgb channels, and ran the canny filter on each of them, to be used by pblite calculation later.

For the filter bank, I convolved a sobel filter with a gaussian filter, essentially taking its derivative.

For extra credit, I took the second derivative, took the laplacian, and used the base of the gaussian filter. Each one of these filters were rotatd and stored with different orientations and scales.



For masks (and extra credit masks) I used the same code that generated the filters, but thresholded them to a black and white image.



For the texton image, I applied each filter in the filter bank to the input image, and stored them as a 3D image ([x,y] being a filter response image, and z being the filter index). Then each filter response was stored as a vector in a 2D matrix pixel_values, which was passed to the kmeansML function. The returned membership parameter was reshaped into the resulting tmap image.

The get_gradient method followed the exact format described in the handout, convolving a left and right mask with each 'bin' of the texton image (each id number was seperated out from that image as its own image), and calculating the chi-squared distance.

Finally, I got the gradient for the textures and the brightness, and multipled the sum of these by the sum of the canny filters for the red,green, and blue channels.

pb=(canny_r+canny_b+canny_g).*(tg_mean+bg_mean);

Results


Result Graph
Orange is without extra credit, white is with additional textures and masks,
light blue is with RGB channel canny filtering.

As one can see, adding additional textures gave a great boost in edge detecting, but canny filtering the seperate RGB channels did not make much a difference. All of the are, however, better than the baseline.