python-scripts/scripts/OpenCV GrayImage/main.py

14 lines
301 B
Python
Raw Normal View History

2022-10-04 14:50:28 +00:00
import cv2
cap = cv2.VideoCapture(0)
while True:
success, img = cap.read()
2022-10-05 05:42:20 +00:00
blurImage = cv.GaussianBlur(img,(5,5),0)
2022-10-04 14:50:28 +00:00
grayImg = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
cv2.imshow("Grayimage", grayImg)
2022-10-05 05:42:20 +00:00
cv2.imshow("Blur", blurImage)
2022-10-04 14:50:28 +00:00
cv2.imshow("image",img)
cv2.waitKey(10)