2018-01-04から1日間の記事一覧
import cv2 import numpy as np cap = cv2.VideoCapture(0) while True: _,frame = cap.read() edges = cv2.Canny(frame,100,200) cv2.imshow('canny',edges) key = cv2.waitKey(1) & 0xff if key == ord('q'): break
https://qiita.com/shim0mura/items/3ab2a67c78eafd456c32 import cv2 from matplotlib import pyplot as plt cap = cv2.VideoCapture(0) while True: _,frame = cap.read() lap = cv2.Laplacian(frame, cv2.CV_32F, ksize=3) cv2.imshow('laplacian',lap) k…
https://qiita.com/shim0mura/items/3ab2a67c78eafd456c32 import cv2 from matplotlib import pyplot as plt cap = cv2.VideoCapture(0) while True: _,frame = cap.read() sobely5 = cv2.Sobel(frame, cv2.CV_32F, 0, 1, ksize=5) cv2.imshow('sobely5',so…
下のチュートリアルがうまく動かない https://docs.opencv.org/3.1.0/df/d0c/tutorial_py_fast.html cv2.FastFeatureDetector()はcv2.FastFeatureDetector_create()とする。 https://github.com/opencv/opencv/issues/6534 あと、cv2.drawKeypoints(gray, kp…