Closed vikasramachandran closed 5 years ago
Please provide more info :
I have the same problem when calling cropper.crop(), as the documentation says. Please help, chamo :(
I have the same problem when calling cropper.crop(), as the documentation says. (Android)
For Imgcodecs.imread(imageUri, Imgproc.COLOR_BGR2RGB) on RNCustomCropModule.java: imageUri should be a file path instead of a base64 image.
cv::error(): OpenCV Error: Assertion failed (scn == 3 || scn == 4) in void cv::cvtColor(cv::InputArray, cv::OutputArray, int, int), file /Volumes/Linux/builds/master_pack-android/opencv/modules/imgproc/src/color.cpp, line 7943 06-10 12:11:25.198 27170 27222 E org.opencv.imgproc: imgproc::cvtColor_11() caught cv::Exception: /Volumes/Linux/builds/master_pack-android/opencv/modules/imgproc/src/color.cpp:7943: error: (-215) scn == 3 || scn == 4 in function void cv::cvtColor(cv::InputArray, cv::OutputArray, int, int) 06-10 12:11:25.199 563 6081 D audio_hw_primary: enable_snd_device: snd_device(95: vi-feedback) 06-10 12:11:25.199 563 6081 D audio_route: Apply path: vi-feedback 06-10 12:11:25.199 563 6081 D audio_hw_primary: enable_audio_route: usecase(24) apply and update mixer path: spkr-vi-record 06-10 12:11:25.199 563 6081 D audio_route: Apply path: spkr-vi-record 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: Exception in native call 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: CvException [org.opencv.core.CvException: cv::Exception: /Volumes/Linux/builds/master_pack-android/opencv/modules/imgproc/src/color.cpp:7943: error: (-215) scn == 3 || scn == 4 in function void cv::cvtColor(cv::InputArray, cv::OutputArray, int, int) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: ] 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at org.opencv.imgproc.Imgproc.cvtColor_1(Native Method) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at org.opencv.imgproc.Imgproc.cvtColor(Imgproc.java:1724) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at fr.michaelvilleneuve.customcrop.RNCustomCropModule.crop(RNCustomCropModule.java:67) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at java.lang.reflect.Method.invoke(Native Method) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at android.os.Handler.handleCallback(Handler.java:790) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at android.os.Handler.dispatchMessage(Handler.java:99) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at android.os.Looper.loop(Looper.java:164) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192) 06-10 12:11:25.204 27170 27222 E unknown:ReactNative: at java.lang.Thread.run(Thread.java:764)