#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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)?
|
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
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? |
#5
|
|||
|
|||
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. |
|
|