CS143 Introduction to Computer Vision Project 2 - pb-lite: Boundary Detection

Hung-I Chuang Login:hichuang

 

Introduction

In this project, we will implement pb-lite and compare our edge detection algorithm against Canny and Sobel baselines. Our pb boundary detectors base on Canny edge detection and improve it by considering texture and brightness gradients in addition to intensity.

The output will be a per-pixel probability of boundary. Evaluation is going to compare our result with huan annotations from a subset of the Berkeley Segmentation Data Set 500 (BSDS500)

algorithm

The above figure is our pipeline of pb-lite. We first need to generate filter bank with multiple scale and orientations., and maybe different type of filter. We use filter bank to measure texture properties. I simply use a Sobel filter convolve with  Gaussian filter to approximate derivative of Gaussian filters. I also generate different scale of Laplacian of Gaussian and Gaussian filter to enrich the filter bank. Here is the result:

Brown University - Computer Science

sobel

pb-lite

canny

source

image

After filtering our image with filter bank, we then cluster them with kmeans and get a texton map for each of the image.

Now we got our clustering image for both texture and brightness, we need to know wether it is one of the repeat pattern or not at each pixel, so we need pairs of mask to determine.

Here I use 3 scales of half disk mask with 8 orientations and an extra stripe mask with 8 orientations.

We then apply each pair of mask (as you can see in the red frame) to texton map and brightness image (simply turn it to gray scale and determine how many level we want our brightness to be).

We will represent local texture distributions by building K-dimensional texton histograms over regions of interest. These histograms count how often each texton is observed. The regions of interest we will use are the half-disc masks.

We compute both texture gradients and brightness gradient by comparing the difference of the distribution of each cluster number. If they are dissimilar, the gradient will be large. We use chi-square distance to measure the gradients.

Here is the formula:

chi_sqr(g,h)=.5*sumi=1:K( (gi-hi)2 / (gi+hi) ), where g and h are histograms with the same binning scheme, and i indexes through these bins.

result we get after applying each filter in filter bank

texton map

result we get after applying each filter in filter bank

texture gradient

brightness gradient

The final step is to combine our tg and bg with Sobel baseline to improve it. The way I use is to compute the maximum value of each pixel in every tg and bg, and get the final magnitude by average the maximum tg and bg. And simply times tg+bg with the result of Sobel. Here is my result. As you can see, there is less texture edge and the real object we care about is more obvious.

Canny

pb-lite

More Result

Canny

pb-lite

Image