Closed
Description
System Information
OpenCV python version: 4.10.0.84
Operating System / Platform: Windows 11
Python version: 3.12.2
Detailed description
The cv.cvtColor
function throws an error when trying to convert a numpy array from RGB to BGR in OpenCV version 4.10.0.84. The same code works fine with OpenCV version 4.5.5.62.
Overload resolution failed:
- src is not a numpy array, neither a scalar
- Expected Ptrcv::UMat for argument 'src'
Steps to reproduce
import numpy as np
import cv2 as cv
Create a simple test image
test_image = np.zeros((100, 100, 3), dtype=np.uint8)
Attempt to convert the image from RGB to BGR
test_image_bgr = cv.cvtColor(test_image, cv.COLOR_RGB2BGR)
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)