SaDVIO
Public Member Functions | Protected Attributes | List of all members
isae::ImageSensor Class Referenceabstract

Abstract class for image sensors. More...

#include <ASensor.h>

Inheritance diagram for isae::ImageSensor:
Inheritance graph
[legend]
Collaboration diagram for isae::ImageSensor:
Collaboration graph
[legend]

Public Member Functions

 ImageSensor ()
 
 ~ImageSensor ()
 
bool hasDepth ()
 
virtual Eigen::Vector3d getRayCamera (Eigen::Vector2d f)=0
 Get the ray in camera coordinates. More...
 
virtual Eigen::Vector3d getRay (Eigen::Vector2d f)=0
 Get the ray in world coordinates. More...
 
virtual double getFocal ()=0
 Compute the focal length of the camera. More...
 
cv::Mat getRawData ()
 
void setPyr (const std::vector< cv::Mat > &img_pyr)
 
const std::vector< cv::Mat > getPyr ()
 
void applyCLAHE (float clahe_clip)
 Apply CLAHE (Contrast Limited Adaptive Histogram Equalization) to the image. More...
 
void histogramEqualization ()
 Apply histogram equalization to the image. More...
 
void imageNormalization ()
 Apply Image normalization to the image. More...
 
void applyAGCWD (float alpha)
 Apply adaptive gamme correction. More...
 
void setMask (cv::Mat mask)
 
cv::Mat getMask ()
 
Eigen::Matrix3d getCalibration ()
 
void addFeature (std::string feature_label, std::shared_ptr< AFeature > f)
 Add a single feature and compute its bearing vector. More...
 
void addFeatures (std::string feature_label, std::vector< std::shared_ptr< AFeature >> features)
 Add a vector of features and compute their bearing vectors. More...
 
void removeFeature (std::shared_ptr< AFeature > f)
 
typed_vec_featuresgetFeatures ()
 
void purgeFeatures (std::string feature_label)
 Clear all features of a specific type. More...
 
std::vector< std::shared_ptr< AFeature > > & getFeatures (std::string feature_label)
 Get features of a specific type. More...
 
virtual bool project (const Eigen::Affine3d &T_w_lmk, const std::shared_ptr< AModel3d > ldmk_model, std::vector< Eigen::Vector2d > &p2d_vector)=0
 Virtual function to project a landmark in the image plane. More...
 
virtual bool project (const Eigen::Affine3d &T_w_lmk, const std::shared_ptr< AModel3d > ldmk_model, const Eigen::Affine3d &T_f_w, std::vector< Eigen::Vector2d > &p2d_vector)=0
 Virtual function to project a landmark in the image plane with the pose of the frame. More...
 
virtual bool project (const Eigen::Affine3d &T_w_lmk, const Eigen::Affine3d &T_f_w, const Eigen::Matrix2d sqrt_info, Eigen::Vector2d &p2d, double *J_proj_frame, double *J_proj_lmk)=0
 Virtual function to project a landmark and compute the Jacobian of the projection. More...
 
- Public Member Functions inherited from isae::ASensor
 ASensor (std::string type)
 
 ~ASensor ()
 
std::string getType ()
 
void setFrame (std::shared_ptr< Frame > frame)
 
std::shared_ptr< FramegetFrame ()
 
void setFrame2SensorTransform (Eigen::Affine3d T_s_f)
 
Eigen::Affine3d getFrame2SensorTransform ()
 
Eigen::Affine3d getWorld2SensorTransform ()
 
Eigen::Affine3d getSensor2WorldTransform ()
 

Protected Attributes

Eigen::Matrix3d _calibration
 intrinsic matrix of the camera (sensor ?) More...
 
cv::Mat _raw_data
 Raw image data. More...
 
std::vector< cv::Mat > _img_pyr
 Image pyramid for multi-scale processing. More...
 
cv::Mat _mask
 Mask to ignore. More...
 
typed_vec_features _features
 Typed vector of features. More...
 
bool _has_depth
 Is it a RGBD ? More...
 
std::mutex _cam_mtx
 
- Protected Attributes inherited from isae::ASensor
std::weak_ptr< Frame_frame
 
Eigen::Affine3d _T_s_f
 
std::string _type
 
std::mutex _sensor_mtx
 

Detailed Description

Abstract class for image sensors.

This class inherits from ASensor and provides additional functionalities specific to image sensors. It includes methods for handling depth data, image pyramids, feature extraction, and projection. It has also all the methods to apply image processing techniques such as CLAHE, histogram equalization etc...

Constructor & Destructor Documentation

◆ ImageSensor()

isae::ImageSensor::ImageSensor ( )
inline

◆ ~ImageSensor()

isae::ImageSensor::~ImageSensor ( )
inline

Member Function Documentation

◆ addFeature()

void isae::ImageSensor::addFeature ( std::string  feature_label,
std::shared_ptr< AFeature f 
)

Add a single feature and compute its bearing vector.

◆ addFeatures()

