Here is my short code:
from cv2 import cv2
img = cv2.imread("1.png")
print("Высота:"+str(img.shape[0]))
print("Ширина:" + str(img.shape[1]))
print("Количество каналов:" + str(img.shape[2]))
if img[0, 0] == (255, 255, 255):
print("Yes")
But I have an error:
Traceback (most recent call last):
File "e:\Projects\Captcha Decrypt\main.py", line 9, in <module>
if img[0, 0] == [255, 255, 255]:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Can you solve this problem?