hi all...
what is the best way to find out what the border thickness(es) of an image is (are) of scanned documents so i can either shave them or crop them.
and also is there a way to "deskew" and image by computing the skew angle like here (Fig.3):
http://www.leptonica.org/line-removal.html
thanks...
border thickness
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: border thickness
I don't believe that IM has a unique function to tell you how big a border is. You have to trim it and look at the virtual canvas and image size from identify to figure out how big the border was after it was trimmed.
just use convert image -fuzz XX% -trim +repage result and it will trim automatically to the min bounding box. Leave off the +repage if you want to see the size and offset from identify to figure out how big the border was before it was trimmed.
IM has a -deskew to unrotate image.
You might also want to see my scripts, unrotate, autotrim, multicrop and separate at the link below. They are unix bash scripts.
just use convert image -fuzz XX% -trim +repage result and it will trim automatically to the min bounding box. Leave off the +repage if you want to see the size and offset from identify to figure out how big the border was before it was trimmed.
IM has a -deskew to unrotate image.
You might also want to see my scripts, unrotate, autotrim, multicrop and separate at the link below. They are unix bash scripts.
Re: border thickness
thanks. appreciated...fmw42 wrote:You might also want to see my scripts, unrotate, autotrim, multicrop and separate at the link below. They are unix bash scripts.