How show a image in format FITS?

18 ビュー (過去 30 日間)
Juan Carlos Aguilar López
Juan Carlos Aguilar López 2022 年 10 月 12 日
回答済み: Suraj 2023 年 5 月 22 日
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)

回答 (1 件)

Suraj
Suraj 2023 年 5 月 22 日
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.

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by