Ask Your Question
0

Kalman filter compile error

asked 2015-10-15 12:57:27 -0600

Berkay gravatar image

updated 2015-10-15 13:02:02 -0600

ı found a kalman tutorial from http://opencvexamples.blogspot.com/20... when ı build this codes, VS 2012 gives me error C2100: illegal indirection about line which includes KF.transitionMatrix = *(Mat_<float>(4, 4) << 1,0,1,0, 0,1,0,1, 0,0,1,0, 0,0,0,1); what can ı do to vanish this error?

edit retag flag offensive close merge delete

Comments

1
sturkmen gravatar imagesturkmen ( 2015-10-15 13:13:46 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2015-10-16 03:48:54 -0600

updated 2015-10-16 03:49:35 -0600

That piece of code is just plain incorrect because you are adding a pointer to a smart pointer, which is unusual in C++. Not sure why the pointer should be there.

KF.transitionMatrix = *(Mat_<float>(4, 4) << 1,0,1,0, 0,1,0,1, 0,0,1,0, 0,0,0,1);

should at least be

KF.transitionMatrix = (Mat_<float>(4, 4) << 1,0,1,0, 0,1,0,1, 0,0,1,0, 0,0,0,1);

as you can see in the official Kalman filter example!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-10-15 12:57:27 -0600

Seen: 493 times

Last updated: Oct 16 '15