Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
Update Main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
brian8544 committed Jun 8, 2023
1 parent 0ef29f1 commit 211919e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Main.cpp
@@ -1,6 +1,7 @@
#include <iostream>
#include <filesystem>
#include <fstream>
#include <ctime>

// OpenCV 4
#include <opencv2/objdetect.hpp>
Expand All @@ -10,6 +11,19 @@
std::string CASCADE_FILE_MAIN;
std::string IMAGE_DIR;

// Function to print the current time
// Function to print the current time inline with std::cout
void printCurrentTime()
{
time_t now = time(0);
struct tm timeInfo;
localtime_s(&timeInfo, &now);
char buffer[80];
strftime(buffer, sizeof(buffer), "[%d/%m/%Y %H:%M]", &timeInfo);
std::cout << buffer << " ";
}


// Function to check if a file has a valid image extension
bool hasValidImageExtension(const std::filesystem::path& path) {
std::string extension = path.extension().string();
Expand Down

0 comments on commit 211919e

Please sign in to comment.