MCPcopy Create free account
hub / github.com/creatale/node-dv / cvGetND

Function cvGetND

deps/opencv/modules/core/src/array.cpp:2001–2017  ·  view source on GitHub ↗

Returns specifed element of nD array

Source from the content-addressed store, hash-verified

1999
2000// Returns specifed element of nD array
2001CV_IMPL CvScalar
2002cvGetND( 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

Callers

nothing calls this directly

Calls 3

cvPtrNDFunction · 0.85
icvGetNodePtrFunction · 0.85
cvRawDataToScalarFunction · 0.85

Tested by

no test coverage detected