private static extern void cvRectangle(ref IplImage img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness, int line_type, int shift);
public static void CvRectangle(IntPtr img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness, int line_type, int shift) { IplImage _img = (IplImage)Marshal.PtrToStructure(img, typeof(IplImage)); cvRectangle(ref _img, pt1, pt2, color, thickness, line_type, shift); }
private static extern void cvPutText(ref IplImage img, [MarshalAs(UnmanagedType.LPStr)] String text, CvPoint org, ref CvFont font, CvScalar color);
public static void CvPutText(IntPtr img, string text, CvPoint org, ref CvFont _font, CvScalar color) { // CvFont _font = (CvFont )Marshal.PtrToStructure(font, typeof(CvFont)); IplImage _img = (IplImage)Marshal.PtrToStructure(img, typeof(IplImage)); cvPutText(ref _img, text, org, ref _font, color); }
private static extern void cvSet2D(ref CvMat arr, int idx0, int idx1, CvScalar value);
public static void CvSet2D(ref CvMat arr, int idx0, int idx1, CvScalar value) { cvSet2D(ref arr, idx0, idx1, value); }