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!