added func to different colors generation

This commit is contained in:
Maria Dimashova
2011-10-06 09:34:35 +00:00
parent bbdf14b9bb
commit 408d6b84fa
2 changed files with 150 additions and 0 deletions

View File

@@ -613,6 +613,16 @@ namespace cv
static std::vector<std::string> GetListFilesR ( const std::string& path, const std::string & exten = "*", bool addPath = true );
static std::vector<std::string> GetListFolders( const std::string& path, const std::string & exten = "*", bool addPath = true );
};
/*
* Generation of a set of different colors by the following way:
* 1) generate more then need colors (in "factor" times) in RGB,
* 2) convert them to Lab,
* 3) choose the needed count of colors from the set that are more different from
* each other,
* 4) convert the colors back to RGB
*/
CV_EXPORTS void generateColors( std::vector<Scalar>& colors, size_t count, size_t factor=100 );
}
#include "opencv2/contrib/retina.hpp"