computer_vision.intensity_based_segmentation
============================================

.. py:module:: computer_vision.intensity_based_segmentation


Attributes
----------

.. autoapisummary::

   computer_vision.intensity_based_segmentation.image_path


Functions
---------

.. autoapisummary::

   computer_vision.intensity_based_segmentation.segment_image


Module Contents
---------------

.. py:function:: segment_image(image: numpy.ndarray, thresholds: list[int]) -> numpy.ndarray

   Performs image segmentation based on intensity thresholds.

   Args:
       image: Input grayscale image as a 2D array.
       thresholds: Intensity thresholds to define segments.

   Returns:
       A labeled 2D array where each region corresponds to a threshold range.

   Example:
       >>> img = np.array([[80, 120, 180], [40, 90, 150], [20, 60, 100]])
       >>> segment_image(img, [50, 100, 150])
       array([[1, 2, 3],
              [0, 1, 2],
              [0, 1, 1]], dtype=int32)


.. py:data:: image_path
   :value: 'path_to_image'