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="Open:6"
|
||||||
morphology_shape="Disk"
|
morphology_shape="Disk"
|
||||||
|
|
||||||
# Number of colors images are quantized to for component detection
|
# Color simplification to apply (50x50% means black/white)
|
||||||
colors=4
|
random_treshold="50x50%"
|
||||||
|
|
||||||
# Neighbors to evaluate when detecting connected components
|
# Treshold for connected components detection
|
||||||
connected_components=8
|
area_treshold=500
|
||||||
|
|
||||||
# Area treshold for connected components detection
|
# Parameters for sigmoidal contrast adjustment for trimming
|
||||||
area_treshold=1000
|
sigmoidal_contrast_trim="35,30%"
|
||||||
|
|
||||||
# Sigmoidal contrast adjustment used when trimming
|
# Parameters for sigmoidal contrast adjustment for result images
|
||||||
sigmoidal_contrast_trim="30,30%"
|
|
||||||
|
|
||||||
# Sigmoidal contrast adjustment visible in result images
|
|
||||||
sigmoidal_contrast="45,50%"
|
sigmoidal_contrast="45,50%"
|
||||||
|
|
||||||
# Number of colors result images are quantized to
|
# Number of colors result images are quantized to
|
||||||
@ -74,7 +71,7 @@ else
|
|||||||
-colorspace RGB \
|
-colorspace RGB \
|
||||||
-sigmoidal-contrast "$sigmoidal_contrast_trim" \
|
-sigmoidal-contrast "$sigmoidal_contrast_trim" \
|
||||||
-resize "$resize_percent%" \
|
-resize "$resize_percent%" \
|
||||||
-colors "$colors" \
|
-channel All -random-threshold "$random_treshold" \
|
||||||
-morphology "$morphology" "$morphology_shape" \
|
-morphology "$morphology" "$morphology_shape" \
|
||||||
"$tmp1"
|
"$tmp1"
|
||||||
then
|
then
|
||||||
@ -84,11 +81,9 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
draw=()
|
draw=()
|
||||||
v=255
|
|
||||||
|
|
||||||
while read -r primitive ; do
|
while read -r primitive ; do
|
||||||
draw+=("-fill" "rgb($v,$v,$v)" "-draw" "$primitive")
|
draw+=("-fill" "white" "-draw" "$primitive")
|
||||||
v=$((v-2))
|
|
||||||
done < <(
|
done < <(
|
||||||
convert \
|
convert \
|
||||||
"$tmp1" \
|
"$tmp1" \
|
||||||
@ -97,7 +92,7 @@ else
|
|||||||
-define connected-components:sort-order=increasing \
|
-define connected-components:sort-order=increasing \
|
||||||
-define connected-components:area-threshold="$area_treshold" \
|
-define connected-components:area-threshold="$area_treshold" \
|
||||||
-virtual-pixel None \
|
-virtual-pixel None \
|
||||||
-connected-components "$connected_components" \
|
-connected-components 8 \
|
||||||
-auto-level \
|
-auto-level \
|
||||||
"$com" | \
|
"$com" | \
|
||||||
perl -e '
|
perl -e '
|
||||||
|
@ -11,7 +11,7 @@ paper="a4paper"
|
|||||||
offset="1cm 3cm"
|
offset="1cm 3cm"
|
||||||
|
|
||||||
# Factor to scale image by before placing in page
|
# Factor to scale image by before placing in page
|
||||||
scale=0.75
|
scale=1
|
||||||
|
|
||||||
# Filename of complete result PDF
|
# Filename of complete result PDF
|
||||||
result="pdf/result.pdf"
|
result="pdf/result.pdf"
|
||||||
|
Loading…
Reference in New Issue
Block a user