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

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. The image skew correction using the algorithm has 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 a scanned sheet image into the template editor.

To enable automatic image skew correction while importing scanned sheet:

  • Launch the OMR template editor.
  • Open the Settings property window by accessing the Edit menu and then Settings sub-menu.
  • Select the 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.

Image Skew Correction Using Algorithm

Aspose.OCR for .Net provides facility to perform image skew correction through code using the algorithm. Following is the code demonstration of how an OMR scanned sheet image can be deskewed/straighten using the 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

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 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.