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