Question: Instance variable: - Blobs identified by this blob finder, _ blobs ( list of Blob objects ) . BlobFinder ( ) - Initialize blobs to

Instance variable: - Blobs identified by this blob finder, _blobs (list of Blob objects). BlobFinder()- 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): - create a Blob object called blob; - call _findBlob() with the appropriate arguments; and - 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 luminance() method from Color 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(pixels)- Return a list of blobs from blobs that have a mass pixels.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!