Date Version Description Jun. 24 0.8.1.3Beta
- Add console based video frame (image and audio) processing library and demo project.
Mar. 18 0.8.1.2Beta
- Modified the synchronization mechanism of the video genius so that it will be more robust against deadlock.
- Cleared the resource leak in the curve genius that might result in crashing.
- Enriched the functionalities of the live video genius.
- Added the support for audio rendering and processing.
- Added the support for image rendering and processing.
- Updated the AppWizard to accomodate more pre-generated options.
- Updated the matlab demo to support direct rendering, and also cleare the bug in memory reallocation.
- Corrected the bug of timestamp mismatch during interactive navigation in the frame collection genius.
Nov. 13 0.8.1.1Beta
- Corrected the bug that may result in crashing when selecting some YUV format for capturing.
- Corrected the bug in VisLive demo that may result in crashing when you exit the program without running any capturing.
- Corrected some interface bugs.
Nov. 8 0.8.1.0Beta
- Added the support for live video source (captured from digital video camera)
- Added the support for OpenCV system
- Correct the bug in video data analysis module that may lead to wrong image dimensions.
- Corrected several other minor bugs.
Jul. 22 0.8.0.9Beta
- Corrected a bug in YUVGenius that will result in improper playback (the max speed-up frame rate is left uninitialized when using property dialog to ask for YUV format).
Jul. 19 0.8.0.8Beta
- Upgraded YUVGenius so that it supports rendering speed change (such as 4x or 1/4x speed rate), or even reverse playback.
- Update the sample projects that were out-of-date.
Jul. 1 0.8.0.7Beta
- Modified CurveGenius so that VisGenie Demo Studio can navigate to the specific frame position when the curve in the curve window is clicked. When curve clicking happens, CurveGenius also sends message to the specified window for any potential processing.
Jun. 20 0.8.0.6Beta
- Corrected the bug in VideoGenius that caused some applications crashing when exiting.
Jun. 17 0.8.0.5Beta Jun. 10 0.8.0.4Beta
- Updated YUVGenius to add an option to automatically save YUV file format.
- Corrected the bug of insufficient key length in generating demo project files.
Jun. 9 0.8.0.3Beta Apr. 6 0.8.0.2Beta
- Replaced some video clips due to copyright issue.
Apr. 1 0.8.0.1Beta
- Added support to partial video playback based on specified segmentation.
- Corrected some user interface errors.
Mar. 29 0.8.0.0Beta
- First VisGenie Release
Priority Description High
- Add the support for live video source (Done!)
- Add the support for OpenCV system (Done!)
- Add the support for audio data analysis (Done!)
- Add the support for image data analysis (Done!)
- Enhance the functionalities of CurveGenius
- A better synchronizatino mechanism for VidoeGenius (Done!)
- Finish the online help document
- Refine the GUI
- Enhance the functionalities of 3DGenius
What is VisGenie?
[SDK] Where is the process when a media file is loaded
[SDK] How to get the associated file name?
[SDK] How to get the frame time
[SDK] How to switch bewteen synchronous and asynchronous mode
[SDK] How to jump to specific time frame
[SDK] How to draw directly on the playback window through GDI
[SDK] How to merely play part of the video contents
[SDK] How to draw individual unconnected points instead of connected lines in curve window
For an introduction on VisGenie, please refer to the page Introduction to VisGenie
When a media file is loaded, VideoGenius will call the callback function FrameCallback(DWORD dwMsg, LPVFRAMEINFO lpFrame), which is specified by users when the video window is created. The event code dwMsg will be set as VM_DATALOADED. Corresponding actions can be added accordingly. Please see the demo project "Video Parser" for an example on how the callback function is used to run initialization process when the media file is loaded.
The media file name can be obtained by calling IVideoGenius::GetVideoInfo(void). By this way you can also get other useful video information such as the duration and resolution.
When each frame is ready to be rendered, the callback function FrameCallback(DWORD dwMsg, LPVFRAMEINFO lpFrame) will be called. In the structure VFRAMEINFO, the frame time (in the unit of 100 nanoseconds, or 100ns) ) will be specified. Please read the structure VFRAMEINFO in the file IFace.h for more information.
The synchronization clock in the video window can be switched using the following codes. The setting will take effect next time a file is opened.
Use sync clock: pVideoGenius->SetVideoOption(pVideoGenius->GetVideoOption() & (~DS_VIDEO_NOSYNC))
Not use sync clock: pVideoGenius->SetVideoOption(pVideoGenius->GetVideoOption() | DS_VIDEO_NOSYNC)
Frame jumping can be done by calling IVideoGenius::SeekVideo(LONGLONG llTimestamp), where the timestamp is in the unit of 100ns.
You can do whatever GDI drawing on each video frames before it is rendered on the screen. To do so define the frame drawing callback functionHRESULT (FAR CALLBACK *LPVIDEORENDERCALLBACK) (LPVOID lpPara) and use IVideoGenius::CreateVideoWindowEx() to generate the video window. When each frame is ready, in this callback function you can get the GDI DC handle and do GDI drawing. Please see the demo project "Video Parser" for an example on how to do this.
Please see the demo project "Shot Cut " for an example on how to do this. Run the demo "Shot Cut" from "[VisGenie in Start Menu]\Demo". Play the video "lasvegas.mpg" to the end, so that a set of key frames is collected. Click on any of the key frame, the video will jump to the frame, and be rendered for 5 seconds. You can notice the blue range in the video window indicating the short segment.
Now Open the source code project from "[VisGenie in Start Menu]\Example Projects\Shot Cut". In the file "CChildView.cpp", locate the following codes:
sttSetRangeInfo.llStart = lpFrame->llTimeStamp;
sttSetRangeInfo.llEnd = lpFrame->llTimeStamp + 50000000;
sttSetRangeInfo.bPlayAfterSet = TRUE;
This is the place you can set the playback range. Note the time (lpFrame->llTimeStamp, 50000000) is in the unit of 100ns. More generally, you just call the function SendVideoCommand as shown here when you want to partially play the videos.
Some more options:
a). If you want to jump to the specific frame and pause, replace the line:
sttSetRangeInfo.bPlayAfterSet = TRUE; with:
sttSetRangeInfo.bPlayAfterSet = FALSE;
b). If you just want to jump to the specific frame without setting a play
range, replace the line:
sttSetRangeInfo.llEnd = lpFrame->llTimeStamp + 50000000; with
sttSetRangeInfo.llEnd = 0;
You have two ways to do so:
1. direct control of GDI DC by calling ICurveGenius::GetPanelHDC()
2. render atom by calling ICurveGenius::RenderAtom()
Please see the codes below for such examples:
/// Sample code: showing how to draw items rather than curve.
///  First approach: direct control of GDI DC. By this way
/// virtually you can use any GDI APIs to facilitate your rendering.
/// Please note by this way the coordinate values are the client-area
/// coordinates. i.e., (0, 0) corresponds to the left-top corner of
/// the curve window's client area. You have to take care of the coordinate
/// conversion if you want to use logic coordinate.
/// 1.1 Get the panel DC handler
HDC hDC = pCurveWnd->GetCurveGenius()->GetPanelHDC();
/// 1.2 Create a pen
HPEN hPen = CreatePen(PS_SOLID, 1, RGB(0XFF, 0XFF, 0X00));
/// 1.3 Select the pen and store the environment
HGDIOBJ hOld = SelectObject(hDC, (HGDIOBJ)hPen);
/// 1.4 Draw the line as you want
MoveToEx(hDC, 10, 10, NULL);
LineTo(hDC, 50, 50);
/// 1.5 Restore the environment
///  Second approach: through RenderAtom function. This function
/// in currently partially implemented. The following atoms are supported:
/// AT2D_POINT, AT2D_LINE, AT2D_RECTANGLE, AT2D_CIRCLE, AT2D_ELLIPSE; and
/// others reserved. The coordinate values are consistent with the ones
/// used in drawing the curves.
/// 2.1 Construct an atom
sttAtom2D.enmatmType = AT2D_LINE; /// Line
sttAtom2D.clrLine = RGB(0X00, 0XFF, 0X00); /// Green
sttAtom2D.nLineMode = PS_DASHDOT; /// Dash-Dot
sttAtom2D.nLineWidth = 2; /// 2 pixel wide
sttAtom2D.sttAtomData.atmLine.nOptions = 0; /// Reserved
ptVal.dX = 10; /// Start X
ptVal.dY = 10; /// Start Y
sttAtom2D.sttAtomData.atmLine.ptStart = ptVal;
ptVal.dX = 50; /// End X
ptVal.dY = 50; /// End Y
sttAtom2D.sttAtomData.atmLine.ptEnd = ptVal;
/// 2.2 Call RenderAtom() to render the atom. The second parameter
/// is used to set whether save and redraw the atom (e.g., when OnPaint()
/// is called).
|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|