Bonjour à tous,

c'est mon premier passage sur developpez.net, j'espère trouver une réponse ici

Je développe une application WPF pour Kinect avec visual c#.

La kinect me fournit un "skeleton frame" à partir duquel je peux extraire 20 articulation du corps.


Je veux afficher les coordonnées en x y et z de chaque articulation sur une ListView comme dans l'image ci dessous pour appliquer après un certain algorithme qui va chercher la valeur min et max sur chaque axe.




J'ai doncinséré le contrôle ListView, mais je n'arrive pas à afficher les valeurs sur des colonnes au fure et à mesure que les valeurs se calculent.

Voilà le code c# que j'ai écris (je suis pas trop familiarisée avec )


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 
 
List<Joint> JointList = new List<Joint>();
List<float> JointsCordinates = new List<float>();
 
// chercher le squelette
 
      if (first == null) // si pas de squelette
            {
                txtP.Text = "No skeleton"; 
                return;
            }
 
            else
            {
                txtP.Text = "Skeleton Detected";
 
                /// définir les  20 articulations
 
 
                                Joint H = first.Joints[JointType.Head]; // head
 
                                Joint SC = first.Joints[JointType.ShoulderCenter]; // shouldercenter
                                Joint SL = first.Joints[JointType.ShoulderLeft]; // shoulder Left
                                Joint SR = first.Joints[JointType.ShoulderRight]; // soulderRight
 
                                Joint EL = first.Joints[JointType.ElbowLeft];
                                Joint ER = first.Joints[JointType.ElbowRight];
                                Joint WL = first.Joints[JointType.WristLeft];
                                Joint WR = first.Joints[JointType.WristRight];
                                Joint HandL = first.Joints[JointType.HandLeft];
                                Joint HandR = first.Joints[JointType.HandRight];
 
                                Joint Spine = first.Joints[JointType.Spine];
 
                                Joint HipC = first.Joints[JointType.HipCenter];
                                Joint HipL = first.Joints[JointType.HipLeft];
                                Joint HipR = first.Joints[JointType.HipRight];
 
                                Joint KL = first.Joints[JointType.KneeLeft];
                                Joint KR = first.Joints[JointType.KneeRight];
 
                                Joint AnkL = first.Joints[JointType.AnkleLeft]; 
                                Joint AnkR = first.Joints[JointType.AnkleRight];
                                Joint FL = first.Joints[JointType.FootLeft];
                                Joint FR = first.Joints[JointType.FootRight];
 
// préparer une liste d'articulations pour l'afficher après dans la première colonne de a listeView
 
                JointList.Add(H);
                JointList.Add(SC);
                JointList.Add(SL);
                JointList.Add(SR);
                JointList.Add(Spine);
                JointList.Add(EL);
                JointList.Add(ER);
                JointList.Add(HandL);
                JointList.Add(HandR);
                JointList.Add(HipC);
                JointList.Add(HipR);
                JointList.Add(HipL);
                JointList.Add(KL);
                JointList.Add(KR);
                JointList.Add(AnkL);
                JointList.Add(AnkR);
                JointList.Add(FL);
                JointList.Add(FR);
                JointList.Add(WL);
                JointList.Add(WR);
 
// si une articulation est suivie alors on calcule ses coordonnées dans l'espace 3D
 
                foreach (Joint j in JointList)
                {
                    if (j.TrackingState == JointTrackingState.Tracked)
 
                    jx = j.Position.X;
                    jy = j.Position.Y;
                    jz = j.Position.Z;
 
// ajouter chaque cordonnée à la liste JointsCordinates pour l'afficher après dans les 3 colonnes qui restent 
                    JointsCordinates.Add(jx);
                    JointsCordinates.Add(jy);
                    JointsCordinates.Add(jz);
 
 
    }
}

jusqu'à ici c'est tout ce que j'ai pus faire
donc mon problème c'est d'afficher respectivement les valeurs que je trouves et les noms des articulations dans la liste.



je note que la kinect fonctionne avec un débit de 30 images/s, càd que ces valeurs vont changer à chaque fois et je veux les afficher en temps réel.

Quelqu'un peut m'aider svp ?