Last active
May 25, 2017 11:55
-
-
Save twiddles/848d86136e1e6210f3d47dac9adf541d to your computer and use it in GitHub Desktop.
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
for source in SOURCES: | |
print('Processing:', source) | |
img = io.imread(source) | |
img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) | |
filename = os.path.basename(source) | |
cv2.imwrite('processed_' + filename, img) | |
# Output | |
# Processing: lena.jpg | |
# Processing: monarch.png | |
# Processing: https://github.com/opencv/opencv/raw/master/samples/data/aero3.jpg | |
# Processing: https://github.com/opencv/opencv/raw/master/samples/data/fruits.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment