Exemplo n.º 1
0
        internal static bool TrackNextFrame(int frameId, uint[] pixels, List<NativeTrackedObject> managedTrackedObjects)
        {
            int rv = TrackerNextFrame(frameId, pixels);

            for (int i = 0; i < s_NumTrackedObjects; i++)
            {
                var trackingInfo = new NativeTrackedObjectInfo();
                var psfInfo = new NativePsfFitInfo();
                var residuals = new double[35 * 35];

                TrackerGetTargetState(i, trackingInfo, psfInfo, residuals);

                managedTrackedObjects[i].LoadFromNativeData(trackingInfo, psfInfo, residuals);
            }

            return rv == 0;
        }
Exemplo n.º 2
0
        internal void LoadFromNativeData(NativeTrackedObjectInfo trackingInfo, NativePsfFitInfo psfInfo, double[] residuals)
        {
            Center = new ImagePixel(trackingInfo.CenterX, trackingInfo.CenterY);
            LastKnownGoodPosition = new ImagePixel(trackingInfo.LastGoodPositionX, trackingInfo.LastGoodPositionY);
            IsLocated = trackingInfo.IsLocated == 1;
            IsOffScreen = trackingInfo.IsOffScreen == 1;
            m_TrackingFlags = trackingInfo.TrackingFlags;

            m_NativePsfFit.LoadFromNativePsfFitInfo(psfInfo, residuals);
        }