How to visualize a pixel intensity values into an image or a plot?

7 vues (au cours des 30 derniers jours)
Aravind Poolla
Aravind Poolla le 23 Fév 2021
Modifié(e) : Aravind Poolla le 25 Fév 2021
Hello
I have a .txt file containing luminance intensity pixel values how can I visualise it in a plot or in any image format. I am ttaching the file below.
Thank you in advance.
  3 commentaires
Image Analyst
Image Analyst le 23 Fév 2021
How many rows and columns and color channels are in the "image"?
Aravind Poolla
Aravind Poolla le 23 Fév 2021
I think it is a grayscale image and the text file consists of simulation measurement data of pixel intensity values. This txt file is an output Of simulation. The file has a resolution of 1392 by 1040.

Connectez-vous pour commenter.

Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 25 Fév 2021
You can use the following function to read a txt file.
readmatrix, readtable, load etc
Example:
data=readmatrix('post_mathworks.txt');
imshow(data);
%or
imshow(uint8(data));
%or
imagesc(data);
Please refer the MATLAB Docs to read about different functions.
Data Details
>> whos data
Name Size Bytes Class Attributes
data 1040x1393 11589760 double
Please ensure that the text file in the proper arrangement and alignment of all data elements. You may need to avoid 2 or 3 lines to avoid any headers associated with the file.
Notice the large number of dots in the image. All about how you represent the data (data type)

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by