public override void SegmentGray(Matrix<double> imageMatrix) { _checkAndAddToSegment = CheckAndAddToSegment_Gray; _imageMatrix = imageMatrix; _colorImage = null; _map = null; SegmentInternal(imageMatrix.RowCount, imageMatrix.ColumnCount); }
public override void SegmentDisparity(DisparityMap map) { _checkAndAddToSegment = CheckAndAddToSegment_Disparity; _map = map; _colorImage = null; _imageMatrix = null; SegmentInternal(map.RowCount, map.ColumnCount); }
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; }; }
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; }
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; }
public abstract void SegmentDisparity(DisparityMap dispMap);