The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RIntegral Class Template Reference

#include <rimage.h>

Inheritance diagram for RIntegral:

Inheritance graph
[legend]
Collaboration diagram for RIntegral:

Collaboration graph
[legend]
List of all members.

Public Member Functions

getPixel (const int index) const
getPixel (const int x, const int y) const
getPixel (const int index) const
getPixel (const int x, const int y) const
getPixel (const int index) const
getPixel (const int x, const int y) const
getPixel (const int index) const
getPixel (const int x, const int y) const
void integrate (const RImage< T > &image, ROI roi)
void integrate (const RImage< T > &image)
void integrate (const RImage< T > &image, ROI roi)
void integrate (const RImage< T > &image)
void integrate (const RImage< T > &image, ROI roi)
void integrate (const RImage< T > &image)
void integrate (const RImage< T > &image, ROI roi)
void integrate (const RImage< T > &image)
 RIntegral (const RImage< T > &image, ROI &roi)
 RIntegral (const RImage< T > &image)
 RIntegral (const int width, const int height)
 RIntegral (const RImage< T > &image, ROI &roi)
 RIntegral (const RImage< T > &image)
 RIntegral (const int width, const int height)
 RIntegral (const RImage< T > &image, ROI &roi)
 RIntegral (const RImage< T > &image)
 RIntegral (const int width, const int height)
 RIntegral (const RImage< T > &image, ROI &roi)
 RIntegral (const RImage< T > &image)
 RIntegral (const int width, const int height)
void setPixel (const int x, const int y, T val)
void setPixel (const int x, const int y, T val)
void setPixel (const int x, const int y, T val)
void setPixel (const int x, const int y, T val)

template<class T>
class RIntegral< T >


Constructor & Destructor Documentation

RIntegral const int  width,
const int  height
[inline]
 

Definition at line 183 of file mac/build/mpisearch.framework/Headers/rimage.h.

References RImage::setSize().

00183                                               {
00184       setSize(width+1,height+1);
00185   }

Here is the call graph for this function:

RIntegral const RImage< T > &  image  )  [inline]
 

Definition at line 187 of file mac/build/mpisearch.framework/Headers/rimage.h.

References RImage::height, image, integrate(), RImage::setSize(), and RImage::width.

00187                                     {
00188       setSize(image.width+1,image.height+1);
00189     integrate(image);
00190   }

Here is the call graph for this function:

RIntegral const RImage< T > &  image,
ROI roi
[inline]
 

Definition at line 192 of file mac/build/mpisearch.framework/Headers/rimage.h.

References RImage::height, image, integrate(), RImage::setSize(), and RImage::width.

00192                                              {
00193       setSize(image.width+1,image.height+1);
00194     integrate(image, roi);
00195   }

Here is the call graph for this function:

RIntegral const int  width,
const int  height
[inline]
 

Definition at line 183 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

References RImage::setSize().

00183                                               {
00184       setSize(width+1,height+1);
00185   }

Here is the call graph for this function:

RIntegral const RImage< T > &  image  )  [inline]
 

Definition at line 187 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

References RImage::height, image, integrate(), RImage::setSize(), and RImage::width.

00187                                     {
00188       setSize(image.width+1,image.height+1);
00189     integrate(image);
00190   }

Here is the call graph for this function:

RIntegral const RImage< T > &  image,
ROI roi
[inline]
 

Definition at line 192 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

References RImage::height, image, integrate(), RImage::setSize(), and RImage::width.

00192                                              {
00193       setSize(image.width+1,image.height+1);
00194     integrate(image, roi);
00195   }

Here is the call graph for this function:

RIntegral const int  width,
const int  height
[inline]
 

Definition at line 183 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

References RImage::setSize().

00183                                               {
00184       setSize(width+1,height+1);
00185   }

Here is the call graph for this function:

RIntegral const RImage< T > &  image  )  [inline]
 

Definition at line 187 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

References RImage::height, image, integrate(), RImage::setSize(), and RImage::width.

00187                                     {
00188       setSize(image.width+1,image.height+1);
00189     integrate(image);
00190   }

