/// <summary> /// Get image data which used tracking engine /// </summary> /// <returns>Image data pointer with native address</returns> public IntPtr GetDataPtr() { if (length == 0) { return(IntPtr.Zero); } IntPtr imagePtr = IntPtr.Zero; imagePtr = (IntPtr)NativeAPI.TrackedImage_getDataPtr(trackedImageCPtr); return(imagePtr); }
/// <summary> /// Get image data which used tracking engine /// </summary> /// <returns>Image data pointer with native address</returns> public IntPtr GetDataPtr() { if (length == 0) { return(IntPtr.Zero); } IntPtr imagePtr = IntPtr.Zero; if (splitYuv && colorFormat == ColorFormat.YUV420sp) { imagePtr = (IntPtr)NativeAPI.TrackedImage_getDataYuv420spSplitPtr(trackedImageCPtr); } else if (splitYuv && colorFormat == ColorFormat.YUV420_888) { imagePtr = (IntPtr)NativeAPI.TrackedImage_getDataYuv420_888SplitPtr(trackedImageCPtr); } else { imagePtr = (IntPtr)NativeAPI.TrackedImage_getDataPtr(trackedImageCPtr); } return(imagePtr); }