Displaying opencv image using python flask Displaying opencv image using python flask flask flask

Displaying opencv image using python flask


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())