j0h

BCEdgeConvert.sh

j0h
Sep 7th, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.68 KB | None | 0 0
  1. #!/bin/bash
  2. :'
  3. Ok, so finding the right brighness-contrast ratio for clean edge detection
  4. is a pain in the butt, and I dont want a huge number of output files to weed through
  5. So i made this script to walk though, using eye of gnome to monitor the output as it changes
  6. If you wanted, you could create test.svg and open your image viewer before hand.
  7.  
  8. edge arg is line width drawn on edges, 2.5 here.
  9. '
  10.  
  11. #convert input.jpg -brightness-contrast 20x50 -edge 1 output.jpg
  12. out="test.svg"
  13. for i in `ls *.png`
  14.     do
  15.     for j in {10..90..10}
  16.         do
  17.         for k in {10..90..10}
  18.             do
  19.             convert $i -brightness-contrast $jx$k -edge 2.5 $out
  20.             echo $j x $k
  21.             sleep 1
  22.            
  23.             done
  24.         done
  25.     done
Add Comment
Please, Sign In to add comment