speedup. use a smaller sample to produce the bbox