Tracking in a video sequence with a custom tracking goal

I have a project for creating an application in which the user can draw an area of ​​interest (in this example, the rectangle around the vehicle for tracking), and it automatically tracks the vehicle in subsequent frames of the recorded video.

The method that I have implemented so far with OpenCV is as follows:

(1) Get a custom rectangle (area of ​​interest) from initial_frame enter image description here

(2) Use goodFeaturesToTrackin the area of ​​interest and saveinitial_features enter image description here

(3) 3.1: next_frame 3.2: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts,...) * prevImg initial_frame prevPts initial_featues , nextImg 3.3: Get Bounding Rectangle nextPts 3.4: enter image description here

50 , , :

enter image description here

50 , :

enter image description here

, , , , , , , .

, , , , , , . .

* . , ( EMGUCV):

    public Rectangle RectFromPoints(List<PointF> points)
    {
        using (MemStorage stor = new MemStorage())
        {
            Contour<PointF> contour = new Contour<PointF>(stor);

           // Remove points far outside the major grouping of all the other points
            var newPoints = RemoveOutlierPoints(points); 

            foreach(PointF pnt in newPoints)
            {
                contour.Push(pnt);
            }
            var contPoly = contour.ApproxPoly(3, stor);

            var rect = contPoly.BoundingRectangle;
            return rect;
        }
    }
+4
3

OpenCV 3.0 contrib (TLD, MEDIANFLOW, BOOTTING MIL). CPP. VOTchallenge.

+1

. . , , . , , . , , BMR-.

0

Source: https://habr.com/ru/post/1538635/


All Articles