Please let me know how to convert Mat to IplImage in JAVA. Thank you in advance. [closed]

asked 2016-08-27 07:47:47 -0600

Pasha gravatar image

I've tried using the following code; Mat mat_img; IplImage ipl_img = mat_img; but it is giving me the following error, Type mismatch: cannot convert from Mat to opencv_core.IplImage

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by berak
close date 2016-08-31 03:31:49.863843

Comments

neither an IplImage class, or a opencv_core package are in opencv's java wrappers

berak gravatar imageberak ( 2016-08-27 10:57:39 -0600 )edit

please clarify, where the offending IplImage class is coming from.

berak gravatar imageberak ( 2016-08-27 11:53:12 -0600 )edit

It is from opencv_core class in javacv.cpp package.

Pasha gravatar imagePasha ( 2016-08-28 07:58:59 -0600 )edit

javacv is a 3rdparty wrapper , independant from opencv's own java bindings. both are basically incompatible.

any chance, you can avoid using javacv at all ?

berak gravatar imageberak ( 2016-08-28 08:05:37 -0600 )edit

I'm working on face recognition in java and removing javacv will break the entire code. I just need something that'll convert Mat to IplImage since facerecognizer.predict() uses IplImage as an argument.

Pasha gravatar imagePasha ( 2016-08-28 08:21:06 -0600 )edit

sorry, but we'll have to close it then.

berak gravatar imageberak ( 2016-08-28 08:25:57 -0600 )edit