gpt4 book ai didi

android - Android 版 OpenCV VideoCapture

转载 作者:太空狗 更新时间:2023-10-29 14:17:35 25 4
gpt4 key购买 nike

我想用 OpenCV 开发一个 Android 应用程序测量我的心率(手指放在传感器上)。正如我在使用 org.opencv.highgui.VideoCapture 时发现的那样,我每秒只能获得 8-10 帧 (fps)。

如何获得更高的帧率?

我不想显示图像,我(只)想记录 15 秒,用金字塔调整大小(五次)并将其存储到 cv::Mat 中以供进一步使用加工。有没有办法接收 25-30 fps 以及如何将它逐帧传输到 cv::Mat

最佳答案

你绝对不需要 25-30 fps。

Nyquist–Shannon sampling theorem (又名 Kotelnikov 采样定理)告诉我们:

If a function x(t) contains no frequencies higher than B hertz, it is completely determined by giving its ordinates at a series of points spaced 1/(2B) seconds apart.

如果心率约为 1 Hz,则意味着您需要大约 2 Hz 的采样率。

看看:http://adblogcat.com/a-camera-preview-with-a-bounding-box-like-google-goggles/ .它提供了相当流畅的视频预览,您可以选择 ROI。

关于android - Android 版 OpenCV VideoCapture,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20455006/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com