Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What does the ValueError : could not broadcast from input array(1) to input array(2) mean?

import numpy as np import cv2 from matplotlib import pyplot as plt while(1): img=cv2.imread('D:\IMG_0590_1.jpg')
ball = img[278:104, 330:158] img[181:355, 100:274] = ball

cv2.imshow('img',img)

if cv2.waitKey(10) & 0xFF == ord('q'):
        break

cv2.destroyAllWindows()

This is my code but it is giving the error mentioned in the question. What is the problem?

What does the ValueError : could not broadcast from input array(1) to input array(2) mean?

import numpy as np
import cv2
from matplotlib import pyplot as plt
while(1):
img=cv2.imread('D:\IMG_0590_1.jpg') 
ball = img[278:104, 330:158] img[181:355, 100:274] = ball

ball
 cv2.imshow('img',img)
 if cv2.waitKey(10) & 0xFF == ord('q'):
 break
cv2.destroyAllWindows()

cv2.destroyAllWindows()

This is my code but it is giving the error mentioned in the question. What is the problem?