Ask Your Question

Kenny's profile - activity

2017-06-15 08:55:04 -0600 received badge  Popular Question (source)
2014-03-10 13:08:39 -0600 answered a question iOS CvVideoCamera shows up sideways

Found a solution to the problem, I added the following two lines after the code that posted above:

CGAffineTransform xform = CGAffineTransformMakeRotation(-M_PI / 2);
image_view.transform = xform;
2014-03-06 01:37:51 -0600 asked a question iOS CvVideoCamera shows up sideways

Hi,

I have been working with JavaCV for a while for a AR.Drone project and decided to try something on the iOS. I am trying to use the iPhone camera as a simulator for my drone so that I don't have to fly it all the time.

I am using CvVideoCamera to get the image. I got the image but for some reason the image is rotated 90 degree clockwise. Did anyone run into that problem before?

Here is what I have in the viewDidLoad method:

[super viewDidLoad];

self.video_camera = [[CvVideoCamera alloc] initWithParentView:image_view];
self.video_camera.delegate = self;
self.video_camera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionBack;
self.video_camera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
self.video_camera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset352x288;
self.video_camera.defaultFPS = 30;
self.video_camera.grayscaleMode = NO;

Thank you, Kenny