Esempio n. 1
0
 public override void SegmentGray(Matrix<double> imageMatrix)
 {
     _checkAndAddToSegment = CheckAndAddToSegment_Gray;
     _imageMatrix = imageMatrix;
     _colorImage = null;
     _map = null;
     SegmentInternal(imageMatrix.RowCount, imageMatrix.ColumnCount);
 }
Esempio n. 2
0
 public override void SegmentDisparity(DisparityMap map)
 {
     _checkAndAddToSegment = CheckAndAddToSegment_Disparity;
     _map = map;
     _colorImage = null;
     _imageMatrix = null;
     SegmentInternal(map.RowCount, map.ColumnCount);
 }
Esempio n. 3
0
 public override void SegmentColor(ColorImage image)
 {
     _checkAndAddToSegment = CheckAndAddToSegment_Color;
     _colorImage = image;
     _imageMatrix = null;
     _map = null;
     SegmentInternal(image.RowCount, image.ColumnCount);
 }
        public TriangulationFromDisparityMapTab()
        {
            InitializeComponent();

            _dispImage.MapLoaded += (s, e) =>
            {
                _dispMap = _dispImage.Map;
            };
        }
Esempio n. 5
0
 public object Clone()
 {
     var cloned = new DisparityMap(RowCount, ColumnCount);
     for(int r = 0; r < RowCount; ++r)
     {
         for(int c = 0; c < ColumnCount; ++c)
         {
             cloned.Set(r, c, (Disparity)Disparities[r, c].Clone());
         }
     }
     return cloned;
 }
Esempio n. 6
0
        public static DisparityMap CreateFromNode(XmlNode mapNode)
        {
            int rows = int.Parse(mapNode.Attributes["rows"].Value);
            int cols = int.Parse(mapNode.Attributes["cols"].Value);

            DisparityMap map = new DisparityMap(rows, cols);
            XmlNode rowNode = mapNode.FirstChildWithName("Row");
            for(int r = 0; r < rows; ++r)
            {
                XmlNode dispNode = rowNode.FirstChildWithName("Disparity");
                for(int c = 0; c < cols; ++c)
                {
                    Disparity disp = Disparity.CreateFromNode(dispNode);
                    map.Disparities[r, c] = disp;
                    dispNode = dispNode.NextSibling;
                }
                rowNode = rowNode.NextSibling;
            }

            return map;
        }
Esempio n. 7
0
 public abstract void SegmentDisparity(DisparityMap dispMap);