MATLAB: Detect certain shapes in binary

detect certain shape

hi,in my image has 2 shapes ;triangular and circular(in binary). how can I eliminate the circular shape so that it just detect triangular shape.many thanks!

Best Answer

Use regionprops() to calculate the Eccentricity. Eccentricity should be nearly 0 for a circle.