我正在使用tesseract光学字符识别,它只读取300dpi的图像,当我使用UIImage拾取器控制器相机拍照时,图像是72dpi的,我如何才能像iOS中的股票应用程序那样以300dpi拍摄图像?
发布于 2014-01-15 23:32:58
我在带有iOS7的iPad上使用Tesseract,下面的代码成功地呈现了UIImagePickerController,并且我得到了一个图像,我可以很容易地用Tesseract进行光学字符识别:
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
iosPicker = [[UIImagePickerController alloc] init];
iosPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
iosPicker.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeImage, nil];
iosPicker.allowsEditing = NO;
iosPicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
iosPicker.cameraDevice = UIImagePickerControllerCameraDeviceRear;
iosPicker.modalPresentationStyle = UIModalPresentationFullScreen;
iosPicker.delegate = self;
[self presentViewController:iosPicker animated:YES completion:^{}];
}附注: iosPicker是在视图控制器的接口中定义的实例变量。
https://stackoverflow.com/questions/21132182
复制相似问题