#pragma once #include "ofMain.h" #include #include "ofxOpenCv.h" #include "Onnx.h" #include "Yolo.h" #include #include "Player.h" #include "Map.h" #include #include #include "ModelThread.h" #include "Server.h" #include "Request.h" // #include "ofxPiMapper.h" class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void mouseEntered(int x, int y); void mouseExited(int x, int y); void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); void inferEmotionalState(); void renderDepthMap(); void printEmotions(); void displayFrame(); float window_height; float window_width; ofImage img; cv::Mat cvImg; ofVideoGrabber webcam; Player player; bool firstRun = true; Onnx depth; Onnx depth_small; Onnx yolo; Onnx emotion; ofxCvColorImage emoteImage; ofImage tempImage; std::vector croppedFaces; int emotionImageMaxBatchSize = 5; Emotef emo; Yolo faceDetector; float* emotional_data; std::vector detected_faces; Map map; ofShader depthToColourShader; ofFbo rampedFbo; ofTrueTypeFont tf; ofFbo video_player_fbo; ofFbo model_output_fbo; ofFbo model_output_fbo_1; ofFbo model_output_fbo_frame; ofFbo screen_fbo; ModelThread threadMap; ModelThread threadVideo; ModelThread threadYolo; ModelThread threadEmotion; std::unique_ptr server; Vector7D embedding; //ofxPiMapper mapper; };