Integration peasyCam with CP5 GUI and webcam: How?

edited March 2017 in Library Questions

Hi there!!I'm actually trying to implement a sketch with a basic GUI made with CP5 (input/chat text for a chat bot and some buttons), a webcam capture and the feature to move webcam and texts when either "Globe" or "Settings" buttons are pressed( you know just to save some space for other stuff)..all fine until I decide to use peasyCam to show me a rotating Globe when the omonym button is pressed: peasy takes all the window for itself, so two ways I thought. The first is to create a frame(?) or a subwindow(??) in window in which putting peasyCam and to be showed when button is pressed (something like PFrame or a ControlFrame in CP5,or maybe an other PApplet in window?) , the second would be to fit all the GUI and webcam inside a peasyCam object, and then lock everything in front but the globe model. I attach (was writing append :'D ) two photos of the initial view and when button is pressed. Thanks in advance!! Andrea

Ps: The Globe being nevertheless than the Planet object from Daniel S. , after breaking my head with collada and kmz1 2



  • I don't get the concept of using peasy and video. When i think peasy, I think I am in a 3D universe. Do you mean you want to pan your webcam view? You can draw your stream web cam into a PGraphics object which you could make larger than your sketch ( Then you can grab a section of the PGraphics. To display this subsection, you can use the other version of the image() function:


  • Alright I might have been confusing..the goal of the sketch is to create this chatbot with computer vision abilities( displayed for user's understanding of what it sees, and for testing it of course) and the possibility to have a gui with a 3d rotating globe, button-started, which displays some sats and iss realtime geolocation, so I would need peasyCam to have a nice and stable view with possibility to zoom,move around,etc..

  • Peasy has beginHud and endHud

  • A hud gives you stable 2D within 3D sketch

  • Yep I saw the beginHud and endHud methods, so you're considering to put all inside peasy and then lock the gui elements with hud?

  • edited March 2017

    Anyway, I've tried a first step in that direction, almost everything works fine,although very slow(maybe i need some sort of GL adapter due to my graphic card, or it's just the program being rusty).Try to organize the code and post first results!! :)

  • I think it's the right path

Sign In or Register to comment.