title: Saving and Reading Binary Image
body: <p>Hello I want to save image after threshold:</p>
  
  <pre><code>binary=cv2.threshold(fark, 30, 255, cv2.THRESH_BINARY)[1]
  binary.astype(np.uint8)
  print binary.shape
  cv2.imwrite("path"+str(counter)+".png",binary)
  </code></pre>
  
  <p>binary.shape output is: (320,240) ---> This is what I want</p>
  
  <p>But when i read the image:</p>
  
  <pre><code>image=cv2.imread(path)
  print image.shape
  </code></pre>
  
  <p>output is (320,240,3) , and when i check out the array it has values like 254,253 </p>
  
  <p>What can i do for this stuation and what is the best file format to save binary image?</p>