Convert to monochromatic & Recognize centroid and radii

2 visualizaciones (últimos 30 días)
Michael
Michael el 1 de Oct. de 2013
Comentada: Michael el 4 de Oct. de 2013
I have a color image that I want to convert to monochromatic. Also he image contains many broken/slightly deformed circles because it is a cross section of an object. I need to be able to recognize the centroid sand radii of them. I have attached the picture below.
Note: I don't have the image processing toolbox. If it isn't possible to convert to monochrome that isn't a huge deal

Respuestas (1)

Youssef  Khmou
Youssef Khmou el 1 de Oct. de 2013
Editada: Youssef Khmou el 1 de Oct. de 2013
Micheal, The only contribution i can offer is like this : i think the centroid function is in the Image processing ToolBox, but you can proceed as the following :
Suppose your Image I is RGB ( or HSV) you convert it to grayscale :
X=(0.2989*I(:,:,1)+0.5870 *I(:,:,2)+0.1140*I(:,:,3));
You make a binary sample by choosing a certain threshold, lets say the mean of the whole sample :
thresh=mean(X(:));
[m n]=size(X);
B=zeros(m,n);
for x=1:m
for y=1:n
if X(x,y)>thresh
G(x,y)=1;
end
end
end
Next you choose a tiny portion, let say a elementary particle from your sample ( in the medium as example ):
S=G(floor(end/2):10+floor(end/2),floor(end/2):10+floor(end/2));
You try next to count the white pixels, and try to use some geometrical relation to deduce the Radius,
  1 comentario
Michael
Michael el 4 de Oct. de 2013
I have been able to acquire a license for the image processing toolbox. Can you give me advice on how to calculate the centroid, the radii and the number of circles?
Thanks

Iniciar sesión para comentar.

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by