Median Filtering with variable radius

Hi,

I’d like to implement a median filter on a very very large array of float data with different radius.
I have put my array in a texture 1D, and I’d like to declare an array of size temp[radius] in which I’ll put the values that a thread would have to sort. But this is not possible in CUDA, it says that I cannot decare dynamic memory in my kernel.
I don’t know how to proceed.

Thks !

Presumably there is some maximum radius, so you could declare a local array of the maximum size? Wasteful maybe, but it would work.

FYI, there are some clever algorithms for doing median filters quickly:
[url=“Shell & Slate - Fast Median and Bilateral Filtering”]http://www.shellandslate.com/fastmedian.html[/url]

Presumably there is some maximum radius, so you could declare a local array of the maximum size? Wasteful maybe, but it would work.

FYI, there are some clever algorithms for doing median filters quickly:
[url=“Shell & Slate - Fast Median and Bilateral Filtering”]http://www.shellandslate.com/fastmedian.html[/url]