Ejemplo n.º 1
0
        public ClothesSelect()
        {
            this.InitializeComponent();

            ps.ShowDialog();
            fullPosture.Source = ps.MyValue;
            postureId          = ps.PostureId;

            if (postureId == null)
            {
                this.Close();
            }

            try
            {
                sampleDataSource = new SampleDataSource("Track", "call getClothesImage(" + postureId + ")");
                this.itemsControl.ItemsSource = sampleDataSource.GetGroup();
                values = sampleDataSource.GetValueGroup();
                DBon();
            }
            catch
            {
                Console.WriteLine("자세Id 못받았음");
            }
        }
Ejemplo n.º 2
0
        public ClotheCapture()
        {
            InitializeComponent();
            PostureSelect ps = new PostureSelect();

            ps.ShowDialog();
            postureImage.Source = ps.MyValue;
            postureId           = ps.PostureId; // 현재 이 가져왔다는 걸 인식 못함! 이것만 해결되면 끗.

            Console.WriteLine("[ {0} ]", postureId);
            if (postureId == 0)
            {
                this.Close();
            }

            DBon();

            string query = "call getjointdata(" + postureId + ");";

            db.setCommand(query);

            MySqlDataReader reader = db.ExecQueryWithAnswer();

            for (int i = 0; i < 25; i++)
            {
                reader.Read();

                joints[i, 0] = (double)reader["kinectx"];
                joints[i, 1] = (double)reader["kinecty"];
                joints[i, 2] = (double)reader["kinectz"];
                Console.WriteLine("{0}번 스켈레톤 X : {1} , Y : {2} , Z : {3}", i, joints[i, 0], joints[i, 1], joints[i, 2]);

                fit[i] = 0;
            }
            //값 초기화. 0은 비활성. 1은 활성. 활성이 22개 이상일 경우, 작동함.
        }