AliceVision
Photogrammetric Computer Vision Framework
Public Types | Public Member Functions | List of all members
aliceVision::sfmData::View Class Reference

A view define an image by a string and unique indexes for the view, the camera intrinsic, the pose and the subpose if the camera is part of a rig. More...

#include <View.hpp>

Public Types

using sptr = std::shared_ptr< View >
 
using ptr = View *
 

Public Member Functions

 View (const std::string &imagePath="", IndexT viewId=UndefinedIndexT, IndexT intrinsicId=UndefinedIndexT, IndexT poseId=UndefinedIndexT, std::size_t width=0, std::size_t height=0, IndexT rigId=UndefinedIndexT, IndexT subPoseId=UndefinedIndexT, const std::map< std::string, std::string > &metadata=std::map< std::string, std::string >())
 View Constructor. More...
 
 View (const View &v)=default
 
ViewshallowClone ()
 Shallow View Copy return a pointer to a new View.
 
Viewclone () const
 Deep View Copy return a pointer to a new View.
 
bool operator== (const View &other) const
 
bool operator!= (const View &other) const
 
const ImageInfogetImage () const
 Get Image info object. More...
 
ImageInfogetImage ()
 Get Image info object. More...
 
std::shared_ptr< ImageInfogetImageInfo ()
 Get Image info pointer. More...
 
IndexT getViewId () const
 Get the view id. More...
 
IndexT getImageGroupId () const
 Get the image group id. More...
 
IndexT getIntrinsicId () const
 Get the intrinsic id. More...
 
IndexT getPoseId () const
 Get the pose id. More...
 
IndexT getRigId () const
 Get the rig id. More...
 
IndexT getSubPoseId () const
 Get the sub-pose id. More...
 
IndexT getFrameId () const
 Get the frame id. More...
 
IndexT getResectionId () const
 Get the resection id. More...
 
bool isPartOfRig () const
 Return if true or false the view is part of a rig. More...
 
bool isPoseIndependant () const
 If the view is part of a camera rig, the camera can be a sub-pose of the rig pose but can also be temporarily solved independently. More...
 
void setViewId (IndexT viewId)
 Set the given view id. More...
 
void setImageGroupId (IndexT imageGroupId)
 Set the given image group id. More...
 
void setIntrinsicId (IndexT intrinsicId)
 Set the given intrinsic id. More...
 
void setPoseId (IndexT poseId)
 Set the given pose id. More...
 
void setIndependantPose (bool independent)
 setIndependantPose More...
 
void setRigAndSubPoseId (IndexT rigId, IndexT subPoseId)
 Set the given rig id and the given sub-pose id. More...
 
void setFrameId (IndexT frameId)
 Set the given frame id. More...
 
const std::vector< IndexT > & getAncestors () const
 
void addAncestor (IndexT image)
 Add an ancestor images to the existing ones. If an image is generated from multiple input images, "Ancestor Images" allows to keep track of all features of the original images. For instance, the generated view can come from the fusion of multiple LDR images into one HDR image, the fusion from multi-focus stacking to get a fully focused image, fusion of images with multiple lighting to get a more diffuse lighting, etc. More...
 
void setResectionId (IndexT resectionId)
 Set the given resection id. More...
 
bool isFullySetup ()
 Check if the view has the minimal identifiers required for processing. More...
 

Detailed Description

A view define an image by a string and unique indexes for the view, the camera intrinsic, the pose and the subpose if the camera is part of a rig.

Constructor & Destructor Documentation

◆ View()

aliceVision::sfmData::View::View ( const std::string &  imagePath = "",
IndexT  viewId = UndefinedIndexT,
IndexT  intrinsicId = UndefinedIndexT,
IndexT  poseId = UndefinedIndexT,
std::size_t  width = 0,
std::size_t  height = 0,
IndexT  rigId = UndefinedIndexT,
IndexT  subPoseId = UndefinedIndexT,
const std::map< std::string, std::string > &  metadata = std::map<std::string, std::string>() 
)
inline

View Constructor.

Parameters
[in]imagePathThe image path on disk
[in]viewIdThe view id (use unique index)
[in]intrinsicIdThe intrinsic id
[in]poseIdThe pose id (or the rig pose id)
[in]widthThe image width
[in]heightThe image height
[in]rigIdThe rig id (or undefined)
[in]subPoseIdThe sub-pose id (or undefined)
[in]metadataThe image metadata

Member Function Documentation

◆ addAncestor()

void aliceVision::sfmData::View::addAncestor ( IndexT  image)
inline

