make sure array is contiguous before passing it to OpenCV
fixes #5