Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

GMM assignment incorrect in grabcut.cpp?

$
0
0
Hello, I was looking at http://code.opencv.org/attachments/934/grabcut.cpp. If "x" is a 3d vector and "z" is the gmm component that generated it, whichComponent() at L134 computes argmax p(x | z) by calling double GMM::operator()( int ci, const Vec3d color ) at L117. The returned "res" in this latter method is not multiplied by coefs[ci]. p(z | x) = p(z, x) / p(x) = p(x | z) p(z) / p(x). I think it should really be assigning argmax p(x | z) p (z) since we want to compute the argmax p(z | x) to assign the gmm component, correct? (i.e change L141 from double p = (*this)( ci, color ); to double p = (coefs[ci])*(*this)( ci, color );. Can anyone explain if my above reasoning is incorrect? Thanks!

Viewing all articles
Browse latest Browse all 41027


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>