Instant VisGenie

In this tutorial you will learn the basic usage of VisGenie instantly through some built-in demos and quick projects. The content is divided into two parts: corresponding to the fundamental functions of VisGenie: building demo projects and creating video analysis platforms.

NOTE:


The instructions and screen shots provided in this tutorial are based on version 0.8.0.0Beta and Windows XP Professional platform. For other Windows platforms and versions, there might be minor differences.


The directory VisGenie is installed is denoted as [VisGenie Folder], and the start menu entrance of VisGenie is denoted as [VisGenie in Start Menu]

Building Demo Projects
   
Creating Video Analysis Platforms



Building Demo Projects

Demos on Demos

Before building our first demo project, let's firstly have a quick warming up by reviewing some built-in VisGenie demos.

Open VisGenie Demo Studio

Select "[VisGenie in Start Menu] / VisGenie Demo Studio".

The VisGenie Demo Studio window will appear as follows. Try to be familiar with the tools at the first glance.

Quality Comparison Demo

This demo shows two video clips (the famous Foreman sequence) generated by using two different rate control algorithms. The purpose of the demo is to observe the quality improvement, both in PSNR and perceptual visual quality.

Click on the "Open Demo" tool button. An open file dialog will pop up.

Select the file "[VisGenie Folder] / Demos / QualityComparison.vgs". Wait while the demo project is loaded.

When the loading is finished. There are two video player windows and one curve window showing the PSNR values.



Though the two videos can be rendered separately, we want their playback to be synchronized in order to compare their visual quality.

Click on the "Link All Videos" button from the toolbar. The synchronization rendering buttons will be enabled.

Click on the "Start Rendering" button from the toolbar. The two videos will be rendered simultaneously.

At the same time a timeline will appear in the curve window showing the PSNR values for current frames.

Right click on any points in the curve window to see the interested PSNR values.

Soccer Game Structure Analysis Demo

This demo illustrates how to use low level content features to analyze the soccer game structure (i.e., play and break) through some pattern recognition framework. Two content features are adopted: dominant color (the green of the glass) ratio and motion intensity. The analysis result is shown in an object window, play and break indicated as green and red respectively.

Click on the "Open Demo" tool button. An open file dialog will pop up.

Select the file "[VisGenie Folder] / Demos / SoccerGame.vgs". Wait while the demo project is loaded.

When the loading is finished. There are one video player window, two curve windows, and one object window.

Play the video. And timelines will appear, indicating current content feature values and analysis result.

Build Your First VisGenie Demo

Now you will learn how to construct your VisGenie demos by just clicks.

Visualizing PSNR

Click on the "Create new demo" button. If you are in some other project, you will be prompted whether to save current project. Click no to close it.

Click on the "Create video genius" button. A video tool with default setting will appear in the middle of your screen.



Move the video tool window to the position you preferred. Say up left corner.

In the video tool window, click on the "Browser..." button to choose a video file.



If you don't have video files on hand, you can use the ones shipped with VisGenie, located at folder "[VisGenie Folder] \ Demos"

We choose "foreman1.m1v" in this examples.



Now click on the "Customize window location" button. The button will appear sunk



Click on the "Create curve genius" button. Now you have the freedom to specify the position and size of the tool window.

Push left mouse button, drag a rectangle, and release the mouse button.



A new curve tool window with default visual parameters will be created at your specified position.

Click on the "setting" button that located in the right up corner of the curve window.



The "Curve Options" dialog will pop up. Click on the "Browser..." button to choose the data file.

.

Locate and choose the file "[VisGenie Folder] / Demos / PSNR.log". If you are interested, you can use Notepad to see the content of this file. The format of "PSNR.log" is very simple. Every row comprises a frame number and some PSNR values. In this example, we will only use the first PNSR value (i.e., the second column), which is the default setting. For a complete data file format specification, please refer to Data File Format Specification Page.



After you select the data file, click "OK" to exit the "Curve Options" dialog. At this moment we will not discuss the details on setting other parameters, which is specified on Using VisGenie Demo Studio Page.

Now click on the "Play" button in the video tool window, the video data is rendered. At the same time the curve window shows the PSNR value simultaneously.





Click on the "Save Demo" button and save your first VisGenie demo project.

Though this toy demo is very simple, it provides us some fundamental knowledge on how to create demo projects. For more demo projects, please refer to "[VisGenie in Start Menu] \ Demos".




Creating Video Analysis Platforms

Demos on Video Analysis Platforms

Again, let's firstly have a quick look at some built-in video analysis platforms. .

Shot Cut Detection

This demo shows a video analysis system that parse the video frames and try to find the shot cuts. Color histogram is adopted as the content feature, and two distance metrics are used: Euclidean distance and Cosine distance.

The project file of this system for Visual C++ 6.0 can be found at "[VisGenie in Start Menu] / Example Projects / Shot Cut".

Open the system at "[VisGenie in Start Menu] / Demos / Shot Cut".

Click on the "Go" button showing an arrow. A few tool windows are opened, including a video window, two curve windows, and a frame collection window.

The video file "lasvegas.mpg" should have been opened in the video window. If not, try to open it manually from "[VisGenie Folder] / Demos / lasvegas.mpg".

Click on the "Play" button in the video window. The video data is rendered. At the same time the color histogram of each frame is displayed in the color histogram window, and the histogram distance values are displayed in the other curve window. Once a shot cut is detected, the boundary frame will be added and displayed in the frame collection window.



Each boundary frame is associated with some information. The yellow bar on the left side of each frame is the confidence value, from 0.0 to 1.0. Right click on any frame, from the popup window, you will read the detailed information about the frame. You can customize such information in your application. Left click on the frame, the video playback will jump to the specified position.

Camera Motion Estimation and Object Tracking in Video

This demo shows a system that estimate the camera motion and track a specified object in the video. The camera motion estimation is realized through affine model regression, and the object tracking is based on Kernel Based Object Tracking. However, for simplification there is no real algorithms in the codes. Instead the camera motion parameters and the tracked coordination were recorded in a data file and retrieved during the playback. The key point here is to understand how VisGenie can provide support for such applications.

The project file of this system for Visual C++ 6.0 can be found at "[VisGenie in Start Menu] / Example Projects / Video Parser ".

Open the system at "[VisGenie in Start Menu] / Demos / Video Parser".

Click on the "Go" button from the toolbar. A few tool windows are opened, including a video window, a frame window, and a 3D scene window simulating a camera with a specific field of view.

The video file "stefan.m1v" should have been opened in the video window. If not, try to open it manually from "[VisGenie Folder] / Demos / stefan1.mpg".

Try to be familiar with the 3D navigation operation in the 3D scene window. Push left mouse button and drag, the scene will rotate. Push middle mouse button (if any) and drag, the scene will translate. Push right mouse button and drag, the scene will zoom in / out. You you finish the tryout, click on the "Setting" button in the right up corner of the 3D window, and choose "Restore default view point" from the menu.



Click on the "Play" button in the video window. The video data is rendered. At the same time a grayscale image is displayed in the frame window as a frame analysis example. The camera in the 3D scene animates to simulate the camera motion. A green rectangle is shown on the video window to indicate the position of the tracked object.

VisGenie+Matlab

This demo shows a system that integrate the functions in Matlab to help the video processing. Specifically the edge extraction function in Matlab is used to extract the edge map of each video frames.

The executable file of this demo provided in VisGenie is based on Matlab 6.5. If you are using other version, it might not be correctly launched. In this situation, you need to re-build the demo file. The project file of this demo can be found at "[VisGenie in Start Menu] / Example Projects / VisGenie+Matlab ".

Open the system at "[VisGenie in Start Menu] / Demos / VisGenie+Matlab ".

Click on the "Go" button from the toolbar. A few tool windows are opened, including a video window, a frame window, and a 3D scene window simulating a camera with a specific field of view.

The video file "foreman1.m1v" should have been opened in the video window. If not, try to open it manually from "[VisGenie Folder] / Demos / foreman1.mpg".

Matlab is also be launched in the background as the processing server.

Click on the "Play" button in the video window. The video data is rendered. At the same time an edge image is displayed in the frame window, which is obtained by calling Matlab function "Edge". The curve window also draws the color histogram of each frame.



You might noticed the video rendering is very slow. This is because Matlab runs very slow and the processing time of each frame is longer than the displaying time of each frame (Of course there are some ways to speed up the Matlab processing. But that's not the point here). One very useful feature of VisGenie is that it can choose not to skip frames in the case you have a complex frame by frame processing.

Now click on the "Setting" button on the right up corner of the video tool window, choose "Properties" from the pop up menu.

The "VideoGenius Options" dialog will appear. There is a check box named "Use the synchronization clock". Read the comments below the check box to learn more details. Currently it is switch off. Switch it on.



Click "OK" to exit the dialog. You need to click on the "Browser..." button to reopen the file so that your new setting can take effect.

When the video file is reloaded, play the video again. This time you will notice that the video will be rendered in a normal speed, whereas many frames are skipped in order to catch up with the rendering speed.

Building Your First Video Analysis Platform

Before building your first video analysis platform using VisGenie, make sure your system has been configured correctly based on the instruction in System Configuration.

Using VisGenie AppWizard

In this session you will learn how to create a VisGenie application through VisGenie AppWizard Note the illustration below is based on Microsoft Visual C++ 6.0. If you are using Visual C++.NET. You can open the project file "[VisGenie in Start Menu] / Example Projects / Video Template" to check the details.

Launch your Visual C++ 6.0.

From the menu choose "File / New...". The "New" dialog pops up.

Choose the "VisGenie AppWizard" from the "Projects" tab, and choose a project name, say "Test". And click on "OK" button.



A dialog titled "VisGenie AppWizard - Step 1 of 2" appears, where you can choose the tool windows you want in your project.

Try to click on each check box item, and read the tool information appeared below the check box group.

After the tryout, choose the first three tools: video, curve and image tool windows. Click "Next" button to continue.



A dialog titled "VisGenie AppWizard - Step 2 of 2" appears. Try to open an video file as the data source. If you don't have videos on hand, just use the ones at "[VisGenie Folder] / Demos". Leave other settings alone, click "Finish" button to continue.



A dialog summarizing your setting appears. Read it and click on the "OK" button. Your VisGenie project is now ready.

Press "F7" key to build the project. Then press "Ctrl+F5" to execute the program.

Click the "Go" button in the toolbar of the program, your analysis platform appears, with one video windows, one curve window, and one frame window, as you set it in the VisGenie Wizard.

Click on the "Play" button in the video window, the video is rendered. At the same time the luminance channel of each frame is displayed in the frame window, and a curve with random sampled pixel values is shown in the curve window.



Return to Visual C++, go to the file "CChildView.cpp", and locate the function member "BOOL CChildView::UpdateAllWindow(LPVFRAMEINFO lpFrame)". Within this function, you can notice the following sentence:



This is the place you should write your processing code on each frame. Locate the function "ImageProcessing". Currently it just provide some simple implementation: get the approximated luminance value by averaging red and green channel.



Now go back to the function "UpdateAllWindow". Locate the codes shown below. This is the place the curve window is updated. We will not specify the function calling method at this moment. Just pay attention to the second and third parameters, which are the frame number and the value of 100th pixel respectively. These two are actually the values for the x- and y- axes in the curve window.



Now locate the codes shown below. This is the place the image window is updated.

You can try to create a system with other tool windows, execute the program to see the visualization results, and read the generated codes to understand the mechanism. For more details about data format, structure definition, function specifications, pease refer to VisGenie Reference.

 

Summary

In this tutorial you learn the basic usage of VisGenie through a few built in demos and some simple projects. They are snapshots of VisGenie's fundamental functions. To learn VisGenie in a systematic way, please refer to Using VisGenie and VisGenie Reference.

 

For problems or questions regarding this web page please contact with me at ywang AT ee DOT columbia DOT edu.
Copyright © By Yong Wang All Rights Reserved
Last updated: March 1st, 2005