Exemplo n.º 1
0
        //handles closing project (to re-implement)
        private void CloseCurrentProject()
        {
            if (app_status.GetStatus()>=_app_status.project_active)
            {
                saveQuery();
                trackingPoints=null;
                projectSettings=null;

                viewportXY.Dispose();
                viewportXZ.Dispose();
                viewportYZ.Dispose();
                tempTrackingPoint=null;
                tf=null;
                trackingPointsBasicInfo=null;
                trackingPoints=null;
                totalTrackingPoints=0;

                trackingHist = null;
                viewportXY=null;
                viewportXZ=null;
                viewportYZ=null;
                trackingPointsLB.Items.Clear();
                app_status.SetStatus(_app_status.started);
            }
            else Message("No active project detected");
        }
Exemplo n.º 2
0
        private void trackCurrentFrame()
        {
            //bitmap null reference tracking procedure
            tf = new BaseTypes.timeFrame((int)(viewportXY.getCurrentFrame()-viewportXY.getStartFrame()));

            foreach (trackingPoint tp in trackingPoints)
            {
                tp.trackPoint( viewportXY.GetFrame(true),
                    viewportXZ.GetFrame(true),
                    viewportYZ.GetFrame(true),projectSettings.preciseAcceptanceThreshold,projectSettings.scanAreaOffset);

            }
        }
Exemplo n.º 3
0
 private void trackFullMovie()
 {
     if (app_status.GetStatus()>=_app_status.points_trained)
     {
         TimeStart = DateTime.Now;
         trackingCompleted=false;
         framesToTrack=0;//viewportXY.;
         trackingHist=new BaseTypes.trackingHistory(projectSettings.projectName, trackingPointsBasicInfo,(int)viewportXY.getStartFrame(),(int)viewportXZ.getStartFrame(),(int)viewportYZ.getStartFrame() );
         tf = new BaseTypes.timeFrame(0);
         totalTrackingPoints=trackingPoints.Count;
         Message("Points to track : "+Convert.ToString(totalTrackingPoints));
         app_status.SetStatus(_app_status.tracking);
         trackCurrentFrame();
     }
     else Message("Unable to begin tracking! Some points are not trained!");
 }
Exemplo n.º 4
0
        private void trackCertainMovieLen()
        {
            if (app_status.GetStatus()>=_app_status.points_trained)
            {
                Message("Number of frames querying...");
                using (framesToTrackDialog xForm = new framesToTrackDialog())
                {
                    if (xForm.ShowDialog(this) == DialogResult.OK)
                    {
                        TimeStart = DateTime.Now;
                        trackingCompleted=false;
                        framesToTrack=xForm.framesCount;
                        trackingHist=new BaseTypes.trackingHistory(projectSettings.projectName, trackingPointsBasicInfo,(int)viewportXY.getStartFrame(),(int)viewportXZ.getStartFrame(),(int)viewportYZ.getStartFrame() );
                        tf = new BaseTypes.timeFrame(0);
                        totalTrackingPoints=trackingPoints.Count;
                        Message("Frames to track :"+Convert.ToString(framesToTrack));
                        Message("Points to track : "+Convert.ToString(totalTrackingPoints));
                        app_status.SetStatus(_app_status.tracking);
                        trackCurrentFrame();

                    }
                    else Message("Tracking certain movie length cancelled...");
                }
            }
            else Message("Unable to begin tracking! Some points are not trained!");
        }