Permalink
Browse files

tracking API changes for blobfinder model

  • Loading branch information...
1 parent bc53b2f commit d30c3c4b69f14528d4861a38028704f2ca930895 @rtv committed Jan 13, 2012
Showing with 12 additions and 13 deletions.
  1. +12 −13 libstageplugin/p_blobfinder.cc
@@ -56,7 +56,7 @@ void InterfaceBlobfinder::Publish( void )
ModelBlobfinder* blobmod = (ModelBlobfinder*)this->mod;
uint32_t bcount = 0;
- const ModelBlobfinder::Blob* blobs = blobmod->GetBlobs( &bcount );
+ const ModelBlobfinder::Blob* blobs = &blobmod->GetBlobs()[0];
if ( bcount > 0 )
{
@@ -83,25 +83,24 @@ void InterfaceBlobfinder::Publish( void )
<< " color: " << hex << blobs[b].color << dec
<< endl;
*/
-
- int dx = blobs[b].right - blobs[b].left;
- int dy = blobs[b].top - blobs[b].bottom;
-
+
+ int dx = blobs[b].right - blobs[b].left;
+ int dy = blobs[b].top - blobs[b].bottom;
+
bfd.blobs[b].x = blobs[b].left + dx/2;
bfd.blobs[b].y = blobs[b].bottom + dy/2;
-
+
bfd.blobs[b].left = blobs[b].left;
bfd.blobs[b].right = blobs[b].right;
bfd.blobs[b].top = blobs[b].top;
bfd.blobs[b].bottom = blobs[b].bottom;
-
+
bfd.blobs[b].color =
- ((uint8_t)(blobs[b].color.r*255.0) << 16) +
- ((uint8_t)(blobs[b].color.g*255.0) << 8) +
- ((uint8_t)(blobs[b].color.b*255.0));
-
- bfd.blobs[b].area = dx * dy;
-
+ ((uint8_t)(blobs[b].color.r*255.0) << 16) +
+ ((uint8_t)(blobs[b].color.g*255.0) << 8) +
+ ((uint8_t)(blobs[b].color.b*255.0));
+
+ bfd.blobs[b].area = dx * dy;
bfd.blobs[b].range = blobs[b].range;
}
}

0 comments on commit d30c3c4

Please sign in to comment.