How to save an m by n array as an m by n resolution image?
5 ビュー (過去 30 日間)
古いコメントを表示
Hellos,
I am trying to plot a 2D image of resolution 4096 x 4096 using imshow(data). Due to screen resolution limitation (my laptop screen is 3200x1800 pixels), imshow says it can only display the image at 33% of its original size. When I save the plotted image with save, print or export_fig (third party) commands; the image ends up being of a lower size than 4096 x 4096 because the figure window is 33% of the size of the original image. I urge you to try this.
What I wish is to create an image such that: pixel(1,1) in the image represents the RGB colors corresponding to the value in data(1,1). pixel(4096,1) in the image represents the RGB colors corresponding to the value in data(4096,1). pixel(1,4096) in the image represents the RGB colors corresponding to the value in data(1,4096). pixel(4096,4096) in the image represents the RGB colors corresponding to the value in data(4096,4096).
No borders, no axes. Just the plain conversion of the values in a matrix to its corresponding .png/.jpg/.tiff/.bitmap image maintaining one to one correspondence between the pixels of the image and the elements in variable data.
Your help is appreciated!
0 件のコメント
回答 (1 件)
Image Analyst
2018 年 7 月 26 日
Use imwrite(). It can save images even if they're bigger than your screen.
1 件のコメント
W.Khan
2018 年 7 月 26 日
Hello Image Analyst, Can you look into this question too? please https://ch.mathworks.com/matlabcentral/answers/411915-how-can-i-extract-a-patch-from-rgb-image-w-r-t-its-binary-image
Thank you
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!