Python: PyOpenCV2.1: Median filter

13 08 2012

20120813

ใส่ตัวกรอง Median ให้ภาพหน่อย ทำให้ภาพเบลอ

#——————————————————————————-
# Name: test pyOpenCV2.1
# Purpose: 1.3 apply Median filter to image
#
# Author: Phanu
#
# Created: 13/08/2012
# Copyright: (c) Phanu 2012
# Licence: CopyLeft
#——————————————————————————-

from pyopencv import *

filename = r’cappuccino.jpg’
img = imread(filename)
out = img.clone()

#Medain filter
smooth(img, out, CV_MEDIAN)

imshow(“PyopenCV: input image”,img)
imshow(“PyopenCV: output image”,out)
waitKey(0)