资源简介
SIFT+LBP算法实现代码,可直接运行
代码片段和文件信息
function [Total_Hist] = computeLBPonKeypoints( lbp_img Points D offset Num_of_Cells_in_per_Patch)
M = Num_of_Cells_in_per_Patch;
N = size(Points1);
Img_width = size(lbp_img 2); Img_heigth = size(lbp_img 1);
Total_Hist = zeros(1M*M*D);
for idx_point = 1 : N
hist_vector = [];
y = Points(idx_point1);
x = Points(idx_point2);
% Get square neighboring area around the keypoint
xmin = fix(x - offset);
xmax = fix(x + offset);
ymin = fix(y - offset);
ymax = fix(y + offset);
if (xmin < 1)
xmin = 1;
end
if (xmax > Img_width)
xmax = Img_width;
end
if (ymin < 1)
ymin = 1;
end
if (ymax > Img_heigth)
ymax = Img_heigth;
end
% Divide square patch into cells and compute LBP histogram within each cell */
Current_Patch_width = xmax - xmin + 1;
Current_Patch_height= ymax - ymin + 1;
Cell_width = fix(Current_Patch_width/ M);
Cell_height = fix(Current_Patch_height/ M);
for i = 0: M-1
for j = 0: M-1
Sub_Hist_Vector = [];
xstart_Cell = xmin + i*Cell_width;
xend_Cell = xstart_Cell + Cell_width -1;
ystart_Cell = ymin + j*Cell_height;
yend_Cell = ystart_Cell + Cell_height -1;
region = lbp_img(ystart_Cell:yend_Cellxstart_Cell:xend_Cell);
Sub_Hist_Vector = hist(region(:)0:D-1);
hist_vector = [ hist_vector Sub_Hist_Vector];
end
end
Total_Hist = hist_vector + Total_Hist;
% hist_vector = hist_vector./norm(hist_vector);
% Total_Hist(idx_point:) = hist_vector ;
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-11-21 16:56 SIFT with LBP\
文件 1477 2013-11-21 16:20 SIFT with LBP\ExtractionFeatures.m
文件 556 2013-06-26 14:57 SIFT with LBP\FeatureExtraction.m
文件 2876 2013-11-07 16:10 SIFT with LBP\FeaturesMatch.m
文件 475 2013-11-21 16:23 SIFT with LBP\LocalBinaryParttern.m
文件 2303 2013-11-07 19:42 SIFT with LBP\ReadImages.m
文件 1705 2013-10-31 16:00 SIFT with LBP\computeLBPonKeypoints.m
文件 2741 2011-05-31 17:27 SIFT with LBP\getmapping.m
文件 1295 2013-11-21 16:56 SIFT with LBP\info_Databa
文件 5980 2013-10-23 10:26 SIFT with LBP\lbp.m
文件 4241 2013-11-07 21:02 SIFT with LBP\main.m
文件 2347 2013-05-27 15:09 SIFT with LBP\sift.m
文件 94208 2005-07-07 21:54 SIFT with LBP\siftWin32.exe
文件 27881 2013-11-21 16:56 SIFT with LBP\tmp.key
评论
共有 条评论