[Mono-list] Problem with Porting OpenCV to Mono

Yoav Hacohen yoavhacohen at gmail.com
Sun Jan 6 11:41:24 EST 2008


Hi,

 

I'm trying to translate the main part of OpenCVDotNet which is written in
managed C++ (and cannot be compiled using clr:safe) to C# using P/Invokes.

I have encounter the following exception:

 

Stacktrace:

 

  at (wrapper managed-to-native) OpenCVDotNet.PInvoke.cvGetImageROI (intptr)
<0x

00004>

  at (wrapper managed-to-native) OpenCVDotNet.PInvoke.cvGetImageROI (intptr)
<0x

ffffffff>

  at OpenCVDotNet.CVImage.get_RegionOfInterest () <0x00064>

  at OpenCVDotNet.CVImage.Split () <0x00054>

  at OpenCVDotNet.CVImage.CalcHistogram
(int[],OpenCVDotNet.CVPair[],OpenCVDotNe

t.CVImage) <0x0009e>

  at OpenCVDotNet.CVImage.CalcHistogram (int,OpenCVDotNet.CVImage) <0x0012a>

  at OpenCVDotNet.CVImage.CalcHistogram (int) <0x0000f>

  at Test.Program.Main (string[]) <0x00036>

  at (wrapper runtime-invoke) Test.Program.runtime_invoke_void_string[]
(object,

intptr,intptr,intptr) <0xffffffff>

 

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

 

Under .Net it runs fine.

 

To run this example you can download the code from
https://opencvdotnet.googlecode.com/svn/trunk/src/sandbox , and have the
original OpenCV Dll files (Usually at C:\program files\OpenCV\Bin\) in your
C:\windows\System32\  folder.

 

Yoav 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080106/2250fad2/attachment.html 


More information about the Mono-list mailing list