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

h and ObserveLandmarks functions #2

Open
ravindraji4 opened this issue Jul 20, 2018 · 1 comment
Open

h and ObserveLandmarks functions #2

ravindraji4 opened this issue Jul 20, 2018 · 1 comment

Comments

@ravindraji4
Copy link

Dear Martin,

Thank you very much for sharing the code and the helping out also for the first Issue.

In function h which is widely used in all the Update functions. the syntax is following:
y_bar = z(1:2,:)./z(3,:);
but I was having the division issue. So I solved it in the following way
A1= z(1,:);A2= z(2,:);
B= z(3,:);
y = [A1./B;A2./B];

the size of y should be 2x25?.......well it works but I wanted to ask if that is correct.

The second issue I am facing is in ObserveLandmarks function.

The algorithm stopped with the following:
Error using randsample (line 131)
K must be less than or equal 0 for sampling without
replacement.

Error in ObserveLandmarks (line 45)
idx = randsample(find(validityMain == 1),1);

Error in mainExperiment (line 205)
ObserveLandmarks(trackerMain,trackerBis,dirImage,IdxImage,...

It means my values are greater than zero or complex. Could you please guide me how to solve this issue.

Thank you very much in anticipation and keep up the great work!!

@mbrossar
Copy link
Owner

Dear,
For the first question, your correction is the same as the original for my Matlab version (2017A), so you can use it as it solve your problem.

For the second problem, this happens when the tracker do not have point to track. A solution is to add a test at line 45 before the loop
if length(find(validityMain == 1)) > 0
that end after the loop

Best

Martin

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

2 participants