機械学習用の画像の前処理方法を調べたのを書いていきます。 中途半端な内容ですが、今後書き足していくと思います。 試行環境 Windows10 python 3.6 opencv-python 4.1.2.30 閾値処理: cv.Threshold(src, threshold, maxValue, thresholdType) opencvドキュメント http://labs.eecs.tottori-u.ac.jp/sd/Member/oyamada/OpenCV/html/py_tutorials/py_imgproc/py_thresholding/py_thresholding.html 閾値を指定して二値化 適当なグラデーション画像を作って二値化してみます # make gray scale picture im_gray = np.array([np.arange(0, 256