Добрый день, У меня появляется ошибка при попытке вывода поделеных кадров с видео
cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function 'imshow'
> Overload resolution failed:
> - imshow() missing required argument 'mat' (pos 2)
> - imshow() missing required argument 'mat' (pos 2)
> - imshow() missing required argument 'mat' (pos 2)
while(True):
_, frame = cap.read()
height = frame.shape[0]
width = frame.shape[1]
number_slices = 3
slices_width = width//number_slices
#slices_height = height
#M = width/number_slices
tiles = [frame[x:x + slices_width, y:y + height]
for x in range(0, frame.shape[0], slices_width) for y in range(0, frame.shape[1], height)]
#cv2.imshow("w", tiles)
print(tiles)
for i in tiles:
cv2.imshow(i)
Фрагмент вывода:
...,
[ 58, 133, 143],
[ 46, 121, 131],
[ 47, 122, 132]],
[[ 85, 185, 196],
[ 78, 178, 189],
[ 75, 175, 186],
...,
[ 49, 124, 134],
[ 42, 117, 127],
[ 48, 123, 133]]], dtype=uint8)]