Convert to monochromatic & Recognize centroid and radii
2 ビュー (過去 30 日間)
古いコメントを表示
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

0 件のコメント
回答 (1 件)
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,
参考
カテゴリ
Help Center および File Exchange で Call Python from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!