Fixed to add image cropping. Added flag for whitening.