Is there a command that simulates ginput?

My question here is that I want to use ginput to select 2 datapoint on a figure. But after the first figure, there are 19 more figures (who look alike) in my program that will pop up. So now I'm searching for a command that simulates 'ginput' so I don't need to click to select the starting and ending point for example.

답변 (1개)

Sean de Wolski
Sean de Wolski 2014년 12월 23일

0 개 추천

You could use the java.awt.Robot but this workflow sounds horrible. What are you trying to do? Can you give a minimal working example?

댓글 수: 5

for welke_pp=1:aantal_pp % for 5 subjects
...
for i_testen=1:length(data_stair_rise) %for 4 measurements
RANK = data_stair_rise(welke_pp,i_testen).VideoSignals(:, strcmp('RANK', data_stair_rise(welke_pp, i_testen).VideoSignals_headers)); %extract data
figure;
plot(RANK)
ylabel('Distance');
xlabel('Datapoint');
title('Walking stairs')
legend({'Right ankle'});
xy = ginput(2);
Afstand_1schrede(welke_pp,i_testen) = xy(2,2)-xy(1,2); %distance of 1 step
Now I used the ginput command for all my subjects. That's a lot of figures. I want a code that automatically finds the points that I want to select: so, if I select 2 points, is there a command who can do this for?
Image Analyst
Image Analyst 2014년 12월 23일
You forgot to post an image. Perhaps there is something in your image that can be automatically found/identified and then you can record the coordinates that way. No way of telling until we see several photos that show the range of images you expect to encounter. For example, is the camera field of view fixed, or are your images of different scenes, or different viewpoints or zooms? Is the lighting consistent from image to image? Are any of the points to be found ever obstructed/occluded by the person climbing? These things need to be considered if you are to ever robustly find the marker points automatically.
Sam
Sam 2014년 12월 26일
In attachment are 6 figures. Each figure represent the 'right ankle marker'. Hope you can help me...
Image Analyst
Image Analyst 2014년 12월 26일
And what points on those get marked? The steep rising points? In the middle of the "sort of flat" points?
Sam
Sam 2014년 12월 26일
We need to select the contact point of the heel and the point one step further, so again the contact point of the same heel.

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

카테고리

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

태그

질문:

Sam
2014년 12월 23일

댓글:

Sam
2014년 12월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by