How to use FindHomography (parameters) in opencv android studio?

asked 2020-05-26 00:47:18 -0600

Vasu gravatar image

updated 2020-05-26 01:17:05 -0600

berak gravatar image

Hi folks, I am getting this error while using FindHomography in opencv android studio environment. The error in below,

E/cv::error(): OpenCV(3.4.10) Error: Bad argument (The input arrays should be 2D or 3D point sets) in cv::Mat cv::findHomography(cv::InputArray, cv::InputArray, int, double, cv::OutputArray, int, double), file /build/3_4_pack-android/opencv/modules/calib3d/src/fundam.cpp, line 372
E/org.opencv.calib3d: calib3d::findHomography_13() caught cv::Exception: OpenCV(3.4.10) /build/3_4_pack-android/opencv/modules/calib3d/src/fundam.cpp:372: error: (-5:Bad argument) The input arrays should be 2D or 3D point sets in function 'cv::Mat cv::findHomography(cv::InputArray, cv::InputArray, int, double, cv::OutputArray, int, double)'
E/AndroidRuntime: FATAL EXCEPTION: Thread-3
    Process: com.example.opencvrecognition, PID: 17738
    CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.10) /build/3_4_pack-android/opencv/modules/calib3d/src/fundam.cpp:372: error: (-5:Bad argument) The input arrays should be 2D or 3D point sets in function 'cv::Mat cv::findHomography(cv::InputArray, cv::InputArray, int, double, cv::OutputArray, int, double)'
    ]
        at org.opencv.calib3d.Calib3d.findHomography_3(Native Method)
        at org.opencv.calib3d.Calib3d.findHomography(Calib3d.java:1917)
        at com.example.opencvrecognition.MainActivity.recognize(MainActivity.java:170)
        at com.example.opencvrecognition.MainActivity.onCameraFrame(MainActivity.java:209)
        at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392)
        at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:390)
        at java.lang.Thread.run(Thread.java:764)

Can you please suggest to sort out the issues.

edit retag flag offensive close merge delete

Comments

1

please show code, how you call it

berak gravatar imageberak ( 2020-05-26 01:17:37 -0600 )edit

Here is link Bad Arguement

supra56 gravatar imagesupra56 ( 2020-05-26 05:27:12 -0600 )edit