The error that I'm getting on Postman
My Code:
@app.route('/getcoordinates', methods=['GET', 'POST'])
def get_image():
if request.method == 'POST':
file = request.files['image'].read()
#use numpy to construct an array from the bytes
x = np.fromstring(file, dtype='uint8')
#decode the array into an image
img = cv2.imdecode(x, cv2.IMREAD_UNCHANGED)
#In output we get the x&y coordinates of the face bounding box
output = give_coordinates(img)
else:
return "Error: No image provided. Please specify a image."
return jsonify(output)
Or can anyone tell me how to give a picture in POST request because I think that's where it's going wrong.