generate_all_noise.sh 773 B

1234567891011121314151617181920212223
  1. for file in "images"/*; do
  2. IFS='/' # space is set as delimiter
  3. read -ra ADDR <<< "$file" # str is read into an array as tokens separated by IFS
  4. IFS=' '
  5. image=${ADDR[1]%".png"}
  6. for noise in {"cauchy","gaussian","laplace","log_normal","mut_white","white","salt_pepper"}; do
  7. for identical in {"0","1"}; do
  8. if [ ${identical} == "1" ]; then
  9. python noise_computation.py --noise ${noise} --image ${file} --n 1000 --identical ${identical} --output ${image}_${noise}.png --step 10 --all 1 &
  10. else
  11. python noise_computation.py --noise ${noise} --image ${file} --n 1000 --identical ${identical} --output ${image}_${noise}_color.png --step 10 --all 1 &
  12. fi
  13. done
  14. done
  15. done