4

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I already know that. Thanks. But I want to have 25-30 frames per second as I want to do several things with those videos.
I did took a look at your suggestion but could manage it with the new OCV version. Now I get around 30fps without any imageprocessing. It seems like opencv version 2.4.8 is working faster or its the android update.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.