|
#1
|
|||
|
|||
Grabbing screen shots (but not to file)
I would like to be able to capture the current screen to a python object of some sort (list, string, I don't really care). Is this possilbe in Vizard, or can I only dump to .BMP files?
I can install PIL then open and read in the BMP file, but reading the file it not optimal as it may begin before the file writing ends (plus it involves using another third-party software along with Vizard). It would be much nicer if it could be done within Vizard. --------- If this is not possible, any suggestions on how to quickly get the screen buffer would be appreciated. Last edited by pbeeson; 08-29-2006 at 03:11 PM. |
#2
|
|||
|
|||
There is no command that will return the raw data of the screen capture. Capturing to a file and reading the file is probably the easiest solution. Do you need this for real-time use?
When you issue the viz.screencapture command the file is not created immediately. It is created at the end of the next frame. So when you issue the command wait until the next frame before reading the file. |
#3
|
|||
|
|||
It would be nice to get this in real-time. I thought it might be possible to install pyopengl and grab the screen buffer, but I'm not sure exactly how to tell the python OpenGl code which OpenGL buffer it should care about. Does Vizard store the ID of the OpenGl window it opens?
This is mostly just for displaying the Vizard display on a linux machine that is running software that interacts with Vizard via an xmlrpc server I set up (using Vizard as a robot simulation environment). I'm thinking the easiest thing might just be to run a vncserver in Windows and view the Windows desktop in Linuz through a vnc-client, but it would have been nice to send the Vizard screen buffer (as a string) through the xmlrpc interface. ---------- Any more suggestions are welcome. BTW, I'm new to Vizard, so where can I report bugs? |
#4
|
|||
|
|||
You want to stream the frame buffer uncompressed at 60 hz? What window size are you running in?
Quote:
A plugin could be made to capture the screen contents of the graphics window and return it as a string in python. If you are using Vizard 3.0 then I could create this plugin for you. Quote:
|
#5
|
|||
|
|||
Quote:
Quote:
Unfortunately, I'm running Vizard 2.53g. Is that a deal breaker? Regardless, I'll contact support to beta test v3.0, but I'll have to ask my employer about his plans to upgrade our Vizard purchase an upgrade to v3 when it comes out. Let me know. Last edited by pbeeson; 08-30-2006 at 07:55 AM. |
#6
|
|||
|
|||
Quote:
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|