How show a image in format FITS?

27 Ansichten (letzte 30 Tage)
Juan Carlos Aguilar López
Juan Carlos Aguilar López am 12 Okt. 2022
Beantwortet: Suraj am 22 Mai 2023
Hello, I don´t know how to show a FITS image, I try in the same way to show a jpg image, but doesn't work. I don´t know what I missing
This is the Image that I try to open
https://drive.google.com/file/d/10WPfU6ZL9zFyDWOEA107Fm8w0oIVmr4f/view?usp=sharing
image=fitsread('obj1193.fit');
imshow(image)

Antworten (1)

Suraj
Suraj am 22 Mai 2023
Greetings Juan,
I understand that you are trying to show an image in FITS format using MATLAB, and you are facing some issues.
To display an image in FITS format, you can use the fitsread() function. Here is an example code snippet that you can use to open and display the FITS file in MATLAB:
% Read the FITS file
image = fitsread('sample.fit');
% Display the image
imshow(image, []);
% Add a title to the figure
title('FITS Image');
In the above code snippet, fitsread() function is used to read the FITS file and store the image data in a variable named image. Then, imshow() is used to display the image. Note that the second argument of imshow() is empty brackets [], which ensures that the grayscale colormap is used to display the image.
Read more about fitsread() and how to use it with extensions from the documentation - https://www.mathworks.com/help/matlab/ref/fitsread.html.
I hope this helps!
Regards,
Suraj.

Community Treasure Hunt

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

Start Hunting!

Translated by