matlab - How to calculate the value of the 'roundness shape feature' of an image contour? -


i doing assignment on image classification different shape features.

how compute value roundness of image contour in matlab?

there no standard can determine how "round" contour is, or shape in general. however, 1 heuristic have seen post shai bagon: https://stackoverflow.com/a/24802605/3250829.

the heuristic defined as:

ratio = 4 * pi * area / ( perimeter^2 ) 

area area defined shape, or total number of pixels occupy internal shape of contour, , perimeter total number of pixels define perimeter of contour.

if contour round, ratio quite high. however, if contour not round, ratio low. therefore, each contour, perhaps use above criteria starting point.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -