Created
June 11, 2019 20:34
-
-
Save pierric/6d99e7e5739d16b567d1df2880caf987 to your computer and use it in GitHub Desktop.
Replace all the black pixel to green.
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
arr = cv2.imread('img', -1) | |
arr[numpy.where((arr == [0,0,0]).all(axis=2))] = [0, 255, 0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment