Question

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- input 1 output 1

while on the other example it gave- input 2 output 2

What could I change to get clean up the green board image I have like the whiteboard one?

Was it helpful?

Solution

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"

Blackboard Imagemagick

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top