find intersection points and edge points
조회 수: 5 (최근 30일)
이전 댓글 표시
As you see in figure, I have a binary image which has been thinned. It contains English letters, some letters have intersection points (marked with red circles), and some don’t have those.

I want to extract intersection points for every litter and put it in a cell or whatever. I also want to extract the edge points (marked with blue circles) and put it in a cell or matrix to use it later.
In fact I have tried to write function but I could not execute it. So I hope that our teachers here help me.
Note: intersection points are pixels have more than two pixels in a neighborhood, while edge points have just one pixel.
Thank you
댓글 수: 2
Image Analyst
2019년 10월 29일
Puja: Did you scroll down to here? Source code is there. Why email it to you when you can get it right there?
채택된 답변
Image Analyst
2015년 11월 10일
This functionality is built into the bwmorph() function:
bpImage = bwmorph(binaryImage, 'Branchpoints');
epImage = bwmorph(binaryImage, 'Endpoints');
% Plot blue circles over branchpoints
[ybp, xbp] = find(bpImage);
hold on;
plot(xbp, ybp, 'bo', 'MarkerSize', 15);
% Plot red circles over endpoints.
[yep, xep] = find(epImage);
hold on;
plot(xbp, ybp, 'ro', 'MarkerSize', 15);
추가 답변 (1개)
Robert
2015년 11월 10일
Attached i send you a m.file. It finds the edge points right. For the intersection points, there is still some error, but the file can maybe help you as a draft.
Regards, Robert
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!