Interface2017年05月号新画像処理101を読む

2-6 もっとも優れたコントラスト改善法のひとつ「ヒストグラム平坦化」その2

#前の方法は時間がかかるので別の方法を試す
#http://labs.eecs.tottori-u.ac.jp/sd/Member/oyamada/OpenCV/html/py_tutorials/py_imgproc/py_histograms/py_histogram_equalization/py_histogram_equalization.html

img_src = cv2.imread('data/inpu_img_2-6.bmp',0)

# create a CLAHE object (Arguments are optional).
clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8,8))
img_dst = clahe.apply(img_src)

cv2.imshow("img_src",img_src)
cv2.imshow("img_dst",img_dst)
cv2.waitKey(0)
cv2.destroyAllWindows()

f:id:bitop:20180130061531p:plain

f:id:bitop:20180131070210p:plain