

For instance, using a Difference of Gaussians algo. Perform the bilateral filter in 1d along the gradient and then along the normal to the gradient.ĭetect the edges. You may want to separate the bilateral filter so that it's faster. Here are the steps:īilateral filtering to simplify/abstract the photo. I'd be happy to share some code, but the hundred-liners don't exactly fit smoothly in here. 8-way edge tracing can be really hard to bend your head around (choosing between on-pixel or between-pixel edges and how to latch onto edges). Other reading materials include Gonzalez & Woods' Digital Image Processing (seems to be an older edition) for segmentation and edge tracing.
