1 | initial version |
Take the formula: Y = 0.299R + 0.587G + 0.114*B , where R,G,B denote the red, green and blue channels, respectively (note: opencv loads images in BGR).
Btw: You shouldn't use the old cv-python mats, but just stick to your numpy-arrays. Each function of cv2.* take these numpy-arrays instead of mats as input!
2 | No.2 Revision |
Take the formula: Y =
0.299R 0.299*R + 0.587G 0.587*G + 0.114*B 0.114*B , where R,G,B denote the red, green and blue channels, respectively (note: opencv loads images in BGR).
Btw: You shouldn't use the old cv-python mats, but just stick to your numpy-arrays. Each function of cv2.* take these numpy-arrays instead of mats as input!
3 | No.3 Revision |
Take the formula: Y = 0.299*R + 0.587*G + 0.114*B
, where R,G,B denote the red, green and blue channels, respectively (note: opencv loads images in BGR).
Btw: You shouldn't use the old cv-python mats, but just stick to your numpy-arrays. Each function of cv2.* take takes these numpy-arrays instead of mats as input!