function center = findCenterofSlot(imBW,previousPoint)
        actPoint = previousPoint;
        leftZeros = 0;
        rightZeros = 0;
        while(imBW(actPoint(1),actPoint(2)) == 0)
            leftZeros = leftZeros +1;
            actPoint(2) = actPoint(2) - 1;
        end
        actPoint = previousPoint;
        while(imBW(actPoint(1),actPoint(2)) == 0)
            rightZeros = rightZeros +1;
            actPoint(2) = actPoint(2) + 1;
        end
        center = [previousPoint(1), previousPoint(2) + round((rightZeros-leftZeros+1)/2)];

end