[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

HuginBase::SrcPanoImage Class Reference

All variables of a source image. More...

#include <SrcPanoImage.h>

Inheritance diagram for HuginBase::SrcPanoImage:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SrcPanoImage ()
virtual ~SrcPanoImage ()
 SrcPanoImage (const std::string &filename)
 initialize a SrcPanoImage from a file.
void resize (const vigra::Size2D &size)
 "resize" image, adjusts all distortion coefficients for usage with a source image of size size
bool isInside (vigra::Point2D p, bool ignoreMasks=false) const
 check if a coordinate is inside the source image
bool horizontalWarpNeeded ()
bool getCorrectTCA () const
void setCropMode (CropMode val)
 Set the crop mode.
void setSize (vigra::Size2D val)
 Set the image size in pixels.
hugin_utils::FDiff2D getRadialDistortionCenter () const
hugin_utils::FDiff2D getRadialVigCorrCenter () const
double getExposure () const
void setExposure (const double &val)
int getWidth () const
 Get the width of the image in pixels.
int getHeight () const
 Get the height of the image in pixels.
double getVar (const std::string &name) const
void setVar (const std::string &name, double val)
VariableMap getVariableMap () const
 Return all the image variables in a variable map.
ImageOptions getOptions () const
 get the optimisation and stitching options, like PanoImage.
void setOptions (const ImageOptions &opt)
 set the optimisation and stitching options
const int getExifDateTime (struct tm *datetime) const
 try to convert Exif date time string to struct tm
void unlinkRadialVigCorrCoeff ()
 unlinking vignetting parameters should unlink the vignetting correction mode
void unlinkRadialVigCorrCenterShift ()
 unlinking vignetting parameters should unlink the vignetting correction mode
void unlinkEMoRParams ()
 unlinking the EMOR parameters should unlink the correction mode.
void linkRadialVigCorrCoeff (SrcPanoImage *target)
 linking vignetting parameters should link the vignetting correction mode
void linkRadialVigCorrCenterShift (SrcPanoImage *target)
 linking vignetting parameters should link the vignetting correction mode
void linkEMoRParams (SrcPanoImage *target)
 linking the EMOR parameters should link the correction mode.
void linkStack (SrcPanoImage *target)
bool readEXIF (double &focalLength, double &cropFactor, bool applyEXIF, bool applyExposureValue)
 try to fill out information about the image, by examining the exif data focalLength and cropFactor will be updated with the ones read from the exif data If no or not enought exif data was found and valid given focalLength and cropFactor settings where provided, they will be used for computation of the HFOV.
bool readEXIF (double &focalLength, double &cropFactor, double &eV, bool applyEXIF, bool applyExposureValue)
void updateFocalLength (double newFocalLength)
 updates the focal length, changes the hfov to reflect thew newFocalLength
void updateCropFactor (double focalLength, double newCropFactor)
 updates the crop factor, the hfov is calculates so that focal length remains the same
bool hasMasks () const
 returns true, if image has masks associated
bool hasPositiveMasks () const
 returns true, if image has positive masks
bool hasActiveMasks () const
 returns true, if image has active masks
void addMask (MaskPolygon newMask)
 add newMask to list of masks
void addActiveMask (MaskPolygon newMask)
 add newMask to list of active masks
void clearActiveMasks ()
 clears list of active masks
void changeMaskType (unsigned int index, HuginBase::MaskPolygon::MaskType newType)
 changes type of mask with index to given newType
void deleteMask (unsigned int index)
 delete mask at index
void printMaskLines (std::ostream &o, unsigned int newImgNr) const
 writes all mask lines to stream, using given image number
bool isInsideMasks (vigra::Point2D p) const
 returns true, if point p is inside of one mask polygon

Static Public Member Functions

double calcHFOV (SrcPanoImage::Projection proj, double fl, double crop, vigra::Size2D imageSize)
 calculate hfov of an image given focal length, image size and crop factor
double calcFocalLength (SrcPanoImage::Projection proj, double hfov, double crop, vigra::Size2D imageSize)
 calcualte focal length, given crop factor and hfov
double calcCropFactor (SrcPanoImage::Projection proj, double hfov, double focalLength, vigra::Size2D imageSize)
 calculate crop factor, given focal length and hfov

Detailed Description

All variables of a source image.

In the long term, this simplified class will replace PanoImage and Image options and the variables array. All image variables are stored in this class, regardless of what the variable is attached to (lens, sensor, position).


Constructor & Destructor Documentation

HuginBase::SrcPanoImage::SrcPanoImage  )  [inline]
 

