Hi,I have a 36*35 image matrix, I want to resize it to 224*224*3 .what should I do?

2 ビュー (過去 30 日間)
Maliheh Tehrani
Maliheh Tehrani 2017 年 3 月 1 日
コメント済み: Vandana Rajan 2017 年 3 月 1 日
Hi,I have a 36*35 image matrix, I want to resize it to 224*224*3 .what should I do?

回答 (1 件)

Vandana Rajan
Vandana Rajan 2017 年 3 月 1 日
Hi,
You can use ' imresize ' and ' colormap ' functions. You can do something similar to the code below.
>> img1 = imresize(img,[224 224]);
>> col_map = colormap(winter); % You may use any colormap of your choice
>> imwrite(img1,col_map,'colorimage.jpg','jpg');
>> img_new = imread('colorimage.jpg');
>> figure;imshow(img_new);
  2 件のコメント
Maliheh Tehrani
Maliheh Tehrani 2017 年 3 月 1 日
Thanks. but my image is this file
Vandana Rajan
Vandana Rajan 2017 年 3 月 1 日
Please use the extensive MATLAB documentation to find out about how to load a .mat file (load command) and then incorporate its contents for the code above.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by