Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6699 Discussions

Manipulate srcStep to do Median Filtering along diagonals?


Image Median of a large neighborhood can be approximated well (and much faster) by computing the median of medians using line medians.
In that context I wish to compute the median along diagonals (i.e. neither rows nor columns), but IPP does not seem to support this?
Would it be possible to accomplish this by computing a median with a column mask(1x3 or 1x5) on an image where the srcStep is artificially increased or decreased by an amount corresponding to the storage required for one pixel?

In the interior of the image I'd end up median filtering along diagonals as intended, but I'm no quite sure what will happen along image boundaries and if/how to use ROI in connection with this. Also row count times srcStep will in general NOT correspond to the amount of memory occupied by the image. Will that pose a problem and can it be avoided by using a sufficiently large boundary below the ROI?

I wish to approximate the median of an Ø15 octagonal neighborhood by first applying a 7x7 (square) median followed by two successive 5-pixel medians along diagonals in opposite directions.

0 Kudos
1 Reply

1. For such using of this function you have to make sure that there are not memory accesses outside the image.

2. After your modification of srcStep the processing steps from the image line to the next line will not be executed correctly. Thus, only the first line of the image will be processed correctly, i.e. for correctly processing ROI must me equal (1, x).



0 Kudos