Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
convert in.jpg -negate \( +clone -blur 0x20 \) -compose Divide_Src -composite -normalize -level 10%,90% -unsharp 0x5+2+0 out.jpg
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
convert in.jpg \( +clone -blur 0x20 \) -compose Divide_Src -composite -normalize -level 10%,90% -deskew 40% -unsharp 0x5+2+0 out.jpg
-deskew 40% — по вкусу, чтобы компенсировать вращение камеры.on open thefiles
repeat with thefile in thefiles
set finalpath to POSIX path of thefile
do shell script "mktemp -t image"
set temppath to the result
set success to false
try
do shell script "/usr/local/bin/convert '" & finalpath & "' -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 '" & temppath & "'"
set success to true
on error theerror
display dialog "Conversion failed: " & theerror
end try
if success then
do shell script "mv '" & temppath & "' '" & finalpath & "'"
display notification "Converted " & finalpath
end if
end repeat
end open


Все консольные программы хороши только тем что на них можно орабатывать изображения без интерфейса.
В любом случае, подобрать параметры, играть с тестовым изображением лучше в графическом редакторе


{
"data": {
"updated_date": null,
"delete_date": "2014-04-08T00:00:00",
"url_get": "/file/QyY5stciWdVREegoe1iGWYsWnFsHHRtO",
"url_delete": "/file.delete/6SOxiitH1r4bYDkVaeepd7SPjlhu5rTi",
"created_date": "2014-04-06T14:30:26.400509",
"deleted_date": null,
"size": 54885,
"type": "image/jpeg",
"id": 43,
"name": "t6nZck7NQR0.jpg"
},
"success": true
}
Один крутой Gist: whiteboardCleaner