How to get angle of rotation of object

edited
raw

Here are the raw image and the image with contour, bounding box, rotated bounding box and fit line drawn on it.