I am using Opengl for model projection in a Machine Vision application. I need to read back the projection to perform a comparison with an image.
Is there anyway to speed up the glReadPixels op or avoid it? Can I expect a Speed increase with different Video Cards, AGP 8X? I am using an Nvidia MX440 under Linux.
but the link is now down and I am away from my computer with the software so I can’t send it to you for a few days, maybe someone else could provide you with a link? I would be very interested to see how much better an AGP8x card performs in that test.
try all the various methods + data types
eg dont just try RGB with GLubyte but try it also with packed pixels or with BGR etc
it can vary 1-10x speedwise
I am get a time of ~8ms to transfer a single 640*480 frame (averaged over a thousand frames).
I am having trouble with the nvidia extensions, I can’t figure out how to get them to work! wglAllocateMemory doesn’t work I think its a linking issue, call gives null reference error. but I can’t find obvious documentation on how to link this in windows. Any help appreciated.
You need to retrieve function pointers for extension functions using wglGetProcAddress. For example, this is what you would do to use wglAllocateMemory:
declare the function:
PFNWGLALLOCATEMEMORYNVPROC wglAllocateMemoryNV;
retrieve a function pointer for the function:
wglAllocateMemoryNV = (PFNWGLALLOCATEMEMORYNVPROC)wglGetProcAddress(“wglAllocateMemoryNV”);
hey Troberts, what are you working on? I’m a postgrad in computer vision, too, and intend to use OpenGL to accelerate colour consistency checks and mesh optimisation. Maybe.
Ph.D. in Human Tracking. I use Opengl for model projection. Basically I use a 3D model with a textured surface, capture the framebuffer and compare a statistical model of the appearance with the image. My papers are published in ICCV and BMVC (2002). Opengl has worked really well for me although I would love to know how to speed up the glReadPixel transfer, hence the post. Tim.
I don’t have the equipment at the moment but within the next few months I am building a new workstation and will investigate fully the effect of different memroy settings, AGP and the nvidia extensions. Thanks again for your help, Tim.