Equivalent of Matlab filter2(filter, image, 'valid') in python -


i want know equivalent of matlab's filter2(filter, image, 'valid') function in python opencv or scikit-image library. concerned valid argument allows calculate convolution of filter , image without 0 padding image. aware of fact similar question posted on forum equivalent of filter2 function valid argument has not been described properly.

the documentation filter2 says filter2(h, x, shape) equivalent conv2(x,rot90(h,2),shape);

a python equivalent conv2 signal.convolve2d. equivalent you're looking is:

signal.convolve2d(x, np.rot90(h), mode='valid') 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -