Exemple #1
0
        static void ParseTrackingFile()
        {
            TrackFileParser    tfParser = new TrackFileParser(trackFilepath);
            ICameraTrackSolver solver   = null;

            tfParser.Parse();

            switch (tfParser.TrackFileType)
            {
            case TrackFileParser.CameraTrackerType.RL_DEFAULT:
                solver = new RLCameraTrackSolver(tfParser, fps);
                break;

            case TrackFileParser.CameraTrackerType.GAM_DEFAULT:
            case TrackFileParser.CameraTrackerType.GAM_NATIVE:
                solver = new GAMCameraTrackSolver(tfParser, fps);
                break;

            default:
                throw new CameraTrackException("Unsupported tracker type");
            }

            solver.Solve();
            solver.WriteChanFile(chanFilepath);
#if DEBUG
            solver.WriteSensorDataFiles(chanFilepath);
#endif
        }
Exemple #2
0
        public AbstractTrackSolver(TrackFileParser tfParser, double fps)
        {
            if (!tfParser.Parsed)
            {
                tfParser.Parse();
            }

            if (Array.IndexOf(this.GetSupportedTrackFileTypes(), tfParser.TrackFileType) == -1)
            {
                throw new CameraTrackException("Incompatible track file type");
            }

            this.sensorData     = tfParser.SensorData;
            this.solverData     = new Dictionary <ulong, SolverFrame>(tfParser.SensorData.Count / 2);
            this.chanFrames     = new HashSet <ChanFrame>();
            this.fps            = fps;
            this.nsPerFrame     = 1e9 / this.fps;
            this.firstTimestamp = this.sensorData.Values[0].Timestamp;
        }
 public GAMCameraTrackSolver(TrackFileParser tfParser, double fps) : base(tfParser, fps)
 {
     this.fusionLastTimestamp = this.firstTimestamp;
 }
 public RLCameraTrackSolver(TrackFileParser tfParser, double fps) : this(tfParser, fps, 100.0)
 {
 }
 public RLCameraTrackSolver(TrackFileParser tfParser, double fps, double psFactor) : base(tfParser, fps)
 {
     this.PositionScaleFactor = psFactor;
 }