我有这个代码:
bPlane = myImage[:,:,0] - 0.5*(myImage[:,:,2]) - 0.5*(myImage[:,:,1]);
purple = bPlane > 20
purple2 = morphology.remove_small_objects(BW_2, 400);
其中 myImage 是 BGR。
如何在 Python 3.6 中将“ purple2 ”转换为灰度图像?
我有这个代码:
bPlane = myImage[:,:,0] - 0.5*(myImage[:,:,2]) - 0.5*(myImage[:,:,1]);
purple = bPlane > 20
purple2 = morphology.remove_small_objects(BW_2, 400);
其中 myImage 是 BGR。
如何在 Python 3.6 中将“ purple2 ”转换为灰度图像?