I need to find the skeleton of a silhouette image for a project I'm working on. I would love to start with some existing code rather than re-implement skeletonization from scratch. Ideally, I'd want something that takes a black-and-white or greyscale image as input, and returns a topologically-connected graph of lines or curves representing the skeleton. But even just the image-processing part would be a great start.
I'm trying to write a GLSL shader that will let me combine per-vertex color information with a texture map (essentially multiplying the texture map's color values with the colors from the vertices.) But I can't seem to make it pay attention to both at once! If I turn on the texture, it ignores the per-vertex colors entirely.
If I comment out the "sh.texture(tex)" command, Processing ignores my shader entirely, and the per-vertex colors (random colors) show up. But when that line is present, the vertex colors are ignored, and I just see the texture map of "deer.jpg" wrapped around the cylinder.
Am I missing something obvious here? Or does Processing somehow prevent you from combining textures with per-vertex coloring? (And if so, is there any kind of workaround for this limitation?)
I downloaded an example sketch (
Optical Flow by Hidetoshi Shimodaira) that uses the MovieMaker class to save screen output to a .mov file. The sketch runs just fine in 2.0b9 on my MacBook Pro, and saving movies works fine too.
But when I try doing the same thing in my own sketch, I get an error:
Cannot find a class or type named "MovieMaker"
Hunting around in the forums, I found
this thread, among others, suggesting that the MovieMaker class was removed in Processing 2.0 and should no longer be used. Now I'm totally confused. If MovieMaker was removed, why does the Optical Flow sketch work?
Failing that, can anyone suggest a better way to render out movies in realtime? (I've tried the officially recommended method of saving out individual frames one at a time, but doing that slows my app down from 24fps to about 12fps because of all the disk access, so it's useless to me.)
I'm taking my first crack at using video capture in a Processing sketch. I have a sketch that's already working fine without video input, and I'm trying to add video capture to it. (Specifically, I've got an array of PVectors that I'm using to stuff color values into the vertices of a grid of quads.) I've cut and pasted what I think are the relevant lines of code from the "AsciiVideo" and "GettingStartedCapture" examples, but I can't seem to make it work.
...but for some reason, when I try to access the pixels directly, their values all seem to be zero. The example code below never gets to the println() statement:
I'm using the Keystone library to do some perspective warping on some images. I'd like to be able to save and load my coordinates, like in the example app that comes with the library ("CornerPin.pde").
But when I try to trigger the ks.save() command, I get this error:
IllegalAccessError: tried to access method processing.data.XML.save(Ljava/io/OutputStream;)Z from class deadpixel.keystone.Keystone
It does appear to output a "keystone.xml" file into the data subdirectory of the sketch, but the file has zero bytes.
This is using Processing 2.0b8 and the most recent version of Keystone.
I'm trying to use the "keystone" library (
http://keystonep5.sourceforge.net/) but I can't get the example code ("CornerPin.pde") to work. Every time I run it, I get this error:
No library found for deadpixel.keystone
As of release 1.0, libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.
This is my first time installing a third-party library, and apparently I have no idea how to do it properly.
Here's what I have done so far:
1) downloaded the package
2) unzipped it
3) copied it into my sketchbook folder ("/Users/cassidy/Documents/Processing/libraries")
I'm assuming that the actual library, the bit that Processing cares about, is the file called "keystone.jar". So I've tried copying it into various places: directly in the "libraries" folder, and also into each of the subdirectories (libraries/deadpixel, libraries/deadpixel/keystone, etc.) but each time, no luck.
I'm working on an applet that requires keyboard input, and using Processing.js so it will work in the widest variety of contexts. Here's an earlier one I published using the same methods, just for an example:
I'm able to get this to run in Safari in iOS (e.g. on my iPhone) just fine. But I can't get keyboard input to work, because clicking on the applet doesn't bring up the virtual keyboard.
The example above could be redesigned to not require keyboard input (e.g. I could have mapped the parameters to mouse X and Y.) But the one I'm writing now really does require keyboard input, because it's all about text.
For some reason, Processing doesn't seem to recognize some of my fonts. For example, I've got a font called Avenir in several weights (light, medium, heavy, black). I want to create a font based on the "black" weight, but no matter which one I choose, it always shows up looking like the "medium" weight.
None of the other software I've got that uses fonts seems to have this problem (e.g. OpenOffice, PhotoShop, Illustrator, etc.)
Is there something I could do to make this font available to Processing in the weight that I want?
(P.S: Moderators, I'm a little unclear on which forum this question belongs in, so feel free to move it if I guessed wrong!)
I was trying to explain why it's cool that Peter Jackson is shooting "The Hobbit" at 48 frames per second (as opposed to the standard 24), and so I wrote this little applet to illustrate why: