public frmHandContour(Bitmap imgEdgeDetected) { InitializeComponent(); this.ExtractHandContour(imgEdgeDetected); this.graphicsControl = Graphics.FromImage(this.contourExtracted); this.handGeometry = new HandGeometry(this.contourExtracted, ref this.graphicsControl); this.handGeometry.CalculatePixelCount(); this.lblPixelCount.Text = this.handGeometry.PixelCount + " (" + Math.Round((double)(this.handGeometry.PixelCount * 100) / (this.contourExtracted.Width * this.contourExtracted.Height), 2) + "%)"; }
public frmExploreHandGeometry(HandGeometry hg) { InitializeComponent(); this._hg = hg; this.handGeometryAttributes = new HandGeometryUserAttributes(); this.handGeometryAttributes.Label = Pool.Instance.ImageName; this.handGeometryAttributes.HandPerimeter = hg.PixelCount; this.idxAttribute = 1; this.rtbAttributes.AppendText("Attribute " + this.idxAttribute + ": [HPer]=" + this.handGeometryAttributes.HandPerimeter.ToString("") + "\n"); this.rtbAttributes.AppendText("--------------------------------------\n"); this.idxAttribute++; }
public void CalculateHandPerimeter() { _graphicsControl = Graphics.FromImage(this._handCountour); _handGeometry = new HandGeometry(this._handCountour, ref _graphicsControl); _handGeometry.CalculatePixelCount(); }