I got libcvfx compiled on Windows with Dev-C++. I don’t have it as a library or anything, just got the demo working for now, proof of concept if you will. It was a bit slower on Windows, and I didn’t get the 640×480 out of my web cam. Additionally the highgui didn’t register the arrow keys right so I had to change those.
What I was really wanting to see was if it would run in Windows at all. This would possibly open up a bigger range of web cams for the CameraBooth project, perhaps some of the higher end, higher resolution ones.
Anyway, here’s a screen of it running on Windows and one on Linux for good measure. Click through for the big images.
Additionally I’ve added a few new effects since the last post. Some don’t capture well, so I’ll just describe those ones.
This one takes a threshold and any pixel under the threshold is turned black, any pixel over it is turned a user specified color, default is white. This tends to be harsh, it might be good to run a blur on it or maybe set a few midpoint values between black and the color to fuzz it a bit.
Cuts the image into as many strips as you want, then flips every other strip. Defaults to 4 strips.
This isn’t a new effect, but now you can choose which corners to exchange.
There are a number of effects I didn’t take pictures for.
VStripFlip is like HStripFlip except vertical.
Broken Television is a motion effect where the image scrolls like an out of sync TV. Hard to describe really.
Noise just injects pseudo-random pixels into the image, but it does a poor job of it right now.
Interlace Lines replaces every other horizontal line with all black.
I’ll have more about these effects as well as pictures and maybe video once I get a project page set up for libcvfx. For now you can hit up the repo for source, or grab the Window binary here. You will need the OpenCV libraries installed, and in your PATH.
I’ve been playing with OpenCV recently and was having troubles with creating effects. That’s all over now thanks to the OpenCV mailing list, you can see the fix in the comments of this post. Since I can now manipulate colors and pixels with ease I’ve been writing a few more neat effects. And yes, I know that this is not what OpenCV is for, but it’s a really handy library and I like it.
I decided to pull them out of my test program and make them into a little library. Having never made a library before I[m sure I did some things wrong, but it works and that’s what I care about right now.
I doubt my manipulation method is the fastest, but I’ve tried to be economical and share resources between effects. I also included a test program so you can try out the filters. These are all written by me so far, with inspiration but no code from other sources. I’m hoping to port over some of effectv’s super cool filters as time goes on. You can click through on any of the pictures below for a 640×480 version.
This is my normal image I get from my cheap labtec webcam.
And yes, I am that good looking.
Probably the simplest effect, it just involves turning off the blue and red channels.
Copies and flips the left side onto the right.
Simple like green, just sums the three channels into one value.
This one swaps the top left and bottom right corners. I’m going to swap top right and bottom left later.
This is one of the harder ones. It stores three frames in memory and then combines them with the current frame for a ghosting type of effect.
For lack of a better name.
This is the only one with parameters, and one of my favorites.
The parameter is the “pixel size”.
From top down it is set at 2, 6 and 10.
You can grab the 0.01 source here (doesn’t have the invert filter) or browse the svn repo at http://svn.velvetcache.org/libcvfx/ for more current stuff.