I'm using
AWT Colors within my Sketch and I have methods to set the transparency and convert them to Processing's int equivalent (I'm using Eclipse and the main PApplet class).
public Color setAlpha(final Color color, final int transparency) {
return new Color(color.getRed(), color.getGreen(), color.getBlue(), transparency);
}
public void fill(final Color color) {
fill(color.getRGB());
}
This works fine for all colors except
pure blue. If I go down with the transparency, the fill almost gets black, but then suddenly switches to white. Colors other than blue don't do that, so I suspect, it's some kind of overflow problem. However, I have no clue what the problem might be.
I debugged the Color values of Red / Green / Blue / Alpha / RGB int and got for the faulty case:
0/0/255/0/255
Their handling in proCONTROLL is quite different, and I don't understand why.
The Attack 3 declares no ControllStick, but three ControllSliders: X, Y and thrust. I can combine X and Y to create a ControllStick and only use the third ControllSlider as slider.
The Extreme 3D Pro hardware also has a joystick, but this can be turned left and right. It also has a thrust control. In proCONTROLL I get this as two ControllSticks, one normal with X and Y and one with Z and thrust, but I get no sliders.
How come that two joystick which look very similar behave differently?
So, to give more methodology to my varying successes, I made a test for my four webcams and QuickTime (i.e. built-in Processing Capture), OpenCV, JMyron and GSVideo.
Since it looks like it isn't trivial, I thought I'd publish my findings here, although the results may of course be very different when using other webcams.
I used the most simple example from every framework. Every example was started with 320x240 and 640x480 resolution, and every example was started as applet or full-screen application. Note that I didn't start these examples from the Processing PDE, but from Eclipse, since it's my preferred IDE (but I don't think it matters anyway).
So, here are the results:
QuickTime
Acer TravelMate 4230 Webcam
Applet: ok
Application: ok
320x240: ok
640x480: ok
Logitech QuickCam for Notebooks Deluxe
In general, the Quickcam options window always pops up
Applet: ok
Application: ok
320x240: ok
640x480: ok
Logitech C210
Applet: ok
Application: ok
320x240: ok
640x480: ok
Logitech QuickCam Express
Applet: ok
Application: ok
320x240: ok
640x480: ok
Microsoft Lifecam VX-700
In general, the color resolution is bad
Applet: ok
Application: ok
320x240: ok
640x480: ok
OpenCV
Acer TravelMate 4230 Webcam
Doesn't work, shows only back pixels
Logitech QuickCam for Notebooks Deluxe
In general, the Quickcam options window always pops up
Applet: ok
Application: ok
320x240: ok
640x480: ok
Logitech C210
Applet: ok
Application: ok
320x240: ok
640x480: ok
Logitech QuickCam Express
Applet: Crash after closing
Application: ok
320x240: ok
640x480: ok
Microsoft Lifecam VX-700
Applet: ok
Application: ok
320x240: ok
640x480: ok
The Logitech QuickCam Express crashes with this error:
# # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7f842adf, pid=2504, tid=532 # # JRE version: 6.0_26-b03 # Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86 ) # Problematic frame: # C [lvcodec2.dll+0x2adf] # # An error report file with more information is saved as: # M:\workspace\Tests\bin\hs_err_pid2504.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #
JMyron
Acer TravelMate 4230 Webcam
Applet: Crash after closing
Application: ok
320x240: ok
640x480: ok
Logitech QuickCam for Notebooks Deluxe
In general, the Quickcam options window always pops up
Applet: Crash after closing
Application: ok
320x240: ok
640x480: Image is repeated three times with black lines
Logitech C210
Applet: Crash after closing
Application: ok
320x240: ok
640x480: ok
Logitech QuickCam Express
In general, only shows five distorted interlaced black & white pictures, can't be used.
Microsoft Lifecam VX-700
Applet: Crash after closing
Application: ok
320x240: ok
640x480: ok
In general, JMyron crashes after starting a webcam capture in an applet:
# # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10001bf0, pid=796, tid=3496 # # JRE version: 6.0_26-b03 # Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86 ) # Problematic frame: # C [JMyron.dll+0x1bf0]
GSVideo
Acer TravelMate 4230 Webcam
Applet: ok
Application: ok
320x240: ok
640x480: ok
Logitech QuickCam for Notebooks Deluxe
Doesn't work: NullPointerException in GSCapture.getSuppResAndFpsList()
Logitech C210
Doesn't work: NullPointerException in GSCapture.getSuppResAndFpsList()
Logitech QuickCam Express
Doesn't work: NullPointerException in GSCapture.getSuppResAndFpsList()
Microsoft Lifecam VX-700
Applet: ok
Application: ok
320x240: ok
640x480: ok
So, I think that this can help someone else. If anything, I think that it shows it's difficult to work with webcams
Best regards,
Eric
P.S. Next step will be to combine several webcams and to test what works with what combination.
As a newbie, I'm trying to run all the examples of all the downloaded libraries. For GLGraphics, I only succeed in running about 20% of them. I'm using an Acer TravelMate 4230 laptop with Mobile Intel 945GM Express Chipset.
Mostly, GLGraphics shows a lot of missing functionality
GLGraphics version: 0.99 GL_EXT_framebuffer_object extension not available GL_ARB_shader_objects extension not available GL_ARB_geometry_shader4 extension not available GL_ARB_vertex_shader extension not available GL_ARB_fragment_shader extension not available GL_ARB_shading_language_100 extension not available GL_ARB_texture_float extension not available GL_ARB_texture_non_power_of_two extension not available GL_EXT_framebuffer_multisample extension not available
And in the end, it throws an Exception, usually because of the missing "glCreateProgram"
Exception in thread "Animation Thread" javax.media.opengl.GLException: Method "glCreateProgram" not available at com.sun.opengl.impl.GLImpl.glCreateProgram(GLImpl.java:2700) at codeanticode.glgraphics.GLState.createGLResource(Unknown Source) at codeanticode.glgraphics.GLState.createGLResource(Unknown Source) at codeanticode.glgraphics.GLSLShader.<init>(Unknown Source) at codeanticode.glgraphics.GLModelEffect.initShader(Unknown Source) at codeanticode.glgraphics.GLModelEffect.initEffect(Unknown Source) at codeanticode.glgraphics.GLModelEffect.<init>(Unknown Source) at Bilboards.setup(Bilboards.java:52) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Thread.java:662)
So, being completely new to OpenGL: Is my conclusion right that with my Intel graphics chip, I should more or less forget about advanced OpenGL graphics?
I want to create a light show where the listeners can influence the graphics using two joysticks. proCONTROLL of course is very helpful. However, there is of course the possibility that nobody wants to play with the joysticks, so my system should react to that and start generating random joystick output, otherwise the light show could become very boring soon
Has anyone ever done that?
My idea is to extend the ControllStick class and to override the getters for X, Y etc. An internal timer reacts to the real joystick events by resetting a watchdog timer and returning the real data. But as soon as the watchdog timer exceeds for instance 5 seconds, the random part of the "Joystick" starts. The individual parameters (X, Y etc.) can be configured to have a range of random values and a probability that it generates them.
I'm new to Processing and its libraries and checking what's available. I downloaded the toxiclibs, and everything works fine and is really great, but I can't get audioutils to work.
I'm starting HelloAudioWorld in the PDE and get
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: com.sun.gluegen.runtime.WindowsDynamicLinkerImpl.LoadLibraryW(Ljava/lang/String;)J at com.sun.gluegen.runtime.WindowsDynamicLinkerImpl.LoadLibraryW(Native Method) at com.sun.gluegen.runtime.WindowsDynamicLinkerImpl.openLibrary(WindowsDynamicLinkerImpl.java:26) at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:164) at net.java.games.joal.impl.ALProcAddressLookup$DynamicLookup.dynamicLookupFunction(ALProcAddressLookup.java:62) at com.sun.gluegen.runtime.ProcAddressHelper.resetProcAddressTable(ProcAddressHelper.java:99) at net.java.games.joal.impl.ALProcAddressLookup.resetALCProcAddressTable(ALProcAddressLookup.java:109) at net.java.games.joal.impl.ALCImpl.alcOpenDevice(ALCImpl.java:341) at toxi.audio.JOALUtil.init(Unknown Source) at toxi.audio.JOALUtil.init(Unknown Source) at HelloAudioWorld.setup(HelloAudioWorld.java:60) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Thread.java:662)
It's this line that fails:
this.audioSys.init();
Being a Java developer, I like working in Eclipse better anyway, so I tried the same there, adding audioutil's library directory to the "Native library location" to be able to access the DLLS and .jnilib. Doesn't work either, but I get a different exception:
Exception in thread "Animation Thread" java.lang.NoSuchMethodError: com.sun.gluegen.runtime.BufferFactory.nativeOrder(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer; at net.java.games.joal.impl.ALCImpl.alcOpenDevice(ALCImpl.java:349) at toxi.audio.JOALUtil.init(Unknown Source) at toxi.audio.JOALUtil.init(Unknown Source) at examples.audio.HelloAudioWorld.setup(HelloAudioWorld.java:43) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
I installed OpenAL, even though all I see is "C:\Programme\OpenAL\oalinst.exe" (German Windows). Could this be the problem? Can I test OpenAL somehow?
I'm pretty new to Processing, but been developing software for quite some time.
That said, I'm trying to show the live video feed of five webcams at the same time.
Using Capture.list(), I can see that three of them have the same name, along the line of "generic webcam" (my Windows is German).
Since the Capture constructor requires a unique name, I'm out of luck, as it seems, with Capture. Am I right?
From the Capture Javadoc:
If 'name' is null or the empty string, it won't set a specific device, which means that QuickTime will use that last device used by a QuickTime application.
Unfortunately, Apple's QuickTime API uses the name to select devices, and in some cases there might be cameras with the same name on a machine. If you ask for a camera of the same name in sequence, you might see if it just does the right thing and grabs each separate camera in succession. If that doesn't work, you might try calling settings() which will bring up the prompt where you can select a capture device.
I've browsed through the forum, and there seem to be a number of other Video libraries. Does anyone have experience with them and multiple webcams? Is it possible to address them or should I just give up?
I'm new to Processing (even though I work as a software developer). I'm working on a project to have an interactive light show for my band using Processing, possibly Arduino, and project the graphics onto my band.
Now, the problem I have is how to control the light show, and I thought that perhaps someone here has some experience.
Basically, I see a couple of possibilities (and problems):
The PC controls the whole light show, and the band plays with a click track. However, this makes the music much more rigid (we're a rock band, not a techno act).
Processing reacts to some input (like the music, some webcams, some joysticks for public use etc.). But how should Processing tell a song's verse from a chorus? Also, what happens if nobody of the listeners wants to interact with the input devices?
Processing has a couple of "presets" which are then switched by someone who understands the music. In the ideal case, this is a person only dealing with the light show - but we're not that big as a band... Which leaves the musicians. Someone could step through the presets using a MIDI board, however this might lead to confusion, since playing music and controlling the light show is quite a task.