zerocrossinghoriz.h
来自「barcode readers [ from Image]」· C头文件 代码 · 共 72 行
H
72 行
//
// ZeroCrossing.h
// Finds the zero crossings in an 8-bit edge-labeled image.
// The input image should have been labeled with an edge filter
// that produces an 8-bit signed value, with 0x00 = -128, x0ff = +127.
// This class produces a linear array of arrays of floating point values,
// one array per row, which are the estimated zero crossing positions of
// pixels where one grayvalue is < 0x80 (= 0) and the next is > 0x80,
// or vice versa. Also included in the list are pixel positions where the
// pixel value = 0x80 (= 0).
// The result array strength gives the zero crossing strength, which is the
// signed difference between the left and right pixel, or zero in the case
// where the pixel value is 0.
//
// Copyright (C) 2006 by Jon A. Webb (Contact via GMail; username is jonawebb)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#ifndef CZeroCrossingHoriz_h
#define CZeroCrossingHoriz_h
#include "Array.h"
#include "PipelineStage.h"
#include <e32base.h>
#include <e32cons.h>
namespace Algorithm
{
class CZeroCrossingHoriz : public CBase
{
// Lifecycle
public:
IMPORT_C static CZeroCrossingHoriz* NewL(int nMinStrength);
~CZeroCrossingHoriz();
private:
CZeroCrossingHoriz(int nMinStrength);
// Operations
public:
// Input parameters:
// image: the input image. non-edge pixels are 0, edge pixels are non-zero.
// Output parameters:
// position: array of arrays of zero crossing positions
// strength: strength of the zero crossing, the signed difference of the
// left minus the right pixel
void FindZeroCrossingsL(Core::CImage image,
Core::CArray<CArrayFixFlat<TReal>*>*& position);
private:
// Attributes
int inMinStrength; // minimum zero crossing strength
};
};
#endif // CZeroCrossingHoriz_h
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?