there is a python script from a pair of lines, the picture is taken and the processing function from the opencv library is called.
accordingly, the site should have a button “upload image”, then process it with a python script and display it on the screen / give the opportunity to download the result. How can I do that? I do not own web development. Therefore, it is desirable that a constructor is probably a free hosting with python support.
Here is the code on the python, 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)