开发者

Can the exposure time be manually adjusted for an iOS cameras?

I want to adjust the exposure of the iPhone/iPod touch camera with intimate detail. I would prefer to take a series of photos with decreasing exposure times to obtain a sequence of images (for HDR reconstruction). Is this possible?

If not, what's the next best thing? It seems you can set a point of interest in the image for the autoexposure. Perhaps I could search for a dark/light regio开发者_如何学Pythonn of the image and then use this exposurePointOfInterest to adjust the exposure, but this seems like a very indirect solution that is also error-prone. If anybody has tried an alternative, such an answer is also desirable.


As iOS gives control of frame durations by MinFrameDuration MaxFrameDuration

since exposure times vary based on fram rate and frame duration By setting min and max frame rate to a particular value You will be locking the fram rate. That will effect your exposure times. This is also very indirect way of controlling, may be it helps your case

some example would be like this:

if (conn.isVideoMinFrameDurationSupported)
    conn.videoMinFrameDuration = CMTimeMake(1, CAPTURE_FRAMES_PER_SECOND);
if (conn.isVideoMaxFrameDurationSupported)
    conn.videoMaxFrameDuration = CMTimeMake(1, CAPTURE_FRAMES_PER_SECOND);


Since you would have to decrease the shutter speed of the camera, this unfortunately does not appear to be possible, and more importantly, against the HIG:

Changing the behavior of iPhone external hardware is a violation of the iPhone Developer Program License Agreement. Applications must adhere to the iPhone Human Interface Guidelines as outlined in the iPhone Developer Program License Agreement section 3.3.7

Related article Apple Removes Camera+ iPhone App From The App Store After Developer Reveals Hack To Enable Hidden Feature.

If it can be done programatically, instead of with the hardware, you might have a chance, but then its just an effect on an image,not a true long exposure picture.

There are some simulated slow shutter apps that do get approved like Slow Shutter or Magic Shutter.

Related article: New iPhone Camera App “Magic Shutter” Hits The App Store.


This is supported since iOS 8: http://developer.xamarin.com/guides/ios/platform_features/intro_to_manual_camera_controls/

Have a look at AVCaptureExposureModeCustom and CaptureDevice.LockExposure...


I tried to do this for my motion activated camera app (Pocket Sentry) and I found that it is not possible to do this AND get approved in the app store.


I have been trying to do this myself. I think its possible only by using the exposure point of interest property. I am detecting the dark and bright spots and then adjusting the point accordingly.

Please refer : Detecting bright/dark points on iPhone screen

Does anyone know a better way to do this?


I am not too sure, but you should try using AVFoundation class to build the camera app, following the apple's sample code: AVCam Sample Code

And then try to leverage the exposureMode property of the Class:

exposureMode Class Reference

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