Created
February 22, 2019 16:27
-
-
Save rich-hart/868d8fb3120318e218e405a473606774 to your computer and use it in GitHub Desktop.
code sample for removing a bluescreen.
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 | |
image = cv2.imread('Tribble.JPG') | |
hsv_image = cv2.cvtColor(image, cv2.COLOR_RGB2HSV) | |
BLUE_RANGE_MIN_HSV = (100, 80, 70) | |
BLUE_RANGE_MAX_HSV = (185, 255, 255) | |
mask = cv2.inRange(hsv_image, BLUE_RANGE_MIN_HSV, BLUE_RANGE_MAX_HSV) | |
result = cv2.bitwise_and(image, image, mask=mask) | |
cv2.imwrite('result.png',result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment