title
  HOME         PROJECT         JOURNAL         CAREER        
The Algorithm

OpenCV

Visual Basic

Flash

Tasks & Timeline

Downloads


alg

Here's what I've accomplished in the OpenCV platform. I'm applying my pixel calculation algorithm based on the user-defined threshold as I did in the VB6 environment (still pictured below). Under OpenCV I'm able to processes dynamic image sizes and have a little more portability considering import and export capability.

opencv screenshot

I was able to accomplish some import and export functionality in this environment. I'm able to save images when the camera feed is running. This image is below. I'm also able to record camera streams to an .avi file for recording, both filtered and unfiltered feeds. I've also written a small tool to import this unfiltered .avi file back and run it through the rotoscope filter. Here's my rotoscoped movie.


Here's a shot of the user interface of the Visual Basic program. I've modified it quite a bit since the last update. I've added a filter selection box for the user to select any of the filters they wish and also toggle the sobel edge detection tracing, which frees up some processing time. Speaking of processing time, I've successfully implemented a way to calculate new values based on the color threshold control, compared to "determining" the best value (BIG unneccessary 'for' loop and 'if' statements for every pixel). I talk about this algorithm in my journal page.

my UI

Saving and opening processes in VB was difficult because I'm writing and reading raw data to and from files, ignoring the header. It's a simple process but because I'm using a memory move function, placing the header into the data structure at the appropriate time can be a tricky task. Also, these still images and streams that I'm saving can only be re-opened in the same application. Nonetheless, I was able to implement the functionality, with the exception of bringing the still image back into the program. The image will display in the picture box but on exiting the program I recieve a Microsoft VB error.


In the Flash environment, I explored the process of tracing over a movie, frame by frame. Here's what the movie looks like unedited: Click to see the movie.
First I imported the movie into the Flash timeline and placed keyframes on each frame for the movie. All this does it make each frame stand on it's own for tracing, unaffected by the other frames. Another important concept here is that I locked the movie on its own layer and traced and colored on two other separate layers.

flash before

After I was all done tracing and coloring over the movies, I simply delete the movie and layer and am left with my product. I've placed the movie on the entrance of my site - check it out again!

flash after

This was really time consuming, but it was a different platform to experience. I really think the finished product illustrates what rotoscoping really means for both the animator and the viewer!

Logitech Camera Installation

I used a Logitech QuickCam® Pro 5000 for this project.
My applications are also compatable with the 4000 model.
Download the camera drivers here.
OpenCV

Download OpenCV here.

You'll need to do a few things first before running an OpenCV application.
First append ';C:\Program Files\OpenCV\bin' to your environment variables.
Do this by right clicking on My Computer and select Properties. Go to the advanced tab and edit both the system and user 'path' variables and append.

I used Visual Studio 6.0 to develop my project. Go here for instructions on how to add the appropriate libraries to your project. Just do the 'lib' and 'include' parts. Finally, go to Project->Add to Project->Files and select all files in C:\Program Files\OpenCV\lib.
  • Here's my camera feed code and executable (open from Desktop not from browser download window)

Visual Basic

  • Compressed folder containing executable and dll

Flash

You'll need Flash Professional 8 to develop my application but here's a link to the movie.