View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Setting up the VIPeR Toolkit (sMunger)

The Computational Perception Lab has a VC++ "starter" project file which allows:
1) easy access to .avi and .bmp files
2) access for grabbing frames from a camera/capture card
3) Output of bmp's and (uncompressed) avi's.

This is for research/class purposes, so use at your own risk. Also, we use this under WinNT 4.0 and Win2000. You should too. Last thing: Look for newer versions, since they may have fixes or more/better examples.

Instructions:

NOTE: Make sure to set the appropriate path according to your link to cplNT e.g. If cplNT is directly in h:\ and not a sub-directory of 'links' set path value to the following:
"%Path%;h:\cplNT\ipl\bin;h:\cplNT\cvl\Bin;H:\cplNT\VisSDK\bin;h:\cplNT\SML\lib\"


Uploaded Image: viper_exec.gif
Uploaded Image: viper_lib.gif
Uploaded Image: viper_include.gif

Now you can modify the code to do what you want. FYI, you have IPL documentation in H:\cplNT\ipl\doc\iplman.pdf.
CVL (higher-level operations which use IPL data) documentation is at H:\links\cplNT\cvl\Docs\OpenCV.pdf and some extra explanations are in OpenCV_new.pdf. The online forum for discussing CVL (which is rapidly gaining users with its parallel Windows and Linux versions) is at: http://groups.yahoo.com/group/OpenCV
Use other avi's by changing xdim and ydim.
Notice that hitting space-bar in the log window has been given a callback at the bottom of the main.cpp: replays the movie. Try left and right-clicking in the windows. Hopefully these example hooks to keyboard and mouse-clicking can get you started if you want user-input.

Two example callbacks are in an alternate main file: example_main.cpp.
Pull it into your workspace in place of main.cpp. I've commented out the InitInstance call to activate the camera - turn it back on if you want, but the two example callbacks just process an avi and a bmp. Look for the 2 sections labeled "ADD YOUR CODE HERE!". Notice that space has been allocated implicitly for one VisSDK image, which comes into the callback as an argument, and whose contents go to the window when the callback is done. To get your results onto the screen, you'll need to dump them into the buffer that VisSDK points to (also pointed to by the iplVideoImage). Allocate other VisSDK and IPL images as you need them. You should be able to add windows widgets/menus/resources, but you'll need to change some of the relevant files from read-only to writable.

Pretty soon, all problems in life will look like they can be solved with computer vision. Have Fun.


Update History:
Ver. 01: Added code to InitInstance: CVisImageBase::SetIsAlphaWritten(false); // Makes written bmp's 24bit (not 32) and readable by Photoshop etc.

NOTE added to setting Path variable in user environment



Link to this Page