this project knows colors and draw ractangle.
how do i get trackişng object's location. and label's text = tracking object's location.
Thank you.
Sorry my english
- Code: Select all
foreach (Rectangle recs in rects)
{
if (rects.Length > 0)
{
Rectangle objectRect = rects[0];
Graphics g = pictureBox1.CreateGraphics();
using (Pen pen = new Pen(Color.FromArgb(252, 3, 26), 2))
{
g.DrawRectangle(pen, objectRect);
}
int objectX = objectRect.X + (objectRect.Width / 2);
int objectY = objectRect.Y + (objectRect.Height / 2);
g.Dispose();
}
}