-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyn2.py
More file actions
34 lines (25 loc) · 803 Bytes
/
syn2.py
File metadata and controls
34 lines (25 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 30 00:31:43 2018
@author: saswatdas
"""
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while(1):
_, frame = cap.read()
#hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
#lower_red = np.array([30,150,50])
#upper_red = np.array([255,255,180])
#mask = cv2.inRange(hsv, lower_red, upper_red)
#res = cv2.bitwise_and(frame,frame, mask= mask)
#kernel = np.ones((15,15),np.float32)/225
#smoothed = cv2.filter2D(res,-1,kernel)
#cv2.imshow('Original',frame)
#cv2.imshow('Averaging',smoothed)
blur = cv2.GaussianBlur(frame,(15,15),0)
cv2.imshow('Gaussian Blurring',blur)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cv2.destroyAllWindows()
cap.release()