some manual trial & error adjustments
This commit is contained in:
parent
fbe3fbecca
commit
60b980f4b7
@ -10,16 +10,19 @@ simplify=2
|
||||
morphology="Open:6"
|
||||
morphology_shape="Disk"
|
||||
|
||||
# Color simplification to apply (50x50% means black/white)
|
||||
random_treshold="50x50%"
|
||||
# Number of colors images are quantized to for component detection
|
||||
colors=4
|
||||
|
||||
# Treshold for connected components detection
|
||||
area_treshold=500
|
||||
# Neighbors to evaluate when detecting connected components
|
||||
connected_components=8
|
||||
|
||||
# Parameters for sigmoidal contrast adjustment for trimming
|
||||
sigmoidal_contrast_trim="35,30%"
|
||||
# Area treshold for connected components detection
|
||||
area_treshold=1000
|
||||
|
||||
# Parameters for sigmoidal contrast adjustment for result images
|
||||
# Sigmoidal contrast adjustment used when trimming
|
||||
sigmoidal_contrast_trim="30,30%"
|
||||
|
||||
# Sigmoidal contrast adjustment visible in result images
|
||||
sigmoidal_contrast="45,50%"
|
||||
|
||||
# Number of colors result images are quantized to
|
||||
@ -71,7 +74,7 @@ else
|
||||
-colorspace RGB \
|
||||
-sigmoidal-contrast "$sigmoidal_contrast_trim" \
|
||||
-resize "$resize_percent%" \
|
||||
-channel All -random-threshold "$random_treshold" \
|
||||
-colors "$colors" \
|
||||
-morphology "$morphology" "$morphology_shape" \
|
||||
"$tmp1"
|
||||
then
|
||||
@ -81,9 +84,11 @@ else
|
||||
fi
|
||||
|
||||
draw=()
|
||||
v=255
|
||||
|
||||
while read -r primitive ; do
|
||||
draw+=("-fill" "white" "-draw" "$primitive")
|
||||
draw+=("-fill" "rgb($v,$v,$v)" "-draw" "$primitive")
|
||||
v=$((v-2))
|
||||
done < <(
|
||||
convert \
|
||||
"$tmp1" \
|
||||
@ -92,7 +97,7 @@ else
|
||||
-define connected-components:sort-order=increasing \
|
||||
-define connected-components:area-threshold="$area_treshold" \
|
||||
-virtual-pixel None \
|
||||
-connected-components 8 \
|
||||
-connected-components "$connected_components" \
|
||||
-auto-level \
|
||||
"$com" | \
|
||||
perl -e '
|
||||
|
Loading…
Reference in New Issue
Block a user