gist特征提取

baidu_38023279 2017-03-22 08:23:53
求一份gist特征提取的opencv完整代码
大致过程:
1. 创建Gabor滤波器组
2. 对原彩色图求均值转为灰度图像
3. 对图像进行预滤波 缩放局部对比度
4. 分块计算gabor特征并组合
...全文
1461 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
KanadeAngel 2019-10-27
  • 打赏
  • 举报
回复
有 我实现了Gist的LMGIST版本(就是matlab那个) 下面是对应的Github和博文 代码: https://github.com/Kalafinaian/python-img_gist_feature 博文: https://zhuanlan.zhihu.com/p/88
shiter 2017-04-07
  • 打赏
  • 举报
回复
http://download.csdn.net/detail/ying_xu/9413394
shiter 2017-04-07
  • 打赏
  • 举报
回复


#pragma once

#include
using namespace cv;

#define WIDTH 256 //图像宽度 256
#define HEIGHT 256 //图像高度 256
//#define M_PI 3.1416 //π

class Gist
{
public:
typedef struct matList
{
int size;
Mat* data;
} MatList;

typedef struct gistParam
{
CvSize imageSize;
int orientations; //8
int scale; //4
int* orientationsPerScale; //[8 8 8 8]
int numberBlocks; //4
int fc_prefilt; //4
int boundaryExtension; //32
MatList gabor;
} GistParam;

Gist(void);
Gist(CvSize imagesize, int* orientationsPerScale, int scale, int numberBlocks = 4, int fc_prefilt = 4, int boundaryExtension = 32);
~Gist(void);

Mat padarray(Mat mat, CvSize padsize = cvSize(5, 5), CString padval = _T("symmetric"), CString direction = _T("both"));
MatList createGabor(int *or, CvSize size);
Mat prefilt(Mat img, int fc = 4);
Mat gistGabor(Mat img);
Mat downN(Mat img, int N);

Mat calImageGist(CString filename);
Mat calImageGist(IplImage* image);
Mat calImageListGist(vector fileList);

static void fftshift(Mat data); //fft移位
static void fftshift(float *data, int w, int h); //fft移位
static Mat getReal(Mat complex_data); //获取复数矩阵实部
static Mat getAbs(Mat complex_data); //获取复数矩阵绝对值
static void saveFeatureToFile(CString filename, Mat mat); //存储mat

private:
GistParam param;
};

19,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