添加链接
注册
登录
link管理
链接快照平台
输入网页链接,自动生成快照
标签化管理网页链接
相关文章推荐
强悍的水煮肉
·
PyQt5 ...
·
1 月前
·
潇洒的茶壶
·
mysql workbench ...
·
2 月前
·
率性的爆米花
·
sec_profile/README.md ...
·
4 月前
·
正直的荔枝
·
关键词优化难易分析_SEO优化难度分析 - ...
·
4 月前
·
任性的筷子
·
白金卡持卡人服务 | JCB 中国大陆
·
4 月前
·
link管理
›
optAnalyse/withLBP/extractLBPFeatures.m at master · wyli/optAnalyse · GitHub
https://github.com/wyli/optAnalyse/blob/master/withLBP/extractLBPFeatures.m
性感的卤蛋
4 月前
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Files
master
Breadcrumbs
optAnalyse
/
withLBP
/
extractLBPFeatures.m
Blame
Blame
Latest commit
History
History
56 lines (53 loc) · 1.65 KB
master
Breadcrumbs
optAnalyse
/
withLBP
/
extractLBPFeatures.m
Top
File metadata and controls
Code
Blame
56 lines (53 loc) · 1.65 KB
Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
function
[]
=
extractLBPFeatures(...
xmlSet
,
outputSet
,
baseSet
,
feaSet
,
windowSize
,
subSize
,
step3d
)
fprintf(
'
%s
build histogram for each cuboid
\n
'
, datestr(
now
));
%
input
xmlFiles
=
dir([
xmlSet
'
/*.xml
'
]);
cuboidSet
=
[
outputSet
'
/cuboid_
%d
/
%s
'
];
clusterSet
=
[
baseSet
'
/clusters
'
];
%
output
feaSet
=
[
feaSet
'
/
'
];
mkdir(
feaSet
);
feaSet
=
[
feaSet
'
%s
'
];
load(
clusterSet
);
for
i
=
1
:
size(
xmlFiles
,
1
)
rec
=
VOCreadxml([
xmlSet
'
/
'
xmlFiles(
i
).name]);
name
=
rec
.
annotation
.
index
;
fprintf(
'
%s
extracting LBP features
%s\n
'
, datestr(
now
),
name
);
cuboidFile
=
sprintf(
cuboidSet
,
windowSize
,
name
);
load(
cuboidFile
);
cuboid
=
cuboid(
1
,
:
);
X_features
=
zeros(size(
clusters
,
1
), size(
cuboid
,
2
));
for
m
=
1
:
size(
cuboid
,
2
)
X_features(
:
,
m
)
=
cuboid2Hist(uint8(cuboid{
1
,
m
}),
clusters
,
subSize
,
step3d
);
end
featureFile
=
sprintf(
feaSet
,
name
);
save(
featureFile
,
'
X_features
'
);
clear
X_features
;
end
end
function
histogram
=
cuboid2Hist(
image3d
,
clusters
,
wSize
,
wStep
)
imgSize
=
size(
image3d
);
halfSize
=
ceil(
wSize
/
2
);
imgSize
=
imgSize
-
halfSize
;
wStep
=
3
;
xs
=
halfSize
:
wStep
:
imgSize(
1
);
while
size(
xs
, 2) < 1
wStep
=
wStep
-
1
;
xs
=
halfSize
:
wStep
:
imgSize(
1
);
end
[
x
y
z
]
=
meshgrid(
xs
,
xs
,
xs
);
x
=
x(
:
);
y
=
y(
:
);
z
=
z(
:
);
localFeature
=
zeros(numel(
x
),
177
);
%
3 x 59 patterns
for
i
=
1
:
size(
localFeature
,
1
)
localFeature(
i
,
:
)=LBPHist(getSurroundCuboid(...
image3d
, [x(
i
), y(
i
), z(
i
)], [
wSize
,
wSize
,
wSize
]));
%
localFeature(i, :) = LBPHist(sampleCell);
end
D
=
dist2(
localFeature
,
clusters
);
[
~
,
nearest
]
=
min(
D
, [],
2
);
bins
=
1
:
size(
clusters
,
1
);
histogram
=
histc(
nearest
'
,
bins
);
end
推荐文章
强悍的水煮肉
·
PyQt5 控件学习(一个一个学习之QWidget) - Zcb0812 - 博客园
1 月前
潇洒的茶壶
·
mysql workbench 导出建表语句 导出数据_怎么导出建表语句-CSDN博客
2 月前
率性的爆米花
·
sec_profile/README.md at master · tanjiti/sec_profile · GitHub
4 月前
正直的荔枝
·
关键词优化难易分析_SEO优化难度分析 - 站长工具
4 月前
任性的筷子
·
白金卡持卡人服务 | JCB 中国大陆
4 月前