function res =myStopEdgeDetector(data,R,tr)
res = zeros(size(conv2(data,R(:,:,1),'same')));
figure
siz = size(R);

for i = 1:siz(3)
    currentKernel = conv2(data,R(:,:,i),'same');
    trashold = currentKernel>tr;
    tempRes = currentKernel.*trashold;
    res = res+tempRes;
       imagesc(res);
end

dataNegetive =( data*-1)+255;
for i = 1:siz(3)
    currentKernel = conv2(dataNegetive,R(:,:,i),'same');
    trashold = currentKernel>tr;
    tempRes = currentKernel.*trashold;
    res = res+tempRes;
       imagesc(res);
end


%clean the pictuer frames
siz = size(res);
res(:,siz(2)) = 0;
res(:,siz(2)-1) = 0;
res(:,siz(2)-2) = 0;

res(siz(1),:) = 0;
res(siz(1)-1,:) = 0;
res(siz(1)-2,:) = 0;

% figure
imagesc(res)
    