Label Definitions
A Label Definition is a configuration that defines the label, and its relevant fields, that Smart Label Capture should recognize and extract during scans.
Smart Label Capture provides a Label Definition API, enabling you to configure and extract structured data from predefined and custom labels. This feature provides a flexible way to recognize and decode fields within a specific label layout such as price tags, VIN labels, or packaging stickers without needing to write custom code for each label type.
There are two approaches to using label definitions:
Pre-built Labels
Smart Label Capture includes ready-made label definitions for common use cases. These pre-built options let you recognize and extract information from standard label types without creating custom configurations:
- Price Label: This factory method is designed for price checking scenarios where both barcode and price text need to be captured from product labels. Returns
SKUandpriceTextfields. - VIN Label: A predefined label definition for scanning Vehicle Identification Numbers (VIN). Returns
textand/orbarcodefields. - 7-Segment Display: This definition is used for capturing numeric values from 7-segment displays, such as those found on digital scales or meters. Returns
textfield for weight value.
Example: Price label
Use the LabelCaptureSettings builder to configure a pre-built label definition for price labels, such as those found in retail environments:

const settings = LabelCaptureSettings.builder()
.addLabel(LabelDefinition.createPriceCaptureDefinition("price-label"))
.build();