Skip to main content
michael239955_stm1
Associate II
April 4, 2014
Question

STM32F405 MEDIANFILTER

  • April 4, 2014
  • 2 replies
  • 928 views
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
    This topic has been closed for replies.

    2 replies

    frankmeyer9
    Associate III
    April 4, 2014
    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 III
    April 4, 2014
    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