This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
forked from purplecabbage/phonegap-plugins
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #870 from jcesarmobile/master
Moved ORCPlugin to my own repository
- Loading branch information
Showing
52 changed files
with
2 additions
and
14,331 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,5 @@ | ||
PhonegapOCRPlugin | ||
================= | ||
This plugin has been moved to: | ||
|
||
ocr plugin for phonegap using tesseract | ||
|
||
drag the tessdata folder to your phonegap project | ||
mark the checkbox "copy items into destination group" | ||
Choose the radio-button "Create folder references for any added folders" | ||
|
||
drag the dependencies folder to your phonegap project | ||
mark the checkbox "copy items into destination group" | ||
Choose the radio-button "Created groups for any added folders" | ||
|
||
drag OCRPlugin.h, OCRPlugin.m, claseAuxiliar.h and claseAuxiliar.mm | ||
|
||
drag OCRPlugin.js to your www folder | ||
|
||
Add the plugin to cordova.xml | ||
|
||
com.jcesarmobile.OCRPlugin OCRPlugin | ||
|
||
|
||
Thanks to suzuki for compiling tesseract in this post | ||
http://tinsuke.wordpress.com/2011/11/01/how-to-compile-and-use-tesseract-3-01-on-ios-sdk-5 | ||
|
||
I have included an index.html with an example. | ||
|
||
It uses the camera function with destinationType.FILE_URI (IMPORTANT!!!) | ||
|
||
|
||
// A button will call this function | ||
// | ||
function capturePhoto() { | ||
// Take picture using device camera and retrieve image as base64-encoded string | ||
navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 100, | ||
destinationType: destinationType.FILE_URI }); | ||
} | ||
// Call the plugin when a photo is successfully retrieved | ||
// | ||
function onPhotoURISuccess(imageURI) { | ||
callNativePlugin({url_imagen: imageURI}); | ||
} | ||
|
||
function callNativePlugin( returnSuccess ) { | ||
OCRPlugin.callNativeFunction( nativePluginResultHandler, nativePluginErrorHandler, returnSuccess ); | ||
} | ||
function nativePluginResultHandler (result) { | ||
alert("ok: "+result); | ||
} | ||
function nativePluginErrorHandler (error) { | ||
alert("error: "+error); | ||
} | ||
|
||
https://github.com/jcesarmobile/PhonegapOCRPlugin |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.