//Karthik Srinivasan

Product Engineer, CTO & a Beer Enthusiast
Experiments, thoughts and scripts documented for posterity.

Quirky Personal Projects

LinkedIn

Email me

Image processing Benchmarks

Aug, 2015


For this benchmark the following most widely used image processing libraries were considered.

Test environment

Original Image - 350KB - 3168x3168 pixels | Resized to 640x480
imagemagick x 3.69 ops/sec (+/-) 2.27% (23 runs sampled)
gm x 5.03 ops/sec (+/-) 0.68% (29 runs sampled)
opencv x 19.18 ops/sec (+/-) 1.27% (49 runs sampled)
epeg x 35.49 ops/sec (+/-) 1.16% (60 runs sampled)
vips x 40.62 ops/sec (+/-) 5.01% (69 runs sampled)

Original Image - 1 MB - 3000x2000 | Resized to 640x480
imagemagick x 4.97 ops/sec (+/-) 2.35% (29 runs sampled)
gm x 5.00 ops/sec (+/-) 0.54% (29 runs sampled)
opencv x 15.15 ops/sec (+/-) 1.36% (41 runs sampled)
epeg x 27.47 ops/sec (+/-) 0.98% (69 runs sampled)
vips x 36.26 ops/sec (+/-) 6.05% (89 runs sampled)

Original Image - 15MB - 5382x6254 pixels | Resized to 640x480
imagemagick x 0.87 ops/sec (+/-) 1.20% (9 runs sampled)
gm x 0.87 ops/sec (+/-) 0.66% (9 runs sampled)
vips x 1.74 ops/sec (+/-) 0.43% (13 runs sampled)
opencv x 1.88 ops/sec (+/-) 4.09% (9 runs sampled)
epeg x 3.87 ops/sec (+/-) 0.78% (14 runs sampled)

From the above results, VIPS seems to be the fastest among all followed by epeg and opencv. But one thing to consider is the features provided vs performance. Libraries such as VIPS and EPEG are more optimized towards image resizing and image cropping while opencv, graphicsmagick and imagemagick provides a slew of image processing and analysis features.

Source code for benchmarking: