how to fix these code lines for app designer

์กฐํšŒ ์ˆ˜: 3 (์ตœ๊ทผ 30์ผ)
jana
jana 2022๋…„ 12์›” 4์ผ
๋Œ“๊ธ€: jana 2022๋…„ 12์›” 5์ผ
e gaussian and periodic noise this is my code for them and they didnt work how can i fix them plz?
this is the gaussina noise code
a=(app.Image);
noise=imnoise(a,'gaussian');
I=imshow(noise,'parent',app.UIAxes2,...
'XData',[1 app.UIAxes2.Position(3)],...
'YData',[1 app.UIAxes2.Position(4)]);
app.UIAxes2.XLim=[0 I.XData(2)];
app.UIAxes2.YLim=[0 I.YData(2)];
and this the periodic noise code
a=(app.Image);
s=size(a);
[x,y]=meshgrid(1:s(1),1:s(2));
p=sin(x/3+y/5)+1;
noise=(im2double(a)+p/2)/2;
I=imshow(noise,'parent',app.UIAxes2,...
'XData',[1 app.UIAxes2.Position(3)],...
'YData',[1 app.UIAxes2.Position(4)]);
app.UIAxes2.XLim=[0 I.XData(2)];
app.UIAxes2.YLim=[0 I.YData(2)];
i also have this low pass filter also doesnt work how can i fix it
a=(app.Image);
f1=fspecial('average',[5,5]);
I=imshow(f1,'parent',app.UIAxes2,...
'XData',[1 app.UIAxes2.Position(3)],...
'YData',[1 app.UIAxes2.Position(4)]);
app.UIAxes2.XLim=[0 I.XData(2)];
app.UIAxes2.YLim=[0 I.YData(2
  ๋Œ“๊ธ€ ์ˆ˜: 3
jana
jana 2022๋…„ 12์›” 4์ผ
ํŽธ์ง‘: Jan 2022๋…„ 12์›” 5์ผ
ok so basically what i meant by didnt work is it didnt show the mdifiedimage my app has an axes that shows the before image and that is its code
[filename,pathname] = uigetfile();
app.imageEditField.Value=strcat(pathname,filename);
app.Image=imread(app.imageEditField.Value);
app.Modified= app.Image;
imshow(app.Modified,'parent',app.UIAxes)
and it works and the other n=buttons including the codes i written show the after image and the ones i wrote dont show the after image what can i emmit of add that would make it work
Image Analyst
Image Analyst 2022๋…„ 12์›” 5์ผ
ํŽธ์ง‘: Image Analyst 2022๋…„ 12์›” 5์ผ
Not sure what that means. Does it now work, or not? Since you accepted my suggested fix, I assume it's all working now. If not, attach your .mlapp file with the paperclip icon.

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ฑ„ํƒ๋œ ๋‹ต๋ณ€

Image Analyst
Image Analyst 2022๋…„ 12์›” 4์ผ
Instead of
f1=fspecial('average',[5,5]);
I=imshow(f1,'parent',app.UIAxes2,...
'XData',[1 app.UIAxes2.Position(3)],...
'YData',[1 app.UIAxes2.Position(4)]);
app.UIAxes2.XLim=[0 I.XData(2)];
app.UIAxes2.YLim=[0 I.YData(2
try
f1=fspecial('average',[5,5]);
imshow(f1, [], 'parent',app.UIAxes2)
axis('on', 'image')
@jana you've asked 15 questions but have never awarded any of the people who helped you with "reputation points" by clicking the "Accept this answer" link. They'd appreciate it if you did that. ๐Ÿ™‚
  ๋Œ“๊ธ€ ์ˆ˜: 3
Image Analyst
Image Analyst 2022๋…„ 12์›” 5์ผ
You had a number of major errors in those functions. I fixed them.
jana
jana 2022๋…„ 12์›” 5์ผ
thank u so much genuienly i cant thank you enough truly last thing though these codes for turning the grayiage to blue and green whats the problem with them a=(app.Image);
green=a;
green(:,:,3)=0
setappdata(0,'filename',green);
setappdata(0,'imrotation',green);
I=imshow(green,'parent',app.UIAxes2,...
'XData',[1 app.UIAxes2.Position(3)],...
'YData',[1 app.UIAxes2.Position(4)]);
app.UIAxes2.XLim=[0 I.XData(2)];
app.UIAxes2.YLim=[0 I.YData(2)];
the blue code
a=(app.Image);
blue=a;
blue(:,:,2)=0
setappdata(0,'filename',blue);
setappdata(0,'imrotation',blue);
I=imshow(blue,'parent',app.UIAxes2,...
'XData',[1 app.UIAxes2.Position(3)],...
'YData',[1 app.UIAxes2.Position(4)]);
app.UIAxes2.XLim=[0 I.XData(2)];
app.UIAxes2.YLim=[0 I.YData(2)];

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ถ”๊ฐ€ ๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Function Creation์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

Community Treasure Hunt

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

Start Hunting!

Translated by