Esempio n. 1
0
        public static FloatImg RescaleAndSetLUT(QTrkInstance tracker, FloatImg original, int zplanes)
        {
            var cfg = tracker.Config;
            var w   = cfg.config.width;
            var h   = cfg.config.height;

            tracker.SetRadialZLUTSize(1, zplanes);
            tracker.BeginLUT(false);

            using (FloatImg sample = new FloatImg(w, h)) {
                for (int i = 0; i < zplanes; i++)
                {
                    GenerateImageFromLUT(sample, original, cfg.config.ZLUT_minradius, cfg.zlut_maxradius, new Vector3(w / 2, h / 2, i / (float)zplanes * original.h), false, 1);
                    sample.Normalize();
                    //					if (i == zplanes/2 && jpgfile)
                    //					WriteJPEGFile(SPrintf("smp-%s",jpgfile).c_str(), img);
                    tracker.BuildLUT(sample, i);
                }
            }
            tracker.FinalizeLUT();
            FloatImg result = tracker.GetRadialZLUT();

            return(result);
        }
Esempio n. 2
0
 public void SetTracker(QTrkInstance trkInst)
 {
     tracker = trkInst;
     QTrkDLL.RMSetTracker(inst, trkInst.InstancePtr);
 }