johnson-pkt / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Running grabCut causes JRE fatal error. #143

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
G'Day All,

I have the following code snippet (attached) that demonstrates the issue with 
using grabCut (mypc = Win64).

This is the file I used as a refference on how to use grabcut: 
https://code.ros.org/svn/opencv/trunk/opencv/samples/cpp/grabcut.cpp

Any help would be very appreciated.

-dm

Original issue reported on code.google.com by the.duck...@gmail.com on 5 Jan 2012 at 6:02

Attachments:

GoogleCodeExporter commented 8 years ago
Opps, forgot this, the error message text is as follows:
OpenCV Error: Bad argument (Unknown array type) in unknown function, file 
C:\slave\WinInstallerMegaPack\src\opencv\modules\core\src\matrix.cpp, line 646

Original comment by the.duck...@gmail.com on 5 Jan 2012 at 6:06

GoogleCodeExporter commented 8 years ago
Opps, just saw I left a bit of my internal code in there. 
This is the same file again (showing the same problem), but ready to compile 
with just opencv.

-dm

Original comment by the.duck...@gmail.com on 5 Jan 2012 at 7:28

Attachments:

GoogleCodeExporter commented 8 years ago
Well, let's see.
1. `new CvMat()` does not initialize the memory to anything valid for OpenCV, 
call `new CvMat(null)` instead
2. `grabCut()` does not support images of type `IPL_DEPTH_1U`. Almost nothing 
in OpenCV actually supports that type, just use `IPL_DEPTH_8U`.
3. Do not call `IplImage.release()` on images not created by a 
`IplImage.create*()` factory method.

And please post your questions on the mailing list next time, thank you!

Original comment by samuel.a...@gmail.com on 6 Jan 2012 at 7:09

GoogleCodeExporter commented 8 years ago
Cheers mate.

Sorry for the mis-post. Iv'e found the mailing list and it looks pretty good.

Your advice has prettymuch fixed most of the issues. I will plug away at it 
from here.

-dm

Original comment by the.duck...@gmail.com on 6 Jan 2012 at 8:47