public static void OnReceiveFrame(IntPtr pDevice, IntPtr pImageBuffer, ref DeviceFrameInfo pFrInfo, IntPtr lParam) { if (XKOpenCGCamera.GetInstance() == null) { return; } XKOpenCGCamera.GetInstance().OnRecvFrame(pDevice, pImageBuffer, ref pFrInfo, lParam); }
public static pcvr GetInstance() { if (_Instance == null) { _Instance = new pcvr(); XKOpenCGCamera.GetInstance(); MyCOMDevice.GetInstance(); } return(_Instance); }
public static XKOpenCGCamera GetInstance() { if (_Instance == null) { GameObject obj = new GameObject(); DontDestroyOnLoad(obj); obj.name = "XKCGCameraCtrl"; _Instance = obj.AddComponent <XKOpenCGCamera>(); CSampleGrabberCB.GetInstance(); } return(_Instance); }
void InitFindPlayerPoint() { FFileName = Application.StartupPath + "\\test.ini"; int rv = ReadInt("TestSec", "GrayVal", -1); if (rv < 0 || rv > 255) { GrayThreshold = 125; WriteInt("TestSec", "GrayVal", GrayThreshold); } else { GrayThreshold = (byte)rv; } Width = XKOpenCGCamera.GetInstance().GetCGCameraWith(); Height = XKOpenCGCamera.GetInstance().GetCGCameraHeight(); lClientWidth = GetSystemMetrics(SM_CXSCREEN); lClientHeight = GetSystemMetrics(SM_CYSCREEN); m_curMousePoint = Point.Empty; m_curMousePoint.X = -1; m_curMousePoint.Y = -1; MinPoint = Point.Empty; MaxPoint = Point.Empty; unwantedPoint = new Point[XKOpenCGCamera.GetInstance().CGCameraBufLen]; m_warp = new Warper(); m_mode = MODE.MODE_MOTION; m_bCurPointModified = false; m_Rect = Rectangle.Empty; ResetRectify(); ResetSmoothing(); InitRectifyCfg(); m_bFirstInst = false; unwantedPointNum = 0; getFrameNum = 0; }