You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
I think OpenCvSharp.CPlusPlus.Cv2.DrawMatches suffers the garbage collection problem seen previously in many OpenCvSharp.Cv methods, requiring the GC.KeepAlive fix. There are probably many other methods in the OpenCvSharpCPlusPlus.Cv2 dll that need this fix as well.
version: OpenCvSharp 2.4.10-20170306
Environment
Windows 10, and Ubuntu 17.04 (mono). Application running in release mode (hasn't happened in debug mode yet)
What did you do when you faced the problem?
cried. jk.
Example code:
...
var view = new OpenCvSharp.CPlusPlus.Mat();
var bmp = OpenCvSharp.Extensions.BitmapConverter.ToMat(plp.bmp);
OpenCvSharp.CPlusPlus.Cv2.DrawMatches( bmp,
AlgData.KeyPoints, mpatchImg, keypts, matches, view);
var file = Path.Combine(AppDataFolder, "view.png");
view.SaveImage(file);
}
Output:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OpenCvSharp.CPlusPlus.NativeMethods.features2d_drawMatches1(IntPtr img1, KeyPoint[] keypoints1, Int32 keypoints1Length, IntPtr img2, KeyPoint[] keypoints2, Int32 keypoints2Length, DMatch[] matches1to2, Int32 matches1to2Length, IntPtr outImg, CvScalar matchColor, CvScalar singlePointColor, Byte[] matchesMask, Int32 matchesMaskLength, Int32 flags)
at OpenCvSharp.CPlusPlus.Cv2.DrawMatches(Mat img1, IEnumerable1 keypoints1, Mat img2, IEnumerable1 keypoints2, IEnumerable1 matches1To2, Mat outImg, Nullable1 matchColor, Nullable1 singlePointColor, IEnumerable1 matchesMask, DrawMatchesFlags flags)
What did you intend to be?
not an exception
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I think OpenCvSharp.CPlusPlus.Cv2.DrawMatches suffers the garbage collection problem seen previously in many OpenCvSharp.Cv methods, requiring the GC.KeepAlive fix. There are probably many other methods in the OpenCvSharpCPlusPlus.Cv2 dll that need this fix as well.
version: OpenCvSharp 2.4.10-20170306
Environment
Windows 10, and Ubuntu 17.04 (mono). Application running in release mode (hasn't happened in debug mode yet)
What did you do when you faced the problem?
cried. jk.
Example code:
...
var view = new OpenCvSharp.CPlusPlus.Mat();
var bmp = OpenCvSharp.Extensions.BitmapConverter.ToMat(plp.bmp);
OpenCvSharp.CPlusPlus.Cv2.DrawMatches( bmp,
AlgData.KeyPoints, mpatchImg, keypts, matches, view);
Output:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OpenCvSharp.CPlusPlus.NativeMethods.features2d_drawMatches1(IntPtr img1, KeyPoint[] keypoints1, Int32 keypoints1Length, IntPtr img2, KeyPoint[] keypoints2, Int32 keypoints2Length, DMatch[] matches1to2, Int32 matches1to2Length, IntPtr outImg, CvScalar matchColor, CvScalar singlePointColor, Byte[] matchesMask, Int32 matchesMaskLength, Int32 flags)
at OpenCvSharp.CPlusPlus.Cv2.DrawMatches(Mat img1, IEnumerable1 keypoints1, Mat img2, IEnumerable1 keypoints2, IEnumerable1 matches1To2, Mat outImg, Nullable1 matchColor, Nullable1 singlePointColor, IEnumerable1 matchesMask, DrawMatchesFlags flags)
What did you intend to be?
not an exception
The text was updated successfully, but these errors were encountered: