AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

how to get tracking object's location ?

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

how to get tracking object's location ?

Postby ekort123 » Fri May 06, 2016 10:58 am

Hi guys. i made a proje

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();

                       
                    }
                }
ekort123
 
Posts: 4
Joined: Thu Mar 03, 2016 7:29 pm



Return to AForge.NET Framework