Real-time Prewitt

I’ve added the Prewitt edge detection code to my libfreenect test application. The results are interesting.

Real-time Prewitt

The image above shows (clockwise from top left): Colourised depth map, image map, prewitt edge detection, greyscale depth map.

The black borders to the left of everything in the depth map really screw the edge detection up. The glossy surface of my desk and the side of my computer react poorly, but differently, to the depth sensor.

I have to create the greyscale image to use as input to the Prewitt edge detection algorithm. I’m using a sub-optimal method of generating the greyscale image, creating it from the colourised depth map rather than from the raw depth values. There is more to converting to greyscale than I thought!

Minh suggested cleaning up the depth map using some morphological operations. I might try this next.

Leave a Reply