Skip to content
Advertisement

Tag: imagefilter

Filter in opencv/python

I am trying to learn filters in opencv and running this code. But the problem is that when ı run the code it gives me an almost dark image and warns me with “c:/Users/fazil/Desktop/Yeni Metin Belgesi (3).py:19: RuntimeWarning: overflow encountered in ubyte_scalars result[j,i,a]=int((image[j,i,a]+image[j,i-1,a]+image[j,i+1,a]+image[j+1,i,a]+image[j-1,i,a]+image[j+1,i+1,a]+image[j+1,i-1,a]+image[j-1,i-1,a]+image[j-1,i+1,a])/9)”. And if ı comment these out and run code with the lines working with cv2.filter2d method it

Advertisement