Quantcast
Channel: Intel® Software - Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1489

Median filter 7x7

$
0
0

I'm trying to convert the following code from Matlab to c++

 

function data = process(data)
    data = medfilt2(data, [7 7], 'symmetric');
    mask = fspecial('gaussian', [35 35], 12);
    data = imfilter(data, mask, 'replicate', 'same');
    maximum = max(data(:));
    data = 1 ./ ( data/maximum );
    data(data > 10) = 16;
end

I'm trying to understand if Intel IPP support median filter for uint16

I have looked here 

https://software.intel.com/en-us/node/502283

and here

https://software.intel.com/en-us/node/504137

and here

https://software.intel.com/en-us/articles/intel-integrated-performance-p...

and i'm kinda confued...

this is what my function signature looks like 

void Preprocessor::Process(uint16_t*& data, int width, int height)
{    
    Ipp16u* src = new Ipp16u[width * height];
    Ipp16u* dst = new Ipp16u[width * height];
    for (int i = 0; i < width*height; i++)
    {
        src[i] = data[i];
    }
    IppiSize mask = {7,7};
    IppiSize roiSize = {width, height};
    IppiPoint anchorPoint = {0,0};
    IppStatus status = ippiFilterMedian_16u_C1R(src,width,dst,width,roiSize,mask,anchorPoint);

}

Where can I find an example of how to apply a 2d median filter? 

how Can I know if IPP support 7x7 mask size?

Thanks

 

 

 


Viewing all articles
Browse latest Browse all 1489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>