Thursday, February 26th, 2009, 1177 days ago

Combined objects recognition

On this post, i would introduce the latest openCV objects recgnition work for my research. Presently, i have developed codes to recognize circle successfully. Capture image from camera, converting the source image into gray mode, threshold, canny then get the circle numbers and draw the circles, that is it.

However, when turns to rectangle recognition, it seems work right but not so much. Look carefully, there are multilines drawed on one rectangle detected, and the rectangle number displayed on the left side was totally wrong—too much rectangles, that was impossible because as i see that i just put 3 rectangles under the camera. As a result, i was sucked here and couldnt move forward.

If there’s any good idea, welcome to leave a comment or contact me.

picture-002

combinerecognition

objectrcg


10 Responses to “Combined objects recognition”

  1. a.elen says:

    can you please send me the code to detect and track only red color of rectangles in an image from webcam.Thanks.

  2. tomek says:

    can you please send me source code?
    I have similar problem
    e mail: printf@net.hr
    thanks

  3. bvhoang says:

    hi Andol, I’ve read your code.
    But I don’t really understand the code

    double angle( CvPoint* pt1, CvPoint* pt2, CvPoint* pt0 )
    {
    double dx1 = pt1->x – pt0->x;
    double dy1 = pt1->y – pt0->y;
    double dx2 = pt2->x – pt0->x;
    double dy2 = pt2->y – pt0->y;
    return (dx1*dx2 + dy1*dy2)/sqrt((dx1*dx1 + dy1*dy1)*(dx2*dx2 + dy2*dy2) + 1e-10);
    }

    what mean does the code for ???
    thank you so much.^^

    • Andol says:

      @bvhoang this is for calculating the angle between the pt0, pt1 and pt2, just one of the angles between these points.

      • bvhoang says:

        Dear Andol,
        Is it the angle of the square?,
        how about if I would like to calculating the angle of the triangle, is it possible if i use this identification.
        thank you so much Andol.

        • Andol says:

          sure it is possible as four points of the rectangle have been gained, theoretically it is possible to calculate any angle between these points.
          cheers

  4. bvhoang says:

    thank you so much Andol,
    At present, I’m taking a thesis with Image Processing.
    And I wonder that if you could help me, Problems make me feel so stress :(
    Waiting Andol !!!

  5. syed wajahat hussain says:

    DEAR ANDOL
    i am doing my project in open cv and i am new here in it.my project is to detect red and blue both colours wearing on fingers of hand and then track their motion and control cursor movement according to that.kindly help me out or email me the regarding codes and especially on red and blue both.thanx

Leave a Reply

You can use these XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>