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

mainutil.h File Reference

#include <utility>
#include <list>
#include <map>
#include <cmath>

Include dependency graph for mainutil.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  ROISequence
struct  Timeline

Functions

void drawBack (TIntegral< double > &likratimage, float mean, float var)
void drawROI (TIntegral< double > &likratimage, TBox< float > &roi, float mean, float var)
double normal (const double &mean, const double &std)


Function Documentation

void drawBack TIntegral< double > &  likratimage,
float  mean,
float  var
[inline]
 

Definition at line 71 of file mainutil.h.

References TIntegral::getImHeight(), TIntegral::getImWidth(), normal(), TIntegral::setImPixel(), and y.

Referenced by main().

00071                                                                             {
00072         for (int y = 0; y < likratimage.getImHeight(); y++) {
00073                 for (int x = 0; x < likratimage.getImWidth(); x++)
00074                         likratimage.setImPixel(x, y, normal(mean, var));
00075         }
00076 }

Here is the call graph for this function:

void drawROI TIntegral< double > &  likratimage,
TBox< float > &  roi,
float  mean,
float  var
[inline]
 

Definition at line 80 of file mainutil.h.

References TIntegral::getImHeight(), TIntegral::getImWidth(), normal(), TIntegral::setImPixel(), TBox::size, TBox::x, TBox::y, and y.

Referenced by main().

00080                                                                                              {
00081         for (int y=roi.y; y < roi.y+roi.size; y++) {
00082                 for (int x=roi.x; x < roi.x+roi.size; x++) {
00083                         if (x > likratimage.getImWidth()-1 || 
00084                                         y > likratimage.getImHeight()-1 ||
00085                                         x < 0 || y < 0)
00086                                 continue;
00087                         likratimage.setImPixel(x, y, normal(mean, var));        
00088                 }
00089         }
00090 }

Here is the call graph for this function:

double normal const double &  mean,
const double &  std
[inline]
 

Definition at line 62 of file mainutil.h.

Referenced by drawBack(), and drawROI().

00063 { 
00064   static const double pii=3.1415927;
00065   static const double r_max=RAND_MAX+1;
00066   return std*sqrt(-2*log((rand()+1)/r_max))*sin(2*pii*rand()/r_max)+mean;
00067 } 


Generated on Mon Nov 8 17:08:11 2004 for MPT by  doxygen 1.3.9.1