Thanks for the replies.
@fmw42: I tried that already and the result wasn't satisfcatory, apparently the bits of noise are too large.
@anthony: That worked quite well after playing with the blurring-value, thank you.
For the sake of completeness, the commands I used:
Code: Select all
for i in *.jpg; do convert $i -crop `convert $i -virtual-pixel edge -blur 0x50 -fuzz 30% -trim -format '%[fx:w-20]x%[fx:h-20]+%[fx:page.x+10]+%[fx:page.y+10]' info:` +repage crop_$i;done
and
Code: Select all
for i in *.jpg; do convert $i -crop `convert $i -virtual-pixel edge -blur 0x50 -fuzz 30% -trim -format '%wx%h%O' info:` +repage crop_$i;done
Follow-up luxury problem: As the manuscripts aren't always perfectly adjusted I have two options: cropping the manuscript too large or too small (see commands above). Is there somehow an option to make the difference between an inner and an outer crop transparent.
Example:
http://imgur.com/a/M9H9L (I'd wish to make those black pixels in the bottom right corner disappear...)