Reputation: 243
while exploring android camera2 api,i came to know that we can set exposure level as we wish, but the thing is i want to control exposure level for a focused region,for example, if we tap on any part of camera screen,it will be focused and after that we can increase/decrease the exposure level for that focused region. As i am new to android, if you have any idea how to approach this or any tutorial that will be helpful to me.
Upvotes: 4
Views: 307
Reputation: 81
An alternative to what Eddy suggested is to take several captures at different exposures. Then try to blend different regions of each image together - this is more or less what some HDR algorithms do. But again, it depends on what you're actually trying to do - and if you're trying to do this in realtime, go with what Eddy said.
"There are different ways to obtain HDR images, but the most common one is to use photographs of the scene taken with different exposure values." (more info)
Upvotes: 1
Reputation: 18137
This isn't possible at the hardware level. Normal mobile device image sensors only have a single exposure value for the entire image, so there's no way to make a region have a longer exposure than others.
You can just brighten or darken a region in post-processing, but this is just digital multiplication, so it won't help you with under- or over-exposed areas. But if you want to do this, you can send the image to the GPU, for example, and then write an OpenGL ES shader to render a section of the image with a multiply factor.
Upvotes: 1