Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

I am trying to do my own blob detection. My program will receive a real time video, and try to detect a white paper sheet, even if something is written on the paper.

I need to detect the paper and its corner, because what I really want is to draw a opengl polygon over the paper, such that each corner of the paper will be a corner of the polygon. Then, I need the coordinates of the paper to do other operations. So, I need to:

  • detect a square white blob
  • get the coordinates of the corners
  • draw a polygon over the white sheet

Any ideas on how can I do that?

share|improve this question
7  
What have you tried so far? –  Phonon Jul 5 '12 at 3:15
    
have a look at hessian filter based approach. –  crack_addict Jul 5 '12 at 3:15
    
by now nothing. I want to change the artoolkit library to detect the white sheet who had the marker i want to draw a opengl polygon over the paper, not only over the marker, the marker will be drawing another stuffs. –  Ruben Veiga Jul 8 '12 at 17:25
    
Are you trying to do this without the help of OpenCV? –  Ivo Flipse Aug 1 '12 at 9:12
add comment

2 Answers

I have recently implemented something like this. I would take the following approach. This assumes the paper is the in the image but there are no other objects. For example a scanner application for iPhone where the user places the paper and hits photo taking button.

  1. Pass the image through first an edge detector and later binary thresholder and make the image binary
  2. Use a connected component detection algorithm (any one is fine) to detect the objects and find the extreme coordinates of each object.
  3. You can detect parallelism among the 4 corners of any object and this would translate into a mathematical equation where you can see if it is a rectangle and if rectangle, draw the polygon based on 4 corners.
share|improve this answer
    
This was a method suggested in Algorithms Part II by Professor Robert Sedgewick as well. So more details on the method/code are available in the course. –  Naresh Apr 2 '13 at 5:48
add comment

I would suggest you try HSV space thresholding. What I mean is convert the image to HSV space and set a threshold on either 1) H-channel or 2) combined threshold on H, S channel. I am suggesting this approach since the object you detect is of a particular color.

If you are using opencv you can use the function cvCvtColor() to convert to HSV color space. If you want your own stand alone implementation, conversion formulars for RGB to HSV may be found here : http://en.wikipedia.org/wiki/HSL_and_HSV

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.