12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Emgu.CV;
- using Emgu.CV.Structure;
- using bbiwarg.Detectors.FingerDetection;
- using bbiwarg.Utility;
- namespace bbiwarg.Detectors.HandDetection
- {
- class Hand
- {
- public Image<Gray, byte> Mask { get; private set; }
- public List<Finger> Fingers { get; private set; }
- public Hand(Image<Gray, byte> mask) {
- Mask = mask;
- Fingers = new List<Finger>();
- }
- public bool isInside(Vector2D point) {
- return (Mask.Data[point.IntY, point.IntX, 0] == 1);
- }
- public void addFinger(Finger finger) {
- Fingers.Add(finger);
- }
- }
- }
|