Clean up directory structure

This commit is contained in:
Epicalert 2021-01-12 22:24:02 +08:00
parent 8b231720b5
commit 9b3362dd8b
No known key found for this signature in database
GPG key ID: CAA46F858D0979BD
9 changed files with 13 additions and 6 deletions

View file

@ -16,6 +16,13 @@ include_directories( ${GLEW_INCLUDE_DIRS} )
include_directories( ${GLM_INCLUDE_DIRS} )
include_directories( ${GLUT_INCLUDE_DIR} )
include_directories( ${PROJECT_SOURCE_DIR}/src )
file(
COPY
${PROJECT_SOURCE_DIR}/models
${PROJECT_SOURCE_DIR}/cvdata
DESTINATION
${PROJECT_BINARY_DIR} )
add_executable( fc2d src/main.cpp src/graphics.cpp src/modelpart.cpp src/cv.cpp )
target_link_libraries( fc2d ${OpenCV_LIBS} ${OPENGL_LIBRARIES} FreeGLUT::freeglut GLEW::glew )
set( CMAKE_BUILD_TYPE Debug )

View file

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -10,10 +10,10 @@ cv::Mat frame, gray, small;
void initCV() {
//TODO: switch to DNN face detection
faceDetector = cv::CascadeClassifier ("haarcascade_frontalface_alt2.xml");
faceDetector = cv::CascadeClassifier ("cvdata/haarcascade_frontalface_alt2.xml");
facemark = cv::face::FacemarkLBF::create();
facemark->loadModel ("lbfmodel.yaml");
facemark->loadModel ("cvdata/lbfmodel.yaml");
vid = cv::VideoCapture (0);
}

View file

@ -78,10 +78,10 @@ void initGraphics () {
initShader();
parts[0] = ModelPart("head-base.png", transUniform);
parts[1] = ModelPart("face-eyes.png", transUniform);
parts[2] = ModelPart("face-mouth-closed.png", transUniform);
parts[2].addTexture("face-mouth-open.png", 1);
parts[0] = ModelPart("models/test/head-base.png", transUniform);
parts[1] = ModelPart("models/test/face-eyes.png", transUniform);
parts[2] = ModelPart("models/test/face-mouth-closed.png", transUniform);
parts[2].addTexture("models/test/face-mouth-open.png", 1);
//enable blending for alpha textures
glEnable(GL_BLEND);