Here is the call graph for this function:

RIntegral const RImage< T > &  image,
ROI roi
[inline]
 

Definition at line 192 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

References RImage::height, image, integrate(), RImage::setSize(), and RImage::width.

00192                                              {
00193       setSize(image.width+1,image.height+1);
00194     integrate(image, roi);
00195   }

Here is the call graph for this function:

RIntegral const int  width,
const int  height
[inline]
 

Definition at line 192 of file src/rimage.h.

References RImage::setSize().

00192                                               {
00193       setSize(width+1,height+1);
00194   }

Here is the call graph for this function:

RIntegral const RImage< T > &  image  )  [inline]
 

Definition at line 196 of file src/rimage.h.

References RImage::height, image, integrate(), RImage::setSize(), and RImage::width.

00196                                     {
00197       setSize(image.width+1,image.height+1);
00198     integrate(image);
00199   }

Here is the call graph for this function:

RIntegral const RImage< T > &  image,
ROI roi
[inline]
 

Definition at line 201 of file src/rimage.h.

References RImage::height, image, integrate(), RImage::setSize(), and RImage::width.

00201                                              {
00202       setSize(image.width+1,image.height+1);
00203     integrate(image, roi);
00204   }

Here is the call graph for this function:


Member Function Documentation

T getPixel const int  index  )  const [inline, virtual]
 

Reimplemented from RImage.

Definition at line 260 of file src/rimage.h.

00260                                     {
00261     if(index < 0)
00262       return 0;
00263     if(index >= numpixels)
00264       return array[numpixels-1];
00265     else
00266       return array[index];
00267   };

T getPixel const int  x,
const int  y
const [inline, virtual]
 

Reimplemented from RImage.

Definition at line 244 of file src/rimage.h.

References ASSERT.

00244                                              {
00245     int lx = x, ly = y;
00246     if(lx < 0 || ly < 0) {
00247       return 0;
00248     }
00249     if(lx >= width) {
00250       ASSERT(false);
00251       lx = width - 1;
00252     }
00253     if(ly >= height) {
00254       ASSERT(false);
00255       ly = height - 1;
00256     }
00257     return array[width * ly + lx];
00258   };

T getPixel const int  index  )  const [inline, virtual]
 

Reimplemented from RImage.

Definition at line 251 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

00251                                     {
00252     if(index < 0)
00253       return 0;
00254     if(index >= numpixels)
00255       return array[numpixels-1];
00256     else
00257       return array[index];
00258   };

T getPixel const int  x,
const int  y
const [inline, virtual]
 

Reimplemented from RImage.

Definition at line 235 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

References ASSERT.

00235                                              {
00236     int lx = x, ly = y;
00237     if(lx < 0 || ly < 0) {
00238       return 0;
00239     }
00240     if(lx >= width) {
00241       ASSERT(false);
00242       lx = width - 1;
00243     }
00244     if(ly >= height) {
00245       ASSERT(false);
00246       ly = height - 1;
00247     }
00248     return array[width * ly + lx];
00249   };

T getPixel const int  index  )  const [inline, virtual]
 

Reimplemented from RImage.

Definition at line 251 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

00251                                     {
00252     if(index < 0)
00253       return 0;
00254     if(index >= numpixels)
00255       return array[numpixels-1];
00256     else
00257       return array[index];
00258   };

T getPixel const int  x,
const int  y
const [inline, virtual]
 

Reimplemented from RImage.

Definition at line 235 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

References ASSERT.

00235                                              {
00236     int lx = x, ly = y;
00237     if(lx < 0 || ly < 0) {
00238       return 0;
00239     }
00240     if(lx >= width) {
00241       ASSERT(false);
00242       lx = width - 1;
00243     }
00244     if(ly >= height) {
00245       ASSERT(false);
00246       ly = height - 1;
00247     }
00248     return array[width * ly + lx];
00249   };

T getPixel const int  index  )  const [inline, virtual]
 

Reimplemented from RImage.

Definition at line 251 of file mac/build/mpisearch.framework/Headers/rimage.h.

00251                                     {
00252     if(index < 0)
00253       return 0;
00254     if(index >= numpixels)
00255       return array[numpixels-1];
00256     else
00257       return array[index];
00258   };

T getPixel const int  x,
const int  y
const [inline, virtual]
 

Reimplemented from RImage.

Definition at line 235 of file mac/build/mpisearch.framework/Headers/rimage.h.

References ASSERT.

Referenced by integrate().

00235                                              {
00236     int lx = x, ly = y;
00237     if(lx < 0 || ly < 0) {
00238       return 0;
00239     }
00240     if(lx >= width) {
00241       ASSERT(false);
00242       lx = width - 1;
00243     }
00244     if(ly >= height) {
00245       ASSERT(false);
00246       ly = height - 1;
00247     }
00248     return array[width * ly + lx];
00249   };

void integrate const RImage< T > &  image,
ROI  roi
[inline]
 

Definition at line 218 of file src/rimage.h.

References RImage::array, image, ROI::m_max_x, ROI::m_max_y, ROI::m_min_x, ROI::m_min_y, p, RImage::width, and y.

00218                                                  {
00219                 //cout << "RImage<T>::integrate: " << roi << endl;
00220     //roi.fitImage(*this);
00221     //cout << "RImage<T>::integrate: " << roi << endl;
00222 
00223     //cout << "roi: (" << roi.m_min_x << ", " << roi.m_min_y << ", "<< roi.m_max_x << ", "<< roi.m_max_y << ")" << endl;
00224       T *p = array + (width*roi.m_min_y + roi.m_min_x);
00225       T *pxy, *px1y, *pxy1, *q;
00226       for(int x = roi.m_min_x; x < roi.m_max_x+1; ++x) // create top row of zeros
00227         *p++ = 0;
00228       for(int y = roi.m_min_y; y < roi.m_max_y; ++y){
00229         //cout << "integrating line " << y << " of " << image.height << endl;
00230         p = array + (width*(y+1) + roi.m_min_x);
00231         pxy = array + (width * y +  roi.m_min_x);
00232         px1y = array + (width * y +  roi.m_min_x + 1);
00233         pxy1 = array + (width * (y+1) +  roi.m_min_x);
00234         q = image.array + (image.width * y +  roi.m_min_x);
00235         *p++ = 0;                    // create left column of zeros
00236         for(int x = roi.m_min_x; x < roi.m_max_x; ++x)
00237           *p++ =
00238             //image.getPixel(x,y) + getPixel(x, y+1) +
00239             //getPixel(x+1, y) - getPixel(x, y);
00240             *q++ + *pxy1++ + *px1y++ - *pxy++;
00241       }
00242   }

void integrate const RImage< T > &  image  )  [inline]
 

Definition at line 206 of file src/rimage.h.

References getPixel(), RImage::getPixel(), image, p, and y.

00206                                         {
00207       T * p = array;
00208       for(int x = 0; x < width; ++x) // create top row of zeros
00209         *p++ = 0;
00210       for(int y = 0; y < height-1; ++y){
00211         *p++ = 0;                    // create left column of zeros
00212         for(int x = 0; x < width-1; ++x)
00213           *p++ =
00214             image.getPixel(x,y) + getPixel(x, y+1) +
00215             getPixel(x+1, y) - getPixel(x, y);
00216       }
00217   }

Here is the call graph for this function:

void integrate const RImage< T > &  image,
ROI  roi
[inline]
 

Definition at line 209 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

References RImage::array, image, ROI::m_max_x, ROI::m_max_y, ROI::m_min_x, ROI::m_min_y, p, RImage::width, and y.

00209                                                  {
00210                 //cout << "RImage<T>::integrate: " << roi << endl;
00211     //roi.fitImage(*this);
00212     //cout << "RImage<T>::integrate: " << roi << endl;
00213 
00214     //cout << "roi: (" << roi.m_min_x << ", " << roi.m_min_y << ", "<< roi.m_max_x << ", "<< roi.m_max_y << ")" << endl;
00215       T *p = array + (width*roi.m_min_y + roi.m_min_x);
00216       T *pxy, *px1y, *pxy1, *q;
00217       for(int x = roi.m_min_x; x < roi.m_max_x+1; ++x) // create top row of zeros
00218         *p++ = 0;
00219       for(int y = roi.m_min_y; y < roi.m_max_y; ++y){
00220         //cout << "integrating line " << y << " of " << image.height << endl;
00221         p = array + (width*(y+1) + roi.m_min_x);
00222         pxy = array + (width * y +  roi.m_min_x);
00223         px1y = array + (width * y +  roi.m_min_x + 1);
00224         pxy1 = array + (width * (y+1) +  roi.m_min_x);
00225         q = image.array + (image.width * y +  roi.m_min_x);
00226         *p++ = 0;                    // create left column of zeros
00227         for(int x = roi.m_min_x; x < roi.m_max_x; ++x)
00228           *p++ =
00229             //image.getPixel(x,y) + getPixel(x, y+1) +
00230             //getPixel(x+1, y) - getPixel(x, y);
00231             *q++ + *pxy1++ + *px1y++ - *pxy++;
00232       }
00233   }

void integrate const RImage< T > &  image  )  [inline]
 

Definition at line 197 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

References getPixel(), RImage::getPixel(), image, p, and y.

00197                                         {
00198       T * p = array;
00199       for(int x = 0; x < width; ++x) // create top row of zeros
00200         *p++ = 0;
00201       for(int y = 0; y < height-1; ++y){
00202         *p++ = 0;                    // create left column of zeros
00203         for(int x = 0; x < width-1; ++x)
00204           *p++ =
00205             image.getPixel(x,y) + getPixel(x, y+1) +
00206             getPixel(x+1, y) - getPixel(x, y);
00207       }
00208   }

Here is the call graph for this function:

void integrate const RImage< T > &  image,
ROI  roi
[inline]
 

Definition at line 209 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

References RImage::array, image, ROI::m_max_x, ROI::m_max_y, ROI::m_min_x, ROI::m_min_y, p, RImage::width, and y.

00209                                                  {
00210                 //cout << "RImage<T>::integrate: " << roi << endl;
00211     //roi.fitImage(*this);
00212     //cout << "RImage<T>::integrate: " << roi << endl;
00213 
00214     //cout << "roi: (" << roi.m_min_x << ", " << roi.m_min_y << ", "<< roi.m_max_x << ", "<< roi.m_max_y << ")" << endl;
00215       T *p = array + (width*roi.m_min_y + roi.m_min_x);
00216       T *pxy, *px1y, *pxy1, *q;
00217       for(int x = roi.m_min_x; x < roi.m_max_x+1; ++x) // create top row of zeros
00218         *p++ = 0;
00219       for(int y = roi.m_min_y; y < roi.m_max_y; ++y){
00220         //cout << "integrating line " << y << " of " << image.height << endl;
00221         p = array + (width*(y+1) + roi.m_min_x);
00222         pxy = array + (width * y +  roi.m_min_x);
00223         px1y = array + (width * y +  roi.m_min_x + 1);
00224         pxy1 = array + (width * (y+1) +  roi.m_min_x);
00225         q = image.array + (image.width * y +  roi.m_min_x);
00226         *p++ = 0;                    // create left column of zeros
00227         for(int x = roi.m_min_x; x < roi.m_max_x; ++x)
00228           *p++ =
00229             //image.getPixel(x,y) + getPixel(x, y+1) +
00230             //getPixel(x+1, y) - getPixel(x, y);
00231             *q++ + *pxy1++ + *px1y++ - *pxy++;
00232       }
00233   }

void integrate const RImage< T > &  image  )  [inline]
 

Definition at line 197 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

References getPixel(), RImage::getPixel(), image, p, and y.

00197                                         {
00198       T * p = array;
00199       for(int x = 0; x < width; ++x) // create top row of zeros
00200         *p++ = 0;
00201       for(int y = 0; y < height-1; ++y){
00202         *p++ = 0;                    // create left column of zeros
00203         for(int x = 0; x < width-1; ++x)
00204           *p++ =
00205             image.getPixel(x,y) + getPixel(x, y+1) +
00206             getPixel(x+1, y) - getPixel(x, y);
00207       }
00208   }

Here is the call graph for this function:

void integrate const RImage< T > &  image,
ROI  roi
[inline]
 

Definition at line 209 of file mac/build/mpisearch.framework/Headers/rimage.h.

References RImage::array, image, ROI::m_max_x, ROI::m_max_y, ROI::m_min_x, ROI::m_min_y, p, RImage::width, and y.

00209                                                  {
00210                 //cout << "RImage<T>::integrate: " << roi << endl;
00211     //roi.fitImage(*this);
00212     //cout << "RImage<T>::integrate: " << roi << endl;
00213 
00214     //cout << "roi: (" << roi.m_min_x << ", " << roi.m_min_y << ", "<< roi.m_max_x << ", "<< roi.m_max_y << ")" << endl;
00215       T *p = array + (width*roi.m_min_y + roi.m_min_x);
00216       T *pxy, *px1y, *pxy1, *q;
00217       for(int x = roi.m_min_x; x < roi.m_max_x+1; ++x) // create top row of zeros
00218         *p++ = 0;
00219       for(int y = roi.m_min_y; y < roi.m_max_y; ++y){
00220         //cout << "integrating line " << y << " of " << image.height << endl;
00221         p = array + (width*(y+1) + roi.m_min_x);
00222         pxy = array + (width * y +  roi.m_min_x);
00223         px1y = array + (width * y +  roi.m_min_x + 1);
00224         pxy1 = array + (width * (y+1) +  roi.m_min_x);
00225         q = image.array + (image.width * y +  roi.m_min_x);
00226         *p++ = 0;                    // create left column of zeros
00227         for(int x = roi.m_min_x; x < roi.m_max_x; ++x)
00228           *p++ =
00229             //image.getPixel(x,y) + getPixel(x, y+1) +
00230             //getPixel(x+1, y) - getPixel(x, y);
00231             *q++ + *pxy1++ + *px1y++ - *pxy++;
00232       }
00233   }

void integrate const RImage< T > &  image  )  [inline]
 

Definition at line 197 of file mac/build/mpisearch.framework/Headers/rimage.h.

References getPixel(), RImage::getPixel(), image, p, and y.

Referenced by RIntegral().

00197                                         {
00198       T * p = array;
00199       for(int x = 0; x < width; ++x) // create top row of zeros
00200         *p++ = 0;
00201       for(int y = 0; y < height-1; ++y){
00202         *p++ = 0;                    // create left column of zeros
00203         for(int x = 0; x < width-1; ++x)
00204           *p++ =
00205             image.getPixel(x,y) + getPixel(x, y+1) +
00206             getPixel(x+1, y) - getPixel(x, y);
00207       }
00208   }

Here is the call graph for this function:

void setPixel const int  x,
const int  y,
val
[inline]
 

Definition at line 269 of file src/rimage.h.

References y.

00270         {
00271                 if(x >= 0 && y >= 0 && x < width && y < height)
00272                         array[width * y + x] = value;
00273         };

void setPixel const int  x,
const int  y,
val
[inline]
 

Definition at line 260 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

References y.

00261         {
00262                 if(x >= 0 && y >= 0 && x < width && y < height)
00263                         array[width * y + x] = value;
00264         };

void setPixel const int  x,
const int  y,
val
[inline]
 

Definition at line 260 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

References y.

00261         {
00262                 if(x >= 0 && y >= 0 && x < width && y < height)
00263                         array[width * y + x] = value;
00264         };

void setPixel const int  x,
const int  y,
val
[inline]
 

Definition at line 260 of file mac/build/mpisearch.framework/Headers/rimage.h.

References y.

00261         {
00262                 if(x >= 0 && y >= 0 && x < width && y < height)
00263                         array[width * y + x] = value;
00264         };


The documentation for this class was generated from the following files:
Generated on Mon Nov 8 17:08:41 2004 for MPT by  doxygen 1.3.9.1