Basic image class
More...
#include <Image.h>
|
static cv::Mat | qImage2Mat (const QImage &img) |
| Converts a QImage to a cv::Mat. More...
|
|
static QImage | mat2QImage (const cv::Mat &img) |
| Converts a cv::Mat to QImage. More...
|
|
static cv::Mat | qPixmap2Mat (const QPixmap &img) |
|
static QPixmap | mat2QPixmap (const cv::Mat &img) |
|
static cv::Mat | qVector2Mat (const QVector< float > &data) |
|
static bool | save (const QImage &img, const QString &savePath, int compression=-1) |
| Saves the specified QImage img. More...
|
|
static bool | save (const cv::Mat &img, const QString &savePath, int compression=-1) |
| Saves the specified cv::Mat img. More...
|
|
static bool | alphaChannelUsed (const QImage &img) |
| Checks if the alpha channel is used. More...
|
|
static void | imageInfo (const cv::Mat &img, const QString name) |
| Prints the basic image information. More...
|
|
static QString | printImage (const cv::Mat &img, const QString name) |
| Prints the image as a string formatted according Matlab. More...
|
|
static QJsonObject | matToJson (const cv::Mat &img, bool compress=true) |
|
static cv::Mat | jsonToMat (const QJsonObject &jo) |
|
template<typename numFmt > |
static QString | printMat (const cv::Mat &src, const QString varName) |
| Prints the values of a cv::Mat to copy it to Matlab. More...
|
|
bool rdf::Image::alphaChannelUsed |
( |
const QImage & |
img | ) |
|
|
static |
Checks if the alpha channel is used.
- Parameters
-
- Returns
- True if the alpha channel is used.
void rdf::Image::imageInfo |
( |
const cv::Mat & |
img, |
|
|
const QString |
name |
|
) |
| |
|
static |
Prints the basic image information.
- Parameters
-
img | The source img. |
name | The name that should be displayed in the command line. |
cv::Mat rdf::Image::jsonToMat |
( |
const QJsonObject & |
jo | ) |
|
|
static |
QImage rdf::Image::mat2QImage |
( |
const cv::Mat & |
img | ) |
|
|
static |
Converts a cv::Mat to QImage.
- Parameters
-
- Returns
- The converted QImage.
QPixmap rdf::Image::mat2QPixmap |
( |
const cv::Mat & |
img | ) |
|
|
static |
QJsonObject rdf::Image::matToJson |
( |
const cv::Mat & |
img, |
|
|
bool |
compress = true |
|
) |
| |
|
static |
QString rdf::Image::printImage |
( |
const cv::Mat & |
img, |
|
|
const QString |
name |
|
) |
| |
|
static |
Prints the image as a string formatted according Matlab.
- Parameters
-
img | The src img. |
name | The variable name in Matlab. |
- Returns
- A string containing the values of the image
template<typename numFmt >
static QString rdf::Image::printMat |
( |
const cv::Mat & |
src, |
|
|
const QString |
varName |
|
) |
| |
|
inlinestatic |
Prints the values of a cv::Mat to copy it to Matlab.
- Parameters
-
src | The Mat to be printed. |
varName | Name of the variable for matlab. |
- Returns
- The String with all values formatted for matlab.
cv::Mat rdf::Image::qImage2Mat |
( |
const QImage & |
img | ) |
|
|
static |
Converts a QImage to a cv::Mat.
- Parameters
-
- Returns
- The cv__Mat image.
cv::Mat rdf::Image::qPixmap2Mat |
( |
const QPixmap & |
img | ) |
|
|
static |
cv::Mat rdf::Image::qVector2Mat |
( |
const QVector< float > & |
data | ) |
|
|
static |
bool rdf::Image::save |
( |
const QImage & |
img, |
|
|
const QString & |
savePath, |
|
|
int |
compression = -1 |
|
) |
| |
|
static |
Saves the specified QImage img.
- Parameters
-
img | The img to be saved. |
savePath | The save path. |
compression | The compression. |
- Returns
- True if the image was saved.
bool rdf::Image::save |
( |
const cv::Mat & |
img, |
|
|
const QString & |
savePath, |
|
|
int |
compression = -1 |
|
) |
| |
|
static |
Saves the specified cv::Mat img.
- Parameters
-
img | The imgto be saved. |
savePath | The save path. |
compression | The compression. |
- Returns
- True if the image was saved.
The documentation for this class was generated from the following files: