Ask Your Question

Object detection Rectangles Haartrained

asked 2012-07-24 10:37:07 -0500

Bia6969 gravatar image

Hi everyone!!

I wanted my program to identify staplers so i've followed the haartraining process and i've accomplished my goal. The only problem is that instead of one "stapler", it draws more than one rectangle.

I've though of using groupRectangles(...) but it doesn't compile saying it's not declared and stuff like that (i though its lib was objdetect: guess i was wrong)

Please, any tip would be welcome. Thanks

edit retag flag offensive close merge delete


You have to use groupRectangles indeed...

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-25 02:57:21 -0500 )edit

You should use groupRectangles! You should show us your code so I can help you.

Mahdi gravatar imageMahdi ( 2012-10-30 23:22:44 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2012-11-01 01:09:18 -0500

Mahdi gravatar image

You can find the min and max in x and y of rectangle vertices. Then draw the mother rectangle!:)
The good method is to leverage from groupRectangle and as much as I know it is from objdetect. You have some problems in linking and adding you header files, But I can tell the exact answer since I should see you code.

edit flag offensive delete link more

Question Tools


Asked: 2012-07-24 10:37:07 -0500

Seen: 951 times

Last updated: Nov 01 '12