gpt4 book ai didi

matlab - HOG 特征 MATLAB 可视化代码

转载 作者:行者123 更新时间:2023-12-02 06:35:13 24 4
gpt4 key购买 nike

我在这里找到了How are HoG features represented graphically?可视化 HOG 特征的代码;它由 http://www.cs.berkeley.edu/~rbg/latent/index.html 中的 2 个文件完成, 可视化HOG.m 和HOGpicture.m 即(以下代码是在 MIT 许可证下发布的)

function im = HOGpicture(w, bs)
% Make picture of positive HOG weights.
% im = HOGpicture(w, bs)

% construct a "glyph" for each orientation
bim1 = zeros(bs, bs);
bim1(:,round(bs/2):round(bs/2)+1) = 1;
bim = zeros([size(bim1) 9]);
bim(:,:,1) = bim1;
for i = 2:9,
bim(:,:,i) = imrotate(bim1, -(i-1)*20, 'crop');
end

% make pictures of positive weights bs adding up weighted glyphs
s = size(w);
w(w < 0) = 0;
im = zeros(bs*s(1), bs*s(2));
for i = 1:s(1),
iis = (i-1)*bs+1:i*bs;
for j = 1:s(2),
jjs = (j-1)*bs+1:j*bs;
for k = 1:9,
im(iis,jjs) = im(iis,jjs) + bim(:,:,k) * w(i,j,k);
end
end
end

我不明白什么是 bs 参数以及什么意思..anycan 可以帮助我吗?

最佳答案

如果您正在寻找可视化 HOG,可以在这里查看,http://web.mit.edu/vondrick/ihog/#code

最近发表在iccv 2013

关于matlab - HOG 特征 MATLAB 可视化代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21169469/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com