Search code examples
pythonopencvhough-transform

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


Is it possible to get an opencv terminal output and print it to a web page? I would appreciate some help/advice, thanks!


Solution

  • if you're already using flask, it's probably just a matter of returning a string from your @route (instead of printing it to the terminal):

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