updating the sampling method
Merge github.com:abhimanu/CVPETpgm