Median filter

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Median filter

Gabriel Corvalan Cornejo
Hi,

I'm trying to implement a median filter. To achieve this goal, i will
create a new kernel like this:

template<typename PointInT, typename PointOutT>
class MedianKernel : public ConvolvingKernel <PointInT, PointOutT>

Is it the correct approach ?
I know that median filter is not based on convolution, it is a rank
filter, but the Convolution3D API seems to be useful for this task.

Another problem is related to the median filtering itself. Must I use a
fixed radius, or instead use a fixed number of neighbors ?

Thank you in advance.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Median filter

Radu B Rusu
Administrator
Gabriel,

That looks good to me. If the overlap is very high between the class that you want to implement and an existing class in
PCL, then either we did a poor job at naming our class to begin with, or the two share a lot of semantic information.
Either way, it shouldn't be a big problem.

Nizar is probably the author of the ConvolvingKernel class and can offer more input.

Cheers,
Radu.

On 06/19/2012 09:38 AM, Gabriel Corvalan wrote:

> Hi,
>
> I'm trying to implement a median filter. To achieve this goal, i will create a new kernel like this:
>
> template<typename PointInT, typename PointOutT>
> class MedianKernel : public ConvolvingKernel <PointInT, PointOutT>
>
> Is it the correct approach ?
> I know that median filter is not based on convolution, it is a rank filter, but the Convolution3D API seems to be useful
> for this task.
>
> Another problem is related to the median filtering itself. Must I use a fixed radius, or instead use a fixed number of
> neighbors ?
>
> Thank you in advance.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Median filter

Gabriel Corvalan Cornejo
Thanks for your answer.

I have implemented the median kernel easily, but concerning the radius
and fixed number of neighbors, the Convolution3D API provides only the
radius option. In my case, the number of neighbors make sens. Could this
feature be implemented into Convolution3D class, or need I to implement
it in my own Kernel class ?

Gabriel

On 20/06/12 01:47, Radu B. Rusu wrote:

> Gabriel,
>
> That looks good to me. If the overlap is very high between the class
> that you want to implement and an existing class in PCL, then either
> we did a poor job at naming our class to begin with, or the two share
> a lot of semantic information. Either way, it shouldn't be a big problem.
>
> Nizar is probably the author of the ConvolvingKernel class and can
> offer more input.
>
> Cheers,
> Radu.
>
> On 06/19/2012 09:38 AM, Gabriel Corvalan wrote:
>> Hi,
>>
>> I'm trying to implement a median filter. To achieve this goal, i will
>> create a new kernel like this:
>>
>> template<typename PointInT, typename PointOutT>
>> class MedianKernel : public ConvolvingKernel <PointInT, PointOutT>
>>
>> Is it the correct approach ?
>> I know that median filter is not based on convolution, it is a rank
>> filter, but the Convolution3D API seems to be useful
>> for this task.
>>
>> Another problem is related to the median filtering itself. Must I use
>> a fixed radius, or instead use a fixed number of
>> neighbors ?
>>
>> Thank you in advance.
>> _______________________________________________
>> [hidden email] / http://pointclouds.org
>> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Median filter

Radu B Rusu
Administrator
You should implement it in your own class first. This can always be abstracted out and moved to the base class that
you're inheriting from, as soon as we have additional children that are using it.

Cheers,
Radu.

On 06/20/2012 01:27 AM, Gabriel Corvalan wrote:

> Thanks for your answer.
>
> I have implemented the median kernel easily, but concerning the radius and fixed number of neighbors, the Convolution3D
> API provides only the radius option. In my case, the number of neighbors make sens. Could this feature be implemented
> into Convolution3D class, or need I to implement it in my own Kernel class ?
>
> Gabriel
>
> On 20/06/12 01:47, Radu B. Rusu wrote:
>> Gabriel,
>>
>> That looks good to me. If the overlap is very high between the class that you want to implement and an existing class
>> in PCL, then either we did a poor job at naming our class to begin with, or the two share a lot of semantic
>> information. Either way, it shouldn't be a big problem.
>>
>> Nizar is probably the author of the ConvolvingKernel class and can offer more input.
>>
>> Cheers,
>> Radu.
>>
>> On 06/19/2012 09:38 AM, Gabriel Corvalan wrote:
>>> Hi,
>>>
>>> I'm trying to implement a median filter. To achieve this goal, i will create a new kernel like this:
>>>
>>> template<typename PointInT, typename PointOutT>
>>> class MedianKernel : public ConvolvingKernel <PointInT, PointOutT>
>>>
>>> Is it the correct approach ?
>>> I know that median filter is not based on convolution, it is a rank filter, but the Convolution3D API seems to be useful
>>> for this task.
>>>
>>> Another problem is related to the median filtering itself. Must I use a fixed radius, or instead use a fixed number of
>>> neighbors ?
>>>
>>> Thank you in advance.
>>> _______________________________________________
>>> [hidden email] / http://pointclouds.org
>>> http://pointclouds.org/mailman/listinfo/pcl-users
>
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users