 |
AliceVision
Photogrammetric Computer Vision Framework
|
10 #include <aliceVision/config.hpp>
11 #include <aliceVision/feature/sift/ImageDescriber_SIFT_vlfeat.hpp>
13 #if ALICEVISION_IS_DEFINED(ALICEVISION_HAVE_POPSIFT)
14 #include <aliceVision/gpu/gpu.hpp>
15 #include <aliceVision/feature/sift/ImageDescriber_SIFT_popSIFT.hpp>
32 _isOriented(isOriented)
34 #if ALICEVISION_IS_DEFINED(ALICEVISION_HAVE_POPSIFT)
45 bool useCuda()
const override {
return _imageDescriberImpl->useCuda(); }
51 bool useFloatImage()
const override {
return _imageDescriberImpl->useFloatImage(); }
57 EImageDescriberType
getDescriberType()
const override {
return _imageDescriberImpl->getDescriberType(); }
68 return _imageDescriberImpl->getMemoryConsumption(width, height);
75 void setUpRight(
bool upRight)
override { _isOriented = !upRight; }
83 if (_imageDescriberImpl !=
nullptr && this->
useCuda() == useCuda)
86 #if ALICEVISION_IS_DEFINED(ALICEVISION_HAVE_POPSIFT)
89 _imageDescriberImpl.release();
95 _imageDescriberImpl.release();
103 void setCudaPipe(
int pipe)
override { _imageDescriberImpl->setCudaPipe(pipe); }
111 _params.setPreset(preset);
112 _imageDescriberImpl->setConfigurationPreset(preset);
124 std::unique_ptr<Regions>& regions,
127 return _imageDescriberImpl->describe(image, regions, mask);
140 return _imageDescriberImpl->describe(image, regions, mask);
147 void allocate(std::unique_ptr<Regions>& regions)
const override { _imageDescriberImpl->allocate(regions); }
153 std::unique_ptr<ImageDescriber> _imageDescriberImpl =
nullptr;
154 bool _isOriented =
true;
bool useCuda() const override
Check if the image describer use CUDA.
Definition: ImageDescriber_SIFT.hpp:45
Create an ImageDescriber interface for PopSIFT SIFT feature extractor.
Definition: ImageDescriber_SIFT_popSIFT.hpp:26
EImageDescriberType getDescriberType() const override
Get the corresponding EImageDescriberType.
Definition: ImageDescriber_SIFT.hpp:57
bool describe(const image::Image< float > &image, std::unique_ptr< Regions > ®ions, const image::Image< unsigned char > *mask=nullptr) override
Detect regions on the float image and compute their attributes (description)
Definition: ImageDescriber_SIFT.hpp:138
void setUpRight(bool upRight) override
Set image describer always upRight.
Definition: ImageDescriber_SIFT.hpp:75
void allocate(std::unique_ptr< Regions > ®ions) const override
Allocate Regions type depending of the ImageDescriber.
Definition: ImageDescriber_SIFT.hpp:147
bool useFloatImage() const override
Check if the image describer use float image.
Definition: ImageDescriber_SIFT.hpp:51
Definition: checkerDetector.cpp:32
A pure virtual class for image description computation.
Definition: ImageDescriber.hpp:159
SIFT Image Describer class use :
Definition: ImageDescriber_SIFT.hpp:27
void setUseCuda(bool useCuda) override
Set if yes or no imageDescriber need to use cuda implementation.
Definition: ImageDescriber_SIFT.hpp:81
void setCudaPipe(int pipe) override
set the CUDA pipe
Definition: ImageDescriber_SIFT.hpp:103
Create an ImageDescriber interface for VLFeat SIFT feature extractor.
Definition: ImageDescriber_SIFT_vlfeat.hpp:29
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_SIFT.hpp:123
void setConfigurationPreset(ConfigurationPreset preset) override
Use a preset to control the number of detected regions.
Definition: ImageDescriber_SIFT.hpp:109
Definition: ImageDescriber.hpp:118
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_SIFT.hpp:66