private void RemoveHeadElements()
        {
            var headRecognizer = new BodyPartSquaresRecognizer_Head(_bodyToRecognize.WholePattern, _bodyToRecognize.ProperPattern, this._TrainedItems.Where(x=>x.BodyPart == (int)Enums.BodyPart.Head).ToList());
            headRecognizer.RecognizeBodyPart().ToList().ForEach(x=>_bodyToRecognize.WholePattern.Remove(x));

            for (int i = _bodyToRecognize.WholePattern.Count - 1; i >= 0; i--)
            {
                if (headRecognizer._HeadCentroid.Y + headRecognizer.AvarageHeadHeight / 2 > _bodyToRecognize.WholePattern[i].Y)
                {
                  if( Math.Abs(_bodyToRecognize.WholePattern[i].X - headRecognizer._HeadCentroid.X) >= headRecognizer.AvarageHeadWidth / 2 )
                    {
                       _bodyToRecognize.WholePattern.RemoveAt(i);
                    }
                }
            }

            _endOfHead = headRecognizer._HeadCentroid.Y + (int)headRecognizer.AvarageHeadHeight / 2;
        }
        void GetHeadElements()
        {
            var headRecognizer = new BodyPartSquaresRecognizer_Head(_bodyToRecognize.WholePattern, _bodyToRecognize.ProperPattern, this._TrainedItems.Where(x => x.BodyPart == (int)Enums.BodyPart.Head).ToList());
            headRecognizer.RecognizeBodyPart();
            _Head.AddRange(headRecognizer._HeadWithDepthAnalyzing);

            for (int i = _bodyToRecognize.WholePattern.Count - 1; i >= 0; i--)
            {
                if (headRecognizer._HeadCentroid.Y + headRecognizer.AvarageHeadHeight / 2 > _bodyToRecognize.WholePattern[i].Y)
                {
                    if (Math.Abs(_bodyToRecognize.WholePattern[i].X - headRecognizer._HeadCentroid.X) <= headRecognizer.AvarageHeadWidth / 2 * 3)
                    {
                        _Head.Add(_bodyToRecognize.WholePattern[i]);
                    }
                }
            }
        }
 private void RemoveHeadElements()
 {
     var headRecognizer = new BodyPartSquaresRecognizer_Head(_bodyToRecognize.WholePattern, _bodyToRecognize.ProperPattern, this._TrainedItems.Where(x=>x.BodyPart == (int)Enums.BodyPart.Head).ToList());
     headRecognizer.RecognizeBodyPart().ToList().ForEach(x=>_bodyToRecognize.WholePattern.Remove(x));
 }