2014-01-15 40 views
0

即時通訊使用tesseract OCR,它只能讀取300 dpi的圖像,當我使用UIImage選取器控制器相機拍攝的照片72 dpi的圖像我怎樣才能以300 dpi像iOS應用程序股票應用程序中的圖像?使用Tesseract的iOS

回答

0

我在iPad與iOS7採用正方體和下面的代碼成功地呈現出的UIImagePickerController,我得到的圖像回來,我可以很容易地OCR通過​​正方體:

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是一個實例在視圖控制器的界面中定義的變量。

+0

感謝您的回覆,我發現問題,這是當我使用CGRect的裁剪方法時,它不會讀取 – user3191104