Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import numpy as np
- cap = cv2.VideoCapture(0)
- cap.set(cv2.CAP_PROP_FRAME_WIDTH, 160)
- cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 120)
- while(1):
- _, frame = cap.read()
- laplacian = cv2.Laplacian(frame, cv2.CV_64F)
- # cv2.imshow('oringinal', frame)
- cv2.imshow('laplacian',laplacian)
- k = cv2.waitKey(5) & 0xFF
- if k == 27:
- break
- cv2.destroyAllWindows()
- cap.release()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement