robokudo.annotators.grab_cut ============================ .. py:module:: robokudo.annotators.grab_cut .. autoapi-nested-parse:: Image segmentation using GrabCut algorithm. This module provides an annotator for: * Refining object ROIs using GrabCut * Processing color image regions * Creating segmentation masks * Visualizing segmentation results The module uses: * OpenCV GrabCut implementation * ROI-based initialization * Iterative segmentation * Mask-based visualization .. warning:: Current implementation is incomplete and for reference only. Classes ------- .. autoapisummary:: robokudo.annotators.grab_cut.GrabCutAnnotator Module Contents --------------- .. py:class:: GrabCutAnnotator(name='GrabCutAnnotator') Bases: :py:obj:`robokudo.annotators.core.ThreadedAnnotator` Refine the ROI of an Object Hypothesis with the GrabCut Algorithm This annotator: * Refines object ROIs using GrabCut * Processes color image regions * Creates foreground/background models * Generates segmentation masks * Visualizes segmented regions .. warning:: Current implementation only processes one object and lacks annotation creation. .. py:method:: compute() Process object hypotheses using GrabCut. The method: * Loads color image and object hypotheses * For each hypothesis: * Extracts ROI rectangle * Creates initial mask * Initializes foreground/background models * Runs GrabCut segmentation * Creates visualization .. note:: Currently only processes one object and lacks annotation creation. :return: SUCCESS after processing :rtype: py_trees.Status