1

iPhoneカメラの露出領域を中心点だけでなく、指定された正方形に制限する方法はありますか?関心領域外の明るい領域または暗い領域が、全体的な露出に影響を与えています。現在、exposurePointOfInterestを使用していますが、これでは中心点のみを指定できます。

4

1 に答える 1

0

メソッドに CGPoint を渡すことができるようです。

例:

- (void) focusAtPoint:(CGPoint)point
{
    AVCaptureDevice *device = [[self videoInput] device];
    if ([device isFocusPointOfInterestSupported] && [device isFocusModeSupported:AVCaptureFocusModeAutoFocus]) {
        NSError *error;
        if ([device lockForConfiguration:&error]) {
            [device setFocusPointOfInterest:point];
              [device exposurePointOfInterest:location];
            [device setFocusMode:AVCaptureFocusModeAutoFocus];
            [device unlockForConfiguration];
        } else {
            id delegate = [self delegate];
            if ([delegate respondsToSelector:@selector(acquiringDeviceLockFailedWithError:)]) {
                [delegate acquiringDeviceLockFailedWithError:error];
            }

        }        

    }

}

http://developer.apple.com/library/mac/#documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html#//apple_ref/occ/instp/AVCaptureDevice/exposurePointOfInterestSupported

于 2013-01-02T21:50:36.840 に答える