Color threshold + web cam:

Video size: 800 * 500

ML model + web cam:

Video size: 400 * 250

The reason why this is slow most of the reasons are because this section takes too long to run:

# take too long this step
        for i in range(h):
            for j in range(w):
                # prediction
                binary_pred = LR.sigmoid(np.dot(self.w,rgbImg[i,j,:])+self.b)

Next Post Previous Post