cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405 MEDIANFILTER

michael239955_stm1
Associate II
Posted on April 04, 2014 at 13:03

Hey,

Does anybody know a DSP-Function for a medianfilter? with filterlength of 5 points.

At the moment I have written the filter with for-loops, and it is too slow for my application.

Thank you,

Michael

#m
2 REPLIES 2
frankmeyer9
Associate II
Posted on April 04, 2014 at 13:39

The DSP lib for F4 parts (from ST's website) contains a bunch of DSP-like functions, presumably also a filter implementation you can use.

At the moment I have written the filter with for-loops, and it is too slow for my application.

 

How about cranking up optimization level ?

As an example, a FFT implementation I tried on a F407 took 10ms with -O0, and 2,4ms with -O3.

jpeacock2399
Associate II
Posted on April 04, 2014 at 16:05

Do you make use of the DSP instruction set for the M4 core?  Depending on your resolution you can do SIMD for 8 and 16 bit values, and there are MAC type instructions.  If you are doing floating point and can use single precision there's the FPU instruction set too.

  Jack Peacock