fix a bug when no contour is send to ocr