void isae::ImageSensor::addFeatures ( std::string  feature_label,
std::vector< std::shared_ptr< AFeature >>  features 
)

Add a vector of features and compute their bearing vectors.

◆ applyAGCWD()

void isae::ImageSensor::applyAGCWD ( float  alpha)

Apply adaptive gamme correction.

◆ applyCLAHE()

void isae::ImageSensor::applyCLAHE ( float  clahe_clip)

Apply CLAHE (Contrast Limited Adaptive Histogram Equalization) to the image.

◆ getCalibration()

Eigen::Matrix3d isae::ImageSensor::getCalibration ( )
inline

◆ getFeatures() [1/2]

typed_vec_features& isae::ImageSensor::getFeatures ( )
inline

◆ getFeatures() [2/2]

std::vector< std::shared_ptr< AFeature > > & isae::ImageSensor::getFeatures ( std::string  feature_label)

Get features of a specific type.

◆ getFocal()

virtual double isae::ImageSensor::getFocal ( )
pure virtual

Compute the focal length of the camera.

Virtual function because it depends on the camera model.

Implemented in isae::Omni, isae::Camera, isae::DoubleSphere, and isae::Fisheye.

◆ getMask()

cv::Mat isae::ImageSensor::getMask ( )
inline

◆ getPyr()

const std::vector<cv::Mat> isae::ImageSensor::getPyr ( )
inline

◆ getRawData()

cv::Mat isae::ImageSensor::getRawData ( )
inline

◆ getRay()

virtual Eigen::Vector3d isae::ImageSensor::getRay ( Eigen::Vector2d  f)
pure virtual

Get the ray in world coordinates.

Implemented in isae::Omni, isae::Camera, isae::DoubleSphere, and isae::Fisheye.

◆ getRayCamera()

virtual Eigen::Vector3d isae::ImageSensor::getRayCamera ( Eigen::Vector2d  f)
pure virtual

Get the ray in camera coordinates.

Implemented in isae::Omni, isae::Camera, isae::DoubleSphere, and isae::Fisheye.

◆ hasDepth()

bool isae::ImageSensor::hasDepth ( )
inline

◆ histogramEqualization()

void isae::ImageSensor::histogramEqualization ( )

Apply histogram equalization to the image.

◆ imageNormalization()

void isae::ImageSensor::imageNormalization ( )

Apply Image normalization to the image.

◆ project() [1/3]

virtual bool isae::ImageSensor::project ( const Eigen::Affine3d &  T_w_lmk,
const Eigen::Affine3d &  T_f_w,
const Eigen::Matrix2d  sqrt_info,
Eigen::Vector2d &  p2d,
double *  J_proj_frame,
double *  J_proj_lmk 
)
pure virtual

Virtual function to project a landmark and compute the Jacobian of the projection.

Implemented in isae::Omni, isae::Camera, isae::DoubleSphere, and isae::Fisheye.

◆ project() [2/3]

virtual bool isae::ImageSensor::project ( const Eigen::Affine3d &  T_w_lmk,
const std::shared_ptr< AModel3d ldmk_model,
const Eigen::Affine3d &  T_f_w,
std::vector< Eigen::Vector2d > &  p2d_vector 
)
pure virtual

Virtual function to project a landmark in the image plane with the pose of the frame.

Implemented in isae::Omni, isae::Camera, isae::DoubleSphere, and isae::Fisheye.

◆ project() [3/3]

virtual bool isae::ImageSensor::project ( const Eigen::Affine3d &  T_w_lmk,
const std::shared_ptr< AModel3d ldmk_model,
std::vector< Eigen::Vector2d > &  p2d_vector 
)
pure virtual

Virtual function to project a landmark in the image plane.

Implemented in isae::Omni, isae::Camera, isae::DoubleSphere, and isae::Fisheye.

◆ purgeFeatures()

void isae::ImageSensor::purgeFeatures ( std::string  feature_label)
inline

Clear all features of a specific type.

◆ removeFeature()

void isae::ImageSensor::removeFeature ( std::shared_ptr< AFeature f)

◆ setMask()

void isae::ImageSensor::setMask ( cv::Mat  mask)
inline

◆ setPyr()

void isae::ImageSensor::setPyr ( const std::vector< cv::Mat > &  img_pyr)
inline

Member Data Documentation

◆ _calibration

Eigen::Matrix3d isae::ImageSensor::_calibration
protected

intrinsic matrix of the camera (sensor ?)

◆ _cam_mtx

std::mutex isae::ImageSensor::_cam_mtx
protected

◆ _features

typed_vec_features isae::ImageSensor::_features
protected

Typed vector of features.

◆ _has_depth

bool isae::ImageSensor::_has_depth
protected

Is it a RGBD ?

◆ _img_pyr

std::vector<cv::Mat> isae::ImageSensor::_img_pyr
protected

Image pyramid for multi-scale processing.

◆ _mask

cv::Mat isae::ImageSensor::_mask
protected

Mask to ignore.

◆ _raw_data

cv::Mat isae::ImageSensor::_raw_data
protected

Raw image data.


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