Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Vector field to aid tracking #400

Open
henriquenunez opened this issue Feb 8, 2024 · 5 comments
Open

[FEATURE REQUEST] Vector field to aid tracking #400

henriquenunez opened this issue Feb 8, 2024 · 5 comments

Comments

@henriquenunez
Copy link

This tool is amazing! So easy to use, and fast!

I would like to know if there is any possibility to add some speed vectors, specially for tracking in non-static environments. How hard would it be? If developer count is a problem, maybe I can try implementing that, with some guidance from the maintainers.

Let me know

@quantumjot
Copy link
Owner

Hi @henriquenunez - thanks for the feedback!

This is a great idea, and I know that @lupinthief was interested in something similar.

I don't have much bandwidth to tackle this at the moment, but if you're interested in implementing it, I would welcome the contribution. The Kalman filters can be modified to have a "control vector" added, which might be a good place to start:

class MotionModel {
public:
// Default constructor for MotionModel
MotionModel(){};
// Initialise a motion model with matrices representing the motion model.
// A: State transition matrix
// H: Observation matrix
// P: Initial covariance estimate
// Q: Estimated error in process
// R: Estimated error in measurements
// Certain parameters are inferred from the shapes of the matrices, such as
// the number of states and measurements
MotionModel(const Eigen::MatrixXd &A, const Eigen::MatrixXd &H,
const Eigen::MatrixXd &P, const Eigen::MatrixXd &R,
const Eigen::MatrixXd &Q);

@henriquenunez
Copy link
Author

Hello, thank you for the reply and sorry for the delay!

So, I got a bit more acquaintance to the code organization, and since my idea is to have a fector field to serve as the control for the motion model, a logical approach would be to pass this vector field to BayesianTracker::set_motion_model, and tweaking MotionModel::update to use this field to estimate the next x_hat. Do you suggest making it in another way?

I also did not have time to inspect that much the linkage and TrackManager, would it require some change as well?

@quantumjot
Copy link
Owner

Yes, that sounds very reasonable!

I don't think the TrackManager should need any modification, just the MotionModel.

@lupinthief
Copy link

My use-case currently runs without the motion model at all, but might the implementation of a vector field offer an opportunity to define an irregular domain within which motion can occur? In my case, everything has to be in the sea in order to move at all. Maybe this could be represented by very strong priors against particular (land) locations? Possibly naive, but thought I'd mention it.

@henriquenunez
Copy link
Author

Hey,

As another thing I would like to ask is if there is a way you would suggest to aid a vector field. I believe that adding a vector map at this point, and then interpolate it, would be a good approach. A data structure specific to the vector field would have to be created then. Any ideas?

And also, @quantumjot I made a small tool to perform annotation on this type of dataset, and will help me compare if adding the vectors is actually helping the tracking or not. Hopefully I will have some results soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants