I'm beginning a computer vision project and I need to compute the horizontal and vertical Sobel's derivatives. I'm using Python together with Numpy and Scipy, specifically the ndimage.filters module.
I can't understand the difference between the return value and the output parameter.
output_x = np.zeros(image.shape)
output_y = np.zeros(image.shape)
filters.sobel(image, 1, output_x)
filters.sobel(image, 0, output_y)
return_val_1 = filters.sobel(image, axis=1)
return_val_2 = filters.sobel(image, axis=0)
If I plot the return values images and the outputs images I get different results. Why? Can you please help me? I'm quiet confused.