Guest User

Untitled

a guest
Oct 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. last=''
  4. cur=''
  5. threshold=20.0
  6.  
  7. for fname in frames/*; do
  8.     last=$cur
  9.     cur=$fname
  10.    
  11.     if [[ $last == '' ]]; then
  12.     continue
  13.     fi
  14.  
  15.     diff=$(compare -metric PSNR $cur $last null 2>&1)
  16.  
  17.     if [[ $(echo "$diff < $threshold"|bc) -eq 1 ]]; then
  18.     echo "$fname changed"
  19.     fi
  20. done
Add Comment
Please, Sign In to add comment