We Are Going To Discuss About cv2.error: OpenCV(4.5.2) 👎 error: (-5:Bad argument) in function ‘cvtColor’. So lets Start this Python Article.
cv2.error: OpenCV(4.5.2) 👎 error: (-5:Bad argument) in function ‘cvtColor’
- How to solve cv2.error: OpenCV(4.5.2) 👎 error: (-5:Bad argument) in function 'cvtColor'
You could try loading the image with
cv2.imread()
rather than the np.array() to see if that works since the examples use this method:img = cv2.imread(imagePath) gray = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
- cv2.error: OpenCV(4.5.2) 👎 error: (-5:Bad argument) in function 'cvtColor'
You could try loading the image with
cv2.imread()
rather than the np.array() to see if that works since the examples use this method:img = cv2.imread(imagePath) gray = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
Solution 1
You could try loading the image with cv2.imread()
rather than the np.array() to see if that works since the examples use this method:
img = cv2.imread(imagePath)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
Original Author Anders Elmgren Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.