在 Android 手机上每 66 毫秒拍照一次以进行颜色分析(心率监视器)
我正在做一个大学最后一年的项目,其中涉及为 Android 制作一个医疗应用程序,作为练习,我必须制作一个心率监测器应用程序。
我发现最好的方法是在打开闪光灯的情况下将相机放在手指上,观察血液中颜色的变化。
这就是问题出现的地方,是否可以用相机每 66 毫秒拍摄一张照片,然后比较每对照片的强度变化,从而计算心跳次数?或者我最好录制视频并分析每一帧以寻找变化。
哎呀,甚至可以只查看视频预览并比较每一帧。
下面整齐地列出了我需要回答的问题
最好的方法是什么,拍照、录制视频或查看实时预览。
我可以在互联网上访问任何人们尝试过类似事情的帖子或页面
任何人都有基本的知识吗?我应该采取的方法来获得可以在时间范围内比较的两个图像。
最后,如果我确实采用基本的每 66 毫秒拍摄一张照片的方法,我该怎么做才能确保以正确的时间间隔拍摄照片
I'm doing a final year project at university which involves making a medical application for Android, as a practice I have to make a heart rate monitor app.
I have worked out that the best way to do this is to look for colour changes in your blood when holding the camera against your finger with the flash switched on.
This is where the problems come into play, is it possible to take a photo every 66 milliseconds on the camera, then compare each pair of photos for any intensity changes in order to count a heart beat? or am I better off recording a video and analysing each frame looking for a change.
Heck is it even possible to just look at the video preview and compare each frame.
The questions I need answering for this problem are neatly listed below
What is the best method for this, taking photos, recording video or looking at the live preview.
Is there any posts or pages I can visit on the internet where people have attempted similar things
Anyone got a basic method I should do to get two images that I can compare within the time frame.
Lastly If I do take the basic take a picture every 66 milliseconds approach, what can I do to ensure the picture is taken at the correct time intervals
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为实时预览是正确的答案。拍照不会那么快发生。录制视频和后处理是可能的,但我不知道这将如何适用于实时心脏监护仪。
您可以检查条形码扫描仪源代码,使用实时预览来扫描条形码。
Android 不是硬 RTOS。 AFAIK 你不可能将时间精确到 66 毫秒。
I would think that live preview would be the right answer. Taking photos is not -- they will not happen anywhere near that quickly. Recording video and post-processing it would be possible, but I fail to see how this will be applicable for a real-time heart monitor.
You can examine the Barcode Scanner source code, which uses the live preview to scan for barcodes.
Android is not a hard RTOS. AFAIK it will be impossible for you to precisely time things to be 66 milliseconds.