Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make CvVideoCamera not auto rotate?

My CvVideoCamera auto-rotates, and I would like it not to. This has been raised on the bugtracker, but there has been no activity for a while.

like image 262
fredley Avatar asked Feb 14 '13 14:02

fredley


People also ask

How do I stop my iPhone from rotating?

Swipe down from the top-right corner of your screen to open Control Center. Tap the Portrait Orientation Lock button to make sure that it's off.


1 Answers

Quick fix Before initialize the CVVideoCamera add these lines

NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationPortrait]; [[UIDevice currentDevice] setValue:value forKey:@"orientation"];

self.videoCamera = [[CvVideoCamera alloc] initWithParentView:self.previewImage]; self.videoCamera.delegate = self;

like image 177
Bill Karwin Avatar answered Sep 21 '22 11:09

Bill Karwin