\seekquarry\yioop\libraryComputerVision

Class used to encapsulate verious methods related to computer vision that might be useful for indexing documents. These include recognizing text in images

Summary

Methods
Properties
Constants
ocrEnabled()
recognizeText()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

ocrEnabled()

ocrEnabled() : boolean

Returns whether or not this Yioop system can recognize text in images Currently, this is down using the tesseract external program, so this method checks if a path to that program has been defined.

Returns

boolean —

whether a path to tesseract has been defined.

recognizeText()

recognizeText(string  $image_path, array  $langs = array(\seekquarry\yioop\configs\DEFAULT_LOCALE)) : string

Given a file path to a image file and set of target languages, returns the text in those languages that the image contained

Parameters

string $image_path

a filepath to an image

array $langs

locale_tags of languages we want to extract text for

Returns

string —

text extracted from image