bazar  1.3.1
Public Member Functions | Public Attributes | List of all members
LightCollector Class Reference

#include <lightcollector.h>

Public Member Functions

 LightCollector ()
 LightCollector (const LightCollector &lc)
 ~LightCollector ()
const LightCollectoroperator= (LightCollector &lc)
void copy (const LightCollector &lc)
bool genGrid (float corners[4][2], int nx, int ny)
 Generate a regular grid given its 4 corners.
void averageImage (IplImage *im, CvMat *_homography)
int serializeSize ()
void serialize (char *buffer)
void load (const char *buffer, int size)
void invalidate ()
void drawGrid (IplImage *im, CvMat *_homography)
void drawAvg (IplImage *im)
bool cmpWithRef (const LightCollector &ref, float *val, const float *scale=0, const float *shift=0)

Public Attributes

CvMat * worldRT
float * avg
CvMat * vertices
CvMat * transformed
int * triangles
int nbTri
int nx
int ny
int avgChannels
int nbPix

Detailed Description

Collects lighting clues. This class apply an homography to a planar mesh and average colors within triangles. The LightMap class can use these measures to estimate a radiance map.

Examples:
fullcalib.cpp.

Definition at line 14 of file lightcollector.h.

Constructor & Destructor Documentation

LightCollector::LightCollector ( )

Definition at line 6 of file lightcollector.cpp.

References avg, avgChannels, nbTri, nx, ny, transformed, triangles, vertices, and worldRT.

LightCollector::LightCollector ( const LightCollector lc)

Definition at line 17 of file lightcollector.cpp.

References avg, avgChannels, nbTri, nx, ny, transformed, triangles, vertices, and worldRT.

LightCollector::~LightCollector ( )

Definition at line 78 of file lightcollector.cpp.

References avg, transformed, vertices, and worldRT.

Member Function Documentation

void LightCollector::averageImage ( IplImage *  im,
CvMat *  _homography 
)

Transform the grid with given homograhy and average colors over triangles.

Definition at line 91 of file lightcollector.cpp.

References avg, avgChannels, nbPix, nbTri, stat_triangle(), transformed, triangles, and vertices.

Referenced by photometric_calibration().

bool LightCollector::cmpWithRef ( const LightCollector ref,
float *  val,
const float *  scale = 0,
const float *  shift = 0 
)

Definition at line 269 of file lightcollector.cpp.

References avg, avgChannels, and nbTri.

Referenced by LightMap::addNormalLightMap().

void LightCollector::copy ( const LightCollector lc)

Definition at line 54 of file lightcollector.cpp.

References avg, avgChannels, nbTri, nx, ny, transformed, triangles, vertices, and worldRT.

void LightCollector::drawAvg ( IplImage *  im)

Definition at line 201 of file lightcollector.cpp.

References avg, avgChannels, nbTri, transformed, and triangles.

void LightCollector::drawGrid ( IplImage *  im,
CvMat *  _homography 
)

Definition at line 178 of file lightcollector.cpp.

References cvPoint(), nbTri, transformed, triangles, and vertices.

Referenced by photometric_calibration().

bool LightCollector::genGrid ( float  corners[4][2],
int  nx,
int  ny 
)

Generate a regular grid given its 4 corners.

Definition at line 126 of file lightcollector.cpp.

References avg, homography::estimate(), nbTri, nx, ny, transformed, triangles, and vertices.

void LightCollector::invalidate ( )

Definition at line 261 of file lightcollector.cpp.

References avg.

void LightCollector::load ( const char *  buffer,
int  size 
)

Definition at line 240 of file lightcollector.cpp.

References avg, avgChannels, Hdr::avgChannels, nbTri, Hdr::nbTri, nx, Hdr::nx, ny, Hdr::ny, and serializeSize().

const LightCollector & LightCollector::operator= ( LightCollector lc)

Definition at line 37 of file lightcollector.cpp.

References avg, avgChannels, nbTri, nx, ny, transformed, triangles, vertices, and worldRT.

void LightCollector::serialize ( char *  buffer)

Definition at line 228 of file lightcollector.cpp.

References avg, avgChannels, Hdr::avgChannels, nbPix, Hdr::nbPix, nbTri, Hdr::nbTri, nx, Hdr::nx, ny, and Hdr::ny.

int LightCollector::serializeSize ( )

Definition at line 223 of file lightcollector.cpp.

References avgChannels, and nbTri.

Referenced by load().

Member Data Documentation

float* LightCollector::avg
int LightCollector::avgChannels
int LightCollector::nbPix

Definition at line 48 of file lightcollector.h.

Referenced by averageImage(), and serialize().

int LightCollector::nbTri
int LightCollector::nx

Definition at line 46 of file lightcollector.h.

Referenced by copy(), genGrid(), LightCollector(), load(), operator=(), and serialize().

int LightCollector::ny

Definition at line 46 of file lightcollector.h.

Referenced by copy(), genGrid(), LightCollector(), load(), operator=(), and serialize().

CvMat * LightCollector::transformed
int* LightCollector::triangles

Definition at line 44 of file lightcollector.h.

Referenced by averageImage(), copy(), drawAvg(), drawGrid(), genGrid(), LightCollector(), and operator=().

CvMat* LightCollector::vertices
CvMat* LightCollector::worldRT

Definition at line 36 of file lightcollector.h.

Referenced by copy(), LightCollector(), operator=(), and ~LightCollector().


The documentation for this class was generated from the following files: