How to Detect Orientation of a Detected Barcode

Contents
[ ]
todo:image_alt_text
Figure: A rotated barcode
The barcode (rotated 270 degrees) recognized after executing the code that follows is shown in the figure below:
todo:image_alt_text
Figure: The detected orientation is 270 degree after example code execution