Set Target Regions for Recognition

Overview

In Aspose.BarCode for Java, it is possible to specify target areas for barcode detection by creating one or several objects of the Rectangle type. Setting target regions allows improving recognition efficiency and avoiding the regions without any barcodes. Target areas have to be determined accurately as the Aspose library applies heuristic approaches to identify target barcode detection areas. Focusing on too many image regions can lead to recognition efficiency deterioration.

Set Unique Target Region

To set one target area for barcode recognition, it is necessary to create an object of the Rectangle type and then pass it to the BarCodeReader constructor or the setBarCodeImage method.

Set Several Target Regions

It is also possible to set several target areas for barcode detection within one source image. This can be done in the same way as described above for one target region, i.e., using the BarCodeReader constructor or the setBarCodeImage method.