MIRA
|
specialized typed image with 1 channel This template class provides convenient way to create an image with known type and only 1 channel by using Img<Type> More...
#include <image/Img.h>
Public Types | |
enum | { Channels = 1 } |
The static number of channels of this typed image class. More... | |
typedef T | Pixel |
typedef ImgIterator< T > | iterator |
typedef ImgConstIterator< T > | const_iterator |
Public Member Functions | |
Img () | |
Img (int width, int height) | |
constructs a new image of given size note: the image data is allocated but not initialized More... | |
Img (const Size2i &size) | |
constructs a new image of given size note: the image data is allocated but not initialized More... | |
Self & | operator= (const Pixel &p) |
assigns image with given Pixel assigns each pixel of the image to the given Pixel More... | |
T * | operator[] (int y) |
access to image row More... | |
const T * | operator[] (int y) const |
const access to image row More... | |
Img< T, 1 > | operator() (const cv::Rect &roi) |
returns a ROI out of the image Returns a new image with set ROI on the image data. More... | |
Img< T, 1 > | operator() (const cv::Rect &roi) const |
returns a ROI out of the image Returns a new image with set ROI on the image data. More... | |
T & | operator() (int x, int y) |
access pixel(x,y) More... | |
const T & | operator() (int x, int y) const |
const access pixel(x,y) More... | |
T & | operator() (const cv::Point &p) |
access to pixel given by point p More... | |
const T & | operator() (const cv::Point &p) const |
const access to pixel given by point p More... | |
iterator | begin () |
Returns an iterator to the beginning of this image (image region) More... | |
const_iterator | begin () const |
Returns an const iterator to the beginning of this image (image region) More... | |
iterator | end () |
Returns an iterator to the end of this image (image region) Note that the end iterator is NOT part of the image (image region) More... | |
const_iterator | end () const |
Returns an const iterator to the end of this image (image region) Note that the end iterator is NOT part of the image (image region) More... | |
void | reflect (BinarySerializer< Derived > &r) |
reflect method for binaryStream serialization This method uses the reflect method of the ImageBase class More... | |
void | reflect (BinaryDeserializer< Derived > &r) |
reflect method for binaryStream deserialization This method uses the reflect method of the ImageBase class and assures that the type of the deserialized image is correct. More... | |
void | reflect (JSONSerializer &r) |
reflect method for json serialization This method uses the reflect method of the ImageBase class More... | |
operator const cv::Mat & () const | |
cast operator to const cv::Mat More... | |
operator cv::Mat & () | |
cast operator to cv::Mat More... | |
void | assignROI (const cv::Rect &roi, const ImgBase &other) |
Copies the content of other into the specified region of interest (ROI) of THIS image. More... | |
void | assignMask (const cv::Rect &roi, const ImgBase &other, const cv::Mat &mask) |
Copies the content of other into the specified region of interest (ROI) of THIS image, where mask has non-zero values. More... | |
void | assignPolygon (const cv::Rect &roi, const ImgBase &other, const Polygon2i &poly) |
Copies the content of other into the specified region of interest (ROI) of THIS image, in area covered by polygon. More... | |
bool | operator== (const cv::Mat &other) const |
Returns true if two images are equal. More... | |
bool | operator!= (const cv::Mat &other) const |
Returns true if two images are different. More... | |
const cv::Mat & | getMat () const |
Returns const access to internal data. More... | |
bool | empty () const |
returns true if internal Mat is empty More... | |
int | width () const |
int | height () const |
std::size_t | step () const |
Number of bytes from one row to the next. More... | |
std::size_t | bytesPerLine () const |
Returns the number of bytes per image line. More... | |
Size2i | size () const |
Returns size of image data. More... | |
int | depth () const |
Returns the bit-depth of the image E.g. More... | |
int | channels () const |
Returns the number of channels of this image. More... | |
bool | isEmpty () const |
returns true if internal Mat is empty More... | |
uint8 * | data () |
Returns pointer to underlying image data. More... | |
const uint8 * | data () const |
Returns const pointer to underlying image data. More... | |
uint8 * | data (int y) |
Returns pointer to underlying image data starting at scanline y. More... | |
const uint8 * | data (int y) const |
Returns const pointer to underlying image data starting at scanline y. More... | |
ImgFormat | format () const |
Return the storage format description. More... | |
void | resize (const Size2i &s) |
Resizes the image to the specified dimensions (without changing its type, i.e. More... | |
void | resize (int width, int height) |
Same as above method. More... | |
void | clear () |
Sets each pixel and each channel to zero. More... | |
Img< T, 1 > | clone () const |
Deep copy of image data. More... | |
std::size_t | total () const |
Returns the total size of the matrix (rows*cols) More... | |
Static Public Member Functions | |
static Img< T, 1 > | convertFrom (const cv::Mat &other, bool alwaysCopy=false) |
Converts a typed image into another typed image If the channels and/or type of the new image and the source differ, the image is converted and copied using the cv::mixChannels and cvConvertScale functions. More... | |
Protected Types | |
typedef Img< T, 1 > | Self |
typedef ImgTypedBase< Self, Pixel > | Base |
Protected Member Functions | |
Img (const cv::Mat &data) | |
Img< T, 1 > * | This () |
const Img< T, 1 > * | This () const |
cv::Mat_< T > & | castToMat () |
operator for convenience access to image data as Mat More... | |
const cv::Mat_< T > & | castToMat () const |
operator for convenience const access to image data as Mat More... | |
Protected Attributes | |
cv::Mat | mData |
Friends | |
class | ImgBase< Self > |
class | ImgTypedBase< Self, Pixel > |
specialized typed image with 1 channel This template class provides convenient way to create an image with known type and only 1 channel by using Img<Type>
typedef T Pixel |
|
protected |
|
inherited |
|
inherited |
|
inline |
|
inline |
constructs a new image of given size note: the image data is allocated but not initialized
width | width of image |
height | height of image |
constructs a new image of given size note: the image data is allocated but not initialized
size | size of the image |
assigns image with given Pixel assigns each pixel of the image to the given Pixel
p | Pixel which is assigned to each pixel of the image |
|
inlinestaticinherited |
Converts a typed image into another typed image If the channels and/or type of the new image and the source differ, the image is converted and copied using the cv::mixChannels and cvConvertScale functions.
If the channels and type equals the image is only copied if alwaysCopy is true.
other | The image that should be converted |
alwaysCopy | If true the data is always copied even if channels and type match |
|
inlineinherited |
access to image row
y | row to access. starting with 0 at top of image |
|
inlineinherited |
const access to image row
y | row to access. starting with 0 at top of image |
|
inlineinherited |
returns a ROI out of the image Returns a new image with set ROI on the image data.
|
inlineinherited |
returns a ROI out of the image Returns a new image with set ROI on the image data.
|
inlineinherited |
access pixel(x,y)
|
inlineinherited |
const access pixel(x,y)
|
inlineinherited |
access to pixel given by point p
|
inlineinherited |
const access to pixel given by point p
|
inlineinherited |
Returns an iterator to the beginning of this image (image region)
|
inlineinherited |
Returns an const iterator to the beginning of this image (image region)
|
inlineinherited |
Returns an iterator to the end of this image (image region) Note that the end iterator is NOT part of the image (image region)
|
inlineinherited |
Returns an const iterator to the end of this image (image region) Note that the end iterator is NOT part of the image (image region)
|
inlineinherited |
reflect method for binaryStream serialization This method uses the reflect method of the ImageBase class
|
inlineinherited |
reflect method for binaryStream deserialization This method uses the reflect method of the ImageBase class and assures that the type of the deserialized image is correct.
Otherwise an exception is thrown
|
inlineinherited |
reflect method for json serialization This method uses the reflect method of the ImageBase class
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
operator for convenience access to image data as Mat
|
inlineprotectedinherited |
operator for convenience const access to image data as Mat
Copies the content of other into the specified region of interest (ROI) of THIS image.
Note, the number of rows and columns of "other" and "this" ROI must be equal.
|
inlineinherited |
Copies the content of other into the specified region of interest (ROI) of THIS image, where mask has non-zero values.
Note, the number of rows and columns of "other", "mask" and "this" ROI must be equal.
|
inlineinherited |
Copies the content of other into the specified region of interest (ROI) of THIS image, in area covered by polygon.
The result does not depend on cw/ccw order of polygon points. Note, the number of rows and columns of "other" and "this" ROI must be equal. Polygon points are relative to roi, any polygon points outside roi are ignored! (i.e.they must be >= 0, < roi width/height)!
|
inlineinherited |
Returns true if two images are equal.
this methods checks if two images are equal by comparing their dimensions, flags and pixel data (byte wise)
|
inlineinherited |
Returns true if two images are different.
See operator==
|
inlineinherited |
Returns const access to internal data.
|
inlineinherited |
returns true if internal Mat is empty
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Number of bytes from one row to the next.
|
inlineinherited |
Returns the number of bytes per image line.
|
inlineinherited |
Returns size of image data.
|
inlineinherited |
Returns the bit-depth of the image E.g.
CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F
|
inlineinherited |
Returns the number of channels of this image.
Note: typed images also have a static enum value 'Channels'
|
inlineinherited |
returns true if internal Mat is empty
|
inlineinherited |
Returns pointer to underlying image data.
|
inlineinherited |
Returns const pointer to underlying image data.
|
inlineinherited |
Returns pointer to underlying image data starting at scanline y.
|
inlineinherited |
Returns const pointer to underlying image data starting at scanline y.
|
inlineinherited |
Return the storage format description.
|
inlineinherited |
Resizes the image to the specified dimensions (without changing its type, i.e.
channels and bit depth remains constant). The method does nothing, if the specified dimensions equal the current size of the image.
|
inlineinherited |
Same as above method.
|
inlineinherited |
Sets each pixel and each channel to zero.
|
inlineinherited |
Deep copy of image data.
|
inlineinherited |
Returns the total size of the matrix (rows*cols)
|
friend |
|
protectedinherited |