given the image called 'digits.png' I am trying to crop it multiple times exactly where the digits begin and end. I am doing this by manually setting the cropping parameters but I would like to know if there is a way to detect where the black color begins and ends without manually setting it.
digits_image=cv.imread(r"digits.png",0)
plt.imshow(digits_image)
plt.imshow(digits_image[:,13:54])
plt.show()
plt.imshow(digits_image[:,110:181])
plt.show()
plt.imshow(digits_image[:,225:298])
plt.show()
