Sorry, this content is no longer available

Ask Your Question
0

iOS - access back camera error

asked Feb 20 '13

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Device : Iphone 5 IOS 6.0 XCode : 4.6 OpenCV lib: 2.4.3

I went through the tutorial, it worked fine in IOS6. However, when I want to switch to camera device on back (it is on front in tutorial), I modified the code:

self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;

to:

self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionBack;

However, there is nothing happened. is this a bug in OpenCV 2.4.3?

Besides, is OpenCV compatible with IOS 5.1 or lower versions? When I ran it in IOS 5.1, there is exceptions:

'NSInvalidUnarchiveOperationException', reason: 
           'Could not instantiate class named NSLayoutConstraint'
Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Apr 11 '13

ske gravatar image

For the second question you need to uncheck auto layout option in the storyboard.

Preview: (hide)

Question Tools

Stats

Asked: Feb 20 '13

Seen: 516 times

Last updated: Apr 11 '13