FUSION2018 icon indicating copy to clipboard operation
FUSION2018 copied to clipboard

h and ObserveLandmarks functions

Open ravindraji4 opened this issue 5 years ago • 1 comments

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!!

ravindraji4 avatar Jul 20 '18 12:07 ravindraji4

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

mbrossar avatar Jul 20 '18 16:07 mbrossar