static public void PrepareImage( ref xmgImage dstimage, int width, int height, IntPtr ptrdata) { dstimage.m_width = width; dstimage.m_height = height; dstimage.m_colorType = 3; dstimage.m_type = 0; dstimage.m_flippedH = true; // webCamtexture pixels are upside down dstimage.m_imageData = ptrdata; }
static public void PrepareGrayImage( ref xmgImage dstimage, int width, int height, IntPtr ptrdata) { dstimage.m_width = width; dstimage.m_height = height; dstimage.m_colorType = 0; dstimage.m_type = 0; dstimage.m_flippedHorizontaly = true; dstimage.m_iWStep = 0; dstimage.m_imageData = ptrdata; }
static public void PrepareImage( ref xmgImage dstimage, int width, int height, int colortype, IntPtr ptrdata) { dstimage.m_width = width; dstimage.m_height = height; dstimage.m_colorType = colortype; dstimage.m_type = 0; #if (!UNITY_EDITOR && UNITY_ANDROID) || (!UNITY_EDITOR && UNITY_IOS) dstimage.m_flippedHorizontaly = false; #else dstimage.m_flippedHorizontaly = true; #endif dstimage.m_iWStep = 0; dstimage.m_imageData = ptrdata; }
public static extern int xzimgFramedImageDetect([In][Out] ref xmgImage imageIn, int iFilterStrenght, int bRecursiveTracking, int bRecursiveIdentification, int identificationMode);
public static extern int xzimgNaturalImageTrack([In][Out] ref xmgImage imageIn, int filterStrenght);
public static extern int xzimgMarkerDetect([In][Out] ref xmgImage imageIn, int markerType, int filterStrengh);
public static extern int xzimgRigidTracking([In][Out] ref xmgImage imageIn, [In][Out] ref xmgTrackingParams trackingData, [In][Out] ref xmgRigidFaceData rigidData);