[vtkusers] vtkWin32VideoSource

Jono raromaunga at xtra.co.nz
Sun Feb 29 11:25:47 EST 2004


hey vtkusers

i've been interested in using vtk for my graduate study in animal behaviour
for some time, but havent any experience with it til now.

I want to monitor a dv camera signal and capture consecutive frames to a
buffer.  i have hacked the following which brings up a window showing video
from my tv tuner card, but if i set input to dv camera, the overlay window
is black.  Im just using the vtkRenderWindowInteractor as a lowlife way to
keep the thread alive.

int main(int ac, char **av)
{
    vtkRenderer *renderer = vtkRenderer::New();
    vtkRenderWindow *renWin = vtkRenderWindow::New();
    renWin->AddRenderer(renderer);
    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(renWin);

    vtkWin32VideoSource *videoSrc = vtkWin32VideoSource::New();
    videoSrc->Print(cout);

    iren->Initialize();
    renWin->Render();

    videoSrc->VideoSourceDialog();
    videoSrc->VideoFormatDialog();
    videoSrc->SetPreview(1);
    videoSrc->PreviewOn();

    iren->Start();
    videoSrc->Delete();
    renderer->Delete();
    renWin->Delete();
    iren->Delete();

    return 0;
}


i'm using win2k, MSVC6, vtk 4.2 and a JVC GR-DVL 9800 camera connected by
firewire.  it wld be really useful if somebody could post some code showing
use of the vtkWin32VideoSource & vtkVideoSource classes.

also, could anybody tell me if the kitware books would be much help in this?

cheers

jonathan poff
christchurch
new zealand




More information about the vtkusers mailing list