ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.06k stars 412 forks source link

resize inplace #171

Closed zhiboniu closed 3 years ago

zhiboniu commented 3 years ago

Hi,

I want to resize the images inplace by this : cv::resize(img, img, cv::Size(resized_width[0],resized_height), 0, 0, 0);

But I notice that the arguments of Simd::ResizeBilinear(src, dst) have to be different。How can I achieve the inplace version by simd?

Thankyou very much!

ermig1979 commented 3 years ago

I think that it will be look as:

Simd::View tmp(newSize, src.format);
Simd::ResizeBilinear(src, tmp);
src.Swap(tmp);