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

Function cvGetRealND

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

Returns specifed element of nD array

Source from the content-addressed store, hash-verified

2125
2126// Returns specifed element of nD array
2127CV_IMPL double
2128cvGetRealND( const CvArr* arr, const int* idx )
2129{
2130 double value = 0;
2131 int type = 0;
2132 uchar* ptr;
2133
2134 if( !CV_IS_SPARSE_MAT( arr ))
2135 ptr = cvPtrND( arr, idx, &type );
2136 else
2137 ptr = icvGetNodePtr( (CvSparseMat*)arr, idx, &type, 0, 0 );
2138
2139 if( ptr )
2140 {
2141 if( CV_MAT_CN( type ) > 1 )
2142 CV_Error( CV_BadNumChannels, "cvGetReal* support only single-channel arrays" );
2143
2144 value = icvGetReal( ptr, type );
2145 }
2146
2147 return value;
2148}
2149
2150
2151// Assigns new value to specifed element of nD array given linear index

Callers

nothing calls this directly

Calls 3

cvPtrNDFunction · 0.85
icvGetNodePtrFunction · 0.85
icvGetRealFunction · 0.85

Tested by

no test coverage detected