title: Understanding D3D11_BOX
body: <p>I've made some modifications to <a href="https://github.com/NVIDIA/video-sdk-samples/tree/master/nvEncDXGIOutputDuplicationSample" rel="nofollow noreferrer">https://github.com/NVIDIA/video-sdk-samples/tree/master/nvEncDXGIOutputDuplicationSample</a> to convert the desktop image to a cv mat.</p>
  <p>I have a dx11 2d texture and I want the 640x640 center of the texture (cropping in opencv is slow). CopySubresourceRegion (<a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-copysubresourceregion" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-copysubresourceregion</a>) works until I pass a D3D11_BOX. When I convert it to a cv mat, it's just a black screen.</p>
  <pre><code>my_box.left = 1600;
  my_box.top = 480;
  my_box.right = 1600;
  my_box.bottom = 480;
  </code></pre>
  <p>Can anyone give me a hint as to what I might be missing?</p>