Ask Your Question
0

Help. I try to convert the opencv Mat to javacv CvMat. [closed]

asked 2013-07-23 12:33:27 -0600

frank gravatar image

I am writing an app on Android with Opencv. In the callback function onCameraFrame(CvCameraViewFrame inputFrame) from opencv, I want to use Javacv methods, but I don't know how to convert a Mat object to a CvMat object. Please help me. thanks.

Frank

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by StevenPuttemans
close date 2013-07-24 16:45:08.312469

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-07-24 09:00:49 -0600

So, the data layout in Mat is fully compatible with CvMat, IplImage, and CvMatND types from OpenCV 1.x

comes from documentation. As far as I know CvMat is an old format, and you can just use Mat, also in Java. For this to know look at docs for Java. At the core library you can see that it will work!

edit flag offensive delete link more

Comments

Maybe I did not say clearly. CvMat is a class in JavaCV. I try to call FaceRecognizer::predict(@InputArray CvArr src), so I need to convert the OpenCV::Mat object to JavaCV::CvArr or CvMat.

frank gravatar imagefrank ( 2013-07-24 16:28:16 -0600 )edit

JavaCV isn't an official openCV package, which has his own java bindings as provided in the link above. If you have questions about JavaCV, which has less functionality then the original openCV, go to proper wiki or issues report section. Topic closed, if you don't get why, please read FAQ!

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-24 16:42:43 -0600 )edit

Question Tools

Stats

Asked: 2013-07-23 12:33:27 -0600

Seen: 2,348 times

Last updated: Jul 24 '13