マスクをかけたらエラー
2019年 01月 19日
マスクをかけようとしたところエラーが出たので確認。
79 # マスクをかける--->
80 img_dst = cv2.bitwise_and(img_src, img_msk)
81
error: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and type), nor 'array op scalar', nor 'scalar op array' in function 'cv::binary_op'
下記のように画像サイズを取得したところ、img_mskはカラー、ims_srcはグレースケールで異なっているのが問題らしい。
print(img_msk.shape)
print(img_src.shape)
print(img_src.shape)
by xpe1314
| 2019-01-19 21:24
| OpenCV