hi guys how should i fix i=this code error its supposed to be changing an image to gray scale mind u this is in app designer

1 visualización (últimos 30 días)

Respuesta aceptada

Kevin Holly
Kevin Holly el 2 de Dic. de 2022
Have you tried using im2gray instead of rgb2gray?
  5 comentarios
jana
jana el 2 de Dic. de 2022
so i did as you said and it worked thank u very much but the last thing is the 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)];
jana
jana el 2 de Dic. de 2022
sorry 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)];

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by