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

MPIScaledImage Class Template Reference

The elements of an MPIImagePyramid, a container class who's iterator steps through all the subwindows in the image at the given scale. More...

#include <mpiimage.h>

List of all members.

Public Member Functions

const_iterator begin ()
const_iterator begin ()
const_iterator begin ()
const_iterator begin ()
const_iterator end ()
const_iterator end ()
const_iterator end ()
const_iterator end ()
 MPIScaledImage (const MPIImagePyramid< T > &ref, const int &scale_ind)
 MPIScaledImage (const MPIImagePyramid< T > &ref, const int &scale_ind)
 MPIScaledImage (const MPIImagePyramid< T > &ref, const int &scale_ind)
 MPIScaledImage (const MPIImagePyramid< T > &ref, const int &scale_ind)

Public Attributes

int m_max_x
int m_max_y
int m_min_x
int m_min_y
const MPIImagePyramid< T > & m_ref
const MPIImagePyramid< T > & m_ref
const MPIImagePyramid< T > & m_ref
const MPIImagePyramid< T > & m_ref
const int m_scale_factor
const int m_scale_ind
const float m_true_scale_factor
float shift
int subwin_size_x
int subwin_size_y


Detailed Description

template<class T>
class MPIScaledImage< T >

The elements of an MPIImagePyramid, a container class who's iterator steps through all the subwindows in the image at the given scale.

Generated by dereferencing an MPIImagePyramid<T>::iterator, conceptually it is the container for all of the subwindows of the image at a particular scale in the image pyramid. Typically, one iterates through each window and performs some computation using the pixels in that window. If the results are stored into another image, then this can be conceptualized as a convolution.

Definition at line 45 of file mac/build/mpisearch.framework/Headers/mpiimage.h.


Constructor & Destructor Documentation

MPIScaledImage const MPIImagePyramid< T > &  ref,
const int &  scale_ind
[inline]
 

Definition at line 57 of file mac/build/mpisearch.framework/Headers/mpiimage.h.

References f(), MPIImagePyramid::m_roi, MPIImagePyramid::m_stride, MPIImagePyramid::m_window_x, MPIImagePyramid::m_window_y, max, ROI::vmax_x, ROI::vmax_y, ROI::vmin_x, and ROI::vmin_y.

00058     : m_ref(ref), m_scale_ind(scale_ind), m_scale_factor(static_cast<int>(m_ref.scale_factors[scale_ind]+0.5)),
00059       m_true_scale_factor(ref.scale_factors[scale_ind]) {
00060     shift = max(1.0f,m_scale_factor*(m_ref.m_stride + 0.00001f));  // Fudge to make sure floor works correctly
00061     //cout << "Shift: " << shift << endl;
00062     subwin_size_x = static_cast<int>(m_true_scale_factor * (m_ref.m_window_x)+0.0001f);
00063     subwin_size_y = static_cast<int>(m_true_scale_factor * (m_ref.m_window_y)+0.0001f);
00064     m_min_x = ref.m_roi.vmin_x[scale_ind];
00065     m_max_x = ref.m_roi.vmax_x[scale_ind];
00066     m_min_y = ref.m_roi.vmin_y[scale_ind];
00067     m_max_y = ref.m_roi.vmax_y[scale_ind];
00068     //cout << "MPIScaledImage: m_scale_factor: "<< m_scale_factor << " m_min_x: " <<  m_min_x << ", m_max_x: " << m_max_x;
00069     //cout << ", m_min_y: " <<  m_min_y << ", m_max_y: " << m_max_y << endl;
00070   }

Here is the call graph for this function:

MPIScaledImage const MPIImagePyramid< T > &  ref,
const int &  scale_ind
[inline]
 

Definition at line 57 of file mac/build/mpisearch.framework/Versions/A/Headers/mpiimage.h.

References f(), MPIImagePyramid::m_roi, MPIImagePyramid::m_stride, MPIImagePyramid::m_window_x, MPIImagePyramid::m_window_y, max, ROI::vmax_x, ROI::vmax_y, ROI::vmin_x, and ROI::vmin_y.

