|
GetVariable("BLOB_COUNT") returns null Stephen Hewitson from United Kingdom [6 posts] |
10 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
|
|
|
Carl from Your Country [1447 posts] |
10 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.
|
|