Use bwconvhull() and regionprops()
binaryImage = grayImage < 128;
joinedBlobs = bwconvhull(binaryImage, 'union');
props = regionprops(joinedBlobs, 'BoundingBox');
boundingBox = props.BoundingBox;
You'll have to get rid of that outer black box first though so that you have ONLY the letters and not some frame or boundary.
To determine angle of skew, you might look at the radon transform. Demo attached.
Best Answer