Notebook
usage: objecthunt <image> <outdir> --options Measure and separate objects in image based on color. positional arguments: image Path to image out directory Path to outdirectory optional arguments: -h, --help show this help message and exit -c, --config Path to config file. Defaults to "./_configobjhunt.py" -p, --params Overwrite configuration parameters manually (e.g. objecthunt <image> <outdir> -p ignore=black -f, --force Overwrite outdirectory if it exists. WARNING: this will remove entire directory tree! --dpi Plotting resolution (dots per inch) -v, --verbosity Set screen logging. If no argument, defaults to info -t, --trace Show traceback on errors
MultiCanvas (0xaefd9bc) 171: patch1 - Canvas (0xaef8e0c) : 1024 X 1000 : 96 particles patch2 - Canvas (0xaefd6bc) : 1024 X 1000 : 16 particles patch3 - Canvas (0xaefd98c) : 1024 X 1000 : 40 particles patch4 - Canvas (0xaefd77c) : 1024 X 1000 : 19 particles ### Net Canvas ### ------------------ Canvas (0xafd7cbc): background --> (1024 X 1000) : file/colorstring/url particles --> 171 particles : 1 types xygrid[435] --> (29p X 15p) : (34.5 X 68.2) [pix/tile] Image Resolution: (1024, 1000) Particle coverage: 19.57% area (min, max, mean): (437.00 - 3319.00, 1172.11) circularity (min, max, mean): (0.30 - 1.00, 0.80) equivalent_diameter (min, max, mean): (23.59 - 65.01, 37.28) ### patch1 ### -------------- Canvas (0xd1409ec): background --> (1024 X 1000) : file/colorstring/url particles --> 96 particles : 1 types xygrid[435] --> (29p X 15p) : (34.5 X 68.2) [pix/tile] Image Resolution: (1024, 1000) Particle coverage: 6.59% area (min, max, mean): (437.00 - 1125.00, 703.38) circularity (min, max, mean): (0.94 - 1.00, 0.97) equivalent_diameter (min, max, mean): (23.59 - 37.85, 29.77)
from pyparty.scripts.objectmodeling import DefaultParameters class Parameters(DefaultParameters): """ Creating a new Parameters class; we will rename mapper attributes to rappers, and ignore white pixels as background. """ ignore = 'white' mapper = [ ('50cent','yellow'), ('kendrick', (1,0,0)), ('dre', 'pink' ), ('reds', 'red') ] ...