Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ay dame a completar o corregir este c digo para obtener alrededor de 2 5 0 0 p xeles en la imagen adjunta con Matlab:

Aydame a completar o corregir este cdigo para obtener alrededor de 2500 pxeles en la imagen adjunta con Matlab: I = imread("MnMs.tif"); yo = im2doble(yo); % Aplicar filtro de mediana CI_med = I; para Capa =1:3 CI_med(:,:,Capa)= medfilt2(CI_med(:,:,Capa),[33]); end % Aplicar filtro mximo a la imagen filtrada mediana CI = CI_med; para Capa =1:3 CI(:,:,Capa)= ordfilt2(CI(:,:,Capa),9, unos(3,3)); final R = CI(:,:,1); G = CI(:,:,2); B = CI(:,:,3); % Inicializar matrices de colores Wh = zeros(512); % Blanco Re = ceros(512); % Rojo Gr = ceros(512); % Verde Bl = ceros(512); % Gy azul = ceros(512); % Gris Pi = ceros(512); % Pu rosa = ceros(512); % Ol morado = ceros(512); % Oliva Br = ceros(512); % Marrn BB = ceros(512); % Falta fondo = ceros(512); % Faltante % Ajustar umbrales y condiciones para m =1:512 para n =1:512 miss =0; si (R(n,m)>0,95) && (G(n,m)>0,95) && (B(n,m)>0,95) Wh(n,m)=1; seorita =1; terminar si (R(n,m)>0.95) && (G(n,m)0.5) && (B(n,m)0.5) Re(n,m)=1; seorita =1; terminar si (R(n,m)0,5) && (G(n,m)>0,95) && (B(n,m)0,5) Gr(n,m)=1; seorita =1; terminar si (R(n,m)0,5) && (G(n,m)0,5) && (B(n,m)>0,95) Bl(n,m)=1; seorita =1; terminar si (R(n,m)>0.1) && (G(n,m)0.3) Gy(n,m)=1; seorita =1; terminar si (R(n,m)>0.7) && (G(n,m)0.3) && (B(n,m)>0.5) Pi(n,m)=1; seorita =1; terminar si (R(n,m)>0.3) && (R(n,m)0.5) Pu(n,m)=1; seorita =1; terminar si (R(n,m)>0.5) && (R(n,m)0.7) Ol(n,m)=1; seorita =1; terminar si (G(n,m)>0.5) && (G(n,m)0.7) Br(n,m)=1; seorita =1; terminar si (R(n,m)0.1) && (G(n,m)0.2) && (B(n,m)0.1) BB(n,m)=1; seorita =1; terminar si (miss ==0) falta(n,m)=1; end end end % Muestra los resultados figure(2) subplot(3,4,1); estoy mostrando (yo); ttulo(['Imagen original: ', num2str(512*512)]); subtrama (3,4,2); imshow(Wh,[]); ttulo(['Blanco: ', num2str(suma(suma(Wh)))]); subtrama (3,4,3); imshow(Re,[]); ttulo(['Rojo: ', num2str(suma(suma(Re)))]); subtrama(3,4,4); imshow(Gr,[]); title(['Verde: ', num2str(suma(suma(Gr)))]); subtrama (3,4,5); imshow(BL,[]); ttulo(['Azul: ', num2str(suma(suma(Bl)))]); subtrama (3,4,6); imshow(Gy,[]); title(['Gray: ', num2str(suma(suma(Gy)))]); subtrama (3,4,7); mostrar(Pi,[]); ttulo(['Rosa: ', num2str(suma(suma(Pi)))]); subtrama (3,4,8); imshow(Pu,[]); ttulo(['Prpura: ', num2str(suma(suma(Pu)))]); subtrama(3,4,9); imshow(Ol,[]); ttulo(['Oliva: ', num2str(suma(suma(Ol)))]); subtrama(3,4,10); imshow(Br,[]); ttulo(['Marrn: ', num2str(suma(suma(Br)))]); subtrama (3,4,11); imshow(BB,[]); ttulo(['Fondo: ', num2str(suma(suma(BB)))]); subtrama(3,4,12); imshow(faltante,[]); title(['Falta: ', num2str(suma(suma(falta)))]);
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions