単純なアルゴリズムは、OpenCVのPythonでグレースケールにRGB画像を変換します!
コメントを使用していますので、コードはわかりやすいですが素早く動作します。
import cv2
import numpy as np
img1 = cv2.imread('opencvlogo.png')
row,col,ch = img1.shape
g = [ ] #the list in which we will stuff single grayscale pixel value inplace of 3 RBG values
#this function converts each RGB pixel value into single Grayscale pixel value and appends that value to list 'g'
def rgb2gray(Img):
global g
row,col,CHANNEL = Img.shape
for i in range(row) :
for j in range(col):
a = ( Img[i,j,0]*0.07 + Img[i,j,1]*0.72 + Img[i,j,2] *0.21 ) #the algorithm i used id , G = B*0.07 + G*0.72 + R* 0.21
#I found it online
g.append(a)
rgb2gray(img1) #convert the img1 into grayscale
gr = np.array(g) #convert the list 'g' containing grayscale pixel values into numpy array
cv2.imwrite("test1.png" , gr.reshape(row,col)) #save the image file as test1.jpg
SO
私は、このイメージファイルを使用... 
グレースケールファイル次生成
私のプログラム..
"Y平面" についてハロルドのポイントへ

[wikipedia:Grayscale](https://en.wikipedia.org/wiki/Grayscale)を見たことがありますか? – MrSmith42
本当にそうですか? Y平面をデコードし、色係数を無視するとどうなるでしょうか?さまざまなノイズがあり、その要因は異なる場合があります。 – harold
申し訳ありませんが、私はあなたの投稿を理解していません – TheUnexpected