ZBar Bar Code Reader Library  version 0.10
zbar/scanner.c File Reference

Classes

struct  zbar_scanner_s
 

Macros

#define EWMA_WEIGHT
 
#define ROUND
 
#define THRESH_INIT
 
#define ZBAR_FIXED
 
#define ZBAR_SCANNER_EWMA_WEIGHT
 
#define ZBAR_SCANNER_THRESH_FADE
 
#define ZBAR_SCANNER_THRESH_INIT_WEIGHT
 
#define ZBAR_SCANNER_THRESH_MIN
 

Functions

static unsigned calc_thresh (zbar_scanner_t *scn)
 
static zbar_symbol_type_t process_edge (zbar_scanner_t *scn, int y1)
 
zbar_symbol_type_t zbar_scan_y (zbar_scanner_t *scn, int y)
 
zbar_scanner_t * zbar_scanner_create (zbar_decoder_t *dcode)
 
void zbar_scanner_destroy (zbar_scanner_t *scn)
 
zbar_symbol_type_t zbar_scanner_flush (zbar_scanner_t *scn)
 
zbar_color_t zbar_scanner_get_color (const zbar_scanner_t *scn)
 
unsigned zbar_scanner_get_edge (const zbar_scanner_t *scn, unsigned offset, int prec)
 
void zbar_scanner_get_state (const zbar_scanner_t *scn, unsigned *x, unsigned *cur_edge, unsigned *last_edge, int *y0, int *y1, int *y2, int *y1_thresh)
 
unsigned zbar_scanner_get_width (const zbar_scanner_t *scn)
 
zbar_symbol_type_t zbar_scanner_new_scan (zbar_scanner_t *scn)
 
zbar_symbol_type_t zbar_scanner_reset (zbar_scanner_t *scn)
 

Macro Definition Documentation

#define EWMA_WEIGHT

Referenced by zbar_scan_y().

#define THRESH_INIT

Referenced by zbar_scan_y().

#define ZBAR_SCANNER_EWMA_WEIGHT
#define ZBAR_SCANNER_THRESH_FADE

Referenced by calc_thresh().

#define ZBAR_SCANNER_THRESH_INIT_WEIGHT
#define ZBAR_SCANNER_THRESH_MIN

Referenced by zbar_scanner_create().

Function Documentation

static unsigned calc_thresh ( zbar_scanner_t *  scn)
inlinestatic

References dprintf, zbar_scanner_s::y1_min_thresh, ZBAR_FIXED, and ZBAR_SCANNER_THRESH_FADE.

Referenced by zbar_scan_y(), and zbar_scanner_get_state().

Here is the caller graph for this function:

static zbar_symbol_type_t process_edge ( zbar_scanner_t *  scn,
int  y1 
)
inlinestatic

References dprintf, ROUND, svg_path_moveto, zbar_decode_width(), ZBAR_FIXED, and zbar::ZBAR_PARTIAL.

Referenced by zbar_scan_y(), and zbar_scanner_flush().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar_symbol_type_t zbar_scan_y ( zbar_scanner_t *  scn,
int  y 
)

References calc_thresh(), dprintf, EWMA_WEIGHT, process_edge(), ROUND, THRESH_INIT, zbar_scanner_s::x, y, ZBAR_FIXED, and zbar::ZBAR_NONE.

Referenced by scanner_scan_y(), and zbar_scan_image().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar_scanner_t* zbar_scanner_create ( zbar_decoder_t *  dcode)

References zbar_scanner_reset(), and ZBAR_SCANNER_THRESH_MIN.

Referenced by scanner_new(), and zbar_image_scanner_create().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar_scanner_destroy ( zbar_scanner_t *  scn)

Referenced by scanner_dealloc(), and zbar_image_scanner_destroy().

Here is the caller graph for this function:

zbar_symbol_type_t zbar_scanner_flush ( zbar_scanner_t *  scn)
inline

References dprintf, process_edge(), ROUND, zbar_scanner_s::x, zbar_decode_width(), ZBAR_FIXED, zbar::ZBAR_NONE, and zbar::ZBAR_PARTIAL.

Referenced by quiet_border(), and zbar_scanner_new_scan().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar_color_t zbar_scanner_get_color ( const zbar_scanner_t *  scn)

References zbar::ZBAR_BAR, and zbar::ZBAR_SPACE.

Referenced by scanner_get_color().

Here is the caller graph for this function:

unsigned zbar_scanner_get_edge ( const zbar_scanner_t *  scn,
unsigned  offset,
int  prec 
)

References ROUND, and ZBAR_FIXED.

Referenced by _zbar_image_scanner_add_sym(), and symbol_handler().

Here is the caller graph for this function:

void zbar_scanner_get_state ( const zbar_scanner_t *  scn,
unsigned *  x,
unsigned *  cur_edge,
unsigned *  last_edge,
int *  y0,
int *  y1,
int *  y2,
int *  y1_thresh 
)

References calc_thresh(), and dprintf.

Here is the call graph for this function:

unsigned zbar_scanner_get_width ( const zbar_scanner_t *  scn)

Referenced by scanner_get_width(), and symbol_handler().

Here is the caller graph for this function:

zbar_symbol_type_t zbar_scanner_new_scan ( zbar_scanner_t *  scn)

References zbar_decoder_new_scan(), zbar::ZBAR_NONE, and zbar_scanner_flush().

Referenced by quiet_border(), scanner_new_scan(), and zbar_scan_image().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar_symbol_type_t zbar_scanner_reset ( zbar_scanner_t *  scn)

References zbar_decoder_reset(), and zbar::ZBAR_NONE.

Referenced by scanner_reset(), and zbar_scanner_create().

Here is the call graph for this function:

Here is the caller graph for this function: