Main MRPT website > C++ reference
MRPT logo
Functions
Sse_optimizations

Detailed Description

SSE optimized functions.

Functions

bool TFEST_IMPEXP mrpt::tfest::se2_l2 (const mrpt::utils::TMatchingPairList &in_correspondences, mrpt::math::TPose2D &out_transformation, mrpt::math::CMatrixDouble33 *out_estimateCovariance=NULL)
 Least-squares (L2 norm) solution to finding the optimal SE(2) (x,y,yaw) between two reference frames. More...
 
void image_SSE2_scale_half_1c8u (const uint8_t *in, uint8_t *out, int w, int h)
 Subsample each 2x2 pixel block into 1x1 pixel, taking the first pixel & ignoring the other 3. More...
 
void image_SSE2_scale_half_smooth_1c8u (const uint8_t *in, uint8_t *out, int w, int h)
 Average each 2x2 pixels into 1x1 pixel (arithmetic average) More...
 
float KLT_response_optimized ()
 KLT score at a given point of a grayscale image. More...
 
void image_SSSE3_scale_half_3c8u (const uint8_t *in, uint8_t *out, int w, int h)
 Subsample each 2x2 pixel block into 1x1 pixel, taking the first pixel & ignoring the other 3. More...
 
template<bool IS_RGB>
void private_image_SSSE3_rgb_or_bgr_to_gray_8u (const uint8_t *in, uint8_t *out, int w, int h)
 
void image_SSSE3_bgr_to_gray_8u (const uint8_t *in, uint8_t *out, int w, int h)
 Convert a RGB image (3cu8) into a GRAYSCALE (1c8u) image, using Y=77*R+150*G+29*B. More...
 
void image_SSSE3_rgb_to_gray_8u (const uint8_t *in, uint8_t *out, int w, int h)
 Convert a RGB image (3cu8) into a GRAYSCALE (1c8u) image, using Y=77*R+150*G+29*B. More...
 

Function Documentation

void image_SSE2_scale_half_1c8u ( const uint8_t *  in,
uint8_t *  out,
int  w,
int  h 
)

Subsample each 2x2 pixel block into 1x1 pixel, taking the first pixel & ignoring the other 3.

  • Input format: uint8_t, 1 channel
  • Output format: uint8_t, 1 channel
  • Preconditions: in & out aligned to 16bytes, w = k*16 (w=width in pixels), widthStep=w*1
  • Notes:
  • Requires: SSE2
  • Invoked from: mrpt::utils::CImage::scaleHalf()

Definition at line 40 of file CImage_SSE2.cpp.

References MRPT_ALIGN16.

void image_SSE2_scale_half_smooth_1c8u ( const uint8_t *  in,
uint8_t *  out,
int  w,
int  h 
)

Average each 2x2 pixels into 1x1 pixel (arithmetic average)

  • Input format: uint8_t, 1 channel
  • Output format: uint8_t, 1 channel
  • Preconditions: in & out aligned to 16bytes, w = k*16 (w=width in pixels), widthStep=w*1
  • Notes:
  • Requires: SSE2
  • Invoked from: mrpt::utils::CImage::scaleHalfSmooth()

Definition at line 70 of file CImage_SSE2.cpp.

References MRPT_ALIGN16.

void image_SSSE3_bgr_to_gray_8u ( const uint8_t *  in,
uint8_t *  out,
int  w,
int  h 
)

Convert a RGB image (3cu8) into a GRAYSCALE (1c8u) image, using Y=77*R+150*G+29*B.

Definition at line 208 of file CImage_SSE3.cpp.

void image_SSSE3_rgb_to_gray_8u ( const uint8_t *  in,
uint8_t *  out,
int  w,
int  h 
)

Convert a RGB image (3cu8) into a GRAYSCALE (1c8u) image, using Y=77*R+150*G+29*B.

Definition at line 221 of file CImage_SSE3.cpp.

void image_SSSE3_scale_half_3c8u ( const uint8_t *  in,
uint8_t *  out,
int  w,
int  h 
)

Subsample each 2x2 pixel block into 1x1 pixel, taking the first pixel & ignoring the other 3.

  • Input format: uint8_t, 3 channels (RGB or BGR)
  • Output format: uint8_t, 3 channels (RGB or BGR)
  • Preconditions: in & out aligned to 16bytes, w = k*16 (w=width in pixels), widthStep=w*3
  • Notes:
  • Requires: SSSE3
  • Invoked from: mrpt::utils::CImage::scaleHalf()

Definition at line 37 of file CImage_SSE3.cpp.

References MRPT_ALIGN16.

float KLT_response_optimized ( )

KLT score at a given point of a grayscale image.

This function is not manually optimized for SSE2 but templatized for different window sizes such as the compiler can optimize automatically for that size.

Only for the most common window sizes this templates are instantiated (W=[2-16] and W=32 ), falling back to a generic implementation otherwise. The next figure shows the performance (time for KLT_response() to compute the score for one single pixel) for different window sizes.

template<bool IS_RGB>
void private_image_SSSE3_rgb_or_bgr_to_gray_8u ( const uint8_t *  in,
uint8_t *  out,
int  w,
int  h 
)

Definition at line 90 of file CImage_SSE3.cpp.

References BUILD_128BIT_CONST.

bool TFEST_IMPEXP mrpt::tfest::se2_l2 ( const mrpt::utils::TMatchingPairList in_correspondences,
mrpt::math::TPose2D out_transformation,
mrpt::math::CMatrixDouble33 out_estimateCovariance = NULL 
)

Least-squares (L2 norm) solution to finding the optimal SE(2) (x,y,yaw) between two reference frames.

The optimal transformation q fulfills $ p_{this} = q \oplus p_{other} $, that is, the transformation of frame other with respect to this.

tfest_frames.png
Parameters
[in]in_correspondencesThe set of correspondences.
[out]out_transformationThe pose that minimizes the mean-square-error between all the correspondences.
[out]out_estimateCovarianceIf provided (!=NULL) this will contain on return a 3x3 covariance matrix with the NORMALIZED optimal estimate uncertainty. This matrix must be multiplied by $\sigma^2_p$, the variance of matched points in $x$ and $y$ (see paper http://www.mrpt.org/Paper:Occupancy_Grid_Matching)
Returns
True if there are at least two correspondences, or false if one or none, thus we cannot establish any correspondence.
See also
robustRigidTransformation
Note
Reference for covariance calculation: J.L. Blanco, J. Gonzalez-Jimenez, J.A. Fernandez-Madrigal, "A Robust, Multi-Hypothesis Approach to Matching Occupancy Grid Maps", Robotica, 2013. http://dx.doi.org/10.1017/S0263574712000732
[New in MRPT 1.3.0] This function replaces mrpt::scanmatching::leastSquareErrorRigidTransformation()
This function is hand-optimized for SSE2 architectures (if SSE2 is enabled from CMake)
See also
se3_l2, se2_l2_robust



Page generated by Doxygen 1.8.9.1 for MRPT 1.3.0 SVN: at Sun Sep 13 03:55:12 UTC 2015