Canny's Edge Detection

조회 수: 11 (최근 30일)
Mohammed Farhan
Mohammed Farhan 2014년 2월 24일
댓글: Dmn 2014년 11월 25일
hello, canny edge detection is used to get the edges, but this paper says how to calculate roundness. is there any relation between canny edge and roundness please help!!!!
"Canny edge detection is performed on the resulting image from the previous section. Each object's area and perimeter is calculated and these results are used to form a simple metric indicating the roundness of an object. The perimeter is calculated by finding the length of the boundary pixels of the candidate. In calculating perimeter, the x and y coordinates are counted as one and diagonal neighbours are counted √2 times.
delta = diff(boundary).^2;
perimeter =sum(
  댓글 수: 1
Dmn
Dmn 2014년 11월 25일
Why you need to do roundness calculation?

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2014년 3월 2일
Calculate the circularity:
measurements = regionprops(labeledImage, 'area', 'Perimeter');
allAreas = [measurements.Area];
appPerimeters = [measurements.Perimeter];
circularities = appPerimeters .^2 ./ (4*pi*allAreas);
If it's round, the circularity will be below 2-3 or so. For a perfect circle the circularity is 1. Higher values will be for less round objects with more tortuous borders.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by