pb-lite is a boundary detection algorithm, based on the 2011 paper by Arbelaez, Maire, Fowlkes and Malik. The problem with most traditional boundary detection algorithms is that they don't distinguish well between edges that form continuous boundaries between logical segments and edges that belong to region that forms a texture.
Algorithm
The algorithm has these basic steps:
- Group pixels into different clusters based on the orientation and intensity of edges they lie on using k-means,
- Generate brightness and texture gradients based on the chi-square distance of each pixel to the 'mean' value of its cluster,
- Multiply the result of a canny edge detection output by the gradients to distinguish the contiuous contours from 'textures'.
The first step, which results in a "texton-map", is achieved by convolving the image with a filter bank, consisting of a collection of oriented derivative of Gaussian filters:


The second step is generated by calculating the chi-square distance of each pixel to the mean value of the cluster. This is done by independently convolving pixels that belong to each cluster by a set of half-disk masks.

The final result is obtained by taking the average value of the set of results obtained by each pair of half-disk images.
Results
Here are the set of results for each of the 10 images in the given testset. The graph shows how it compared based on the two other baseline filters:

Graph generated with default parameters
1. Penguin
![]() |
![]() |
![]() |
Original | Sobel | Canny |
2. Rhinos
![]() |
![]() |
![]() |
Original | Sobel | Canny |
3. Fish
![]() |
![]() |
![]() |
Original | Sobel | Canny |
4. Bird
![]() |
![]() |
![]() |
Original | Sobel | Canny |
5. Airplane
![]() |
![]() |
![]() |
Original | Sobel | Canny |
6. Caterpillar
![]() |
![]() |
![]() |
Original | Sobel | Canny |
7. Butterfly
![]() |
![]() |
![]() |
Original | Sobel | Canny |
8. Duck
![]() |
![]() |
![]() |
Original | Sobel | Canny |
9. Gorilla
![]() |
![]() |
![]() |
Original | Sobel | Canny |
10. Hawk
![]() |
![]() |
![]() |
Original | Sobel | Canny |