Ask Your Question
0

Track rain cells

asked 2013-07-23 04:50:00 -0500

Teepe gravatar image

updated 2013-07-23 06:24:38 -0500

Hello,

I try to use opencv to track rain cell displacement. The cells move slowly, have lot of holes and can disappear. I found blobtrack_sample.cpp and the result is not bad (see fig) but I would like to improve it a little bit. I identified two problem, which i presume can be solved if i change some parameters. First problem : sometimes the ellipse jumps far from the rain cell (especially when rain cell move out from the frame) and try to catch an other rain cell.

Second problem : the background obviously do not change but blob detection is still not very good. How can I do to detect a blob as soon as the pixel is not white ?

I presume that I have to modify some parameters in blobtrack.hpp and blobtrackingauto.cpp...

Thank a lot for any help.

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-07-23 05:51:43 -0500

Did you try the Kalman filter from the sample? It should prevent jumping from a blob to another. Look at the sample cpp/kalman.cpp.

For the issue of color, look at the parameters of blobtracking here especially filterBy to track darker blob.

edit flag offensive delete link more

Comments

The blobtrack_sample code already use Kalman filter (parameter btpp_name==Kalman) Thank for the reference about the color issue.

I look in the src of blobtrackingauto.cpp and I found these lines concerning the deletion of blob :

        if(r.width > 4 && r.height > 4 && r.x < w && r.y < h &&
            r.x >=0 && r.y >=0 &&
            r.x+r.width < w && r.y+r.height < h && area > 0)
        {   
            aver = cvSum(cvGetSubRect(pFG,&mat,r)).val[0] / area;
            /* if mask in blob area exists then its blob OK*/
           if(aver > 0.1*255)Good = 1;
  }

So I think i could modify the if (...) to avoid my blob to jump to far but I would rather prefer an other solution (I don't feel very comfortable ...(more)

Teepe gravatar imageTeepe ( 2013-07-24 03:36:23 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-07-23 04:50:00 -0500

Seen: 408 times

Last updated: Jul 23 '13