img box filter

#!  usr/bin/python
#   coding=utf-8

import numpy as np
import cv2
from scipy import ndimage

img_original = cv2.imread('/Users/jax/Desktop/car.jpg', 0)
g_3x3 = np.ones((3, 3)) / 9.0

g3 = ndimage.convolve(img_original, g_3x3)

cv2.imwrite('box_filter.jpg', g3)

你可能感兴趣的:(img box filter)