M
M
madbut2019-04-27 23:10:42
Python
madbut, 2019-04-27 23:10:42

Do you need some kind of constructor and free hosting with python support?

there is a python script from a couple of lines, the picture is taken and opened and the processing function from the opencv library is called.
Accordingly, the site should have a "download image" button, then process it with a python script, and display it on the screen / make it possible to download the result. How can I do that? I don't know web development. Therefore, it is desirable some kind of constructor, probably free hosting with python support
, here is my own python code, it would also be nice to be able to set the C parameter for the adaptiveThreshold function

import cv2 as cv
import os

img = cv.imread(os.path.dirname(__file__)+"\\input.jpg",0)
th3 = cv.adaptiveThreshold(img,maxValue=255,adaptiveMethod=cv.ADAPTIVE_THRESH_GAUSSIAN_C,thresholdType=cv.THRESH_BINARY,blockSize=41,C=10)

cv.imwrite(os.path.dirname(__file__)+'\\thresh.jpg',th3)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Fixid, 2019-04-27
@Fixid

flask

R
Roman Mirilaczvili, 2019-04-28
@2ord

The FaceEyeDetector project uses the Flask web framework, OpenCV and is hosted on Heroku.
+
Use OpenCV on deployed Flask app (Heroku)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question