cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (default Debug)" FORCE)
endif()
project(Face recognition)
find_package(OpenCV REQUIRED)
find_package(ncnn REQUIRED)
include_directories(
${OpenCV_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
add_executable(main src/main.cpp src/TArcface.cpp src/TBlur.cpp TFace.cpp TLive.cpp TMtCNN.cpp TRetina.cpp TWarp.cpp )
target_link_libraries(main ncnn -fopenmp -ldl -lpthread -lvulkan ${OpenCV_LIBS})
Scanning dependencies of target main
[ 11%] Building CXX object CMakeFiles/main.dir/main.cpp.o
[ 22%] Building CXX object CMakeFiles/main.dir/TWarp.cpp.o
[ 33%] Building CXX object CMakeFiles/main.dir/TRetina.cpp.o
[ 44%] Building CXX object CMakeFiles/main.dir/TMtCNN.cpp.o
[ 55%] Building CXX object CMakeFiles/main.dir/TLive.cpp.o
[ 66%] Building CXX object CMakeFiles/main.dir/TBlur.cpp.o
[ 77%] Building CXX object CMakeFiles/main.dir/TArcface.cpp.o
[ 88%] Building CXX object CMakeFiles/main.dir/TFace.cpp.o
In file included from /home/admin/Face-Recognition-Cmake/TFace.cpp:1:0:
/home/admin/Face-Recognition-Cmake/TFace.h:12:47: error: expected ‘;’ at end of member declaration
void Process(std::vector<FaceObject> Faces)
^
/home/admin/Face-Recognition-Cmake/TFace.cpp: In member function ‘void TFace::Process(std::vector<FaceObject>)’:
/home/admin/Face-Recognition-Cmake/TFace.cpp:18:36: error: ‘class cv::Rect_<float>’ has no member named ‘x1’; did you mean ‘x’?
float x_ = Faces[i].rect.x1;
^~
x
/home/admin/Face-Recognition-Cmake/TFace.cpp:19:36: error: ‘class cv::Rect_<float>’ has no member named ‘y1’; did you mean ‘y’?
float y_ = Faces[i].rect.y1;
^~
y
/home/admin/Face-Recognition-Cmake/TFace.cpp:20:22: error: ‘faceInfo’ was not declared in this scope
float x2_ = faceInfo[i].x2;
^~~~~~~~
/home/admin/Face-Recognition-Cmake/TFace.cpp:20:22: note: suggested alternative: ‘fileno’
float x2_ = faceInfo[i].x2;
^~~~~~~~
fileno
/home/admin/Face-Recognition-Cmake/TFace.cpp:26:30: error: variable ‘TFace::Process(std::vector<FaceObject>)::TLiveFaceBox live_box’ has initializer but incomplete type
struct TLiveFaceBox live_box={x_,y_,x2_,y2_} ;
^~~~~~~~
/home/admin/Face-Recognition-Cmake/TFace.cpp:28:13: error: ‘rectangle’ is not a member of ‘cv’
cv::rectangle(result_cnn, Point(x*ratio_x, y*ratio_y), Point(x2*ratio_x,y2*ratio_y), cv::Scalar(0, 0, 255), 2);
^~~~~~~~~
/home/admin/Face-Recognition-Cmake/TFace.cpp:28:13: note: suggested alternative: ‘checkRange’
cv::rectangle(result_cnn, Point(x*ratio_x, y*ratio_y), Point(x2*ratio_x,y2*ratio_y), cv::Scalar(0, 0, 255), 2);
^~~~~~~~~
checkRange
/home/admin/Face-Recognition-Cmake/TFace.cpp:28:23: error: ‘result_cnn’ was not declared in this scope
cv::rectangle(result_cnn, Point(x*ratio_x, y*ratio_y), Point(x2*ratio_x,y2*ratio_y), cv::Scalar(0, 0, 255), 2);
^~~~~~~~~~
/home/admin/Face-Recognition-Cmake/TFace.cpp:28:43: error: ‘ratio_x’ was not declared in this scope
cv::rectangle(result_cnn, Point(x*ratio_x, y*ratio_y), Point(x2*ratio_x,y2*ratio_y), cv::Scalar(0, 0, 255), 2);
^~~~~~~