Returns specifed element of nD array
| 1999 | |
| 2000 | // Returns specifed element of nD array |
| 2001 | CV_IMPL CvScalar |
| 2002 | cvGetND( const CvArr* arr, const int* idx ) |
| 2003 | { |
| 2004 | CvScalar scalar = {{0,0,0,0}}; |
| 2005 | int type = 0; |
| 2006 | uchar* ptr; |
| 2007 | |
| 2008 | if( !CV_IS_SPARSE_MAT( arr )) |
| 2009 | ptr = cvPtrND( arr, idx, &type ); |
| 2010 | else |
| 2011 | ptr = icvGetNodePtr( (CvSparseMat*)arr, idx, &type, 0, 0 ); |
| 2012 | |
| 2013 | if( ptr ) |
| 2014 | cvRawDataToScalar( ptr, type, &scalar ); |
| 2015 | |
| 2016 | return scalar; |
| 2017 | } |
| 2018 | |
| 2019 | |
| 2020 | // Returns specifed element of n-D array given linear index |
nothing calls this directly
no test coverage detected