We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello there,
I'm wondering (have tried and search but did not succeeded) if it is possible to use Processing2 without a GUI. I have already accomplished working with it directly inside a java app, with a swing GUI, to show a video or capture a webcam and do my manipulation. But is it possible to use it without a GUI?
Thanks!
Answers
I don't understand the question at all... what are you referring to as the GUI?
I wonder if what you meant by the term
GUI
was Processing's canvas screen? :-?Know that the canvas is created only after setup() has finished.
Just call your program module from setup() then, and create your own swing canvas from there:
Yeah, indeed I didn't explain myself properly. Let me rephrase.
I'm using Processing 2 to process a video, do some analysis and take some snapshots. But there is no need (actually I don't want) to someone see things happening. I'm going to write a standalone java app that the user, or another process, will call passing some parameters (like the video path) and the application will save the snapshots in defined directory.
So what I call GUI is the window (awt or swing) that the users sees. And I need to be able to process this video, frame by frame, do my analysis, take some snapshots of it and end the process.
OK, you did your search, and I agree it isn't necessarily an easy topic to search if you don't know the keywords to search (and even if you know them!).
This topic has been asked a few time, eg. to run Processing on a Web server. One keyword is headless. Another one is Xvfb, if you run on a Unix-like system.
Hello , I need to implement the same. I am also searching for handling the video rotation at the server end . Are you able to find any way to do this ?
Hello
Not sure, it's relevant but you can link 2 sketch together with Client and Server objects. Then your main app should be the server and your tool a client (actually, the opposite work in the exact same way)
You just need to run the server before the client. But after that, the client can run as a background-process and it's very easy to manage.
An example :
1) the sketch that contains the server side
2) the sketch that contains the client-side only
import processing.net.*;
I didn't test the code, but I think it should work
kanchan2mj, have you read the whole thread before posting? Have you done the searches suggested here? Have you a specific problem about a specific implementation?