twelve17 / openalpr-ios

Xcode Framework for the openalpr library
GNU General Public License v3.0
116 stars 35 forks source link

Image Orientation #18

Closed nicpro85 closed 8 years ago

nicpro85 commented 8 years ago

Currently the library work well if the iPhone is held horizontally but fail to parse image if the device is held vertically. I'm trying to find a way to rotate the image without redrawing for performance reasons or flag openalpr with the image orientation. Any one with a solution?

nicpro85 commented 8 years ago

Okay you simply need to change the orientation on the AVCaptureConnection object let connection = self.videoOutput.connectionWithMediaType(AVMediaTypeVideo) connection.videoOrientation = .Portrait

where self.videoOutput is an AVCaptureVideoDataOutput