[英]OpenCV: draw a white(!) circle in CV_16UC1 mat
I would like to draw a white circle in an matrix of type CV_16UC1. 我想在CV_16UC1类型的矩阵中绘制一个白色圆圈。 That is basically what I do: 这基本上就是我做的事情:
cv::Mat bla => Type CV_16UC1
cv::circle(bla, cv::Point(15, 15), 1, COLOR, 20);
I tried for Color: 我试过Color:
cv::Scalar(0,0,0)
cv::Scalar(255,255,255)
UINT_MAX
but everything turns up black... any suggestions? 但是一切都变黑了......有什么建议吗?
If I remember correctly that C1
means one channel image. 如果我没记错的话, C1
意味着一个频道图像。 Try to use a color with one demension: cv::Scalar(0xffff)
尝试使用带有一个demension的颜色: cv::Scalar(0xffff)
I use 0xffff
because the 16U
means 16 (unsigned) bits per channel. 我使用0xffff
因为16U
意味着每个通道16个(无符号)位。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.