#include <iostream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <boost/process.hpp>
#include <filesystem>
#include "./include/rendering.h"
Go to the source code of this file.
◆ main()
Definition at line 11 of file main.cpp.
12{
13
14 auto process_cmd = boost::process::search_path("python3").string();
15
16
17 std::string process_name = (std::filesystem::current_path() /
18 "face_mesh_server.py").string();
19
20
21 int fork_id = fork();
22
23
24 int err;
25
26 if (fork_id == 0)
27 {
28
29 err = execlp(process_cmd.c_str(), process_cmd.c_str(), process_name.data(), NULL);
30 if (err == -1)
31 {
32 std::cout << "Could not execute python server" << std::endl;
33 }
34 }
35 else
36 {
37
38 sleep(1);
39
40
42
43 wait(NULL);
44 }
45}
This class performs the rendering of the scene. This has been included inside a class for better orga...