GitHub - ofTheo/ofxControlPanel: A flexible control panel based gui addon for openFrameworks

    //ofApp.h 
    ofxControlPanel gui; 
    ofVideoGrabber vid; 

    ofParameterGroup cvControls; //this will be in your header file 
    ofParameter <bool> bInvert; 
    ofParameter <float> threshold; 
    
    //ofApp.cpp 
    //In ofApp::setup()
    gui.setup("my gui"); 
  
    //add a video to the panel   
    gui.addDrawableRect("video feed", &vid, 320, 240); 
    
    cvControls.setName("cv controls");
    cvControls.add(bInvert.set("invert", false));
    cvControls.add(threshold.set("threshold", 29.0, 1.0, 255.0));
        
    //now add the param group to the gui 
    gui.add( cvControls ); 
    
    gui.loadSettings("settings.xml"); 
    
    //In ofApp::update(){
    gui.update(); 
    
    //In ofApp::draw(){
    gui.draw();