Compute HIstogram question
Opened this issue · 0 comments
zumpchke commented
Why couldn't you compute the bin like this?
for (auto& p : data_) {
const float threshold = float(max_val_) / float(bins);
float bin_number = float(p) / threshold;
assert(bin_number < bins);
output[bin_number]++;
}