Improved way that prior is calculated.  Working on grayscale images.  Results with color imagery are not good.