solvePnPRansac returns different results

asked 2013-11-22 07:17:01 -0600

tenta4 gravatar image

updated 2013-11-22 07:17:21 -0600

Hi, i use solvePnPRansac function in in Android application in native. With identical input parameters it returns different results (rvec, tvec and status)

Can this appears or i have memory corruptions?

edit retag flag offensive close merge delete

Comments

Could you post your code??

wuling gravatar imagewuling ( 2013-11-22 08:22:31 -0600 )edit

Ransac stands for "RANdom Sample Consensus". As it's a probabilistic algorithm, it's result can change even for constant input parameters. I haven't tried, but what happens if you reset the RNG before every call to solvePnPRansac? http://stackoverflow.com/questions/9748401/how-to-reset-the-random-number-generator-in-opencv

FooBar gravatar imageFooBar ( 2014-02-04 01:23:32 -0600 )edit