title: What exactly is done with cv2.resize?
body: <p>My colleague and I were importing data from a thermal camera using this Python script:</p>
  <pre><code>      try:
      while True:
        data = q.get(True, 500)
        if data is None:
          break
           data = cv2.resize(data[:,:], (80, 60))
  #          f.write(data)
        minVal, maxVal, minLoc, maxLoc = cv2.minMaxLoc(data)
  
  #          img = raw_to_8bit(data)
        np.savetxt(&quot;uvc-capture-file.txt&quot;,np.array(data))
  #         f.write(&quot; &quot;)
        display_temperature(img, minVal, minLoc, (255, 0, 0))
        display_temperature(img, maxVal, maxLoc, (0, 0, 255))
        cv2.imshow('Lepton 2.5 Radiometry', img)
        cv2.waitKey(1)
  
      cv2.destroyAllWindows()
    finally:
      libuvc.uvc_stop_streaming(devh)
      f.close()
    print &quot;done&quot;
  finally:
    libuvc.uvc_unref_device(dev)
  finally:
  libuvc.uvc_exit(ctx)
  
  if __name__ == '__main__':
   main()
  </code></pre>
  <p>Everything works, but in the line <code>data = cv2.resize(data[:,:], (80, 60))</code> we changed the resize from 640, 480. We aren't sure why the script was originally that, but when we ran it, it gave us a nice text document with 640x480 numbers in a matrix.</p>
  <p>The only issue is that the thermal sensor only collects data from 80x60 area. Where is it getting the &quot;filler&quot; numbers from? The script works the same way with 80x60, but instead of giving us a text document with a 640x480 matrix of numbers, it gave us one that was 80x60. Any idea why?</p>