00058     : m_ref(ref), m_scale_ind(scale_ind), m_scale_factor(static_cast<int>(m_ref.scale_factors[scale_ind]+0.5)),
00059       m_true_scale_factor(ref.scale_factors[scale_ind]) {
00060     shift = max(1.0f,m_scale_factor*(m_ref.m_stride + 0.00001f));  // Fudge to make sure floor works correctly
00061     //cout << "Shift: " << shift << endl;
00062     subwin_size_x = static_cast<int>(m_true_scale_factor * (m_ref.m_window_x)+0.0001f);
00063     subwin_size_y = static_cast<int>(m_true_scale_factor * (m_ref.m_window_y)+0.0001f);
00064     m_min_x = ref.m_roi.vmin_x[scale_ind];
00065     m_max_x = ref.m_roi.vmax_x[scale_ind];
00066     m_min_y = ref.m_roi.vmin_y[scale_ind];
00067     m_max_y = ref.m_roi.vmax_y[scale_ind];
00068     //cout << "MPIScaledImage: m_scale_factor: "<< m_scale_factor << " m_min_x: " <<  m_min_x << ", m_max_x: " << m_max_x;
00069     //cout << ", m_min_y: " <<  m_min_y << ", m_max_y: " << m_max_y << endl;
00070   }

Here is the call graph for this function:

MPIScaledImage const MPIImagePyramid< T > &  ref,
const int &  scale_ind
[inline]
 

Definition at line 57 of file mac/build/mpisearch.framework/Versions/Current/Headers/mpiimage.h.

References f(), MPIImagePyramid::m_roi, MPIImagePyramid::m_stride, MPIImagePyramid::m_window_x, MPIImagePyramid::m_window_y, max, ROI::vmax_x, ROI::vmax_y, ROI::vmin_x, and ROI::vmin_y.

00058     : m_ref(ref), m_scale_ind(scale_ind), m_scale_factor(static_cast<int>(m_ref.scale_factors[scale_ind]+0.5)),
00059       m_true_scale_factor(ref.scale_factors[scale_ind]) {
00060     shift = max(1.0f,m_scale_factor*(m_ref.m_stride + 0.00001f));  // Fudge to make sure floor works correctly
00061     //cout << "Shift: " << shift << endl;
00062     subwin_size_x = static_cast<int>(m_true_scale_factor * (m_ref.m_window_x)+0.0001f);
00063     subwin_size_y = static_cast<int>(m_true_scale_factor * (m_ref.m_window_y)+0.0001f);
00064     m_min_x = ref.m_roi.vmin_x[scale_ind];
00065     m_max_x = ref.m_roi.vmax_x[scale_ind];
00066     m_min_y = ref.m_roi.vmin_y[scale_ind];
00067     m_max_y = ref.m_roi.vmax_y[scale_ind];
00068     //cout << "MPIScaledImage: m_scale_factor: "<< m_scale_factor << " m_min_x: " <<  m_min_x << ", m_max_x: " << m_max_x;
00069     //cout << ", m_min_y: " <<  m_min_y << ", m_max_y: " << m_max_y << endl;
00070   }

Here is the call graph for this function:

MPIScaledImage const MPIImagePyramid< T > &  ref,
const int &  scale_ind
[inline]
 

Definition at line 65 of file src/mpiimage.h.

References f(), MPIImagePyramid::m_roi, MPIImagePyramid::m_stride, MPIImagePyramid::m_window_x, MPIImagePyramid::m_window_y, max, ROI::vmax_x, ROI::vmax_y, ROI::vmin_x, and ROI::vmin_y.

00066     : m_ref(ref), m_scale_ind(scale_ind), m_scale_factor(static_cast<int>(m_ref.scale_factors[scale_ind]+0.5)),
00067       m_true_scale_factor(ref.scale_factors[scale_ind]) {
00068     shift = max(1.0f,m_scale_factor*(m_ref.m_stride + 0.00001f));  // Fudge to make sure floor works correctly
00069     subwin_size_x = static_cast<int>(m_true_scale_factor * (m_ref.m_window_x)+0.0001f);
00070     subwin_size_y = static_cast<int>(m_true_scale_factor * (m_ref.m_window_y)+0.0001f);
00071     m_min_x = ref.m_roi.vmin_x[scale_ind];
00072     m_max_x = ref.m_roi.vmax_x[scale_ind];
00073     m_min_y = ref.m_roi.vmin_y[scale_ind];
00074     m_max_y = ref.m_roi.vmax_y[scale_ind];
00075   }

Here is the call graph for this function:


Member Function Documentation

const_iterator begin  )  [inline]
 

Definition at line 216 of file src/mpiimage.h.

00216 { return const_iterator(*this, m_min_x, m_min_y); }

const_iterator begin  )  [inline]
 

Definition at line 240 of file mac/build/mpisearch.framework/Versions/Current/Headers/mpiimage.h.

00240 { return const_iterator(*this, m_min_x, m_min_y); }

const_iterator begin  )  [inline]
 

Definition at line 240 of file mac/build/mpisearch.framework/Versions/A/Headers/mpiimage.h.

00240 { return const_iterator(*this, m_min_x, m_min_y); }

