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

Function getElemSize

deps/opencv/modules/core/src/persistence.cpp:5149–5162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5147{
5148
5149static void getElemSize( const string& fmt, size_t& elemSize, size_t& cn )
5150{
5151 const char* dt = fmt.c_str();
5152 cn = 1;
5153 if( cv_isdigit(dt[0]) )
5154 {
5155 cn = dt[0] - '0';
5156 dt++;
5157 }
5158 char c = dt[0];
5159 elemSize = cn*(c == 'u' || c == 'c' ? sizeof(uchar) : c == 'w' || c == 's' ? sizeof(ushort) :
5160 c == 'i' ? sizeof(int) : c == 'f' ? sizeof(float) : c == 'd' ? sizeof(double) :
5161 c == 'r' ? sizeof(void*) : (size_t)0);
5162}
5163
5164FileStorage::FileStorage()
5165{

Callers 7

writeRawMethod · 0.70
persistence.cppFile · 0.70
initMethod · 0.50
startMethod · 0.50
proceedMethod · 0.50
preprocess2DKernelFunction · 0.50
LaplacianMethod · 0.50

Calls 2

cv_isdigitFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected