Skip to content

Instantly share code, notes, and snippets.

@WadsonGarbes
Last active May 2, 2019 02:57
Show Gist options
  • Save WadsonGarbes/50fcf4c57765e6b1bfc2d7e704967d1e to your computer and use it in GitHub Desktop.
Save WadsonGarbes/50fcf4c57765e6b1bfc2d7e704967d1e to your computer and use it in GitHub Desktop.
Flask Fingerprint webapp
@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