Convert histogram to zero-based indices.