Skip to content

Cornea: Image Segmentation Skills

SUMMARY

Cornea is a module in the Telekinesis SDK containing skills for 2D image segmentation.

It provides segmentation capabilities using classical computer vision techniques and deep learning models, allowing developers to extract structured visual information from images for robotics applications.

Install Telekinesis Skill Library
Create an API key, install telekinesis-ai and module specific installations and dependencies in a Python environment.
Open installation →
Go to the Quickstart
Pick a starter and run your first Skill end-to-end - 2D / 3D vision, webcam capture, robot motion, or a full vision-to-robot pipeline, all visualized in Rerun.
Open quickstart →

When to Use Cornea?

Use Cornea for robotics applications that require pixel-level understanding of images, such as:

  • Vision-guided pick-and-place pipelines
  • Palletizing and bin organization
  • Object isolation for manipulation and grasp planning
  • Obstacle detection in camera-based navigation
  • Scene understanding for Physical AI agents

What Does Cornea Provide?

Cornea includes a collection of modular skills for:

  • Semantic and instance segmentation
  • Classical image segmentation techniques
  • Deep learning–based segmentation models
  • Image preprocessing and postprocessing for segmentation pipelines

How to Use Cornea?

To use the skills from Cornea, simply use:

python
from telekinesis import cornea

Here is a minimal example:

python
from telekinesis import cornea, datatypes
# ===================== Load Image ==========================================
image_url = "https://assets.telekinesis.ai/examples/v1/images/cylinder_on_conveyor.jpg"
image = datatypes.Image.from_url(url=image_url)

# ===================== Run Skill ==========================================
segmented_image = cornea.segment_image_using_rgb(
  image=image, lower_bound=(0, 50, 50), upper_bound=(180, 255, 255)
)

Overview of Skills

21 skills

Segment Image Using RGBCornea

Segment Image Using RGB

Perform image segmentation based on RGB color ranges to identify objects by their specific color values.

Segment Image Using HSVCornea

Segment Image Using HSV

Perform robust color-based segmentation using HSV color space, separating hue, saturation, and value for consistent detection under varying lighting conditions.

Segment Image Using LABCornea

Segment Image Using LAB

Perform perceptually uniform color-based segmentation using LAB color space, ideal for matching human color perception in image processing tasks.

Segment Image Using YCrCbCornea

Segment Image Using YCrCb

Perform YCrCb color space segmentation to detect objects based on chrominance, commonly used for skin detection and face detection.

Segment Image Using Flood FillCornea

Segment Image Using Flood Fill

Flood fill image segmentation for extracting connected regions based on a seed point and color tolerance for computer vision and image processing pipelines.

Segment Image Using WatershedCornea

Segment Image Using Watershed

Perform marker-based watershed segmentation to separate touching or overlapping objects in an image.

Segment Image Using Focus RegionCornea

Segment Image Using Focus Region

Focus region segmentation for identifying in-focus areas based on image sharpness for computer vision, depth estimation, and image processing pipelines.

Segment Image Using Otsu ThresholdCornea

Segment Image Using Otsu Threshold

Automatically segment an image with a single global threshold chosen by Otsu's method, ideal for clearly bimodal intensity histograms.

Segment Image Using Local ThresholdCornea

Segment Image Using Local Threshold

Segment images with non-uniform lighting or varying background intensity using a single-parameter, neighborhood-based local threshold.

Segment Image Using Yen ThresholdCornea

Segment Image Using Yen Threshold

Automatically segment an image with a single global threshold chosen by Yen's entropy-based method, a parameter-free alternative to Otsu thresholding.

Segment Image Using ThresholdCornea

Segment Image Using Threshold

Perform manual global threshold segmentation with a chosen pixel value and one of five comparison modes to create a labeled segmentation mask.

Segment Image Using Adaptive ThresholdCornea

Segment Image Using Adaptive Threshold

Adaptive per-pixel threshold segmentation for images with non-uniform lighting, shadows, and varying intensity, with control over the local-averaging method and comparison direction.

Segment Image Using Laplacian ThresholdCornea

Segment Image Using Laplacian Threshold

Segment an image's edge-rich, textured regions from its smooth regions by thresholding the Laplacian (second-derivative) edge response.

Segment Image Using FelzenszwalbCornea

Segment Image Using Felzenszwalb

Generate irregularly-shaped, boundary-following superpixels with Felzenszwalb's graph-based segmentation algorithm.

Segment Image Using SLIC SuperpixelCornea

Segment Image Using SLIC Superpixel

Generate compact, near-uniform superpixels with the SLIC (Simple Linear Iterative Clustering) algorithm for predictable over-segmentation.

Filter Segments By AreaCornea

Filter Segments By Area

Remove segments smaller or larger than a given pixel-area range from an existing label map, discarding noise or implausibly large regions.

Filter Segments By ColorCornea

Filter Segments By Color

Remove segments from an existing label map whose mean pixel intensity falls outside a given range, keeping only bright or dark regions of interest.

Filter Segments By MaskCornea

Filter Segments By Mask

Keep only the segments of an existing label map that overlap a region-of-interest mask, discarding the rest.

Segment Image Using GrabCutCornea

Segment Image Using GrabCut

Perform foreground/background segmentation using GrabCut, an iterative graph cut algorithm for interactive object extraction and background removal.

cornea.segment_image_foreground_using_birefnet()Cornea

Segment Image Using Foreground BiRefNet

Segment the salient foreground object from the background using BiRefNet, a deep-learning model that needs no bounding box or seed point.

Segment Image Using SAMCornea

Segment Image Using SAM

Segment objects inside bounding box prompts using Meta's Segment Anything Model (SAM), a deep-learning alternative to GrabCut for precise per-object masks.