0

I need to be able to detect a variety of coloured post-it notes via a Microsoft Kinect video stream. I have tried using Emgucv for edge detection but it doesn't seem to locate the vertices/edges and also colour segmentation/detection however considering the variety of colours that may not be robust enough.

I am attempting to use HAAR classification. Can anyone suggest the best variety of positive/negative images to use. For example, for the positive images should I take pictures of many different coloured post-it notes in various lighting conditions and orientations? Seeing as it is quite a simple shape ( a square) is using HAAR classification over-complicating things?

deez22
  • 17
  • 5

1 Answers1

0

I haar classifiers are typically used on black and white images and trigger primarily on morphologic edge like feature. Seems like if you want to find post it notes in an image the easiest method would be to look at colors (since they come in very distinct colors). Have you tried training a SVM of Random forest classifier to detect post it notes based on just color? Once you've identified areas in the image that are probably post it notes you could start looking at things like the shape as additional validation that you are indeed looking at a post it note.

Take a look at the following as an example of how to find rectangles in an image using hough transform: https://opencv-code.com/tutorials/automatic-perspective-correction-for-quadrilateral-objects/

Ron
  • 1,249
  • 9
  • 20
  • Would I be right in saying that the hough transform would not work if someone was holding it in the air as the fingers would get in the way? – deez22 Feb 24 '14 at 18:06
  • Should still work because the fingers will typically not cover the entire side of the note. At worst you could fudge it a little if you found 3 straight edges you could estimate the 4 th... – Ron Feb 24 '14 at 18:09
  • Instead of jumping into something very complex like training a Haar Cascade I'd start simple. Play around with the data to see what seems to work. – Ron Feb 24 '14 at 18:16
  • I will have a go at using hough transform and see how that goes but just incase are there any tips you could give me for using the SVM technique you mentioned for detecting particular colours? – deez22 Feb 24 '14 at 18:20
  • Start by experimenting with a particular color post it note and train the SVM by feeding it post it note pixels as the training vectors. I would start by playing with a one class svm with a RBF (radial basis function) kernel (so you don't need to worry about background pixels). Instead of [r,g,b] vectors try instead computing the [hue] (better rejection of shadows etc). http://www.csie.ntu.edu.tw/~cjlin/libsvm/ is used by opencv so start here (the java applet demo on this page is great for starting to understand how to tweak parameters of the SVM) – Ron Feb 24 '14 at 18:35
  • using canny edges with hough transform and colour segmentation worked a treat. thanks! – deez22 Feb 26 '14 at 19:12