Sign in to follow this  

Regarding scale space extrema

This topic is 3197 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I am developing an application to detect scale space extrema quite similar to how its done in SIFT (scale invariant feature transform). To begin with, i need the Gaussian pyramid. I already have the Gaussian pyramid using the mipmaps. Now i need the Laplacian pyramid that is obtained by subtracting each adjacent Gaussian pyramid image. The thing I want to ask here is what would be the best way of doing this calculation. What I was thinking was to use a fragment shader to find the Laplacian but I dont know how i would store the resulting image. Should i use glReadPixels or would it be too slow. Any ideas? Roughly speaking this is how i m thinking at the moment any input will be greatly apprecited.
AttachFBO
   SetShader3DTextureParam(myGaussianPyramidID);
   BindFragmentShader(myLaplacianShader);
   DrawFullScreenQuad();
   //Should i use glReadPixels or any other thing??? to get the laplacian image?
DetachFBO

Thanks, Mobeen

Share this post


Link to post
Share on other sites
hi all,
Currently, I have managed to calculate the Laplacian by using the slice by slice approach i mentioned in my last post. Now I want to store this Laplacian 2D texture into a 3D texture. Currently, I use FBO to calculate the Laplacian in the fragment shader and show the output on screen. How do i read back from a bound FBO. I know about glReadPixels and glGetTexImage. glReadPixels works but its very very slow, while I m unable to make glGetTexImage work. I always get error 1280 I have tried all the formats.
Do i need to detach the FBO and then read ?
Currently, I need to store the Laplacian into another 3D texture, is there a way that i can transfer my data directly (after modifying in the fragment shader) to the 3d texture or do i need to read slice by slice and copy to 3D texture myself?
This is how my flow is

AttachFBO();
SetLaplacianShader();
DrawFullScreenQuad();
//I tried glReadPixels but its very slow don;t know if it works or not
//but the opengl error bit is not set
glGetTexImage(..); //doesnot work at all i tried all the formats i get error ???
DetachFBO();



Any help will b appreciated.
Mobeen

[Edited by - mobeen on March 17, 2009 9:21:39 AM]

Share this post


Link to post
Share on other sites

This topic is 3197 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this