#1
|
|||
|
|||
Taking screenshots
Hello,
I'm trying to count the number of pixels of a certain colour in each frame of a scene (don't ask why!!!). It doesn't need to be quick as I'm running through the telemetry afterwards. My plan is to do something like: capture_tex = viz.addBlankTexture([1,1]) viz.window.screenCapture(capture_tex) data = capture_tex.getImageData() Then process the 'data' array. My problem is the screenCapture function (from here: http://docs.worldviz.com/vizard/comm...eenCapture.htm ) The top of the page says it takes a string (file to save screenshot to), but the example further down it has a texture object passed to it instead. Is this really possible? When I tried I get an error: File "C:\Program Files (x86)\WorldViz\Vizard30\python\viz.py", line 8160, in screenCapture _ipcSend(_VIZ_SCREENCAPTURE,0,0,fileName,0.0,0.0,0 .0,0.0) TypeError: message must be a string as if it really needs a string, and passing the texture object isn't correct. Any ideas? Thanks! Mike. |
#2
|
|||
|
|||
The docs you are referring to are for Vizard 4.0. You seem to be using Vizard 3.0, which that feature did not exist for.
If you are not able to upgrade to Vizard 4.0, then you can workaround the issue by capturing the screen to a file, then loading that file back into a texture. |
Tags |
capture, pixel, screenshot, texture |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
screenshots using a loop | krimble | Vizard | 2 | 09-14-2009 03:20 AM |
Anti-aliasing | Elizabeth S | Vizard | 7 | 10-18-2006 01:42 PM |
screenshots | vadrian | Vizard | 1 | 04-25-2005 07:17 AM |