rtv/Stage — Issue #21: p_blobfinder.cc not working well, patch attached
Author: alepusto
Created: 2012-01-25 05:08:31+00:00
State: open

Hi,

I have found a bug in blobfinder interface when using Player. No blobs are found or marked in player clients (for example playerv) but in Stage the blobs are correctly shown. I made some changes on p_blobfinder.cc, hope they are fine, they worked for me. I am using last versions of Stage: 4.1.1-8.

Below you can find the changes applied using diff:

--- /home/alejo/Software/compilaciones/Stage-4.1.1-8/libstageplugin/p_blobfinder.cc	2012-01-16 16:28:12.000000000 -0500
+++ /home/alejo/Software/compilaciones/Stage-4.1.1/libstageplugin/p_blobfinder.cc	2012-01-20 19:12:56.031144179 -0500
@@ -55,9 +55,12 @@

ModelBlobfinder* blobmod = (ModelBlobfinder*)this->mod;

'- uint32_t bcount = 0;
+
const ModelBlobfinder::Blob* blobs = &blobmod->GetBlobs()[0];

'+ const std::vector* blbCount = &blobmod->GetBlobs();
'+ uint32_t bcount = blbCount->size();
'+
if ( bcount > 0 )
{
// and set the image width * height