Re: [mediacapture-image] Missing MediaTrack Settings (#208)

Thanks very much for your reply :)

What I am trying to do is build a light meter which can measure the ambient brightness (in lux) of what the camera is pointing at. I know that there is an API in Chrome to access to the ambient light sensor but this is only available behind a flag, measure the environment in general and not all devices have the sensor, so I would like to do it with the camera.

It is possible to calculate the ambient brightness by using the information from the camera as there are several app in the App Store and Google Play that do this. The theory is that when the camera produces a well exposed image, it is possible to calculate the ambient lux of what is in the field of view from the camera settings as this is effectively what the camera has done to produce a good exposure. So ideally I would let the camera auto expose and then read the values to calculate the ambient brightness. But from my experiments, it appears that I can only set the values, not read them. Is that correct? It would be very nice if we could read them while the camera was automatically exposing.

If I can only set the values, then it is still possible. I would need to build a system to analysis the image and adjust the values until the image was correctly exposed. I would then know the values to be able to calculate the lux.

So, on to the lux calculation. Here is some useful background on what I am trying to do:

https://www.conservationphysics.org/lightmtr/luxmtr1.html

Ideally I would like to get the following settings from the camera to help with my calculations:

- F number
- Aperture value
- Focal length
- ISO
- Exposure time
- Brightness

I may be able to get something working with less than all of these but it looks like the F number is critical to any calculation. This is usually in the EXIF of a photo. Is there any way to get this Media Stream Image Capture API? Maybe by reading the EXIF after calling takePhoto()?

Thanks for any help you can give :)

-- 
GitHub Notification of comment by Joe-Palmer
Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/208#issuecomment-495386508 using your GitHub account

Received on Thursday, 23 May 2019 21:11:28 UTC