gramods
|
Coordinates mapper that compensates for the optical effects as described by a fisheye camera model. More...
#include <FisheyeCameraModel.hh>
Classes | |
struct | Impl |
Public Member Functions | |
std::string | getTo2DCode () override |
void | setTo2DUniforms (GLuint program) override |
void | setDistortion (gmCore::float4 k) |
Set the distortion parameters (k1 k2 k3 k4) for the camera model. More... | |
void | setFocalDistance (gmCore::float2 f) |
Set the focal distance (fx fy) for the camera model. More... | |
void | setFocalOffset (gmCore::float2 c) |
Set the focal offset (cx cy) for the camera model. More... | |
![]() | |
virtual std::string | getCommonCode () |
Returns shader "common" code, lines of code that are needed once regardless if 2D or 3D mapping code is used, or both. More... | |
virtual std::string | getTo3DCode () |
Returns shader code that implements the 2D to 3D mapping for the specific coordinates mapper. More... | |
virtual void | setCommonUniforms (GLuint program) |
Called by the code that is using this CoordinatesMapper object, to let it set the uniforms used by the common code. More... | |
virtual void | setTo3DUniforms (GLuint program) |
Called by the code that is using this CoordinatesMapper object, to let it set the uniforms used by the to-3D code. More... | |
virtual std::string | getDefaultKey () override |
Returns the default key, in Configuration, for the Object. More... | |
![]() | |
Object () | |
Initializes internal data. More... | |
virtual | ~Object () |
Cleaning up internal data. More... | |
virtual void | initialize () |
Called to initialize the Object. More... | |
virtual void | accept (Visitor *visitor) |
Calls the visitors apply method with this as argument. More... | |
virtual void | traverse (Visitor *visitor) |
Calls the child Object's accept method, if such exist. More... | |
bool | isInitialized () |
Returns true if the Object is initialized. More... | |
Static Public Attributes | |
static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Additional Inherited Members | |
![]() | |
const std::string | withVarId (std::string) const |
![]() | |
const std::string | var_id |
Coordinates mapper that compensates for the optical effects as described by a fisheye camera model.
The model is the fisheye camera model included in OpenCV.
|
overridevirtual |
Reimplemented from gramods::gmGraphics::CoordinatesMapper.
void gramods::gmGraphics::FisheyeCameraModel::setDistortion | ( | gmCore::float4 | k | ) |
Set the distortion parameters (k1 k2 k3 k4) for the camera model.
XML-attribute: distortion
void gramods::gmGraphics::FisheyeCameraModel::setFocalDistance | ( | gmCore::float2 | f | ) |
Set the focal distance (fx fy) for the camera model.
Calibration output from OpenCV is typically expressed in pixels so divide by resolution before entering values here.
XML-attribute: focalDistance
void gramods::gmGraphics::FisheyeCameraModel::setFocalOffset | ( | gmCore::float2 | c | ) |
Set the focal offset (cx cy) for the camera model.
Calibration output from OpenCV is typically expressed in pixels so divide by resolution before entering values here.
XML-attribute: focalOffset
|
overridevirtual |
Reimplemented from gramods::gmGraphics::CoordinatesMapper.