As mentioned in the comments, you need to return the bytes of an image, not a base64 string.
Try the following:
retval, buffer = cv2.imencode('.png', output_img)response = make_response(buffer.tobytes())