title: How to run letter_recog.cpp example of OpenCV 3 successfullly?
body: <p>I am trying to run the <strong>letter_recog.cpp</strong> example with the 64-bit OpenCV 3. But during the process, it report the debug: <strong>Expression: vector subscript out of range</strong>. </p>
  
  <p>When I step into the OpenCV source code to find out what is wrong, and it stops at the line of the <strong>memcpy(&amp;subsets[split.subsetOfs], &amp;w->wsubsets[wsplit.subsetOfs], ssize*sizeof(int));</strong>. </p>
  
  <p>It is one line of the function <strong>int DTreesImpl::addTree(const vector&amp; sidx )</strong>.</p>
  
  <p>In the letter_recog.cpp example, I choose <strong>the build_rtrees_classifier</strong>. The train data after the <strong>prepare_train_data(data, responses, ntrain_samples)</strong> is </p>
  
  <p>And the debug error happens in the function of <strong>model = StatModel::train(tdata, RTrees::Params(10,10,0,false,15,Mat(),true,4,TC(100,0.01f)));</strong></p>
  
  <p>Can anyone tell me what is wrong? Or how can I run the `<strong>letter_recog.cpp</strong> example successfully? Because I do not have enough reputation points, I can not post image. </p>
  
  <p>Thanks a lot!`</p>