Class that performs texture-related tasks.  
 More...
#include <Texturizer.hpp>
|  | 
| TexCoords | calculateTexCoords (TextureHandle texH, const BoundingRectangle< typename BaseVecT::CoordType > &boundingRect, BaseVecT v) | 
|  | Calculate texture coordinates for a given 3D point in a texture.  More... 
 | 
|  | 
| BaseVecT | calculateTexCoordsInv (TextureHandle texH, const BoundingRectangle< typename BaseVecT::CoordType > &boundingRect, const TexCoords &coords) | 
|  | Calculate a global 3D position for given texture coordinates.  More... 
 | 
|  | 
| void | findKeyPointsInTexture (const TextureHandle texH, const BoundingRectangle< typename BaseVecT::CoordType > &boundingRect, const cv::Ptr< cv::Feature2D > &detector, std::vector< cv::KeyPoint > &keypoints, cv::Mat &descriptors) | 
|  | Discover keypoints in a texture.  More... 
 | 
|  | 
| virtual TextureHandle | generateTexture (int index, const PointsetSurface< BaseVecT > &surface, const BoundingRectangle< typename BaseVecT::CoordType > &boundingRect) | 
|  | Generates a texture for a given bounding rectangle.  More... 
 | 
|  | 
| Texture | getTexture (TextureHandle h) | 
|  | Get the texture to a given texture handle.  More... 
 | 
|  | 
| int | getTextureIndex (TextureHandle h) | 
|  | Get the texture index to a given texture handle.  More... 
 | 
|  | 
| StableVector< TextureHandle, Texture > | getTextures () | 
|  | Returns all textures.  More... 
 | 
|  | 
| std::vector< BaseVecT > | keypoints23d (const std::vector< cv::KeyPoint > &keypoints, const BoundingRectangle< typename BaseVecT::CoordType > &boundingRect, const TextureHandle &h) | 
|  | Compute 3D coordinates for texture-relative keypoints.  More... 
 | 
|  | 
| void | saveTextures () | 
|  | Calls the save method for each texture.  More... 
 | 
|  | 
|  | Texturizer (float texelSize, int texMinClusterSize, int texMaxClusterSize) | 
|  | Constructor.  More... 
 | 
|  | 
template<typename BaseVecT>
class lvr2::Texturizer< BaseVecT >
Class that performs texture-related tasks. 
Definition at line 63 of file Texturizer.hpp.
◆ Texturizer()
template<typename BaseVecT > 
      
 
Constructor. 
- Parameters
- 
  
    | texelSize | The size of one texture pixel, relative to the coordinate system of the point cloud |  | texMinClusterSize | The minimum number of faces a cluster needs to be texturized |  | texMaxClusterSize | The maximum number of faces a cluster needs to be texturized |  
 
 
 
◆ calculateTexCoords()
template<typename BaseVecT > 
      
 
Calculate texture coordinates for a given 3D point in a texture. 
- Parameters
- 
  
    | texH | The texture handle |  | boundingRect | The bounding rectangle of the texture |  | v | The 3D point |  
 
- Returns
- The texture coordinates 
 
 
◆ calculateTexCoordsInv()
template<typename BaseVecT > 
      
 
Calculate a global 3D position for given texture coordinates. 
- Parameters
- 
  
    | texH | The texture handle |  | boundingRect | The bounding rectangle of the texture |  | coords | The texture coordinates |  
 
- Returns
- The 3D point 
 
 
◆ findKeyPointsInTexture()
template<typename BaseVecT > 
      
        
          | void lvr2::Texturizer< BaseVecT >::findKeyPointsInTexture | ( | const TextureHandle | texH, | 
        
          |  |  | const BoundingRectangle< typename BaseVecT::CoordType > & | boundingRect, | 
        
          |  |  | const cv::Ptr< cv::Feature2D > & | detector, | 
        
          |  |  | std::vector< cv::KeyPoint > & | keypoints, | 
        
          |  |  | cv::Mat & | descriptors | 
        
          |  | ) |  |  | 
      
 
Discover keypoints in a texture. 
- Parameters
- 
  
    | [in] | texH | Texture handle |  | [in] | boundingRect | Bounding rectangle computed for the texture |  | [in] | detector | Feature detector to use (any of cv::Feature2D) |  | [out] | keypoints | Vector of keypoints |  | [out] | descriptors | Matrix of descriptors for the keypoint |  
 
 
 
◆ generateTexture()
template<typename BaseVecT > 
 
Generates a texture for a given bounding rectangle. 
Create a grid, based on given information (texel size, bounding rectangle). For each cell in the grid (which represents a texel), let the PointsetSurface find the closest point in the point cloud and use that point's color as color for the texel.
- Parameters
- 
  
    | index | The index the texture will get |  | surface | The point cloud |  | boundingRect | The bounding rectangle of the cluster |  
 
- Returns
- Texture handle of the generated texture 
Reimplemented in lvr2::ImageTexturizer< BaseVecT >.
 
 
◆ getTexture()
template<typename BaseVecT > 
      
 
Get the texture to a given texture handle. 
- Parameters
- 
  
  
- Returns
- The texture 
 
 
◆ getTextureIndex()
template<typename BaseVecT > 
      
 
Get the texture index to a given texture handle. 
- Parameters
- 
  
  
- Returns
- The texture index 
 
 
◆ getTextures()
template<typename BaseVecT > 
      
 
Returns all textures. 
- Returns
- A StableVector containing all textures 
 
 
◆ keypoints23d()
template<typename BaseVecT > 
      
 
Compute 3D coordinates for texture-relative keypoints. 
- Parameters
- 
  
    | [in] | keypoints | Keypoints in image coordinates |  | [in] | boundingRect | Bounding rectangle of the texture embedded in 3D |  
 
- Returns
- Vector of 3D coordinates of all keypoints 
 
 
◆ saveTextures()
template<typename BaseVecT > 
      
 
Calls the save method for each texture. 
 
 
◆ m_texelSize
template<typename BaseVecT > 
      
 
 
◆ m_texMaxClusterSize
template<typename BaseVecT > 
      
 
The maximum number of faces a cluster needs to be texturized. 
Definition at line 191 of file Texturizer.hpp.
 
 
◆ m_texMinClusterSize
template<typename BaseVecT > 
      
 
The minimum number of faces a cluster needs to be texturized. 
Definition at line 189 of file Texturizer.hpp.
 
 
◆ m_textures
template<typename BaseVecT > 
 
 
The documentation for this class was generated from the following file: