Undefined function or variable 'X'

1 回表示 (過去 30 日間)
Nokia Nokia
Nokia Nokia 2015 年 11 月 16 日
コメント済み: Nokia Nokia 2015 年 11 月 23 日
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 件)

Thorsten
Thorsten 2015 年 11 月 16 日
編集済み: Thorsten 2015 年 11 月 16 日
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
Nokia Nokia 2015 年 11 月 23 日
To Walter Roberson
Merge the two images from wavelet decompositions at level 1 using db2 by taking two different fusion methods: fusion by taking the mean for both approximations and details:
XFUSmean = wfusimg(X1,X2,'db2',1,'mean','mean'); and fusion by taking the maximum for approximations and the minimum for the details.
XFUSmaxmin = wfusimg(X1,X2,'db2',1,'max','min');
Nokia Nokia
Nokia Nokia 2015 年 11 月 23 日
now I tried to use the same picture X1 = imread('G:\an1.jpg'); X2 = imread('G:\an1.jpg');
and again: Error using image TrueColor CData contains element out of range 0.0 <= value <= 1.0

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by