combined results of histogram and contour analysis logic added.