HALCON Reference Manual 10.0.2
Table of Contents / Legacy / 1D Bar Code ClassesClassesClasses | | | Operators

get_1d_bar_codeT_get_1d_bar_codeget_1d_bar_codeGet1dBarCodeGet1dBarCode (Operator)

Name

get_1d_bar_codeT_get_1d_bar_codeget_1d_bar_codeGet1dBarCodeGet1dBarCode — Extract the widths of the elements inside a bar code region.

Warning

get_1d_bar_codeget_1d_bar_codeget_1d_bar_codeGet1dBarCodeGet1dBarCode is obsolete and is only provided for reasons of backward compatibility. New applications for reading bar codes should use the functionalities in the chapter Identification / Bar Code instead (see find_bar_codefind_bar_codefind_bar_codeFindBarCodeFindBarCode).

Signature

get_1d_bar_code(BarCodeRegion : : BarCodeDescr, GenericName, GenericValue, Orientation : BarCodeElements)

Herror T_get_1d_bar_code(const Hobject BarCodeRegion, const Htuple BarCodeDescr, const Htuple GenericName, const Htuple GenericValue, const Htuple Orientation, Htuple* BarCodeElements)

Herror get_1d_bar_code(Hobject BarCodeRegion, const HTuple& BarCodeDescr, const HTuple& GenericName, const HTuple& GenericValue, const HTuple& Orientation, HTuple* BarCodeElements)

HTuple HImage::Get1dBarCode(const HTuple& BarCodeDescr, const HTuple& GenericName, const HTuple& GenericValue, const HTuple& Orientation) const

HTuple HBarCode1D::Get1dBarCode(const HImage& BarCodeRegion, const HTuple& GenericName, const HTuple& GenericValue, const HTuple& Orientation) const

void HOperatorSetX.Get1dBarCode(
[in] IHUntypedObjectX* BarCodeRegion, [in] VARIANT BarCodeDescr, [in] VARIANT GenericName, [in] VARIANT GenericValue, [in] VARIANT Orientation, [out] VARIANT* BarCodeElements)

VARIANT HBarCode1DX.Get1dBarCode(
[in] IHImageX* BarCodeRegion, [in] VARIANT BarCodeDescr, [in] VARIANT GenericName, [in] VARIANT GenericValue, [in] double Orientation)

VARIANT HImageX.Get1dBarCode(
[in] VARIANT BarCodeDescr, [in] VARIANT GenericName, [in] VARIANT GenericValue, [in] double Orientation)

static void HOperatorSet.Get1dBarCode(HObject barCodeRegion, HTuple barCodeDescr, HTuple genericName, HTuple genericValue, HTuple orientation, out HTuple barCodeElements)

HTuple HImage.Get1dBarCode(HTuple barCodeDescr, HTuple genericName, HTuple genericValue, double orientation)

HTuple HImage.Get1dBarCode(HTuple barCodeDescr, string genericName, double genericValue, double orientation)

Description

get_1d_bar_codeget_1d_bar_codeget_1d_bar_codeGet1dBarCodeGet1dBarCode extracts the widths of the elements of a bar code inside the specified region.

The control of the processing is identical to find_1d_bar_codefind_1d_bar_codefind_1d_bar_codeFind1dBarCodeFind1dBarCode. The description of the parameters GenericNameGenericNameGenericNameGenericNamegenericName and GenericValueGenericValueGenericValueGenericValuegenericValue can be found at this operator.

Parallelization

Parameters

BarCodeRegionBarCodeRegionBarCodeRegionBarCodeRegionbarCodeRegion (input_object)  image objectHImageHImageHImageXHobject (byte / uint2)

Region of bar code.

BarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrbarCodeDescr (input_control)  barcode_1d-array HTupleHBarCode1D, HTupleHBarCode1DX, VARIANTHtuple (string / integer / real) (string / int / long / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Description of a bar code class.

GenericNameGenericNameGenericNameGenericNamegenericName (input_control)  attribute.name(-array) HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Names of optional parameters.

Default value: []

List of values: 'sigma_project'"sigma_project""sigma_project""sigma_project""sigma_project", 'amplitude_project'"amplitude_project""amplitude_project""amplitude_project""amplitude_project", 'width_project'"width_project""width_project""width_project""width_project", 'add_length_project'"add_length_project""add_length_project""add_length_project""add_length_project", 'interpolation_project'"interpolation_project""interpolation_project""interpolation_project""interpolation_project", 'num_scanlines'"num_scanlines""num_scanlines""num_scanlines""num_scanlines", 'max_extra_elements'"max_extra_elements""max_extra_elements""max_extra_elements""max_extra_elements"

GenericValueGenericValueGenericValueGenericValuegenericValue (input_control)  attribute.value(-array) HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Values of optional parameters.

Default value: []

OrientationOrientationOrientationOrientationorientation (input_control)  angle.rad HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Orientation of bar code.

BarCodeElementsBarCodeElementsBarCodeElementsBarCodeElementsbarCodeElements (output_control)  number-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Widths of elements.

Example (C++)

HTuple   empty;   // empty list of values
HTuple   BarCodeDescr;
HTuple   Orientations, Elements;
HTuple   Characters,Reference,IsCorrect;
Hobject  Image,CodeRegions,CodeRegion,GrayRegion;
long     num;

gen_1d_bar_code_descr("code 39",4,15,&BarCodeDescr);
find_1d_bar_code_region(Image,&CodeRegion,BarCodeDescr,empty,empty,
                        &Orientations);
count_obj(CodeRegions,&num);
for (long i=0; i<num; i++)
{
  select_obj(CodeRegions,&CodeRegion,i);
  reduce_domain(Image,CodeRegion,GrayRegion)\:
  get_1d_bar_code(GrayRegion,BarCodeDescr,empty,empty,Orientations[i],
                  &Elements);
  decode_1d_bar_code(Elements,BarCodeDescr,
                     &Characters,&Reference,&IsCorrect);
}

Result

The operator get_1d_bar_codeget_1d_bar_codeget_1d_bar_codeGet1dBarCodeGet1dBarCode returns the value 2 (H_MSG_TRUE) if the parameters are correct.

Possible Predecessors

find_1d_bar_code_regionfind_1d_bar_code_regionfind_1d_bar_code_regionFind1dBarCodeRegionFind1dBarCodeRegion, select_objselect_objselect_objSelectObjSelectObj, reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain

Possible Successors

decode_1d_bar_codedecode_1d_bar_codedecode_1d_bar_codeDecode1dBarCodeDecode1dBarCode

Alternatives

find_1d_bar_codefind_1d_bar_codefind_1d_bar_codeFind1dBarCodeFind1dBarCode

Module

Bar Code


Table of Contents / Legacy / 1D Bar Code ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH