Visual Servoing Platform  version 3.6.1 under development (2024-11-15)
vpLuminanceDCT::vpMatrixZigZagIndex Class Reference

#include <visp3/visual_features/vpFeatureLuminanceMapping.h>

Public Member Functions

 vpMatrixZigZagIndex ()
 
void init (unsigned rows, unsigned cols)
 
void getValues (const vpMatrix &m, unsigned int start, unsigned int end, vpColVector &s) const
 
void setValues (const vpColVector &s, unsigned int start, vpMatrix &m) const
 

Detailed Description

Helper class to iterate and get/set the values from a matrix, following a zigzag pattern.

Examples
catchLuminanceMapping.cpp.

Definition at line 293 of file vpFeatureLuminanceMapping.h.

Constructor & Destructor Documentation

◆ vpMatrixZigZagIndex()

vpLuminanceDCT::vpMatrixZigZagIndex::vpMatrixZigZagIndex ( )

Definition at line 273 of file vpFeatureLuminanceMapping.cpp.

Member Function Documentation

◆ getValues()

void vpLuminanceDCT::vpMatrixZigZagIndex::getValues ( const vpMatrix m,
unsigned int  start,
unsigned int  end,
vpColVector s 
) const

Fill the vector s with (end - start) values, according to the zigzag matrix indexing strategy.

Parameters
mthe matrix
startThe first value. Use 0 to start with the matrix's top left value
endThe last value to store in the vector. (exclusive)
sThe vector in which to store the values
Examples
catchLuminanceMapping.cpp.

Definition at line 392 of file vpFeatureLuminanceMapping.cpp.

References vpException::dimensionError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and vpColVector::resize().

Referenced by vpLuminanceDCT::interaction(), and vpLuminanceDCT::map().

◆ init()

void vpLuminanceDCT::vpMatrixZigZagIndex::init ( unsigned  rows,
unsigned  cols 
)

Initialize the ZigZag object. Computes and stores the zigzag indexing for a given matrix size.

Parameters
rowsthe matrix's number of rows
colsthe matrix's number of cols
Examples
catchLuminanceMapping.cpp.

Definition at line 275 of file vpFeatureLuminanceMapping.cpp.

Referenced by vpLuminanceDCT::map().

◆ setValues()

void vpLuminanceDCT::vpMatrixZigZagIndex::setValues ( const vpColVector s,
unsigned int  start,
vpMatrix m 
) const

set the values in the matrix, according to the values stored in the vector s and the zigzag indexing strategy

Parameters
sThe vector from which to set the values
startthe zigzag index at which to start filling values
mThe matrix in which the values will be replaced
Examples
catchLuminanceMapping.cpp.

Definition at line 409 of file vpFeatureLuminanceMapping.cpp.

References vpException::dimensionError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and vpArray2D< Type >::size().

Referenced by vpLuminanceDCT::inverse().