资源简介
Gabor滤波器纹理特征提取 opencv2以上版本 C++
代码片段和文件信息
#include “stdafx.h“
#include “GaborFilter.h“
GaborFilter::GaborFilter()
{
}
GaborFilter::~GaborFilter()
{
}
/*!
Parameters:
iMu The orientation iMu*PI/8
iNu The scale
dSigma The sigma value of Gabor
dPhi The orientation in arc
dF The spatial frequency
*/
GaborFilter::GaborFilter(int iMu int iNu)
{
double dSigma = 2*PI;
F = sqrt(2.0);
Init(iMu iNu dSigma F);
}
GaborFilter::GaborFilter(int iMu int iNu double dSigma)
{
F = sqrt(2.0);
Init(iMu iNu dSigma F);
}
GaborFilter::GaborFilter(int iMu int iNu double dSigma double dF)
{
Init(iMu iNu dSigma dF);
}
GaborFilter::GaborFilter(double dPhi int iNu)
{
Sigma = 2*PI;
F = sqrt(2.0);
Init(dPhi iNu Sigma F);
}
GaborFilter::GaborFilter(double dPhi int iNu double dSigma)
{
F = sqrt(2.0);
Init(dPhi iNu dSigma F);
}
GaborFilter::GaborFilter(double dPhi int iNu double dSigma double dF)
{
Init(dPhi iNu dSigmadF);
}
/*!
Parameters:
iMu The orientations which is iMu*PI.8
iNu The scale can be from -5 to infinit
dSigma The Sigma value of gabor Normally set to 2*PI
dF The spatial frequence normally is sqrt(2)
Initilize the.gabor with the orientation iMu the scale iNu the sigma dSigma the frequency dF it will call the function creat_kernel(); So a gabor is created.
*/
void GaborFilter::Init(int iMu int iNu double dSigma double dF)
{
//Initilise the parameters
bInitialised = false;
bKernel = false;
Sigma = dSigma;
F = dF;
Kmax = PI/2;
//Absolute value of K
K = Kmax / pow(F (double)iNu);
Phi = PI*iMu/8;
bInitialised = true;
Width = mask_width();
creat_kernel();
}
/*!
Parameters:
dPhi The orientations
iNu The scale can be from -5 to infinit
dSigma The Sigma value of gabor Normally set to 2*PI
dF The spatial frequence normally is sqrt(2)
Initilize the.gabor with the orientation dPhi the scale iNu the sigma dSigma the frequency dF it will call the function creat_kernel(); So a gabor is created.filename The name of the image file
file_format The format of the file
*/
void GaborFilter::Init(double dPhi int iNu double dSigma double dF)
{
bInitialised = false;
bKernel = false;
Sigma = dSigma;
F = dF;
Kmax = PI/2;
// Absolute value of K
K = Kmax / pow(F (double)iNu);
Phi = dPhi;
bInitialised = true;
Width = mask_width();
creat_kernel();
}
/*!
Returns:
a boolean value TRUE is created or FALSE is non-created.
Determine whether a gabor kernel is created.
*/
bool GaborFilter::IsInit()
{
return bInitialised;
}
bool GaborFilter::IsKernelCreate()
{
return bKernel;
}
/*!
Returns:
The long type show the width.
Return the width of mask (should be NxN) by the value of Sigma and iNu.
*/
int GaborFilter::mask_width()
{
int lWidth;
if (IsInit(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7668 2017-04-26 13:48 GaborFilter\GaborFilter.cpp
文件 1295 2017-04-27 11:14 GaborFilter\GaborFilter.h
目录 0 2017-07-10 13:08 GaborFilter
----------- --------- ---------- ----- ----
8963 3
相关资源
- opengl鼠标交互简单
- 基于 OPENCV 对三角形 的 角度检测
- 相机标定与图像畸变校正程序
- moravec算子c++代码
- opengl 实现 雪花
- opengl实现鼠标坐标的显示
- VC++关于纹理特征提取的代码完整
- openCV中stitching_detailed.cpp
- 贝塞尔曲面 vc++ opengl
- 11个常用OpenCV+C++图像处理
- c++写的OpenGL程序透明金字塔有加上光
- opencv计算5*5邻域方差图
- opencv 视觉 追踪跟踪 经典kcf算法
- OpenSSL+VC6.0 实现的安全Web Server 客户端
- OpenGl文字显示c++类
- C++ 3D 五子棋 opengl
- vc++6.0配置OpenCV
- 使用OpenGL编写的三维曲线和曲面,V
- 基于OpenCV的图像检索系统(源码)
- openGL四面体、立方体、正N棱柱、齿轮
- 用OpenGL开发的机械臂运动仿真程序
- test_opencv.cpp
- open ua统一标准指导文档(ice 62541)
- OPENGL 星空 背景 图像
- mfc+opengl离散点绘制曲面
- opencv提取图片中人轮廓
- 使用opengl的图形学大作业
- 机器人手臂
- Python3+Opencv343环境搭建 dll load failed问
- OPENGL阴影
评论
共有 条评论