how to get the individual boundary of a sperm cell when some of the cells are overlapped.

1 回表示 (過去 30 日間)
cliffy
cliffy 2018 年 9 月 6 日
コメント済み: cliffy 2018 年 9 月 7 日
I was working on drawing the boundary of sperm cell. Attached is a sample graph. I draw the contour of the sperm cell, and the command imcontour or bwboundary both will give me the boundary in two different ways. However, there are some sperm cells, whose tails are crossed. Then here comes the problem. How can I get one individual sperm cell out of the figure? Since they are crossed, if I get the boundary for one of the cell, the tail may be the other sperm's.
for example: if I have the graph below on the left, how can I decide whether it is actually the top right shape or the bottom right shape.
  2 件のコメント
Image Analyst
Image Analyst 2018 年 9 月 6 日
Why do you need the tails? If you just want to count how many are there you can just lower your threshold and count the dark heads.
cliffy
cliffy 2018 年 9 月 6 日
Right, but we not only want the number of the cells, but also the shape of the cells, in order to decide whether they are good cells or defect cells. The tails here are still important to help determine the defects.

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

回答 (1 件)

KSSV
KSSV 2018 年 9 月 7 日
How about this approach?
I = imread('sperm.png') ;
I = rgb2gray(I) ;
[y,x] = find(~I) ;
mx = mean(x) ; my = mean(y) ;
xi = x-mx ; yi = y-my ;
figure
hold on
plot(xi,yi,'.r')
% First quadrant
x1 = xi(xi>0) ; y1 = yi(xi>0) ;
Q1 = [x1(y1>0) y1(y1>0)] ;
plot(Q1(:,1),Q1(:,2),'.b')
% SEcond quadrant
x2 = xi(xi<0) ; y2 = yi(xi<0) ;
Q2 = [x2(y2>0) y2(y2>0)] ;
plot(Q2(:,1),Q2(:,2),'.g')
% Third quadrant
x3 = xi(xi<0) ; y3 = yi(xi<0) ;
Q3 = [x3(y3<0) y3(y3<0)] ;
plot(Q3(:,1),Q3(:,2),'.k')
% Fourth quadrant
x4 = xi(xi>0) ; y4 = yi(xi>0) ;
Q4 = [x4(y4<0) y4(y4<0)] ;
plot(Q4(:,1),Q4(:,2),'.m')
%%Join
Q13 = [Q1 ; Q3] ;
Q24 = [Q2 ; Q4] ;
figure
hold on
plot(Q13(:,1),Q13(:,2),'.r')
plot(Q24(:,1),Q24(:,2),'.b')
Q14 = [Q1 ; Q4] ;
Q23 = [Q2 ; Q3] ;
figure
hold on
plot(Q14(:,1),Q14(:,2),'.r')
plot(Q23(:,1),Q23(:,2),'.b')
  1 件のコメント
cliffy
cliffy 2018 年 9 月 7 日
Thank you KSSN. I probably didn't state it clear. In the third pic, on the left is the graph that we may get from the original pic. However, we want to find the individual sperm, which means we need to find the shape on the right side, and to decide whether the top right is correct or the bottom right correct.

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

Community Treasure Hunt

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

Start Hunting!

Translated by