Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

imfreehand cursor doesn't match selection

1 visualización (últimos 30 días)
B-M
B-M el 12 de Jul. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I'm using imfreehand as a freehand user input of sorts - however, the cursor seems to be seperated from where it actually draws the freehand region which makes it unusable. Is this a known bug/am I doing something wrong? I've attached an example image below:
The relevant line of code is simply:
coords = getPosition(imfreehand('Closed',0));

Respuestas (1)

Don Zheng
Don Zheng el 19 de Jul. de 2017
Try putting a 'drawnow' command before the 'imfreehand' call:
drawnow
coords = getPosition(imfreehand('Closed',0));

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by