Filter löschen
Filter löschen

Exporting imshow data into a text file

1 Ansicht (letzte 30 Tage)
jgillis16
jgillis16 am 8 Jan. 2016
Kommentiert: jgillis16 am 9 Jan. 2016
I used imshow on an image to set up a threshold where the pixels fell below a certain number of counts. And, to see if a new point belongs to one of the sparse regions, I set the (y, x) value to a pixel location (row, column) and then see if the pixel is true or false there at that location.
I would like to convert this pixel data back into the original (y,x) coordinates and put them in a text file so I can associate a position in the image (which is essentially a graph) where the regions are sparse and fall below this threshold.

Antworten (1)

Walter Roberson
Walter Roberson am 9 Jan. 2016
then find() where the count is greater than your threshold to get rows and columns. Translate that back to your original coordinates if you want to.
If you divide your range into equal intervals then you can write the 2D histogram easily in terms of accumarray()
  1 Kommentar
jgillis16
jgillis16 am 9 Jan. 2016
I have the rows and column, but I am stuck on how to specifically translating it back to the original coordinates (<http://www.mathworks.com/matlabcentral/answers/262923-extracting-information-from-a-plot)>.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by