Add an ancestor images to the existing ones. If an image is generated from multiple input images, "Ancestor Images" allows to keep track of all features of the original images. For instance, the generated view can come from the fusion of multiple LDR images into one HDR image, the fusion from multi-focus stacking to get a fully focused image, fusion of images with multiple lighting to get a more diffuse lighting, etc.

Parameters
[in]imagenew ancestor image Id

◆ getAncestors()

const std::vector<IndexT>& aliceVision::sfmData::View::getAncestors ( ) const
inline

@Brief get all ancestors for this view

Returns
ancestors

◆ getFrameId()

IndexT aliceVision::sfmData::View::getFrameId ( ) const
inline

Get the frame id.

Returns
frame id

◆ getImage() [1/2]

ImageInfo& aliceVision::sfmData::View::getImage ( )
inline

Get Image info object.

Returns
an object

◆ getImage() [2/2]

const ImageInfo& aliceVision::sfmData::View::getImage ( ) const
inline

Get Image info object.

Returns
an object

◆ getImageGroupId()

IndexT aliceVision::sfmData::View::getImageGroupId ( ) const
inline

Get the image group id.

Returns
image group id

◆ getImageInfo()

std::shared_ptr<ImageInfo> aliceVision::sfmData::View::getImageInfo ( )
inline

Get Image info pointer.

Returns
a shared pointer

◆ getIntrinsicId()

IndexT aliceVision::sfmData::View::getIntrinsicId ( ) const
inline

Get the intrinsic id.

Returns
intrinsic id

◆ getPoseId()

IndexT aliceVision::sfmData::View::getPoseId ( ) const
inline

Get the pose id.

Returns
pose id

◆ getResectionId()

IndexT aliceVision::sfmData::View::getResectionId ( ) const
inline

Get the resection id.

Returns
resection id

◆ getRigId()

IndexT aliceVision::sfmData::View::getRigId ( ) const
inline

Get the rig id.

Returns
rig id or undefined

◆ getSubPoseId()

IndexT aliceVision::sfmData::View::getSubPoseId ( ) const
inline

Get the sub-pose id.

Returns
sup-pose id or undefined

◆ getViewId()

IndexT aliceVision::sfmData::View::getViewId ( ) const
inline

Get the view id.

Returns
view id

◆ isFullySetup()

bool aliceVision::sfmData::View::isFullySetup ( )
inline

Check if the view has the minimal identifiers required for processing.

Returns
true if view, intrinsic, and pose identifiers are set consistently.

◆ isPartOfRig()

bool aliceVision::sfmData::View::isPartOfRig ( ) const
inline

Return if true or false the view is part of a rig.

Returns
true if the view is part of a rig

◆ isPoseIndependant()

bool aliceVision::sfmData::View::isPoseIndependant ( ) const
inline

If the view is part of a camera rig, the camera can be a sub-pose of the rig pose but can also be temporarily solved independently.

Returns
true if the view is not part of a rig. true if the view is part of a rig and the camera is solved separately. false if the view is part of a rig and the camera is solved as a sub-pose of the rig pose.

◆ setFrameId()

void aliceVision::sfmData::View::setFrameId ( IndexT  frameId)
inline

Set the given frame id.

Parameters
[in]frameThe given frame id

◆ setImageGroupId()

void aliceVision::sfmData::View::setImageGroupId ( IndexT  imageGroupId)
inline

Set the given image group id.

Parameters
[in]imageGroupIdThe given image group id

◆ setIndependantPose()

void aliceVision::sfmData::View::setIndependantPose ( bool  independent)
inline

setIndependantPose

Parameters
independent

◆ setIntrinsicId()

void aliceVision::sfmData::View::setIntrinsicId ( IndexT  intrinsicId)
inline

Set the given intrinsic id.

Parameters
[in]intrinsicIdThe given intrinsic id

◆ setPoseId()

void aliceVision::sfmData::View::setPoseId ( IndexT  poseId)
inline

Set the given pose id.

Parameters
[in]poseIdThe given pose id

◆ setResectionId()

void aliceVision::sfmData::View::setResectionId ( IndexT  resectionId)
inline

Set the given resection id.

Parameters
[in]resectionIdThe given resection id

◆ setRigAndSubPoseId()

void aliceVision::sfmData::View::setRigAndSubPoseId ( IndexT  rigId,
IndexT  subPoseId 
)
inline

Set the given rig id and the given sub-pose id.

Parameters
[in]rigIdThe given rig id
[in]subPoseIdThe given sub-pose id

◆ setViewId()

void aliceVision::sfmData::View::setViewId ( IndexT  viewId)
inline

Set the given view id.

Parameters
[in]viewIdThe given view id

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