32 #ifndef OPENIMAGEIO_IMAGEBUFALGO_H
33 #define OPENIMAGEIO_IMAGEBUFALGO_H
38 # pragma warning (disable : 4251)
49 #ifndef __OPENCV_CORE_TYPES_H__
91 namespace ImageBufAlgo {
139 int xbegin,
int xend,
int ybegin,
int yend,
140 int zbegin=0,
int zend=1) {
141 return fill (dst, pixel,
ROI(xbegin,xend,ybegin,yend,zbegin,zend));
168 bool OIIO_API
checker (
ImageBuf &dst,
int width,
int height,
int depth,
169 const float *color1,
const float *color2,
170 int xoffset,
int yoffset,
int zoffset,
175 const float *color1,
const float *color2,
176 int xbegin,
int xend,
int ybegin,
int yend,
177 int zbegin=0,
int zend=1);
206 int nchannels,
const int *channelorder,
207 const float *channelvalues=NULL,
208 const std::string *newchannelnames=NULL,
209 bool shuffle_channel_names=
false);
214 int nchannels,
const int *channelorder,
215 bool shuffle_channel_names);
262 int zbegin,
int chbegin,
374 int xshift,
int yshift,
int zshift=0,
397 const float *min=NULL,
const float *max=NULL,
398 bool clampalpha01 =
false,
417 float min=-std::numeric_limits<float>::max(),
418 float max=std::numeric_limits<float>::max(),
419 bool clampalpha01 =
false,
470 bool OIIO_API
add (
ImageBuf &dst,
const float *val,
479 enum OIIO_API AddOptions
484 ADD_RETAIN_WINDOWS = 2,
485 ADD_ALIGN_WINDOWS = 0,
556 bool OIIO_API
mul (
ImageBuf &dst,
const float *val,
635 const ColorProcessor *processor,
646 bool OIIO_API
colorconvert (
float *color,
int nchannels,
647 const ColorProcessor *processor,
bool unpremult);
685 std::vector<float> min;
686 std::vector<float> max;
687 std::vector<float> avg;
688 std::vector<float> stddev;
689 std::vector<imagesize_t> nancount;
690 std::vector<imagesize_t> infcount;
691 std::vector<imagesize_t> finitecount;
692 std::vector<double> sum, sum2;
718 double meanerror, rms_error, PSNR, maxerror;
719 int maxx, maxy, maxz, maxc;
741 float failthresh,
float warnthresh,
767 float luminance = 100,
float fov = 45,
772 float luminance = 100,
float fov = 45);
844 int ncolors,
const float *color,
845 const float *eps=NULL,
872 const float *low,
const float *high,
901 const std::string &extrainfo =
"",
903 int blocksize = 0,
int nthreads=0);
928 Filter2D *filter=NULL,
933 int xbegin,
int xend,
int ybegin,
int yend,
934 Filter2D *filter=NULL);
958 bool interpolate =
true,
979 const ImageBuf &kernel,
bool normalize =
true,
1001 float width,
float height,
float depth = 1.0f,
1002 bool normalize =
true);
1033 const char *kernel=
"gaussian",
float width = 3.0f,
1034 float contrast = 1.0f,
float threshold = 0.0f,
1084 enum OIIO_API NonFiniteFixMode
1087 NONFINITE_BLACK = 1,
1115 int *pixelsFixed = NULL,
1122 NonFiniteFixMode mode = NONFINITE_BOX3,
1123 int *pixelsFixed = NULL);
1153 TypeDesc convert=TypeDesc::UNKNOWN);
1168 TypeDesc convert=TypeDesc::UNKNOWN);
1217 bool z_zeroisinf =
false,
1222 ROI roi,
int threads = 0);
1235 const std::string &text,
1236 int fontsize=16,
const std::string &fontname=
"",
1237 const float *textcolor = NULL);
1258 std::vector<imagesize_t> &
histogram,
int bins=256,
1259 float min=0,
float max=1,
imagesize_t *submin=NULL,
1272 const std::vector<imagesize_t> &histogram);
1276 enum OIIO_API MakeTextureMode {
1277 MakeTxTexture, MakeTxShadow, MakeTxEnvLatl,
1278 MakeTxEnvLatlFromLightProbe,
1411 const std::string &outputfilename,
1413 std::ostream *outstream = NULL);
1418 const std::string &filename,
1419 const std::string &outputfilename,
1421 std::ostream *outstream = NULL);
1426 const std::vector<std::string> &filenames,
1427 const std::string &outputfilename,
1429 std::ostream *outstream = NULL);
1439 #endif // OPENIMAGEIO_IMAGEBUFALGO_H