Convert to monochromatic & Recognize centroid and radii

2 ビュー (過去 30 日間)
Michael
Michael 2013 年 10 月 1 日
コメント済み: Michael 2013 年 10 月 4 日
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

回答 (1 件)

Youssef  Khmou
Youssef Khmou 2013 年 10 月 1 日
編集済み: Youssef Khmou 2013 年 10 月 1 日
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 件のコメント
Michael
Michael 2013 年 10 月 4 日
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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by