クールな要点:whiteboardCleaner

親愛なるハブラフ人の皆さん、こんにちは。 インターネットで、1つのミニチュアで非常に興味深いBashスクリプトに出会いました。 ImageMagickの助けを借りて、彼は白いトレーニングボードの写真を驚くほど処理し、余分なものの「内容」をクリアします。

#!/bin/bash convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2 


宛先:


画像

後:


画像

使用方法:

 ./whiteboardClean.sh {name of input file} {name of file to output to} 

 ./whiteboardClean.sh example1.jpg output1.png 


また、「 Gimpを使用してホワイトボードの写真をクリーンアップする方法 」という投稿の著者は、著者にこのスクリプトを作成するように勧めました。

要点

ご清聴ありがとうございました。

UPD: dshost 同じタスクを実行するWebサービスを作成しました-http : //api.o2b.ru/whiteboardcleaner

Source: https://habr.com/ru/post/J218195/


All Articles