redist/minimal_opencv.h
static inline double cvmGet(const CvMat *mat, int row, int col) {
	int type;

	type = CV_MAT_TYPE(mat->type);
	assert((unsigned)row < (unsigned)mat->rows && (unsigned)col < (unsigned)mat->cols);

	if (type == CV_32FC1)
		return ((float *)(void *)(mat->data.ptr + (size_t)mat->step * row))[col];
	else {
		assert(type == CV_64FC1);
		return ((double *)(void *)(mat->data.ptr + (size_t)mat->step * row))[col];
	}
}
/*
The function is a fast replacement for cvGetReal2D in the case of single-channel floating-point
matrices. It is faster because it is inline, it does fewer checks for array type and array element
type, and it checks for the row and column ranges only in debug mode.
@param mat Input matrix
@param row The zero-based index of row
@param col The zero-based index of column
 */
The function is a fast replacement for cvGetReal2D in the case of single-channel floating-point
matrices. It is faster because it is inline, it does fewer checks for array type and array element
type, and it checks for the row and column ranges only in debug mode.
The function is a fast replacement for cvGetReal2D in the case of single - channel floating - point matrices . It is faster because it is inline it does fewer checks for array type and array element type and it checks for the row and column ranges only in debug mode .
static inline double cvmGet(const CvMat *mat, int row, int col) {
	int type;
	type = CV_MAT_TYPE(mat->type);
	assert((unsigned)row < (unsigned)mat->rows && (unsigned)col < (unsigned)mat->cols);
	if (type == CV_32FC1)
		return ((float *)(void *)(mat->data.ptr + (size_t)mat->step * row))[col];
	else {
		assert(type == CV_64FC1);
		return ((double *)(void *)(mat->data.ptr + (size_t)mat->step * row))[col];
	}
}
static inline double cvmGet ( const CvMat * mat , int row , int col ) { int type ; type = CV_MAT_TYPE ( mat -> type ) ; assert ( ( unsigned ) row < ( unsigned ) mat -> rows && ( unsigned ) col < ( unsigned ) mat -> cols ) ; if ( type == CV_32FC1 ) return ( ( float * ) ( void * ) ( mat -> data . ptr + ( size_t ) mat -> step * row ) ) [ col ] ; else { assert ( type == CV_64FC1 ) ; return ( ( double * ) ( void * ) ( mat -> data . ptr + ( size_t ) mat -> step * row ) ) [ col ] ; } }
The function is a fast replacement for cvGetReal2D in the case of single-channel floating-point
matrices.
The function is a fast replacement for cvGetReal2D in the case of single - channel floating - point matrices .