threshold must be zero in case of loading binary images