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 件のコメント

Sam
Sam 2014 年 12 月 23 日
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 ExchangeData 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