For this code
Mat hg = Calib3d.findHomography(obj, scene, 8, 10);
Mat obj_corners = new Mat(4,1,CvType.CV_32FC1);
Mat scene_corners = new Mat(4,1,CvType.CV_32FC1);
Core.perspectiveTransform(obj_corners, scene_corners, hg);
This is the error, also tried changing the type to CV_8UC1, CV_32F and CV_32FC1
08-06 05:37:35.219: E/cv::error()(17414): OpenCV Error: Assertion failed (scn + 1 == m.cols && (depth == CV_32F || depth == CV_64F)) in void cv::perspectiveTransform(cv::InputArray, cv::OutputArray, cv::InputArray), file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/core/src/matmul.cpp, line 1926
08-06 05:37:35.229: W/dalvikvm(17414): threadid=11: thread exiting with uncaught exception (group=0x40ad59f0)
08-06 05:37:35.229: E/AndroidRuntime(17414): FATAL EXCEPTION: Thread-5874
08-06 05:37:35.229: E/AndroidRuntime(17414): CvException [org.opencv.core.CvException: /home/reports/ci/slave_desktop/50-SDK/opencv/modules/core/src/matmul.cpp:1926: error: (-215) scn + 1 == m.cols && (depth == CV_32F || depth == CV_64F) in function void cv::perspectiveTransform(cv::InputArray, cv::OutputArray, cv::InputArray)
08-06 05:37:35.229: E/AndroidRuntime(17414): ]
08-06 05:37:35.229: E/AndroidRuntime(17414): at org.opencv.core.Core.perspectiveTransform_0(Native Method)
08-06 05:37:35.229: E/AndroidRuntime(17414): at org.opencv.core.Core.perspectiveTransform(Core.java:5869)
08-06 05:37:35.229: E/AndroidRuntime(17414): at com.example.objectrecognition.MainActivity.onCameraFrame(MainActivity.java:279)
08-06 05:37:35.229: E/AndroidRuntime(17414): at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:376)
08-06 05:37:35.229: E/AndroidRuntime(17414): at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:294)
08-06 05:37:35.229: E/AndroidRuntime(17414): at java.lang.Thread.run(Thread.java:856)
The MainActivity.java:279 referes to the line
Core.perspectiveTransform(obj_corners, scene_corners, hg);