AliceVision
Photogrammetric Computer Vision Framework
ImageDescriber_Roma.hpp
1 // This file is part of the AliceVision project.
2 // Copyright (c) 2026 AliceVision contributors.
3 // This Source Code Form is subject to the terms of the Mozilla Public License,
4 // v. 2.0. If a copy of the MPL was not distributed with this file,
5 // You can obtain one at https://mozilla.org/MPL/2.0/.
6 
7 #pragma once
8 
9 #include <aliceVision/feature/imageDescriberCommon.hpp>
10 #include <aliceVision/feature/ImageDescriber.hpp>
11 #include <aliceVision/feature/regionsFactory.hpp>
12 #include <aliceVision/types.hpp>
13 
14 #include <iostream>
15 
16 namespace aliceVision {
17 namespace feature {
18 
29 {
30  public:
31  ImageDescriber_Roma() = default;
32 
33  ~ImageDescriber_Roma() override = default;
34 
39  bool useCuda() const override { return false; }
40 
45  bool useFloatImage() const override { return false; }
46 
51  EImageDescriberType getDescriberType() const override { return EImageDescriberType::ROMA; }
52 
60  std::size_t getMemoryConsumption(std::size_t width, std::size_t height) const override
61  {
62  return 3 * width * height * sizeof(unsigned char);
63  }
64 
69  void setConfigurationPreset(ConfigurationPreset preset) override;
70 
82  bool describe(const image::Image<unsigned char>& image,
83  std::unique_ptr<Regions>& regions,
84  const image::Image<unsigned char>* mask = nullptr) override;
85 
90  void allocate(std::unique_ptr<Regions>& regions) const override;
91 };
92 
93 } // namespace feature
94 } // namespace aliceVision
aliceVision::feature::ImageDescriber_Roma::getDescriberType
EImageDescriberType getDescriberType() const override
Get the corresponding EImageDescriberType.
Definition: ImageDescriber_Roma.hpp:51
aliceVision::feature::ImageDescriber_Roma::useFloatImage
bool useFloatImage() const override
Check if the image describer uses a float image.
Definition: ImageDescriber_Roma.hpp:45
aliceVision
Definition: checkerDetector.cpp:32
aliceVision::feature::ImageDescriber
A pure virtual class for image description computation.
Definition: ImageDescriber.hpp:159
aliceVision::feature::ImageDescriber_Roma::allocate
void allocate(std::unique_ptr< Regions > &regions) const override
Allocate Regions type for Roma.
Definition: ImageDescriber_Roma.cpp:16
aliceVision::feature::ImageDescriber_Roma::describe
bool describe(const image::Image< unsigned char > &image, std::unique_ptr< Regions > &regions, const image::Image< unsigned char > *mask=nullptr) override
Detect regions on the 8-bit image and compute their attributes.
Definition: ImageDescriber_Roma.cpp:18
aliceVision::image::Image< unsigned char >
aliceVision::feature::ImageDescriber_Roma::useCuda
bool useCuda() const override
Check if the image describer uses CUDA.
Definition: ImageDescriber_Roma.hpp:39
aliceVision::feature::ImageDescriber_Roma::getMemoryConsumption
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_Roma.hpp:60
aliceVision::feature::ImageDescriber_Roma::setConfigurationPreset
void setConfigurationPreset(ConfigurationPreset preset) override
Use a preset to control the number of detected regions.
Definition: ImageDescriber_Roma.cpp:14
aliceVision::feature::ImageDescriber_Roma
Create an ImageDescriber interface for Roma deep dense feature extractor.
Definition: ImageDescriber_Roma.hpp:28
aliceVision::feature::ConfigurationPreset
Definition: ImageDescriber.hpp:118