List corners = PointsCloud.FindQuadrilateralCorners(edgePoints);
IntPoint A = corners[0]; IntPoint B = corners[1]; IntPoint C = corners[2]; IntPoint D = corners[3];
// distance entre les points float ab = A.DistanceTo(B); float bc = B.DistanceTo(C); float ac = A.DistanceTo(C); float cd = C.DistanceTo(D); float da = D.DistanceTo(A); // calcul triangle 1 float p1 = ab+bc+ac; // périmètre float a1 = p1*(p1-2ab)*(p1-2bc)*(p1-2ac); // aire triangle 1 // calcul triangle 2 float p2 = ac+cd+da; // périmètre float a2 = p2*(p2-2ac)*(p2-2cd)*(p2-2ca); // aire triangle 2 // aire quadrilatère float aQ = a1 + a2; // si < seuil alors suppr
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionIntPoint A = corners[0]; IntPoint B = corners[1]; IntPoint C = corners[2]; IntPoint D = corners[3]; // distance entre les points // c'est la ou il affiche l'erreur de convertion float en double donc j ai ajoute (float) à chaque fois float ab = (float)A.DistanceTo(B); float bc = (float)B.DistanceTo(C); float ac = (float)A.DistanceTo(C); float cd = (float)C.DistanceTo(D); float da = (float)D.DistanceTo(A); float peri = ab + bc + cd + da;
private void Cmd66Leds_Click(object sender, EventArgs e, Bitmap image)" ca marche pas et qd je mets :
Bitmap image = new Bitmap ();