久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何用python制作虛擬相機?

How to make a virtual camera with python?(如何用python制作虛擬相機?)
本文介紹了如何用python制作虛擬相機?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在 python 中嘗試使用 openCV,我制作了一個簡單的網(wǎng)絡攝像頭,它只會以黑白顯示,但我想知道是否有可能以某種方式將它與不和諧聯(lián)系起來,所以每當我打電話給朋友時,他看到我是黑色的和白色.`

I am experimenting with openCV in python and I made a simple webcam that will only show you in black and white but I was wondering if it was possible to somehow connect it to discord so whenever I call a friend he sees me in black and white.`

import cv2

capture = cv2.VideoCapture(0)

 capture.set(3, 640)
 capture.set(4, 480)
 capture.set(10, 300)

 while True:
     sucess, img = capture.read()
     img = cv2.Canny(img, 100, 100)
     cv2.imshow("Webcam", img)
     if cv2.waitKey(1) & 0xFF == ord('q'):
         break

推薦答案

這可能會晚,但請檢查一下 pyvirtualcam

This may be late but check this out pyvirtualcam

先安裝:

pip install pyvirtualcam

你可以這樣:

import pyvirtualcam
import numpy as np

with pyvirtualcam.Camera(width=1280, height=720, fps=30) as cam:
    while True:
        frame = np.zeros((cam.height, cam.width, 4), np.uint8) # RGBA
        frame[:,:,:3] = cam.frames_sent % 255 # grayscale animation
        frame[:,:,3] = 255
        cam.send(frame)
        cam.sleep_until_next_frame()
        cam.sleep_until_next_frame()

這篇關于如何用python制作虛擬相機?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

How should I verify a log message when testing Python code under nose?(在鼻子下測試 Python 代碼時,我應該如何驗證日志消息?)
Patch __call__ of a function(修補函數(shù)的 __call__)
How to call self in a mock method of an object in Python?(如何在 Python 中對象的模擬方法中調用 self?)
Mocking only a single method on an object(僅模擬對象上的單個方法)
Mocking a subprocess call in Python(在 Python 中模擬子進程調用)
Checking call order across multiple mocks(檢查多個模擬的調用順序)
主站蜘蛛池模板: a在线观看 | 亚洲码欧美码一区二区三区 | 亚洲高清在线观看 | 国产成人精品免费视频 | 欧美日韩在线一区二区 | 亚洲国产成人精品女人久久久 | 欧美极品少妇xxxxⅹ免费视频 | 中文字幕一区二区三区精彩视频 | 亚洲欧美在线观看 | 精品小视频 | 久久三区 | 天天操妹子| 免费xxxx大片国产在线 | www.色.com| 在线视频久久 | 韩日一区二区三区 | 久久精品久久久久久 | 久国久产久精永久网页 | 另类二区 | www.av7788.com| 日韩精品成人在线 | 亚洲综合色网站 | 亚洲国产精品福利 | 国产一区二区三区www | 久久国产精品一区二区三区 | 羞羞视频免费观 | 国产日韩欧美另类 | 黄色网址在线免费观看 | 精品一区在线 | a级免费观看视频 | 亚洲人成人一区二区在线观看 | 中文字幕免费视频 | 天天干天天爱天天操 | 在线国产视频 | 亚洲国产精品久久 | 91精品国产一区二区三区蜜臀 | 国产91视频免费 | 91久久精品国产91久久 | 国产成人午夜高潮毛片 | 久久久精品网站 | 99免费在线视频 |