 |
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>
60 std::size_t
getMemoryConsumption(std::size_t width, std::size_t height)
const override {
return 3 * width * height *
sizeof(
unsigned char); }
90 std::unique_ptr<Regions>& regions,
97 void allocate(std::unique_ptr<Regions>& regions)
const override;
105 bool setPreset(EImageDescriberPreset preset);
109 std::unique_ptr<cctag::Parameters> _internalParams;
115 bool _doAppend =
false;
124 template<
class DescriptorT>
125 IndexT getCCTagId(
const DescriptorT& desc)
127 std::size_t cctagId = UndefinedIndexT;
128 for (std::size_t i = 0; i < desc.size(); ++i)
130 if (desc.getData()[i] == (
unsigned char)255)
132 if (cctagId != UndefinedIndexT)
134 return UndefinedIndexT;
138 else if (desc.getData()[i] != (
unsigned char)0)
140 return UndefinedIndexT;
EImageDescriberType getDescriberType() const override
Get the corresponding EImageDescriberType.
Definition: ImageDescriber_CCTAG.cpp:64
Definition: ImageDescriber_CCTAG.hpp:99
bool useCuda() const override
Check if the image describer use CUDA.
Definition: ImageDescriber_CCTAG.cpp:58
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_CCTAG.cpp:75
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_CCTAG.hpp:60
Definition: checkerDetector.cpp:32
A pure virtual class for image description computation.
Definition: ImageDescriber.hpp:159
void allocate(std::unique_ptr< Regions > ®ions) const override
Allocate Regions type depending of the ImageDescriber.
Definition: ImageDescriber_CCTAG.cpp:60
void setConfigurationPreset(ConfigurationPreset preset) override
Use a preset to control the number of detected regions.
Definition: ImageDescriber_CCTAG.cpp:62
Definition: ImageDescriber.hpp:118
void setCudaPipe(int pipe) override
set the CUDA pipe
Definition: ImageDescriber_CCTAG.hpp:72
void setUseCuda(bool) override
Set if yes or no imageDescriber need to use cuda implementation.
Definition: ImageDescriber_CCTAG.cpp:73
bool useFloatImage() const override
Check if the image describer use float image.
Definition: ImageDescriber_CCTAG.hpp:45
Create an ImageDescriber interface for CCTag feature extractor.
Definition: ImageDescriber_CCTAG.hpp:28