42 #include <visp/vpImageTools.h>
104 unsigned char A_star,
106 unsigned char B_star)
112 "Bad gray levels")) ;
116 double factor = (B_star - A_star)/(B - A);
118 for (
unsigned int i=0 ; i < I.
getHeight(); i++)
119 for (
unsigned int j=0 ; j < I.
getWidth(); j++) {
127 I[i][j] = (
unsigned char)(A_star + factor*(v-A));
157 for (
unsigned int b = 0; b < n ; b++)
160 Idiff.
bitmap[b] = (
unsigned char)
191 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
static Type minimum(const Type &a, const Type &b)
unsigned int getHeight() const