Reputation: 341
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
?
Upvotes: 4
Views: 2674
Reputation: 10850
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.
Upvotes: 1