loading
 
GetVariable("BLOB_COUNT") returns null
Stephen Hewitson from United Kingdom  [6 posts]
9 year
Hi,

I am trying to use BLOB_COUNT with filters to check that there is nothing of a certain colour, but this appears to return null if there are 0 blobs.

What can I do to determine if 0 blobs have been detected. I don't want to check for null, as the value would be null if there was a comms issue too and I want to differentiate between the two.

Thanks,
Stephen
Steven Gentner from United States  [1446 posts] 9 year
Stephen,

because null is essentially the same thing as zero you could also check how many blobs are doing into the module prior to filtering. To do this, we just added a

BLOB_FILTER_START_COUNT

which if zero, means there are no blobs to be filtered and thus might be an indication of a failed camera image, etc.

So use a GetVariable on that, check that it is not zero and then use the BLOB_COUNT as needed. Note we also added a BLOB_FILTER_END_COUNT which is the same as BLOB_COUNT just to have some naming consistency (we can't remove BLOB_COUNT without breaking many other scripts).

Latest version has this update.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index