Fast Median Filter in C / C++ for `UINT16` 2D Array

后端 未结 5 2054
遥遥无期
遥遥无期 2020-12-31 23:50

Does anyone know a fast median filter algorithm for 16-bit (unsigned short) arrays in c++?

http://nomis80.org/ctmf.html

This one seems quite promising, but i

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 00:06

    The technique in the paper relies on creating a histogram with 256 bins for an 8 bit pixel channel. Converting to 16 bits per channel would require a histogram with 65536 bins, and a histogram is required for each column of the image. Inflating the memory requirements by 256 makes this a less efficient algorithm overall, but still probably doable with today's hardware.

    Using their proposed optimization of breaking the histogram into coarse and fine sections should further reduce the runtime hit to only 16x.

    For small radius values I think you'll find traditional methods of median filtering will be more performant.

提交回复
热议问题