[OpenGL]Realization of Hough Transform in OpenGL

asked 2015-03-27 11:17:23 -0500

Hi, today I was working on my Hough Transform function, but it came way way too slow, although my efforts to optimize it. The OpenCV version of the function have the same performance.

Not so long ago, I wrote one program, that was using OpenGL rendering to texture and sampling from the same texture. There wasn't problem, because It was reading from pixel (a,b) and after the processing It was writing to the same pixel. I tough that the same idea can be used for Hough Transform, but there is one big problem: if I'm reading from one pixel and I'm writing to other there is possibility, that two threads could read/write to the same pixel.

Now the question: Is there way to increment the value into the OpenGL output, without knowing the exact value ?

p.p. Maybe that isn't the right forum for that question, but that is the only place, that I know that here have people that can help me ;)

edit retag flag offensive close merge delete

Comments

Sorry, I don't undestand your question. But the Hough image has nothing to do with the raw image. There will be no pixel by pixel calculation.

If you try to replace the raw image with the Hough image, allocate the memory for the Hough image, calculate it and then pass the data pointer to the raw image.

The second thing that I don't undestand is, why you want to use OpenGL to do this. OpenCL would be the right API to do this on GPU.

If I misunderstand you, sorry for my answer.

matman gravatar imagematman ( 2015-03-27 11:38:13 -0500 )edit

I was trying to say, that I will try the transformation from the raw image to the hough image with GPU. The problem is that I don't have OpenCL on the target platform, so I will have to do it with OpenGL. I have one idea and I will try to realize it in Monday.

Spas Hristov gravatar imageSpas Hristov ( 2015-03-27 16:43:26 -0500 )edit