title: Length of each row of training matrix for SVM
body: <p>I have found an excellent/comprehensive post/answer related to this topic here <a href="https://stackoverflow.com/questions/14694810/using-opencv-and-svm-with-images">using OpenCV and SVM with images</a>. However, I have some questions I would like to clarify out from the answer in the link. (since i do  not have enough reputation to write a comment).</p>
  
  <p><strong>What I've been doing:</strong>
   I am using OpenCV SVM for training. The features used for the training matrix are obtained by computing the normalized mean R,G and B values for each image.Thus, in the training matrix, there are 4 columns in each row(or in each image). These columns correspond to the <strong><em>labels(1 or 0),</em></strong> ****normalized mean in r channel****, <strong><em>g</em></strong> and <strong><em>b</em></strong> channel.</p>
  
  <p>By the way, my original training file is a text file, which I will still convert to float[][], and evenutally into Mat object to feed into opencv's SVM. here's how the file looks like:</p>
  
  <p>1 0.267053 0.321014 0.411933<br>
  1 0.262904 0.314294 0.422802<br>
  .<br>
  .<br>
  0 0.29101 0.337208 0.371782<br>
  0 0.261792 0.314494 0.423714<br></p>
  
  <p><strong>Apparently</strong>, this contradicts to the statement from the link which states that the <strong>size of each row</strong> must be equivalent to the <strong>size of the image</strong>. Is it a protocol or some kind of a rule? I just cannot make sense as to why it should(if it is). </p>
  
  <p><strong>My question is</strong>, in constructing the training matrix, does the length of the each row have to correspond to the area or size of the image? Where as in the training matrix I've made, the length of each row is only 4. Is this wrong?</p>
  
  <p>In addition, does having only 3 features(3 columns) for training enough for classification/for SVM? Please guide me to the right path, I'm doubting if I should continue with this or if there's some other better approach to the problem.</p>
  
  <p>I hope I'll get to understand more of the concepts behind the steps of SVM. Articles or related samples would be appreciated!</p>