File exist check code

bool fileExists(const char* path)
  FILE* file;
  bool exists;

  file = fileOpen(path, "r");
  exists = file != 0;

  if (file)

  return exists;

FILE* fileOpen(const char* path, const char* mode)
  char path_[PATH_MAX];


  resolvePath(path_, sizeof(path_), path);

  FILE* fp;
  fopen_s(&fp, path_, mode);
  return fp;


Popular posts from this blog

OpenCV Stitching example (Stitcher class, Panorama)

(OpenCV Study) Background subtractor MOG, MOG2, GMG example source code (BackgroundSubtractorMOG, BackgroundSubtractorMOG2, BackgroundSubtractorGMG)

Example source code of extract HOG feature from images, save descriptor values to xml file, using opencv (using HOGDescriptor )

Real-time N camera stitching Class.

8 point algorithm (Matlab source code) / The method to get the Fundamental Matrix and the Essential matrix

Optical Flow sample source code using OpenCV

Video Stabilization example source code, (using cvFindHomography, cvWarpPerspective functions in openCV)

(OpenCV Study) calcOpticalFlowFarneback example source code ( dense optical flow )

yuv422(YUYV) to RGB and RGB to yuv422(YUYV), (Using OpenCV and TBB)

(C, C++) TinyXML , xml read & write