Borrar filtros
Borrar filtros

for transform an gray scale image from spatial domain to neutrosophic image with matlab code?

1 visualización (últimos 30 días)
56819066_381115406071851_6045156277162606592_n.png
where is the false in my code ?
  2 comentarios
Image Analyst
Image Analyst el 8 de Abr. de 2019
Editada: Image Analyst el 8 de Abr. de 2019
I don't know. You didn't attach your code.
This must be written by a mathematician. "Universe of discourse"? Give me a break!
Nehal fawzy
Nehal fawzy el 8 de Abr. de 2019
Editada: Nehal fawzy el 15 de Abr. de 2019
%Neutrosophic image
g=imread('H.jpg'); %g is my input image
g=rgb2gray(g);
g=double(g);
w=3; %assume w=3
for i = 3:size(g,1)-2
for j = 3:size(g,2)-2
s=0;
for m=i-round(w/2):i+round(w/2)
for n=j-round(w/2):j+round(w/2)
s=s+g(m,n);
end
end
g1(i,j)=s/(w*w); %equation 2
segma(i,j)=abs(g(i,j)-g1(i,j)); %equation 4
end
end
g1min = min(min(g1)); % minumum of local mean intensity value ,min g ¯(i, j)
g1max = max(max(g1)); % maxmum of local mean intensity value ,max g¯(i, j)
segmamin = min(min(segma));
segmamax = max(max(segma));
% equation 2
for i = 3:size(g,1)-2
for j = 3:size(g,2)-2
T(i,j)= ((g1(i,j)-g1min)./(g1max-g1min)); %equation 1
I(i,j)=((segma(i,j)-segmamin)./(segmamax-segmamin)); %equation 3
F(i,j)=1-T(i,j); % equation 5
end
end
figure;
subplot(3,1,1),imshow(T),title('T-domain');
subplot(3,1,2),imshow(I),title('I-domain');
subplot(3,1,3),imshow(F),title('F-domain');

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Image Processing Toolbox 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