I have a downloaded file in memory. I want to manipulate a cv2 file. I am currently writing a file to disk and then reading it from cv2. How can I skip file recording and upload it directly using cv2?
file = request.files['file'] # if file and allowed_file(file.filename): # save file filename = secure_filename(file.filename) file_path = os.path.join(dressrank.config['SHOW_IMG_FOLDER'], filename); file.save(file_path) img_path = file_path # COLOR FATURE EXTRACTION img = read_img(img_path) img =img_resize(img, 500)
source share