-
Notifications
You must be signed in to change notification settings - Fork 1k
cv2.cvtColor does not work with single pixel in 4.5.4.58 #575
Copy link
Copy link
Closed
Description
Expected behaviour
cv2.cvtColor should be able to convert a single pixel's color as it does in version 4.5.3.56
Actual behaviour
Traceback (most recent call last):
File "raw_tester.py", line 23, in <module>
npimg = cv2.cvtColor(pixel, cv2.COLOR_RGB2BGR)
cv2.error: OpenCV(4.5.4-dev) D:\a\opencv-python\opencv-python\opencv\modules\core\src\matrix.cpp:466: error: (-215:Assertion failed) _step >= minstep in function 'cv::Mat::Mat'
Steps to reproduce
import cv2
import numpy as np
pixel = np.uint8([[[40, 50, 200]]])
new_pixel = cv2.cvtColor(pixel, cv2.COLOR_RGB2BGR)
print(new_pixel)
- Win10 x64
- opencv-contrib-python-headless 4.5.4.58
Issue submission checklist
- This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
- I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
- The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
- I'm using the latest version of
opencv-python
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels