Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Measuring Light Intensities from Android Camera

So I want to know how you would measure different light intensities when a finger is pressed on the android device's camera with flash on. I have read throughout the internet about exposure, light sensors, etc., but I don't know where to start off :(. So far I have made a program that opens up the camera using surfaceholders and surfaceviews with flash on as well. I put my thumb against the camera and I can see that my thumb turned to a pinkish color with small color changes throughout the area of my thumb. How can I take this information from the camera and use them for other stuff, like measuring heart rate? Thank you so much.

like image 354
Navio53 Avatar asked Oct 07 '12 23:10

Navio53


People also ask

Can a smartphone measure light intensity?

This study showed that the light intensity from different voltages can be measured with a light sensor from a smartphone. These results showed that the light sensor from a smartphone can be used to measure light intensity.

Can a camera measure light intensity?

For single image capture, an imaging sensor can measure a certain range of light intensity per pixel. A typical sensor can distinguish the intensity of incident light in 256 to 4096 different levels, or 8-12 bits.

Is there an app to measure light intensity?

Lux Meter is a simple application for your Android device. It measures illuminance with your device's light sensor.

How do I check my lux level on my phone?

Locate the light sensor on your device. It is usually near the top on the front of the phone (the side with the screen). You can do this by running your fingertip over the surface of the phone while your lux meter app is open.


2 Answers

You might want to investigate looking at ratios between red and blue light, instead of absolute brightness. You may find that this measurement helps get rid of some of the common mode noise likely to exist in an absolute brightness measurement.

Your blood doesn't actually turn blue when it isn't oxygenated, but it does change to a different shade of red. You might be able to make a primitive O2 saturation measurement with that camera. You can pick up an actual home meter for O2 saturation / pulse meter at a local pharmacy for less than $50, if you want some real data to correlate with. I believe that the "real" sensors correlate an IR measurement with red light.

You also might want to see if there is some kind of auto white-balance going on with the image sensor that needs to be disabled (this would be model specific to whatever device you are using).

like image 76
Barry Gackle Avatar answered Nov 13 '22 01:11

Barry Gackle


What are you trying to do? I'll assume that you're trying to measure your heart rate by the amount of blood in your finger. so basically you have 2 states, one with more blood and one with less.

I would start by measuring the average brightness of the picture like Totoo mentioned. After you know how to do this, make a program that will identify what state the finger is in, from the picture - Say, if the average brightness is less than 50, your heart just pumped, making it state 2. Otherwise, it hasn't, and it will be in state 1.

After you know how to do this, you can know when it switches from state 1 to state 2 and the other way around. And by dividing the amount of state switches by (time passed * 2), you'd get the heart rate.

hope I helped :)

like image 44
Troglodit Avatar answered Nov 13 '22 02:11

Troglodit