updated draw_bins function to use OpenCV2