How to track a line using kalman filter object of computer vision toolbox?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
The following matlab documentation shows how to track a 2D point and estimate it's trajectory during occlusions. http://www.mathworks.in/help/vision/examples/using-kalman-filter-for-object-tracking.html
I want to implement the same idea for tracking a line. One idea I had was to track two points in the line and thus track the line, but that would require two kalman filter objects(I have intentions of tracking multiple lines, so multiple objects will be tedious). Can I implement using just one object?
trackedLocation = correct(kalmanFilter, detectedLocation);
trackedLocation = predict(kalmanFilter);
These are the code fragments for 2D pont tracking.In short, I need to add the line parameters for
detectedLocation.
0 Commenti
Risposte (1)
Dima Lisin
il 19 Set 2014
Hi Aravind,
I think it can be done in principle, but I have never tried it.
You would not be able to use the configureKalmanFilter function, which is designed to create a Kalman filter for tracking a single point. You would have to construct the vision.KalmanFilter object directly, by setting up the StateTransitionModel and the MeasurementModel.
Assuming that you want to track line segments, which move on a 2D plane and do not change their size, and assuming that you choose to use a constant velocity motion model, then your state would include (x,y) coordinates of the two end points and a single velocity vector. Your measurement would just be the coordinates of the two end points. Then you would have to set up the appropriate state transition matrix, and the matrix mapping a state to a measurement.
Things will get more complicated if your line segments move in 3D, but you only see a 2D projection, and/or if the line segments can change in length as they move.
Vedere anche
Categorie
Scopri di più su Computer Vision with Simulink in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!