[refs #131] Fixed bug where the painted debug image was used when doing board detection.

fixes #131