how to store pixel location and color from impixelinfo

4 ビュー (過去 30 日間)
William  Powell
William Powell 2022 年 5 月 24 日
編集済み: William Powell 2022 年 5 月 24 日
How can I retrieve data stored in the impixelinfo function.
I have used impixelinfo to display location and RGB colors of an image as well as the temperature of a grayscale image whenever the mouse hovers over a specific point the image. My issue is that I want to store the specific temperature and color value to a variable wherever the mouse hovers to be used for further analysis
How can I retrieve the impixelinfo being displayed and store it in a variable

採用された回答

Image Analyst
Image Analyst 2022 年 5 月 24 日
William to get the values of the image under the path you've drawn you need to draw the path and record it's coordinates as you draw it. Then you can extract the values at those coordinates. I'm attaching a demo where you can use drawfreehand to do that.
  1 件のコメント
William  Powell
William Powell 2022 年 5 月 24 日
編集済み: William Powell 2022 年 5 月 24 日
this'll work appreciate it

サインインしてコメントする。

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 5 月 24 日
What you describe is more Data Cursor http://matlab.izmiran.ru/help/techdoc/creating_plots/data_ex7.html
impixelinfo is more for extracting pixel information over a line. Internally, impixelinfo() determines whether the change in x coordinates is greater than the change in y coordinates, takes the longer of the two, and uses that as the independent variable for interp2 purposes.
  1 件のコメント
William  Powell
William Powell 2022 年 5 月 24 日
When I right click on the image the only option that I get is to copy pixel info

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by