We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey! So, I'm a Mechatronics Engineering student from Brazil, and in our first project we're using Processing to design everything. So the idea here is to make a little wheeled robot with a camera that takes commands from a PC and sends back the camera feed (the robot itself will play the server, which will run on a CubieTruck linux board). I'm working now on getting the video transmitted. My teacher made a really rough draft just as a starting point for how it should go sending RGB values and using get() set() but it was really laggy and for some reason one color channel didn't work, making the image always a yellow tint.
Anyway, I rewrote it to use hex values and pixels instead and it seems to work wonders (it's nearly instant and colors work great), but when I set the resolution to be something like 100x100 or 200x200 it gets really buggy and messy:
Relevant code is also in the screenshot, the rest is pretty much empty (got it straight from the example, the UI part is in another program we'll merge later on). In this case, the image size was set to 130x130. Interestingly, this doesn't seem to happen much on lower resolution (like 40x40), or it does for a bit but quickly becomes stable. You might have noticed I had to put an (if input != null) in there. It was giving me null pointer exceptions, and I'm almost sure that's got something to do with the problem. It also crashed a couple of times, and opening the task manager revealed that the app (Java something) was using up over 800MB RAM, which seems like an indication of a memory leak. Might this be a problem with the underlying java?