Lines Matching refs:CvMat
78 CvEM::CvEM( const CvMat* samples, const CvMat* sample_idx,
79 CvEMParams params, CvMat* labels )
156 const CvMat* p = params.weights;
163 "floating-point matrix (CvMat) of 'nsamples' x 'nclusters' size" );
168 const CvMat* m = params.means;
175 "floating-point matrix (CvMat) of 'nsamples' x 'dims' size" );
180 const CvMat* w = params.weights;
187 "1d floating-point vector (CvMat) of 'nclusters' elements" );
193 const CvMat* cov = params.covs[k];
200 "floating-point matrix (CvMat) of 'dims' x 'dims'" );
209 CvEM::predict( const CvMat* _sample, CvMat* _probs ) const
224 CvMat diff, expo;
240 expo = cvMat( 1, nclusters, CV_64FC1, buffer );
241 diff = cvMat( 1, dims, CV_64FC1, (double*)buffer + nclusters );
249 CvMat* u = cov_rotate_mats[k];
303 bool CvEM::train( const CvMat* _samples, const CvMat* _sample_idx,
304 CvEMParams _params, CvMat* labels )
308 CvMat* sample_idx = 0;
347 CV_CALL( covs = (CvMat**)cvAlloc( nclusters * sizeof(*covs) ));
348 CV_CALL( cov_rotate_mats = (CvMat**)cvAlloc( nclusters * sizeof(cov_rotate_mats[0]) ));
368 CvMat sample = cvMat( 1, dims, CV_32F );
369 CvMat prob = cvMat( 1, nclusters, CV_64F );
398 CvMat *w = 0, *u = 0, *tcov = 0;
414 CvMat prob;
485 CvMat* hdr = 0;
487 CvMat* class_ranges = 0;
488 CvMat* labels = 0;
499 CvMat src = cvMat( 1, dims, CV_32F );
500 CvMat dst = cvMat( 1, dims, CV_64F );
536 CV_CALL( hdr = (CvMat*)cvAlloc( max_count*sizeof(hdr[0]) ));
538 hdr[0] = cvMat( 1, dims, CV_32F );
549 CvMat avg;
573 void CvEM::kmeans( const CvVectors& train_data, int nclusters, CvMat* labels,
574 CvTermCriteria termcrit, const CvMat* centers0 )
576 CvMat* centers = 0;
577 CvMat* old_centers = 0;
578 CvMat* counters = 0;
613 CvMat* temp;
777 CvMat* centered_sample = 0;
778 CvMat* covs_item = 0;
779 CvMat* log_det = 0;
780 CvMat* log_weights = 0;
781 CvMat* cov_eigen_values = 0;
782 CvMat* samples = 0;
783 CvMat* sum_probs = 0;
798 CvMat whdr, iwhdr, diag, *w, *iw;
918 CvMat* u = cov_rotate_mats[k];
982 CvMat* cov = covs[k], _mean, _sample;
1090 const CvMat* CvEM::get_means() const
1095 const CvMat** CvEM::get_covs() const
1097 return (const CvMat**)covs;
1100 const CvMat* CvEM::get_weights() const
1105 const CvMat* CvEM::get_probs() const