Ask Your Question

Ederman's profile - activity

2012-09-20 12:31:38 -0600 received badge  Student (source)
2012-09-20 03:58:06 -0600 asked a question Build Global GMM (Gaussian Mixture Model)

Hello, I am trying to build a global GMM for video frame. Then I want to extract the models single by single by descending order. I need to know which model is used most frequently, which is less, etc. Is there any sample code for this? Or any ideas? I didn't succeed in building GMM for video frame matrix that were captured yet. Hope to receive your help here. Than you in advance.

2012-08-16 03:51:57 -0600 asked a question Set Matrix Values with Ranges

Dear all, I am newly learning OpenCV, and now trying to allocate some values to a matrix within some range. My code is like this:

for ( int row = 0, i = 0; row < srcMat.rows; ++row, i ++ )
{
   uchar* p = medianMat.ptr ( row );
   for ( int col = 0, j = 0; col < srcMat.cols; ++ col, j ++ )
   {
   dstMat ( cv::Range::all(), cv::Range ( i * 5 +1, i * 5 + 4 )).setTo ( *p );
   data++;
   }
}

My problem here is, the "dstMat" is all zero outside the for loop. Besides, this code uses about 70-80 ms for each video frame, but I need at most 30 ms. Is there any more efficient way to do this? And how could I let "dstMat" keep those values outside the loop? Many thanks in advance. With regards.