Async method to process image

Includes random colours threshold (default to 2, from original code).
Fix crash if background color was not detected.
Merge pull request #4 from leolobato/async

Async