Exemplo n.º 1
0
        /// <summary>
        /// あるフレームにおける座標変換行列を深度情報から計算する
        /// </summary>
        /// <param name="frame"></param>
        public static List <CvMat> GetConvMatrixFromDepthFrame(Frame frame, List <CvMat> convList, List <LocalCoordinateMapper> localCoordinateMappers)
        {
            Func <float, double> distance2weight = x => 1.0 / (x * 0 + 400 / 1000f);

            using (ColoredIterativePointMatching sipm = new ColoredIterativePointMatching(frame, localCoordinateMappers, convList, distance2weight, 200))
            {
                List <CvMat> conversions = sipm.CalculateTransformSequntially(0.2, 3);
                return(conversions);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// フレーム範囲における座標変換行列を深度情報から計算する
        /// </summary>
        /// <param name="frames"></param>
        public static List <CvMat> GetConvMatrixFromDepthFrameSequence(FrameSequence frameSeq, int startIndex, int endIndex)
        {
            List <CvMat>        conversions = frameSeq.ToWorldConversions;
            IEnumerable <Frame> frames      = frameSeq.Slice(startIndex, endIndex);

            foreach (Frame frame in frames)
            {
                Func <float, double> distance2weight = x => 1.0 / (x * 0 + 400 / 1000f);
                using (ColoredIterativePointMatching sipm = new ColoredIterativePointMatching(frame, frameSeq.LocalCoordinateMappers, conversions, distance2weight, 200))
                {
                    conversions = sipm.CalculateTransformSequntially(0.1, 1);
                }
            }
            return(conversions);
        }
Exemplo n.º 3
0
        /// <summary>
        /// フレーム範囲における座標変換行列を深度情報から計算する
        /// </summary>
        /// <param name="frames"></param>
        public static List<CvMat> GetConvMatrixFromDepthFrameSequence(FrameSequence frameSeq, int startIndex, int endIndex)
        {
            List<CvMat> conversions = frameSeq.ToWorldConversions;
            IEnumerable<Frame> frames = frameSeq.Slice(startIndex, endIndex);
            foreach (Frame frame in frames)
            {
                Func<float, double> distance2weight = x => 1.0 / (x * 0 + 400 / 1000f);
                using (ColoredIterativePointMatching sipm = new ColoredIterativePointMatching(frame, frameSeq.LocalCoordinateMappers, conversions, distance2weight, 200))
                {
                    conversions = sipm.CalculateTransformSequntially(0.1, 1);                    
                }
            }
            return conversions;

        }
Exemplo n.º 4
0
 /// <summary>
 /// あるフレームにおける座標変換行列を深度情報から計算する
 /// </summary>
 /// <param name="frame"></param>
 public static List<CvMat> GetConvMatrixFromDepthFrame(Frame frame, List<CvMat> convList, List<LocalCoordinateMapper> localCoordinateMappers)
 {
     Func<float, double> distance2weight = x => 1.0 / (x * 0 + 400 / 1000f);
     using (ColoredIterativePointMatching sipm = new ColoredIterativePointMatching(frame, localCoordinateMappers, convList, distance2weight, 200))
     {
         List<CvMat> conversions = sipm.CalculateTransformSequntially(0.2, 3);
         return conversions;
     }
 }