Only bgr colour space is supported but code running slowly