Question: You have to do the code using python and follow the hint to make the code. * BlobFinder Instance variable Blobs identified by this blob




You have to do the code using python and follow the hint to make the code.
* BlobFinder Instance variable Blobs identified by this blob finder, _blobs (list of Blob objects) * BlobFinder C) Initialize _blobs to an empty list Create a 2D list of booleans called marked, having the same dimensions as pic Enumerate the pixels of pic, and for each pixel (i, j): 1. Create a Blob object called blob; 2. Call _findBlob) with the appropriate arguments; and 3. Add blob to_blobs if it has a non-zero mass bf._findBlob() Base case: return if pixel (i, j) is out of bounds, or if it is marked, or if its luminance (use the function luminance.luminance) for this) is less than tau Mark the pixel (i, j) Add the pixel (i, j) to the blob blob Recursively call_findBlob ) on the N, E, W, and S pixels bf.getBeads (P) * Return a list of blobs from blobs that have a mass of at least P * BlobFinder Instance variable Blobs identified by this blob finder, _blobs (list of Blob objects) * BlobFinder C) Initialize _blobs to an empty list Create a 2D list of booleans called marked, having the same dimensions as pic Enumerate the pixels of pic, and for each pixel (i, j): 1. Create a Blob object called blob; 2. Call _findBlob) with the appropriate arguments; and 3. Add blob to_blobs if it has a non-zero mass bf._findBlob() Base case: return if pixel (i, j) is out of bounds, or if it is marked, or if its luminance (use the function luminance.luminance) for this) is less than tau Mark the pixel (i, j) Add the pixel (i, j) to the blob blob Recursively call_findBlob ) on the N, E, W, and S pixels bf.getBeads (P) * Return a list of blobs from blobs that have a mass of at least P
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
