实际上,我在我的所有图片中检索到黑色像素的坐标,如下所示:
frame = np.array(img)
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
xcoords, ycoords = np.where((frame[:, :, 0:3] == [0, 0, 0]).all(2))
但是我想在我的图片的某个特定区域中检索所有黑色像素。但这个区域是这样的:
https://i.stack.imgur.com/YOZZP.png
你能帮我吗
Tags:
目前没有回答
相关问题 更多 >
编程相关推荐