TuttleOFX  1
tuttle::plugin::lens Namespace Reference

Data Structures

class  LensDistortOverlayInteract
class  LensDistortOverlayDescriptor
struct  LensDistortParams
class  LensDistortPlugin
 Main class of the lens distortion. More...
class  LensDistortProcess
 Plugin rendering. More...
class  CoordonatesSystemParams
 Contains functions to map coordinates between : * canonical coordinates system (ofx) e.g PAL D1. More...
class  NormalLensDistortParams
class  NormalLensUndistortParams
class  FisheyeLensDistortParams
class  FisheyeLensUndistortParams
class  AdvancedLensDistortParams
class  AdvancedLensUndistortParams
class  LensDistortProcessParams

Enumerations

enum  EParamResizeRod {
  eParamResizeRodNo = 0, eParamResizeRodSourceRef, eParamResizeRodMin, eParamResizeRodMax,
  eParamResizeRodManual
}
enum  EParamLensType { eParamLensTypeStandard = 0, eParamLensTypeFisheye, eParamLensTypeAdvanced }
enum  EParamCenterType { eParamCenterTypeSource = 0, eParamCenterTypeRoW }

Functions

template<class Params >
Params::Point2 transformValues (const Params &params, const typename Params::Point2 &p)
template<class Params >
OfxRectD transformValues (const Params &params, const OfxRectD &rec)
 get bounding box after the transformation of rec
template<class Obj >
Obj transformValues (const EParamLensType lensType, const LensDistortProcessParams< double > &params, const Obj &obj)
template<class Params , typename F2 >
void transformValuesApply (const Params &params, std::vector< boost::gil::point2< F2 > > &vec)
 Apply the transformation on all points inside the vector.
template<class Params , typename F2 >
void transformValuesApply (const Params &params, std::vector< std::vector< boost::gil::point2< F2 > > > &vec)
template<class Obj >
void transformValuesApply (const EParamLensType lensType, const LensDistortProcessParams< double > &params, Obj &obj)
static const std::string kClipOptionalSourceRef ("SourceRef")
static const std::string kParamReverse ("reverse")
static const std::string kParamDisplaySource ("displaySource")
static const std::string kParamLensType ("lensType")
static const std::string kParamLensTypeStandard ("standard")
static const std::string kParamLensTypeFishEye ("fish-eye")
static const std::string kParamLensTypeAdvanced ("advanced")
static const std::string kParamCoef1 ("coef1")
static const std::string kParamCoef2 ("coef2")
static const std::string kParamSqueeze ("squeeze")
static const std::string kParamAsymmetric ("asymmetric")
static const std::string kParamCenter ("center")
static const std::string kParamCenterOverlay ("lensCenterOverlay")
static const std::string kParamCenterType ("centerType")
static const std::string kParamCenterTypeSource ("source")
static const std::string kParamCenterTypeRoW ("RoW")
static const std::string kParamPreScale ("preScale")
static const std::string kParamPostScale ("postScale")
static const std::string kParamResizeRod ("resizeRod")
static const std::string kParamResizeRodNo ("no")
static const std::string kParamResizeRodSourceRef ("sourceRef")
static const std::string kParamResizeRodMin ("min")
static const std::string kParamResizeRodMax ("max")
static const std::string kParamResizeRodManual ("manual")
static const std::string kParamResizeRodManualScale ("scaleRod")
static const std::string kParamDisplayOptions ("displayOptions")
static const std::string kParamGridOverlay ("gridOverlay")
static const std::string kParamGridCenter ("gridCenter")
static const std::string kParamGridCenterOverlay ("gridCenterOverlay")
static const std::string kParamGridScale ("gridScale")
static const std::string kParamDebugOptions ("debugOptions")
static const std::string kParamDebugDisplayRoi ("debugDisplayRoi")
static const std::string kParamHelp ("help")
template<typename Point2 >
std::vector< std::vector
< Point2 > > 
createGrid (const OfxRectD &rod, const unsigned int nbTiles, const Point2 &scale, const Point2 &center, const unsigned int steps=50)
 create a list of points which represents a grid in image coordinates
template<typename Point2 >
void shiftGrid (std::vector< std::vector< Point2 > > &grid, const Point2 &shift)
 mDeclarePluginFactory (LensDistortPluginFactory,{},{})

Enumeration Type Documentation

Enumerator:
eParamCenterTypeSource 
eParamCenterTypeRoW 

Definition at line 66 of file lensDistortDefinitions.hpp.

Enumerator:
eParamLensTypeStandard 
eParamLensTypeFisheye 
eParamLensTypeAdvanced 

Definition at line 59 of file lensDistortDefinitions.hpp.

Enumerator:
eParamResizeRodNo 
eParamResizeRodSourceRef 
eParamResizeRodMin 
eParamResizeRodMax 
eParamResizeRodManual 

Definition at line 40 of file lensDistortDefinitions.hpp.


Function Documentation

template<typename Point2 >
std::vector<std::vector<Point2> > tuttle::plugin::lens::createGrid ( const OfxRectD rod,
const unsigned int  nbTiles,
const Point2 &  scale,
const Point2 &  center,
const unsigned int  steps = 50 
)

create a list of points which represents a grid in image coordinates

Parameters:
imgSizeimage size (in pixels)
nbTilesnumber of tiles
scalescale of the grid (normalized value)
centershift to apply on the image (normalized value)

Definition at line 31 of file LensDistortOverlayInteract.cpp.

References OfxRectD::x1, OfxRectD::x2, OfxRectD::y1, and OfxRectD::y2.

Referenced by tuttle::plugin::lens::LensDistortOverlayInteract::draw().

