Faraz
Faraz

Reputation: 57

How to decompose a shape into a set of basic shapes?

I have a hand drawn shape I as input. The format of I is a sequence of (x,y) coordinates. It could be characters in a language or other shapes. Given a set of basic shapes S (eg { vertical line, horizontal line, circle, semi-circle} ). I would like to decompose I in terms of S.

Is this a standard operation with a standard name?

Is there a standard algorithm/classifier to solve this problem?

Upvotes: 1

Views: 189

Answers (2)

lennon310
lennon310

Reputation: 12689

As a supplementary to @Don Reba 's answer, I would attach the original publication on generalized Hough transform for your reference. Herein you can see the angle of line can be controlled with theta parameter in the curve equation. And the half of circle is controlled with the coordinates xr and yr in the curve equation. There is a pseudocode on ellipse detection in the paper for your reference. And generalized hough transform can be even used to detect arbitrary shapes with the use of directional information. In SO there was a easy Matlab code on the algorithm.

Upvotes: 1

Don Reba
Don Reba

Reputation: 14031

You could use the generalized Hough transform to match letter contours against basic shapes. You would need a different transform for every kind of shape.

Upvotes: 1

Related Questions