const_iterator begin  )  [inline]
 

Definition at line 240 of file mac/build/mpisearch.framework/Headers/mpiimage.h.

00240 { return const_iterator(*this, m_min_x, m_min_y); }

const_iterator end  )  [inline]
 

Definition at line 217 of file src/mpiimage.h.

00217                                {
00218       // This is inefficient, but trying to figure it out correctly is very error-prone. Help!
00219       int working_y = m_min_y;
00220       float pos_y = static_cast<float>(working_y);
00221       while((working_y + subwin_size_y) < m_max_y){
00222         pos_y += shift;
00223         working_y = static_cast<int>(pos_y);
00224       }
00225       return const_iterator(*this, m_min_x, working_y);// - (m_scale_factor - 1));
00226     }

const_iterator end  )  [inline]
 

Definition at line 241 of file mac/build/mpisearch.framework/Versions/Current/Headers/mpiimage.h.

00241                                {
00242       // This is inefficient, but trying to figure it out correctly is very error-prone. Help!
00243       int working_y = m_min_y;
00244       float pos_y = static_cast<float>(working_y);
00245       while((working_y + subwin_size_y) < m_max_y){
00246         pos_y += shift;
00247         working_y = static_cast<int>(pos_y);
00248       }
00249       return const_iterator(*this, m_min_x, working_y);// - (m_scale_factor - 1));
00250     }

const_iterator end  )  [inline]
 

Definition at line 241 of file mac/build/mpisearch.framework/Versions/A/Headers/mpiimage.h.

00241                                {
00242       // This is inefficient, but trying to figure it out correctly is very error-prone. Help!
00243       int working_y = m_min_y;
00244       float pos_y = static_cast<float>(working_y);
00245       while((working_y + subwin_size_y) < m_max_y){
00246         pos_y += shift;
00247         working_y = static_cast<int>(pos_y);
00248       }
00249       return const_iterator(*this, m_min_x, working_y);// - (m_scale_factor - 1));
00250     }

const_iterator end  )  [inline]
 

Definition at line 241 of file mac/build/mpisearch.framework/Headers/mpiimage.h.

00241                                {
00242       // This is inefficient, but trying to figure it out correctly is very error-prone. Help!
00243       int working_y = m_min_y;
00244       float pos_y = static_cast<float>(working_y);
00245       while((working_y + subwin_size_y) < m_max_y){
00246         pos_y += shift;
00247         working_y = static_cast<int>(pos_y);
00248       }
00249       return const_iterator(*this, m_min_x, working_y);// - (m_scale_factor - 1));
00250     }


Member Data Documentation

int m_max_x
 

Definition at line 64 of file src/mpiimage.h.

Referenced by MPIScaledImage::const_iterator::const_iterator().

int m_max_y
 

Definition at line 64 of file src/mpiimage.h.

Referenced by MPIScaledImage::const_iterator::const_iterator().

int m_min_x
 

Definition at line 64 of file src/mpiimage.h.

Referenced by MPIScaledImage::const_iterator::const_iterator().

int m_min_y
 

Definition at line 64 of file src/mpiimage.h.

const MPIImagePyramid<T>& m_ref
 

Definition at line 57 of file src/mpiimage.h.

const MPIImagePyramid<T>& m_ref
 

Definition at line 49 of file mac/build/mpisearch.framework/Versions/Current/Headers/mpiimage.h.

const MPIImagePyramid<T>& m_ref
 

Definition at line 49 of file mac/build/mpisearch.framework/Versions/A/Headers/mpiimage.h.

const MPIImagePyramid<T>& m_ref
 

Definition at line 49 of file mac/build/mpisearch.framework/Headers/mpiimage.h.

const int m_scale_factor
 

Definition at line 60 of file src/mpiimage.h.

Referenced by MPIScaledImage::const_iterator::getScalePixel(), and MPIScaledImage::const_iterator::setScalePixel().

const int m_scale_ind
 

Definition at line 59 of file src/mpiimage.h.

Referenced by MPIScaledImage::const_iterator::getSquare().

const float m_true_scale_factor
 

Definition at line 61 of file src/mpiimage.h.

float shift
 

Definition at line 58 of file src/mpiimage.h.

int subwin_size_x
 

Definition at line 62 of file src/mpiimage.h.

Referenced by MPIScaledImage::const_iterator::const_iterator(), MPIScaledImage::const_iterator::getSize(), and MPIScaledImage::const_iterator::getSquare().

int subwin_size_y
 

Definition at line 63 of file src/mpiimage.h.

Referenced by MPIScaledImage::const_iterator::const_iterator().


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