I want to differentiate between two classes of objects through the differences in the shape of blob(blob is in the form of binary image) using shape descriptors and machine learning .I want to ask if there is any good shape feature which I can use to detect the descriptors for the irregular contour or blob obtained ?
2 Answers
The answer is very subjective on the kinds of shapes you are looking for. If the contours of the shapes are discriminative enough, you can try shape context. To classify shapes, feed in these features into any classifier -- SVM or random forests for instance.
If the shapes have consistently occuring corners, then you can extract the corners using FAST or SURF, and describe the regions around the corners using SIFT or SURF. In this case, shapes are best recognised by feature matching or bags of words.

- 1,927
- 11
- 13
-
Thanks for the answer.My problem deals with walking pedestrians with or without baggage that forms the two classes I need to differentiate between.So as per your answer I can't use FAST or SURF.Do you think my classes are distinct enough to use shape context.Also please let me know if you find some good sources for implementation guidance. – user2442331 Jun 18 '13 at 01:57
-
If you're detecting humans, then HOG features (http://hal.archives-ouvertes.fr/docs/00/54/85/12/PDF/hog_cvpr2005.pdf) have proved to be very useful. You can use them in conjunction with SVM's. OpenCV has an implementation that you can use. Find a tutorial here: http://opencv.willowgarage.com/wiki/trainHOG – Zaphod Jun 18 '13 at 08:31
-
Actually I don't want to detect humans I want to detect whether the person in video is carrying an object or not. – user2442331 Jun 18 '13 at 09:03
-
Yes, I understand. The baggage will be part of the contour of the "human blob". You can have two SVM's, one for first detecing humans, and another one for classifying whether or not he/she is carrying an object. If done right, you can even achieve this with a single SVM. – Zaphod Jun 18 '13 at 09:28
-
Thanks. Apologies for so many doubts but I am newbie in the field. I am done with step of detecting humans now I need only to classify them. Then which is better HOG or shape context. – user2442331 Jun 18 '13 at 11:37
-
For classification of contours, shape context would be better. – Zaphod Jun 23 '13 at 21:06
there is a large body of work associated with shape descriptors, these methods work on either the outer edge detected pixels (the boundary) or the full filled-in binary shape. Both approaches rely on making the shape descriptors invariant to translation, rotation and scaling, and some to skew. The classical boundary method is Fourier Descriptors and the classic filled in method is Moment Invariants, both are covered in most good image processing textbooks and are easy to implement with OpenCV.

- 180
- 10