Added debug histograms to ExtractImage.m