コード例 #1
0
        public void LoadPlayers(Dictionary<int, string> usersToDataDict)
        {
            lock (playerCalibs)
            {
                playerCalibs.Clear();

                foreach (int playerID in usersToDataDict.Keys)
                {
                    YCbCrColor calibColor = new YCbCrColor();
                    calibColor.LoadFromString(usersToDataDict[playerID]);
                    LoadPlayer(playerID, calibColor);
                }
            }
        }
コード例 #2
0
 public float DistanceSqTo(YCbCrColor otherColor)
 {
     return (this.Y - otherColor.Y) * (this.Y - otherColor.Y) + (this.Cb - otherColor.Cb) * (this.Cb - otherColor.Cb) + (this.Cr - otherColor.Cr) * (this.Cr - otherColor.Cr);
 }
コード例 #3
0
 public void LoadPlayer(int pID, YCbCrColor calibColor)
 {
     playerCalibs[pID] = calibColor;
 }
コード例 #4
0
        public void LoadFromCalibration(YCbCrColor calibColor)
        {
            YAvg = calibColor.Y;
            CbAvg = calibColor.Cb;
            CrAvg = calibColor.Cr;

            IsCalibrated = true;
        }