I am using opencv+Qt(c++)
and I want convert a QColor RGB
pixel to an opencv BGR
pixel:
QColor --> cv::Scalar
cv::Scalar --> QColor
You have not given a programming language. In python, you can use commands such as:
cv2image=cv2.cvtColor(cv2image, cv2.COLOR_BGR2RGB)
cv2image=cv2.cvtColor(cv2image, cv2.COLOR_RGB2BGR)
cv2image=cv2.cvtColor(cv2image, cv2.COLOR_RGB2GRAY)
For C++ the commands are similar.
You may also want to have a look here: How to combine OpenCV with PyQt to create a simple GUI?
qcolor --> scalar
scalar --> qcolor