title: Using EM in opencv 2.4.2
body: <p>I'm asking for help. 
  I cannot build my project because of EM class. I use opencv 2.4.2</p>
  
  <p>I cannot find where the problem is. Could someone advice?</p>
  
  <pre><code>cv::TermCriteria Termination;
  Termination.type=CV_TERMCRIT_ITER;
  Termination.maxCount=num_numIter;
  cv::EM model=cv::EM(NClusters,cv::EM::COV_MAT_SPHERICAL,Termination);
  model.train(groupped_one_person_features);
  </code></pre>
  
  <p>At last line a get LINK ERR, I don't know how to create object of class EM.
  NClusters is int, what else can be wrong?</p>
  
  <p>I have used: <code>#include "opencv2/ml/ml.hpp"</code></p>
  
  <p>This code results in these errors:    </p>
  
  <blockquote>
    <p>2   error LNK2019: unresolved external symbol "public: virtual bool
    __cdecl cv::EM::train(class cv::_InputArray const &amp;,class cv::_OutputArray const &amp;,class cv::_OutputArray const &amp;,class
    cv::_OutputArray const &amp;)"
    (?train@EM@cv@@UEAA_NAEBV_InputArray@2@AEBV_OutputArray@2@11@Z)
    referenced in function "void __cdecl compute_LBPH_patterns_EM(struct
    ArrayData *,struct Pattern *,int,int)"
    (?compute_LBPH_patterns_EM@@YAXPEAUArrayData@@PEAUPattern@@HH@Z)  D:\Work\EBIS2012CPlusPlus\Imet_v1.0_x64\Imet_v1.0_x64\compute_patterns.obj
    AND Error      1  error LNK2019: unresolved external symbol "public:
    virtual __cdecl cv::EM::~EM(void)" (??1EM@cv@@UEAA@XZ) referenced in
    function "void __cdecl compute_LBPH_patterns_EM(struct ArrayData
    *,struct Pattern *,int,int)" (?compute_LBPH_patterns_EM@@YAXPEAUArrayData@@PEAUPattern@@HH@Z) D:\Work\EBIS2012CPlusPlus\Imet_v1.0_x64\Imet_v1.0_x64\compute_patterns.obj
    AND Error      3  error LNK2019: unresolved external symbol "public:
    __cdecl cv::EM::EM(int,int,class cv::TermCriteria const &amp;)" (??0EM@cv@@QEAA@HHAEBVTermCriteria@1@@Z) referenced in function "void
    __cdecl compute_LBPH_patterns_EM(struct ArrayData *,struct Pattern *,int,int)" (?compute_LBPH_patterns_EM@@YAXPEAUArrayData@@PEAUPattern@@HH@Z)   D:\Work\EBIS2012CPlusPlus\Imet_v1.0_x64\Imet_v1.0_x64\compute_patterns.obj</p>
  </blockquote>
  
  <p>Thanks a lot</p>