iam having this issue how can is resolve this Undefined function or variable 'M'. Error in Untitled (line 39) MW = perform_curvelet_transform(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 个)
madhan ravi
2018-11-6
0 个投票
In the above code you didn’t mention the variable M which causes the error.
2 个评论
madhan ravi
2018-11-6
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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!