mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
casting Vec3b operator for viz::Color
This commit is contained in:
parent
f1c062c30a
commit
261546f6f6
@ -63,6 +63,8 @@ namespace cv
|
||||
|
||||
Color(const Scalar& color);
|
||||
|
||||
operator Vec3b() const;
|
||||
|
||||
static Color black();
|
||||
static Color blue();
|
||||
static Color green();
|
||||
@ -193,6 +195,8 @@ inline cv::viz::Color::Color(double _gray) : Scalar(_gray, _gray, _gray) {}
|
||||
inline cv::viz::Color::Color(double _blue, double _green, double _red) : Scalar(_blue, _green, _red) {}
|
||||
inline cv::viz::Color::Color(const Scalar& color) : Scalar(color) {}
|
||||
|
||||
inline cv::viz::Color::operator cv::Vec3b() const { return cv::Vec3d(val); }
|
||||
|
||||
inline cv::viz::Color cv::viz::Color::black() { return Color( 0, 0, 0); }
|
||||
inline cv::viz::Color cv::viz::Color::green() { return Color( 0, 255, 0); }
|
||||
inline cv::viz::Color cv::viz::Color::blue() { return Color(255, 0, 0); }
|
||||
|
Loading…
Reference in New Issue
Block a user