15 #include <mrpt/otherlibs/do_opencv_includes.h> 34 profiler,
"internal_computePolarImageDescriptors");
36 ASSERT_(options.PolarImagesOptions.radius > 1);
37 ASSERT_(options.PolarImagesOptions.bins_angle > 1);
38 ASSERT_(options.PolarImagesOptions.bins_distance > 1);
40 const unsigned int radius = options.PolarImagesOptions.radius;
41 const unsigned int patch_w = options.PolarImagesOptions.bins_distance;
42 const unsigned int patch_h = options.PolarImagesOptions.bins_angle;
47 for (
auto it = in_features.
begin(); it != in_features.
end(); ++it)
50 it->keypoint.octave = radius;
52 #if MRPT_OPENCV_VERSION_NUM < 0x300 54 cv::Mat& out = linpolar_frame.asCvMatRef();
59 in_img.
asCvMatRef(), linpolar_frame.asCvMatRef(),
61 cv::Point2f(it->keypoint.pt.x, it->keypoint.pt.y), radius,
62 CV_INTER_LINEAR + CV_WARP_FILL_OUTLIERS);
65 linpolar_frame.getAsMatrix(*it->descriptors.PolarImg);
#define THROW_EXCEPTION(msg)
A safe way to call enter() and leave() of a mrpt::system::CTimeLogger upon construction and destructi...
cv::Mat & asCvMatRef()
Get a reference to the internal cv::Mat, which can be resized, etc.
TImageChannels getChannelCount() const
Returns the number of channels, typically 1 (GRAY) or 3 (RGB)
#define ASSERT_(f)
Defines an assertion mechanism.
Classes for computer vision, detectors, features, etc.
A list of visual features, to be used as output by detectors, as input/output by trackers, etc.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class for storing images as grayscale or RGB bitmaps.