I’m learning oF and have a tutorial project where I’m drawing contours, edges and Box2D-objects. Since it’s all 640x480 (Kinect resolution) it’s very tiny on my screen and I’d like to draw it bigger. Now, the simplest way I can think of would be to resize the kinect image when assigning it to an ofxCvColorImage and then base everything on that size… but when I tried this with haar, it seemed to cause slowdown, presumably because the amount of pixels being analyzed was increased.
With the simple haar project, I was able to do it by multiplying both the image proportions and the haar rectangles by the same scaler. But this gets more complicated with a greater variety of objects in the project.
I found this old thread and tried the method using ofPush/PopMatrix(), but as the user said, this doesn’t leave a clear way to rescale the position of things not explicitly written in draw() or mousePressed(), eg. the clicking and dragging of the ofxGui panel. I tried to download his ScaledApp.h, but it’s an old post and the file has expired.
As you can see in draw(), I tried to use setSize() and setPosition() to fix the gui problem, but I just end up seeing the outlines of the three buttons…