Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there an easy way to initiate Mat with IplImage? #317

Closed
wei-hai opened this issue Jan 27, 2016 · 3 comments
Closed

is there an easy way to initiate Mat with IplImage? #317

wei-hai opened this issue Jan 27, 2016 · 3 comments

Comments

@wei-hai
Copy link

wei-hai commented Jan 27, 2016

I tried to initiate a Mat variable with IplImage object like this:

Mat mat = new Mat(imageObj);

and when printing mat.cols() it says 0 and the data inside is NULL. I am wondering if there is an easy way to do it.

@saudet
Copy link
Member

saudet commented Jan 28, 2016 via email

@wei-hai
Copy link
Author

wei-hai commented Jan 28, 2016

it doesn't seem to work, I tried the following code it works:
Mat mat = new Mat(imageObj.height(),imageObj.width(),CV_8UC1,imageObj);

saudet added a commit to bytedeco/javacpp-presets that referenced this issue Feb 2, 2016
@saudet
Copy link
Member

saudet commented May 19, 2016

Fixed in version 1.2. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants