Create series of slices through different color spaces. Usage: example_palette luv
, generates luv_*.gif
(44 images)
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vigra/multi_array.hxx>
#include <vigra/stdimagefunctions.hxx>
#include <vigra/colorconversions.hxx>
template<class Polar2Cartesian, class Cartesian2RGB, class RGB2RGBPrime>
{
int w = result.width();
{
for(int x=0; x<w; ++x)
{
{
}
else
{
}
}
}
}
template<class Polar2Cartesian, class Cartesian2RGB, class RGB2RGBPrime>
{
int w = result.width();
{
for(int x=0; x<w; ++x)
{
{
}
else
{
}
}
}
}
template<class Polar2Cartesian, class Cartesian2RGB, class RGB2RGBPrime>
{
int w = result.width();
{
for(int x=0; x<w; ++x)
{
{
}
else
{
}
}
}
}
template<class Polar2Cartesian, class Cartesian2RGB, class RGB2RGBPrime>
{
int w = result.width();
{
for(int x=0; x<w; ++x)
{
double dx = x/128.0 - 1.0;
double dy = -y/128.0 + 1.0;
double color = 180.0/M_PI*std::atan2(dy,dx);
{
}
else
{
}
}
}
}
{
char buf[1000];
else
std::cout << "Wrote " << buf << std::endl;
}
template<class Polar2Cartesian, class Cartesian2RGB, class RGB2RGBPrime>
{
int w = 257;
{
write(
colorspace,
"SaturationVsBrightness",
i, result);
}
}
{
std::cerr <<
"Usage: " <<
prog <<
" colorspace\n"
"with colorspace in [lab luv ypbpr ycbcr yiq yuv]\n\n";
std::cerr << "This programm calculates slices through the given color space\n"
"Images are named 'lab_SaturationVsBrightness_01.gif' etc.\n"
"where the first part of the name designates the colorspace used,\n"
"the second part says what is varied on the image\n"
"and the number codes the value of the quantity that is kept\n"
"constant in the image - 01 in the example means that the color\n"
"angle is 36 degrees = 1 * 360 degrees / 10\n";
}
{
{
return 1;
}
try
{
{
}
{
}
{
}
{
}
{
}
{
}
else
{
std::cerr <<
"Unknown colorspace: " <<
colorspace << std::endl;
return 1;
}
}
catch (std::exception & e)
{
std::cout << e.what() << std::endl;
return 1;
}
return 0;
}
Argument object for the function exportImage().
Definition imageinfo.hxx:134
Main MultiArray class containing the memory management.
Definition multi_array.hxx:2477
Class for a single RGB value.
Definition rgbvalue.hxx:128
value_type & red()
Definition rgbvalue.hxx:278
value_type & blue()
Definition rgbvalue.hxx:286
value_type & green()
Definition rgbvalue.hxx:282
image import and export functions