Gets the OCRA text zones after the MICR code detection command has been applied.
public LeadRect[] OCRAZones { get; set; } public LeadRect[ getOCRAZones();public void setOCRAZones(LeadRect[] leadRect[);
public:property array<LeadRect^>^ OCRAZones{array<LeadRect^>^ get()void set(array<LeadRect^>^ value)}
OCRAZones # get and set (MICRCodeDetectionCommand)
An array of LeadRect that contains the location of the OCRA locations.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;public void MICRCodeDetectionCommandExample(){// Load an imageRasterCodecs codecs = new RasterCodecs();codecs.ThrowExceptionsOnInvalidImages = true;RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "MICR_SAMPLE.tif"));string destFileName = Path.Combine(LEAD_VARS.ImagesDir, "MICRCode.bmp");// Prepare the commandMICRCodeDetectionCommand command = new MICRCodeDetectionCommand();command.SearchingZone = new LeadRect(0, 0, image.Width, image.Height);command.Run(image);CopyRectangleCommand copyCommand = new CopyRectangleCommand();copyCommand.Rectangle = new LeadRect(command.MICRZone.Left,command.MICRZone.Top,command.MICRZone.Width,command.MICRZone.Height);copyCommand.Run(image);RasterImage destImage = copyCommand.DestinationImage;if (destImage != null){// Save it to diskcodecs.Save(destImage, destFileName, RasterImageFormat.Bmp, 24);}//Save OCRA zonesfor (int i = 0; i < command.OCRAZones.Length; i++){copyCommand.Rectangle = new LeadRect(command.OCRAZones[i].Left,command.OCRAZones[i].Top,command.OCRAZones[i].Width,command.OCRAZones[i].Height);copyCommand.Run(image);destImage = copyCommand.DestinationImage;if (destImage != null){// Save OCRA to diskdestFileName = Path.Combine(LEAD_VARS.ImagesDir, i + "_OCRA.bmp");codecs.Save(destImage, destFileName, RasterImageFormat.Bmp, 24);}}}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
