Questions

  1. Apply a thresholding operation using cv2.threshold() with a threshold value of 100 and using the cv2.THRESH_BINARY thresholding type.
  2. Apply an adaptive thresholding operation using cv2.adapativeThreshold() ,cv2.ADAPTIVE_THRESH_MEAN_C, C=2 and blockSize=9.
  3. Apply Otsu's thresholding using the cv2.THRESH_BINARY thresholding type.
  4. Apply triangle thresholding using the cv2.THRESH_BINARY thresholding type.
  5. Apply Otsu's thresholding using scikit-image.
  6. Apply triangle thresholding using scikit-image.
  7. Apply Niblack's thresholding using scikit-image.
  8. Apply Sauvola's thresholding using scikit-image and a window size of 25.
  9. Modify the thresholding_example.py script in order to make use of np.arange(), with the purpose of defining the threshold values to apply to the cv2.threshold() function. Afterwards, call the cv2.threshold() function with the defined threshold values and store all the thresholded images in an array. Finally, show all the images in the array calling show_img_with_matplotlib() for each one. Rename the script to thresholding_example_arange.py.