Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
def find_max(blobs): max_size=0 global max_blob for blob in blobs: if blob.pixels() > max_size: max_blob = blob max_size = blob.pixels() return max_blob
如果没找到色块,blobs就是空列表。
你要加一句 if blobs