title: read pixel values of a binary image in opencv
body: <p>I'm new in openCV.I want to read an binary grayscale image.I printed value of pixels in matlab and It was only 0 and 1 but when I read the same image in openCV the value of pixels is between 0 and 255 (and not just  0 and 255). I want to read the image in a way that pixels are just 0 or 1 (OR 0 and 255).
  This is how I read the image and print the pixels value: </p>
  
  <pre><code>Mat watermarkImage;  
  watermarkImage = imread("C:\\path\\to\\image\\logo.png");
  Mat wmrk = watermarkImage.clone();
  Mat tmp2(64, 64, CV_32FC1);
  resize(wmrk, wmrk , tmp2.size());
  //wmrk.convertTo(wmrk,CV_32FC1, 1.0/255.0);
  for(int i=0 ; i&lt;64; i++)
  {
      for(int j=0 ; j&lt;64 ; j++)
      {
          cout&lt;&lt;int(wmrk.at&lt;uchar&gt;(i,j))&lt;&lt;"  ";
      }
      cout&lt;&lt;endl;
  }
  </code></pre>