CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
utils.cpp File Reference
#include "utils.h"
#include "logging.h"
#include <iostream>
#include <filesystem>
#include <regex>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <opencv2/opencv.hpp>
#include <matio.h>
#include <nlohmann/json.hpp>
#include <string>
#include <string_view>
#include <algorithm>

Go to the source code of this file.

Functions

static bool ensure_dir (const std::string &path)
 
static std::string find_video_file (const std::string &video_dir, const std::string &subject, const std::string &material, const std::string &trialname, int cam_id)
 
std::string padNumberWithZeros (int num, int n)
 

Variables

static const std::vector< std::pair< int, int > > kLegacyCameraPairs = {{1, 2}, {4, 3}}
 
static std::vector< std::pair< int, int > > g_camera_pairs = kLegacyCameraPairs
 

Function Documentation

◆ ensure_dir()

static bool ensure_dir ( const std::string &  path)
static

Definition at line 274 of file utils.cpp.

◆ find_video_file()

static std::string find_video_file ( const std::string &  video_dir,
const std::string &  subject,
const std::string &  material,
const std::string &  trialname,
int  cam_id 
)
static

Definition at line 307 of file utils.cpp.

◆ padNumberWithZeros()

std::string padNumberWithZeros ( int  num,
int  n 
)

Definition at line 343 of file utils.cpp.

Variable Documentation

◆ g_camera_pairs

std::vector<std::pair<int, int> > g_camera_pairs = kLegacyCameraPairs
static

Definition at line 244 of file utils.cpp.

◆ kLegacyCameraPairs

const std::vector<std::pair<int, int> > kLegacyCameraPairs = {{1, 2}, {4, 3}}
static

Definition at line 243 of file utils.cpp.