stebest's repos on GitHub
JavaScript · 2 人关注
chinese-independent-blogs
中文独立博客列表
Vue · 1 人关注
aipaper-fe
1 人关注
BlogComments
Blog's comments
Cuda · 1 人关注
cuda-tutorial
CUDA 编程指南学习
C · 0 人关注
algo
数据结构和算法必知必会的50个代码实现
0 人关注
APlayer-Controler
A Cute AP-Controler
Vim script · 0 人关注
Apprentice
A dark, low-contrast, Vim colorscheme.
0 人关注
Auto-GPT
An experimental open-source attempt to make GPT-4 fully autonomous.
0 人关注
awesome
😎 Awesome lists about all kinds of interesting topics
0 人关注
awesome-kubernetes
A curated list for awesome kubernetes sources :ship::tada:
0 人关注
Background
Vim script · 0 人关注
badwolf
A Vim color scheme.
0 人关注
bark
🔊 Text-Prompted Generative Audio Model
Jupyter Notebook · 0 人关注
bcolor
0 人关注
BlogImage
0 人关注
bot-on-anything
Connect AI models (like ChatGPT-3.5/4.0, Baidu Yiyan, New Bing, Bard) to apps (like Wechat, public account, DingTalk, Telegram, QQ). 将 ChatGPT、必应、文心一言、谷歌Bard 等对话模型连接各类应用,如微信、公众号、QQ、Telegram、Gmail、Slack、Web、企业微信、飞书、钉钉等。
0 人关注
build-your-own-x
🤓 Build your own (insert technology here)
0 人关注
career
0 人关注
certbot-letencrypt-wildcardcertificates-alydns-au
certbot'renewing letencrypt certificate plugin - automatic verification aliyun/tencentyun/godaddy dns
0 人关注
chatgpt-demo
A demo repo based on OpenAI API.
0 人关注
ChatGPT-Telegram-Workers
Deploy your own Telegram ChatGPT bot on Cloudflare Workers with ease.
0 人关注
chromium_demo
A series of demos to show how chromium is constructed.
0 人关注
cmake-project-template
This project is aimed at jump-starting a C/C++ project that can build libraries, binaries and have a working unit test suite. It uses CMake build system and is deliberately completely minimal.
0 人关注
coding-interview-university
A complete computer science study plan to become a software engineer.
0 人关注
ComfyUI-Workflows-ZHO
我的 ComfyUI 工作流合集 | My ComfyUI workflows collection
0 人关注
comprehensive-rust
This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.
0 人关注
cpp-httplib
A C++ header-only HTTP/HTTPS server and client library
0 人关注
CS-Books
📚 Computer Science Books 计算机技术类书籍 PDF
Perl · 0 人关注
ctf-tools
tổng hợp tool ctf
0 人关注
developer2gwy
公务员从入门到上岸,最佳程序员公考实践教程
stebest

stebest

Nothing is difficult if you give it up
🏢  全栈/管理
V2EX 第 235786 号会员,加入于 2017-06-16 11:07:16 +08:00
根据 stebest 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
stebest 最近回复了
45 天前
回复了 Haku 创建的主题 Python Python 中如何在内存中优雅地提取视频帧?
如果还是希望用 opencv video capture 处理,1.可以将视频流使用虚拟摄像头输出,用 opencv 打开即可。
2.使用流媒体协议,opencv video capture 应该也直接支持。
3.使用 videogear 的 netgear ,一个比较简单的例子,具体可以去看文档
server end

```
# import required libraries
from vidgear.gears import VideoGear
from vidgear.gears import NetGear

# open any valid video stream(for e.g `test.mp4` file)
stream = VideoGear(source="test.mp4").start()

# Define Netgear Server with default parameters
server = NetGear()

# loop over until KeyBoard Interrupted
while True:

try:

# read frames from stream
frame = stream.read()

# check for frame if Nonetype
if frame is None:
break

# {do something with the frame here}

# send frame to server
server.send(frame)

except KeyboardInterrupt:
break

# safely close video stream
stream.stop()

# safely close server
server.close()
```

client end

```
# import required libraries
from vidgear.gears import NetGear
import cv2


# define Netgear Client with `receive_mode = True` and default parameter
client = NetGear(receive_mode=True)

# loop over
while True:

# receive frames from network
frame = client.recv()

# check for received frame if Nonetype
if frame is None:
break

# {do something with the frame here}

# Show output window
cv2.imshow("Output Frame", frame)

# check for 'q' key if pressed
key = cv2.waitKey(1) & 0xFF
if key == ord("q"):
break

# close output window
cv2.destroyAllWindows()

# safely close client
client.close()
```
45 天前
回复了 Haku 创建的主题 Python Python 中如何在内存中优雅地提取视频帧?
不过实际上还是会在本地创建文件,video capture 本身不支持直接从 memory 中读取,如果是自己控制数据流,用一个迭代器或者生成器把每一帧转 cv mat 就可以
45 天前
回复了 Haku 创建的主题 Python Python 中如何在内存中优雅地提取视频帧?
@Haku 如果只是希望在内存中方便读取,使用 tmpfile import tempfile
import cv2

my_video_bytes = download_video_in_memory()

with tempfile.NamedTemporaryFile() as temp:
temp.write(my_video_bytes)

video_stream = cv2.VideoCapture(temp.name)

# do your stuff.
45 天前
回复了 Haku 创建的主题 Python Python 中如何在内存中优雅地提取视频帧?
@stebest 挺简单的,给个示例吧 import numpy as np
import cv2 as cv
import io

image_stream = io.BytesIO()
image_stream.write(connection.read(image_len))
image_stream.seek(0)
file_bytes = np.asarray(bytearray(image_stream.read()), dtype=np.uint8)
img = cv.imdecode(file_bytes, cv.IMREAD_COLOR)
45 天前
回复了 Haku 创建的主题 Python Python 中如何在内存中优雅地提取视频帧?
额,这个倒是跟视频没啥关系,不就是想用 bytesIO 嘛。
2022-09-27 10:50:06 +08:00
回复了 stebest 创建的主题 求职 虚拟人系统研发实习生招聘
@kizunai 不是 hh ,你有兴趣也可以做一个
2022-09-27 09:28:14 +08:00
回复了 stebest 创建的主题 求职 C++后台开发工程师招聘
@whi147 也有精通的人,不过确实,不用精通,但有能独立完成项目的能力
2021-03-25 15:01:29 +08:00
回复了 baifei 创建的主题 程序员 除了程序员,还有多少人做坚持写独立博客、原创博客?
荒废了一年,又重新买了域名准备开门了。
https://dfine.tech
2020-11-05 11:32:23 +08:00
回复了 lambdafate 创建的主题 程序员 有没有简洁的博客主题推荐一下
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   891 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 20:16 · PVG 04:16 · LAX 13:16 · JFK 16:16
Developed with CodeLauncher
♥ Do have faith in what you're doing.