title: Reading MONO 16-bit images using PyCapture2
body: <p>I am using the <code>CMLN-13S2M-CS</code> camera from PointGrey. This camera has a MONO 16-bit pixel format.Using the <code>PyCapture2</code> wrapper from PointGrey I am unable to retrieve the image the camera is recording.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>import sys
  import numpy
  import PyCapture2
  
  ## Connect camera
  bus = PyCapture2.BusManager()
  c = PyCapture2.Camera()
  c.connect(bus.getCameraFromIndex(0))
  
  ## Configure camera format7 settings
  fmt7imgSet = PyCapture2.Format7ImageSettings(0, 0, 0, 1296, 964, PyCapture2.PIXEL_FORMAT.MONO16)
  fmt7pktInf, isValid = c.validateFormat7Settings(fmt7imgSet)
  c.setFormat7ConfigurationPacket(fmt7pktInf.recommendedBytesPerPacket, fmt7imgSet)
  
  ## Start capture and retrieve buffer
  c.startCapture()
  im = c.retrieveBuffer()
  
  print im.getData().shape
  print numpy.max(im.getData())
  </code></pre>
  
  <p>The following is returned by the <code>print</code> statements: <code>(2498688,)</code> and <code>240</code>. The shape is exactly <code>2 x (964 x 1296)</code>. How should I reshape this? Also, the maximum value when saturated is <code>255</code>. This is odd as this corresponds to MONO 8 Pixel format. What am I doing wrong?</p>