How to change all the black pixels to white (OpenCV)?
Subtract 255 from each Pixel and get the positive values only
For grayscale and black and white images
sub_array = 255*np.ones(28, dtype = int)
img_Invert = np.abs(np.subtract(img,sub_array))
I am new to OpenCV and I do not understand how to traverse and change all the pixels of black with colour code exact RGB(0,0,0) to white colour RGB(255,255,255).
Is there any function or way to check all the pixel and if RGB(0,0,0) the make it to RGB(255,255,255).