Skip to content

Commit

Permalink
updated the csv scripts file to include tags
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes committed Oct 6, 2016
1 parent 0accf8c commit 30e694c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions scripts/markers2csv.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
% produced by imannotate software and outputs a csv file that represnets
% all the datapoints that result from this data point.

INPUT_FOLDER = '';
OUTPUT_FOLDER = '';
INPUT_FOLDER = 'E:\phd\kingston\fundus_datasets\Messidor_Habib\groundtruth\MA\markers\';
OUTPUT_FOLDER = 'E:\phd\kingston\fundus_datasets\Messidor_Habib\groundtruth\MA\csv\';
INPUT_FOLDER = uigetdir('', 'Select the input folder')

OUTPUT_FOLDER = uigetdir('', 'Select the output folder')

matfiles = ls([INPUT_FOLDER, '*.mat']);

for i=1:size(matfiles,1)
result = {'category', 'shape', 'datapoint'};
result = {'X', 'Y', 'radius', 'obvious', 'regular', 'subtle', 'close_to_vessel'};

matfile = matfiles(i,:);

Expand All @@ -27,10 +25,13 @@

datapoints = markerPositions.(category).data;
shape = markerPositions.(category).shape;

for k = 1:length(datapoints)
datapoint = datapoints{k};
result = [result; {category, shape, datapoint}];
tag_ctv = markerPositions.(category).tags{k}.close_to_vessel;
tag_obvious = markerPositions.(category).tags{k}.obvious;
tag_regular = markerPositions.(category).tags{k}.subtle;
tag_subtle = markerPositions.(category).tags{k}.regular;
result = [result; {datapoint(1), datapoint(2), datapoint(3), tag_obvious, tag_regular, tag_subtle, tag_ctv }];
end
end

Expand Down

0 comments on commit 30e694c

Please sign in to comment.