pb-Lite

by Maggie Pace

This webpage displays some of my results for the Brown University CS 1430: Introduction to Computer Vision pb-lite:BoundaryDetectionHumans have a very complex and elegant visual system, so for us, detecting boundaries generally presents no problem at all. However, the same is not true for computer image interpretation. Boundary detection presents a difficult problem in computer vision.

In this project, I took advantage of a Canny edge detector which analyzes differences in intensities of images and combined this baseline method with feature information from brightness and texture gradients. Pb-lite generates a per-pixel probability of boundary.

My pb-Lite compared to baseline canny and sobel edge detections

The Algorithm

In order to implement this, I first generated a bank of derivative of gaussian filters of varying sigma and size. I needed the filters in order to generate a texton map. The filters were applied to the grayscale version of the image and their responses were stored, reshaped, permuted and clustered using Kmeans in order to separate pixels into different textons.

After this, I computed the texture gradient. The process for computing texture and brightness gradients is exactly the same with varying inputs. I created a bank of half-disks of varying size and orientation and storing them in a 3D (#radii x #orientations x 2) matrix. I computed the gradient by analyzing the differences in responses between opposing half-discs within each bin (different textons, in texture gradient's case) for each pixel. Each half-disk was stored adjacent to it's 180 degree rotated opposite twin (which is the reason that I had a 3D matrix of depth 2 instead of a 2D matrix). When responses for each bin value amongst a pixel's neighbors were vastly different (as calculated by a chi-squared value of the difference between opposing half-disks), that pixel was more likely to be a part of an edge.

I measured this by creating a 3D binary matrix (row x col x bins) that showed what pixels fit into each bin. Then, by convolving 2 corresponding half-disks on these matrices, calculating the chi squared difference, and storing these values in another 3D matrix (row x col x #filters). When the chi squared difference was high, it meant that that particular texture on either side of the pixel at that orientation varied greatly, and thus the pixel was more likely to be part of an edge. I took the arithmatic mean of the vector of chi squared values corresponding to each pixel and this value represented the likilood that that pixel was an edge.

For the brightness gradient, I did almost exactly the same thing as with texture gradient - in fact, I used the same function in matlab, just with different values passed in as parameters. Instead of having a 1:1 ratio of brightness value to bin, I grouped multiple brightness values into the same bin. Whereas textons with adjacent values may have almost nothing in common, adjacent brightness values say that pixels are almost the same and this needs to be reflected in the algorithm though more flexible bins.

Once I had these values for gradients concentrated into 2 2D matrices, I could sum these two gradients and multiply them with the original canny values in order to produce an enhanced canny edge detection image. The results are seen below. You can see how the pb weighs in textures and thus has fewer and misleading texture artifact lines

The standard image hybrids assigned in class:

Original Canny my pb