I am using this script
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
On one of the input it gave this result-
while on the other example it gave-
What could I change to get clean up the green board image I have like the whiteboard one?
You'll need to adjust the channel/level correction. Something like 50%,81%,0.1
. Also switch the -morphology to EdgeIn Octagon
. Adjusting the blur & maybe switch colorspace at the end could help.
#!/bin/bash
convert "$1" \
-morphology EdgeIn Octagon \
-negate -normalize -blur 0x2 \
-channel RGB -level 50%,81%,0.1 \
-colorspace Gray \
"$2"