53 player_blobfinder_data_t bfd;
54 bzero( &bfd,
sizeof(bfd) );
66 bfd.blobs_count = bcount;
68 bfd.blobs =
new player_blobfinder_blob_t[ bcount ];
74 for( b=0; b<bcount; b++ )
90 bfd.blobs[b].x = blobs[b].
left + dx/2;
91 bfd.blobs[b].y = blobs[b].
bottom + dy/2;
93 bfd.blobs[b].left = blobs[b].
left;
94 bfd.blobs[b].right = blobs[b].
right;
95 bfd.blobs[b].top = blobs[b].
top;
96 bfd.blobs[b].bottom = blobs[b].
bottom;
99 ((uint8_t)(blobs[b].color.r*255.0) << 16) +
100 ((uint8_t)(blobs[b].
color.
g*255.0) << 8) +
101 ((uint8_t)(blobs[b].
color.
b*255.0));
103 bfd.blobs[b].area = dx * dy;
105 bfd.blobs[b].range = blobs[b].
range;
114 PLAYER_BLOBFINDER_DATA_BLOBS,
115 &bfd,
sizeof(bfd), NULL);
121 player_msghdr_t* hdr,
129 PRINT_WARN2(
"blobfinder doesn't support msg with type/subtype %d/%d",
130 hdr->type, hdr->subtype);
InterfaceBlobfinder(player_devaddr_t addr, StgDriver *driver, ConfigFile *cf, int section)
The Stage library uses its own namespace.
virtual void Publish(void)
#define PRINT_WARN2(m, a, b)
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Blob * GetBlobs(unsigned int *count)