1 #include "opencv2/imgproc/imgproc.hpp"
2 #include "opencv2/contrib/contrib.hpp"
3 #include "opencv2/highgui/highgui.hpp"
12 int main(int argc, char** argv)
16 cout << "Colors count should be passed." << endl;
20 int colorsCount = atoi(argv[1]);
21 vector<Scalar> colors;
22 theRNG() = (uint64)time(0);
23 generateColors( colors, colorsCount );
26 Mat strips(300, colorsCount*stripWidth, CV_8UC3);
27 for( int i = 0; i < colorsCount; i++ )
29 strips.colRange(i*stripWidth, (i+1)*stripWidth) = colors[i];
32 imshow( "strips", strips );