rtv / Stage

Mobile robot simulator
rtv.github.com/Stage
GNU General Public License v2.0
399 stars 175 forks source link

area computation in p_blobfinder #41

Closed knickels closed 7 years ago

knickels commented 11 years ago

In p_blobfinder.cc:102, area (a uint32) is set to dx*dy. But dy = blobs[b].top - blobs[b].bottom (a negative number in my case at least). So area is set to a negative number.

With an (int) cast in the calling program, I get the "correct" negative area back, so I think that the data are passed correctly.

Not sure what the best way to fix this would be - to redefine dy as bottom-top, to add an abs() to dy? Is top ever > bottom?

knickels commented 11 years ago

If it helps, I see that this has been noted as bug 362 in player as well - http://sourceforge.net/p/playerstage/bugs/362/

rtv commented 7 years ago

Fixed in master. Will appear in 4.2.0 release.