42 switch( mat.
depth() ) {
51 mData =
reinterpret_cast<const uint8_t*
>( mat.
data );
60 ((*this).*
func)( target,
row, data );
74 switch( mat->
depth() ) {
101 inline cv::Mat toOcv( ci::ImageSourceRef sourceRef,
int type = -1 )
110 type = CV_MAKETYPE( depth, channels );
115 sourceRef->load( target );
121 return cv::Mat( channel.getHeight(), channel.getWidth(), CV_MAKETYPE( CV_8U, 1 ), channel.getData(), channel.getRowBytes() );
126 return cv::Mat( channel.getHeight(), channel.getWidth(), CV_MAKETYPE( CV_32F, 1 ), channel.getData(), channel.getRowBytes() );
131 return cv::Mat( surface.getHeight(), surface.getWidth(), CV_MAKETYPE( CV_8U, surface.hasAlpha()?4:3), surface.getData(), surface.getRowBytes() );
136 return cv::Mat( surface.getHeight(), surface.getWidth(), CV_MAKETYPE( CV_32F, surface.hasAlpha()?4:3), surface.getData(), surface.getRowBytes() );
146 return CV_RGB( color.r * 255, color.g * 255, color.b * 255 );
151 return Vec2f( point.
x, point.
y );
161 return Vec2i( point.
x, point.
y );
169 inline cv::Rect toOcv(
const ci::Area &
r )
171 return cv::Rect( r.x1, r.y1, r.getWidth(), r.getHeight() );
174 inline ci::Area fromOcv(
const cv::Rect &r )
GLdouble GLdouble GLdouble r
Point2i Point
Definition: core.hpp:893
int rows
the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions ...
Definition: core.hpp:1962
static int8_t channelOrderNumChannels(ChannelOrder channelOrder)
int channels() const
returns element type, similar to CV_MAT_CN(cvmat->type)
Definition: mat.hpp:401
const uint8_t * mData
Definition: CinderOpenCV.h:65
uchar * data
pointer to the data
Definition: core.hpp:1964
CvCmpFunc func
Definition: core_c.h:1072
virtual bool hasAlpha() const
Definition: CinderOpenCV.h:14
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: core_c.h:403
_Tp x
Definition: core.hpp:766
void setChannelOrder(ChannelOrder aChannelOrder)
cv::Mat * mMat
Definition: CinderOpenCV.h:20
int depth() const
returns element type, similar to CV_MAT_DEPTH(cvmat->type)
Definition: mat.hpp:400
int32_t mRowBytes
Definition: CinderOpenCV.h:66
_Tp height
Definition: core.hpp:883
double CvStereoLineCoeff CvPoint3D64f * point
Definition: legacy.hpp:558
std::shared_ptr< class ImageTarget > ImageTargetRef
const CvArr const CvArr CvArr * result
Definition: core_c.h:805
Definition: CinderOpenCV.h:23
int cols
Definition: core.hpp:1962
ChannelT< float > Channel32f
RowFunc setupRowFunc(ImageTargetRef target)
GLenum GLenum GLvoid * row
void setDataType(DataType aDataType)
CvArr const CvMat * mat
Definition: core_c.h:700
_Tp y
Definition: core.hpp:883
_Tp x
Definition: core.hpp:883
void load(ImageTargetRef target)
Definition: CinderOpenCV.h:54
The n-dimensional matrix class.
Definition: core.hpp:1688
GLuint GLuint GLsizei GLenum type
Definition: core_c.h:114
int int type
Definition: core_c.h:109
void(ImageSource::* RowFunc)(ImageTargetRef, int32_t, const void *)
int int channels
Definition: core_c.h:73
ImageSourceCvMat(const cv::Mat &mat)
Definition: CinderOpenCV.h:25
SurfaceT< uint8_t > Surface8u
void setColorModel(ColorModel colorModel)
_Tp y
Definition: core.hpp:766
ImageTargetCvMat(cv::Mat *mat)
Definition: CinderOpenCV.h:71
std::shared_ptr< class ImageSource > ImageSourceRef
GLint GLint GLsizei GLsizei GLsizei depth
Definition: core_c.h:76
Point_< float > Point2f
Definition: core.hpp:898
Definition: CinderOpenCV.h:10
static std::shared_ptr< ImageTargetCvMat > createRef(cv::Mat *mat)
Definition: CinderOpenCV.h:12
SurfaceT< float > Surface32f
virtual void * getRowPointer(int32_t row)
Definition: CinderOpenCV.h:15
MStep step
Definition: core.hpp:2007
ChannelT< uint8_t > Channel8u
Rect_< int > Rect
Definition: core.hpp:897
_Tp width
Definition: core.hpp:883
GLuint color
Definition: core_c.h:1276