Closed zxp771 closed 4 years ago
RANSAC is a randomized algorithm, so it is expected to get different results every time. The reason why you don't see this in OpenCV is that the same random seed is used there every time when applied. You can simulate this "deterministic" behavior in GC-RANSAC by fixing the seed of variable "random_generator" in file "uniform_sampler.h".
Hi @danini Thanks for your reply. Could you tell me how to fix the seed of variable "random_generator"?
Hey!
Here, replace "rand_dev()" with some constant, e.g., 0.
Also, remove this line: https://github.com/danini/graph-cut-ransac/blob/0776ef77c2b32422b06d6251713df5a68db00b16/examples/cpp_example.cpp#L160
@danini Thx
Hi @danini Thanks for your great work and sharing. I tried your code on d2-net matching test. I noticed the Homography results are different even I ran the same data in the same parameters(I mean the same threshold) which the fluctuations can not be ignored. Could you give me some suggestions to get a stable result?