Borrar filtros
Borrar filtros

One image 2 diferent colors ,

1 visualización (últimos 30 días)
Biza Ferreira
Biza Ferreira el 5 de Jun. de 2013
Comentada: Image Analyst el 27 de Abr. de 2014
I have one image with a circle, outside the circunference the color are black inside the circle the color before convert to grayscale, is gray, how can apply after normalize de image apply a mask who convert a the background in same color (gray). https://www.dropbox.com/sc/zfp80poi11m8q55/lnRX67BT4L exemple image A and B

Respuesta aceptada

Image Analyst
Image Analyst el 5 de Jun. de 2013
It looks like B was simply the convolution of A with a high pass filter, like the Laplacian or dog filter. Do you want to do that or you simply want the black surround to be gray?
  2 comentarios
roudabe
roudabe el 27 de Abr. de 2014
Would you please let me now how can I use Laplacian high pass filter on images?
Image Analyst
Image Analyst el 27 de Abr. de 2014
kernel = [-1,-1,-1;-1,8,-1;-1,-1,-1];
output = conv2(double(inputImage), kernel, 'same');
imshow(output, []);

Iniciar sesión para comentar.

Más respuestas (1)

Biza Ferreira
Biza Ferreira el 5 de Jun. de 2013
Editada: Biza Ferreira el 5 de Jun. de 2013
I Removing the background image was obtained by subtracting the original version of this image strongly smoothed (result of filtering with a filter medium sized relatively high). The intensities of the image resulting from the subtraction were subsequently reescaladas for the full range of image intensities (0-255).
if true
fontSize= 12;
A = imread('imagens/03_test.tif');
%B = rgb2gray(A);%original a P&B
ft_high=[0 -1/4 0; -1/4 2 -1/4; 0 -1/4 0];
h = fspecial('average', [5 5]);
filtered= imfilter(A,h,'replicate');
filtered1= imfilter(A,ft_high,'replicate');
Subtract=filtered-A;
Subtract1=A-filtered1;
B = rgb2gray(Subtract1);%original a P&B
J = imadjust(B);
figure;
subplot(2,2,1);
imshow(A),
title('Original Image Color', 'FontSize', fontSize);
subplot(2,2,2);
imshow(filtered);
title('Filter Image Median', 'FontSize', fontSize);
subplot(2,2,3);
imshow(filtered1);
title('Filter Image Median with High', 'FontSize', fontSize);
subplot(2,2,4);
imshow(Subtract);
end
  1 comentario
Image Analyst
Image Analyst el 5 de Jun. de 2013
So does this answer your question? If so, let's finish it off by marking it as the "Accepted" answer.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by