VahidN / OpenCVSharp-Samples

A collection of samples about using OpenCV in .NET applications.
Apache License 2.0
274 stars 122 forks source link

Sample 13 AccessViolationException #7

Open obie73 opened 7 years ago

obie73 commented 7 years ago

When run line 31

extractor.Compute(img1, ref keypoints1, descriptors1);

Throw an AccessViolationException

I updated packages via nuget. Does not fix problem.

Thanks for your work!

VahidN commented 7 years ago

I think you should follow this issue here

obie73 commented 7 years ago

The solution of this link does not fix the issue :(

nccwarp9 commented 6 years ago

same here, I get System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.' at
extractor.Compute(img1, ref keypoints1, descriptors1);

gerwalk commented 5 years ago

+1

[ INFO:0] Initialize OpenCL runtime...

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at OpenCvSharp.NativeMethods.features2d_Feature2D_compute1(IntPtr obj, IntPtr image, IntPtr keypoints, IntPtr descriptors)
gerwalk commented 5 years ago

Fixed: Change the extractor from type BRIEF to FREAK on line 28:

var extractor = FREAK.Create();