IplImage * loadDepth( std::string a_name ) { std::ifstream l_file(a_name.c_str(),std::ofstream::in|std::ofstream::binary ); if( l_file.fail() == true ) { printf("cv_load_depth: could not open file for writing!\n"); return NULL; } int l_row; int l_col; l_file.read((char*)&l_row,sizeof(l_row)); l_file.read((char*)&l_col,sizeof(l_col)); IplImage * lp_image = cvCreateImage(cvSize(l_col,l_row),IPL_DEPTH_16U,1); for(int l_r=0;l_r