public function extractTextFromLocalFile($localFile, $language, $useDefaultDictionaries)
    {
        $strURI = Product::$baseProductUri . '/ocr/recognize?language=' . $language . '&useDefaultDictionaries=';
        $strURI .= ($useDefaultDictionaries) ? 'true' : 'false';
        $signedURI = Utils::sign($strURI);
        $stream = file_get_contents($localFile);
        $responseStream = Utils::processCommand($signedURI, 'POST', 'json', $stream);
        $json = json_decode($responseStream);
        return $json;
    }
public function extractTextFromLocalFile($localFile, $language, $useDefaultDictionaries)
    {
        $strURI = Product::$baseProductUri . '/ocr/recognize?language=' . $language . '&useDefaultDictionaries=';
        $strURI .= ($useDefaultDictionaries) ? 'true' : 'false';
        $signedURI = Utils::sign($strURI);
        $stream = file_get_contents($localFile);
        $responseStream = Utils::processCommand($signedURI, 'POST', 'json', $stream);
        $json = json_decode($responseStream);
        return $json;
    }
public function extractTextFromLocalFile ( $ localFile , $ language , $ useDefaultDictionaries ) { $ strURI = Product :: $ baseProductUri . '/ocr/recognize?language=' . $ language . '&useDefaultDictionaries=' ; $ strURI .= ( $ useDefaultDictionaries ) ? 'true' : 'false' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ stream = file_get_contents ( $ localFile ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ stream ) ; $ json = json_decode ( $ responseStream ) ; return $ json ; }
Extract OCR or HOCR Text from Images without using Storage.

@param string $localFile Filename of image.
@param string $language Language of document to recogniize.
@param string $useDefaultDictionaries Allows to correct text after
recognition using default dictionaries.

@return object
Extract OCR or HOCR Text from Images without using Storage .