xxxxxxxxxx
import cv2
originalImage = cv2.imread('C:/Users/N/Desktop/Test.jpg')
grayImage = cv2.cvtColor(originalImage, cv2.COLOR_BGR2GRAY)
(thresh, blackAndWhiteImage) = cv2.threshold(grayImage, 127, 255, cv2.THRESH_BINARY)
cv2.imshow('Black white image', blackAndWhiteImage)
original-->grayscale-->binary (this is not the white on black threshold)