←Select platform

FindBarcodeCandidateAreasCommand Class

Summary

Detects potential barcode candidates in an image.

Syntax
C#
C++/CLI
Java
Python
public class FindBarcodeCandidateAreasCommand : RasterCommand 
public class FindBarcodeCandidateAreasCommand 
    extends RasterCommand 
public: 
   ref class FindBarcodeCandidateAreasCommand : RasterCommand 
class FindBarcodeCandidateAreasCommand(RasterCommand): 
Remarks

FindBarcodeCandidateAreasCommand is useful on images that have a barcode of poor quality and returns the candidate barcode bounds and confidence.

Another benefit with using FindBarcodeCandidateAreasCommand is a boost up in speed by locating potential barcode areas. To achieve this, use the bounds of the candidate barcode to pass to the BarcodeReader on the entire image.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
 
public void FindBarcodeCandidateAreasCommandExample() 
{ 
   // Initialize codecs 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "barcode1.tif")); 
 
   // Create command and set parameters for barcodes 
   FindBarcodeCandidateAreasCommand command = new FindBarcodeCandidateAreasCommand(); 
   command.UnitsType = BarcodeCandidateAreasUnitsType.Pixels; 
   command.BackgroundColor = new RasterColor(255, 255, 255); 
   command.BarcodeColor = new RasterColor(0, 0, 0); 
   command.MinimumBarcodeDimension = 10; 
 
   // Run the command 
   command.Run(image); 
 
   // First candidate area returned from running command 
   BarcodeCandidateArea barcodeCandidateArea = command.CandidateAreas[0]; 
 
   codecs.Dispose(); 
} 
       
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.3.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.