ZBar.ImageScanner Class Reference

Mid-level image scanner interface. reads barcodes from 2-D images. More...

List of all members.

Public Member Functions

 ImageScanner ()
 Create a new ImageScanner.
int Scan (Image image)
 Scan an image for symbols.
void SetConfiguration (SymbolType symbology, Config config, int value)
 Set config for indicated symbology (0 for all) to specified value.
void Dispose ()
 Release resources held by this object.

Protected Member Functions

virtual void Dispose (bool disposing)
 Dispose this object.

Properties

bool Cache [get, set]

Private Member Functions

 ~ImageScanner ()
 Finalize this object.
static IntPtr zbar_image_scanner_create ()
 Constructor.
static void zbar_image_scanner_destroy (IntPtr scanner)
 Destructor.
delegate void zbar_image_data_handler (IntPtr image, IntPtr userdata)
 data handler callback function.
static zbar_image_data_handler zbar_image_scanner_set_data_handler (IntPtr scanner, zbar_image_data_handler handler, IntPtr userdata)
 setup result handler callback. the specified function will be called by the scanner whenever new results are available from a decoded image. pass a NULL value to disable callbacks.
static int zbar_image_scanner_set_config (IntPtr scanner, int symbology, int config, int val)
 set config for indicated symbology (0 for all) to specified value.
static void zbar_image_scanner_enable_cache (IntPtr scanner, int enable)
 enable or disable the inter-image result cache (default disabled). mostly useful for scanning video frames, the cache filters duplicate results from consecutive images, while adding some consistency checking and hysteresis to the results. this interface also clears the cache
static int zbar_scan_image (IntPtr scanner, IntPtr image)
 scan for symbols in provided image. The image format must be "Y800" or "GRAY".

Private Attributes

IntPtr handle = IntPtr.Zero
bool cache = false

Detailed Description

Mid-level image scanner interface. reads barcodes from 2-D images.

Definition at line 32 of file ImageScanner.cs.


Constructor & Destructor Documentation

ZBar.ImageScanner.ImageScanner (  ) 

Create a new ImageScanner.

Definition at line 40 of file ImageScanner.cs.

ZBar.ImageScanner.~ImageScanner (  )  [private]

Finalize this object.

Definition at line 130 of file ImageScanner.cs.


Member Function Documentation

void ZBar.ImageScanner.Dispose (  ) 

Release resources held by this object.

Definition at line 121 of file ImageScanner.cs.

virtual void ZBar.ImageScanner.Dispose ( bool  disposing  )  [protected, virtual]

Dispose this object.

This boolean disposing parameter here ensures that objects with a finalizer is not disposed, this is method is invoked from the finalizer. Do overwrite, and call, this method in base classes if you use any unmanaged resources.

Parameters:
disposing A System.Boolean False if called from the finalizer, True if called from Dispose.

Definition at line 108 of file ImageScanner.cs.

int ZBar.ImageScanner.Scan ( Image  image  ) 

Scan an image for symbols.

Once an image have been scanned the result will be associated with the image.

Parameters:
image A Image to be scanned
Returns:
A System.Int32 number of symbols decoded on the image.

Definition at line 58 of file ImageScanner.cs.

void ZBar.ImageScanner.SetConfiguration ( SymbolType  symbology,
Config  config,
int  value 
)

Set config for indicated symbology (0 for all) to specified value.

Definition at line 86 of file ImageScanner.cs.

delegate void ZBar.ImageScanner.zbar_image_data_handler ( IntPtr  image,
IntPtr  userdata 
) [private]

data handler callback function.

static IntPtr ZBar.ImageScanner.zbar_image_scanner_create (  )  [private]

Constructor.

static void ZBar.ImageScanner.zbar_image_scanner_destroy ( IntPtr  scanner  )  [private]

Destructor.

static void ZBar.ImageScanner.zbar_image_scanner_enable_cache ( IntPtr  scanner,
int  enable 
) [private]

enable or disable the inter-image result cache (default disabled). mostly useful for scanning video frames, the cache filters duplicate results from consecutive images, while adding some consistency checking and hysteresis to the results. this interface also clears the cache

static int ZBar.ImageScanner.zbar_image_scanner_set_config ( IntPtr  scanner,
int  symbology,
int  config,
int  val 
) [private]

set config for indicated symbology (0 for all) to specified value.

Returns:
0 for success, non-0 for failure (config does not apply to specified symbology, or value out of range)
static zbar_image_data_handler ZBar.ImageScanner.zbar_image_scanner_set_data_handler ( IntPtr  scanner,
zbar_image_data_handler  handler,
IntPtr  userdata 
) [private]

setup result handler callback. the specified function will be called by the scanner whenever new results are available from a decoded image. pass a NULL value to disable callbacks.

Returns:
the previously registered handler
static int ZBar.ImageScanner.zbar_scan_image ( IntPtr  scanner,
IntPtr  image 
) [private]

scan for symbols in provided image. The image format must be "Y800" or "GRAY".

Returns:
> 0 if symbols were successfully decoded from the image, 0 if no symbols were found or -1 if an error occurs

Member Data Documentation

bool ZBar.ImageScanner.cache = false [private]

Definition at line 35 of file ImageScanner.cs.

IntPtr ZBar.ImageScanner.handle = IntPtr.Zero [private]

Definition at line 34 of file ImageScanner.cs.


Property Documentation

bool ZBar.ImageScanner.Cache [get, set]

Enable or disable the inter-image result cache (default disabled).

Mostly useful for scanning video frames, the cache filters duplicate results from consecutive images, while adding some consistency checking and hysteresis to the results. this interface also clears the cache.

Definition at line 73 of file ImageScanner.cs.


The documentation for this class was generated from the following file:

Foodolini 1.0.0 Documentation, generated with DoxyGen.