简体   繁体   中英

VideoCapture with OpenCV for Android

I want to develop an Android app with OpenCV to measure my heart rate (finger on sensor). As I could figure out with use of org.opencv.highgui.VideoCapture, I only get 8-10 frames per second (fps).

How can I get a higher fps-rate?

I do not want to display the image, I (only) want to record for 15 seconds, resize it with a pyramid (five times) and store it into a cv::Mat for further processing. Is there a way to receive 25-30 fps and how do I transfer it frame-by-frame into a cv::Mat ?

You definitely do not need 25-30 fps.

The Nyquist–Shannon sampling theorem (AKA Kotelnikov sampling theorem) tells us:

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.

If the heart rate is approximately 1 Hz, it means that you need about 2 Hz sampling rate.

Take a look at: http://adblogcat.com/a-camera-preview-with-a-bounding-box-like-google-goggles/ . It gives quite a smooth video preview and you can select ROI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM