check if image is empty opencv python
if (type(img) is np.ndarray):
#do stuff with image
check if image is empty opencv python
if (type(img) is np.ndarray):
#do stuff with image
python opencv check image read
import cv2
import os.path
while not os.path.isfile("myImage.jpg"):
#ignore if no such file is present.
pass
img = cv2.imread("myImage.jpg", 0)
cv2.imwrite("result.jpg", img)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us