Skip to content

Commit

Permalink
Fix shape mismatch for getting color info
Browse files Browse the repository at this point in the history
  • Loading branch information
W7CH committed Aug 1, 2024
1 parent 971f56c commit f95fd32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion processing/segmenter/planktoscope/segmenter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,9 @@ def _slice_image(self, img, name, mask, start_count=0):
# Extract the object and get all the metadata about the image
individual_mask = (labels == region.label).astype(np.uint8)
obj_image = self._crop_and_apply_mask(img, individual_mask)
region_image = img[region.slice]
if obj_image is not None:
colors = self._get_color_info(obj_image, region.filled_image)
colors = self._get_color_info(region_image, region.filled_image)
metadata = self._extract_metadata_from_regionprop(region)

object_id = f"{name}_{i}"
Expand Down

0 comments on commit f95fd32

Please sign in to comment.