开发者

Can I set the focal length of iphone camera programmatically?

Hey therer, I am wondering whether I could f开发者_如何学Cix the focal length of iPhone camera to certain distance, such as 120mm. Is it possible to achieve this programmatically?

Thank you for your time and help :D


No, the iPhone camera is fixed focal length (5.4mm for the iPhone 4) and cannot zoom - perhaps you mean focal distance which is the distance from the lens at which an image is in focus? If you mean focal distance, then this answer is of no use to you. :-(

If you want to simulate the effect of different focal length (i.e. zoom), you can simply crop the image, although your cropped image will be of lower resolution than the uncropped original.

The iPhone 4 has a real focal length of 5.4mm, and a full-frame equivalent focal length of 29.4mm. Your desired 120mm focal length is also full-frame equivalent.

120/29.4 is about 4. So crop out the middle 1/4 (25%) of the height and width of the iPhone photo using your application, and you have simulated the Field of View of a 120mm lens.

The iPhone 4 takes photos at 2592x1936, so the cropped photo will be 648x484. That's approximately VGA resolution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