virtual HuginBase::SrcPanoImage::~SrcPanoImage  )  [inline, virtual]
 

HuginBase::SrcPanoImage::SrcPanoImage const std::string &  filename  )  [inline]
 

initialize a SrcPanoImage from a file.

Will read image size and EXIF data to initialize as many fields as possible (most importatly HFOV and exposure value)


Member Function Documentation

void HuginBase::SrcPanoImage::addActiveMask MaskPolygon  newMask  ) 
 

add newMask to list of active masks

void HuginBase::SrcPanoImage::addMask MaskPolygon  newMask  ) 
 

add newMask to list of masks

double HuginBase::SrcPanoImage::calcCropFactor SrcPanoImage::Projection  proj,
double  hfov,
double  focalLength,
vigra::Size2D  imageSize
[static]
 

calculate crop factor, given focal length and hfov

double HuginBase::SrcPanoImage::calcFocalLength SrcPanoImage::Projection  proj,
double  hfov,
double  crop,
vigra::Size2D  imageSize
[static]
 

calcualte focal length, given crop factor and hfov

double HuginBase::SrcPanoImage::calcHFOV SrcPanoImage::Projection  proj,
double  fl,
double  crop,
vigra::Size2D  imageSize
[static]
 

calculate hfov of an image given focal length, image size and crop factor

void HuginBase::SrcPanoImage::changeMaskType unsigned int  index,
HuginBase::MaskPolygon::MaskType  newType
 

changes type of mask with index to given newType

void HuginBase::SrcPanoImage::clearActiveMasks  ) 
 

clears list of active masks

void HuginBase::SrcPanoImage::deleteMask unsigned int  index  ) 
 

delete mask at index

bool HuginBase::SrcPanoImage::getCorrectTCA  )  const
 

const int HuginBase::SrcPanoImage::getExifDateTime struct tm *  datetime  )  const [inline]
 

try to convert Exif date time string to struct tm

Returns:
0, if conversion was sucessfull

double HuginBase::SrcPanoImage::getExposure  )  const
 

int HuginBase::SrcPanoImage::getHeight  )  const [inline]
 

Get the height of the image in pixels.

Should not be used, use getSize().height() instead. This is here for compatiblity with PnaoImage, but should be removed.

Todo:
replace all calls to getHeight() with getSize().height().

ImageOptions HuginBase::SrcPanoImage::getOptions  )  const
 

get the optimisation and stitching options, like PanoImage.

Do not use: eventually we want to make everything using these to ask for each wanted variable directly using the get* functions instead.

FDiff2D HuginBase::SrcPanoImage::getRadialDistortionCenter  )  const
 

FDiff2D HuginBase::SrcPanoImage::getRadialVigCorrCenter  )  const
 

double HuginBase::SrcPanoImage::getVar const std::string &  code  )  const
 

Note:
This file is #included multiple times after defining a macro for image_variable. The idea is to reduce the amount of tedoius code copy & pasted for each image variable. The list will be used to generate things the following:
  1. Member variables: ImageVarianle<[type]> m_[name];
  2. Accessor functions: [type] get[name]() const;
  3. Set functions: void set[name](const [type] data);
  4. Link functions: void link[name](SrcPanoImg)
  5. Unlink functions: void unlink[name]();
The arguments work as follows:
  1. the name of the variable
  2. the type of the variable
  3. the default value
There is some non automatic stuff in ImageVariableTranslate.h that will need changing if this list changes. That file handles the translation to and from PTO file format style variables.
See also:
ImageVariableTranslate.h

VariableMap HuginBase::SrcPanoImage::getVariableMap  )  const
 

Return all the image variables in a variable map.

Returns a map of all the variables for this image. It is adivisable to use the individual getX functions where apropriate instead.

Todo:
remove this infavour of the individual get*() functions. This creates a map of all the variables, regardless of which ones are actually needed, every time it is called.

int HuginBase::SrcPanoImage::getWidth  )  const [inline]
 

Get the width of the image in pixels.

Should not be used, use getSize().width() instead. This is here for compatiblity with PnaoImage, but should be removed.

Todo:
replace all calls to getWidth() with getSize().width().

bool HuginBase::SrcPanoImage::hasActiveMasks  )  const
 

returns true, if image has active masks

bool HuginBase::SrcPanoImage::hasMasks  )  const
 

