Advertisement
sam2708

bash

Nov 15th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.71 KB | None | 0 0
  1. #!/bin/sh                                                                                    
  2. for i in char*.jpg                                                                            
  3. do
  4. cp -f $i temp_1.jpg                                                                        
  5. vfmt if=temp_1.jpg -jpeg of=temp_2.vx
  6. #Cnverts to bilevel                                                                        
  7. binary if=temp_2.vx of=temp_3.vx
  8. # Applies Boundary                                                                        
  9. boundingbox if=temp_3.vx of=dummy.vx
  10. xl=$(awk '{print $1}' bbox.txt)                                                        
  11. yl=$(awk '{print $2}' bbox.txt)                                                              
  12. c=$(awk '{print $3}' bbox.txt)
  13. vclip if=temp_3.vx p=$xl,$yl s=$c of=temp4.vx                                                  
  14. vibbox if=temp_4.vx of=temp5.vx -xy                                                            
  15. vimag if=temp_5.vx of=temp6.vx s=20,20,1                                                          
  16. vibbox if=temp_6.vx of=t7.vx -xy
  17. append if=temp7.vx of=temp8.vx                                                            
  18. vibbox if=temp8.vx of=temp9.vx -xy
  19.  
  20. #center of mass                                                                            
  21. com if=temp9.vx of=temp10.vx
  22. vibbox if=temp10.vx of=temp11.vx -xy                                                          
  23. vclip if=temp11.vx of=temp12.vx p=14,14 s=28                                            
  24. vibbox if=temp12.vx of=temp13.vx -xy
  25. invert if=t13.vx of=temp14.vx
  26. vxport if=temp14.vx of=temp15.png -png
  27. name=$(echo "$i")
  28.  
  29. cp temp15.png $charnew{name}.png
  30. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement