jabcode
 All Classes Files Functions Variables Enumerations Macros
sample.c File Reference

Symbol sampling. More...

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "jabcode.h"
#include "detector.h"
#include "decoder.h"

Macros

#define SAMPLE_AREA_WIDTH   (CROSS_AREA_WIDTH / 2 - 2)
 
#define SAMPLE_AREA_HEIGHT   20
 

Functions

jab_bitmapsampleSymbol (jab_bitmap *bitmap, jab_perspective_transform *pt, jab_vector2d side_size)
 Sample a symbol. More...
 
jab_bitmapsampleSymbolwithNc (jab_bitmap *bitmap, jab_perspective_transform *pt, jab_vector2d side_size, jab_int32 symbol_type, jab_bitmap *ch[])
 Sample a symbol. More...
 
jab_bitmapsampleCrossArea (jab_bitmap *bitmap, jab_perspective_transform *pt)
 Sample a cross area between the host and slave symbols. More...
 

Detailed Description

Symbol sampling.

libjabcode - JABCode Encoding/Decoding Library

Copyright 2016 by Fraunhofer SIT. All rights reserved. See LICENSE file for full terms of use and distribution.

Contact: Huajian Liu liu@s.nosp@m.it.f.nosp@m.raunh.nosp@m.ofer.nosp@m..de Waldemar Berchtold walde.nosp@m.mar..nosp@m.berch.nosp@m.told.nosp@m.@sit..nosp@m.frau.nosp@m.nhofe.nosp@m.r.de

Function Documentation

jab_bitmap* sampleCrossArea ( jab_bitmap bitmap,
jab_perspective_transform pt 
)

Sample a cross area between the host and slave symbols.

Parameters
bitmapthe image bitmap
ptthe transformation matrix
Returns
the sampled area matrix
jab_bitmap* sampleSymbol ( jab_bitmap bitmap,
jab_perspective_transform pt,
jab_vector2d  side_size 
)

Sample a symbol.

Parameters
bitmapthe image bitmap
ptthe transformation matrix
side_sizethe symbol size in module
Returns
the sampled symbol matrix
jab_bitmap* sampleSymbolwithNc ( jab_bitmap bitmap,
jab_perspective_transform pt,
jab_vector2d  side_size,
jab_int32  symbol_type,
jab_bitmap ch[] 
)

Sample a symbol.

Parameters
bitmapthe image bitmap
ptthe transformation matrix
side_sizethe symbol size in module
symbol_typethe symbol type (0,2,3,4,5: metadata for Nc will be sampled as black/white)
chthe binarized color channels of the bitmap
Returns
the sampled symbol matrix