如何将 opencv 终端输出打印到网页 (Python)

How to print an opencv terminal output to a webpage (Python)

是否可以获取opencv终端输出并将其打印到网页上?我会很感激一些 help/advice,谢谢!

如果您已经在使用 Flask,可能只需要从您的@route 返回一个字符串(而不是将其打印到终端):

app = Flask(__name__)

@app.route('/')
def hello():
    # ... some opencv code, calculating circles
    return 'We have %d circles !' % (len(circles[0, :]),)