38 #include <visp3/core/vpImageTools.h>
100 unsigned char A_star,
102 unsigned char B_star)
108 "Bad gray levels")) ;
112 double factor = (double)(B_star - A_star)/(double)(B - A);
114 for (
unsigned int i=0 ; i < I.
getHeight(); i++)
115 for (
unsigned int j=0 ; j < I.
getWidth(); j++) {
123 I[i][j] = (
unsigned char)(A_star + factor*(v-A));
153 for (
unsigned int b = 0; b < n ; b++)
156 Idiff.
bitmap[b] = (
unsigned char)
187 for (
unsigned int b = 0; b < n ; b++)
unsigned int getWidth() const
Type * bitmap
points toward the bitmap
error that can be emited by ViSP classes.
Error that can be emited by the vpImage class and its derivates.
static Type maximum(const Type &a, const Type &b)
void resize(const unsigned int h, const unsigned int w)
set the size of the image without initializing it.
static Type minimum(const Type &a, const Type &b)
unsigned int getHeight() const