I have several Images of shape H, F, I, L.. which have curved corners. How do I process them to give sharp right-angled corners? I tried approximating them with inner rectangles, but this takes a LOT of time.. How do I proceed with it? 

This is the sample Image. I want to process it such that I get rid of rounded corneres.

![Sample Image][1]


  [1]: https://i.sstatic.net/1QeCn.jpg