Skip to content

Commit

Permalink
Merge pull request datalogics#60 from datalogics-mdawson/OCRAddText
Browse files Browse the repository at this point in the history
Update Optical Character Recognition samples
  • Loading branch information
datalogics-saharay authored Jun 1, 2021
2 parents 6ad0293 + 8a3231e commit 8ecf7ea
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ static void Main(string[] args)
//langList.Add(languageTwo);
ocrParams.Languages = langList;

// If the resolution for the images in your document are not
// 300 dpi, specify a default resolution here. Specifying a
// correct resolution gives better results for OCR, especially
// with automatic image preprocessing.
// ocrParams.Resolution = 600;

using (OCREngine ocrEngine = new OCREngine(ocrParams))
{
//Create a document object using the input file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ static void Main(string[] args)
//langList.Add(languageTwo);
ocrParams.Languages = langList;

// If your image resolution is not 300 dpi, specify it here. Specifying a
// correct resolution gives better results for OCR, especially with
// automatic image preprocessing.
// ocrParams.Resolution = 600;

using (OCREngine ocrEngine = new OCREngine(ocrParams))
{
//Create a document object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ static void Main(string[] args)
//langList.Add(languageTwo);
ocrParams.Languages = langList;

// If the resolution for the images in your document are not
// 300 dpi, specify a default resolution here. Specifying a
// correct resolution gives better results for OCR, especially
// with automatic image preprocessing.
// ocrParams.Resolution = 600;

using (OCREngine ocrEngine = new OCREngine(ocrParams))
{
//Create a document object using the input file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ static void Main(string[] args)
//langList.Add(languageTwo);
ocrParams.Languages = langList;

// If your image resolution is not 300 dpi, specify it here. Specifying a
// correct resolution gives better results for OCR, especially with
// automatic image preprocessing.
// ocrParams.Resolution = 600;

using (OCREngine ocrEngine = new OCREngine(ocrParams))
{
//Create a document object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ public static void main(String[] args) {

ocrParams.setLanguages(langList);

// If the resolution for the images in your document are not
// 300 dpi, specify a default resolution here. Specifying a
// correct resolution gives better results for OCR, especially
// with automatic image preprocessing.
// ocrParams.setResolution(600);

OCREngine ocrEngine = new OCREngine(ocrParams);
// Open a document with a single page.
Document doc = new Document(sInput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public static void main(String[] args) {
//langList.add(languageTwo);
ocrParams.setLanguages(langList);

// If your image resolution is not 300 dpi, specify it here. Specifying a
// correct resolution gives better results for OCR, especially with
// automatic image preprocessing.
// ocrParams.setResolution(600);

OCREngine ocrEngine = new OCREngine(ocrParams);
// Open a document with a single page.
Document doc = new Document();
Expand Down

0 comments on commit 8ecf7ea

Please sign in to comment.