How show a image in format FITS?
19 views (last 30 days)
Show older comments
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)
0 Comments
Answers (1)
Suraj
on 22 May 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.
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!