#include #include using namespace CVD; using namespace std; int main() { typedef float C; Image> i(ImageRef(256, 256)); //Show three colourmaps side by side from low (top of image) //to high (bottom of image) for(int r = 0; r < i.size().y; r++) for(int c = 0; c < i.size().x; c++) { if(c < i.size().x / 3.) i[r][c] = Colourmap>::hot(r * 1.0 / i.size().y); else if(c < i.size().x * 2. / 3.) i[r][c] = Colourmap>::jet(r * 1.0 / i.size().y); else i[r][c] = Colourmap>::gkr(r * 1.0 / i.size().y); } img_save(i, "colourmaps.png"); }