code for backprojecting a histogram to detect specific image content