Created
July 2, 2014 13:27
-
-
Save non117/353a054f1e7671079ed6 to your computer and use it in GitHub Desktop.
zoizoi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
def main(): | |
f = 'hoge.png' | |
im = cv2.imread(f) | |
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
hist = cv2.calcHist([im_gray],[0],None,[256],[0,256]) | |
cv2.normalize(hist, hist, 0, 255, cv2.NORM_MINMAX) | |
im_out = cv2.equalizeHist(im_gray, hist) | |
cv2.imwrite('poe.png', im_out) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment