Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::RGBImageDB Class Reference

#include <RGBImage.h>

Collaboration diagram for PLearn::RGBImageDB:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RGBImageDB (char *dbfilename, int the_subsample_factor=1, int remove_border=0, int the_max_n_images_in_memory=10)
RGBImage getImage (int imageid)
Mat computeHistogramRepresentation (int r_bins=16, int g_bins=16, int b_bins=16, bool do_normalize=false)
 Returns for each image a vector of size r_bins*g_bins*b_bins+1 which contains the number of image pixels whose colors fell in the corresponding RGB range, and last element is the class number.

 ~RGBImageDB ()

Public Attributes

Mat imageIdAndClass
 These are two column matrices (first column: imageid, second column: classnum).


Protected Member Functions

int append (char *filename)
void load (char *dbfile)
 RGBImageDB (int the_subsample_factor=1, int remove_border=0, int the_max_n_images_in_memory=10)

Protected Attributes

Array< char * > filenames
Array< RGBImage * > images
int subsample_factor
int remove_border
int max_n_images_in_memory
int n_images_in_memory

Constructor & Destructor Documentation

PLearn::RGBImageDB::RGBImageDB int  the_subsample_factor = 1,
int  remove_border = 0,
int  the_max_n_images_in_memory = 10
[protected]
 

Definition at line 286 of file RGBImage.cc.

PLearn::RGBImageDB::RGBImageDB char *  dbfilename,
int  the_subsample_factor = 1,
int  remove_border = 0,
int  the_max_n_images_in_memory = 10
 

Definition at line 292 of file RGBImage.cc.

References PLearn::load().

PLearn::RGBImageDB::~RGBImageDB  ) 
 

Definition at line 372 of file RGBImage.cc.

References filenames, images, and PLearn::TVec< char * >::size().


Member Function Documentation

int PLearn::RGBImageDB::append char *  filename  )  [protected]
 

Definition at line 323 of file RGBImage.cc.

References PLearn::TVec< RGBImage * >::append(), PLearn::TVec< char * >::append(), filenames, images, and PLearn::TVec< char * >::size().

Referenced by load().

Mat PLearn::RGBImageDB::computeHistogramRepresentation int  r_bins = 16,
int  g_bins = 16,
int  b_bins = 16,
bool  do_normalize = false
 

Returns for each image a vector of size r_bins*g_bins*b_bins+1 which contains the number of image pixels whose colors fell in the corresponding RGB range, and last element is the class number.

Definition at line 356 of file RGBImage.cc.

References PLearn::RGBImage::computeHistogram(), getImage(), imageIdAndClass, PLearn::TMat< T >::lastColumn(), PLearn::TMat< T >::length(), and PLearn::TMat< T >::subMatColumns().

RGBImage PLearn::RGBImageDB::getImage int  imageid  ) 
 

Definition at line 331 of file RGBImage.cc.

References filenames, images, PLearn::RGBImage::loadJPEG(), max_n_images_in_memory, n_images_in_memory, remove_border, PLearn::RGBImage::removeBorders(), PLearn::TVec< RGBImage * >::size(), and subsample_factor.

Referenced by computeHistogramRepresentation(), PLearn::RGBImagesVMatrix::reset(), PLearn::RGBImagesVMatrix::RGBImagesVMatrix(), PLearn::RGBImagesVMatrix::sample(), and PLearn::RGBImagesVMatrix::seek().

void PLearn::RGBImageDB::load char *  dbfile  )  [protected]
 

Definition at line 300 of file RGBImage.cc.

References append(), imageIdAndClass, PLERROR, and PLearn::TMat< T >::resize().


Member Data Documentation

Array<char*> PLearn::RGBImageDB::filenames [protected]
 

Definition at line 179 of file RGBImage.h.

Referenced by append(), getImage(), and ~RGBImageDB().

Mat PLearn::RGBImageDB::imageIdAndClass
 

These are two column matrices (first column: imageid, second column: classnum).

Definition at line 194 of file RGBImage.h.

Referenced by computeHistogramRepresentation(), load(), PLearn::RGBImagesVMatrix::nObjects(), PLearn::RGBImagesVMatrix::reset(), PLearn::RGBImagesVMatrix::RGBImagesVMatrix(), PLearn::RGBImagesVMatrix::sample(), and PLearn::RGBImagesVMatrix::seek().

Array<RGBImage*> PLearn::RGBImageDB::images [protected]
 

Definition at line 180 of file RGBImage.h.

Referenced by append(), getImage(), and ~RGBImageDB().

int PLearn::RGBImageDB::max_n_images_in_memory [protected]
 

Definition at line 183 of file RGBImage.h.

Referenced by getImage().

int PLearn::RGBImageDB::n_images_in_memory [protected]
 

Definition at line 184 of file RGBImage.h.

Referenced by getImage().

int PLearn::RGBImageDB::remove_border [protected]
 

Definition at line 182 of file RGBImage.h.

Referenced by getImage().

int PLearn::RGBImageDB::subsample_factor [protected]
 

Definition at line 181 of file RGBImage.h.

Referenced by getImage().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:23:07 2004 for PLearn by doxygen 1.3.7