Clean up directory structure
|  | @ -16,6 +16,13 @@ include_directories( ${GLEW_INCLUDE_DIRS} ) | ||||||
| include_directories( ${GLM_INCLUDE_DIRS} ) | include_directories( ${GLM_INCLUDE_DIRS} ) | ||||||
| include_directories( ${GLUT_INCLUDE_DIR} ) | include_directories( ${GLUT_INCLUDE_DIR} ) | ||||||
| include_directories( ${PROJECT_SOURCE_DIR}/src ) | 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 ) | 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 ) | target_link_libraries( fc2d ${OpenCV_LIBS} ${OPENGL_LIBRARIES} FreeGLUT::freeglut GLEW::glew ) | ||||||
| set( CMAKE_BUILD_TYPE Debug ) | set( CMAKE_BUILD_TYPE Debug ) | ||||||
|  |  | ||||||
| Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB | 
| Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB | 
| Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB | 
| Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB | 
|  | @ -10,10 +10,10 @@ cv::Mat frame, gray, small; | ||||||
| 
 | 
 | ||||||
| void initCV() { | void initCV() { | ||||||
| 	//TODO: switch to DNN face detection
 | 	//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 = cv::face::FacemarkLBF::create(); | ||||||
| 	facemark->loadModel ("lbfmodel.yaml"); | 	facemark->loadModel ("cvdata/lbfmodel.yaml"); | ||||||
| 
 | 
 | ||||||
| 	vid = cv::VideoCapture (0); | 	vid = cv::VideoCapture (0); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -78,10 +78,10 @@ void initGraphics () { | ||||||
| 
 | 
 | ||||||
| 	initShader(); | 	initShader(); | ||||||
| 
 | 
 | ||||||
| 	parts[0] = ModelPart("head-base.png", transUniform); | 	parts[0] = ModelPart("models/test/head-base.png", transUniform); | ||||||
| 	parts[1] = ModelPart("face-eyes.png", transUniform); | 	parts[1] = ModelPart("models/test/face-eyes.png", transUniform); | ||||||
| 	parts[2] = ModelPart("face-mouth-closed.png", transUniform); | 	parts[2] = ModelPart("models/test/face-mouth-closed.png", transUniform); | ||||||
| 	parts[2].addTexture("face-mouth-open.png", 1); | 	parts[2].addTexture("models/test/face-mouth-open.png", 1); | ||||||
| 
 | 
 | ||||||
| 	//enable blending for alpha textures
 | 	//enable blending for alpha textures
 | ||||||
| 	glEnable(GL_BLEND); | 	glEnable(GL_BLEND); | ||||||
|  |  | ||||||