Skip to content
Snippets Groups Projects
Commit c193273b authored by sundar's avatar sundar
Browse files

Getstats for MaxFilterEllipsoid

parent 146df914
No related branches found
No related tags found
No related merge requests found
function results = Getstats_MaxFilterEllipsoid(img1,radius,bytesize)
% Collects stats of performance and accuracy for CudaMex and Matlab
% implementations of MaxFilterEllipsoid
%
if (~exist('bytesize','var') || isempty(bytesize))
info = whos('img1');
bytesize = info.bytes;
end
image_out={};
for i=1:2
if (i == 1)
useMatlab = 1;
else
useMatlab = 0;
end
results(i).process = 'MaxFilterEllipsoid';
if (useMatlab == 1)
results(i).Cuda_or_Matlab = 'MATLAB';
else
results(i).Cuda_or_Matlab = 'CUDA';
end
t1 = tic ;
image_out{i} = MaxFilterEllipsoid(img1,radius,1,useMatlab);
elapsedtime=toc(t1);
img_size = size(img1);
results(i).ImageSize = img_size;
results(i).timer = elapsedtime;
end
% Difference to check if addition by both methods result in same image
diffimage = image_out{2} - image_out{1};
if (sum(diffimage(:)) == 0)
accuracy = 100;
else
accuracy = 0;
end
results(1).accuracy = accuracy;
results(2).accuracy = accuracy;
results(1).ByteSize = bytesize;
results(2).ByteSize = bytesize;
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment