updated
This commit is contained in:
parent
5a83879c78
commit
34c140511f
@ -23,9 +23,9 @@ OUT_FOLDER = 'descriptors';
|
||||
%% the idea is all your descriptors are in individual folders - within
|
||||
%% the folder specified as 'OUT_FOLDER'.
|
||||
% OUT_SUBFOLDER='avgRGB';
|
||||
% OUT_SUBFOLDER='globalRGBhisto';
|
||||
OUT_SUBFOLDER='globalRGBhisto';
|
||||
% OUT_SUBFOLDER='spatialColour';
|
||||
OUT_SUBFOLDER='spatialColourTexture';
|
||||
% OUT_SUBFOLDER='spatialColourTexture';
|
||||
|
||||
allfiles=dir (fullfile([DATASET_FOLDER,'/Images/*.bmp']));
|
||||
for filenum=1:length(allfiles)
|
||||
@ -38,9 +38,9 @@ for filenum=1:length(allfiles)
|
||||
|
||||
%% EXTRACT FUNCTION
|
||||
% F=extractAvgRGB(img);
|
||||
% F=extractGlobalColHist(img);
|
||||
F=extractGlobalColHist(img);
|
||||
% F=extractSpatialColour(img);
|
||||
F=extractSpatialColourTexture(img);
|
||||
% F=extractSpatialColourTexture(img);
|
||||
save(fout,'F');
|
||||
toc
|
||||
end
|
||||
|
@ -105,7 +105,7 @@ for run=1:run_total
|
||||
row = rows(n, :);
|
||||
category = row(3);
|
||||
|
||||
if category == query_category
|
||||
if category == query_category;
|
||||
correct_results = correct_results + 1;
|
||||
else
|
||||
incorrect_results = incorrect_results + 1;
|
||||
@ -142,7 +142,7 @@ for run=1:run_total
|
||||
P_rel_n(i) = precision * i_result_relevant;
|
||||
end
|
||||
|
||||
sum_P_rel_n = sum(P_rel_n);
|
||||
sum_P_rel_n = sum(P_rel_n)
|
||||
average_precision = sum_P_rel_n / CAT_HIST(1,query_category);
|
||||
|
||||
AP_values(run) = average_precision;
|
||||
@ -160,8 +160,15 @@ for run=1:run_total
|
||||
end
|
||||
|
||||
%% 7 Calculate MAP
|
||||
AP_values
|
||||
figure(4)
|
||||
histogram(AP_values);
|
||||
title('Average Precision Distribution');
|
||||
ylabel('Count');
|
||||
xlabel('Average Precision');
|
||||
xlim([0, 1]);
|
||||
|
||||
MAP = mean(AP_values)
|
||||
AP_sd = std(AP_values)
|
||||
|
||||
figure(2)
|
||||
plot(1:run_total, AP_values);
|
||||
|
@ -1,6 +1,6 @@
|
||||
function F=extractGlobalColHist(img)
|
||||
|
||||
divs = 4;
|
||||
divs = 8;
|
||||
|
||||
qimg = floor(img .* divs);
|
||||
bin = qimg(:,:,1) * divs^2 + qimg(:,:,2) * divs^1 + qimg(:,:,3);
|
||||
|
@ -121,7 +121,7 @@ LatexCommand tableofcontents
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
Theoretical Implementations
|
||||
Theory
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
@ -132,5 +132,24 @@ Results
|
||||
Conclusions
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Newpage pagebreak
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset CommandInset bibtex
|
||||
LatexCommand bibtex
|
||||
btprint "btPrintCited"
|
||||
bibfiles "references"
|
||||
options "plain"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_body
|
||||
\end_document
|
||||
|
@ -96,6 +96,14 @@ Andy Pack (6420013)
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section*
|
||||
Abstract
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
abstract
|
||||
\end_layout
|
||||
|
||||
\begin_layout LyX-Code
|
||||
\begin_inset CommandInset toc
|
||||
LatexCommand tableofcontents
|
||||
|
2
report/references.bib
Normal file
2
report/references.bib
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
|
||||
|
||||
img = double(imread('dataset/Images/10_10_s.bmp'))./255;
|
||||
img = double(imread('dataset/Images/10_11_s.bmp'))./255;
|
||||
% imshow(img);
|
||||
|
||||
img = getGreyscale(img);
|
||||
|
||||
[mag, angle] = getEdgeInfo(img);
|
||||
|
||||
F = getEdgeAngleHist(mag, angle)
|
||||
F = getEdgeAngleHist(mag, angle);
|
||||
|
||||
imshow(mag > 0.05)
|
||||
|
@ -1,7 +1,7 @@
|
||||
function F=getEdgeAngleHist(mag_img, angle_img)
|
||||
|
||||
bins = 8;
|
||||
threshold = 0.1;
|
||||
threshold = 0.05;
|
||||
|
||||
dimensions = size(angle_img);
|
||||
rows = dimensions(1);
|
||||
|
Loading…
Reference in New Issue
Block a user