The Resolution class encapsulates an image resolution (width and height). It provides functionality for parsing from a string, converting from and to different Qt and OpenCV formats and for resizing images to the specified resolution.
More...
#include <resolution.h>
|
|
| Resolution () |
| | Default constructor initializing width and height to zero. This resolution is not valid, but can i.e. be initialized from a string!
|
| |
| | Resolution (uint width, uint height) |
| | Constructs a Resolution object with specified width and height.
|
| |
| | Resolution (const cv::Size &size) |
| | Constructs a Resolution object from an OpenCV Size object.
|
| |
| | Resolution (const QSize &size) |
| | Constructs a Resolution object from a QSize object.
|
| |
| | Resolution (const QPoint &size) |
| | Constructs a Resolution object from a QPoint object.
|
| |
| | Resolution (const cv::Mat &img) |
| | Constructs a Resolution object from an OpenCV Mat object.
|
| |
| bool | isValid () const |
| | Checks whether the resolution is valid (i.e., width and height are greater than zero).
|
| |
| bool | operator== (const Resolution &other) const |
| | Equality operator to compare two Resolution objects.
|
| |
| void | resize (const cv::Mat &src, cv::Mat &dest) const |
| | Resizes an OpenCV Mat image to the resolution defined in this object.
|
| |
| void | resize (cv::Mat &img) const |
| | Resizes an OpenCV Mat image in-place.
|
| |
| bool | fromString (const QString &resolution) |
| | Parses resolution from a string format.
|
| |
The Resolution class encapsulates an image resolution (width and height). It provides functionality for parsing from a string, converting from and to different Qt and OpenCV formats and for resizing images to the specified resolution.
- Author
- Dominik Wüst
- Date
- March 2025
◆ Resolution() [1/5]
| Resolution::Resolution |
( |
uint |
width, |
|
|
uint |
height |
|
) |
| |
|
inline |
Constructs a Resolution object with specified width and height.
- Parameters
-
| width | The width of the resolution. |
| height | The height of the resolution. |
◆ Resolution() [2/5]
| Resolution::Resolution |
( |
const cv::Size & |
size | ) |
|
|
inline |
Constructs a Resolution object from an OpenCV Size object.
- Parameters
-
| size | OpenCV Size containing width and height. |
◆ Resolution() [3/5]
| Resolution::Resolution |
( |
const QSize & |
size | ) |
|
|
inline |
Constructs a Resolution object from a QSize object.
- Parameters
-
| size | QSize containing width and height. |
◆ Resolution() [4/5]
| Resolution::Resolution |
( |
const QPoint & |
size | ) |
|
|
inline |
Constructs a Resolution object from a QPoint object.
- Parameters
-
| size | QPoint where x represents width and y represents height. |
◆ Resolution() [5/5]
| Resolution::Resolution |
( |
const cv::Mat & |
img | ) |
|
|
inline |
Constructs a Resolution object from an OpenCV Mat object.
- Parameters
-
| img | OpenCV Mat where width and height are extracted from its dimensions. |
◆ fromString()
| bool Resolution::fromString |
( |
const QString & |
resolution | ) |
|
Parses resolution from a string format.
- Parameters
-
| resolution | The string containing the resolution. |
- Returns
- True if parsing was successful, false otherwise.
◆ isValid()
| bool Resolution::isValid |
( |
| ) |
const |
|
inline |
Checks whether the resolution is valid (i.e., width and height are greater than zero).
- Returns
- True if valid, false otherwise.
◆ operator==()
| bool Resolution::operator== |
( |
const Resolution & |
other | ) |
const |
|
inline |
Equality operator to compare two Resolution objects.
- Parameters
-
- Returns
- True if both resolutions have the same width and height, false otherwise.
◆ resize() [1/2]
| void Resolution::resize |
( |
const cv::Mat & |
src, |
|
|
cv::Mat & |
dest |
|
) |
| const |
|
inline |
Resizes an OpenCV Mat image to the resolution defined in this object.
- Parameters
-
| src | Input image. |
| dest | Output image (resized). |
◆ resize() [2/2]
| void Resolution::resize |
( |
cv::Mat & |
img | ) |
const |
|
inline |
Resizes an OpenCV Mat image in-place.
- Parameters
-
The documentation for this class was generated from the following files:
- iVS3D/src/iVS3D-core/model/reader/resolution.h
- iVS3D/src/iVS3D-core/model/reader/resolution.cpp