资源简介
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
相关资源
- 安卓c语言开发SDL2+opengles
- 人脸识别(opencv_facedetect_v4l2)
- 颜色识别形状识别STM103嵌入式代码
- openwrt深入学习笔记
- 基于opencv的模板匹配代码
- 交互式计算机图形学 第六版 OpenGL源代
- VC++基于OpenGL模拟的一个3维空间模型
- opencv图片扫描以及校正
- opencv手部轮廓识别以及轨迹识别
- opencv2 3D标定.cpp
- 基于opencv漫水填充算法综合
- opengl绘制汽车.cpp
- 自洽SU3手性夸克-孤子模型中单重子的
- 使用 IBM Rational Systems Developer 和 Rati
- opencv激光中心线的提取
- 手性摄动理论中双迷人重子的辐射衰
- 自协变重子手性扰动理论中自旋1/2双
- OpenCV Computer Vision Application Programming
- 基于图割的图像分割OpenCV+MFC实现
- 识别魔方颜色
- opencv版俄罗斯方块源码
- Kinect手势控制鼠标
- VS2013 / MFC + OpenCV 2.4.9实现视频的播放
- opengl实现水流效果sph
- opengl源代码,全是精华!
- 粒子滤波器+目标跟踪的C++实现,VS2
- OpenGL迷宫山东大学图形学实验三
- C语言openssl库SM2-SM3国密常用函数
- opengl的立方体消隐算法
- 张平OpenCV算法精讲基于python和C++教材
评论
共有 条评论