ReadFramework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rdf::Image Class Reference

Basic image class More...

#include <Image.h>

Static Public Member Functions

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...
 

Detailed Description

Basic image class

Member Function Documentation

bool rdf::Image::alphaChannelUsed ( const QImage &  img)
static

Checks if the alpha channel is used.

Parameters
imgThe QImage img.
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
imgThe source img.
nameThe 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
imgThe cv::Mat img.
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
imgThe src img.
nameThe 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
srcThe Mat to be printed.
varNameName 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
imgThe Qimage.
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
imgThe img to be saved.
savePathThe save path.
compressionThe 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
imgThe imgto be saved.
savePathThe save path.
compressionThe compression.
Returns
True if the image was saved.

The documentation for this class was generated from the following files: