iam having this issue how can is resolve this Undefined function or variable 'M'. Error in Untitled (line 39) MW = perform_cu​rvelet_tra​nsform(M, options);

clear all; close all; clc; v = VideoReader('foreman.mp4'); tic numFrames = v.NumberOfFrames;
k=1; while k<=numFrames frame=read(v,k); frame=imresize(frame,[256 256]); frame=double(frame); [a b z]=size(frame);
frame = frame/255.0; sigma = .05; redChannel = frame(:, :, 1); greenChannel = frame(:, :, 2); blueChannel = frame(:, :, 3);
xr = redChannel + sigma*randn(size(redChannel)); xg = greenChannel + sigma*randn(size(greenChannel)); xb = blueChannel + sigma*randn(size(blueChannel));
noisyRGB = cat(3,xr,xg,xb);
MW = perform_curvelet_transform(M, options); hh =MW ; redMF = hdenoise(xr,hh); g greenMF = hdenoise(xg,hh); blueMF = hdenoise(xb,hh); rgbFixed = cat(3, redMF,greenMF,blueMF);
imshow([frame,noisyRGB,rgbFixed],[0,1]) k=k+1;
end toc

回答(1 个)

In the above code you didn’t mention the variable M which causes the error.

2 个评论

cann u please tell me the command for M__ as i m using these commnads from this link for calling curevelet transform function http://www.numerical-tours.com/matlab/denoisingwav_6_curvelets/#8
P.S - I have no experience in curvlet transformation
But all I am sure of is you haven’t defined M in your script but your using at the end which causes the error

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品

版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by