Gocv中是否有类似Python中的np.where()的函数?我想将一些特定的像素值指定为0,其他的指定为255。如下,在Python中我可以这样做:
img = cv2.imread("test.png", cv2.IMREAD_GRAYSCALE)
img_ = np.where(img == 144 , img*0, np.where(img == 170 , img*0, np.where(img == 178 , img*0, np.where(img == 187 , img*0, 255))))像素值 187、178、170、144 将设置为 0,其他像素值设置为 255。我如何在 Golang 中使用 Gocv 完成这项工作?
拉风的咖菲猫
阿晨1998
随时随地看视频慕课网APP
相关分类