|
| cv::Rect RTABMAP_CORE_EXPORT | rtabmap::util2d::computeRoi (const cv::Mat &image, const std::string &roiRatios) |
| | Computes a region of interest (ROI) in the image using string-defined ratios.
|
| |
| cv::Rect RTABMAP_CORE_EXPORT | rtabmap::util2d::computeRoi (const cv::Size &imageSize, const std::string &roiRatios) |
| | Computes a region of interest (ROI) from an image size and a string of ratios.
|
| |
| cv::Rect RTABMAP_CORE_EXPORT | rtabmap::util2d::computeRoi (const cv::Mat &image, const std::vector< float > &roiRatios) |
| | Computes a region of interest (ROI) in the image using float vector-defined ratios.
|
| |
| cv::Rect RTABMAP_CORE_EXPORT | rtabmap::util2d::computeRoi (const cv::Size &imageSize, const std::vector< float > &roiRatios) |
| | Computes a region of interest (ROI) using float ratios and the image size.
|
| |
Functions to compute the ROI in an image using ratio-based cropping.
◆ computeRoi() [1/4]
| cv::Rect RTABMAP_CORE_EXPORT rtabmap::util2d::computeRoi |
( |
const cv::Mat & |
image, |
|
|
const std::string & |
roiRatios |
|
) |
| |
Computes a region of interest (ROI) in the image using string-defined ratios.
- Parameters
-
| image | Input image. |
| roiRatios | A string of 4 space-separated float values representing the ROI ratios:
- left, right, top, bottom.
- Each ratio should be between 0 and 1.
- For example, "0.1 0.1 0.2 0.2" removes 10% from the left/right and 20% from the top/bottom.
|
- Returns
- A cv::Rect defining the ROI, or an empty rectangle if input is invalid.
◆ computeRoi() [2/4]
| cv::Rect RTABMAP_CORE_EXPORT rtabmap::util2d::computeRoi |
( |
const cv::Size & |
imageSize, |
|
|
const std::string & |
roiRatios |
|
) |
| |
Computes a region of interest (ROI) from an image size and a string of ratios.
- Parameters
-
| imageSize | The size of the image (width x height). |
| roiRatios | A string with 4 space-separated float values indicating cropping ratios:
- left, right, top, bottom.
|
- Returns
- The computed ROI rectangle.
◆ computeRoi() [3/4]
| cv::Rect RTABMAP_CORE_EXPORT rtabmap::util2d::computeRoi |
( |
const cv::Mat & |
image, |
|
|
const std::vector< float > & |
roiRatios |
|
) |
| |
Computes a region of interest (ROI) in the image using float vector-defined ratios.
- Parameters
-
| image | Input image. |
| roiRatios | A vector of 4 float values (left, right, top, bottom) representing the ROI.
- Each value should be between 0 and 1.
|
- Returns
- A cv::Rect defining the cropped region.
◆ computeRoi() [4/4]
| cv::Rect RTABMAP_CORE_EXPORT rtabmap::util2d::computeRoi |
( |
const cv::Size & |
imageSize, |
|
|
const std::vector< float > & |
roiRatios |
|
) |
| |
Computes a region of interest (ROI) using float ratios and the image size.
- Parameters
-
| imageSize | The size of the image (width x height). |
| roiRatios | A vector of 4 float values representing ratios for cropping:
- [left, right, top, bottom].
- Each must be in the range [0, 1), and valid (i.e., left + right < 1, top + bottom < 1).
|
- Returns
- The computed ROI rectangle.