Python: Convert image from RGB to YDbDr color space
问题 Trying to convert image from RGB color space to YDbDr color space according to the formula: Y = 0.299R + 0.587G + 0.114B Db = -0.45R - 0.883G +1.333B Dr = -1.333R + 1.116G + 0.217B With the following code I'm trying to show only Y channel which should be grayscale image but I keep getting image all in blue color: import numpy as np from PIL import Image import cv2 import matplotlib.pyplot as plt img = cv2.imread("./pics/Slike_modela/Test/Proba/1_Color.png") new_img = [] for row in img: new