andfanilo / streamlit-drawable-canvas

Do you like Quick, Draw? Well what if you could train/predict doodles drawn inside Streamlit? Also draws lines, circles and boxes over background images for annotation.
https://drawable-canvas.streamlit.app/
MIT License
544 stars 83 forks source link

Can I obtain the coordinates of the place my mouse clicked #82

Open kaneyxx opened 1 year ago

kaneyxx commented 1 year ago

Hello, I'm really new to streamlit. I gotta to obtain the coordinate of mouse clicking on the image. Can I get the information from canvas?

M-Umer-Farooq-Dev commented 1 year ago

canvas_result = st_canvas() objects = pd.json_normalize(canvas_result.json_data["objects"]) x=objects['left'] # x-axis y=objects['top'] # y-axis