WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   MATLAB and Vizard (https://forum.worldviz.com/showthread.php?t=371)

eagleman 06-09-2005 02:05 PM

MATLAB and Vizard
 
I'm seeking a way to interface Vizard and Matlab. Specifically, I want to be able to dynamically read the graphics (e.g., the camera view) from Vizard into Matlab to do some analysis on the image, and then use Matlab to generate a camera movement command to feed back into Vizard.

I know about PyMat, but I still don't understand how to export the image data from Vizard into Matlab. Can someone help me with this? Thanks in advance!

David

tobin 06-10-2005 09:30 AM

Exactly what kind of data do you mean by "camera view". Do you mean a 4x4 view matrix for the virtual camera, or do you mean a VideoVision 640x480 RGB frame capture? And what goes which way? Once you explain that, we can probably provide you a way to accomplish this. Also, do you require real-time communication (e.g., 60 Hz), or intermittent (e.g., every few seconds or minutes)?

eagleman 06-10-2005 10:16 AM

I mean a 640x480 RGB frame capture. And the data will go both ways: first Matlab will read in the frame and do some analysis. Then it will feed a camera move command to Vizard. When Vizard updates its position to a new view, Matlab will read the next frame capture, and so on. This communication does not need to be real time, but will proceed one frame at a time at whatever rate it takes for Matlab to perform its computations.
Thanks so much in advance for your help.

tobin 06-10-2005 10:42 AM

Sorry, but I still need a little clarification. Does the 640x480 image go back into Vizard from matlab, or does "camera move" mean a 4x4 view transform matrix (i.e., instructions on where the virtual camera should be placed and direction pointed).

An easy conduit for sending the images from Vizard to Matlab would simply be via a image file save to the local harddrive. This is certainly not a real-time solution but would this be acceptable for you need?

eagleman 06-10-2005 11:42 AM

Ah, writing an image file save to the local harddrive is a nice solution -- thank you for that.

So the remaining task is to pass the camera movement back into Vizard. By that I mean a 4x4 transform matrix (or any other format of instructions) telling the virtual camera where to go.


All times are GMT -7. The time now is 02:52 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC