2010-08-08 5 views
11

iPhone 4의 iOS4에서 셔터 속도, 조리개 또는 ISO와 같은 저수준 스틸 카메라 설정을 수동으로 설정하는 방법이 있습니까? 나는 그것이 공식 SDK에 존재한다고 생각하지는 않지만 누군가가 이것을 허용하는 일부 비공개 API를 발견했을 것입니다.iPhone iOS4 로우 레벨 카메라 컨트롤?

꽤 괜찮은 조명이라 할지라도 피사체가 전혀 움직이지 않으면 모션 블러를 일으키는 가장 느린 1/15 초 셔터 속도로 촬영해야하기 때문에 iPhone 4 카메라를 사용할 수 없게됩니다.

감사합니다.

+0

. http://stackoverflow.com/a/12939981/83853 –

+0

적어도 iOS 6의 비공개 API로이 작업을 수행 할 수 있습니다. 바라건대 그들은 다음 릴리스에서 공개 될 것입니다. 내 상세한 대답을 여기에서 확인하십시오 : http://www.stackoverflow.com/a/12939981/83853 –

+0

좋은 질문. AVCaptureDevice가 당신이 할 수있는 최선일 것 같아요. 당신이 제어하고자하는 모든 설정에 접근 할 수 있다고 생각하지 않습니다. 즉, 시작할 수있는 좋은 장소 일 수 있습니다. http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html#//apple_ref/doc/c_ref/AVCaptureDevice –

답변

1

직접적으로. 버그 보고서를 제출하십시오.

예, 사용 가능한 비공개 API가있을 수 있지만 이는 제한적으로 사용됩니다.

+0

두 버전의 오래된 OS에서 버그 신고하기 특히 기능 요청 일 때 쓸모없는 것처럼 보입니다. –

+1

iOS 6는이 API를 공개 API로 제공하지 않으므로 관련성이 있습니다. –

+0

그러나 정확한 질문과 관련이 없습니다. 2 세이므로 iOS 4를 간단하게 지정할 수 있습니다. 아마도 질문은 iPhone 4와 호환되는 모든 iOS 버전을 언급하도록 편집해야합니까? –

-2

이보십시오, 나는 당신을 위해 유용 할 수있다 : 당신은 적어도 아이폰 OS 6에서 개인 API를 사용하여이 작업을 수행 할 수

@interface MyViewController() 

@property (nonatomic, retain) IBOutlet UIImageView *imageView; 

@property (nonatomic, retain) IBOutlet UIToolbar *myToolbar; 

@property (nonatomic, retain) OverlayViewController *overlayViewController; 

@property (nonatomic, retain) NSMutableArray *capturedImages; 

// toolbar buttons 

- (IBAction)photoLibraryAction:(id)sender; 

- (IBAction)cameraAction:(id)sender; 


@end 


@implementation MyViewController 
- (void)viewDidLoad 

{ 

    self.overlayViewController = 

     [[[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil] autorelease]; 



    // as a delegate we will be notified when pictures are taken and when to dismiss the image picker 

    self.overlayViewController.delegate = self; 

    self.capturedImages = [NSMutableArray array]; 


    if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) 
    { 

     // camera is not on this device, don't show the camera button 

     NSMutableArray *toolbarItems = [NSMutableArray arrayWithCapacity:self.myToolbar.items.count]; 

     [toolbarItems addObjectsFromArray:self.myToolbar.items]; 

     [toolbarItems removeObjectAtIndex:2]; 

     [self.myToolbar setItems:toolbarItems animated:NO]; 

    } 

} 


- (void)viewDidUnload 
{ 

    self.imageView = nil; 

    self.myToolbar = nil; 



    self.overlayViewController = nil; 

    self.capturedImages = nil; 

} 


- (void)dealloc 
{ 

    [_imageView release]; 

    [_myToolbar release]; 



    [_overlayViewController release]; 

    [_capturedImages release]; 



    [super dealloc]; 

} 


- (void)showImagePicker:(UIImagePickerControllerSourceType)sourceType 
{ 

    if (self.imageView.isAnimating) 

     [self.imageView stopAnimating]; 



    if (self.capturedImages.count > 0) 

     [self.capturedImages removeAllObjects]; 



    if ([UIImagePickerController isSourceTypeAvailable:sourceType]) 
    { 

     [self.overlayViewController setupImagePicker:sourceType]; 

     [self presentModalViewController:self.overlayViewController.imagePickerController animated:YES]; 

    } 

} 



- (IBAction)photoLibraryAction:(id)sender 
{ 

    [self showImagePicker:UIImagePickerControllerSourceTypePhotoLibrary]; 

} 



- (IBAction)cameraAction:(id)sender 
{ 

    [self showImagePicker:UIImagePickerControllerSourceTypeCamera]; 

} 


// as a delegate we are being told a picture was taken 

- (void)didTakePicture:(UIImage *)picture 
{ 

    [self.capturedImages addObject:picture]; 

} 


// as a delegate we are told to finished with the camera 

- (void)didFinishWithCamera 
{ 

    [self dismissModalViewControllerAnimated:YES]; 


    if ([self.capturedImages count] > 0) 
    { 

     if ([self.capturedImages count] == 1) 
     { 

      // we took a single shot 

      [self.imageView setImage:[self.capturedImages objectAtIndex:0]]; 

     } 

     else 

     { 

      // we took multiple shots, use the list of images for animation 

      self.imageView.animationImages = self.capturedImages; 



      if (self.capturedImages.count > 0) 

       // we are done with the image list until next time 

       [self.capturedImages removeAllObjects]; 



      self.imageView.animationDuration = 5.0; // show each captured photo for 5 seconds 

      self.imageView.animationRepeatCount = 0; // animate forever (show all photos) 

      [self.imageView startAnimating]; 

     } 

    } 

} 



@end 
+0

답변을 편집하고 코드를 읽을 수 있도록 포맷하십시오. – kleopatra

+0

포스터는 카메라에 낮은 수준의 액세스 권한을 묻습니다. 실제로 카메라에 액세스 할 수있는 예제가 있지만 확실히 낮은 수준은 아닙니다. 나는 이것이 그를 위해 도움이된다고 생각하지 않는다. – s1m0n

+0

@ s1m0n : - 나는 그를 도우려고했지만, 도움이 될 수도 있다고 언급했다. 나는 나의 최고 수준에 따라 그를 도우려고 노력했다 ... – anshika

관련 문제