Exemplo n.º 1
0
 private void DiffPatternWidth(ref SelectionSquares newBody, List<double> ComparisonVector)
 {
     var dif = Math.Abs((newBody.PatternWidth - this.PatternWidth));
     ComparisonVector.Add(dif);
 }
Exemplo n.º 2
0
 private void DiffPatternCentroid(ref SelectionSquares newBody, List<double> ComparisonVector)
 {
     var difPointX =  Math.Abs((newBody.PatternCentroid.X - this.PatternCentroid.X));
     var difPointY = Math.Abs((newBody.PatternCentroid.Y - this.PatternCentroid.Y));
     ComparisonVector.Add(difPointX);
     ComparisonVector.Add(difPointY);
 }
Exemplo n.º 3
0
        public IEnumerable<double> CompareBodyParameters(SelectionSquares newBody)
        {
            ComparisonVector = new List<double>();

            DiffBodyRatio(ref newBody, ComparisonVector);
            DiffPatternWidth(ref newBody, ComparisonVector);
            DiffPatternHeight(ref newBody, ComparisonVector);
            DiffPatternCentroid(ref newBody, ComparisonVector);

            return ComparisonVector;
        }
Exemplo n.º 4
0
 private void DiffBodyRatio(ref SelectionSquares newBody, List<double> ComparisonVector)
 {
     var difBodyRatio = Math.Abs((newBody.BodyRatio - this.BodyRatio));
     ComparisonVector.Add(difBodyRatio);
 }
 public BodyPartSquaresRecognizer_Legs(List<System.Drawing.Rectangle> bodyToRecognize, List<System.Drawing.Rectangle> selectedPattern, List<SelectionSquares> _trainedItems)
 {
     this._bodyToRecognize = new SelectionSquares() {WholePattern = new List<Rectangle>(bodyToRecognize), ProperPattern = selectedPattern, BodyPart = (int)Enums.BodyPart.Torso};
     this._TrainedItems = _trainedItems;
     this._legs = new List<Rectangle>();
 }