Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

werkzeug.datastructures.filestorage to numpy

#read image file string data
filestr = request.files['file'].read()
#convert string data to numpy array
npimg = numpy.fromstring(filestr, numpy.uint8)
# convert numpy array to image
img = cv2.imdecode(npimg, cv2.CV_LOAD_IMAGE_UNCHANGED)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy
ADD COMMENT
Topic
Name
8+9 =