// Author: Ce Liu (c) Dec, 2009; celiu@mit.edu // Modified By: Deepak Pathak (c) 2016; pathak@berkeley.edu #pragma once #include "stdio.h" #include // if the files are compiled in linux or mac os then uncomment the following line, otherwise comment it if you compile using visual studio in windows #define _LINUX_MAC // #define _OPENCV template void _Release1DBuffer(T* pBuffer) { if(pBuffer!=NULL) delete []pBuffer; pBuffer=NULL; } template void _Rlease2DBuffer(T** pBuffer,size_t nElements) { for(size_t i=0;i T1 __min(T1 a, T2 b) { return (a>b)?b:a; } template T1 __max(T1 a, T2 b) { return (a