Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Why is it recommended not to use Mat put method, but Mat.setTo() instead.

75 views
Skip to first unread message

Linda Li

unread,
Dec 31, 2012, 6:54:37 PM12/31/12
to android...@googlegroups.com
The OpenCV for Android tutorial recommends to use Mat put method, but Mat.setTo() instead to improve performance, because JNI-calls are really expensive.

I am confused. Why isn't Mat.setTo() JNI-call when put method is?

And between using OpenCV Java API and using C++ API, whose performance is better?

I find out that since OpenCV 2.4.3, the integration with OpenCV and the custom layout view is implemented by using:
public Mat onCameraFrame(Mat inputFrame) {}
So it seems to suggest the user to use Java API?
Reply all
Reply to author
Forward
0 new messages