Name
find_1d_bar_code_scanlineT_find_1d_bar_code_scanlineFind1dBarCodeScanlinefind_1d_bar_code_scanlineFind1dBarCodeScanlineFind1dBarCodeScanline — Look for one bar code in an image.
Warning
find_1d_bar_code_scanlinefind_1d_bar_code_scanlineFind1dBarCodeScanlinefind_1d_bar_code_scanlineFind1dBarCodeScanlineFind1dBarCodeScanline 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_codeFindBarCodefind_bar_codeFindBarCodeFindBarCode).
Herror T_find_1d_bar_code_scanline(const Hobject Image, Hobject* CodeRegion, const Htuple BarCodeDescr, const Htuple GenericName, const Htuple GenericValue, const Htuple StopIfFound, Htuple* BarcodeFound, Htuple* BarCodeElements, Htuple* Orientation, Htuple* ScanlineNumPoints, Htuple* ScanlineDecoded, Htuple* ScanlinePointsRow, Htuple* ScanlinePointsColumn)
Herror find_1d_bar_code_scanline(Hobject Image, Hobject* CodeRegion, const HTuple& BarCodeDescr, const HTuple& GenericName, const HTuple& GenericValue, const HTuple& StopIfFound, HTuple* BarcodeFound, HTuple* BarCodeElements, HTuple* Orientation, HTuple* ScanlineNumPoints, HTuple* ScanlineDecoded, HTuple* ScanlinePointsRow, HTuple* ScanlinePointsColumn)
HRegion HImage::Find1dBarCodeScanline(const HTuple& BarCodeDescr, const HTuple& GenericName, const HTuple& GenericValue, const HTuple& StopIfFound, HTuple* BarcodeFound, HTuple* BarCodeElements, HTuple* Orientation, HTuple* ScanlineNumPoints, HTuple* ScanlineDecoded, HTuple* ScanlinePointsRow, HTuple* ScanlinePointsColumn) const
HRegion HBarCode1D::Find1dBarCodeScanline(const HImage& Image, const HTuple& GenericName, const HTuple& GenericValue, const HTuple& StopIfFound, HTuple* BarcodeFound, HTuple* BarCodeElements, HTuple* Orientation, HTuple* ScanlineNumPoints, HTuple* ScanlineDecoded, HTuple* ScanlinePointsRow, HTuple* ScanlinePointsColumn) const
void Find1dBarCodeScanline(const HObject& Image, HObject* CodeRegion, const HTuple& BarCodeDescr, const HTuple& GenericName, const HTuple& GenericValue, const HTuple& StopIfFound, HTuple* BarcodeFound, HTuple* BarCodeElements, HTuple* Orientation, HTuple* ScanlineNumPoints, HTuple* ScanlineDecoded, HTuple* ScanlinePointsRow, HTuple* ScanlinePointsColumn)
HRegion HImage::Find1dBarCodeScanline(const HTuple& BarCodeDescr, const HTuple& GenericName, const HTuple& GenericValue, const HString& StopIfFound, Hlong* BarcodeFound, HTuple* BarCodeElements, double* Orientation, HTuple* ScanlineNumPoints, HTuple* ScanlineDecoded, HTuple* ScanlinePointsRow, HTuple* ScanlinePointsColumn) const
HRegion HImage::Find1dBarCodeScanline(const HTuple& BarCodeDescr, const HString& GenericName, double GenericValue, const HString& StopIfFound, Hlong* BarcodeFound, HTuple* BarCodeElements, double* Orientation, Hlong* ScanlineNumPoints, Hlong* ScanlineDecoded, double* ScanlinePointsRow, double* ScanlinePointsColumn) const
HRegion HImage::Find1dBarCodeScanline(const HTuple& BarCodeDescr, const char* GenericName, double GenericValue, const char* StopIfFound, Hlong* BarcodeFound, HTuple* BarCodeElements, double* Orientation, Hlong* ScanlineNumPoints, Hlong* ScanlineDecoded, double* ScanlinePointsRow, double* ScanlinePointsColumn) const
void HOperatorSetX.Find1dBarCodeScanline(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX** CodeRegion, [in] VARIANT BarCodeDescr, [in] VARIANT GenericName, [in] VARIANT GenericValue, [in] VARIANT StopIfFound, [out] VARIANT* BarcodeFound, [out] VARIANT* BarCodeElements, [out] VARIANT* Orientation, [out] VARIANT* ScanlineNumPoints, [out] VARIANT* ScanlineDecoded, [out] VARIANT* ScanlinePointsRow, [out] VARIANT* ScanlinePointsColumn)
IHRegionX* HBarCode1DX.Find1dBarCodeScanline(
[in] IHImageX* Image, [in] VARIANT BarCodeDescr, [in] VARIANT GenericName, [in] VARIANT GenericValue, [in] BSTR StopIfFound, [out] Hlong* BarcodeFound, [out] VARIANT* BarCodeElements, [out] double* Orientation, [out] VARIANT* ScanlineNumPoints, [out] VARIANT* ScanlineDecoded, [out] VARIANT* ScanlinePointsRow, [out] VARIANT* ScanlinePointsColumn)
IHRegionX* HImageX.Find1dBarCodeScanline(
[in] VARIANT BarCodeDescr, [in] VARIANT GenericName, [in] VARIANT GenericValue, [in] BSTR StopIfFound, [out] Hlong* BarcodeFound, [out] VARIANT* BarCodeElements, [out] double* Orientation, [out] VARIANT* ScanlineNumPoints, [out] VARIANT* ScanlineDecoded, [out] VARIANT* ScanlinePointsRow, [out] VARIANT* ScanlinePointsColumn)
static void HOperatorSet.Find1dBarCodeScanline(HObject image, out HObject codeRegion, HTuple barCodeDescr, HTuple genericName, HTuple genericValue, HTuple stopIfFound, out HTuple barcodeFound, out HTuple barCodeElements, out HTuple orientation, out HTuple scanlineNumPoints, out HTuple scanlineDecoded, out HTuple scanlinePointsRow, out HTuple scanlinePointsColumn)
HRegion HImage.Find1dBarCodeScanline(HTuple barCodeDescr, HTuple genericName, HTuple genericValue, string stopIfFound, out int barcodeFound, out HTuple barCodeElements, out double orientation, out HTuple scanlineNumPoints, out HTuple scanlineDecoded, out HTuple scanlinePointsRow, out HTuple scanlinePointsColumn)
HRegion HImage.Find1dBarCodeScanline(HTuple barCodeDescr, string genericName, double genericValue, string stopIfFound, out int barcodeFound, out HTuple barCodeElements, out double orientation, out int scanlineNumPoints, out int scanlineDecoded, out double scanlinePointsRow, out double scanlinePointsColumn)
Like find_1d_bar_codefind_1d_bar_codeFind1dBarCodefind_1d_bar_codeFind1dBarCodeFind1dBarCode, find_1d_bar_code_scanlinefind_1d_bar_code_scanlineFind1dBarCodeScanlinefind_1d_bar_code_scanlineFind1dBarCodeScanlineFind1dBarCodeScanline
looks for a bar code in an image. but
find_1d_bar_code_scanlinefind_1d_bar_code_scanlineFind1dBarCodeScanlinefind_1d_bar_code_scanlineFind1dBarCodeScanlineFind1dBarCodeScanline also returns information about the
used scanlines.
Each scanline is represented by a set of points. The row- an column-
coordinates of these points are returned in
ScanlinePointsRowScanlinePointsRowScanlinePointsRowScanlinePointsRowScanlinePointsRowscanlinePointsRow and in ScanlinePointsColumnScanlinePointsColumnScanlinePointsColumnScanlinePointsColumnScanlinePointsColumnscanlinePointsColumn,
respectively. Note that these output parameters are tuples; they
contain the points of all scanlines. To enable to access the
points of a specific scanline, the number of points for each
scanline is returned in the tuple ScanlineNumPointsScanlineNumPointsScanlineNumPointsScanlineNumPointsScanlineNumPointsscanlineNumPoints. The
tuple ScanlineDecodedScanlineDecodedScanlineDecodedScanlineDecodedScanlineDecodedscanlineDecoded indicates for each scanline whether
the bar code code be decoded with it. 0 is returned if the bar code
couldn't be decoded with that scanline, else 1 or 2, depending on
which method has been used to detect the edges. In general, 1 is
returned, for thin lines 2. If StopIfFoundStopIfFoundStopIfFoundStopIfFoundStopIfFoundstopIfFound = 'true'"true""true""true""true""true",
the operator is left as soon as the bar code could be decoded, else
all scanlines are checked.
For a description of the other parameters see
find_1d_bar_codefind_1d_bar_codeFind1dBarCodefind_1d_bar_codeFind1dBarCodeFind1dBarCode.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Image with bar code inside.
Description of a bar code class.
Names of optional control parameters.
Default value: []
List of values: 'add_length_project'"add_length_project""add_length_project""add_length_project""add_length_project""add_length_project", 'amplitude_project'"amplitude_project""amplitude_project""amplitude_project""amplitude_project""amplitude_project", 'amplitude_sobel'"amplitude_sobel""amplitude_sobel""amplitude_sobel""amplitude_sobel""amplitude_sobel", 'angle_range'"angle_range""angle_range""angle_range""angle_range""angle_range", 'correct_angle'"correct_angle""correct_angle""correct_angle""correct_angle""correct_angle", 'dilation_factor'"dilation_factor""dilation_factor""dilation_factor""dilation_factor""dilation_factor", 'interpolation_project'"interpolation_project""interpolation_project""interpolation_project""interpolation_project""interpolation_project", 'max_extra_elements'"max_extra_elements""max_extra_elements""max_extra_elements""max_extra_elements""max_extra_elements", 'max_size_element'"max_size_element""max_size_element""max_size_element""max_size_element""max_size_element", 'min_size_element'"min_size_element""min_size_element""min_size_element""min_size_element""min_size_element", 'num_scanlines'"num_scanlines""num_scanlines""num_scanlines""num_scanlines""num_scanlines", 'sigma_project'"sigma_project""sigma_project""sigma_project""sigma_project""sigma_project", 'sum_angles'"sum_angles""sum_angles""sum_angles""sum_angles""sum_angles", 'width_project'"width_project""width_project""width_project""width_project""width_project"
Values of optional control parameters.
Default value: []
Leave operator as soon as the bar code has been
decoded?.
Default value:
'false'
"false"
"false"
"false"
"false"
"false"
List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
Information whether the bar code was found.
List of values: 0, 1
Number of points belonging to that scanline.
Information whether the bar code could be decoded with
that scanline.
List of values: 0, 1, 2
Row - coordinates of the points of the scanline.
Column - coordinates of the points of the scanline.
HTuple empty; // empty list of values
HTuple BarCodeDescr;
HTuple BarcodeFound,Elements,Orientation;
HTuple Characters,Reference,IsCorrect;
Hobject Image,CodeRegion;
HTuple ScanlineNumPoints, ScanlineDecoded, ScanlinePointsRow,
ScanlinePointsColumn;
HTuple NumScanlines, NumPoints;
HTuple j, k, indexPoint, nStart, nEnd;
HTuple WindowHandle;
gen_1d_bar_code_descr("EAN 13",13,13,&BarCodeDescr);
find_1d_bar_code_scanline(Image,&CodeRegion,BarCodeDescr,empty,empty,
"false",&BarcodeFound,&Elements,&Orientation,
&ScanlineNumPoints,&ScanlineDecoded,
&ScanlinePointsRow,&ScanlinePointsColumn);
set_window_attr("background_color",HTuple("black"));
open_window(HTuple(0),HTuple(0),HTuple(512),HTuple(512),0,"","",
&WindowHandle);
if (BarcodeFound[0].l)
{
decode_1d_bar_code(Elements,BarCodeDescr,
&Characters,&Reference,&IsCorrect);
if (IsCorrect[0].l)
for (int i=0; i<Characters.Num(); i++)
{
char *value = Characters[i];
}
// display scanlines
NumScanlines = ScanlineNum.Num();
indexPoint = HTuple(0);
for (j=0; j<=NumScanlines-1; j+=1)
{
if (HTuple(ScanlineDecoded[(Hlong)(j)[0]])==1)
{
set_color(WindowHandle,HTuple("green"));
}
else
{
set_color(WindowHandle,HTuple("red"));
}
NumPoints = HTuple(ScanlineNumPoints[(Hlong)(j)[0]]);
nStart = indexPoint;
nEnd = (indexPoint+NumPoints)-1;
for (k=nStart; k<=nEnd; k+=1)
{
disp_circle(WindowHandle,HTuple(ScanlinePointsRow[(Hlong)(k)[0]]),
HTuple(ScanlinePointsColumn[(Hlong)(k)[0]]),HTuple(1));
}
indexPoint = nEnd+1;
}
}
The operator find_1d_bar_codefind_1d_bar_codeFind1dBarCodefind_1d_bar_codeFind1dBarCodeFind1dBarCode returns the value 2 (H_MSG_TRUE)
if the parameters are correct.
Bar Code