function [ newpos ] = warpPosition(  old_coords,warpMap )
% ECE 602: Project 
% Hassan Nahas
%This function warps a signle coordinate position using the warpmap
    
    newpos = squeeze(double(warpMap(old_coords(1),old_coords(2),2:-1:1)) / 64.0 - 10.0);
    newpos = round(newpos);
%     newpos = newpos(end:-1:1);
%     allcoords = 1:(sizeOfImage(1)*sizeOfImage(2));
%     [newpos(1),newpos(2)] = ind2sub(sizeOfImage,indcoords(sub2ind(sizeOfImage,old_coords(1),old_coords(2))));
%     newImage(allcoords) = originalImage(indcoords);
end

