generate_all_noise.sh 803 B

12345678910111213141516171819202122
  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. echo ${image}
  7. for noise in {"cauchy","gaussian","laplace","log_normal","mut_white","white","salt_pepper_A","salt_pepper_B"}; do
  8. for identical in {"0","1"}; do
  9. if [ ${identical} == "1" ]; then
  10. python noise_computation.py --noise ${noise} --image ${file} --n 1000 --identical ${identical} --output ${image}_${noise}.png --step 10 --all 1
  11. else
  12. python noise_computation.py --noise ${noise} --image ${file} --n 1000 --identical ${identical} --output ${image}_${noise}_color.png --step 10 --all 1
  13. fi
  14. done
  15. done
  16. done