Gist描述子
来源:互联网 发布:英国为什么要脱欧 知乎 编辑:程序博客网 时间:2024/05/15 02:08
场景识别描述子Gist代码
Gist描述子主要用于场景识别,是由MIT的Antonio Torralba提出的。文章发表在IJCV,题目:Modeling the shape of the scene: a holistic representation of the spatial envelope
GIST Descriptor (Matlab code)
Download:
Download all the matlab code and examples here:Computing the gist descriptor:
To compute the gist descriptor on an image use the function
% Load image
img = imread('demo2.jpg');
% GIST Parameters:
clear param
param.orientationsPerScale = [8 8 8 8]; % number of orientations per scale (from HF to LF)
param.numberBlocks = 4;
param.fc_prefilt = 4;
% Computing gist:
[gist, param] = LMgist(img, '', param);
Visualization:
To visualize the gist descriptor use the function
% Visualization
figure
subplot(121)
imshow(img)
title('Input image')
subplot(122)
showGist(gist, param)
title('Descriptor')
Image similarities:
When computing image similarities, it might be important to normalize the image size before computing the GIST descriptor. This can be achieved by setting the image size inside the param struct (using the field
% Load images
img1 = imread('demo1.jpg');
img2 = imread('demo2.jpg');
% GIST Parameters:
clear param
param.imageSize = [256 256]; % it works also with non-square images (use the most common aspect ratio in your set)
param.orientationsPerScale = [8 8 8 8]; % number of orientations per scale
param.numberBlocks = 4;
param.fc_prefilt = 4;
% Computing gist:
gist1 = LMgist(img1, '', param);
gist2 = LMgist(img2, '', param);
% Distance between the two images:
D = sum((gist1-gist2).^2)
Image collections:
The first call to LMgist will precompute the filters in the frequency domain and store them in param.G, subsequent calls will be faster.
% GIST Parameters:
clear param
param.imageSize = [256 256]; % set a normalized image size
param.orientationsPerScale = [8 8 8 8]; % number of orientations per scale (from HF to LF)
param.numberBlocks = 4;
param.fc_prefilt = 4;
% Pre-allocate gist:
Nfeatures = sum(param.orientationsPerScale)*param.numberBlocks^2;
gist = zeros([Nimages Nfeatures]);
% Load first image and compute gist:
img = imread(file{1});
[gist(1, :), param] = LMgist(img, '', param); % first call
% Loop:
for i = 2:Nimages
end
The script
project page:
- Gist描述子
- GIST特征描述符使用
- GIST特征描述符使用
- GIST特征描述符使用
- GIST特征描述符使用
- 机器视觉-GIST特征描述符使用
- GIST
- gist
- gist
- 描述子
- SIFT描述子
- brief 描述子
- 比较描述子
- sift描述子
- 特征描述子评测
- DAISY描述子简介
- BRIEF 特征描述子
- BRIEF 特征描述子
- 设计笔记
- Codeforces Round #219 (Div. 2) E. Watching Fireworks is Fun
- 查看某个字段在哪些表出现过
- Oracle中trunc()函数的用法
- python编译
- Gist描述子
- 开题报告、文献检索账号、文献综述、外文翻译、抄袭检测软件、论文目录,都在这了都在这了,有备无患,拿去吧!
- 参与英雄会第一届在线编程大赛:单词博弈
- 烦请大家支持一票,谢谢!!
- 打开word,出现“当前用户没有安装Microsoft office word.请运行安装程序安装该应用程序。”提示
- 小学徒博客索引
- 软件工程---软件需求分析
- IOS:沙盒机制
- java 堆和栈