 |
AliceVision
Photogrammetric Computer Vision Framework
|
10 #include <aliceVision/feature/imageDescriberCommon.hpp>
11 #include <aliceVision/feature/ImageDescriber.hpp>
12 #include <aliceVision/feature/regionsFactory.hpp>
13 #include <aliceVision/types.hpp>
35 bool useCuda()
const override {
return false; }
60 return 3 * width * height *
sizeof(
unsigned char);
79 std::unique_ptr<Regions>& regions,
86 void allocate(std::unique_ptr<Regions>& regions)
const override;
94 void setPreset(EImageDescriberPreset preset);
107 template<
class DescriptorT>
108 IndexT getAprilTagId(
const DescriptorT& desc)
110 std::size_t apriltagId = UndefinedIndexT;
111 for (std::size_t i = 0; i < desc.size(); ++i)
113 if (desc.getData()[i] == (
unsigned char)255)
115 if (apriltagId != UndefinedIndexT)
117 return UndefinedIndexT;
121 else if (desc.getData()[i] != (
unsigned char)0)
123 return UndefinedIndexT;
std::size_t getMemoryConsumption(std::size_t width, std::size_t height) const override
Get the total amount of RAM needed for a feature extraction of an image of the given dimension.
Definition: ImageDescriber_APRILTAG.hpp:56
void allocate(std::unique_ptr< Regions > ®ions) const override
Allocate Regions type depending of the ImageDescriber.
Definition: ImageDescriber_APRILTAG.cpp:24
void setConfigurationPreset(ConfigurationPreset preset) override
Use a preset to control the number of detected regions.
Definition: ImageDescriber_APRILTAG.cpp:26
Definition: checkerDetector.cpp:32
A pure virtual class for image description computation.
Definition: ImageDescriber.hpp:159
bool describe(const image::Image< unsigned char > &image, std::unique_ptr< Regions > ®ions, const image::Image< unsigned char > *mask=nullptr) override
Detect regions on the 8-bit image and compute their attributes (description)
Definition: ImageDescriber_APRILTAG.cpp:30
Create an ImageDescriber interface for AprilTag feature extractor.
Definition: ImageDescriber_APRILTAG.hpp:24
Definition: ImageDescriber.hpp:118
bool useCuda() const override
Check if the image describer use CUDA.
Definition: ImageDescriber_APRILTAG.hpp:35
bool useFloatImage() const override
Check if the image describer use float image.
Definition: ImageDescriber_APRILTAG.hpp:41
Definition: ImageDescriber_APRILTAG.hpp:88
EImageDescriberType getDescriberType() const override
Get the corresponding EImageDescriberType.
Definition: ImageDescriber_APRILTAG.cpp:28