U-SQL/Cognitive Imaging OCR Hello World
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
.gitignore
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md

README.md

services platforms author
data-lake-analytics
dotnet
saveenr

U-SQL: Cognitive Imaging OCR Hello World

REFERENCE ASSEMBLY ImageCommon;
REFERENCE ASSEMBLY FaceSdk;
REFERENCE ASSEMBLY ImageEmotion;
REFERENCE ASSEMBLY ImageTagging;
REFERENCE ASSEMBLY ImageOcr;

@imgs =
    EXTRACT 
        FileName string, 
        ImgData byte[]
    FROM @"/usqlext/samples/cognition/{FileName}.jpg"
    USING new Cognition.Vision.ImageExtractor();

@ocrs =
    PROCESS @imgs
    PRODUCE FileName,
            Text string
    READONLY FileName
    USING new Cognition.Vision.OcrExtractor();

OUTPUT @ocrs
    TO "/ocr.csv"
    USING Outputters.Csv( outputHeader: true );