|
enum class | Type {
UnsignedInteger8
, Integer8
, UnsignedInteger16
, Integer16
,
UnsignedInteger32
, Integer32
, Float32
, Float64
} |
|
enum class | ColorSpace { Unknown
, RGB
, BGR
} |
|
|
| Image (quint64 _width, quint64 _height, quint64 _channels, Type _type) |
|
| Image (quint64 _width, quint64 _height, ColorSpace _colorSpace, Type _type) |
|
| Image (const Image &_rhs) |
|
Image & | operator= (const Image &_rhs) |
|
QByteArray | toArray () const |
|
quint8 * | dataPtr () |
|
const quint8 * | dataPtr () const |
|
quint64 | width () const |
|
quint64 | height () const |
|
quint64 | channels () const |
|
Type | type () const |
|
Image | convert (Type _type) const |
|
quint64 | pixelSize () const |
|
quint64 | size () const |
|
ColorSpace | colorSpace () const |
|
QString | encoding () const |
|
bool | operator== (const Image &_rhs) const |
|
cres_qresult< QByteArray > | compress (const QString &_compression, const QHash< QString, QVariant > &_options) const |
|
|
static quint64 | scalarSize (Type _type) |
|
static cres_qresult< Image > | createImage (quint64 _width, quint64 _height, const QString &_encoding) |
|
static cres_qresult< Image > | fromRawData (const QByteArray &_data, quint64 _width, quint64 _height, quint64 _channels, Type _type) |
|
static cres_qresult< Image > | fromRawData (const QByteArray &_data, quint64 _width, quint64 _height, ColorSpace _colorSpace, Type _type) |
|
static cres_qresult< Image > | fromRawData (const QByteArray &_data, quint64 _width, quint64 _height, const QString &_encoding) |
|
static cres_qresult< Image > | fromCompressedData (const QByteArray &_data, const QString &_compression) |
|
◆ colorSpace()
Image::ColorSpace Image::colorSpace |
( |
| ) |
const |
- Returns
- the color space of this image.
◆ compress()
cres_qresult< QByteArray > Image::compress |
( |
const QString & | _compression, |
|
|
const QHash< QString, QVariant > & | _options ) const |
Compress the image with the compression algorithm (_compression
) and the given options.
Currently only "jpeg" is supported with "quality" options (default to 95).
◆ createImage()
cres_qresult< Image > Image::createImage |
( |
quint64 | _width, |
|
|
quint64 | _height, |
|
|
const QString & | _encoding ) |
|
static |
Create an image with the given encoding
◆ encoding()
QString Image::encoding |
( |
| ) |
const |
- Returns
- a string that represent the encoding of an image. It follows OpenCV/ROS convention.
◆ fromCompressedData()
cres_qresult< Image > Image::fromCompressedData |
( |
const QByteArray & | _data, |
|
|
const QString & | _compression ) |
|
static |
Uncompress an image from _data
. Using the specified _compression
method.
◆ fromRawData() [1/3]
cres_qresult< Image > Image::fromRawData |
( |
const QByteArray & | _data, |
|
|
quint64 | _width, |
|
|
quint64 | _height, |
|
|
ColorSpace | _colorSpace, |
|
|
Type | _type ) |
|
static |
Attempt to create an image from a colorspace and channel type.
◆ fromRawData() [2/3]
cres_qresult< Image > Image::fromRawData |
( |
const QByteArray & | _data, |
|
|
quint64 | _width, |
|
|
quint64 | _height, |
|
|
const QString & | _encoding ) |
|
static |
Attempt to create an image from a byte array and encoding.
◆ fromRawData() [3/3]
cres_qresult< Image > Image::fromRawData |
( |
const QByteArray & | _data, |
|
|
quint64 | _width, |
|
|
quint64 | _height, |
|
|
quint64 | _channels, |
|
|
Type | _type ) |
|
static |
Attempt to create an image from a number of channels and channel type.
◆ size()
quint64 Image::size |
( |
| ) |
const |
- Returns
- the size of the image in bytes.
The documentation for this class was generated from the following files:
- knowl/src/knowCore/Image.h
- knowl/src/knowCore/Image.cpp