Androidでビットごとのxorを試しましたが、次のエラーが発生します:
04-11 00:25:47.404: E/cv::error()(7370): OpenCV Error: 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 void cv::binary_op(cv::InputArray, cv::InputArray, cv::OutputArray, cv::InputArray, void (* const*)(const uchar*, size_t, const uchar*, size_t, uchar*, size_t, cv::Size, void*), bool), file /home/reports/ci/slave/50-SDK/opencv/modules/core/src/arithm.cpp, line 1021
これが私のコードです:
Mat temp1 = mRgba.submat(roi);
Mat temp2 = Mat.zeros(temp1.size(), CvType.CV_8UC1);
Core.bitwise_xor(temp1, temp2, temp1);
また、次の方法で temp1 と temp2 をインスタンス化しようとしました。
Mat temp1 = new Mat(height, width, CvType.CV_8UC1);
Mat temp2 = new Mat(height, width, CvType.CV_8UC1);
しかし、それでも同じエラー..