#pragma once #include "ofMain.h" #include "ofxOpenCv.h" #include "ofxCv.h" #include "windows.h" #include // std::string #include // std::cout #include // std::stringstream, std::stringbu 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 scaleRectangel(void); void scaleTrapeze(void); ofVideoGrabber webcam; ofxCvColorImage rgb_immage; ofxCvColorImage hsv_immage; ofxCv::ContourFinder contour; cv::Point2f center_trapeze; cv::Point2f center_rect; ofColor color; ofColor color_red_laser; int color_picked; int key_pressed; int i; int biggest_contour; unsigned int selection; int calibrated; int select_colour; float y_scale; float y_offset; float x_scale; float x_offset; float left_pitch; float right_pitch; float middle; POINT cp_top_left, cp_top_right, cp_bottom_left, cp_bottom_right, cp_cursor_position; };