OCR

No algorithm description given

Recognize text in your images with this algorithm. It uses Tesseract, "probably the most accurate open source OCR engine available". For more information on the development of Tesseract, refer to:  https://code.google.com/p/tesseract-ocr/ Input:  Option 1: Binary data only Option 2: JsonObject with following properties: " src" (Required) : A string that holds a link to the image. The link could be a direct link to a file in the Data API, a direct link to a file accessible via internet (http link) or a base64 encoded image. "hocr" (Optional) : An object that has as properties the options that Tesseract accepts as parameters. Some of the crucial ones explained below. confidenceCutoff (Optional): An integer value that enables the user to specify the quality of the output depending on the confidence values output by the algorithm. Default is 0. Output: The output includes the full result and optionally confidence values by each word recognized. It is a JsonObject with properties " result " and " compound ". Parameters: Prepare your JsonObject with the " hocr " property to make use of different parameters of Tesseract. Some very useful ones are: tessedit_create_hocr: This outputs an XML file that includes the locations and confidence values of each word recognized. We parse this file and return the relevant information to you in the output object. tessedit_char_whitelist:  Just put the characters that you specifically do want recognized in your image here in a string. tessedit_char_blacklist: Just put the characters that you do not want recognized in your image here in a string. Basic Mode: Pipe in binary data (an image with the text you would like recognized), get back a JsonObject that includes the result text. Advanced Mode: We support all the parameters that Tesseract supports. For a full list of possible parameters, refer to:  http://www.sk-spell.sk.cx/tesseract-ocr-parameters-in-302-version . Sample input: Sample output: { "result": " \n \n \n \nAALGORITHMIA \nDIEGO \nOPPENHEIMER \nCEO \ndiego@algorithmia.com \no \n@doppenhe \n206.552.9054 \nQ \ndoppenheimer \n \n \n",   "compound": { "": 95, "AALGORITHMIA": 53, "DIEGO": 88, "OPPENHEIMER": 88, "CEO": 88, "diego@algorithmia.com": 83, "o": 77, "@doppenhe": 85, "206.552.9054": 84, "Q": 55, "doppenheimer": 79 }

Tags
(no tags)

Cost Breakdown

30 cr
royalty per call
1 cr
usage per second
avg duration

Cost Calculator

API call duration (sec)
×
API calls
=
Estimated cost
per calls
for large volume discounts
For additional details on how pricing works, see Algorithmia pricing.

Internet access

This algorithm has Internet access. This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.


To understand more about how algorithm permissions work, see the permissions documentation.

1. Type your input

2. See the result

Running algorithm...

3. Use this algorithm

curl -X POST -d '{{input | formatInput:"curl"}}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/tesseractocr/OCR/0.1.0
View cURL Docs
algo auth
# Enter API Key: YOUR_API_KEY
algo run algo://tesseractocr/OCR/0.1.0 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import com.algorithmia.*;
import com.algorithmia.algo.*;

String input = "{{input | formatInput:"java"}}";
AlgorithmiaClient client = Algorithmia.client("YOUR_API_KEY");
Algorithm algo = client.algo("algo://tesseractocr/OCR/0.1.0");
AlgoResponse result = algo.pipeJson(input);
System.out.println(result.asJsonString());
View Java Docs
import com.algorithmia._
import com.algorithmia.algo._

val input = {{input | formatInput:"scala"}}
val client = Algorithmia.client("YOUR_API_KEY")
val algo = client.algo("algo://tesseractocr/OCR/0.1.0")
val result = algo.pipeJson(input)
System.out.println(result.asJsonString)
View Scala Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://tesseractocr/OCR/0.1.0")
           .pipe(input)
           .then(function(output) {
             console.log(output);
           });
View Javascript Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://tesseractocr/OCR/0.1.0")
           .pipe(input)
           .then(function(response) {
             console.log(response.get());
           });
View NodeJS Docs
import Algorithmia

input = {{input | formatInput:"python"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('tesseractocr/OCR/0.1.0')
print algo.pipe(input)
View Python Docs
library(algorithmia)

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("tesseractocr/OCR/0.1.0")
result <- algo$pipe(input)$result
print(result)
View R Docs
require 'algorithmia'

input = {{input | formatInput:"ruby"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('tesseractocr/OCR/0.1.0')
puts algo.pipe(input).result
View Ruby Docs
use algorithmia::*;

let input = {{input | formatInput:"rust"}};
let client = Algorithmia::client("YOUR_API_KEY");
let algo = client.algo('tesseractocr/OCR/0.1.0');
let response = algo.pipe(input);
View Rust Docs
Discussion
  • {{comment.username}}