//////////////////////////////////////////////////////////////////// // Types.cpp // // Copyright 2007 cDc@seacave // Distributed under the Boost Software License, Version 1.0 // (See http://www.boost.org/LICENSE_1_0.txt) #include "Common.h" #include "Types.h" // D E F I N E S /////////////////////////////////////////////////// // S T R U C T S /////////////////////////////////////////////////// // G L O B A L S /////////////////////////////////////////////////// #ifndef _MSC_VER int _vscprintf(LPCSTR format, va_list pargs) { va_list argcopy; va_copy(argcopy, pargs); const int retval(vsnprintf(NULL, 0, format, argcopy)); va_end(argcopy); return retval; } #endif /*----------------------------------------------------------------*/ namespace SEACAVE { const ColorType::value_type ColorType::ONE(255); const ColorType::alt_type ColorType::ALTONE(1.f); const ColorType::value_type ColorType::ONE(255); const ColorType::alt_type ColorType::ALTONE(1.f); const ColorType::value_type ColorType::ONE(1.f); const ColorType::alt_type ColorType::ALTONE(255); const ColorType::value_type ColorType::ONE(1.0); const ColorType::alt_type ColorType::ALTONE(255); /*----------------------------------------------------------------*/ // print matrix template String cvMat2String(const TYPE* M, uint32_t rows, uint32_t cols, uint32_t step, LPCSTR format) { String str; char buf[32]; if (step == 0) step = rows; for (uint32_t i=0; i(), (uint32_t)M.rows, (uint32_t)M.cols, (uint32_t)M.step1(), format); case CV_64F: return cvMat2String(M.ptr(), (uint32_t)M.rows, (uint32_t)M.cols, (uint32_t)M.step1(), format); } return String(); } /*----------------------------------------------------------------*/ } // namespace SEACAVE // C L A S S //////////////////////////////////////////////////////