Visual Servoing Platform
version 3.6.1 under development (2024-11-15)
|
#include <visp3/visual_features/vpFeatureLuminanceMapping.h>
Classes | |
class | vpMatrixZigZagIndex |
Public Member Functions | |
vpLuminanceDCT (const unsigned int k) | |
void | init (const unsigned int k) |
vpLuminanceDCT (const vpLuminanceDCT &other) | |
vpLuminanceDCT & | operator= (const vpLuminanceDCT &)=default |
void | map (const vpImage< unsigned char > &I, vpColVector &s) VP_OVERRIDE |
void | inverse (const vpColVector &s, vpImage< unsigned char > &I) VP_OVERRIDE |
void | interaction (const vpImage< unsigned char > &I, const vpMatrix &LI, const vpColVector &s, vpMatrix &L) VP_OVERRIDE |
unsigned int | getProjectionSize () const |
unsigned int | getBorder () const |
void | setBorder (unsigned border) |
Static Public Member Functions | |
static void | imageAsVector (const vpImage< unsigned char > &I, vpColVector &Ivec, unsigned border) |
static void | imageAsMatrix (const vpImage< unsigned char > &I, vpMatrix &Imat, unsigned border) |
Protected Attributes | |
unsigned int | m_Ih |
unsigned int | m_Iw |
vpMatrix | m_Imat |
vpMatrix | m_dct |
vpMatrix | m_Dcols |
vpMatrix | m_Drows |
std::array< vpMatrix, 6 > | m_dIdrPlanes |
vpLuminanceDCT::vpMatrixZigZagIndex | m_zigzag |
unsigned | m_mappingSize |
unsigned | m_border |
Implementation of [36].
Computes the Discrete Cosine Transform (DCT) representation of the image. Only the K first components are preserved and stored into a vector when calling map. These components correspond to the lowest frequencies of the input image.
Definition at line 286 of file vpFeatureLuminanceMapping.h.
|
inline |
Build a new DCT object.
k | the number of components to keep from the DCT matrix and use as servoing features |
Definition at line 335 of file vpFeatureLuminanceMapping.h.
vpLuminanceDCT::vpLuminanceDCT | ( | const vpLuminanceDCT & | other | ) |
Copy constructor.
Definition at line 426 of file vpFeatureLuminanceMapping.cpp.
|
inlineinherited |
Returns the number of pixels that are removed by the photometric VS computation.
Definition at line 114 of file vpFeatureLuminanceMapping.h.
|
inlineinherited |
Returns the size of the space to which an image is mapped to.
Definition at line 107 of file vpFeatureLuminanceMapping.h.
|
staticinherited |
Definition at line 59 of file vpFeatureLuminanceMapping.cpp.
References vpException::dimensionError, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpArray2D< Type >::resize().
Referenced by map().
|
staticinherited |
Definition at line 43 of file vpFeatureLuminanceMapping.cpp.
References vpException::dimensionError, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpColVector::resize().
Referenced by vpLuminancePCA::map().
|
inline |
Initialize the DCT object with the number of required components.
Definition at line 343 of file vpFeatureLuminanceMapping.h.
References vpFeatureLuminance::DEFAULT_BORDER.
|
virtual |
Compute the interaction matrix associated with the representation s
.
I | input image used to compute s |
LI | Photometric interaction matrix associated to I (see vpFeatureLuminance) |
s | the already computed representation |
L | The output interaction matrix, of dimensions getProjectionSize() x 6 |
Implements vpLuminanceMapping.
Definition at line 478 of file vpFeatureLuminanceMapping.cpp.
References vpLuminanceDCT::vpMatrixZigZagIndex::getValues(), m_Dcols, m_dIdrPlanes, m_Drows, m_Ih, m_Iw, vpLuminanceMapping::m_mappingSize, m_zigzag, and vpMatrix::t().
|
virtual |
Reconstruct I
from a representation s
.
s | the representation |
I | Output lossy reconstruction |
Implements vpLuminanceMapping.
Definition at line 465 of file vpFeatureLuminanceMapping.cpp.
References vpArray2D< Type >::getCols(), vpImage< Type >::getCols(), vpArray2D< Type >::getRows(), vpImage< Type >::getRows(), m_Dcols, m_dct, m_Drows, m_zigzag, vpImage< Type >::resize(), vpLuminanceDCT::vpMatrixZigZagIndex::setValues(), and vpMatrix::t().
|
virtual |
Map an image I
to a representation s
. This representation s has getProjectionSize() rows.
Note that when combined with vpFeatureLuminanceMapping, The image I
does not have the same size as the image input of vpFeatureLuminanceMapping::build. I
is the center crop of this image.
I | The input image |
s | The resulting representation that will serve as visual servoing features. |
Implements vpLuminanceMapping.
Definition at line 431 of file vpFeatureLuminanceMapping.cpp.
References vpArray2D< Type >::getCols(), vpImage< Type >::getHeight(), vpArray2D< Type >::getRows(), vpLuminanceDCT::vpMatrixZigZagIndex::getValues(), vpImage< Type >::getWidth(), vpLuminanceMapping::imageAsMatrix(), vpLuminanceDCT::vpMatrixZigZagIndex::init(), vpLuminanceMapping::m_border, m_Dcols, m_dct, m_Drows, m_Ih, m_Imat, m_Iw, vpLuminanceMapping::m_mappingSize, and m_zigzag.
|
default |
|
inlineinherited |
Set the number of pixels that are removed by the photometric VS computation This function should be called by vpFeatureLuminanceMapping.
border |
Definition at line 122 of file vpFeatureLuminanceMapping.h.
|
protectedinherited |
Final vector size.
Definition at line 129 of file vpFeatureLuminanceMapping.h.
Referenced by vpLuminancePCA::init(), vpLuminancePCA::map(), map(), and vpLuminancePCA::operator=().
|
protected |
DCT representation of the image.
Definition at line 369 of file vpFeatureLuminanceMapping.h.
Referenced by interaction(), inverse(), and map().
|
protected |
Image as a matrix.
Definition at line 368 of file vpFeatureLuminanceMapping.h.
|
protected |
the computed DCT matrices. The separable property of DCt is used so that a 1D DCT is computed on rows and another on columns of the result of the first dct;
Definition at line 370 of file vpFeatureLuminanceMapping.h.
Referenced by interaction().
|
protected |
Definition at line 369 of file vpFeatureLuminanceMapping.h.
Referenced by interaction(), inverse(), and map().
|
protected |
Definition at line 366 of file vpFeatureLuminanceMapping.h.
Referenced by interaction(), and map().
|
protected |
image dimensions (without borders)
Definition at line 367 of file vpFeatureLuminanceMapping.h.
Referenced by map().
|
protected |
Definition at line 366 of file vpFeatureLuminanceMapping.h.
Referenced by interaction(), and map().
|
protectedinherited |
Definition at line 128 of file vpFeatureLuminanceMapping.h.
Referenced by vpLuminancePCA::init(), interaction(), map(), and vpLuminancePCA::operator=().
|
protected |
Luminance interaction matrix, seen as six image planes.
Definition at line 371 of file vpFeatureLuminanceMapping.h.
Referenced by interaction(), inverse(), and map().