I need a bit of help with blobs in opencv (python).
This is the thing:
I've already written the preprocessing functions that work properly, they isolate the areas of interest and return a thresholded image, where these areas are white, the rest is black. The thing is, I'm only interested in the white areas but no matter what I do, I keep getting the background as a blob too. I can't filter by size because I don't know how far the object is.
Is there a way to just process white blobs?
This is the gist of what i have now:
mask = cv.cvCreateImage(frame_size,8,1)
cvSet(mask,1)
.
.
.
blob_a_matches = CBlobResult(blob_a,mask,100, True)
blob_a_matches.filter_blobs(10, 1000)
for i in range(blob_a_matches.GetNumBlobs()):
numbered_blob = blob_a_matches.GetBlob(i)
area = numbered_blob.Area()
.
.
.
Except for the fact that the background is treated as a blob too, this works.