convert table to image

60 visualizzazioni (ultimi 30 giorni)
hakan
hakan il 18 Mag 2023
Commentato: Image Analyst il 21 Mag 2023
Hello everyone,
I have a table size 175x81 .each column is feature.
my question is that .İneed to convert this to image but i dont know how to do it ?
  3 Commenti
Walter Roberson
Walter Roberson il 20 Mag 2023
You have 81 columns so are you wanting each image to be 1x81 or 3x27 or 9x9 or 27x3 or 81x1?
The id does not appear to be a feature so perhaps you want a 5x16 or 8x10 image?
Image Analyst
Image Analyst il 21 Mag 2023
It does not make sense for each row to be an image since the columns represent totally different things. Do you want the columns to be images, like @Walter Roberson said? If so, which columns? Probably not all 81 of them (for 81 different images), but maybe. How do you want to take the 175 elements in each column and make a 2-D image out of them? Exactly how many rows and columns do you want it to have?
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:

Accedi per commentare.

Risposte (1)

chicken vector
chicken vector il 18 Mag 2023
Modificato: chicken vector il 18 Mag 2023
% Define example table:
tab = table(rand(100));
% Convert table to array:
arr = table2array(tab);
% Display array:
imshow(arr);
  9 Commenti
Walter Roberson
Walter Roberson il 18 Mag 2023
I find that people often do not pay as much attention as they should to repeatability of color when using rescale() or imagesc() or imshow([]) . With the default parameters, or default caxis() / clim() , the mapping of particular numeric value to color can change if the lower bound of the data or the upper bound of the data change.
So for example a temperature map might show 25C as being moderately comfortable one time, but if the low for the next map increased, then 25C might be at a lower portion relative to low-to-high for the day so 25C might show up with colors associated with cooler values when looking at two images side-by-side (and not paying close attention to any colorbars.)
I know I've been sloppy on this aspect many many times myself, but when I am generating graphics that might end up being compared, I try to remember to use scaling relative to absolute ranges so that the colors have some consistent meaning.
In this particular case, though, where numeric values for "features" are being implicitly compared regardless of the fact that the features might have no mathematical relationship to each other, then it probably does not matter. I'm not sure that there is any meaningful coloration in this situation.
chicken vector
chicken vector il 19 Mag 2023
I most definetly agree.
If you need multiple plots when you deal with physical variables, in my opinion, is always good practice to set some meaningful and constant boundaries for the scaling operation.
Dealing usually with modelling problems, I have learnd this the hard way. I would even say the hardest since I mostly use colorbars...

Accedi per commentare.

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by