Hi people,
I started to use 2014b recently. One problem is the ginput function works extremely slow! The cross point can't follow the mouse smoothly. Any idea what is the reason? Maybe some settings are not optimized? Thanks!
Yu

댓글 수: 5

Doug Hull
Doug Hull 2014년 12월 31일
can you give the code you used so we can try to reproduce?
I've experienced this in 2014b and pre-2014b for plots of large data sets. For example,
pcolor(peaks)
shading interp
ginput
works fine, but
pcolor(repmat(peaks,50,50))
shading interp
ginput
is very slow.
Yu Mu
Yu Mu 2015년 1월 5일
편집: per isakson 2015년 1월 5일
Hi Doug, I'm using this command to draw some ROIs. It worked smoothly in the old version, but extremely slow in 2014b. Below is the code I'm using, but 'ginput' works slowly even in any circumstances I tried. Do you have any idea how to improve this? Thanks!
tmp = rand(1000, 1000, 3);
image(tmp);
[x y button]=ginput(1);
if button ==2
break;
elseif button ~=1
continue;
else
%h=imfreehand(ha);
%cmask(:,:,z)=cmask(:,:,z)+createMask(h);
[x y button]=ginput(1);
if button ~=1
continue;
else
delete(h);
h=imfreehand(ha);
%cmask(:,:,z)=cmask(:,:,z)+createMask(h);
end
end
Catherine
Catherine 2015년 2월 10일
Doug,
My analysts are also complaining about this. Ginput worked fine in 2013a, but when they upgraded to 2014b it slowed down extremely. Same code - nothing was changed except upgrade to 2014b.
Jeffrey
Jeffrey 2016년 7월 13일
Hi, guys.
I just updated from 2015b to 2016a and have the same issue as mentioned above... GINPUT is so slow to react to mouse movements.
I also have a GUI that specifies a WindowButtonMotionFcn for mouse movement controls and have the same issues. I'm assuming the two are related.
Is there any known way to solve this?

댓글을 달려면 로그인하십시오.

답변 (1개)

Chad Greene
Chad Greene 2015년 2월 16일

0 개 추천

I made a function finput that creates a temporary set of axes atop the current axes, then calls ginput. In a couple of quick tests on my computer, finput is much faster than ginput for large datasets.

카테고리

도움말 센터File Exchange에서 Data Exploration에 대해 자세히 알아보기

태그

질문:

2014년 12월 29일

댓글:

2016년 7월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by