adding some tests for the fill auto feature
redis was failing while running the tests since the password wasnt being passed
better error message and more compact code
changing function that auto detects the fill color to get_median_color, which makes more sense
The color auto detection is now made in c and doesnt use opencv. Got a speed bump of around 100%.

Current ab results:

ab -n 100 -c 4 "http://127.0.0.1:8888/unsafe/fit-in/500x500/filters:fill(auto)/http://www.hdwallpapers.in/walls/abstract_color_background_picture_8016-wide.jpg"
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)...Send request failed!
Send request failed!
..done

Server Software:        Thumbor/3.7.1
Server Hostname:        127.0.0.1
Server Port:            8888

Document Path:          /unsafe/fit-in/500x500/filters:fill(auto)/http://www.hdwallpapers.in/walls/abstract_color_background_picture_8016-wide.jpg
Document Length:        15434 bytes

Concurrency Level:      4
Time taken for tests:   25.531 seconds
Complete requests:      100
Failed requests:        1
(Connect: 0, Receive: 0, Length: 1, Exceptions: 0)
Write errors:           2
Total transferred:      1542088 bytes
HTML transferred:       1520506 bytes
Requests per second:    3.92 [#/sec] (mean)
Time per request:       1021.230 [ms] (mean)
Time per request:       255.307 [ms] (mean, across all concurrent requests)
Transfer rate:          58.99 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0  280 437.2     17    1049
Processing:     0  726 460.1    988    1357
Waiting:        0  725 459.8    987    1357
Total:        258 1006 133.1   1014    1357

Percentage of the requests served within a certain time (ms)
50%   1014
66%   1028
75%   1033
80%   1036
90%   1040
95%   1043
98%   1357
99%   1357
100%   1357 (longest request)

New C implemented auto detection results:

ab -n 100 -c 4 "http://127.0.0.1:8888/unsafe/fit-in/500x500/filters:fill(auto)/http://www.hdwallpapers.in/walls/abstract_color_background_picture_8016-wide.jpg"
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done

Server Software:        Thumbor/3.7.1
Server Hostname:        127.0.0.1
Server Port:            8888

Document Path:          /unsafe/fit-in/500x500/filters:fill(auto)/http://www.hdwallpapers.in/walls/abstract_color_background_picture_8016-wide.jpg
Document Length:        15434 bytes

Concurrency Level:      4
Time taken for tests:   13.589 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      1565200 bytes
HTML transferred:       1543400 bytes
Requests per second:    7.36 [#/sec] (mean)
Time per request:       543.559 [ms] (mean)
Time per request:       135.890 [ms] (mean, across all concurrent requests)
Transfer rate:          112.48 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   152  535  48.3    541     566
Waiting:      152  535  48.3    541     566
Total:        153  535  48.3    541     566

Percentage of the requests served within a certain time (ms)
50%    541
66%    543
75%    544
80%    547
90%    553
95%    556
98%    566
99%    566
100%    566 (longest request)