The camera app that comes with the HTC Desire HD allows the user to touch the screen at the point they wish focus on; a bounding indicator comes up around the area and the auto-focus does its magic. Thus a captured image can have a far point in the top right and a near point in the bottom left, with the user able to select which of these is in focus before taking the picture.
I've been asked to create an app that allows the user to select the region of interest after a picture is taken, obviously it would be good for this region to be in focus before taking the picture as described above.
My app so far does the auto-focus thing on the centre of the image but I can find no reference to selecting the region to focus on in any documentation. Any ideas.
AF point selection button. In this way you can very easily, quickly and accurately select exactly what part of your scene or subject you want in sharp focus, but still place it wherever you want in the shot.
What you are requesting is manual focusing.
To do this with the help of Android SDK's alone is not possible as of today. You will need to set the focal length on the camera. But if you see the Camera SDK for android then you would have noticed there is an API to get the focal point but not to set it.
All the market apps that tell it is performing manual focus is not true, you can run your simple experiment to check this. Keep a far and near object in the camera preview and sequentially try to focus the far and near object, when the focus is on the far object then the near object should be blurred and when the focus is on the near object then the far object should be blurred.. which will not happen with the market apps. (I have tried a couple, if you find one which truly does this then do let me know :) )
But if you are doing an OEM app (Where you have the buildable BSP with you for the device) then yes it is possible to do this (As the app that you have mentioned does). And this is how they do it (Note - These steps might not be comprehensive but it will give you idea..)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With