title: How to get first and second derivative matrix of an image
body: <p>I am trying to compute the gradient orientation of an image, in the first part, I need to compute the first-order derivative of an image (in both horizontal and vertical direction), so I applied Gaussian filter in scipy module in order to get it, but I got an error "AttributeError: 'int' object has no attribute 'shape'"</p>
  
  <p>I am using python version 3.7.0 and the opencv version is 3.4.2.</p>
  
  <p>The function documentation is here:<a href="https://scipy.github.io/old-wiki/pages/SciPyPackages/Ndimage.html" rel="nofollow noreferrer">scipy.ndimage.filters.gaussian_filter</a></p>
  
  <pre class="lang-py prettyprint-override"><code>g_x = np.zeros(image_new.shape) 
  ndimage.filters.gaussian_filter(image_new, 2*np.sqrt(2), (0,1), 1 ,g_x )
  </code></pre>
  
  <p>Is this correct? or how to compute the first derivative(and second derivative) of an image.</p>