get background samples with indices