Finding coordinates of a rectangle in a picture
4 ビュー (過去 30 日間)
古いコメントを表示
I'm running an eyetracking experiment. I display an image using the Screen function from psychtoolbox and I want to know the coordinates of some of the items displayed in the picture. Is there a way of drawing a rectangle on the positions you want to find the location of? Or is there another way of doing it? Thanks.
0 件のコメント
回答 (3 件)
KSSV
2016 年 10 月 3 日
You can draw rectangle using imrect.
doc imrect.
You can interactively pick the coordinates from the plot/ figure using ginput().
doc ginput.
6 件のコメント
Ann G
2016 年 10 月 3 日
You can use the ginput and save the coordinates x,y by choosing the items.
[x,y]=ginput;
save x
save y
0 件のコメント
Mihaela Duta
2016 年 10 月 11 日
編集済み: Mihaela Duta
2016 年 10 月 11 日
I would suggest to use an image processing package to identify the areas of interest in your picture. You can use Adobe Photoshop if you have it, but gimp is an excellent free alternative (https://www.gimp.org/).
I am not sure whether you want to use these regions of interest when displaying the picture during the experiment, or for data processing. If you want to highlight regions of interest during the stimuli presentation, you can do that using the FrameRect function from Psychtoolbox.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image display and manipulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!