static const std::string tuttle::plugin::lens::kClipOptionalSourceRef ( "SourceRef"  ) [static]
static const std::string tuttle::plugin::lens::kParamAsymmetric ( "asymmetric"  ) [static]
static const std::string tuttle::plugin::lens::kParamCenter ( "center"  ) [static]
static const std::string tuttle::plugin::lens::kParamCenterOverlay ( "lensCenterOverlay"  ) [static]
static const std::string tuttle::plugin::lens::kParamCenterType ( "centerType"  ) [static]
static const std::string tuttle::plugin::lens::kParamCenterTypeRoW ( "RoW"  ) [static]
static const std::string tuttle::plugin::lens::kParamCenterTypeSource ( "source"  ) [static]
static const std::string tuttle::plugin::lens::kParamCoef1 ( "coef1"  ) [static]
static const std::string tuttle::plugin::lens::kParamCoef2 ( "coef2"  ) [static]
static const std::string tuttle::plugin::lens::kParamDebugDisplayRoi ( "debugDisplayRoi"  ) [static]
static const std::string tuttle::plugin::lens::kParamDebugOptions ( "debugOptions"  ) [static]
static const std::string tuttle::plugin::lens::kParamDisplayOptions ( "displayOptions"  ) [static]
static const std::string tuttle::plugin::lens::kParamDisplaySource ( "displaySource"  ) [static]
static const std::string tuttle::plugin::lens::kParamGridCenter ( "gridCenter"  ) [static]
static const std::string tuttle::plugin::lens::kParamGridCenterOverlay ( "gridCenterOverlay"  ) [static]
static const std::string tuttle::plugin::lens::kParamGridOverlay ( "gridOverlay"  ) [static]
static const std::string tuttle::plugin::lens::kParamGridScale ( "gridScale"  ) [static]
static const std::string tuttle::plugin::lens::kParamHelp ( "help"  ) [static]
static const std::string tuttle::plugin::lens::kParamLensTypeAdvanced ( "advanced"  ) [static]
static const std::string tuttle::plugin::lens::kParamLensTypeFishEye ( "fish-eye"  ) [static]
static const std::string tuttle::plugin::lens::kParamLensTypeStandard ( "standard"  ) [static]
static const std::string tuttle::plugin::lens::kParamPostScale ( "postScale"  ) [static]
static const std::string tuttle::plugin::lens::kParamPreScale ( "preScale"  ) [static]
static const std::string tuttle::plugin::lens::kParamResizeRodManual ( "manual"  ) [static]
static const std::string tuttle::plugin::lens::kParamResizeRodManualScale ( "scaleRod"  ) [static]
static const std::string tuttle::plugin::lens::kParamResizeRodMax ( "max"  ) [static]
static const std::string tuttle::plugin::lens::kParamResizeRodMin ( "min"  ) [static]
static const std::string tuttle::plugin::lens::kParamResizeRodNo ( "no"  ) [static]
static const std::string tuttle::plugin::lens::kParamResizeRodSourceRef ( "sourceRef"  ) [static]
static const std::string tuttle::plugin::lens::kParamReverse ( "reverse"  ) [static]
static const std::string tuttle::plugin::lens::kParamSqueeze ( "squeeze"  ) [static]
tuttle::plugin::lens::mDeclarePluginFactory ( LensDistortPluginFactory  )
template<typename Point2 >
void tuttle::plugin::lens::shiftGrid ( std::vector< std::vector< Point2 > > &  grid,
const Point2 &  shift 
)
template<class Params >
Params::Point2 tuttle::plugin::lens::transformValues ( const Params &  params,
const typename Params::Point2 &  p 
)
template<class Params >
OfxRectD tuttle::plugin::lens::transformValues ( const Params &  params,
const OfxRectD rec 
)

get bounding box after the transformation of rec

Definition at line 181 of file lensDistortAlgorithm.hpp.

References tuttle::pointsBoundingBox(), terry::transform(), OfxRectD::x1, OfxRectD::x2, OfxRectD::y1, and OfxRectD::y2.

Here is the call graph for this function:

template<class Obj >
Obj tuttle::plugin::lens::transformValues ( const EParamLensType  lensType,
const LensDistortProcessParams< double > &  params,
const Obj &  obj 
) [inline]
Parameters:
lensType
params
obj,:objet to transform (can be OfxRectD, boost::gil::point2<>)

Definition at line 218 of file lensDistortAlgorithm.hpp.

References tuttle::plugin::lens::NormalLensDistortParams< F >::_distort, eParamLensTypeAdvanced, eParamLensTypeFisheye, and eParamLensTypeStandard.

template<class Params , typename F2 >
void tuttle::plugin::lens::transformValuesApply ( const Params &  params,
std::vector< boost::gil::point2< F2 > > &  vec 
) [inline]

Apply the transformation on all points inside the vector.

Definition at line 257 of file lensDistortAlgorithm.hpp.

References terry::transform().

Referenced by tuttle::plugin::lens::LensDistortOverlayInteract::draw(), and transformValuesApply().

Here is the call graph for this function:

template<class Params , typename F2 >
void tuttle::plugin::lens::transformValuesApply ( const Params &  params,
std::vector< std::vector< boost::gil::point2< F2 > > > &  vec 
) [inline]

Definition at line 268 of file lensDistortAlgorithm.hpp.

References transformValuesApply().

Here is the call graph for this function:

template<class Obj >
void tuttle::plugin::lens::transformValuesApply ( const EParamLensType  lensType,
const LensDistortProcessParams< double > &  params,
Obj &  obj 
) [inline]