different result in grabcut (Bug #1652)
Description
This simple test seems to reproduce a bug in grabcut segmentation.
History
Updated by Alexander Shishkov almost 13 years ago
- Target version deleted ()
Updated by Andrey Kamaev almost 13 years ago
Thanks for your report, but it is not a bug.
GrabCut uses kmeans which uses random numbers for the initial guess. So results from subsequent runs can be slightly different.
- Status changed from Open to Cancelled
- Assignee set to Andrey Kamaev
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0
Updated by Ilya Lysenkov almost 13 years ago
You can get the same results by explicitly setting the seed of the random numbers generator. Add these lines before each call of the grabCut function:
RNG &rng = theRNG(); rng.state = 0xffffffff;