How can I have impixelinfo give me pixel numbers rather than axis values?
5 ビュー (過去 30 日間)
古いコメントを表示
I have a figure in a GUI I am making created with imagesc that I then apply impixelinfo to, because I need to know the pixel locations of certain features. However, since I am also applying axis ranges, for example:
imagesc(xAx,yAx,axesVideoFocus(:,:,currentSlice))
where xAx and yAx are vectors describing the x and y axes, impixelinfo is returning me the values of xAx and yAx rather than the pixel number I am hovering over. So say I am over pixel 32, 5. What I actually get out of impixelinfo are the x and y axis values at that pixel, instead of (32,5).
Thanks for any help.
0 件のコメント
採用された回答
Image Analyst
2014 年 4 月 7 日
Then don't put in axis calibration factors. Just do this:
imagesc(axesVideoFocus(:,:,currentSlice))
assuming axesVideoFocus is the name of your 3D image variable.
5 件のコメント
Image Analyst
2014 年 4 月 7 日
You can turn "axis on" which will show the tick marks in pixels, but THEN, you can redefine the tick marks to be whatever you want. So use sprintf() to create a brand new set of tick marks that displays in your custom calibrated units. Look up help on tick marks or tick labels to see how to do it.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!