returns true, if image has masks associated

bool HuginBase::SrcPanoImage::hasPositiveMasks  )  const
 

returns true, if image has positive masks

bool HuginBase::SrcPanoImage::horizontalWarpNeeded  ) 
 

bool HuginBase::SrcPanoImage::isInside vigra::Point2D  p,
bool  ignoreMasks = false
const
 

check if a coordinate is inside the source image

bool HuginBase::SrcPanoImage::isInsideMasks vigra::Point2D  p  )  const
 

returns true, if point p is inside of one mask polygon

void HuginBase::SrcPanoImage::linkEMoRParams SrcPanoImage target  )  [inline]
 

linking the EMOR parameters should link the correction mode.

void HuginBase::SrcPanoImage::linkRadialVigCorrCenterShift SrcPanoImage target  )  [inline]
 

linking vignetting parameters should link the vignetting correction mode

void HuginBase::SrcPanoImage::linkRadialVigCorrCoeff SrcPanoImage target  )  [inline]
 

linking vignetting parameters should link the vignetting correction mode

void HuginBase::SrcPanoImage::linkStack SrcPanoImage target  )  [inline]
 

void HuginBase::SrcPanoImage::printMaskLines std::ostream &  o,
unsigned int  newImgNr
const
 

writes all mask lines to stream, using given image number

bool HuginBase::SrcPanoImage::readEXIF double focalLength,
double cropFactor,
double eV,
bool  applyEXIF,
bool  applyExposureValue
 

bool HuginBase::SrcPanoImage::readEXIF double focalLength,
double cropFactor,
bool  applyEXIF,
bool  applyExposureValue
 

try to fill out information about the image, by examining the exif data focalLength and cropFactor will be updated with the ones read from the exif data If no or not enought exif data was found and valid given focalLength and cropFactor settings where provided, they will be used for computation of the HFOV.

void HuginBase::SrcPanoImage::resize const vigra::Size2D &  size  ) 
 

"resize" image, adjusts all distortion coefficients for usage with a source image of size size

void HuginBase::SrcPanoImage::setCropMode CropMode  val  ) 
 

Set the crop mode.

This sets the cropping region to the entire image when set to NO_CROP, unlike the lazy metaprogrammed equivalent in BaseSrcPanoImage.

void HuginBase::SrcPanoImage::setExposure const double val  ) 
 

void HuginBase::SrcPanoImage::setOptions const ImageOptions opt  ) 
 

set the optimisation and stitching options

Do not use: switch stuff over to the set* functions instead.

void HuginBase::SrcPanoImage::setSize vigra::Size2D  val  ) 
 

Set the image size in pixels.

If we aren't cropping the image, set the size to the entire image

void HuginBase::SrcPanoImage::setVar const std::string &  code,
double  val
 

Note:
This file is #included multiple times after defining a macro for image_variable. The idea is to reduce the amount of tedoius code copy & pasted for each image variable. The list will be used to generate things the following:
  1. Member variables: ImageVarianle<[type]> m_[name];
  2. Accessor functions: [type] get[name]() const;
  3. Set functions: void set[name](const [type] data);
  4. Link functions: void link[name](SrcPanoImg)
  5. Unlink functions: void unlink[name]();
The arguments work as follows:
  1. the name of the variable
  2. the type of the variable
  3. the default value
There is some non automatic stuff in ImageVariableTranslate.h that will need changing if this list changes. That file handles the translation to and from PTO file format style variables.
See also:
ImageVariableTranslate.h

void HuginBase::SrcPanoImage::unlinkEMoRParams  )  [inline]
 

unlinking the EMOR parameters should unlink the correction mode.

void HuginBase::SrcPanoImage::unlinkRadialVigCorrCenterShift  )  [inline]
 

unlinking vignetting parameters should unlink the vignetting correction mode

void HuginBase::SrcPanoImage::unlinkRadialVigCorrCoeff  )  [inline]
 

unlinking vignetting parameters should unlink the vignetting correction mode

void HuginBase::SrcPanoImage::updateCropFactor double  focalLength,
double  newCropFactor
 

updates the crop factor, the hfov is calculates so that focal length remains the same

void HuginBase::SrcPanoImage::updateFocalLength double  newFocalLength  ) 
 

updates the focal length, changes the hfov to reflect thew newFocalLength


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

Generated on Mon Sep 20 01:01:36 2010 for Hugintrunk by doxygen 1.3.9.1