Added bounding box function for character segmentation