Some videos have frames that have black strips like borders. I have to remove them from the frames. I came up with a crude solution:
import sys, cv2, numpy
i
I think that you will find that the problem goes away if you work from the other side of the image, as you are checking the first column (col[0] - it's black so you delete it and the black col[1] becomes col[0] then you check the col[1] - skipping the new col[0]....
If you start from the max it would work or if you stay on any given col once you have deleted it. Alternatively you can make a list of which to delete, reverse it and then do the deletions.