Created
July 28, 2017 19:34
-
-
Save seth10/a2890f74c267d5dbfa8a7045be79349d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- # Find the index of the blob with the most pixels. | |
- most_pixels = 0 | |
- largest_blob = 0 | |
- for i in range(len(blobs)): | |
- if blobs[i].pixels() > most_pixels: | |
- most_pixels = blobs[i].pixels() | |
- largest_blob = i | |
+ # Find the blob with the most pixels. | |
+ largest_blob = max(blobs, key=lambda b: b.pixels()) | |
https://github.com/openmv/qt-creator/pull/2/commits/847070ce0a7d4dd670f1c6928f3f24f8ee7a8924 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment