IPP Equivalent of MATLAB's im2col

IPP Equivalent of MATLAB's im2col


I want to apply an operation on a sliding window over an image.
Yet it is Spatially Variant hence cannot be executed ad a convolution.

My question is, does Intel IPP has something equivalent of MATLAB im2col function (And of course the opposite way col2im)?

Those are needed in order to Vectorize the operation and keep the highest performance.

Unless there are better more optimized way to engage vectorization when dealing with Spatially Variant filters.

Thank You.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

hi Royi,

it is possible, but I think will be too expensive, as requires several steps:

1) transpose an image - so columns become rows

2) create additional IppiSize structure with your sliding window width and height

3) define the new image (sliding window) step that is == your window width*sizeof(your data type)

4) one limitation of such approach - your image should be dense (step == width*sizeof(data type) or width*height of window < image width

for col2im you can use the same approach - transpose, etc. but I think that simple C-loop will be more efficient and doesn't have any limitations.

regards, Igor

Leave a Comment

Please sign in to add a comment. Not a member? Join today