how to close a open object in an image

2 visualizaciones (últimos 30 días)
Gabriel Martins
Gabriel Martins el 10 de Jun. de 2018
Comentada: Gabriel Martins el 10 de Jun. de 2018
I have a problem. I am trying to count objects but some of them are not closed and when I apply binarize code, it does not apply and appears distorted.
I=imread('Pollen1.tif');
figure, imshow(I),title('Original');
%Transforma a imagem em escala cinzento
I2=rgb2gray(I);
figure,imshow(I2),title('rgb2gray');
%Convert image to binary image, based on threshold
I4=im2bw(I3);
figure
imshow(I4);
%Remove small objects from binary image
I4=bwareaopen(I4,900);
figure
imshow(I4),title('bwareaopen');
%Find edges of objects in images using Sobel, Prewitt, Roberts, or Canny method
I6=edge(imc,'Canny');
figure
imshow(I6),title('Canny');
  6 comentarios
Image Analyst
Image Analyst el 10 de Jun. de 2018
Code doesn't run. What is "I3"?
Gabriel Martins
Gabriel Martins el 10 de Jun. de 2018
sorry I3 is I2

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by