Page 1 of 1

Use front camera like light sensor

Posted: 09 Nov 2014 12:45
by colabi
Hi Martin

Do you think is possible to add a trigger that monitor front camera for luminescence?
And use this like a light sensor? For devices without a light sensor?
(Maybe with an option to do that only if screen is on)

Thanks

Re: Use front camera like light sensor

Posted: 10 Nov 2014 17:24
by Martin
Hi,

Using the camera is probably extremely battery consuming. Maybe you could take a picture and use a function getPixelColor to check one pixel for it's brightness from time to time but I doubt that this works well.

Regards,
Martin

Re: Use front camera like light sensor

Posted: 10 Nov 2014 21:16
by MURTUMA
Martin's siggertion might work(*) but requires analyzing multiple pixels and averaging the results to even out noise and other things that would cause unwanted/inaccurate results.

*propably not good and fast enough to be satisfactory.