📄 iffilter.h
字号:
// IFFilter.h
/*
** Copyright (C) 1994, 2003 Tyler C. Folsom
**
** Permission to use, copy, modify, and distribute this software and its
** documentation for any purpose and without fee is hereby granted, provided
** that the above copyright notice appear in all copies and that both that
** copyright notice and this permission notice appear in supporting
** documentation. This software is provided "as is" without express or
** implied warranty.
*/
#ifndef IFFILTER_H
#define IFFILTER_H
const MAX_COEFS = 4;
// A set of cortical filters at several orientations.
// Each filter within a given CFilter has the same size.
// Each CFilter consists of all even or all odd filters.
// There must be pairs of even and odd CFilters.
class CFilter
{
friend class CProcessFeatures;
public:
// Use positive diameters for even filters,
// negative diameters for odd.
CFilter( int diameter = 0, int spacing = 1); // constructor
~CFilter( ); // destructor
// copy constructor
CFilter(const CFilter &right);
// assignment
const CFilter &operator=( const CFilter &right );
// correlate two kernels
void fl_correlate (CFilter& other);
private:
inline void Copy(const CFilter &right);
// construct the kernels
void setKernel();
// windowing function
inline float bump( float x);
int m_diam; // diameter of receptive field (pixels)
int m_sampleSpacing; // 1 unless if subsampled
int m_orientations; // Number of filters
bool m_isEven;
float *kern; /* the kernel */
// had been kern[orientation][row][col]
// coefficients of polynomials used to produce kernels
float m_coef[MAX_COEFS];
// overlap of kernels at different orientations
float m_self_ovlap[MAX_COEFS];
// overlap between even and odd kernels at orientations
float m_cross_ovlap[MAX_COEFS];
// width of the center lobe of the even filter.
float m_center_lobe;
// The maximum possible response from correlating an image with this filter size.
float m_maxResponse;
};
#endif // IFFILTER_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -