views:

47

answers:

0

I have an image of a form, with black text and object over a white background. The form has a thin solid border. I would like to do two things:

  • Measure the dimensions of the border to determine the dimension and proportion of the form itself.
  • Detect if the border is not perfectly aligned (has some angle of offset) and possibly rotate the image to the right alignment.

I was looking into using ImageMagick to achieve this. But I'm not sure what commands to use.

I'm completely new to using ImageMagick. Any hint or starting point could help.
Also if there is some other tool that can perform similar functions in a better or easier way, please let me know about it.