Manipulate[m = n;
Show[{
Plot[Sin[x], {x, -10, 10}, PlotRange -> {-5, 5},
PlotStyle -> {Thick, Red}],
Plot[Evaluate[
Accumulate[List @@ Normal@Series[Sin[x], {x, 0, m}]]], {x, -10, 10}]}],
{{n, 3}, 3, 25, 2}]
import cv2
import numpy as np
cap = cv2.VideoCapture()
while True:
_, frame = cap.read()
laplacia = cv2.Laplacian(frame, cv2.CV_64F)
cv2.imshow('original', frame)
cv2.imshow('laplacian', laplacia)
k = cv2.waitKey(5) & 0xFF
if k==27:
break
cv2.destroyAllWindows()
cap.release()
答案 0 :(得分:1)
cv2.Laplacian()
无法使用彩色图片。
您可以通过OpenCV文档了解更多信息.. Image Gradients
您必须将捕获的帧转换为灰度,然后应用Laplacian
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
您可以转换为灰度,如上所示..