Detect color and remove that color from image
问题 I have image with kind of light purple image in background and character in dark blue. My goal is to identify text from the image. So I'm trying to remove light purple color from background so that my image will be free of noise, but I can't find the exact color code for that image as it is somewhat different everywhere, so I'm not able to mask image. Here's my code import numpy as np from PIL import Image im = Image.open('capture.png') im = im.convert('RGBA') data = np.array(im) rgb = data[: