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 numpy as np | |
import os, sys, math | |
import matplotlib.pyplot as plt | |
import cv2 | |
import copy | |
def convert_image_to_BW(image): | |
bw_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
return cv2.cvtColor(bw_img, cv2.COLOR_GRAY2BGR) |