Flexman Posted November 7, 2011 Share Posted November 7, 2011 I need to read the pixel intensities in a TBuffer, only a small number as I need to simulate how a sensor looks at the centre of the image and works out where sharp changes of contrast occur (to create a tracking box around a moving image based on visual information only). I see it only needing to s looking at 4 pixels ever other frame and step outwards until it finds an intensity of more than 20%. I wonder if anyone has any caveats I should look out for with regard to video cards and pixel formats in Leadwerks engine. Would HDR muck this up given that I'm reading from a buffer I created using just COLOUR0? Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
Josh Posted November 7, 2011 Share Posted November 7, 2011 The BlitzMax texture.GetPixels() method will return a pixmap. If you retrieve data from the GPU in real-time, the code execution on the CPU will stop and wait for the GPU to catch up. This is something the engine never does, we always keep data flowing to and around in the GPU, never back to the CPU. Occlusion queries are a special case because they have a mechanism to check if the GPU is finished, so we don't wait for the results. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Flexman Posted November 7, 2011 Author Share Posted November 7, 2011 I'll give it a go and if it's stalling the pipeline too much I'll have to fake it, I don't think there's another way to get feedback on partial image contrast. Unless I can fake it using the AABB and lighting conditions but the idea is to be able to look at a texture of a window and have it able to "step outwards" till it either has bounded the window or fails from poor image contrast or image instability. Cheers Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.