Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JNIEXPORT void JNICALL
- Java_com_example_test_1open_1cv_MainActivity_imageprocessing8(
- JNIEnv*env,
- jobject instance,
- jlong addrInput,
- jlong addrResult) {
- Mat &img_input = *(Mat *) addrInput;
- Mat &img_result = *(Mat *) addrResult;
- Mat src = img_input;
- cvtColor(img_input, src, IMREAD_GRAYSCALE);
- Mat noise(src.size(), CV_32SC1);
- randn(noise, 0, 10);
- Mat dst;
- add(src, noise, dst, Mat(), CV_8U);
- img_result = dst;
- }
- E/cv::error(): OpenCV(4.1.0) Error: Sizes of input arguments do not match (The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array') in arithm_op, file /build/master_pack-android/opencv/modules/core/src/arithm.cpp, line 663
- E/libc++abi: terminating with uncaught exception of type cv::Exception: OpenCV(4.1.0) /build/master_pack-android/opencv/modules/core/src/arithm.cpp:663: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and the same number of
- channels), nor 'array op scalar', nor 'scalar op array' in function 'arithm_op'
- A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 6255 (le.test_open_cv), pid 6255 (le.test_open_cv)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement