[vtkusers] setting vtkCamera as OpenCV camera

Elvis Chen elvis.chen at gmail.com
Wed Jul 20 11:35:28 EDT 2011


hi all,

I would like to use OpenCV and VTK for an AR application.  Thus far, we have
use OpenCV/OpenGL for a simple proof-of-concept application and it works
well.  I would like to bring this application to VTK but have some problems.

first off, it is about fusing OpenCV video and VTK actors.  I know how to
bring OpenCV video into VTK based on the earliest post (
http://www.vtk.org/pipermail/vtkusers/2010-June/109465.html) and have done
so using OpenCV video as the background in the renderer.

I then tried to set vtkCamera using the OpenCV camera calibration, and
display a vtk actor at a location where I know the true-location of in the
OpenCV camera coordinate system.  But the vtkActor does not align with the
real object in the OpenCV video.

the opencv calibration parameters were entered to a vtkCamera using
vtkCamera::SetUserViewTransform(), which I don't think is the proper way of
doing so.

Has anyone done something similar to this?  If so, I would really appreciate
any help.

thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110720/61ab5946/attachment.htm>


More information about the vtkusers mailing list