Ikram ul Haq February 8, 2016one Comment

Enable Automatic Image Skew Correction and BarcodeElement Type with Aspose.OCR for .Net 3.3.0

Enable Automatic Image Skew Correction and BarcodeElement Type with Aspose.OCR for .Net 3.3.0

February 8, 2016
Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.OCR for .NET logo We are pleased to announce the release of Aspose.OCR for .NET 3.3.0. This release includes automatic and manual image skew correction in OMR template editor. Image skew correction using algorithm and automatic setting of BarcodeElement type have also been incorporated in this release.

No need to set BarcodeElement type property

OMR template editor now includes support to automatically detect type of BarcodeElement symbology. Select BarcodeElement and place it on the template. Right click on the element will show the shortcut menu. Select the Detect barcode type menu option. Selecting this option will automatically detect the type of underlaying barcode and auto set the Type property of the BarcodeElement in the Properties window.

Enable automatic image skew correction

Automatic and manual image skew correction can be performed while importing scanned sheet image into the template editor.

To enable automatic image skew correction while importing scanned sheet:

  • Launch OMR template editor.
  • Open the Settings property window by accessing the Edit menu and then Settings sub menu.
  • Select OmrFeatures tab and check Enable Automatic Skew Correction option.

In case, the automatic skew correction option is not enabled and you want to perform skew correction on the scanned sheet image that you have imported into the template editor, click the Deskew image icon on the toolbar as show below:

Image Skew Correction Using Algorithm

Aspose.OCR for .Net provides facility to perform image skew correction through code using algorithm. Following is the code demonstration of how an OMR scanned sheet image can be deskew/straighten using SkewCorrectionAlgorithm class.


// Load image
OmrImage image = OmrImage.Load("sample.jpg");

// Area of the image to be processed
Rectangle area = new Rectangle(0, 0, image.Width, image.Height);

// Grayscale conversion
GrayscaleAlgorithm gs = new GrayscaleAlgorithm();
gs.Process(image, area);

// Binarization
AverageThresholdAlgorithm threshold = new AverageThresholdAlgorithm();
threshold.Process(image, area);

// Skew correction
SkewCorrectionAlgorithm skewCorrection = new SkewCorrectionAlgorithm();
skewCorrection.Process(ref image, area);

// save image
image.AsBitmap().Save("result.jpg");

Please review the release notes of Aspose.OCR for .NET 3.3.0 for a complete list of new features & enhancements. If you are planning to upgrade the API from any previous version, we strongly suggest you to check the Public API Changes section to know what has been changed since your current revision of the API.

Aspose.OCR for .Net Resources

The resources, you may need to accomplish your tasks:

As always, we appreciate your feedback so if you ever have anything to tell us about this release or anything else, please head to the Aspose.OCR forum for a chat.

 

Join the Conversation

1 Comment

Leave a comment

Posted inAspose.OCR Product Family
 

Related Articles