Closed maxcembalest closed 7 years ago
@maxcembalest See https://github.com/anki/cozmo-python-sdk/blob/master/CODESTYLE.md - indentation should be 4 spaces (not tabs) - in github it looks like it's displaying it as 8 char tabs, can you check your editor settings (should be possible to make it use 4-chars for tabs) and re-save / update it
@maxcembalest As a general note - please look at the following for how docstrings should be formatted: https://github.com/anki/cozmo-python-sdk/blob/master/CODESTYLE.md http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html (In this case because it's an example we're not generating the documentation from it, but if we tried we'd hit warnings about indentation etc.)
The ColorFinder app contains:
ColorFinder class, which contains the annotation code, handling cube taps, sending the camera view approximation to a BlobDetector, and managing the driving/head-tilting/rotating actions.
color_ranges, which defines colors based on their bounded three-dimensional regions in RGB space. color_distance_sq, which computes the squared distance from a color point to a color range. color_balance, which applies a "Gray World" algorithm to balance the color distribution in an image.
BlobDetector class, which takes the matrix of approximated colors from ColorFinder and constructs a dictionary of the contiguous regions of color. It also contains a method to find the approximate center of the largest blobs so that Cozmo can turn his focus towards the center of the blob he is looking for.
MyMatrix class, which allows for clean representation of matrix dimensions, as well as accessing neighboring values of points.