Last active
May 2, 2019 02:57
-
-
Save WadsonGarbes/50fcf4c57765e6b1bfc2d7e704967d1e to your computer and use it in GitHub Desktop.
Flask Fingerprint webapp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.route('/dataupload',methods=['GET','POST']) | |
def dataupload(): | |
if request.method == 'POST' and 'img' in request.files: | |
file = request.files['img'] | |
filename = secure_filename(file.filename) | |
# os.path.join is used so that paths work in every operating system | |
# file.save(os.path.join("wherever","you","want",filename)) | |
file.save(os.path.join('static/uploadsDB',filename)) | |
fullfile = os.path.join('static/uploadsDB',filename) | |
img = cv2.imread(filename) | |
converted_img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR) | |
dst = cv2.fastNlMeansDenoisingColored(img,None,10,10,7,21) | |
return render_template('details.html', digital=dst) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment