title: OpenCV with DirectX sample error
body: <p>I am trying to run an OpenCV with DirectX example: d3dsample.cpp from<a href="https://github.com/Itseez/opencv/blob/master/samples/directx/d3dsample.hpp" rel="nofollow"> [here]</a>. But it crashes on </p>
  
  <blockquote>
    <p>initializeContextFromD3D11Device</p>
  </blockquote>
  
  <p>The error is "Access violation executing ..." (look like it is not possible to initialize the context from D3D to OpenCL. I have no idea to solve with this problem. </p>
  
  <p>I found some possible duplicate at OpenCV question board <a href="http://answers.opencv.org/question/68290/directx-interop-in-30-nvidia-card/" rel="nofollow"> [here]</a>, but they are no any progress through last year. </p>
  
  <p>If some one success to build this sample code, please give a suggestion. 
  PS: I am using OpenCV 3.1 on Visual Studio 2013 (vc120), Nvidia GTX980 graphics card. </p>
  
  <p>Update:
  I am trying to debug with both d3d10_interop and d3d11_interop. 
  The d3d10_interop gave me a exeption: </p>
  
  <blockquote>
    <p>C:\OpenCV\3.1\sources\modules\core\src\directx.cpp:449: error:
    (-222) OpenCL: Can't create context for DirectX interop in function
    cv::directx::ocl::initializeContextFromD3D10Device\n" ...} ...}</p>
  </blockquote>