tessl install tessl/pypi-imutils@0.5.0A series of convenience functions to make basic image processing functions such as translation, rotation, resizing, skeletonization, displaying Matplotlib images, sorting contours, detecting edges, and much more easier with OpenCV and both Python 2.7 and Python 3.
Agent Success
Agent success rate when using this tile
91%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.34x
Baseline
Agent success rate without this tile
68%
Build a tool that detects, sorts, and labels objects in an image for systematic counting and visualization.
Your implementation should:
The tool should handle grayscale conversion, noise reduction, and thresholding to ensure reliable object detection. Objects should be numbered systematically based on their left-to-right position.
@generates
def count_and_label_objects(image_path: str, output_path: str = None) -> int:
"""
Detects, sorts, and labels objects in an image.
Args:
image_path: Path to the input image
output_path: Optional path to save the annotated image
Returns:
The total count of detected objects
"""
passProvides image processing and computer vision capabilities.
Provides array manipulation support.
Provides convenience functions for image processing tasks.