make sure effective number of pixels > 0