You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made the tests with the image you shared and I got quite different results:
pillow-resize: 26448 μs
OpenCV (4.10.0): 2755 μs
PIL (python 3.12 + PIL 11.0.0): 29189 μs
In my environment, the results between pillow-resize and PIL seem comparable, which makes sense since they are based basically on the same code. OpenCV is way faster for me too, but for "only" one order of magnitude. I never dug too much inside the OpenCV code, so I'm not sure the reason behind this difference. I guess it is because of a more optimized code and probably due to the non-exact antialiasing algorithm.
Back to your case, I can't explain your results since they are quite different from mine. Can you share more details about the environment and the compilation methods of the scripts?
I resize one image to 448 * 448:

pillow-resize use 32382 us.
opencv resize use 337 us.
python image.resize() use 7209 us.
codes like:
The text was updated successfully, but these errors were encountered: