2017-03-06から1日間の記事一覧

python+opencv2で2値化

https://stackoverflow.com/questions/7624765/converting-an-opencv-image-to-black-and-white import cv2 im_gray = cv2.imread('grayscale_image.png', cv2.CV_LOAD_IMAGE_GRAYSCALE) (thresh, im_bw) = cv2.threshold(im_gray, 128, 255, cv2.THRESH_BIN…