How to get the pulse rate via camera - iphone

Hello and welcome to my first question on stackoverflow.
I have found an app in the AppStore called „heart rate free“ the app tracks the pulse rate with the camera on the phone. To measure to pulse you have to put your finger onto the camera when the flashlight is turned on. I compared the readings with my Apple Watch and it’s seems legit (I wore my watch after the measurements)
My question:
How is the app programmed to measure the pulse when the camera sees only a red point?
And is it possible to build this with a webcam and python?
screenshot of the app

Related

Detecting when device in cardboard headset in Unity

I'm building a Unity Cardboard app, and would like to detect when the device is in the headset. The NFC in theory has this data, but it does not seem to be exposed in the API. I would like to have the app automatically enter VR mode when in the headset, without the user needing to toggle in and out of a VR mode.
Basically, I want Cardboard.vrModeEnabled to be automatically updated when you enter or exit a headset.
Is this possible? Thanks!
It used to be in the (non-Unity) SDK but was deprecated, for several reasons. For one, the NFC sensors on phones are placed in different places, so the detection was not uniformly reliable. For another, using the sensor this way drains battery quickly.
There are a lot of cardboard models on the market. a lot of them don't come with an NFC tag. so i wouldn't count on it.
Best approach for me is to start in VR mode, when the user touches the screen, disable VR mode for 10 seconds since the last touch and then go back to VR mode.

Is it possible to programmatically capture iPhone 5S slow motion video?

I couldn't find an answer to this question, and looking at Apples own apps like iMovie on iOS, the video picker does not offer a slow motion option on the iPhone 5S.
The image picker offers very little control over the video. If you are willing to dive deeper into the APIs you can use AVFoundation to capture your video and manipulate the camera properties as you see fit.
iOS 7 introduces a new AVCaptureDeviceFormat class that will give you the maximum and minimum supported frame-rates for the capture device, and you can use these to set a custom frame rate on the camera itself. I don't have an iPhone 5S to hand so I can't actually verify whether this API goes all the way down to 120FPS.

How to implement an iOS metal detector app?

I want to implement a Metal Detector app which will react to a magnetic field in the phones surroundings.
How do I read the magnetic field readings from the magnetometer on the iPhone? Does anyone have sample code for accessing the magnetometer readings directly?
Thanks!
I would recommend you look at the O'Reilly book called iOS Sensor that is coming out. They have an entire chapter (6) on the magnetometer and a sample app.
iOS Sensor Programming
Apple Sample Code for Reading the Raw Values from the Magnetometer
No. You can't.
UPDATE : there is no metal detecting components in iPhone. However, there is a magnetometer available since iPhone 3GS. The Compass App makes use of the sensor to detect direction. It just reads magnetic North, but not reading magnetic fields surrounding. Therefore, you can't make a metal detector with it.
Physics Fact: Metal does not generate magnetic fields. Magnets do.
p.s. correct me if I am wrong.
There is already an app which does this. Check this and this blog.
This is what the description says,
The app has an adjustable sensitivity and makes an audible sound
signal if the sensitivity reaches a medium level. The phone needs to
be shook once to be calibrated if you intend to use the device again.
The app makes use of the magnetometer on the iPhone to find
interference with the compass to detect metal objects. Just hover the
backside of your mobile, the area under the camera, over the metal and
the app should find the metal and there should be an increase in
sensitivity.
However I am not sure if it is a fake app or it can be really done this way. Try downloading that and check it yourself. It is a free app.

html5 and heat sensors

I'm new to html5 programming and was thinking of building an html5 app for iphone. I was wondering if there was any information in the API about sensing temperature on touch in the api? My app depends on the temperature of ones finger when they touch the screen. Is there anyway to measure this? IF not, is there a way to measure the amount of pressure applied to the screen?
Thanks!
Room temperature: Yes.
The temperature of your thumb on the iPhone screen: no.
The pressure of your thumb on the screen: also no.
Remember - the iPhone "touch" works on capacitance, not "mechanical pressure".

Change the sound from camera [duplicate]

In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser).
I am quite certain it's not possible. AFAIK, Red Laser doesn't actually take a "normal" picture but uses UIGetScreenImage() (undocumented but nevertheless allowed for App Store apps) to make a screenshot of the live video feed. Since the OS does not play sound on this occasion, they are free to play their own sound.
Edit for clarification: As of OS 3.1, you are free to substitute the standard camera interface with your own controls. So you could place your own shutter button on the screen and play your own sound when the user taps it, but AFAIK there is now way to get rid of the OS's standard shutter sound.
AFAIK the standard camera shutter sound cannot be changed via SDK.
This answer supports that. You can replace your own sound by switching sound files, but not in an app.
Some answers such as this one suggest using AVCapture, but this method takes video screenshots, which reduces the image quality. I
t appears that you can't change the shutter sound because you could make it a silent sound, and capturing images covertly is against the App Store policy. See this answer.
TLDR:
The only way to change the shutter sound is to use a video screen grab.