ZBar::Symbol(3pm)

πŸ’– ZBar::Symbol πŸ’–

okay bestie, so this is the manual for Barcode::ZBar::Symbol, part of the ZBar family (shipped in the User Contributed Perl Documentation section, section 3pm, in case you were wondering where it lives πŸ‘‘). It's the little object that holds one barcode scan result. Let's get into it, no cap.


✨ NAME ✨

Barcode::ZBar::Symbol β€” the bar code scan result object πŸŽ€


🌸 SYNOPSIS 🌸

like, here's the vibe:

my @symbols = $image->get_symbols();
foreach my $sym (@symbols) {
    print("decoded: " . $sym->get_type() .
          ":" . $sym->get_data().
          "(" . $sym->get_count() . ")");
}

πŸ¦‹ DESCRIPTION πŸ¦‹

Barcode::ZBar::Symbol objects are constant results returned for each and every bar code scanned out of images or video. They don't change on you, they just are. πŸ’…

This object wraps the raw symbol data and bundles it up with extra info about the decode β€” think symbology, confidence, location, all that good stuff ✨


πŸ”₯ REFERENCE πŸ”₯

πŸ’œ Methods πŸ’œ

  • get_type() β€” the type of bar code "symbology" that the data was decoded from.
  • get_data() β€” the decoded data string. ⚠️ heads up bestie: some symbologies can encode binary data, so don't just assume it's cute printable text, fr fr.
  • get_quality() β€” the confidence metric. It's an unscaled integer value that indicates something (intentionally unspecified, yes really) about how reliable this result is relative to another one. Bigger values are better than smaller ones, but what counts as "large" and "small" is up to your application. Expect this definition to get more specific as the metric gets enhanced. πŸ™ˆ
  • get_count() β€” the current cache count of the symbol. This integer gives you inter-scan reliability and redundancy info, if it was enabled over at the Barcode::ZBar::ImageScanner. πŸ‘‘
  • get_orientation() β€” the general orientation of the decoded symbol. Returns one of the Barcode::ZBar::Orient constants, which give you a coarse, axis-aligned hint at which way the symbol is facing. 🧭
  • get_components() β€” components of a composite result. This hands you an array of the physical component symbols that got combined to make a composite result. 🌈
  • get_configs() β€” retrieve symbology boolean config settings. Returns a bitmask showing which configs were set for the detected symbology during decoding. ⭐
  • get_modifiers() β€” retrieve symbology modifier flag settings. Returns a bitmask showing which characteristics were detected during decoding. ✨
  • get_loc() β€” retrieve an array of symbol location points (x,y)
    • A negative value indicates that this result is still uncertain 😭
    • A zero value indicates the first occurrence of this result with high confidence πŸ‘‘
    • A positive value indicates a duplicate scan πŸ”

πŸŽ€ Constants πŸŽ€

Bar code type "symbology" constants, and yes, they're all iconic:

  • NONE
  • PARTIAL
  • EAN13
  • EAN8
  • UPCA
  • UPCE
  • ISBN10
  • ISBN13
  • I25
  • CODABAR
  • CODE39
  • CODE93
  • CODE128
  • QRCODE
  • PDF417

🌟 SEE ALSO 🌟

Barcode::ZBar, Barcode::ZBar::Image

zbarimg(1), zbarcam(1)

http://zbar.sf.net


πŸ’– AUTHOR πŸ’–

Jeff Brown, <spadix@users.sourceforge.net>


Copyright 2008-2010 (c) Jeff Brown <spadix@users.sourceforge.net>

The ZBar Bar Code Reader is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.


and that's the whole page, bestie!! 🫢 this was ZBar::Symbol(3pm) from perl v5.40.1, dated 2025-05-01 β€” mwah, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from