Difference of Gaussian: different outputs in OpenCV and ImageMagick
convert "inp.jpg" -morphology Convolve DoG:15,100,0 "test.jpg" <- This is the imagemagick command I use to get the result of DoG.
In OpenCV, I do:-
g1 = cv2.getGaussianKernel(15,100)
g2 = cv2.getGaussianKernel(15,0)
DoGkernel = g1-g2
out = cv2.filter2D(img, -1 , DoGkernel)
input Image :- output Image:-
There is considerable difference. Am I doing something wrong? Any help would be appreciated.
What you see is not what is calculated. can you compare values calculated using opencv and imagemagick
oh..sure.. wlll do..
It might also be good to tell us what you trying to achieve with the DoG filter? Furthermore I expect that you are visualizing stuff in the wrong data container.