Undefined function or variable 'X'
古いコメントを表示
Hi,
I want to make a fusion of two images using this example:
but when i write
load('D:\pix.jpg');X1 = X;
then i receive the message :
Undefined function or variable 'X'.
What can I do to fix it? And what are X1 = X; and X2 = X;,can you explain me, pls?
回答 (1 件)
In the example, a variable X is stored in mask.mat and bust.mat, that are assinged to X1 and X2, resp., after loading. If you don't have these file, the code does not work.
You need to modify it such hat two images are stored in X1 an X2.
To read an image, use
X1 = imread('D:\pix.jpg');
15 件のコメント
Nokia Nokia
2015 年 11 月 16 日
Image Analyst
2015 年 11 月 16 日
You need to assign a map, like
myColorMap = jet(256);
colormap(myColorMap);
Nokia Nokia
2015 年 11 月 16 日
Thorsten
2015 年 11 月 17 日
You should scale your images to the range [0,1].
Nokia Nokia
2015 年 11 月 17 日
Thorsten
2015 年 11 月 17 日
I01 = double(I)/double(max(I(:)));
Nokia Nokia
2015 年 11 月 17 日
Thorsten
2015 年 11 月 17 日
I is the image to be normized. Use your variable.
Nokia Nokia
2015 年 11 月 22 日
編集済み: Walter Roberson
2015 年 11 月 23 日
To read an image from file, and convert to double in the range [0,1]:
I01 = im2double(imread('D:\pix1.jpg'));
To normalize data
X = X/max(X(:));
Nokia Nokia
2015 年 11 月 23 日
編集済み: Walter Roberson
2015 年 11 月 23 日
Walter Roberson
2015 年 11 月 23 日
What is max(XFUSmean(:)), min(XFUSmean(:))
Nokia Nokia
2015 年 11 月 23 日
Nokia Nokia
2015 年 11 月 23 日
Nokia Nokia
2015 年 11 月 23 日
カテゴリ
ヘルプ センター および File Exchange で Image Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!